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,EAAyB,IADrChvC,GAAK,8BACOgvC,GAAb,CAA+C/2B,6XCJ/C,2BAgLA,QA/KkB,EAAAszB,kBAAoB,CAC9B,aACA,kBACA,cACA,iBACA,oBACA,YACA,UACA,QACA,OACA,cACA,QACA,OACA,mBACA,eACA,gBACA,YACA,eACA,SACA,iBACA,iBACA,UACA,SACA,gBACA,gBACA,2BAGU,EAAAC,kBAAoB,CAC9B,uBACA,gCACA,6BACA,YACA,eACA,qBACA,wBACA,aACA,sBACA,mBACA,iCACA,8BACA,kBACA,eACA,mBACA,kBACA,2BACA,wBACA,0BACA,gCACA,mCACA,0BACA,mBACA,yBACA,4BACA,UACA,qBAGU,EAAAC,iBAAmB,CAC7B,WACA,eACA,kBACA,WACA,sBACA,iBACA,SAEU,EAAAC,kBAAoB,CAC9B,WACA,YACA,mBACA,OACA,cACA,QACA,eACA,WACA,WACA,gBACA,uBACA,aACA,qBAEU,EAAAC,mBAAqB,CAC/B,oBACA,2BACA,2BACA,gBACA,gBACA,OACA,cACA,WACA,kBACA,QACA,eACA,oBACA,0BACA,sCACA,eACA,kBACA,eACA,cACA,aACA,aACA,oBACA,mBACA,iBACA,cACA,cACA,WACA,gBACA,oBACA,wBACA,UACA,YACA,aACA,WACA,WACA,YACA,kBACA,iBACA,kBACA,sBAGU,EAAAC,oBAAsB,CAChC,qBACA,cACA,cACA,oBACA,aACA,wBACA,iBACA,0BACA,cACA,aACA,SACA,kBACA,wBACA,8BACA,UACA,UACA,qBACA,kBACA,qBACA,gBACA,sBACA,oBACA,cACA,qBACA,mBACA,4BACA,uBACA,sBAGU,EAAAC,eAAiB,GACxBoD,EAAWxD,iBACXwD,EAAWzD,kBACXyD,EAAW1D,kBACX0D,EAAWvD,kBACXuD,EAAWrD,oBACXqD,EAAWtD,oBAKJ,EAAAI,qBAAuB,CACjC,SACA,WACA,eACA,yBACA,kBACA,WACA,8BAER,EAhLA,+RCAA,cAmBI,WAAYzpG,EAAWgiF,EAAWxwH,EAAWD,QAAA,IA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AAQ,CACJ,MAAO,GAEX,MAAO,CACH,MAAO,GAEX,MAAO,CACH,MAAO,SAQvC,EAKJ,EAxIA,CAA+B,iVCAzB,GAA+B,CACjC,MAAO,CACH,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,WAEJ,QAAS,CACL,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,YAIR,0EAIA,QAJmC,QACrB,uBAAV,WACI,OAAO,EACX,EACJ,EAJA,CAAmC,iVCvC7B,GAA+B,CACjC,MAAO,CACH,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,WAEJ,QAAS,CACL,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,YAIR,0EAIA,QAJkC,QACpB,uBAAV,WACI,OAAO,EACX,EACJ,EAJA,CAAkC,iVCvC5B,GAA+B,CACjC,MAAO,CACH,UACA,UACA,UACA,UACA,UACA,WAEJ,QAAS,CACL,UACA,UACA,UACA,UACA,UACA,YAIR,0EAIA,QAJiC,QACnB,uBAAV,WACI,OAAO,EACX,EACJ,EAJA,CAAiC,iVCnB3B,GAA+B,CACjC,MAAO,CACH,UACA,UACA,UACA,UACA,UACA,WAEJ,QAAS,CACL,UACA,UACA,UACA,UACA,UACA,YAIR,0EAIA,QAJgC,QAClB,uBAAV,WACI,OAAO,EACX,EACJ,EAJA,CAAgC,iVCnB1B,GAA+B,CACjC,MAAO,CACH,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,WAEJ,QAAS,CACL,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,YAIR,0EAIA,QAJgC,QAClB,uBAAV,WACI,OAAO,EACX,EACJ,EAJA,CAAgC,iVC3B1B,GAA+B,CACjC,MAAO,CACH,UACA,UACA,UACA,UACA,UACA,UACA,UACA,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,IACA,SACA,SACA,MAEA,QACA,MACA,IACA,QACA,QACA,MACA,SACA,QACA,SACA,SACA,SACA,SACA,QACA,SACA,MACA,SAEA,IACA,SACA,SACA,MACA,QACA,QACA,MACA,IACA,MACA,SACA,SACA,SACA,SACA,SACA,SACA,SAEA,QACA,QACA,SACA,SACA,SACA,SACA,QACA,QACA,MACA,QACA,MACA,QACA,SACA,SACA,QACA,QAGA,EACA,SACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,KAKGxE,GAAO,CACV,EAAM,SACN,EAAM,UACN,GAAM,UACN,GAAM,QACN,GAAM,SACN,GAAM,QACN,GAAM,OACN,GAAM,gBACN,IAAM,SAGH0E,GAAQ,CACX,SAAiB,EACjB,UAAiB,EACjB,UAAiB,GACjB,QAAiB,GACjB,SAAiB,GACjB,QAAiB,GACjB,OAAiB,GACjB,gBAAiB,GACjB,QAAiB,KAGdC,GAAgB,CACnB,yBACA,kBACA,mBACA,gBACA,iBACA,iBACA,mBACA,qBACA,iBACA,kBACA,sBACA,wBACA,oBACA,yBAOGC,GAAgC,CAEnC,6EAA8E,YAC9E,uDAAwD,YACxD,0DAA2D,YAC3D,uDAAwD,YACxD,gFAAiF,YAGjF,4EAA6E,SAC7E,qCAAsC,SACtC,sCAAuC,OAGvC,6EAA8E,SAC9E,sCAAuC,SAGvC,0CAA2C,SAC3C,sCAAuC,SACvC,0CAA2C,OAC3C,sCAAuC,OAGvC,8EAA+E,UAC/E,uCAAwC,UAGxC,gFAAiF,OACjF,yCAA0C,OAG1C,yEAA0E,SAC1E,kCAAmC,SAGnC,6DAA8D,YAC9D,sEAAuE,YACvE,wEAAyE,WAGzE,wEAAyE,OACzE,6EAA8E,OAG9E,2EAA4E,WAC5E,oCAAqC,WACrC,gDAAiD,mBACjD,sCAAuC,SAGvC,gFAAiF,WACjF,yCAA0C,WAG1C,sCAAuC,OACvC,6EAA8E,OAG9E,oEAAqE,OAGrE,gDAA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E73K,QAAc,8DAClB63K,EAAEA,EAAE73K,QAAc,qDAClB63K,EAAEA,EAAE73K,QAAc,qDAClB63K,EAAEA,EAAE73K,QAAc,4CAClB63K,EAAEA,EAAE73K,QAAc,2CAClB63K,EAAEA,EAAE73K,QAAc,4CAClB63K,EAAEA,EAAE73K,QAAc,4CAClB63K,EAAEA,EAAE73K,QAAc,+CAClB63K,EAAEA,EAAE73K,QAAc,2CAClB63K,EAAEA,EAAE73K,QAAc,2CAClB63K,EAAEA,EAAE73K,QAAc,8CAClB63K,EAAEA,EAAE73K,QAAc,0DAClB63K,EAAEA,EAAE73K,QAAc,wDAClB63K,EAAEA,EAAE73K,QAAc,wDAClB63K,EAAEA,EAAE73K,QAAc,6CAClB63K,EAAEA,EAAE73K,QAAc,4CAClB63K,EAAEA,EAAE73K,QAAc,6CAClB63K,EAAEA,EAAE73K,QAAc,2CAClB63K,EAAEA,EAAE73K,QAAc,uDAClB63K,EAAEA,EAAE73K,QAAc,6CAClB63K,EAAEA,EAAE73K,QAAc,6CAClB63K,EAAEA,EAAE73K,QAAc,+CAClB63K,EAAEA,EAAE73K,QAAc,kDAClB63K,EAAEA,EAAE73K,QAAc,qDAClB63K,EAAEA,EAAE73K,QAAc,qDAClB63K,EAAEA,EAAE73K,QAAc,sDAClB63K,EAAEA,EAAE73K,QAAc,6CAClB63K,EAAEA,EAAE73K,QAAa,iBACjB63K,EAAEA,EAAE73K,QAAa,gBACjB63K,EAAEA,EAAE73K,QAAc,gCAClB63K,EAAEA,EAAE73K,QAAc,sBAClB63K,EAAEA,EAAE73K,QAAc,sBAClB63K,EAAEA,EAAE73K,QAAc,iFAClB63K,EAAEA,EAAE73K,QAAc,+DAClB63K,EAAEA,EAAE73K,QAAc,kDAClB63K,EAAEA,EAAE73K,QAAc,8DAClB63K,EAAEA,EAAE73K,QAAc,2CAClB63K,EAAEA,EAAE73K,QAAc,2CAClB63K,EAAEA,EAAE73K,QAAc,4CAClB63K,EAAEA,EAAE73K,QAAc,2CAClB63K,EAAEA,EAAE73K,QAAc,4CAClB63K,EAAEA,EAAE73K,QAAc,4CAClB63K,EAAEA,EAAE73K,QAAc,8CAClB63K,EAAEA,EAAE73K,QAAc,2CAClB63K,EAAEA,EAAE73K,QAAc,2CAClB63K,EAAEA,EAAE73K,QAAc,8CAClB63K,EAAEA,EAAE73K,QAAc,0DAClB63K,EAAEA,EAAE73K,QAAc,wDAClB63K,EAAEA,EAAE73K,QAAc,wDAClB63K,EAAEA,EAAE73K,QAAc,6CAClB63K,EAAEA,EAAE73K,QAAc,4CAClB63K,EAAEA,EAAE73K,QAAc,6CAClB63K,EAAEA,EAAE73K,QAAc,2CAClB63K,EAAEA,EAAE73K,QAAc,uDAClB63K,EAAEA,EAAE73K,QAAc,6CAClB63K,EAAEA,EAAE73K,QAAc,6CAClB63K,EAAEA,EAAE73K,QAAc,+CAClB63K,EAAEA,EAAE73K,QAAc,kDAClB63K,EAAEA,EAAE73K,QAAc,qDAClB63K,EAAEA,EAAE73K,QAAc,2CAClB63K,EAAEA,EAAE73K,QAAc,sDAClB63K,EAAEA,EAAE73K,QAAc,6CAClB63K,EAAEA,EAAE73K,QAAa,iBACjB63K,EAAEA,EAAE73K,QAAY,kBAEhB63K,EAAEA,EAAE73K,QAAY,8BAChB63K,EAAEA,EAAE73K,QAAa,mBACjB63K,EAAEA,EAAE73K,QAAc,wDAClB63K,EAAEA,EAAE73K,QAAc,gCAClB63K,EAAEA,EAAE73K,QAAe,YACnB63K,EAAEA,EAAE73K,QAAgB,4GACpB63K,EAAEA,EAAE73K,QAAgB,gHACpB63K,EAAEA,EAAE73K,QAAgB,iHACpB63K,EAAEA,EAAE73K,QAAe,aACnB63K,EAAEA,EAAE73K,QAAe,qCACnB63K,EAAEA,EAAE73K,QAAc,gBAClB63K,EAAEA,EAAE73K,QAAc,gCAClB63K,EAAEA,EAAE73K,QAAe,YACnB63K,EAAEA,EAAE73K,QAAgB,oIACpB63K,EAAEA,EAAE73K,QAAgB,wIACpB63K,EAAEA,EAAE73K,QAAe,aACnB63K,EAAEA,EAAE73K,QAAe,qCACnB63K,EAAEA,EAAE73K,QAAc,gBAClB63K,EAAEA,EAAE73K,QAAa,oBACjB63K,EAAEA,EAAE73K,QAAa,iBACjB63K,EAAEA,EAAE73K,QAAc,mMAClB63K,EAAEA,EAAE73K,QAAc,yIAClB63K,EAAEA,EAAE73K,QAAc,yIAClB63K,EAAEA,EAAE73K,QAAa,kBACjB63K,EAAEA,EAAE73K,QAAa,qBACjB63K,EAAEA,EAAE73K,QAAc,kBAClB63K,EAAEA,EAAE73K,QAAe,gBACnB63K,EAAEA,EAAE73K,QAAgB,oJACpB63K,EAAEA,EAAE73K,QAAe,iBACnB63K,EAAEA,EAAE73K,QAAc,mBAClB63K,EAAEA,EAAE73K,QAAc,kBAClB63K,EAAEA,EAAE73K,QAAe,gBACnB63K,EAAEA,EAAE73K,QAAgB,oJACpB63K,EAAEA,EAAE73K,QAAe,iBACnB63K,EAAEA,EAAE73K,QAAc,mBAClB63K,EAAEA,EAAE73K,QAAc,kBAClB63K,EAAEA,EAAE73K,QAAe,gBACnB63K,EAAEA,EAAE73K,QAAgB,oJACpB63K,EAAEA,EAAE73K,QAAe,iBACnB63K,EAAEA,EAAE73K,QAAe,6LACnB63K,EAAEA,EAAE73K,QAAe,mDACnB63K,EAAEA,EAAE73K,QAAc,mBAClB63K,EAAEA,EAAE73K,QAAa,sBACjB63K,EAAEA,EAAE73K,QAAa,qBACjB63K,EAAEA,EAAE73K,QAAc,wDAClB63K,EAAEA,EAAE73K,QAAc,gCAClB63K,EAAEA,EAAE73K,QAAe,YACnB63K,EAAEA,EAAE73K,QAAgB,4GACpB63K,EAAEA,EAAE73K,QAAgB,sIACpB63K,EAAEA,EAAE73K,QAAgB,kHACpB63K,EAAEA,EAAE73K,QAAe,aACnB63K,EAAEA,EAAE73K,QAAe,2FACnB63K,EAAEA,EAAE73K,QAAc,gBAClB63K,EAAEA,EAAE73K,QAAc,gCAClB63K,EAAEA,E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K,kBACL,IAAK,cACL,IAAK,qBACL,IAAK,SACL,IAAK,cACL,IAAK,WACL,IAAK,WACL,IAAK,eACL,IAAK,eACL,IAAK,iBACL,IAAK,eACL,IAAK,kBACL,IAAK,qBACL,IAAK,aACL,IAAK,YACL,IAAK,YACL,IAAK,gBACL,IAAK,cACL,IAAK,eACL,IAAK,kBACL,IAAK,oBACL,IAAK,kBACL,IAAK,iBACL,IAAK,UACL,IAAK,YACL,IAAK,YACL,IAAK,aACL,IAAK,cACL,IAAK,UACL,IAAK,SACL,IAAK,cACL,IAAK,UACL,IAAK,oBACL,IAAK,kBACL,IAAK,QACL,IAAK,aACL,IAAK,YACL,IAAK,cACL,IAAK,mBACL,IAAK,oBACL,IAAK,cACL,IAAK,cACL,IAAK,mBACL,IAAK,eACL,IAAK,aACL,IAAK,eACL,IAAK,gBACL,IAAK,aACL,IAAK,cACL,IAAK,cACL,IAAK,iBACL,IAAK,YACL,IAAK,cACL,IAAK,eACL,IAAK,aACL,IAAK,aACL,IAAK,gBACL,IAAK,eACL,IAAK,kBACL,IAAK,gBACL,IAAK,qBACL,IAAK,WACL,IAAK,OACL,IAAK,gBACL,IAAK,kBACL,IAAK,aACL,IAAK,aACL,IAAK,eACL,IAAK,iBACL,IAAK,cACL,IAAK,iBACL,IAAK,qBACL,IAAK,YACL,IAAK,oBACL,IAAK,WACL,IAAK,cACL,IAAK,iBACL,IAAK,WACL,IAAK,eACL,IAAK,gBACL,IAAK,gBACL,IAAK,mBACL,IAAK,iBACL,IAAK,eACL,IAAK,cACL,IAAK,YACL,IAAK,kBACL,IAAK,oBACL,IAAK,iBACL,IAAK,YACL,IAAK,aACL,IAAK,oBACL,IAAK,aACL,IAAK,eACL,IAAK,iBACL,IAAK,kBACL,IAAK,eACL,IAAK,gBACL,IAAK,gBACL,IAAK,qBACL,IAAK,mBACL,IAAK,qBACL,IAAK,yBACL,IAAK,cACL,IAAK,aACL,IAAK,mBACL,IAAK,sBACL,IAAK,eACL,IAAK,eACL,IAAK,gBACL,IAAK,cACL,IAAK,kBACL,IAAK,cACL,IAAK,gBACL,IAAK,kBACL,IAAK,2BACL,IAAK,eACL,IAAK,iBACL,IAAK,aACL,IAAK,iBACL,IAAK,YACL,IAAK,mBACL,IAAK,cACL,IAAK,wBACL,IAAK,kBACL,IAAK,qBACL,IAAK,kBACL,IAAK,kBACL,IAAK,kBACL,IAAK,qBACL,IAAK,aACL,IAAK,iBACL,IAAK,eACL,IAAK,mBACL,IAAK,aACL,IAAK,eACL,IAAK,kBACL,IAAK,gBACL,IAAK,gBACL,IAAK,kBACL,IAAK,kBACL,IAAK,gBACL,IAAK,iBACL,IAAK,uBACL,IAAK,0BACL,IAAK,iBACL,IAAK,eACL,IAAK,YACL,IAAK,cACL,IAAK,aACL,IAAK,iBACL,IAAK,kBACL,IAAK,kBACL,IAAK,gBACL,IAAK,kBACL,IAAK,gBACL,IAAK,gBACL,IAAK,qBACL,IAAK,cACL,IAAK,mBACL,IAAK,uBACL,IAAK,mBACL,IAAK,kBACL,IAAK,mBACL,IAAK,cACL,IAAK,iBACL,IAAK,kBACL,IAAK,eACL,IAAK,eACL,IAAK,oBACL,IAAK,sBACL,IAAK,sBACL,IAAK,mBACL,IAAK,qBACL,IAAK,qBACL,IAAK,gBACL,IAAK,aACL,IAAK,YACL,IAAK,cACL,IAAK,mBACL,IAAK,gBACL,IAAK,wBACL,IAAK,qBACL,IAAK,SACL,IAAK,kBACL,IAAK,gBACL,IAAK,kBACL,IAAK,gBACL,IAAK,gBACL,IAAK,mBACL,IAAK,mBACL,IAAK,oBACL,IAAK,eACL,IAAK,oBACL,IAAK,uBACL,IAAK,cACL,IAAK,WACL,IAAK,WACL,IAAK,aACL,IAAK,aACL,IAAK,eACL,IAAK,eACL,IAAK,cACL,IAAK,qBACL,IAAK,yBACL,IAAK,mBACL,IAAK,WACL,IAAK,iBACL,IAAK,iBACL,IAAK,eACL,IAAK,YACL,IAAK,mBACL,IAAK,mBACL,IAAK,iBACL,IAAK,kBAC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OACL,IAAK,UACL,IAAK,UACL,IAAK,OACL,IAAK,WACL,IAAK,gBACL,IAAK,aACL,IAAK,eACL,IAAK,WACL,IAAK,YACL,IAAK,WACL,IAAK,OACL,IAAK,SACL,IAAK,OACL,IAAK,UACL,IAAK,QACL,IAAK,QACL,IAAK,YACL,IAAK,UACL,IAAK,aACL,IAAK,aACL,IAAK,WACL,IAAK,QACL,IAAK,UACL,IAAK,WACL,IAAK,QACL,IAAK,SACL,IAAK,OACL,IAAK,OACL,IAAK,UACL,IAAK,YACL,IAAK,MACL,IAAK,OACL,IAAK,OACL,IAAK,UACL,IAAK,UACL,IAAK,QACL,IAAK,MACL,IAAK,OACL,IAAK,UACL,IAAK,SACL,IAAK,WACL,IAAK,SACL,IAAK,aACL,IAAK,OACL,IAAK,OACL,IAAK,OACL,IAAK,QACL,IAAK,QACL,IAAK,QACL,IAAK,OACL,IAAK,gBACL,IAAK,WACL,IAAK,aACL,IAAK,cACL,IAAK,gBACL,IAAK,kBACL,IAAK,gBACL,IAAK,WACL,IAAK,OACL,IAAK,QACL,IAAK,aACL,IAAK,KACL,IAAK,QACL,IAAK,SACL,IAAK,YACL,IAAK,cACL,IAAK,iBACL,IAAK,OACL,IAAK,gBACL,IAAK,WACL,IAAK,cACL,IAAK,WACL,IAAK,iBACL,IAAK,aACL,IAAK,YACL,IAAK,eACL,IAAK,eACL,IAAK,cACL,IAAK,aACL,IAAK,cACL,IAAK,eACL,IAAK,SACL,IAAK,WACL,IAAK,UACL,IAAK,UACL,IAAK,YACL,IAAK,UACL,IAAK,SACL,IAAK,SACL,IAAK,aACL,IAAK,YACL,IAAK,OACL,IAAK,YACL,IAAK,QACL,IAAK,OACL,IAAK,SACL,IAAK,YACL,IAAK,QACL,IAAK,YACL,IAAK,WACL,IAAK,UACL,IAAK,cACL,IAAK,cACL,IAAK,SACL,IAAK,eACL,IAAK,WACL,IAAK,YACL,IAAK,UACL,IAAK,WACL,IAAK,cACL,IAAK,MACL,IAAK,SACL,IAAK,UACL,IAAK,QACL,IAAK,UACL,IAAK,UACL,IAAK,WACL,IAAK,WACL,IAAK,UACL,IAAK,SACL,IAAK,QACL,IAAK,WACL,IAAK,QACL,IAAK,YACL,IAAK,UACL,IAAK,MACL,IAAK,QACL,IAAK,QACL,IAAK,QACL,IAAK,OACL,IAAK,QACL,IAAK,UACL,IAAK,UACL,IAAK,QACL,IAAK,OACL,IAAK,OACL,IAAK,QACL,IAAK,QACL,IAAK,QACL,IAAK,WACL,IAAK,aACL,IAAK,cACL,IAAK,OACL,IAAK,WACL,IAAK,OACL,IAAK,gBACL,IAAK,YACL,IAAK,cACL,IAAK,QACL,IAAK,iBACL,IAAK,kBACL,IAAK,kBACL,IAAK,iBACL,IAAK,UACL,IAAK,UACL,IAAK,WACL,IAAK,QACL,IAAK,UACL,IAAK,aACL,IAAK,eACL,IAAK,oBACL,IAAK,QACL,IAAK,UACL,IAAK,aACL,IAAK,eACL,IAAK,QACL,IAAK,cACL,IAAK,cACL,IAAK,WACL,IAAK,eACL,IAAK,YACL,IAAK,WACL,IAAK,WACL,IAAK,OACL,IAAK,OACL,IAAK,UACL,IAAK,QACL,IAAK,SACL,IAAK,OACL,IAAK,WACL,IAAK,gBACL,IAAK,YACL,IAAK,kBACL,IAAK,eACL,IAAK,gBACL,IAAK,mBACL,IAAK,cACL,IAAK,gBACL,IAAK,cACL,IAAK,WACL,IAAK,MACL,IAAK,YACL,IAAK,aACL,IAAK,qBACL,IAAK,mBACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,QACL,IAAK,QACL,IAAK,UACL,IAAK,QACL,IAAK,SACL,IAAK,OACL,IAAK,SACL,IAAK,UACL,IAAK,QACL,IAAK,QACL,IAAK,QACL,IAAK,aACL,IAAK,cACL,IAAK,YACL,IAAK,SACL,IAAK,UACL,IAAK,QACL,IAAK,YAC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EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,MAAO,GAGT,SAASsF,GAAmBn+oB,GAc3B,MAbmB,OAAhBA,EAAEstE,MAAM,EAAE,KAAattE,EAAIA,EAAEstE,MAAM,IAEhB,I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SAAUnwY,KAO3C23B,GAAQwgmB,KAGRG,GAAe30sB,EAAAA,YAOf40sB,GAAkB7/qB,GAAyB,KAAa,IAAD8/qB,EACrC,QAApBA,EAAAF,GAAa7urB,eAAO,IAAA+urB,GAApBA,EAAsBxgrB,cAAcU,EAAI,EAG5C0/qB,GAAW3gmB,EAAAA,EAAOE,GAAO7qG,IAEzB2vY,EAAAA,QACIh7Y,EAAAA,EAAAA,KAACy+jB,EAAAA,GAAM,CAACpzjB,QAASA,GAAQpL,UACrBD,EAAAA,EAAAA,KAACg3sB,EAAAA,EAAa,CAACl4sB,MAAOq/C,EAAAA,GAAYl+C,UAC9BD,EAAAA,EAAAA,KAAColgB,EAAAA,EAAgB,CACbzD,SAAU,EACV/5e,IAAKivrB,GACLhxsB,aAAc,CACVE,WAAY,QACZD,SAAU,UAEd0iD,iBAAkB,IAClBgtV,mBAAoB,CAAE5uC,KAAM,KAC5Bl1V,OAASulB,IAEDj3B,EAAAA,EAAAA,KAACsG,EAAAA,EAAM,CACHF,QAAS0wsB,GAAe7/qB,GACxBnuB,MAAO,CAAE9J,MAAO,QAASiB,UAEzBD,EAAAA,EAAAA,KAACm/Y,EAAAA,EAAU,MAGrBl/Y,UAEFD,EAAAA,EAAAA,KAACm0C,GAAAA,GAAQ,CAAC+hE,MAAOA,GAAMj2G,UACnBD,EAAAA,EAAAA,KAACqyhB,GAAG,YAKpBlqgB,SAASC,eAAe","sources":["Validators/FileValidators.ts","helpers/enums/TaskArea.ts","helpers/enums/TaskPhase.ts","Validators/TaskValidator.ts","components/AgGridRenderers/EllipsisButtonActionRenderer.tsx","components/AgGridRenderers/PrivateFileCellRenderer.tsx","components/AgGridRenderers/PrivateHierarchyCellRenderer.tsx","components/AgGridRenderers/TaskAssigneeCellRenderer.tsx","components/AgGridValueGetters/TaskAssigneeValueGetter.tsx","components/AttachmentsGrid/AddTaskDocumentsButton.tsx","components/AttachmentsGrid/TaskDocumentsDropzone.tsx","components/common/SpinnerButton/SpinnerButton.tsx","components/AttachmentsGrid/AttachmentsGrid.tsx","components/ConfirmDialog/ConfirmDialog.tsx","components/ConfirmDialog/RouteLeavingGuard.tsx","components/CustomDropzone/CustomDropzone.tsx","hooks/useCountdown.tsx","components/common/DoubleConfirmDialog/DoubleConfirmDialog.tsx","components/DeleteTasksConfirmDialog/DeleteTasksConfirmDialog.tsx","components/ConfirmationDialogPopper/ConfirmationDialogPopper.tsx","components/DownloadTaskDocumentsPopper/DownloadTaskDocumentsPopper.tsx","components/DownloadTaskDocumentsButton/DownloadTaskDocumentsButton.tsx","../node_modules/@material-ui/icons/esm/Warning.js","components/ExpirationWarningIcon/ExpirationWarningIcon.tsx","components/FileSelectDialog/DocumentTree.tsx","components/FileSelectDialog/FileSelectDialog.tsx","../node_modules/@material-ui/icons/esm/CloudUpload.js","../node_modules/@material-ui/icons/esm/Description.js","components/common/FileDropzone/FileDropzone.tsx","components/FileUploadDialog/FileUploadDropzone.tsx","components/FileUploadDialog/FileUploadDialog.tsx","components/LoadingIndicator/LoadingIndicator.tsx","components/MADialogTitle/MADialogTitle.tsx","components/MultiUserSelector/MultiUserSelector.tsx","components/PageHeader/PageHeader.tsx","components/RequestDetails/LastModified.tsx","../node_modules/@material-ui/icons/esm/LockOpen.js","components/RequestDetails/RestrictRequestToggle.tsx","components/RequestRestrictionConfirmDialog/RequestRestrictionConfirmDialog.tsx","components/RestrictedAttachmentConfirmDialog/RestrictedAttachmentsConfirmDialog.tsx","components/RestrictedFileAssociationDialog/BulkUpdateAccessDialog.tsx","components/RestrictedFileAssociationDialog/RestrictedFileUserAssociationDialogContent.tsx","components/RestrictedFileAssociationDialog/RestrictedUserAutocomplete.tsx","hooks/useSavedView.tsx","../node_modules/@material-ui/core/esm/TableContainer/TableContainer.js","../node_modules/@material-ui/icons/esm/CheckCircle.js","../node_modules/@material-ui/icons/esm/SystemUpdateAlt.js","../node_modules/@material-ui/icons/esm/Cancel.js","components/SavedViewModal/SavedViewTableRow.tsx","components/SavedViewModal/SavedViewTable.tsx","components/SavedViewModal/SavedViewModal.tsx","../node_modules/@material-ui/icons/esm/TableChart.js","components/SavedViewModal/LayoutManagerModalButton.tsx","components/AgGridRenderers/TaskCommentCellRenderer.tsx","components/TaskComments/TaskComments.tsx","components/TaskListEditor/TaskDetailsEditor.tsx","components/common/AutocompleteField/AutocompleteField.tsx","components/common/ConditionalVisibility/ConditionalVisiblity.tsx","components/common/DetailDataField/DetailDataField.tsx","components/common/DetailHeader/DetailHeader.tsx","components/common/RestrictedIcon/RestrictedIcon.tsx","components/common/SpinnerBackdrop.tsx","components/common/TooltipIconButton/TooltipIconButton.tsx","components/engagementManagement/EngagementManagementTooltips.tsx","components/engagementManagement/RequestCellRenderers.tsx","components/engagementManagement/RequestCellValueFormatters.tsx","contexts/FileUploadContext/FileUploadContext.tsx","components/common/ProgressSpinnerBackdrop/ProgressSpinnerBackdrop.tsx","contexts/FileUploadContext/dialogs/FileNameCollisionDialog.tsx","contexts/FileUploadContext/FileUploadContextProvider.tsx","contexts/FileUploadContext/hooks/useGetFileCollisions.tsx","contexts/FileUploadContext/UploadParams.tsx","contexts/FileUploadContext/dialogs/UploadConfirmationDialog.tsx","contexts/FileUploadContext/hooks/useFileUpload.tsx","helpers/Comparators.ts","helpers/Constants.ts","helpers/ContentHierarchyHelpers.ts","helpers/DateHelpers.ts","helpers/FileHelpers.ts","helpers/RequestedDateRenderer.tsx","helpers/SavedViewKeys.ts","helpers/StringHelpers.ts","helpers/TaskHelpers.ts","helpers/agGridHelpers.ts","helpers/enums/HierarchyType.ts","helpers/enums/LineOfBusinessId.ts","helpers/enums/SocStatus.ts","helpers/enums/TaskPriority.ts","helpers/enums/TaskStatus.ts","helpers/enums/enums.ts","helpers/portalTheme.ts","hooks/useFileUploadContext.ts","hooks/useIsLoadingAsync.tsx","hooks/useLookupLists.tsx","hooks/usePermittedUsers.ts","hooks/useSelectedClientsAndEngagements.ts","hooks/useUpdateRequestRestriction.tsx","../node_modules/@azure/msal-common/src/utils/Constants.ts","../node_modules/@azure/msal-browser/src/utils/BrowserConstants.ts","../node_modules/@azure/msal-common/src/logger/Logger.ts","../node_modules/@azure/msal-browser/src/utils/MathUtils.ts","../node_modules/@azure/msal-browser/src/crypto/GuidGenerator.ts","../node_modules/@azure/msal-browser/src/utils/BrowserStringUtils.ts","../node_modules/@azure/msal-browser/src/encode/Base64Encode.ts","../node_modules/@azure/msal-browser/src/encode/Base64Decode.ts","../node_modules/@azure/msal-common/src/error/AuthError.ts","../node_modules/@azure/msal-common/src/error/ClientAuthError.ts","../node_modules/@azure/msal-common/src/utils/StringUtils.ts","../node_modules/@azure/msal-browser/src/error/BrowserAuthError.ts","../node_modules/@azure/msal-browser/src/crypto/PkceGenerator.ts","../node_modules/@azure/msal-browser/src/crypto/BrowserCrypto.ts","../node_modules/@azure/msal-browser/src/cache/DatabaseStorage.ts","../node_modules/@azure/msal-browser/src/cache/MemoryStorage.ts","../node_modules/@azure/msal-browser/src/cache/AsyncMemoryStorage.ts","../node_modules/@azure/msal-browser/src/crypto/CryptoOps.ts","../node_modules/@azure/msal-common/src/authority/AuthorityType.ts","../node_modules/@azure/msal-common/src/crypto/ICrypto.ts","../node_modules/@azure/msal-common/src/error/ServerError.ts","../node_modules/@azure/msal-common/src/error/InteractionRequiredAuthError.ts","../node_modules/@azure/msal-common/src/account/ClientInfo.ts","../node_modules/@azure/msal-common/src/account/CcsCredential.ts","../node_modules/@azure/msal-common/src/cache/entities/AccountEntity.ts","../node_modules/@azure/msal-common/src/cache/entities/CredentialEntity.ts","../node_modules/@azure/msal-common/src/error/ClientConfigurationError.ts","../node_modules/@azure/msal-common/src/request/ScopeSet.ts","../node_modules/@azure/msal-common/src/account/AuthToken.ts","../node_modules/@azure/msal-common/src/cache/CacheManager.ts","../node_modules/@azure/msal-common/src/cache/entities/IdTokenEntity.ts","../node_modules/@azure/msal-common/src/utils/TimeUtils.ts","../node_modules/@azure/msal-common/src/cache/entities/AccessTokenEntity.ts","../node_modules/@azure/msal-common/src/cache/entities/RefreshTokenEntity.ts","../node_modules/@azure/msal-common/src/cache/entities/AppMetadataEntity.ts","../node_modules/@azure/msal-common/src/cache/entities/ServerTelemetryEntity.ts","../node_modules/@azure/msal-common/src/cache/entities/AuthorityMetadataEntity.ts","../node_modules/@azure/msal-common/src/cache/entities/ThrottlingEntity.ts","../node_modules/@azure/msal-common/src/utils/ProtocolUtils.ts","../node_modules/@azure/msal-common/src/authority/ProtocolMode.ts","../node_modules/@azure/msal-browser/src/error/BrowserConfigurationAuthError.ts","../node_modules/@azure/msal-browser/src/cache/BrowserStorage.ts","../node_modules/@azure/msal-common/src/url/UrlString.ts","../node_modules/@azure/msal-browser/src/utils/BrowserProtocolUtils.ts","../node_modules/@azure/msal-browser/src/cache/BrowserCacheManager.ts","../node_modules/@azure/msal-common/src/packageMetadata.ts","../node_modules/@azure/msal-common/src/config/ClientConfiguration.ts","../node_modules/@azure/msal-common/src/network/INetworkModule.ts","../node_modules/@azure/msal-browser/src/network/FetchClient.ts","../node_modules/@azure/msal-browser/src/network/XhrClient.ts","../node_modules/@azure/msal-browser/src/utils/BrowserUtils.ts","../node_modules/@azure/msal-browser/src/navigation/NavigationClient.ts","../node_modules/@azure/msal-browser/src/config/Configuration.ts","../node_modules/@azure/msal-browser/src/event/EventType.ts","../node_modules/@azure/msal-browser/src/packageMetadata.ts","../node_modules/@azure/msal-common/src/crypto/PopTokenGenerator.ts","../node_modules/@azure/msal-browser/src/event/EventHandler.ts","../node_modules/@azure/msal-common/src/network/ThrottlingUtils.ts","../node_modules/@azure/msal-common/src/network/NetworkManager.ts","../node_modules/@azure/msal-common/src/client/BaseClient.ts","../node_modules/@azure/msal-common/src/request/RequestValidator.ts","../node_modules/@azure/msal-common/src/request/RequestParameterBuilder.ts","../node_modules/@azure/msal-common/src/cache/entities/CacheRecord.ts","../node_modules/@azure/msal-common/src/cache/persistence/TokenCacheContext.ts","../node_modules/@azure/msal-common/src/response/ResponseHandler.ts","../node_modules/@azure/msal-common/src/client/AuthorizationCodeClient.ts","../node_modules/@azure/msal-common/src/authority/OpenIdConfigResponse.ts","../node_modules/@azure/msal-common/src/authority/RegionDiscovery.ts","../node_modules/@azure/msal-common/src/authority/Authority.ts","../node_modules/@azure/msal-common/src/authority/CloudInstanceDiscoveryResponse.ts","../node_modules/@azure/msal-common/src/authority/AuthorityFactory.ts","../node_modules/@azure/msal-common/src/telemetry/server/ServerTelemetryManager.ts","../node_modules/@azure/msal-browser/src/interaction_client/StandardInteractionClient.ts","../node_modules/@azure/msal-browser/src/interaction_client/BaseInteractionClient.ts","../node_modules/@azure/msal-browser/src/utils/PopupUtils.ts","../node_modules/@azure/msal-browser/src/interaction_handler/InteractionHandler.ts","../node_modules/@azure/msal-browser/src/interaction_handler/PopupHandler.ts","../node_modules/@azure/msal-browser/src/interaction_client/PopupClient.ts","../node_modules/@azure/msal-browser/src/interaction_handler/RedirectHandler.ts","../node_modules/@azure/msal-browser/src/interaction_client/RedirectClient.ts","../node_modules/@azure/msal-browser/src/interaction_handler/SilentHandler.ts","../node_modules/@azure/msal-browser/src/interaction_client/SilentIframeClient.ts","../node_modules/@azure/msal-common/src/client/RefreshTokenClient.ts","../node_modules/@azure/msal-browser/src/interaction_client/SilentRefreshClient.ts","../node_modules/@azure/msal-browser/src/cache/TokenCache.ts","../node_modules/@azure/msal-browser/src/interaction_client/HybridSpaAuthorizationCodeClient.ts","../node_modules/@azure/msal-browser/src/interaction_client/SilentAuthCodeClient.ts","../node_modules/@azure/msal-browser/src/app/ClientApplication.ts","../node_modules/@azure/msal-common/src/client/SilentFlowClient.ts","../node_modules/@azure/msal-browser/src/interaction_client/SilentCacheClient.ts","../node_modules/@azure/msal-browser/src/app/PublicClientApplication.ts","services/authConfig.ts","services/AuthenticationService.ts","services/DataReadService.ts","services/DataWriteService.ts","helpers/DataFormatters.ts","services/PlatformApiService.ts","store/InitialState.ts","store/actions/index.ts","utilities/lookupUtils.tsx","utilities/utils.ts","../node_modules/@ag-grid-community/core/dist/src/ts/utils/generic.ts","../node_modules/@ag-grid-community/core/dist/src/ts/columns/columnKeyCreator.ts","../node_modules/@ag-grid-community/core/dist/src/ts/utils/object.ts","../node_modules/@ag-grid-community/core/dist/src/ts/utils/function.ts","../node_modules/@ag-grid-community/core/dist/src/ts/context/context.ts","../node_modules/@ag-grid-community/core/dist/src/ts/modules/moduleNames.ts","../node_modules/@ag-grid-community/core/src/ts/eventService.ts","../node_modules/@ag-grid-community/core/dist/src/ts/constants/constants.ts","../node_modules/@ag-grid-community/core/dist/src/ts/modules/moduleRegistry.ts","../node_modules/@ag-grid-community/core/dist/src/ts/entities/column.ts","../node_modules/@ag-grid-community/core/dist/src/ts/utils/array.ts","../node_modules/@ag-grid-community/core/dist/src/ts/entities/columnGroup.ts","../node_modules/@ag-grid-community/core/dist/src/ts/entities/providedColumnGroup.ts","../node_modules/@ag-grid-community/core/dist/src/ts/entities/defaultColumnTypes.ts","../node_modules/@ag-grid-community/core/dist/src/ts/utils/event.ts","../node_modules/@ag-grid-community/core/dist/src/ts/context/beanStub.ts","../node_modules/@ag-grid-community/core/dist/src/ts/columns/columnFactory.ts","../node_modules/@ag-grid-community/core/src/ts/eventKeys.ts","../node_modules/@ag-grid-community/core/dist/src/ts/columns/groupInstanceIdCreator.ts","../node_modules/@ag-grid-community/core/dist/src/ts/utils/string.ts","../node_modules/@ag-grid-community/core/dist/src/ts/utils/map.ts","../node_modules/@ag-grid-community/core/dist/src/ts/columns/columnModel.ts","../node_modules/@ag-grid-community/core/dist/src/ts/columns/columnUtils.ts","../node_modules/@ag-grid-community/core/dist/src/ts/columns/displayedGroupCreator.ts","../node_modules/@ag-grid-community/core/src/ts/propertyKeys.ts","../node_modules/@ag-grid-community/core/dist/src/ts/components/componentUtil.ts","../node_modules/@ag-grid-community/core/dist/src/ts/components/agStackComponentsRegistry.ts","../node_modules/@ag-grid-community/core/dist/src/ts/components/colDefUtil.ts","../node_modules/@ag-grid-community/core/dist/src/ts/utils/color.ts","../node_modules/@ag-grid-community/core/dist/src/ts/utils/csv.ts","../node_modules/@ag-grid-community/core/dist/src/ts/utils/browser.ts","../node_modules/@ag-grid-community/core/dist/src/ts/utils/dom.ts","../node_modules/@ag-grid-community/core/dist/src/ts/utils/general.ts","../node_modules/@ag-grid-community/core/dist/src/ts/utils/aria.ts","../node_modules/@ag-grid-community/core/dist/src/ts/utils/number.ts","../node_modules/@ag-grid-community/core/dist/src/ts/utils/date.ts","../node_modules/@ag-grid-community/core/dist/src/ts/utils/fuzzyMatch.ts","../node_modules/@ag-grid-community/core/dist/src/ts/utils/icon.ts","../node_modules/@ag-grid-community/core/dist/src/ts/utils/keyboard.ts","../node_modules/@ag-grid-community/core/dist/src/ts/utils/mouse.ts","../node_modules/@ag-grid-community/core/dist/src/ts/utils/rowNode.ts","../node_modules/@ag-grid-community/core/dist/src/ts/utils/set.ts","../node_modules/@ag-grid-community/core/dist/src/ts/utils/promise.ts","../node_modules/@ag-grid-community/core/dist/src/ts/utils/utils.ts","../node_modules/@ag-grid-community/core/dist/src/ts/utils/numberSequence.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/customTooltipFeature.ts","../node_modules/@ag-grid-community/core/dist/src/ts/utils/timer.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/component.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/componentAnnotations.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/filter/provided/simpleFilter.ts","../node_modules/@ag-grid-community/core/dist/esm/es5/src/ts/filter/floating/provided/readOnlyFloatingFilter.ts","../node_modules/@ag-grid-community/core/dist/esm/es5/src/ts/filter/provided/date/dateCompWrapper.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/filter/provided/optionsFactory.ts","../node_modules/@ag-grid-community/core/dist/src/ts/filter/filterLocaleText.ts","../node_modules/@ag-grid-community/core/dist/src/ts/constants/keyCode.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/managedFocusFeature.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/filter/provided/providedFilter.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/agAbstractLabel.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/agAbstractField.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/agPickerField.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/agList.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/agSelect.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/agAbstractInputField.ts","../node_modules/@ag-grid-community/core/dist/src/ts/entities/rowNode.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/filter/provided/scalarFilter.ts","../node_modules/@ag-grid-community/core/dist/esm/es5/src/ts/filter/provided/date/dateFilter.ts","../node_modules/@ag-grid-community/core/dist/esm/es5/src/ts/filter/floating/provided/simpleFloatingFilter.ts","../node_modules/@ag-grid-community/core/dist/esm/es5/src/ts/filter/provided/date/dateFloatingFilter.ts","../node_modules/@ag-grid-community/core/dist/esm/es5/src/ts/filter/provided/date/defaultDateComponent.ts","../node_modules/@ag-grid-community/core/dist/esm/es5/src/ts/filter/provided/number/numberFilter.ts","../node_modules/@ag-grid-community/core/dist/esm/es5/src/ts/filter/provided/text/textFilter.ts","../node_modules/@ag-grid-community/core/dist/esm/es5/src/ts/filter/floating/provided/textInputFloatingFilter.ts","../node_modules/@ag-grid-community/core/dist/esm/es5/src/ts/filter/provided/number/numberFloatingFilter.ts","../node_modules/@ag-grid-community/core/dist/esm/es5/src/ts/filter/provided/text/textFloatingFilter.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/touchListener.ts","../node_modules/@ag-grid-community/core/dist/esm/es5/src/ts/headerRendering/cells/column/headerComp.ts","../node_modules/@ag-grid-community/core/dist/esm/es5/src/ts/headerRendering/cells/columnGroup/headerGroupComp.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/popupComponent.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/rendering/cellEditors/largeTextCellEditor.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/rendering/cellEditors/selectCellEditor.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/rendering/cellEditors/popupSelectCellEditor.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/rendering/cellEditors/textCellEditor.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/rendering/cellEditors/popupTextCellEditor.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/rendering/cellRenderers/animateShowChangeCellRenderer.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/rendering/cellRenderers/animateSlideCellRenderer.ts","../node_modules/@ag-grid-community/core/dist/src/ts/dragAndDrop/dragAndDropService.ts","../node_modules/@ag-grid-community/core/dist/src/ts/rendering/checkboxSelectionComponent.ts","../node_modules/@ag-grid-community/core/dist/src/ts/interfaces/iExcelCreator.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/rendering/row/rowDragComp.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/rendering/cellRenderers/groupCellRendererCtrl.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/rendering/cellRenderers/groupCellRenderer.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/rendering/cellRenderers/loadingCellRenderer.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/rendering/overlays/loadingOverlayComponent.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/rendering/overlays/noRowsOverlayComponent.ts","../node_modules/@ag-grid-community/core/dist/src/ts/rendering/tooltipComponent.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/components/framework/userComponentRegistry.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/components/framework/componentTypes.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/filter/floating/floatingFilterMapper.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/components/framework/userComponentFactory.ts","../node_modules/@ag-grid-community/core/dist/src/ts/dragAndDrop/dragService.ts","../node_modules/@ag-grid-community/core/dist/src/ts/filter/filterManager.ts","../node_modules/@ag-grid-community/core/dist/esm/es5/src/ts/headerRendering/cells/abstractCell/abstractHeaderCellComp.ts","../node_modules/@ag-grid-community/core/dist/esm/es5/src/ts/headerRendering/cells/floatingFilter/headerFilterCellComp.ts","../node_modules/@ag-grid-community/core/dist/src/ts/entities/sideBar.ts","../node_modules/@ag-grid-community/core/src/ts/gridOptionsWrapper.ts","../node_modules/@ag-grid-community/core/dist/src/ts/styling/layoutFeature.ts","../node_modules/@ag-grid-community/core/dist/src/ts/gridBodyComp/gridBodyCtrl.ts","../node_modules/@ag-grid-community/core/dist/src/ts/gridBodyComp/gridBodyScrollFeature.ts","../node_modules/@ag-grid-community/core/src/ts/autoScrollService.ts","../node_modules/@ag-grid-community/core/dist/src/ts/gridBodyComp/rowDragFeature.ts","../node_modules/@ag-grid-community/core/dist/src/ts/interfaces/IRangeService.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/rendering/cell/cellRangeFeature.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/rendering/row/rowCtrl.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/rendering/cell/cellPositionFeature.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/rendering/cell/cellCustomStyleFeature.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/tooltipFeature.ts","../node_modules/@ag-grid-community/core/dist/src/ts/rendering/beans.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/rendering/cell/cellMouseListenerFeature.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/rendering/cell/cellKeyboardListenerFeature.ts","../node_modules/@ag-grid-community/core/dist/src/ts/rendering/dndSourceComp.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/rendering/cell/cellCtrl.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/gridBodyComp/rowContainer/rowContainerCtrl.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/gridBodyComp/rowContainer/rowContainerEventsFeature.ts","../node_modules/@ag-grid-community/core/dist/src/ts/gridBodyComp/viewportSizeFeature.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/gridBodyComp/rowContainer/setPinnedLeftWidthFeature.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/gridBodyComp/rowContainer/setPinnedRightWidthFeature.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/gridBodyComp/rowContainer/setHeightFeature.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/gridBodyComp/rowContainer/dragListenerFeature.ts","../node_modules/@ag-grid-community/core/dist/src/ts/gridBodyComp/centerWidthFeature.ts","../node_modules/@ag-grid-community/core/dist/src/ts/gridBodyComp/gridBodyComp.ts","../node_modules/@ag-grid-community/core/dist/src/ts/gridBodyComp/scrollVisibleService.ts","../node_modules/@ag-grid-community/core/dist/src/ts/gridBodyComp/mouseEventService.ts","../node_modules/@ag-grid-community/core/dist/src/ts/gridBodyComp/navigationService.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/rendering/cellEditors/popupEditorWrapper.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/rendering/cell/cellComp.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/rendering/row/rowComp.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/gridBodyComp/rowContainer/rowContainerComp.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/headerRendering/row/headerRowComp.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/headerRendering/columnDrag/bodyDropPivotTarget.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/headerRendering/columnDrag/moveColumnFeature.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/headerRendering/columnDrag/bodyDropTarget.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/headerRendering/cells/cssClassApplier.ts","../node_modules/@ag-grid-community/core/dist/esm/es5/src/ts/headerRendering/cells/column/headerCellComp.ts","../node_modules/@ag-grid-community/core/dist/esm/es5/src/ts/headerRendering/cells/columnGroup/headerGroupCellComp.ts","../node_modules/@ag-grid-community/core/dist/src/ts/interfaces/iClientSideRowModel.ts","../node_modules/@ag-grid-community/core/dist/esm/es5/src/ts/headerRendering/cells/abstractCell/abstractHeaderCellCtrl.ts","../node_modules/@ag-grid-community/core/src/ts/gridApi.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/headerRendering/common/headerNavigationService.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/rendering/features/setLeftFeature.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/headerRendering/cells/hoverFeature.ts","../node_modules/@ag-grid-community/core/dist/esm/es5/src/ts/headerRendering/cells/floatingFilter/headerFilterCellCtrl.ts","../node_modules/@ag-grid-community/core/dist/esm/es5/src/ts/headerRendering/cells/column/resizeFeature.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/agCheckbox.ts","../node_modules/@ag-grid-community/core/dist/esm/es5/src/ts/headerRendering/cells/column/selectAllFeature.ts","../node_modules/@ag-grid-community/core/dist/esm/es5/src/ts/headerRendering/cells/column/headerCellCtrl.ts","../node_modules/@ag-grid-community/core/dist/esm/es5/src/ts/headerRendering/cells/columnGroup/groupResizeFeature.ts","../node_modules/@ag-grid-community/core/dist/esm/es5/src/ts/headerRendering/cells/columnGroup/groupWidthFeature.ts","../node_modules/@ag-grid-community/core/dist/esm/es5/src/ts/headerRendering/cells/columnGroup/headerGroupCellCtrl.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/headerRendering/row/headerRowCtrl.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/headerRendering/rowContainer/headerRowContainerCtrl.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/headerRendering/rowContainer/headerRowContainerComp.ts","../node_modules/@ag-grid-community/core/dist/src/ts/headerRendering/gridHeaderCtrl.ts","../node_modules/@ag-grid-community/core/dist/src/ts/headerRendering/gridHeaderComp.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/headerRendering/common/horizontalResizeService.ts","../node_modules/@ag-grid-community/core/dist/esm/es5/src/ts/headerRendering/cells/column/standardMenu.ts","../node_modules/@ag-grid-community/core/dist/src/ts/layout/tabbedLayout.ts","../node_modules/@ag-grid-community/core/dist/src/ts/misc/simpleHttpRequest.ts","../node_modules/@ag-grid-community/core/dist/src/ts/interfaces/serverSideTransaction.ts","../node_modules/@ag-grid-community/core/dist/src/ts/misc/resizeObserverService.ts","../node_modules/@ag-grid-community/core/dist/src/ts/misc/animationFrameService.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/rendering/features/positionableFeature.ts","../node_modules/@ag-grid-community/core/dist/src/ts/rendering/autoWidthCalculator.ts","../node_modules/@ag-grid-community/core/dist/src/ts/rendering/rowRenderer.ts","../node_modules/@ag-grid-community/core/dist/src/ts/rendering/valueFormatterService.ts","../node_modules/@ag-grid-community/core/dist/src/ts/pinnedRowModel/pinnedRowModel.ts","../node_modules/@ag-grid-community/core/dist/src/ts/utils/changedPath.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/popupService.ts","../node_modules/@ag-grid-community/core/dist/src/ts/rowNodeCache/rowNodeBlock.ts","../node_modules/@ag-grid-community/core/dist/src/ts/rowNodeCache/rowNodeBlockLoader.ts","../node_modules/@ag-grid-community/core/dist/src/ts/pagination/paginationProxy.ts","../node_modules/@ag-grid-community/core/dist/src/ts/styling/stylingService.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/agRadioButton.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/agToggleButton.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/agInputTextField.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/agInputTextArea.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/agInputNumberField.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/agInputRange.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/agSlider.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/agAngleSelect.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/agColorPanel.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/agPanel.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/agDialog.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/agColorPicker.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/agGroupComponent.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/tabGuardCtrl.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/tabGuardComp.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/agMenuList.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/agMenuPanel.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/agMenuItemComponent.ts","../node_modules/@ag-grid-community/core/src/ts/focusService.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/rendering/overlays/overlayWrapperComponent.ts","../node_modules/@ag-grid-community/core/dist/src/ts/widgets/virtualList.ts","../node_modules/@ag-grid-community/core/src/ts/vanillaFrameworkOverrides.ts","../node_modules/@ag-grid-community/core/src/ts/cellNavigationService.ts","../node_modules/@ag-grid-community/core/src/ts/alignedGridsService.ts","../node_modules/@ag-grid-community/core/src/ts/selectionService.ts","../node_modules/@ag-grid-community/core/dist/src/ts/columns/columnApi.ts","../node_modules/@ag-grid-community/core/dist/src/ts/valueService/valueService.ts","../node_modules/@ag-grid-community/core/dist/src/ts/valueService/expressionService.ts","../node_modules/@ag-grid-community/core/src/ts/templateService.ts","../node_modules/@ag-grid-community/core/src/ts/logger.ts","../node_modules/@ag-grid-community/core/dist/src/ts/gridComp/gridCtrl.ts","../node_modules/@ag-grid-community/core/dist/src/ts/gridComp/gridComp.ts","../node_modules/@ag-grid-community/core/src/ts/sortController.ts","../node_modules/@ag-grid-community/core/dist/src/ts/rendering/columnHoverService.ts","../node_modules/@ag-grid-community/core/dist/src/ts/rendering/columnAnimationService.ts","../node_modules/@ag-grid-community/core/dist/src/ts/columns/autoGroupColService.ts","../node_modules/@ag-grid-community/core/dist/src/ts/pagination/paginationAutoPageSizeService.ts","../node_modules/@ag-grid-community/core/dist/src/ts/valueService/valueCache.ts","../node_modules/@ag-grid-community/core/dist/src/ts/valueService/changeDetectionService.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/components/framework/agComponentUtils.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/components/framework/componentMetadataProvider.ts","../node_modules/@ag-grid-community/core/src/ts/environment.ts","../node_modules/@ag-grid-community/core/dist/src/ts/rendering/rowContainerHeightService.ts","../node_modules/@ag-grid-community/core/dist/src/ts/rowNodes/selectableService.ts","../node_modules/@ag-grid-community/core/dist/src/ts/pagination/paginationComp.ts","../node_modules/@ag-grid-community/core/dist/src/ts/entities/rowPosition.ts","../node_modules/@ag-grid-community/core/dist/src/ts/entities/cellPosition.ts","../node_modules/@ag-grid-community/core/dist/src/ts/undoRedo/undoRedoStack.ts","../node_modules/@ag-grid-community/core/dist/src/ts/undoRedo/undoRedoService.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/headerRendering/common/headerPosition.ts","../node_modules/@ag-grid-community/core/dist/src/ts/columns/columnDefFactory.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/rendering/row/rowCssClassCalculator.ts","../node_modules/@ag-grid-community/core/dist/src/ts/rowNodes/rowNodeSorter.ts","../node_modules/@ag-grid-community/core/src/ts/ctrlsService.ts","../node_modules/@ag-grid-community/core/src/ts/ctrlsFactory.ts","../node_modules/@ag-grid-community/core/dist/src/ts/gridBodyComp/fakeHScrollCtrl.ts","../node_modules/@ag-grid-community/core/dist/src/ts/gridBodyComp/fakeHScrollComp.ts","../node_modules/@ag-grid-community/core/dist/src/ts/gridBodyComp/pinnedWidthService.ts","../node_modules/@ag-grid-community/core/dist/src/ts/entities/rowNodeEventThrottle.ts","../node_modules/@ag-grid-community/core/src/ts/grid.ts","../node_modules/@ag-grid-community/core/src/ts/functions.ts","../node_modules/@ag-grid-community/core/dist/esm/src/ts/components/framework/frameworkComponentWrapper.ts","../node_modules/@ag-grid-community/core/dist/src/ts/interfaces/iSparklineCellRendererParams.ts","../node_modules/@ag-grid-community/core/src/ts/main.ts","../node_modules/@ag-grid-community/react/lib/agGridReact.tsx","../node_modules/@ag-grid-community/react/lib/legacy/legacy/agGridReactLegacy.ts","../node_modules/@ag-grid-community/react/lib/legacy/legacy/legacyReactComponent.ts","../node_modules/@ag-grid-community/react/lib/reactUi/reactUi/agGridReactUi.tsx","../node_modules/@ag-grid-community/react/lib/reactUi/reactUi/beansContext.tsx","../node_modules/@ag-grid-community/react/lib/reactUi/cellRenderer/reactUi/cellRenderer/detailCellRenderer.tsx","../node_modules/@ag-grid-community/react/lib/reactUi/cellRenderer/reactUi/cellRenderer/groupCellRenderer.tsx","../node_modules/@ag-grid-community/react/lib/reactUi/cells/reactUi/cells/cellComp.tsx","../node_modules/@ag-grid-community/react/lib/reactUi/cells/reactUi/cells/popupEditorComp.tsx","../node_modules/@ag-grid-community/react/lib/reactUi/cells/reactUi/cells/showJsRenderer.tsx","../node_modules/@ag-grid-community/react/lib/reactUi/reactUi/gridBodyComp.tsx","../node_modules/@ag-grid-community/react/lib/reactUi/reactUi/gridComp.tsx","../node_modules/@ag-grid-community/react/lib/reactUi/header/reactUi/header/gridHeaderComp.tsx","../node_modules/@ag-grid-community/react/lib/reactUi/header/reactUi/header/headerCellComp.tsx","../node_modules/@ag-grid-community/react/lib/reactUi/header/reactUi/header/headerFilterCellComp.tsx","../node_modules/@ag-grid-community/react/lib/reactUi/header/reactUi/header/headerGroupCellComp.tsx","../node_modules/@ag-grid-community/react/lib/reactUi/header/reactUi/header/headerRowComp.tsx","../node_modules/@ag-grid-community/react/lib/reactUi/header/reactUi/header/headerRowContainerComp.tsx","../node_modules/@ag-grid-community/react/lib/reactUi/reactUi/jsComp.tsx","../node_modules/@ag-grid-community/react/lib/reactUi/reactUi/reactComment.tsx","../node_modules/@ag-grid-community/react/lib/reactUi/rows/reactUi/rows/rowComp.tsx","../node_modules/@ag-grid-community/react/lib/reactUi/rows/reactUi/rows/rowContainerComp.tsx","../node_modules/@ag-grid-community/react/lib/reactUi/reactUi/tabGuardComp.tsx","../node_modules/@ag-grid-community/react/lib/reactUi/reactUi/useEffectOnce.tsx","../node_modules/@ag-grid-community/react/lib/reactUi/reactUi/utils.tsx","../node_modules/@ag-grid-community/react/lib/shared/shared/agGridColumn.ts","../node_modules/@ag-grid-community/react/lib/shared/shared/changeDetectionService.ts","../node_modules/@ag-grid-community/react/lib/shared/shared/keyGenerator.ts","../node_modules/@ag-grid-community/react/lib/shared/shared/newReactComponent.ts","../node_modules/@ag-grid-community/react/lib/shared/shared/portalManager.ts","../node_modules/@ag-grid-community/react/lib/shared/shared/reactComponent.ts","../node_modules/@ag-grid-community/react/lib/shared/shared/reactFrameworkOverrides.tsx","../node_modules/@ag-grid-community/react/main.js","../../../../../src/clientSideRowModel/clientSideRowModel.ts","../../../../../src/clientSideRowModel/clientSideNodeManager.ts","../../../../../src/csvExport/gridSerializer.ts","../../../../../src/clientSideRowModel/filterStage.ts","../../../../../src/clientSideRowModel/sortStage.ts","../../../../../src/clientSideRowModel/flattenStage.ts","../../../../../src/clientSideRowModel/sortService.ts","../../../../../src/clientSideRowModel/filterService.ts","../../../../../src/clientSideRowModel/immutableService.ts","../../../../src/clientSideRowModelModule.ts","../../../../../src/infiniteRowModel/infiniteBlock.ts","../../../../../src/infiniteRowModel/infiniteCache.ts","../../../../../src/infiniteRowModel/infiniteRowModel.ts","../../../../src/infiniteRowModelModule.ts","../../../../../src/csvExport/baseCreator.ts","../../../../../../src/csvExport/sessions/baseGridSerializingSession.ts","../../../../../src/csvExport/downloader.ts","../../../../../../src/csvExport/sessions/csvSerializingSession.ts","../../../../../src/csvExport/csvCreator.ts","../../../../../src/columnToolPanel/primaryColsHeaderPanel.ts","../../../../src/csvExportModule.ts","../../../../../src/csvExport/xmlFactory.ts","../../../../../src/csvExport/zipContainer.ts","../../../../src/main.ts","../../../../src/licenseManager.ts","../../../../../src/license/md5.ts","../../../../../src/license/watermark.ts","../../../../src/agGridEnterpriseModule.ts","../../../../../src/clipboard/clipboardService.ts","../../../../src/clipboardModule.ts","../../../../../src/columnToolPanel/columnModelItem.ts","../../../../../src/columnToolPanel/toolPanelContextMenu.ts","../../../../../src/columnToolPanel/toolPanelColumnGroupComp.ts","../../../../../src/columnToolPanel/primaryColsListPanelItemDragFeature.ts","../../../../../src/columnToolPanel/toolPanelColumnComp.ts","../../../../../src/columnToolPanel/primaryColsListPanel.ts","../../../../../src/columnToolPanel/pivotModePanel.ts","../../../../../src/rowGrouping/aggregationStage.ts","../../../../../src/rowGrouping/batchRemover.ts","../../../../../src/rowGrouping/groupStage.ts","../../../../../src/rowGrouping/pivotColDefService.ts","../../../../../src/rowGrouping/pivotStage.ts","../../../../../src/rowGrouping/aggFuncService.ts","../../../../../../src/rowGrouping/columnDropZones/dropZoneColumnComp.ts","../../../../../../src/rowGrouping/columnDropZones/baseDropZonePanel.ts","../../../../../../src/rowGrouping/columnDropZones/rowGroupDropZonePanel.ts","../../../../../../src/rowGrouping/columnDropZones/pivotDropZonePanel.ts","../../../../../../src/rowGrouping/columnDropZones/gridHeaderDropZones.ts","../../../../../src/rowGrouping/filterAggregatesStage.ts","../../../../src/rowGroupingModule.ts","../../../../../../src/rowGrouping/columnDropZones/valueDropZonePanel.ts","../../../../../src/columnToolPanel/primaryColsPanel.ts","../../../../../src/columnToolPanel/columnToolPanel.ts","../../../../../src/sideBar/horizontalResizeComp.ts","../../../../../src/sideBar/sideBarButtonComp.ts","../../../../../src/sideBar/sideBarButtonsComp.ts","../../../../../src/sideBar/toolPanelWrapper.ts","../../../../../src/sideBar/sideBarComp.ts","../../../../../../src/sideBar/common/toolPanelColDefService.ts","../../../../src/sideBarModule.ts","../../../../../src/columnToolPanel/modelItemUtils.ts","../../../../src/columnsToolPanelModule.ts","../../../../../../src/excelExport/files/xml/workbook.ts","../../../../../../src/excelExport/files/xml/excelWorkbook.ts","../../../../../../src/excelExport/files/xml/column.ts","../../../../../../src/excelExport/files/xml/cell.ts","../../../../../../src/excelExport/files/xml/row.ts","../../../../../../src/excelExport/files/xml/worksheet.ts","../../../../../../src/excelExport/files/xml/documentProperties.ts","../../../../../../src/excelExport/files/xml/styles/alignment.ts","../../../../../../src/excelExport/files/xml/styles/borders.ts","../../../../../../src/excelExport/files/xml/styles/font.ts","../../../../../../src/excelExport/files/xml/styles/interior.ts","../../../../../../src/excelExport/files/xml/styles/protection.ts","../../../../../../src/excelExport/files/xml/styles/numberFormat.ts","../../../../../../src/excelExport/files/xml/styles/style.ts","../../../../../src/excelExport/excelXmlFactory.ts","../../../../../../src/excelExport/assets/excelConstants.ts","../../../../../../src/excelExport/assets/excelUtils.ts","../../../../../src/excelExport/baseExcelSerializingSession.ts","../../../../../src/excelExport/excelXmlSerializingSession.ts","../../../../../../src/excelExport/files/ooxml/core.ts","../../../../../../src/excelExport/files/ooxml/contentType.ts","../../../../../../src/excelExport/files/ooxml/contentTypes.ts","../../../../../../src/excelExport/files/ooxml/drawing.ts","../../../../../../src/excelExport/files/ooxml/themes/office/colorScheme.ts","../../../../../../src/excelExport/files/ooxml/themes/office/fontScheme.ts","../../../../../../src/excelExport/files/ooxml/themes/office/formatScheme.ts","../../../../../../src/excelExport/files/ooxml/themes/office/themeElements.ts","../../../../../../src/excelExport/files/ooxml/themes/office.ts","../../../../../../src/excelExport/files/ooxml/sharedStrings.ts","../../../../../../src/excelExport/files/ooxml/styles/numberFormat.ts","../../../../../../src/excelExport/files/ooxml/styles/numberFormats.ts","../../../../../../src/excelExport/files/ooxml/styles/font.ts","../../../../../../src/excelExport/files/ooxml/styles/fonts.ts","../../../../../../src/excelExport/files/ooxml/styles/fill.ts","../../../../../../src/excelExport/files/ooxml/styles/fills.ts","../../../../../../src/excelExport/assets/excelLegacyConvert.ts","../../../../../../src/excelExport/files/ooxml/styles/border.ts","../../../../../../src/excelExport/files/ooxml/styles/borders.ts","../../../../../../src/excelExport/files/ooxml/styles/alignment.ts","../../../../../../src/excelExport/files/ooxml/styles/protection.ts","../../../../../../src/excelExport/files/ooxml/styles/xf.ts","../../../../../../src/excelExport/files/ooxml/styles/cellStyleXfs.ts","../../../../../../src/excelExport/files/ooxml/styles/cellXfs.ts","../../../../../../src/excelExport/files/ooxml/styles/cellStyle.ts","../../../../../../src/excelExport/files/ooxml/styles/cellStyles.ts","../../../../../../src/excelExport/files/ooxml/styles/stylesheet.ts","../../../../../../src/excelExport/files/ooxml/sheet.ts","../../../../../../src/excelExport/files/ooxml/sheets.ts","../../../../../../src/excelExport/files/ooxml/workbook.ts","../../../../../../src/excelExport/files/ooxml/column.ts","../../../../../../src/excelExport/files/ooxml/cell.ts","../../../../../../src/excelExport/files/ooxml/row.ts","../../../../../../src/excelExport/files/ooxml/mergeCell.ts","../../../../../../src/excelExport/files/ooxml/worksheet.ts","../../../../../../src/excelExport/files/ooxml/relationship.ts","../../../../../../src/excelExport/files/ooxml/relationships.ts","../../../../../src/filterToolPanel/filtersToolPanelHeaderPanel.ts","../../../../../src/excelExport/excelXlsxFactory.ts","../../../../../src/excelExport/excelXlsxSerializingSession.ts","../../../../../src/excelExport/excelCreator.ts","../../../../src/excelExportModule.ts","../../../../../src/filterToolPanel/toolPanelFilterComp.ts","../../../../../src/filterToolPanel/toolPanelFilterGroupComp.ts","../../../../../src/filterToolPanel/filtersToolPanelListPanel.ts","../../../../../src/filterToolPanel/filtersToolPanel.ts","../../../../src/filtersToolPanelModule.ts","../../../../../../src/charts/chartComp/chartDatasource.ts","../../../../../../src/charts/chartComp/chartDataModel.ts","../../../../../src/util/observable.ts","../../../../../src/util/padding.ts","../../../../../src/scene/bbox.ts","../../../../../src/scene/matrix.ts","../../../../../src/util/id.ts","../../../../../src/scene/node.ts","../../../../../src/util/object.ts","../../../../../../src/scene/shape/shape.ts","../../../../../src/canvas/hdpiCanvas.ts","../../../../../../src/scene/shape/text.ts","../../../../src/caption.ts","../../../../../src/util/ticks.ts","../../../../../src/util/secondaryAxisTicks.ts","../../../../../src/interpolate/constant.ts","../../../../../src/interpolate/number.ts","../../../../../src/util/color.ts","../../../../../src/interpolate/color.ts","../../../../../src/interpolate/value.ts","../../../../../src/interpolate/date.ts","../../../../../src/interpolate/array.ts","../../../../../src/interpolate/object.ts","../../../../../src/util/compare.ts","../../../../../src/util/bisect.ts","../../../../../src/scale/continuousScale.ts","../../../../../src/util/numberFormat.ts","../../../../../src/scale/linearScale.ts","../../../../../src/util/array.ts","../../../../../src/util/value.ts","../../../../../src/scene/group.ts","../../../../../src/scene/selection.ts","../../../../../../src/scene/shape/line.ts","../../../../../src/scene/polyRoots.ts","../../../../../src/scene/intersection.ts","../../../../../src/scene/path2D.ts","../../../../../../src/scene/shape/path.ts","../../../../../src/util/angle.ts","../../../../../src/util/number.ts","../../../../../../src/scene/shape/arc.ts","../../../../../src/util/function.ts","../../../../src/axis.ts","../../../../../src/chart/chartAxis.ts","../../../../../../src/chart/axis/numberAxis.ts","../../../../../src/scale/bandScale.ts","../../../../../../src/chart/axis/categoryAxis.ts","../../../../../src/layout/tree.ts","../../../../../../src/chart/axis/groupedCategoryAxis.ts","../../../../../../src/util/time/interval.ts","../../../../../../src/util/time/millisecond.ts","../../../../../../src/util/time/duration.ts","../../../../../../src/util/time/second.ts","../../../../../../src/util/time/minute.ts","../../../../../../src/util/time/hour.ts","../../../../../../src/util/time/day.ts","../../../../../../src/util/time/week.ts","../../../../../../src/util/time/month.ts","../../../../../../src/util/time/year.ts","../../../../../../src/util/time/utcDay.ts","../../../../../../src/util/time/utcYear.ts","../../../../../../src/util/time/utcWeek.ts","../../../../../../src/util/time/format/locale.ts","../../../../../../src/util/time/format/defaultLocale.ts","../../../../../../src/scene/shape/rect.ts","../../../../../src/scale/timeScale.ts","../../../../../../src/chart/axis/timeAxis.ts","../../../../../src/scene/scene.ts","../../../../../../src/scene/gradient/gradient.ts","../../../../../../src/scene/gradient/linearGradient.ts","../../../../../../src/chart/marker/marker.ts","../../../../../../src/chart/marker/square.ts","../../../../../src/chart/markerLabel.ts","../../../../../../src/chart/marker/circle.ts","../../../../../../src/chart/marker/cross.ts","../../../../../../src/chart/marker/diamond.ts","../../../../../../src/chart/marker/heart.ts","../../../../../../src/chart/marker/plus.ts","../../../../../../src/chart/marker/triangle.ts","../../../../../../src/chart/marker/util.ts","../../../../../src/chart/legend.ts","../../../../../src/util/sizeMonitor.ts","../../../../../src/util/labelPlacement.ts","../../../../../src/chart/chart.ts","../../../../../src/scene/clipRect.ts","../../../../../../src/chart/shapes/rangeHandle.ts","../../../../../../src/chart/shapes/rangeMask.ts","../../../../../../src/chart/shapes/rangeSelector.ts","../../../../../../src/chart/navigator/navigatorMask.ts","../../../../../../src/chart/navigator/navigatorHandle.ts","../../../../../../src/chart/navigator/navigator.ts","../../../../../src/chart/cartesianChart.ts","../../../../../src/chart/hierarchyChart.ts","../../../../../src/chart/groupedCategoryChart.ts","../../../../../src/chart/label.ts","../../../../../../src/chart/series/series.ts","../../../../../../src/chart/series/seriesMarker.ts","../../../../../../src/chart/series/polar/polarSeries.ts","../../../../../src/chart/polarChart.ts","../../../../../../src/chart/series/cartesian/cartesianSeries.ts","../../../../../src/util/equal.ts","../../../../../src/util/string.ts","../../../../../src/util/sanitize.ts","../../../../../../src/chart/series/cartesian/barSeries.ts","../../../../../../src/chart/series/cartesian/areaSeries.ts","../../../../../../src/chart/series/cartesian/histogramSeries.ts","../../../../../../src/chart/series/cartesian/lineSeries.ts","../../../../../../src/chart/series/cartesian/scatterSeries.ts","../../../../../../src/chart/series/hierarchy/hierarchySeries.ts","../../../../../src/scene/dropShadow.ts","../../../../../src/layout/treemap.ts","../../../../../src/layout/hierarchy.ts","../../../../../../src/chart/series/hierarchy/treemapSeries.ts","../../../../../../src/chart/series/polar/pieSeries.ts","../../../../../../src/scene/shape/sector.ts","../../../../../../src/util/time/utcMinute.ts","../../../../../../src/util/time/utcHour.ts","../../../../../../src/util/time/utcMonth.ts","../../../../../../src/chart/themes/chartTheme.ts","../../../../../../src/chart/themes/darkTheme.ts","../../../../../../src/chart/themes/materialLight.ts","../../../../../../src/chart/themes/materialDark.ts","../../../../../../src/chart/themes/pastelLight.ts","../../../../../../src/chart/themes/pastelDark.ts","../../../../../../src/chart/themes/solarLight.ts","../../../../../../src/chart/themes/solarDark.ts","../../../../../../src/chart/themes/vividLight.ts","../../../../../../src/chart/themes/vividDark.ts","../../../../../../src/chart/mapping/themes.ts","../../../../../src/scale/logScale.ts","../../../../../../src/chart/axis/logAxis.ts","../../../../../src/util/json.ts","../../../../../../src/chart/mapping/defaults.ts","../../../../../../src/chart/mapping/transforms.ts","../../../../../../src/chart/mapping/prepareSeries.ts","../../../../../../src/chart/mapping/prepare.ts","../../../../../src/chart/agChartV2.ts","../../../../../../src/charts/chartComp/utils/seriesTypeMapper.ts","../../../../../../src/charts/chartComp/chartController.ts","../../../../../../src/charts/chartComp/menu/data/chartDataPanel.ts","../../../../../../src/charts/chartComp/menu/format/fontPanel.ts","../../../../../../src/charts/chartComp/menu/format/legend/legendPanel.ts","../../../../../../src/charts/chartComp/menu/format/axis/axisTicksPanel.ts","../../../../../../src/charts/chartComp/menu/format/axis/axisPanel.ts","../../../../../../src/charts/chartComp/menu/format/navigator/navigatorPanel.ts","../../../../../../src/charts/chartComp/menu/format/chart/paddingPanel.ts","../../../../../../src/charts/chartComp/menu/format/chart/backgroundPanel.ts","../../../../../../src/charts/chartComp/menu/format/chart/titlePanel.ts","../../../../../../src/charts/chartComp/menu/format/chart/chartPanel.ts","../../../../../../src/charts/chartComp/menu/format/series/shadowPanel.ts","../../../../../../src/charts/chartComp/menu/format/series/markersPanel.ts","../../../../../../src/charts/chartComp/menu/format/series/calloutPanel.ts","../../../../../../src/charts/chartComp/menu/format/series/seriesPanel.ts","../../../../../../src/charts/chartComp/menu/format/series/fontPanelParams.ts","../../../../../../src/charts/chartComp/menu/format/formatPanel.ts","../../../../../../src/charts/chartComp/menu/settings/miniCharts/miniChart.ts","../../../../../../src/charts/chartComp/menu/settings/miniCharts/miniChartWithAxes.ts","../../../../../../src/charts/chartComp/menu/settings/miniCharts/miniChartHelpers.ts","../../../../../../src/charts/chartComp/menu/settings/miniCharts/column/miniColumn.ts","../../../../../../src/charts/chartComp/menu/settings/miniCharts/column/miniStackedColumn.ts","../../../../../../src/charts/chartComp/menu/settings/miniCharts/column/miniNormalizedColumn.ts","../../../../../../src/charts/chartComp/menu/settings/miniCharts/bar/miniBar.ts","../../../../../../src/charts/chartComp/menu/settings/miniCharts/bar/miniStackedBar.ts","../../../../../../src/charts/chartComp/menu/settings/miniCharts/bar/miniNormalizedBar.ts","../../../../../../src/charts/chartComp/menu/settings/miniCharts/pie/miniDoughnut.ts","../../../../../../src/charts/chartComp/menu/settings/miniCharts/pie/miniPie.ts","../../../../../../src/charts/chartComp/menu/settings/miniCharts/line/miniLine.ts","../../../../../../src/charts/chartComp/menu/settings/miniCharts/scatter/miniScatter.ts","../../../../../../src/charts/chartComp/menu/settings/miniCharts/scatter/miniBubble.ts","../../../../../../src/charts/chartComp/menu/settings/miniCharts/area/miniArea.ts","../../../../../../src/charts/chartComp/menu/settings/miniCharts/area/miniStackedArea.ts","../../../../../../src/charts/chartComp/menu/settings/miniCharts/area/miniNormalizedArea.ts","../../../../../../src/charts/chartComp/menu/settings/miniCharts/histogram/miniHistogram.ts","../../../../../../src/charts/chartComp/menu/settings/miniCharts/combo/miniColumnLineCombo.ts","../../../../../../src/charts/chartComp/menu/settings/miniCharts/combo/miniAreaColumnCombo.ts","../../../../../../src/charts/chartComp/menu/settings/miniCharts/combo/miniCustomCombo.ts","../../../../../../src/charts/chartComp/menu/settings/miniChartsContainer.ts","../../../../../../src/charts/chartComp/menu/settings/chartSettingsPanel.ts","../../../../../../src/charts/chartComp/menu/tabbedChartMenu.ts","../../../../../../src/charts/chartComp/menu/chartMenu.ts","../../../../../../src/charts/chartComp/chartTitle/titleEdit.ts","../../../../../../src/charts/chartComp/utils/object.ts","../../../../../../src/charts/chartComp/chartProxies/chartProxy.ts","../../../../../../src/charts/chartComp/chartProxies/cartesian/cartesianChartProxy.ts","../../../../../../src/charts/chartComp/utils/color.ts","../../../../../../src/charts/chartComp/chartProxies/cartesian/barChartProxy.ts","../../../../../../src/charts/chartComp/chartProxies/cartesian/areaChartProxy.ts","../../../../../../src/charts/chartComp/chartProxies/cartesian/lineChartProxy.ts","../../../../../../src/charts/chartComp/chartProxies/polar/polarChartProxy.ts","../../../../../../src/charts/chartComp/chartProxies/polar/pieChartProxy.ts","../../../../../../src/charts/chartComp/chartProxies/polar/doughnutChartProxy.ts","../../../../../../src/charts/chartComp/chartProxies/cartesian/scatterChartProxy.ts","../../../../../../src/charts/chartComp/chartProxies/cartesian/histogramChartProxy.ts","../../../../../../src/charts/chartComp/services/chartOptionsService.ts","../../../../../../src/charts/chartComp/chartProxies/combo/comboChartProxy.ts","../../../../../../src/charts/chartComp/gridChartComp.ts","../../../../../src/charts/chartModelMigration.ts","../../../../../../src/serverSideRowModel/stores/partialStore.ts","../../../../../src/charts/chartService.ts","../../../../../../src/charts/chartComp/services/chartTranslationService.ts","../../../../../../src/charts/chartComp/services/chartCrossFilterService.ts","../../../../../src/rangeSelection/rangeService.ts","../../../../../src/rangeSelection/abstractSelectionHandle.ts","../../../../../src/rangeSelection/fillHandle.ts","../../../../../src/rangeSelection/rangeHandle.ts","../../../../../src/rangeSelection/selectionHandleFactory.ts","../../../../src/rangeSelectionModule.ts","../../../../src/gridChartsModule.ts","../../../../../src/masterDetail/detailCellRendererCtrl.ts","../../../../../src/masterDetail/detailCellRenderer.ts","../../../../src/masterDetailModule.ts","../../../../../src/menu/enterpriseMenu.ts","../../../../../src/menu/contextMenu.ts","../../../../../src/menu/menuItemMapper.ts","../../../../src/menuModule.ts","../../../../../src/multiFilter/multiFilter.ts","../../../../../src/multiFilter/multiFloatingFilter.ts","../../../../src/multiFilterModule.ts","../../../../../src/richSelect/richSelectRow.ts","../../../../../src/richSelect/richSelectCellEditor.ts","../../../../src/richSelectModule.ts","../../../../../src/serverSideRowModel/serverSideRowModel.ts","../../../../../../src/serverSideRowModel/stores/storeUtils.ts","../../../../../../src/serverSideRowModel/blocks/blockUtils.ts","../../../../../src/serverSideRowModel/nodeManager.ts","../../../../../src/serverSideRowModel/transactionManager.ts","../../../../../../src/serverSideRowModel/listeners/expandListener.ts","../../../../../../src/serverSideRowModel/listeners/sortListener.ts","../../../../../../src/serverSideRowModel/listeners/filterListener.ts","../../../../../../src/serverSideRowModel/blocks/partialStoreBlock.ts","../../../../../src/setFilter/setValueModel.ts","../../../../../../src/serverSideRowModel/stores/fullStore.ts","../../../../../../src/serverSideRowModel/stores/storeFactory.ts","../../../../../../src/serverSideRowModel/listeners/listenerUtils.ts","../../../../src/serverSideRowModelModule.ts","../../../../src/clientSideValueExtractor.ts","../../../../../src/setFilter/setFilterListItem.ts","../../../../../src/setFilter/localeText.ts","../../../../../src/setFilter/setFilter.ts","../../../../../src/setFilter/setFloatingFilter.ts","../../../../src/setFilterModule.ts","../../../../../src/statusBar/statusBarService.ts","../../../../../src/statusBar/statusBar.ts","../../../../../../src/statusBar/providedPanels/nameValueComp.ts","../../../../../../src/statusBar/providedPanels/totalAndFilteredRowsComp.ts","../../../../../../src/statusBar/providedPanels/filteredRowsComp.ts","../../../../../../src/statusBar/providedPanels/totalRowsComp.ts","../../../../../../src/statusBar/providedPanels/selectedRowsComp.ts","../../../../../../src/statusBar/providedPanels/aggregationComp.ts","../../../../src/statusBarModule.ts","../../../../../src/viewportRowModel/viewportRowModel.ts","../../../../src/viewportRowModelModule.ts","../../../../../src/sparkline/sparkline.ts","../../../../../../src/sparkline/tooltip/defaultTooltipCss.ts","../../../../../../src/sparkline/tooltip/sparklineTooltip.ts","../../../../../../src/sparkline/marker/marker.ts","../../../../../../src/sparkline/marker/circle.ts","../../../../../../src/sparkline/marker/diamond.ts","../../../../../../src/sparkline/marker/square.ts","../../../../../../src/sparkline/marker/markerFactory.ts","../../../../../src/util/lineDash.ts","../../../../../../src/sparkline/area/areaSparkline.ts","../../../../../../src/sparkline/line/lineSparkline.ts","../../../../../../src/sparkline/bar-column/rectangle.ts","../../../../../../src/sparkline/label/label.ts","../../../../../../src/sparkline/label/text.ts","../../../../../../src/sparkline/bar-column/barColumnSparkline.ts","../../../../../../src/sparkline/bar-column/barSparkline.ts","../../../../../../src/sparkline/bar-column/columnSparkline.ts","../../../../../src/sparkline/agSparkline.ts","../../../../src/sparklineCellRenderer.ts","../../../../../src/tooltip/sparklineTooltipSingleton.ts","../../../../src/sparklinesModule.ts","../node_modules/date-fns/esm/addDays/index.js","../node_modules/date-fns/esm/addMonths/index.js","../node_modules/date-fns/esm/addYears/index.js","../node_modules/date-fns/esm/endOfDay/index.js","../node_modules/date-fns/esm/endOfWeek/index.js","../node_modules/date-fns/esm/endOfYear/index.js","../node_modules/date-fns/esm/isAfter/index.js","../node_modules/date-fns/esm/isBefore/index.js","../node_modules/date-fns/esm/startOfDay/index.js","../node_modules/date-fns/esm/startOfHour/index.js","../node_modules/date-fns/esm/_lib/assign/index.js","../node_modules/date-fns/esm/_lib/setUTCDay/index.js","../node_modules/date-fns/esm/parse/_lib/parsers/index.js","../node_modules/date-fns/esm/_lib/setUTCWeek/index.js","../node_modules/date-fns/esm/_lib/setUTCISOWeek/index.js","../node_modules/date-fns/esm/_lib/setUTCISODay/index.js","../node_modules/date-fns/esm/parse/index.js","../node_modules/date-fns/esm/setMonth/index.js","../node_modules/date-fns/esm/getDaysInMonth/index.js","../node_modules/date-fns/esm/startOfMonth/index.js","../node_modules/date-fns/esm/endOfMonth/index.js","../node_modules/date-fns/esm/startOfWeek/index.js","../node_modules/date-fns/esm/startOfYear/index.js","../node_modules/@date-io/date-fns/build/index.esm.js","../node_modules/date-fns/esm/differenceInMilliseconds/index.js","../node_modules/date-fns/esm/getHours/index.js","../node_modules/date-fns/esm/setHours/index.js","../node_modules/date-fns/esm/setMinutes/index.js","../node_modules/date-fns/esm/getSeconds/index.js","../node_modules/date-fns/esm/setSeconds/index.js","../node_modules/date-fns/esm/isSameDay/index.js","../node_modules/date-fns/esm/isSameMonth/index.js","../node_modules/date-fns/esm/isSameYear/index.js","../node_modules/date-fns/esm/isSameHour/index.js","../node_modules/date-fns/esm/getYear/index.js","../node_modules/date-fns/esm/setYear/index.js","../node_modules/date-fns/esm/isEqual/index.js","../node_modules/date-fns/esm/eachDayOfInterval/index.js","../node_modules/@material-table/core/dist/components/Container/index.js","../node_modules/@material-table/core/dist/components/MTableAction/index.js","../node_modules/@material-table/core/dist/components/MTableActions/index.js","../node_modules/@material-table/core/dist/components/MTableBodyRow/index.js","../node_modules/@material-table/core/dist/components/MTableCell/cellUtils.js","../node_modules/@material-table/core/dist/components/MTableCell/index.js","../node_modules/@material-table/core/dist/components/MTableCustomIcon/index.js","../node_modules/@material-table/core/dist/components/MTableEditRow/index.js","../node_modules/@material-table/core/dist/components/MTableFilterRow/BooleanFilter.js","../node_modules/@material-table/core/dist/components/MTableFilterRow/DateFilter.js","../node_modules/@material-table/core/dist/components/MTableFilterRow/DefaultFilter.js","../node_modules/@material-table/core/dist/components/MTableFilterRow/Filter.js","../node_modules/@material-table/core/dist/components/MTableFilterRow/LookupFilter.js","../node_modules/@material-table/core/dist/components/MTableFilterRow/index.js","../node_modules/@material-table/core/dist/components/MTableFilterRow/utils.js","../node_modules/@material-table/core/dist/components/MTableGroupRow/index.js","../node_modules/@material-table/core/dist/components/MTableGroupbar/index.js","../node_modules/@material-table/core/dist/components/MTableHeader/index.js","../node_modules/@material-table/core/dist/components/MTablePagination/index.js","../node_modules/@material-table/core/dist/components/MTableScrollbar/index.js","../node_modules/@material-table/core/dist/components/MTableSteppedPaginationInner/index.js","../node_modules/@material-table/core/dist/components/MTableSummaryRow/index.js","../node_modules/@material-table/core/dist/components/MTableToolbar/index.js","../node_modules/@material-table/core/dist/components/Overlay/OverlayError.js","../node_modules/@material-table/core/dist/components/Overlay/OverlayLoading.js","../node_modules/@material-table/core/dist/components/index.js","../node_modules/@material-table/core/dist/components/m-table-body.js","../node_modules/@material-table/core/dist/components/m-table-detailpanel.js","../node_modules/@material-table/core/dist/components/m-table-edit-cell.js","../node_modules/@material-table/core/dist/components/m-table-edit-field.js","../node_modules/@material-table/core/dist/defaults/index.js","../node_modules/@material-table/core/dist/defaults/props.components.js","../node_modules/@material-table/core/dist/defaults/props.icons.js","../node_modules/@material-table/core/dist/defaults/props.localization.js","../node_modules/@material-table/core/dist/defaults/props.options.js","../node_modules/@material-table/core/dist/index.js","../node_modules/@material-table/core/dist/material-table.js","../node_modules/@material-table/core/dist/prop-types.js","../node_modules/@material-table/core/dist/utils/common-values.js","../node_modules/@material-table/core/dist/utils/data-manager.js","../node_modules/@material-table/core/dist/utils/hooks/useDoubleClick.js","../node_modules/@material-table/core/dist/utils/index.js","../node_modules/@material-table/core/dist/utils/polyfill/index.js","../node_modules/@material-table/core/dist/utils/validate.js","../node_modules/@material-table/core/node_modules/uuid/index.js","../node_modules/@material-table/core/node_modules/uuid/lib/bytesToUuid.js","../node_modules/@material-table/core/node_modules/uuid/lib/rng-browser.js","../node_modules/@material-table/core/node_modules/uuid/v1.js","../node_modules/@material-table/core/node_modules/uuid/v4.js","../node_modules/@material-ui/core/IconButton/IconButton.js","../node_modules/@material-ui/core/colors/blue.js","../node_modules/@material-ui/core/colors/common.js","../node_modules/@material-ui/core/colors/green.js","../node_modules/@material-ui/core/colors/grey.js","../node_modules/@material-ui/core/colors/indigo.js","../node_modules/@material-ui/core/colors/orange.js","../node_modules/@material-ui/core/colors/pink.js","../node_modules/@material-ui/core/colors/red.js","../node_modules/@material-ui/core/esm/AccordionDetails/AccordionDetails.js","../node_modules/@material-ui/core/esm/AccordionSummary/AccordionSummary.js","../node_modules/@material-ui/core/esm/Accordion/Accordion.js","../node_modules/@babel/runtime/helpers/esm/toArray.js","../node_modules/@material-ui/core/esm/Accordion/AccordionContext.js","../node_modules/@material-ui/core/esm/Backdrop/Backdrop.js","../node_modules/@material-ui/core/esm/Box/Box.js","../node_modules/@material-ui/core/esm/ButtonBase/Ripple.js","../node_modules/@material-ui/core/esm/ButtonBase/TouchRipple.js","../node_modules/@material-ui/core/esm/ButtonBase/ButtonBase.js","../node_modules/@material-ui/core/esm/Button/Button.js","../node_modules/@material-ui/core/esm/internal/svg-icons/CheckBoxOutlineBlank.js","../node_modules/@material-ui/core/esm/internal/svg-icons/CheckBox.js","../node_modules/@material-ui/core/esm/internal/svg-icons/IndeterminateCheckBox.js","../node_modules/@material-ui/core/esm/Checkbox/Checkbox.js","../node_modules/@material-ui/core/esm/internal/svg-icons/Cancel.js","../node_modules/@material-ui/core/esm/Chip/Chip.js","../node_modules/@material-ui/core/esm/CircularProgress/CircularProgress.js","../node_modules/@material-ui/core/esm/ClickAwayListener/ClickAwayListener.js","../node_modules/@material-ui/core/esm/Collapse/Collapse.js","../node_modules/@material-ui/core/esm/DialogActions/DialogActions.js","../node_modules/@material-ui/core/esm/DialogContent/DialogContent.js","../node_modules/@material-ui/core/esm/DialogTitle/DialogTitle.js","../node_modules/@material-ui/core/esm/Dialog/Dialog.js","../node_modules/@material-ui/core/esm/Divider/Divider.js","../node_modules/@material-ui/core/esm/Fade/Fade.js","../node_modules/@material-ui/core/esm/FilledInput/FilledInput.js","../node_modules/@material-ui/core/esm/FormControlLabel/FormControlLabel.js","../node_modules/@material-ui/core/esm/FormControl/FormControl.js","../node_modules/@material-ui/core/esm/FormControl/FormControlContext.js","../node_modules/@material-ui/core/esm/FormControl/formControlState.js","../node_modules/@material-ui/core/esm/FormControl/useFormControl.js","../node_modules/@material-ui/core/esm/FormGroup/FormGroup.js","../node_modules/@material-ui/core/esm/FormHelperText/FormHelperText.js","../node_modules/@material-ui/core/esm/FormLabel/FormLabel.js","../node_modules/@material-ui/core/esm/Grid/Grid.js","../node_modules/@material-ui/core/esm/Grow/Grow.js","../node_modules/@material-ui/core/esm/Hidden/HiddenJs.js","../node_modules/@material-ui/core/esm/Hidden/HiddenCss.js","../node_modules/@material-ui/core/esm/Hidden/Hidden.js","../node_modules/@material-ui/core/esm/IconButton/IconButton.js","../node_modules/@material-ui/core/esm/Icon/Icon.js","../node_modules/@material-ui/core/esm/InputAdornment/InputAdornment.js","../node_modules/@material-ui/core/esm/InputBase/InputBase.js","../node_modules/@material-ui/core/esm/InputBase/utils.js","../node_modules/@material-ui/core/esm/InputLabel/InputLabel.js","../node_modules/@material-ui/core/esm/Input/Input.js","../node_modules/@material-ui/core/esm/LinearProgress/LinearProgress.js","../node_modules/@material-ui/core/esm/Link/Link.js","../node_modules/@material-ui/core/esm/ListItemText/ListItemText.js","../node_modules/@material-ui/core/esm/ListItem/ListItem.js","../node_modules/@material-ui/core/esm/List/List.js","../node_modules/@material-ui/core/esm/List/ListContext.js","../node_modules/@material-ui/core/esm/MenuItem/MenuItem.js","../node_modules/@material-ui/core/esm/MenuList/MenuList.js","../node_modules/@material-ui/core/esm/Menu/Menu.js","../node_modules/@material-ui/core/esm/Modal/ModalManager.js","../node_modules/@material-ui/core/esm/Unstable_TrapFocus/Unstable_TrapFocus.js","../node_modules/@material-ui/core/esm/Modal/SimpleBackdrop.js","../node_modules/@material-ui/core/esm/Modal/Modal.js","../node_modules/@material-ui/core/esm/OutlinedInput/NotchedOutline.js","../node_modules/@material-ui/core/esm/OutlinedInput/OutlinedInput.js","../node_modules/@material-ui/core/esm/Paper/Paper.js","../node_modules/@material-ui/core/esm/Popover/Popover.js","../node_modules/popper.js/src/utils/isBrowser.js","../node_modules/popper.js/src/utils/debounce.js","../node_modules/popper.js/src/utils/isFunction.js","../node_modules/popper.js/src/utils/getStyleComputedProperty.js","../node_modules/popper.js/src/utils/getParentNode.js","../node_modules/popper.js/src/utils/getScrollParent.js","../node_modules/popper.js/src/utils/getReferenceNode.js","../node_modules/popper.js/src/utils/isIE.js","../node_modules/popper.js/src/utils/getOffsetParent.js","../node_modules/popper.js/src/utils/getRoot.js","../node_modules/popper.js/src/utils/findCommonOffsetParent.js","../node_modules/popper.js/src/utils/isOffsetContainer.js","../node_modules/popper.js/src/utils/getScroll.js","../node_modules/popper.js/src/utils/getBordersSize.js","../node_modules/popper.js/src/utils/getWindowSizes.js","../node_modules/popper.js/src/utils/getClientRect.js","../node_modules/popper.js/src/utils/getBoundingClientRect.js","../node_modules/popper.js/src/utils/getOffsetRectRelativeToArbitraryNode.js","../node_modules/popper.js/src/utils/includeScroll.js","../node_modules/popper.js/src/utils/isFixed.js","../node_modules/popper.js/src/utils/getFixedPositionOffsetParent.js","../node_modules/popper.js/src/utils/getBoundaries.js","../node_modules/popper.js/src/utils/getViewportOffsetRectRelativeToArtbitraryNode.js","../node_modules/popper.js/src/utils/computeAutoPlacement.js","../node_modules/popper.js/src/utils/getReferenceOffsets.js","../node_modules/popper.js/src/utils/getOuterSizes.js","../node_modules/popper.js/src/utils/getOppositePlacement.js","../node_modules/popper.js/src/utils/getPopperOffsets.js","../node_modules/popper.js/src/utils/find.js","../node_modules/popper.js/src/utils/runModifiers.js","../node_modules/popper.js/src/utils/findIndex.js","../node_modules/popper.js/src/methods/update.js","../node_modules/popper.js/src/utils/isModifierEnabled.js","../node_modules/popper.js/src/utils/getSupportedPropertyName.js","../node_modules/popper.js/src/methods/destroy.js","../node_modules/popper.js/src/utils/getWindow.js","../node_modules/popper.js/src/utils/setupEventListeners.js","../node_modules/popper.js/src/methods/enableEventListeners.js","../node_modules/popper.js/src/methods/disableEventListeners.js","../node_modules/popper.js/src/utils/removeEventListeners.js","../node_modules/popper.js/src/utils/isNumeric.js","../node_modules/popper.js/src/utils/setStyles.js","../node_modules/popper.js/src/modifiers/computeStyle.js","../node_modules/popper.js/src/utils/isModifierRequired.js","../node_modules/popper.js/src/methods/placements.js","../node_modules/popper.js/src/utils/clockwise.js","../node_modules/popper.js/src/modifiers/flip.js","../node_modules/popper.js/src/modifiers/offset.js","../node_modules/popper.js/src/modifiers/index.js","../node_modules/popper.js/src/modifiers/shift.js","../node_modules/popper.js/src/modifiers/preventOverflow.js","../node_modules/popper.js/src/modifiers/keepTogether.js","../node_modules/popper.js/src/modifiers/arrow.js","../node_modules/popper.js/src/utils/getOppositeVariation.js","../node_modules/popper.js/src/modifiers/inner.js","../node_modules/popper.js/src/modifiers/hide.js","../node_modules/popper.js/src/utils/getRoundedOffsets.js","../node_modules/popper.js/src/modifiers/applyStyle.js","../node_modules/popper.js/src/utils/setAttributes.js","../node_modules/popper.js/src/methods/defaults.js","../node_modules/popper.js/src/index.js","../node_modules/@material-ui/core/esm/Popper/Popper.js","../node_modules/@material-ui/core/esm/Portal/Portal.js","../node_modules/@material-ui/core/esm/Select/SelectInput.js","../node_modules/@material-ui/core/esm/internal/svg-icons/ArrowDropDown.js","../node_modules/@material-ui/core/esm/NativeSelect/NativeSelectInput.js","../node_modules/@material-ui/core/esm/NativeSelect/NativeSelect.js","../node_modules/@material-ui/core/esm/Select/Select.js","../node_modules/@material-ui/core/esm/Slide/Slide.js","../node_modules/@material-ui/core/esm/SvgIcon/SvgIcon.js","../node_modules/@material-ui/core/esm/Switch/Switch.js","../node_modules/@material-ui/core/esm/Tab/Tab.js","../node_modules/@material-ui/core/esm/TableBody/TableBody.js","../node_modules/@material-ui/core/esm/TableCell/TableCell.js","../node_modules/@material-ui/core/esm/TableFooter/TableFooter.js","../node_modules/@material-ui/core/esm/TableHead/TableHead.js","../node_modules/@material-ui/core/esm/TablePagination/TablePaginationActions.js","../node_modules/@material-ui/core/esm/TablePagination/TablePagination.js","../node_modules/@material-ui/core/esm/TableRow/TableRow.js","../node_modules/@material-ui/core/esm/internal/svg-icons/ArrowDownward.js","../node_modules/@material-ui/core/esm/TableSortLabel/TableSortLabel.js","../node_modules/@material-ui/core/esm/Table/Table.js","../node_modules/@material-ui/core/esm/Table/TableContext.js","../node_modules/@material-ui/core/esm/Table/Tablelvl2Context.js","../node_modules/@material-ui/core/esm/utils/scrollLeft.js","../node_modules/@material-ui/core/esm/internal/animate.js","../node_modules/@material-ui/core/esm/Tabs/ScrollbarSize.js","../node_modules/@material-ui/core/esm/Tabs/TabIndicator.js","../node_modules/@material-ui/core/esm/TabScrollButton/TabScrollButton.js","../node_modules/@material-ui/core/esm/Tabs/Tabs.js","../node_modules/@material-ui/core/esm/TextField/TextField.js","../node_modules/@material-ui/core/esm/TextareaAutosize/TextareaAutosize.js","../node_modules/@material-ui/core/esm/Toolbar/Toolbar.js","../node_modules/@material-ui/core/esm/Tooltip/Tooltip.js","../node_modules/@material-ui/core/esm/Typography/Typography.js","../node_modules/@material-ui/core/esm/internal/SwitchBase.js","../node_modules/@material-ui/core/esm/internal/svg-icons/KeyboardArrowLeft.js","../node_modules/@material-ui/core/esm/internal/svg-icons/KeyboardArrowRight.js","../node_modules/@material-ui/core/esm/styles/colorManipulator.js","../node_modules/@material-ui/core/esm/styles/createBreakpoints.js","../node_modules/@material-ui/core/esm/styles/createStyles.js","../node_modules/@material-ui/core/esm/styles/createMixins.js","../node_modules/@material-ui/core/esm/colors/common.js","../node_modules/@material-ui/core/esm/colors/grey.js","../node_modules/@material-ui/core/esm/colors/indigo.js","../node_modules/@material-ui/core/esm/colors/pink.js","../node_modules/@material-ui/core/esm/colors/red.js","../node_modules/@material-ui/core/esm/colors/orange.js","../node_modules/@material-ui/core/esm/colors/blue.js","../node_modules/@material-ui/core/esm/colors/green.js","../node_modules/@material-ui/core/esm/styles/createPalette.js","../node_modules/@material-ui/core/esm/styles/createTypography.js","../node_modules/@material-ui/core/esm/styles/shadows.js","../node_modules/@material-ui/core/esm/styles/shape.js","../node_modules/@material-ui/core/esm/styles/createTheme.js","../node_modules/@material-ui/core/esm/styles/createSpacing.js","../node_modules/@material-ui/core/esm/styles/defaultTheme.js","../node_modules/@material-ui/core/esm/styles/createMuiStrictModeTheme.js","../node_modules/@material-ui/core/esm/styles/cssUtils.js","../node_modules/@material-ui/core/esm/styles/responsiveFontSizes.js","../node_modules/@material-ui/core/esm/styles/withTheme.js","../node_modules/@material-ui/core/esm/styles/makeStyles.js","../node_modules/@material-ui/core/esm/styles/styled.js","../node_modules/@material-ui/core/esm/styles/transitions.js","../node_modules/@material-ui/core/esm/styles/useTheme.js","../node_modules/@material-ui/core/esm/styles/withStyles.js","../node_modules/@material-ui/core/esm/styles/zIndex.js","../node_modules/@material-ui/core/esm/transitions/utils.js","../node_modules/@material-ui/core/esm/utils/capitalize.js","../node_modules/@material-ui/core/esm/utils/createChainedFunction.js","../node_modules/@material-ui/core/esm/utils/createSvgIcon.js","../node_modules/@material-ui/core/esm/utils/debounce.js","../node_modules/@material-ui/core/esm/utils/getScrollbarSize.js","../node_modules/@material-ui/core/esm/utils/deprecatedPropType.js","../node_modules/@material-ui/core/esm/utils/requirePropFactory.js","../node_modules/@material-ui/core/esm/utils/unsupportedProp.js","../node_modules/@material-ui/core/esm/utils/isMuiElement.js","../node_modules/@material-ui/core/esm/utils/ownerDocument.js","../node_modules/@material-ui/core/esm/utils/ownerWindow.js","../node_modules/@material-ui/core/esm/utils/setRef.js","../node_modules/@material-ui/core/esm/utils/unstable_useId.js","../node_modules/@material-ui/core/esm/utils/useControlled.js","../node_modules/@material-ui/core/esm/utils/useEventCallback.js","../node_modules/@material-ui/core/esm/utils/useForkRef.js","../node_modules/@material-ui/core/esm/utils/useIsFocusVisible.js","../node_modules/@material-ui/core/esm/withWidth/withWidth.js","../node_modules/@material-ui/core/esm/useMediaQuery/useMediaQuery.js","../node_modules/@material-ui/core/styles/colorManipulator.js","../node_modules/@material-ui/core/styles/createBreakpoints.js","../node_modules/@material-ui/core/styles/createMixins.js","../node_modules/@material-ui/core/styles/createPalette.js","../node_modules/@material-ui/core/styles/createSpacing.js","../node_modules/@material-ui/core/styles/createTheme.js","../node_modules/@material-ui/core/styles/createTypography.js","../node_modules/@material-ui/core/styles/defaultTheme.js","../node_modules/@material-ui/core/styles/shadows.js","../node_modules/@material-ui/core/styles/shape.js","../node_modules/@material-ui/core/styles/transitions.js","../node_modules/@material-ui/core/styles/withStyles.js","../node_modules/@material-ui/core/styles/zIndex.js","../node_modules/@material-ui/core/utils/capitalize.js","../node_modules/@material-ui/icons/Add.js","../node_modules/@material-ui/icons/AddBox.js","../node_modules/@material-ui/icons/Apps.js","../node_modules/@material-ui/icons/ArrowDownward.js","../node_modules/@material-ui/icons/ArrowDropDown.js","../node_modules/@material-ui/icons/ArrowUpward.js","../node_modules/@material-ui/icons/AssignmentTurnedIn.js","../node_modules/@material-ui/icons/AttachFile.js","../node_modules/@material-ui/icons/BarChartOutlined.js","../node_modules/@material-ui/icons/Check.js","../node_modules/@material-ui/icons/CheckCircle.js","../node_modules/@material-ui/icons/ChevronLeft.js","../node_modules/@material-ui/icons/ChevronRight.js","../node_modules/@material-ui/icons/Clear.js","../node_modules/@material-ui/icons/Close.js","../node_modules/@material-ui/icons/CloudUpload.js","../node_modules/@material-ui/icons/Delete.js","../node_modules/@material-ui/icons/DeleteOutline.js","../node_modules/@material-ui/icons/Description.js","../node_modules/@material-ui/icons/Done.js","../node_modules/@material-ui/icons/Edit.js","../node_modules/@material-ui/icons/Error.js","../node_modules/@material-ui/icons/ExpandMore.js","../node_modules/@material-ui/icons/FileCopyOutlined.js","../node_modules/@material-ui/icons/FilterList.js","../node_modules/@material-ui/icons/FirstPage.js","../node_modules/@material-ui/icons/Folder.js","../node_modules/@material-ui/icons/Home.js","../node_modules/@material-ui/icons/Info.js","../node_modules/@material-ui/icons/LastPage.js","../node_modules/@material-ui/icons/ListAlt.js","../node_modules/@material-ui/icons/Lock.js","../node_modules/@material-ui/icons/MenuOpen.js","../node_modules/@material-ui/icons/MoreHoriz.js","../node_modules/@material-ui/icons/Person.js","../node_modules/@material-ui/icons/Remove.js","../node_modules/@material-ui/icons/Replay.js","../node_modules/@material-ui/icons/RestoreFromTrash.js","../node_modules/@material-ui/icons/Save.js","../node_modules/@material-ui/icons/SaveAlt.js","../node_modules/@material-ui/icons/Search.js","../node_modules/@material-ui/icons/Security.js","../node_modules/@material-ui/icons/Send.js","../node_modules/@material-ui/icons/Star.js","../node_modules/@material-ui/icons/StarBorder.js","../node_modules/@material-ui/icons/Undo.js","../node_modules/@material-ui/icons/ViewColumn.js","../node_modules/@material-ui/icons/Warning.js","../node_modules/@material-ui/icons/ZoomOutMap.js","../node_modules/@material-ui/icons/esm/ArrowDropDown.js","../node_modules/@material-ui/icons/esm/Delete.js","../node_modules/@material-ui/icons/esm/Edit.js","../node_modules/@material-ui/icons/esm/ExpandMore.js","../node_modules/@material-ui/icons/esm/GetApp.js","../node_modules/@material-ui/icons/esm/Save.js","../node_modules/@material-ui/icons/utils/createSvgIcon.js","../node_modules/@material-ui/core/esm/ListSubheader/ListSubheader.js","../node_modules/@material-ui/lab/esm/internal/svg-icons/ArrowDropDown.js","../node_modules/@material-ui/lab/esm/Autocomplete/Autocomplete.js","../node_modules/@material-ui/lab/esm/internal/svg-icons/Close.js","../node_modules/@material-ui/lab/esm/useAutocomplete/useAutocomplete.js","../node_modules/dom-helpers/esm/removeClass.js","../node_modules/react-transition-group/esm/CSSTransition.js","../node_modules/dom-helpers/esm/addClass.js","../node_modules/dom-helpers/esm/hasClass.js","../node_modules/@material-ui/src/_helpers/date-utils.ts","../node_modules/@material-ui/src/views/Calendar/DayWrapper.tsx","../node_modules/@material-ui/src/views/Calendar/SlideTransition.tsx","../node_modules/@material-ui/src/views/Calendar/CalendarHeader.tsx","../node_modules/@material-ui/src/_shared/icons/ArrowLeftIcon.tsx","../node_modules/@material-ui/src/_shared/icons/ArrowRightIcon.tsx","../node_modules/@material-ui/src/_shared/WithUtils.tsx","../node_modules/@material-ui/src/views/Calendar/Calendar.tsx","../node_modules/@material-ui/src/constants/ClockType.ts","../node_modules/@material-ui/src/views/Clock/ClockPointer.tsx","../node_modules/@material-ui/src/_helpers/time-utils.ts","../node_modules/@material-ui/src/views/Clock/Clock.tsx","../node_modules/@material-ui/src/views/Clock/ClockNumber.tsx","../node_modules/@material-ui/src/views/Clock/ClockNumbers.tsx","../node_modules/@material-ui/src/views/Clock/ClockView.tsx","../node_modules/@material-ui/src/DatePicker/DatePickerToolbar.tsx","../node_modules/@material-ui/src/DatePicker/DatePicker.tsx","../node_modules/@material-ui/src/views/Calendar/Day.tsx","../node_modules/@material-ui/src/constants/prop-types.ts","../node_modules/@material-ui/src/views/Year/Year.tsx","../node_modules/@material-ui/src/views/Year/YearView.tsx","../node_modules/@material-ui/src/views/Month/Month.tsx","../node_modules/@material-ui/src/views/Month/MonthView.tsx","../node_modules/@material-ui/src/_shared/hooks/useIsLandscape.tsx","../node_modules/@material-ui/src/Picker/Picker.tsx","../node_modules/@material-ui/src/_shared/hooks/useViews.tsx","../node_modules/@material-ui/src/_helpers/utils.ts","../node_modules/@material-ui/src/constants/dimensions.ts","../node_modules/@material-ui/src/wrappers/StaticWrapper.tsx","../node_modules/@material-ui/src/_shared/ModalDialog.tsx","../node_modules/@material-ui/src/_shared/hooks/useKeyDown.ts","../node_modules/@material-ui/src/wrappers/ModalWrapper.tsx","../node_modules/@material-ui/src/wrappers/InlineWrapper.tsx","../node_modules/@material-ui/src/wrappers/Wrapper.tsx","../node_modules/@material-ui/src/TimePicker/TimePickerToolbar.tsx","../node_modules/@material-ui/src/TimePicker/TimePicker.tsx","../node_modules/@material-ui/src/DateTimePicker/DateTimePickerTabs.tsx","../node_modules/@material-ui/src/_shared/icons/DateRangeIcon.tsx","../node_modules/@material-ui/src/_shared/icons/TimeIcon.tsx","../node_modules/@material-ui/src/DateTimePicker/DateTimePickerToolbar.tsx","../node_modules/@material-ui/src/DateTimePicker/DateTimePicker.tsx","../node_modules/@material-ui/src/_shared/hooks/useStaticState.ts","../node_modules/@material-ui/src/_shared/ToolbarText.tsx","../node_modules/@material-ui/src/_shared/ToolbarButton.tsx","../node_modules/@material-ui/src/_shared/PickerToolbar.tsx","../node_modules/@material-ui/src/_shared/PureDateInput.tsx","../node_modules/@material-ui/src/_shared/icons/KeyboardIcon.tsx","../node_modules/@material-ui/src/_helpers/text-field-helper.ts","../node_modules/@material-ui/src/_shared/KeyboardDateInput.tsx","../node_modules/@material-ui/src/_shared/hooks/usePickerState.ts","../node_modules/@material-ui/src/_shared/hooks/useOpenState.ts","../node_modules/@material-ui/src/_shared/hooks/useKeyboardPickerState.ts","../node_modules/@material-ui/src/Picker/makePickerWithState.tsx","../node_modules/@material-ui/src/MuiPickersUtilsProvider.tsx","../node_modules/@material-ui/src/_shared/hooks/useUtils.ts","../node_modules/@material-ui/styles/esm/ServerStyleSheets/ServerStyleSheets.js","../node_modules/@material-ui/styles/esm/StylesProvider/StylesProvider.js","../node_modules/@material-ui/styles/esm/ThemeProvider/ThemeProvider.js","../node_modules/@material-ui/styles/esm/ThemeProvider/nested.js","../node_modules/@material-ui/styles/esm/createGenerateClassName/createGenerateClassName.js","../node_modules/@material-ui/styles/esm/createStyles/createStyles.js","../node_modules/@material-ui/styles/esm/getThemeProps/getThemeProps.js","../node_modules/jss-plugin-rule-value-function/dist/jss-plugin-rule-value-function.esm.js","../node_modules/jss-plugin-global/dist/jss-plugin-global.esm.js","../node_modules/jss-plugin-nested/dist/jss-plugin-nested.esm.js","../node_modules/hyphenate-style-name/index.js","../node_modules/jss-plugin-camel-case/dist/jss-plugin-camel-case.esm.js","../node_modules/jss-plugin-default-unit/dist/jss-plugin-default-unit.esm.js","../node_modules/css-vendor/dist/css-vendor.esm.js","../node_modules/jss-plugin-vendor-prefixer/dist/jss-plugin-vendor-prefixer.esm.js","../node_modules/jss-plugin-props-sort/dist/jss-plugin-props-sort.esm.js","../node_modules/@material-ui/styles/esm/jssPreset/jssPreset.js","../node_modules/@material-ui/styles/esm/makeStyles/multiKeyStore.js","../node_modules/@material-ui/styles/esm/makeStyles/indexCounter.js","../node_modules/@material-ui/styles/esm/getStylesCreator/noopTheme.js","../node_modules/@material-ui/styles/esm/makeStyles/makeStyles.js","../node_modules/@material-ui/styles/esm/getStylesCreator/getStylesCreator.js","../node_modules/@material-ui/styles/esm/mergeClasses/mergeClasses.js","../node_modules/@material-ui/styles/esm/styled/styled.js","../node_modules/@material-ui/styles/esm/useTheme/ThemeContext.js","../node_modules/@material-ui/styles/esm/useTheme/useTheme.js","../node_modules/@material-ui/styles/esm/withStyles/withStyles.js","../node_modules/@material-ui/styles/esm/withTheme/withTheme.js","../node_modules/@material-ui/system/esm/borders.js","../node_modules/@material-ui/system/esm/breakpoints.js","../node_modules/@material-ui/system/esm/compose.js","../node_modules/@material-ui/system/esm/display.js","../node_modules/@material-ui/system/esm/flexbox.js","../node_modules/@material-ui/system/esm/grid.js","../node_modules/@material-ui/system/esm/merge.js","../node_modules/@material-ui/system/esm/palette.js","../node_modules/@material-ui/system/esm/positions.js","../node_modules/@material-ui/system/esm/shadows.js","../node_modules/@material-ui/system/esm/sizing.js","../node_modules/@material-ui/system/esm/spacing.js","../node_modules/@material-ui/system/esm/memoize.js","../node_modules/@material-ui/system/esm/style.js","../node_modules/@material-ui/system/esm/styleFunctionSx.js","../node_modules/@material-ui/system/esm/typography.js","../node_modules/@material-ui/utils/esm/deepmerge.js","../node_modules/@material-ui/utils/esm/formatMuiErrorMessage.js","../node_modules/@material-ui/utils/esm/chainPropTypes.js","../node_modules/@material-ui/utils/esm/elementAcceptingRef.js","../node_modules/@material-ui/utils/esm/elementTypeAcceptingRef.js","../node_modules/@material-ui/utils/esm/exactProp.js","../node_modules/@material-ui/utils/esm/getDisplayName.js","../node_modules/@material-ui/utils/esm/HTMLElementType.js","../node_modules/@material-ui/utils/esm/ponyfillGlobal.js","../node_modules/@material-ui/utils/esm/refType.js","../node_modules/attr-accept/dist/es/index.js","../node_modules/classnames/index.js","../node_modules/clsx/dist/clsx.m.js","../node_modules/date-fns/esm/_lib/format/longFormatters/index.js","../node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js","../node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js","../node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js","../node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js","../node_modules/date-fns/esm/_lib/getUTCWeekYear/index.js","../node_modules/date-fns/esm/_lib/getUTCWeek/index.js","../node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js","../node_modules/date-fns/esm/_lib/protectedTokens/index.js","../node_modules/date-fns/esm/_lib/requiredArgs/index.js","../node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js","../node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js","../node_modules/date-fns/esm/_lib/toInteger/index.js","../node_modules/date-fns/esm/_lib/addLeadingZeros/index.js","../node_modules/date-fns/esm/_lib/format/lightFormatters/index.js","../node_modules/date-fns/esm/_lib/format/formatters/index.js","../node_modules/date-fns/esm/_lib/getUTCDayOfYear/index.js","../node_modules/date-fns/esm/format/index.js","../node_modules/date-fns/esm/isValid/index.js","../node_modules/date-fns/esm/isDate/index.js","../node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.js","../node_modules/date-fns/esm/locale/_lib/buildFormatLongFn/index.js","../node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.js","../node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.js","../node_modules/date-fns/esm/locale/_lib/buildLocalizeFn/index.js","../node_modules/date-fns/esm/locale/_lib/buildMatchFn/index.js","../node_modules/date-fns/esm/locale/en-US/_lib/match/index.js","../node_modules/date-fns/esm/locale/_lib/buildMatchPatternFn/index.js","../node_modules/date-fns/esm/locale/en-US/index.js","../node_modules/date-fns/esm/locale/en-US/_lib/localize/index.js","../node_modules/date-fns/esm/constants/index.js","../node_modules/date-fns/esm/parseISO/index.js","../node_modules/date-fns/esm/subMilliseconds/index.js","../node_modules/date-fns/esm/addMilliseconds/index.js","../node_modules/date-fns/esm/toDate/index.js","../node_modules/debounce/index.js","../node_modules/fast-deep-equal/react.js","../node_modules/file-saver/src/FileSaver.js","../node_modules/resolve-pathname/esm/resolve-pathname.js","../node_modules/history/esm/history.js","../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","../node_modules/is-in-browser/dist/module.js","../node_modules/jss/dist/jss.esm.js","../node_modules/lodash/lodash.js","../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","../node_modules/@material-ui/core/esm/SnackbarContent/SnackbarContent.js","../node_modules/@material-ui/core/esm/Snackbar/Snackbar.js","../node_modules/tslib/tslib.es6.js","../node_modules/file-selector/src/file.ts","../node_modules/file-selector/src/file-selector.ts","../node_modules/react-dropzone/dist/es/utils/index.js","../node_modules/react-dropzone/dist/es/index.js","../node_modules/@material-ui/core/esm/Fab/Fab.js","../node_modules/material-ui-dropzone/src/helpers.js","../node_modules/material-ui-dropzone/src/components/PreviewList.js","../node_modules/material-ui-dropzone/src/components/SnackbarContentWrapper.js","../node_modules/material-ui-dropzone/src/components/DropzoneAreaBase.js","../node_modules/material-ui-dropzone/src/components/DropzoneArea.js","../node_modules/material-ui-dropzone/src/components/DropzoneDialogBase.js","../node_modules/material-ui-dropzone/src/components/DropzoneDialog.js","../node_modules/notistack/src/SnackbarContext.ts","../node_modules/notistack/src/utils/constants.ts","../node_modules/notistack/src/SnackbarContent/SnackbarContent.tsx","../node_modules/notistack/src/SnackbarItem/SnackbarItem.util.ts","../node_modules/notistack/src/utils/defaultIconVariants.tsx","../node_modules/notistack/src/utils/createChainedFunction.js","../node_modules/notistack/src/utils/useEventCallback.js","../node_modules/notistack/src/SnackbarItem/Snackbar.js","../node_modules/notistack/src/SnackbarItem/SnackbarItem.tsx","../node_modules/notistack/src/SnackbarContainer.tsx","../node_modules/notistack/src/SnackbarProvider.tsx","../node_modules/notistack/src/useSnackbar.ts","../node_modules/object-assign/index.js","../node_modules/path-to-regexp/index.js","../node_modules/path-to-regexp/node_modules/isarray/index.js","../node_modules/prop-types/factoryWithThrowingShims.js","../node_modules/prop-types/index.js","../node_modules/prop-types/lib/ReactPropTypesSecret.js","../node_modules/use-memo-one/dist/use-memo-one.esm.js","../node_modules/css-box-model/dist/css-box-model.esm.js","../node_modules/memoize-one/dist/memoize-one.esm.js","../node_modules/raf-schd/dist/raf-schd.esm.js","../node_modules/react-beautiful-dnd/dist/react-beautiful-dnd.esm.js","../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../node_modules/react-dom/cjs/react-dom.production.min.js","../node_modules/react-dom/index.js","../node_modules/react-dom/server.browser.js","../node_modules/react-double-scrollbar/dist/DoubleScrollbar.js","../node_modules/react-is/cjs/react-is.production.min.js","../node_modules/react-is/index.js","../node_modules/react-redux/es/components/Context.js","../node_modules/react-redux/es/utils/batch.js","../node_modules/react-redux/es/utils/Subscription.js","../node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js","../node_modules/react-redux/es/components/Provider.js","../node_modules/react-redux/es/components/connectAdvanced.js","../node_modules/react-redux/es/utils/shallowEqual.js","../node_modules/react-redux/es/connect/wrapMapToProps.js","../node_modules/react-redux/es/connect/mapDispatchToProps.js","../node_modules/react-redux/es/utils/bindActionCreators.js","../node_modules/react-redux/es/connect/mapStateToProps.js","../node_modules/react-redux/es/connect/mergeProps.js","../node_modules/react-redux/es/connect/selectorFactory.js","../node_modules/react-redux/es/connect/connect.js","../node_modules/react-redux/es/hooks/useReduxContext.js","../node_modules/react-redux/es/hooks/useStore.js","../node_modules/react-redux/es/hooks/useDispatch.js","../node_modules/react-redux/es/hooks/useSelector.js","../node_modules/react-redux/es/index.js","../node_modules/react-redux/node_modules/react-is/cjs/react-is.production.min.js","../node_modules/react-redux/node_modules/react-is/index.js","../node_modules/react-router-dom/modules/BrowserRouter.js","../node_modules/react-router-dom/modules/HashRouter.js","../node_modules/react-router-dom/modules/utils/locationUtils.js","../node_modules/react-router-dom/modules/Link.js","../node_modules/react-router-dom/modules/NavLink.js","../node_modules/mini-create-react-context/dist/esm/index.js","../node_modules/react-router/modules/createNameContext.js","../node_modules/react-router/modules/HistoryContext.js","../node_modules/react-router/modules/RouterContext.js","../node_modules/react-router/modules/Router.js","../node_modules/react-router/modules/MemoryRouter.js","../node_modules/react-router/modules/Lifecycle.js","../node_modules/react-router/modules/Prompt.js","../node_modules/react-router/modules/matchPath.js","../node_modules/react-router/modules/Route.js","../node_modules/react-router/modules/StaticRouter.js","../node_modules/react-router/modules/Switch.js","../node_modules/react-router/modules/hooks.js","../node_modules/react-transition-group/esm/config.js","../node_modules/react-transition-group/esm/Transition.js","../node_modules/react-transition-group/esm/utils/ChildMapping.js","../node_modules/react-transition-group/esm/TransitionGroup.js","../node_modules/react-transition-group/esm/TransitionGroupContext.js","../node_modules/react/cjs/react-jsx-runtime.production.min.js","../node_modules/react/cjs/react.production.min.js","../node_modules/react/index.js","../node_modules/react/jsx-runtime.js","../node_modules/@babel/runtime/helpers/esm/objectSpread2.js","../node_modules/redux/es/redux.js","../node_modules/rifm/dist/rifm.esm.js","../node_modules/scheduler/cjs/scheduler.production.min.js","../node_modules/scheduler/index.js","../node_modules/tiny-invariant/dist/tiny-invariant.esm.js","../node_modules/@babel/runtime/helpers/arrayLikeToArray.js","../node_modules/@babel/runtime/helpers/arrayWithHoles.js","../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","../node_modules/@babel/runtime/helpers/assertThisInitialized.js","../node_modules/@babel/runtime/helpers/classCallCheck.js","../node_modules/@babel/runtime/helpers/createClass.js","../node_modules/@babel/runtime/helpers/defineProperty.js","../node_modules/@babel/runtime/helpers/extends.js","../node_modules/@babel/runtime/helpers/getPrototypeOf.js","../node_modules/@babel/runtime/helpers/inherits.js","../node_modules/@babel/runtime/helpers/interopRequireDefault.js","../node_modules/@babel/runtime/helpers/interopRequireWildcard.js","../node_modules/@babel/runtime/helpers/iterableToArray.js","../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","../node_modules/@babel/runtime/helpers/nonIterableRest.js","../node_modules/@babel/runtime/helpers/nonIterableSpread.js","../node_modules/@babel/runtime/helpers/objectWithoutProperties.js","../node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js","../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","../node_modules/@babel/runtime/helpers/regeneratorRuntime.js","../node_modules/@babel/runtime/helpers/setPrototypeOf.js","../node_modules/@babel/runtime/helpers/slicedToArray.js","../node_modules/@babel/runtime/helpers/toConsumableArray.js","../node_modules/@babel/runtime/helpers/toPrimitive.js","../node_modules/@babel/runtime/helpers/toPropertyKey.js","../node_modules/@babel/runtime/helpers/typeof.js","../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","../node_modules/@babel/runtime/regenerator/index.js","../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","../node_modules/@babel/runtime/helpers/esm/classCallCheck.js","../node_modules/@babel/runtime/helpers/esm/createClass.js","../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../node_modules/@babel/runtime/helpers/esm/extends.js","../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","../node_modules/@babel/runtime/helpers/esm/inherits.js","../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","../node_modules/@babel/runtime/helpers/esm/iterableToArray.js","../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js","../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","../node_modules/@babel/runtime/helpers/esm/slicedToArray.js","../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../node_modules/@babel/runtime/helpers/esm/typeof.js","../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","../node_modules/axios/lib/helpers/bind.js","../node_modules/axios/lib/utils.js","../node_modules/axios/lib/core/AxiosError.js","../node_modules/axios/lib/helpers/toFormData.js","../node_modules/axios/lib/helpers/AxiosURLSearchParams.js","../node_modules/axios/lib/helpers/buildURL.js","../node_modules/axios/lib/core/InterceptorManager.js","../node_modules/axios/lib/defaults/transitional.js","../node_modules/axios/lib/platform/browser/index.js","../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js","../node_modules/axios/lib/platform/browser/classes/FormData.js","../node_modules/axios/lib/platform/browser/classes/Blob.js","../node_modules/axios/lib/platform/common/utils.js","../node_modules/axios/lib/platform/index.js","../node_modules/axios/lib/helpers/formDataToJSON.js","../node_modules/axios/lib/defaults/index.js","../node_modules/axios/lib/helpers/toURLEncodedForm.js","../node_modules/axios/lib/helpers/parseHeaders.js","../node_modules/axios/lib/core/AxiosHeaders.js","../node_modules/axios/lib/core/transformData.js","../node_modules/axios/lib/cancel/isCancel.js","../node_modules/axios/lib/cancel/CanceledError.js","../node_modules/axios/lib/core/settle.js","../node_modules/axios/lib/helpers/speedometer.js","../node_modules/axios/lib/helpers/throttle.js","../node_modules/axios/lib/helpers/progressEventReducer.js","../node_modules/axios/lib/helpers/isURLSameOrigin.js","../node_modules/axios/lib/helpers/cookies.js","../node_modules/axios/lib/core/buildFullPath.js","../node_modules/axios/lib/helpers/isAbsoluteURL.js","../node_modules/axios/lib/helpers/combineURLs.js","../node_modules/axios/lib/core/mergeConfig.js","../node_modules/axios/lib/helpers/resolveConfig.js","../node_modules/axios/lib/adapters/xhr.js","../node_modules/axios/lib/helpers/parseProtocol.js","../node_modules/axios/lib/helpers/composeSignals.js","../node_modules/axios/lib/helpers/trackStream.js","../node_modules/axios/lib/adapters/fetch.js","../node_modules/axios/lib/adapters/adapters.js","../node_modules/axios/lib/helpers/null.js","../node_modules/axios/lib/core/dispatchRequest.js","../node_modules/axios/lib/env/data.js","../node_modules/axios/lib/helpers/validator.js","../node_modules/axios/lib/core/Axios.js","../node_modules/axios/lib/cancel/CancelToken.js","../node_modules/axios/lib/helpers/HttpStatusCode.js","../node_modules/axios/lib/axios.js","../node_modules/axios/lib/helpers/spread.js","../node_modules/axios/lib/helpers/isAxiosError.js","../node_modules/luxon/src/errors.js","../node_modules/luxon/src/impl/formats.js","../node_modules/luxon/src/zone.js","../node_modules/luxon/src/zones/systemZone.js","../node_modules/luxon/src/zones/IANAZone.js","../node_modules/luxon/src/impl/locale.js","../node_modules/luxon/src/impl/english.js","../node_modules/luxon/src/zones/fixedOffsetZone.js","../node_modules/luxon/src/zones/invalidZone.js","../node_modules/luxon/src/impl/zoneUtil.js","../node_modules/luxon/src/impl/util.js","../node_modules/luxon/src/settings.js","../node_modules/luxon/src/impl/formatter.js","../node_modules/luxon/src/impl/invalid.js","../node_modules/luxon/src/impl/regexParser.js","../node_modules/luxon/src/duration.js","../node_modules/luxon/src/interval.js","../node_modules/luxon/src/info.js","../node_modules/luxon/src/impl/diff.js","../node_modules/luxon/src/impl/digits.js","../node_modules/luxon/src/impl/tokenParser.js","../node_modules/luxon/src/impl/conversions.js","../node_modules/luxon/src/datetime.js","../node_modules/xlsx/xlsx.mjs","../webpack/bootstrap","../webpack/runtime/compat get default export","../webpack/runtime/define property getters","../webpack/runtime/ensure chunk","../webpack/runtime/get javascript chunk filename","../webpack/runtime/get mini-css chunk filename","../webpack/runtime/global","../webpack/runtime/hasOwnProperty shorthand","../webpack/runtime/load script","../webpack/runtime/make namespace object","../webpack/runtime/node module decorator","../webpack/runtime/publicPath","../webpack/runtime/css loading","../webpack/runtime/jsonp chunk loading","../node_modules/@material-ui/core/esm/CssBaseline/CssBaseline.js","../node_modules/@material-ui/core/esm/AppBar/AppBar.js","components/malogo/MALogo.tsx","../node_modules/@material-ui/core/esm/Container/Container.js","../node_modules/@material-ui/core/esm/Drawer/Drawer.js","../node_modules/@material-ui/core/esm/ListItemIcon/ListItemIcon.js","components/sidebar/SidebarPrimaryNav.tsx","../node_modules/@material-ui/icons/esm/Publish.js","../node_modules/@material-ui/icons/esm/ViewColumn.js","../node_modules/@material-ui/icons/esm/Search.js","../node_modules/@material-ui/icons/esm/Star.js","components/sidebar/HelpfulHintIcon.tsx","components/sidebar/Hints.tsx","components/sidebar/HelpfulHints.tsx","components/sidebar/Sidebar.tsx","components/userInfo/UserInfo.tsx","components/ClientFavorite/ClientFavorite.tsx","components/TableIcons.tsx","components/ClientEngagementSelector/ClientEngagementFilters.tsx","components/ClientEngagementSelector/useUpdateSelectedClientsAndEngagements.ts","components/ClientEngagementSelector/ClientAutocomplete.tsx","components/ClientEngagementSelector/useFetchClientsAndEngagements.ts","utilities/CssUtils.ts","components/ClientEngagementSelector/ClientEngagementSelector.tsx","components/layout/ApplicationsPopover.tsx","hooks/useCurrentUserTermsAndConditionsStatus.ts","hooks/useAuthentication.ts","components/TermsAndConditionsPage/TermsAndConditionsPage.tsx","components/layout/Layout.tsx","components/engagementManagement/EngagementManagementDetails.tsx","components/TabPanel/TabPanel.tsx","components/engagementManagement/ClientTabBar.tsx","components/engagementManagement/EngagementGroupCellRenderer.tsx","components/engagementManagement/EngagementManagement.tsx","components/engagementManagement/EngagementManagementContainer.tsx","App.tsx","../node_modules/redux-thunk/es/index.js","store/reducers/index.js","store/ConfigureStore.ts","services/SetupAxios.ts","index.tsx"],"sourcesContent":["import { Utils } from \"../utilities/utils\";\r\nimport * as mime from 'mime-types';\r\nimport { getFileExtensionFromFileName } from \"../helpers/FileHelpers\";\r\n\r\nconst invalidFileExtensions = [\"\", \"bat\", \"lnk\", \"pif\", \"vb\", \"cmd\", \"msc\", \"ps1\", \"vbe\", \"com\", \"msh\", \"ps1xml\", \"vbs\", \"cpl\", \"msh1\",\r\n \"ps2\", \"ws\", \"dll\", \"msh2\", \"ps2xml\", \"wsc\", \"exe\", \"mshxml\", \"psc1\", \"wsf\", \"inf\", \"msh1xml\", \"psc2\", \"wsh\", \"jar\", \"msh2xml\",\r\n \"reg\", \"js\", \"msi\", \"scf\", \"jse\", \"msp\", \"scr\", \"rar\", \"gif\",];\r\n\r\nexport interface IValidation {\r\n isValid: boolean,\r\n isNotValid: boolean,\r\n error: string,\r\n helperText: string,\r\n}\r\n\r\nexport interface ValidatedFile {\r\n file: File,\r\n validation: IValidation,\r\n};\r\n\r\nexport interface ValidatedFileSet {\r\n validFiles: File[],\r\n invalidFiles: ValidatedFile[],\r\n fileSetSizeValidation: IValidation\r\n hasValidFiles: boolean\r\n hasInvalidFiles: boolean\r\n}\r\n\r\nconst rejectedString = (name: string, error: string) => {\r\n return `${name} was rejected. ${error}`\r\n}\r\n\r\nexport const validateFile = (file: File, validateSize: boolean = true): IValidation => {\r\n let isValid = true;\r\n let error = \"\";\r\n\r\n const name = validateFileName(file.name);\r\n if (name.isNotValid) {\r\n name.error = rejectedString(file.name, name.error);\r\n return name;\r\n }\r\n\r\n const type = validateFileType(file.name);\r\n if (type.isNotValid) {\r\n type.error = rejectedString(file.name, type.error);\r\n return type;\r\n }\r\n\r\n if (validateSize) {\r\n const size = validateUploadSize(file.size);\r\n if (size.isNotValid) {\r\n size.error = rejectedString(file.name, type.error);\r\n if (size.isNotValid) return size;\r\n }\r\n }\r\n\r\n return {\r\n isValid,\r\n isNotValid: !isValid,\r\n error,\r\n helperText: error\r\n }\r\n}\r\n\r\nexport const validateFiles = (files: File[]): ValidatedFileSet => {\r\n const validFiles: File[] = [],\r\n invalidFiles: ValidatedFile[] = [];\r\n\r\n files.forEach(file => {\r\n const validation = validateFile(file, false);\r\n validation.isValid ? validFiles.push(file) : invalidFiles.push({ file, validation });\r\n })\r\n\r\n const uploadSize = files.map(file => file.size)?.reduce((sum, currentValue) => sum + currentValue);\r\n const fileSetSizeValidation = validateUploadSize(uploadSize);\r\n\r\n return {\r\n validFiles,\r\n invalidFiles,\r\n hasValidFiles: validFiles.length > 0,\r\n hasInvalidFiles: invalidFiles.length > 0,\r\n fileSetSizeValidation,\r\n }\r\n}\r\n\r\nexport const validateFileName = (value: string): IValidation => {\r\n let isValid = true;\r\n let error = \"\";\r\n\r\n if (!value) {\r\n isValid = false;\r\n error = \"File name is required.\";\r\n }\r\n else if (value.length < 3 || value.length > 250) {\r\n isValid = false;\r\n error = \"File name length must be between 3 and 250.\";\r\n }\r\n else if (RegExp(\"[\\\\\\\\\\\\/:*?\\\"<>|]+\").test(value) === true) {\r\n isValid = false;\r\n error = \"A file name can't contain any of the following characters: \\\\ / : * ? \\\" < > |\";\r\n }\r\n else if (RegExp(\"[^\\x00-\\x7F]+\").test(value) === true) {\r\n isValid = false;\r\n error = \"A file name cannot contain invalid characters.\";\r\n }\r\n\r\n return {\r\n isValid,\r\n isNotValid: !isValid,\r\n error,\r\n helperText: error\r\n }\r\n}\r\n\r\nexport const validateFileType = (fileName: string,): IValidation => {\r\n // file.type is unreliable for verifiying filetype so name is used with mime-types lookup\r\n const extension = getFileExtensionFromFileName(fileName)\r\n const isValid = !!extension && !invalidFileExtensions.includes(extension);\r\n let error = isValid ? \"\" : \"Invalid file type.\";\r\n\r\n return {\r\n isValid,\r\n isNotValid: !isValid,\r\n error,\r\n helperText: error\r\n }\r\n}\r\n\r\n// Individual files cannot exceed 2GB, nor can any set of files\r\nexport const validateUploadSize = (uploadSize: number | null | undefined): IValidation => {\r\n let isValid = true;\r\n let error = \"\";\r\n\r\n if (typeof uploadSize === 'number') {\r\n if (uploadSize > Utils.maxUploadSize) {\r\n error = `The upload size is too large. ${Utils.getFileSize(uploadSize)} / 2.0 GB`;\r\n isValid = false;\r\n }\r\n } else {\r\n error = `Unable to determine file size(s)`\r\n isValid = false;\r\n }\r\n\r\n return {\r\n isValid,\r\n isNotValid: !isValid,\r\n error,\r\n helperText: error\r\n }\r\n}\r\n","\r\nimport _ from \"lodash\";\r\n\r\n// Ids are fragile due to this relationship being defined in ClientPlatform\\ClientPlatform.Db\\Scripts\\Seed\\0_Area_Seed.sql\r\n// It is expected that the area list will be retrieved from the backend as needed and maximumAreaId will be updated to reflect the current list of areas\r\nconst maximumAreaId = 38\r\nexport const TaskAreasIds: number[] = _.range(1, maximumAreaId + 1, 1);","import _ from \"lodash\";\r\n\r\n// Ids are fragile due to this relationship being defined in ClientPlatform\\ClientPlatform.Db\\Scripts\\Seed\\0_Phase_Seed.sql\r\n// It is expected that the area list will be retrieved from the backend as needed and maximumAreaId will be updated to reflect the current list of areas\r\nconst maximumPhaseId = 4\r\nexport const TaskPhaseIds: number[] = _.range(1, maximumPhaseId+1, 1);","import { TaskStatus, TaskStatusIds } from \"../helpers/enums/TaskStatus\";\r\nimport { SocStatusIds } from \"../helpers/enums/SocStatus\";\r\nimport ITask, { IBulkUpdateTask } from \"../interfaces/ITask\";\r\nimport { TaskTypeIds } from \"../helpers/enums/TaskType\";\r\nimport { TaskPriorityIds } from \"../helpers/enums/TaskPriority\";\r\nimport { TaskAreasIds } from \"../helpers/enums/TaskArea\";\r\nimport { TaskPhaseIds } from \"../helpers/enums/TaskPhase\";\r\nimport { LineOfBusinessId } from \"../helpers/enums/LineOfBusinessId\";\r\nimport { DateTime } from \"luxon\";\r\nimport ILookup from \"../interfaces/ILookup\";\r\nimport { nullTaskEntityGroupName } from \"../helpers/TaskHelpers\";\r\n\r\nexport default class TaskValidator {\r\n\r\n _taskTypeList: number[] = [];\r\n\r\n constructor(taskTypeList: ILookup[]) {\r\n this._taskTypeList = taskTypeList.map(t => t.id);\r\n }\r\n\r\n public PrependedValidationMessage = \"Your selected request(s) may have one or more of the following issues: \";\r\n public PhaseValidationMessage = \"Phase is required.\";\r\n public AreaValidationMessage = \"Area is required.\";\r\n public TitleValidationMessage = \"Title is required and must be between 1 and 200 characters.\";\r\n public DescriptionValidationMessage = \"Description is required and must be between 3 and 3000 characters.\";\r\n public NotesValidationMessage = \"Notes cannot be more than 1000 characters.\";\r\n public TypeValidationMessage = \"Request Type is required and must be a valid type.\";\r\n public StatusValidationMessage = \"Status is required.\";\r\n public SocStatusValidationMessage = \"SOC Status is required.\";\r\n public PriorityValidationMessage = \"Priority is required and must be either 'Normal' or 'High'.\";\r\n public RequestedDateValidationMessage = \"Due Date is invalid\";\r\n public AssignedToUserValidationMessage = \"Assignee user is required\";\r\n public MossAdamsContactUserValidationMessage = \"Contact is required\";\r\n public RowsValidationMessage = \"Invalid cells are highlighted in red, please correct and try again.\";\r\n public NoDataValidationMessage = \"No data could be parsed. The file appears to be empty.\";\r\n public EntityValidationMessage = \"The maximum length of the Entity field is 200 characters.\";\r\n\r\n public SocStatusIsValid = (value: number | null, status?: number | null, isPublished?: boolean, isSocEngagementType?: boolean | null) => {\r\n const isDraftStatus = status == TaskStatus.Draft.id;\r\n if ((isPublished || !isDraftStatus) && isSocEngagementType) {\r\n return value != null && value != undefined && value != 0 && SocStatusIds.includes(value);\r\n } else if (isDraftStatus || !isSocEngagementType) {\r\n return (value && SocStatusIds.includes(value)) || [0, null, undefined].includes(value);\r\n } else {\r\n return value && SocStatusIds.includes(value);\r\n }\r\n }\r\n\r\n public PhaseIsValid = (value: number | null) => {\r\n return (value && TaskPhaseIds.includes(value)) || [0, null, undefined].includes(value);\r\n }\r\n\r\n public AreaIsValid = (value: number | null) => {\r\n return (value && TaskAreasIds.includes(value)) || [0, null, undefined].includes(value);\r\n }\r\n\r\n public TitleIsValid = (value: string) => {\r\n return value?.length >= 1 && value?.length <= 200;\r\n }\r\n\r\n public DescriptionIsValid = (value: string | null | undefined) => {\r\n return value === null || value === undefined || value?.length <= 3000;\r\n }\r\n\r\n public NotesIsValid = (value: string | null | undefined) => {\r\n return value === null || value === undefined || value?.length <= 1000;\r\n }\r\n\r\n public TypeIsValid = (value: number | null) => {\r\n return (value && this._taskTypeList.includes(value)) || [0, null, undefined].includes(value);\r\n }\r\n\r\n public StatusIsValid = (value: number | null) => {\r\n return value && TaskStatusIds.includes(value);\r\n }\r\n\r\n public PriorityIsValid = (value: number | null) => {\r\n return (value && TaskPriorityIds.includes(value)) || [0, null, undefined].includes(value);\r\n }\r\n\r\n public MossAdamsContactUserIsValid = (value: string | null, status?: number | null, isPublished?: boolean) => {\r\n if (isPublished || status != TaskStatus.Draft.id) {\r\n return (value != null && value != undefined && value?.length > 0);\r\n }\r\n else if (status == TaskStatus.Draft.id) {\r\n return (value && value?.length > 0) || [\"\", null, undefined].includes(value);\r\n } else {\r\n return (value && value?.length > 0);\r\n }\r\n }\r\n\r\n public RequestedDateIsValid = (value: Date | null, status?: number | null, isPublished?: boolean) => {\r\n const isDraftStatus = status === TaskStatus.Draft.id;\r\n let isValid = true;\r\n if (value !== null) {\r\n const earliestValidDate = DateTime.fromISO('1900-01-01');\r\n const dt = DateTime.fromJSDate(value);\r\n isValid = dt.isValid && dt.startOf('day') >= earliestValidDate.startOf('day');\r\n }\r\n\r\n return (isDraftStatus || value !== null) && isValid;\r\n }\r\n\r\n public EntityIsValid = (value: string | null | undefined, allowNullTaskEntityGroupValue = false) => {\r\n if (value?.toLowerCase() === nullTaskEntityGroupName.toLowerCase()) return allowNullTaskEntityGroupValue;\r\n return value === null || value === undefined || value.length <= 200;\r\n }\r\n\r\n public ExcelRequestedDateIsValid = (value: Date | null) => {\r\n let isValid = true;\r\n if (value !== null) {\r\n const dt = DateTime.fromJSDate(value);\r\n isValid = dt.isValid;\r\n }\r\n\r\n return isValid;\r\n }\r\n\r\n public ExcelFileTaskIsValid = (task: ITask | null) => {\r\n\r\n if (task) {\r\n return this.PhaseIsValid(task.phaseId) &&\r\n this.AreaIsValid(task.areaId) &&\r\n this.SocStatusIsValid(task.socStatusId, task.taskStatusId, task.isPublished, task.isSocEngagementType) &&\r\n this.TitleIsValid(task.title) &&\r\n this.DescriptionIsValid(task.description) &&\r\n this.NotesIsValid(task.notes) &&\r\n this.TypeIsValid(task.taskTypeId) &&\r\n this.StatusIsValid(task.taskStatusId) &&\r\n this.PriorityIsValid(task.taskPriorityId) &&\r\n this.MossAdamsContactUserIsValid(task.mossAdamsContactUserId, task.taskStatusId, task.isPublished) &&\r\n this.ExcelRequestedDateIsValid(task.requestedDate) &&\r\n this.EntityIsValid(task.taskEntity);\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n public TaskIsValid = (task: ITask | null) => {\r\n if (task) {\r\n //NOTE: This block is useful for debugger validation errors.\r\n /* const v1 = this.PhaseIsValid(task.phaseId, task.taskStatusId, task.isPublished)\r\n const v2 = this.AreaIsValid(task.areaId, task.taskStatusId, task.isPublished)\r\n const v3 = this.TitleIsValid(task.title)\r\n const v4 = this.DescriptionIsValid(task.description, task.taskStatusId, task.isPublished) \r\n const v5 = this.TypeIsValid(task.taskTypeId, task.taskStatusId, task.isPublished)\r\n const v6 = this.StatusIsValid(task.taskStatusId)\r\n const v7 = this.PriorityIsValid(task.taskPriorityId, task.taskStatusId, task.isPublished)\r\n const v8 = this.AssignedToUserIsValid(task.assignedToUserId, task.taskStatusId, task.isPublished)\r\n const v9 = this.MossAdamsContactUserIsValid(task.assignedToUserId, task.taskStatusId, task.isPublished)\r\n const v10 = this.RequestedDateIsValid(task.requestedDate, task.taskStatusId, task.isPublished) \r\n const v11 = this.SocStatusIsValid(task.socStatusId, task.taskStatusId, task.isPublished, task.isSocEngagementType)\r\n const v12 = this.NotesIsValid(task.notes, task.taskStatusId, task.isPublished) */\r\n\r\n\r\n return this.PhaseIsValid(task.phaseId) &&\r\n this.AreaIsValid(task.areaId) &&\r\n this.SocStatusIsValid(task.socStatusId, task.taskStatusId, task.isPublished, task.isSocEngagementType) &&\r\n this.TitleIsValid(task.title) &&\r\n this.DescriptionIsValid(task.description) &&\r\n this.NotesIsValid(task.notes) &&\r\n this.TypeIsValid(task.taskTypeId) &&\r\n this.StatusIsValid(task.taskStatusId) &&\r\n this.PriorityIsValid(task.taskPriorityId) &&\r\n this.MossAdamsContactUserIsValid(task.mossAdamsContactUserId, task.taskStatusId, task.isPublished) &&\r\n this.RequestedDateIsValid(task.requestedDate, task.taskStatusId, task.isPublished) &&\r\n this.EntityIsValid(task.taskEntity);\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n public AllTasksAreValid = (tasks: ITask[] | null) => {\r\n if (tasks?.length) {\r\n for (const task of tasks) {\r\n if (!this.TaskIsValid(task)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n public GetAllErrorMessages = (task: ITask | IBulkUpdateTask) => {\r\n const errorMessages: string[] = [];\r\n\r\n if (!this.PhaseIsValid(task.phaseId)) {\r\n errorMessages.push(this.PhaseValidationMessage)\r\n }\r\n if (!this.AreaIsValid(task.areaId)) {\r\n errorMessages.push(this.AreaValidationMessage)\r\n }\r\n if (!this.SocStatusIsValid(task.socStatusId, task.taskStatusId, task.isPublished, task.isSocEngagementType)) {\r\n errorMessages.push(this.SocStatusValidationMessage)\r\n }\r\n if (!this.TitleIsValid(task.title)) {\r\n errorMessages.push(this.TitleValidationMessage)\r\n }\r\n if (!this.DescriptionIsValid(task.description)) {\r\n errorMessages.push(this.DescriptionValidationMessage)\r\n }\r\n if (!this.NotesIsValid(task.notes)) {\r\n errorMessages.push(this.NotesValidationMessage)\r\n }\r\n if (!this.TypeIsValid(task.taskTypeId)) {\r\n errorMessages.push(this.TypeValidationMessage)\r\n }\r\n if (!this.StatusIsValid(task.taskStatusId)) {\r\n errorMessages.push(this.StatusValidationMessage)\r\n }\r\n if (!this.PriorityIsValid(task.taskPriorityId)) {\r\n errorMessages.push(this.PriorityValidationMessage)\r\n }\r\n if (!this.MossAdamsContactUserIsValid(task.mossAdamsContactUserId, task.taskStatusId)) {\r\n errorMessages.push(this.MossAdamsContactUserValidationMessage)\r\n }\r\n if (!this.RequestedDateIsValid(task.requestedDate, task.taskStatusId)) {\r\n errorMessages.push(this.RequestedDateValidationMessage)\r\n }\r\n if (!this.EntityIsValid(task.taskEntity)) {\r\n errorMessages.push(this.EntityValidationMessage)\r\n }\r\n\r\n if (errorMessages.length) {\r\n errorMessages.unshift(this.PrependedValidationMessage);\r\n }\r\n\r\n return errorMessages;\r\n }\r\n\r\n public GetAllExcelErrorMessages = (task: ITask) => {\r\n const errorMessages: string[] = [];\r\n\r\n if (!this.PhaseIsValid(task.phaseId)) {\r\n errorMessages.push(this.PhaseValidationMessage)\r\n }\r\n if (!this.AreaIsValid(task.areaId)) {\r\n errorMessages.push(this.AreaValidationMessage)\r\n }\r\n if (!this.SocStatusIsValid(task.socStatusId, task.taskStatusId, task.isPublished, task.isSocEngagementType)) {\r\n errorMessages.push(this.SocStatusValidationMessage)\r\n }\r\n if (!this.TitleIsValid(task.title)) {\r\n errorMessages.push(this.TitleValidationMessage)\r\n }\r\n if (!this.DescriptionIsValid(task.description)) {\r\n errorMessages.push(this.DescriptionValidationMessage)\r\n }\r\n if (!this.NotesIsValid(task.notes)) {\r\n errorMessages.push(this.NotesValidationMessage)\r\n }\r\n if (!this.TypeIsValid(task.taskTypeId)) {\r\n errorMessages.push(this.TypeValidationMessage)\r\n }\r\n if (!this.StatusIsValid(task.taskStatusId)) {\r\n errorMessages.push(this.StatusValidationMessage)\r\n }\r\n if (!this.PriorityIsValid(task.taskPriorityId)) {\r\n errorMessages.push(this.PriorityValidationMessage)\r\n }\r\n if (!this.MossAdamsContactUserIsValid(task.mossAdamsContactUserId, task.taskStatusId)) {\r\n errorMessages.push(this.MossAdamsContactUserValidationMessage)\r\n }\r\n if (!this.ExcelRequestedDateIsValid(task.requestedDate)) {\r\n errorMessages.push(this.RequestedDateValidationMessage)\r\n }\r\n if (!this.EntityIsValid(task.taskEntity)) {\r\n errorMessages.push(this.EntityValidationMessage)\r\n }\r\n\r\n if (errorMessages.length) {\r\n errorMessages.unshift(this.PrependedValidationMessage);\r\n }\r\n\r\n return errorMessages;\r\n }\r\n\r\n}","import React from 'react';\r\nimport MoreHorizIcon from '@material-ui/icons/MoreHoriz';\r\nimport { makeStyles } from \"@material-ui/core/styles\";\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n actionButton: {\r\n color: theme.palette.primary.main,\r\n height: \"40px\",\r\n cursor: \"pointer\",\r\n position: \"relative\",\r\n right: \"10px\"\r\n }\r\n}));\r\n\r\nexport const EllipsisButtonActionRenderer = (props: any) => {\r\n const classes = useStyles();\r\n\r\n let showEllipsis = true;\r\n\r\n if (typeof props?.data?.userHasAccess === \"boolean\" && props?.data?.userHasAccess == false) {\r\n showEllipsis = false;\r\n }\r\n\r\n return (\r\n
\r\n {showEllipsis &&\r\n \r\n }\r\n
\r\n )\r\n}","import React from 'react';\r\nimport RestrictedIcon from '../common/RestrictedIcon/RestrictedIcon';\r\n\r\nexport const PrivateFileCellRenderer = (params: any) => {\r\n\r\n if (!params?.data) {\r\n return \"\";\r\n }\r\n\r\n return params?.data?.isPrivate && \r\n}","import React from 'react';\r\nimport { hierarchyIsFile, hierarchyIsRestrictedFolder } from '../../helpers/ContentHierarchyHelpers';\r\nimport { ICellRendererParams } from '@ag-grid-enterprise/all-modules';\r\nimport IContentHierarchy from '../../interfaces/IContentHierarchy';\r\nimport RestrictedIcon from '../common/RestrictedIcon/RestrictedIcon';\r\n\r\nexport const PrivateHierarchyCellRenderer = (params: ICellRendererParams) => {\r\n const data: IContentHierarchy = params?.data;\r\n\r\n if (data && ((hierarchyIsFile(data) && params.data.isPrivate) || hierarchyIsRestrictedFolder(data))) {\r\n return ;\r\n }\r\n\r\n return \"\";\r\n};\r\n","import React from 'react';\r\nimport ITaskAssignee from '../../interfaces/ITaskAssignee';\r\nimport { ICellRendererParams } from '@ag-grid-community/core';\r\n\r\nconst TaskAssigneeCellRenderer = (params: ICellRendererParams) => {\r\n const data: ITaskAssignee[] = params.data;\r\n\r\n const taskAssignees: ITaskAssignee[] = params.data?.taskAssignees;\r\n if (taskAssignees !== null && taskAssignees.length > 0) {\r\n var assignees = taskAssignees.map(function (taskAssignee: ITaskAssignee) {\r\n return taskAssignee.displayName\r\n }).join(', ');\r\n return {assignees}\r\n }\r\n return \"\";\r\n}\r\n\r\nexport default TaskAssigneeCellRenderer;","import { ValueGetterParams } from \"@ag-grid-community/core\";\r\nimport IUser from \"../../interfaces/IUser\";\r\nimport IUserEngagement from \"../../interfaces/IUserEngagement\";\r\nimport ITaskAssignee from \"../../interfaces/ITaskAssignee\";\r\n\r\n\r\nexport const assignedToUserNameValueGetter = (params: ValueGetterParams, clientUserList: IUser[] | null) => {\r\n if (!(params && params.data)) return null;\r\n\r\n let assignees: string[] = [];\r\n\r\n params.data.taskAssignees.forEach((assignee: ITaskAssignee) => {\r\n const user = clientUserList?.find(\r\n user => user.userId === assignee.userId\r\n );\r\n if (user?.isActive) {\r\n assignees.push(assignee.displayName ? assignee.displayName : '');\r\n } else {\r\n assignees.push(assignee.displayName + ' (Inactive)');;\r\n }\r\n });\r\n return assignees.join(', ');\r\n}\r\n","import React from \"react\";\r\nimport { makeStyles } from \"@material-ui/core/styles\";\r\nimport { Button, Menu, MenuItem, Tooltip } from \"@material-ui/core\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport IAddTaskDocumentProps from \"./IAddTaskDocumentProps\";\r\nimport IContentHierarchy from \"../../interfaces/IContentHierarchy\";\r\nimport FileSelectDialog from \"../FileSelectDialog/FileSelectDialog\";\r\nimport FileUploadDialog from \"../FileUploadDialog/FileUploadDialog\";\r\nimport RestrictedAttachmentsConfirmDialog from \"../RestrictedAttachmentConfirmDialog/RestrictedAttachmentsConfirmDialog\";\r\nimport IPlatformApiPostResult from \"../../interfaces/IPlatformApiPostResult\";\r\nimport ITaskDocument from \"../../interfaces/ITaskDocument\";\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n \"&& .MuiButtonBase-root\": {\r\n backgroundColor: theme.palette.mossadams.darkGreen600,\r\n },\r\n \"& .Mui-disabled .MuiSvgIcon-root\": {\r\n color: theme.palette.mossadams.gray300\r\n }\r\n },\r\n addIcon: {\r\n color: theme.palette.primary.contrastText,\r\n },\r\n}));\r\n\r\nconst AddTaskDocumentsButton: React.FC = (props) => {\r\n const classes = useStyles();\r\n const [anchorEl, setAnchorEl] = React.useState(null);\r\n const [fileSelectDialogIsOpen, setFileSelectDialogIsOpen] = React.useState(false);\r\n const [restrictedAttachmentsConfirmDialogIsOpen, setRestrictedAttachmentsConfirmDialogIsOpen] = React.useState(false);\r\n const [chooseFromCurrentEngagement, setChooseFromCurrentEngagement] = React.useState(true);\r\n const [uploadRestricted, setUploadRestricted] = React.useState(false);\r\n const [filesToAttach, setFilesToAttach] = React.useState([]);\r\n\r\n const {\r\n taskNumber,\r\n title: taskTitle,\r\n isNew: taskIsNew,\r\n engagementId,\r\n clientId,\r\n isRestricted,\r\n } = props.task;\r\n\r\n const handleClick = (event: React.MouseEvent) => {\r\n event.stopPropagation();\r\n setAnchorEl(event.currentTarget);\r\n };\r\n\r\n const handleClose = (e: any) => {\r\n setAnchorEl(null);\r\n setUploadRestricted(false);\r\n e.stopPropagation();\r\n };\r\n\r\n const handleCopyFromEngagementClick = (e: any) => {\r\n setAnchorEl(null);\r\n setChooseFromCurrentEngagement(false);\r\n setFileSelectDialogIsOpen(true);\r\n e.stopPropagation();\r\n };\r\n\r\n const handleAttachExistingDocumentClick = (e: any) => {\r\n setAnchorEl(null);\r\n setChooseFromCurrentEngagement(true);\r\n setFileSelectDialogIsOpen(true);\r\n e.stopPropagation();\r\n };\r\n\r\n const handleSelectFileDialogClose = () => {\r\n setFileSelectDialogIsOpen(false);\r\n };\r\n\r\n const handleSelectFileDialogSelect = (files: IContentHierarchy[]) => {\r\n if (props.task.isRestricted) {\r\n setFilesToAttach(files);\r\n setRestrictedAttachmentsConfirmDialogIsOpen(true);\r\n }\r\n else {\r\n fileSelectDialogIsOpen && props.onAddTaskDocuments(files);\r\n }\r\n }\r\n\r\n const handleUploadNewDocumentClick = (e: any) => {\r\n setAnchorEl(null);\r\n props.setAddTaskDocumentFileUploadDialogIsOpen(true);\r\n e.stopPropagation();\r\n };\r\n\r\n const handleUploadRestrictedDocumentClick = (e: any) => {\r\n setAnchorEl(null);\r\n setUploadRestricted(true);\r\n props.setAddTaskDocumentFileUploadDialogIsOpen(true);\r\n e.stopPropagation();\r\n };\r\n\r\n const handleUploadFileDialogClose = () => {\r\n props.setAddTaskDocumentFileUploadDialogIsOpen(false);\r\n setUploadRestricted(false);\r\n };\r\n\r\n const onUploadAttachmentsSuccess = (result: IPlatformApiPostResult) => {\r\n const newTaskDocuments = result.response?.data?.createdTaskDocuments as ITaskDocument[];\r\n props.onAttachmentsUploaded(newTaskDocuments);\r\n }\r\n\r\n const onConfirmRestrictedAttachments = () => {\r\n props.onAddTaskDocuments(filesToAttach);\r\n onCloseRestrictedAttachmentsDialog();\r\n }\r\n\r\n const onCloseRestrictedAttachmentsDialog = () => {\r\n setRestrictedAttachmentsConfirmDialogIsOpen(false);\r\n setFilesToAttach([]);\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default AddTaskDocumentsButton;\r\n","import React from 'react';\r\nimport { useSnackbar } from \"notistack\";\r\nimport IContentHierarchy from \"../../interfaces/IContentHierarchy\";\r\nimport ITaskDocument from \"../../interfaces/ITaskDocument\";\r\nimport { CustomDropzone } from \"../CustomDropzone/CustomDropzone\";\r\nimport { errorSeverity } from \"../FileUploadDialog/FileUploadDialog\";\r\nimport ITask from '../../interfaces/ITask';\r\nimport { makeStyles } from \"@material-ui/core/styles\";\r\nimport IPlatformApiPostResult from '../../interfaces/IPlatformApiPostResult';\r\nimport { createUploadParams } from '../../contexts/FileUploadContext/UploadParams';\r\nimport { SnackbarVariantTypes } from '../../helpers/enums/enums';\r\nimport { Utils } from '../../utilities/utils';\r\nimport { successfullyAttachedFilesText } from './AttachmentsGrid';\r\nimport { useFileUploadContext } from '../../hooks/useFileUploadContext';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n dropzoneDisabled: {\r\n height: \"100%\"\r\n },\r\n backdrop: {\r\n zIndex: 100,\r\n color: '#fff',\r\n },\r\n}));\r\n\r\ninterface TaskDocumentsDropzoneProps {\r\n task: ITask;\r\n taskDocuments: ITaskDocument[];\r\n uploadFolderId: string;\r\n children: React.ReactNode;\r\n fileUploadDialogIsOpen?: boolean;\r\n disabled: boolean;\r\n onAttachmentsCreated: (attachedTaskDocuments: ITaskDocument[]) => void;\r\n onAttachment?: (result: IPlatformApiPostResult) => void\r\n}\r\n\r\nexport const TaskDocumentsDropzone = (props: TaskDocumentsDropzoneProps) => {\r\n const { taskDocuments, task, uploadFolderId, children, onAttachmentsCreated, onAttachment } = props;\r\n const { enqueueSnackbar } = useSnackbar();\r\n const classes = useStyles();\r\n const uploadContext = useFileUploadContext();\r\n \r\n const uploadSuccessCallback = (result: IPlatformApiPostResult) => {\r\n const newTaskDocuments = result.response?.data?.createdTaskDocuments as ITaskDocument[];\r\n onAttachmentsCreated(newTaskDocuments);\r\n }\r\n\r\n const handleAttachmentGridDrop = async (files: File[], handleFinishedLoad: Function) => {\r\n const hasAttachment = taskDocuments.length > 0;\r\n const uploadingMultiple = files.length > 1;\r\n if (!task.allowMultipleAttachments && (hasAttachment || uploadingMultiple)) {\r\n var fileCountError = \"There can only be one file for this task.\"\r\n enqueueSnackbar(fileCountError, { variant: errorSeverity });\r\n handleFinishedLoad();\r\n throw fileCountError;\r\n }\r\n\r\n uploadContext.handleFileChange(files);\r\n\r\n const uploadParams = createUploadParams()\r\n .withFolderId(uploadFolderId)\r\n .withNotifications(false)\r\n .withRequestAttachment(props.task)\r\n .onSuccess(uploadSuccessCallback)\r\n .build();\r\n uploadContext.initiateUpload(uploadParams);\r\n\r\n handleFinishedLoad();\r\n }\r\n\r\n return (\r\n
\r\n {props.disabled ?
{children}
:\r\n \r\n {children}\r\n \r\n }\r\n
\r\n );\r\n}\r\n\r\n\r\nexport const useOnRequestAttachmentsCreated = ({isRestrictedTask, onAttachmentsCreated}: any) => {\r\n const { enqueueSnackbar } = useSnackbar();\r\n\r\n const onRequestAttachmentsCreated = (result: IPlatformApiPostResult) => {\r\n const newTaskDocuments = result.response?.data?.createdTaskDocuments as ITaskDocument[];\r\n\r\n if (result.status && newTaskDocuments) {\r\n const restrictedRequestAttachment = \"The file(s) uploaded successfully and only the Assignee(s) of the request have access.\";\r\n const successMessage = isRestrictedTask ? restrictedRequestAttachment : successfullyAttachedFilesText;\r\n enqueueSnackbar(successMessage, { variant: SnackbarVariantTypes.Success });\r\n\r\n onAttachmentsCreated(newTaskDocuments);\r\n }\r\n else {\r\n const errors = [\"Failed to attach file to request.\", ...result.errorMessages];\r\n Utils.enqueueMultiLineSnackbar(errors, enqueueSnackbar, { variant: SnackbarVariantTypes.Error });\r\n }\r\n }\r\n\r\n return onRequestAttachmentsCreated;\r\n} ","import { Button, CircularProgress, Link } from \"@material-ui/core\";\r\nimport React from \"react\";\r\n\r\ninterface ISpinnerButtonProps {\r\n onClickAsync: () => Promise,\r\n variant: 'button' | 'link'\r\n buttonText: string\r\n classes?: string\r\n}\r\n\r\nexport const SpinnerButton = (props: ISpinnerButtonProps) => {\r\n const { variant, onClickAsync, buttonText } = props;\r\n const [loading, setLoading] = React.useState(false);\r\n const style = props.classes ?? '';\r\n\r\n const onClick = async () => {\r\n if (!loading) {\r\n setLoading(true);\r\n await onClickAsync();\r\n setLoading(false);\r\n }\r\n }\r\n\r\n const spinner = \r\n\r\n let component = <>;\r\n if (variant === 'button') {\r\n component = \r\n }\r\n else if (variant === 'link') {\r\n component = \r\n {loading && spinner}\r\n {buttonText}\r\n \r\n }\r\n\r\n return (component)\r\n}","import React from \"react\";\r\nimport { Typography, makeStyles, Link, Accordion, AccordionDetails, AccordionSummary, Tooltip, Dialog, DialogContent, Button } from '@material-ui/core';\r\nimport IAttachmentsGridProps from './IAttachmentsGridProps';\r\nimport AddTaskDocumentsButton from \"./AddTaskDocumentsButton\";\r\nimport IContentHierarchy from \"../../interfaces/IContentHierarchy\";\r\nimport { AgGridColumn, AgGridReact } from '@ag-grid-community/react';\r\nimport { GridApi, ICellRendererParams } from \"@ag-grid-enterprise/all-modules\";\r\nimport ITaskDocument from \"../../interfaces/ITaskDocument\";\r\nimport DataReadService from \"../../services/DataReadService\";\r\nimport DataWriteService from \"../../services/DataWriteService\";\r\nimport { EllipsisButtonActionRenderer } from \"../AgGridRenderers/EllipsisButtonActionRenderer\";\r\nimport IDeleteTaskDocumentDto from \"../../interfaces/IDeleteTaskDocumentDto\";\r\nimport { HierarchyType } from \"../../helpers/enums/HierarchyType\";\r\nimport { useSnackbar, VariantType } from 'notistack';\r\nimport { SnackbarVariantTypes } from \"../../helpers/enums/enums\";\r\nimport { ConfirmDialog } from \"../ConfirmDialog/ConfirmDialog\";\r\nimport FileUploadDialog from \"../FileUploadDialog/FileUploadDialog\";\r\nimport { DownloadFileErrorText, DeleteDocumentMultipleTasksWarningText, DeleteDocumentWarningText } from \"../../helpers/Constants\";\r\nimport { agGridThemeOverride, border, detailPaneAccordionStyle } from \"../../helpers/portalTheme\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { Utils } from \"../../utilities/utils\";\r\nimport { LocalDateTimeString } from \"../../helpers/DateHelpers\";\r\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\r\nimport InfoIcon from '@material-ui/icons/Info';\r\nimport { saveAs } from 'file-saver';\r\nimport { TaskDocumentsDropzone } from \"./TaskDocumentsDropzone\";\r\nimport _ from \"lodash\";\r\nimport { PrivateFileCellRenderer } from \"../AgGridRenderers/PrivateFileCellRenderer\";\r\nimport { SpinnerButton } from \"../common/SpinnerButton/SpinnerButton\";\r\nimport ExpirationWarningIcon from \"../ExpirationWarningIcon/ExpirationWarningIcon\";\r\nimport { useSelector } from \"react-redux\";\r\nimport ICurrentUser from \"../../interfaces/ICurrentUser\";\r\nimport MADialogTitle from \"../MADialogTitle/MADialogTitle\";\r\nimport ZoomOutMapIcon from '@material-ui/icons/ZoomOutMap';\r\nimport RestrictedIcon from \"../common/RestrictedIcon/RestrictedIcon\";\r\nimport useAsyncFunctionIsLoading from \"../../hooks/useIsLoadingAsync\";\r\nimport SpinnerBackdrop from \"../common/SpinnerBackdrop\";\r\n\r\nconst errorGettingTaskDocumentsText = \"There was an error retrieving the attachments for this request.\";\r\nconst unrestrictedFilesWarningMessage = \"Drag and drop uploads are visible to ALL users. For sensitive files, please use the Restricted option.\";\r\nconst restrictedFilesUploadInstructions = 'Click on the + icon and select \"Upload Restricted File\" to limit an uploaded files access to a restricted set of users.'\r\nconst restrictedRequestInfoText = \"This request is restricted. Only request Assignees and Moss Adams users can view this request and associated data, including attachments.\";\r\nexport const restrictedRequestAttachment = \"The file(s) attached successfully and only the Assignee(s) of the request have access.\";\r\nexport const successfullyAttachedFilesText = 'Successfully attached file(s).';\r\nexport const errorSeverity: VariantType = 'error';\r\nexport const successSeverity: VariantType = 'success';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n ...agGridThemeOverride,\r\n width: \"100%\",\r\n \"&& .MuiDropzoneArea-root\": {\r\n height: \"100%\"\r\n }\r\n },\r\n formControl: {\r\n width: \"100%\",\r\n marginBottom: theme.spacing(5),\r\n },\r\n attachmentsGrid: {\r\n flex: 1,\r\n minHeight: \"400px\",\r\n overflowY: \"auto\",\r\n },\r\n attachmentsGridDialog: {\r\n height: \"calc(100% - 60px)\"\r\n },\r\n attachmentHeader: {\r\n display: \"flex\",\r\n width: \"100%\",\r\n },\r\n summary: {\r\n backgroundColor: theme.palette.mossadams.darkGreen400,\r\n color: theme.palette.primary.contrastText,\r\n \"&& .MuiIconButton-label\": {\r\n color: theme.palette.primary.contrastText,\r\n }\r\n },\r\n infoIcon: {\r\n color: theme.palette.primary.contrastText,\r\n },\r\n attachmentTitle: {\r\n fontSize: \"1.3rem\",\r\n flex: 1\r\n },\r\n attachmentButton: {\r\n border: \"1px dashed \" + theme.palette.mossadams.gray200,\r\n },\r\n attachmentButtonDialog: {\r\n width: \"100%\",\r\n textAlign: \"right\"\r\n },\r\n accordion: {\r\n ...detailPaneAccordionStyle,\r\n \"&& .MuiAccordion-root.Mui-expanded:last-child\": {\r\n marginTop: \"0px\"\r\n }\r\n },\r\n attachmentDialog: {\r\n height: '90vh',\r\n \"&& .MuiPaper-root\": {\r\n height: \"100%\",\r\n },\r\n \"&& .MuiDialogContent-root > div\": {\r\n height: \"100%\"\r\n }\r\n },\r\n attachmentDialogButton: {\r\n marginLeft: theme.spacing(4)\r\n }\r\n}));\r\n\r\nconst AttachmentsGrid = (props: IAttachmentsGridProps): JSX.Element => {\r\n const classes = useStyles();\r\n const { enqueueSnackbar } = useSnackbar();\r\n const history = useHistory();\r\n const currentUser = useSelector((state: any) => state.currentUser as ICurrentUser);\r\n\r\n const [attachmentsGridApi, setAttachmentsGridApi] = React.useState();\r\n const [deleteConfirmDialogIsOpen, setDeleteConfirmDialogIsOpen] = React.useState(false);\r\n const [removeConfirmDialogIsOpen, setRemoveConfirmDialogIsOpen] = React.useState(false);\r\n const [selectedTaskDocument, setSeletectedTaskDocument] = React.useState(null);\r\n const [uploadDialogIsOpen, setFileUploadDialogIsOpen] = React.useState(false);\r\n const [isAccordionExpanded, setIsAccordionExpanded] = React.useState(Boolean(props.taskDocuments.length));\r\n const [addTaskDocumentFileUploadDialogIsOpen, setAddTaskDocumentFileUploadDialogIsOpen] = React.useState(false);\r\n const [attachmentDialogIsOpen, setAttachmentDialogIsOpen] = React.useState(false);\r\n\r\n React.useEffect(() => {\r\n if (attachmentsGridApi) {\r\n getTaskDocuments();\r\n }\r\n }, [props.task.isRestricted])\r\n\r\n React.useEffect(() => {\r\n if (props.taskDocuments.length) {\r\n setIsAccordionExpanded(true);\r\n } else {\r\n setIsAccordionExpanded(false);\r\n }\r\n }, [props.taskDocuments.length]);\r\n\r\n React.useEffect(() => {\r\n props.setTaskDocuments([]);\r\n getTaskDocuments();\r\n }, [props.task.taskId]);\r\n\r\n const handleDeleteClick = () => {\r\n setDeleteConfirmDialogIsOpen(true);\r\n }\r\n\r\n const handleRemoveClick = () => {\r\n setRemoveConfirmDialogIsOpen(true);\r\n }\r\n\r\n const handleRemoveConfirmDialogClose = () => {\r\n setRemoveConfirmDialogIsOpen(false);\r\n };\r\n\r\n const handleDeleteConfirmDialogClose = () => {\r\n setDeleteConfirmDialogIsOpen(false);\r\n };\r\n\r\n const handleRemoveConfirmDialogConfirm = async () => {\r\n setDeleteConfirmDialogIsOpen(false);\r\n if (selectedTaskDocument) {\r\n handleRemoveTaskDocument(selectedTaskDocument);\r\n }\r\n };\r\n\r\n const handleDeleteConfirmDialogConfirm = async () => {\r\n setDeleteConfirmDialogIsOpen(false);\r\n if (selectedTaskDocument) {\r\n handleDeleteTaskDocument(selectedTaskDocument);\r\n }\r\n };\r\n\r\n const onAttachmentsGridReady = (params: any) => {\r\n setAttachmentsGridApi(params.api);\r\n }\r\n\r\n const components = {\r\n actionsRenderer: EllipsisButtonActionRenderer,\r\n privateFileCellRenderer: PrivateFileCellRenderer\r\n }\r\n\r\n const onUpdateTaskDocuments = (taskDocuments: ITaskDocument[], documentAdded: boolean = false) => {\r\n props.task.isRestricted && taskDocuments.forEach(td => td.isPrivate = props.task.isRestricted);\r\n props.setTaskDocuments(taskDocuments);\r\n attachmentsGridApi && attachmentsGridApi.setRowData(taskDocuments);\r\n\r\n const taskCopy = _.cloneDeep(props.task);\r\n taskCopy.hasAttachments = taskDocuments.length > 0;\r\n\r\n props.onTaskDocumentUpdated(taskCopy, documentAdded);\r\n }\r\n\r\n const { onTrigger: getTaskDocuments } = useAsyncFunctionIsLoading(async () => {\r\n if (!props.task.isNew && props.task.taskId) {\r\n const dataReadService = new DataReadService();\r\n\r\n const response = await dataReadService.GetTaskDocuments(props.task.taskId);\r\n if (response.status) {\r\n props.setTaskDocuments(response.data)\r\n } else {\r\n const errors = [errorGettingTaskDocumentsText, ...response.errorMessages];\r\n Utils.enqueueMultiLineSnackbar(errors, enqueueSnackbar, { variant: SnackbarVariantTypes.Error });\r\n }\r\n }\r\n }, props.onLoadingStatusChanged)\r\n\r\n\r\n const { onTrigger: handleAddTaskDocument, loading: creatingTaskDocuments } = useAsyncFunctionIsLoading(async (uploadedFiles: IContentHierarchy[]) => {\r\n let contentHierarchies = uploadedFiles.filter(f => !props.taskDocuments.some(td => td.documentId === f.id));\r\n\r\n const taskDocumentsToAdd = contentHierarchies.map((contentHierarchy) => {\r\n const taskDocumentToAdd: ITaskDocument = {\r\n documentId: contentHierarchy.id,\r\n taskId: props.task.taskId,\r\n folderId: contentHierarchy.parentId,\r\n fileName: contentHierarchy.name,\r\n validFrom: new Date(),\r\n fileExtension: contentHierarchy.fileExtension,\r\n displayName: contentHierarchy.displayName,\r\n onMultipleTasks: false,\r\n isPrivate: contentHierarchy.isPrivate,\r\n expirationDate: new Date(),\r\n }\r\n return taskDocumentToAdd;\r\n })\r\n\r\n let taskDocumentsCopy = [...props.taskDocuments];\r\n if (taskDocumentsToAdd.length > 0) {\r\n\r\n const dataWriteService = new DataWriteService();\r\n const result = await dataWriteService.CreateTaskDocument(taskDocumentsToAdd);\r\n\r\n if (result.status) {\r\n\r\n taskDocumentsToAdd.forEach((taskDocumentToAdd) => {\r\n const responseTaskDocument = result.response?.data.find((td: ITaskDocument) => td.displayName === taskDocumentToAdd.displayName)\r\n\r\n taskDocumentsCopy.push({\r\n ...taskDocumentToAdd,\r\n onMultipleTasks: responseTaskDocument.onMultipleTasks,\r\n validFrom: responseTaskDocument.validFrom\r\n })\r\n });\r\n\r\n const successMessage = props.task.isRestricted ? restrictedRequestAttachment : successfullyAttachedFilesText;\r\n enqueueSnackbar(successMessage, { variant: successSeverity });\r\n }\r\n else {\r\n const errors = [\"Failed to attach file to request.\", ...result.errorMessages];\r\n Utils.enqueueMultiLineSnackbar(errors, enqueueSnackbar, { variant: SnackbarVariantTypes.Error });\r\n }\r\n }\r\n\r\n onUpdateTaskDocuments(taskDocumentsCopy, true);\r\n });\r\n\r\n const onAttachmentsCreated = (result: ITaskDocument[]) => {\r\n onUpdateTaskDocuments([...props.taskDocuments, ...result], true);\r\n }\r\n\r\n const handleRemoveTaskDocument = async (taskDocument: ITaskDocument) => {\r\n setRemoveConfirmDialogIsOpen(false);\r\n await removeTaskDocument(taskDocument);\r\n }\r\n\r\n const handleDeleteTaskDocument = async (taskDocument: ITaskDocument) => {\r\n setDeleteConfirmDialogIsOpen(false);\r\n await deleteTaskDocument(taskDocument);\r\n }\r\n\r\n const handleDownloadDocument = async (id: string, name: string) => {\r\n const dataReadService = new DataReadService();\r\n return await dataReadService.DownloadDocument(id).then((response) => {\r\n if (response.status) {\r\n //@ts-ignore createObjectURL expects Blob or MediaSource object.\r\n //The api returns a BlobPart(superset that contains Blob) but IPlatformApiGetResult casts it to a BlobPart[]\r\n let url = window.URL.createObjectURL(response.data);\r\n saveAs(url, name);\r\n } else {\r\n const errors = [DownloadFileErrorText, ...response.errorMessages];\r\n Utils.enqueueMultiLineSnackbar(errors, enqueueSnackbar, { variant: SnackbarVariantTypes.Error });\r\n }\r\n })\r\n }\r\n\r\n const handleUploadNewVersionClick = (taskDocument: ITaskDocument) => {\r\n setFileUploadDialogIsOpen(true);\r\n }\r\n\r\n const handleFileUploadDialogClose = () => {\r\n setFileUploadDialogIsOpen(false);\r\n }\r\n\r\n const handleNewVersionUploaded = (files: IContentHierarchy[]) => {\r\n if (files.length === 1) {\r\n const file = files[0];\r\n var doc = props.taskDocuments.find(t => t.documentId == file.id);\r\n if (doc) {\r\n doc.validFrom = file.updatedDateTime ? file.updatedDateTime : new Date();\r\n doc.displayName = file.name + \".\" + file.fileExtension;\r\n doc.fileName = file.name;\r\n props.setTaskDocuments([...props.taskDocuments]);\r\n\r\n if (attachmentsGridApi) {\r\n attachmentsGridApi.setRowData(props.taskDocuments);\r\n }\r\n }\r\n }\r\n }\r\n\r\n const removeTaskDocument = async (taskDocument: ITaskDocument) => {\r\n if (taskDocument.documentId && props.task) {\r\n const dataWriteService = new DataWriteService();\r\n const model: IDeleteTaskDocumentDto = { TaskId: taskDocument.taskId!, DocumentId: taskDocument.documentId };\r\n const result = await dataWriteService.DeleteTaskDocument(model);\r\n if (result.status) {\r\n var doc = props.taskDocuments.find(t => t.documentId == taskDocument.documentId);\r\n if (doc) {\r\n const filteredDocs = props.taskDocuments.filter((t: any) =>\r\n t.documentId !== taskDocument.documentId\r\n );\r\n onUpdateTaskDocuments(filteredDocs, false);\r\n }\r\n\r\n } else {\r\n const errors = [\"Failed to delete attachment.\", ...result.errorMessages];\r\n Utils.enqueueMultiLineSnackbar(errors, enqueueSnackbar, { variant: SnackbarVariantTypes.Error });\r\n }\r\n }\r\n }\r\n\r\n const deleteTaskDocument = async (taskDocument: ITaskDocument) => {\r\n if (taskDocument.documentId && props.task) {\r\n const dataWriteService = new DataWriteService();\r\n const result = await dataWriteService.DeleteDocument(taskDocument.documentId);\r\n if (result.status) {\r\n var doc = props.taskDocuments.find(t => t.documentId == taskDocument.documentId);\r\n if (doc) {\r\n const filteredDocs = props.taskDocuments.filter((t: any) =>\r\n t.documentId !== taskDocument.documentId\r\n );\r\n onUpdateTaskDocuments(filteredDocs, false);\r\n }\r\n\r\n }\r\n else {\r\n enqueueSnackbar(\"Failed to delete attachment.\", { variant: SnackbarVariantTypes.Error });\r\n }\r\n }\r\n }\r\n\r\n const handleGridCellValueChanged = async (e: any) => {\r\n if (props.task) {\r\n var contentHeirarchy: IContentHierarchy = {\r\n id: e.data.documentId,\r\n name: e.data.fileName,\r\n hierarchyTypeId: HierarchyType.File.id,\r\n hierarchyTypeDescription: \"\",\r\n clientId: props.task.clientId || \"\",\r\n clientName: props.task.clientName || \"\",\r\n engagementId: props.task.engagementId || \"\",\r\n engagementName: props.task.engagementName || \"\",\r\n fileSize: 0,\r\n fileExtension: \"\",\r\n displayName: \"\",\r\n isPrivate: false,\r\n expirationDate: new Date(Date.now()),\r\n isRestrictedDocument: false,\r\n };\r\n\r\n const dataWriteService = new DataWriteService();\r\n\r\n var result = await dataWriteService.UpdateDocument(contentHeirarchy);\r\n\r\n if (result.status) {\r\n var doc = props.taskDocuments.find(t => t.documentId == e.data.documentId);\r\n if (doc) {\r\n doc.displayName = e.data.fileName + \".\" + e.data.fileExtension;\r\n doc.fileName = e.data.fileName;\r\n props.setTaskDocuments([...props.taskDocuments]);\r\n\r\n if (attachmentsGridApi) {\r\n attachmentsGridApi.setRowData(props.taskDocuments);\r\n }\r\n }\r\n } else {\r\n var doc = props.taskDocuments.find(t => t.documentId == e.data.documentId);\r\n if (doc) {\r\n doc.fileName = e.data.displayName.split(\".\")[0];\r\n if (attachmentsGridApi) {\r\n attachmentsGridApi.setRowData(props.taskDocuments);\r\n }\r\n }\r\n\r\n const errors = [\"Failed to update attachment.\", ...result.errorMessages];\r\n Utils.enqueueMultiLineSnackbar(errors, enqueueSnackbar, { variant: SnackbarVariantTypes.Error });\r\n }\r\n }\r\n }\r\n\r\n const getContextMenuItems = (params: any) => {\r\n\r\n if (params.node === null) {\r\n return;\r\n }\r\n\r\n const taskDocument: ITaskDocument = params.node.data;\r\n\r\n let result: any = [\r\n {\r\n name: \"Delete\",\r\n action: () => {\r\n setSeletectedTaskDocument(taskDocument);\r\n handleDeleteClick();\r\n }\r\n },\r\n {\r\n name: \"File Details\",\r\n action: () => {\r\n history.push('/document-management/' + taskDocument.documentId);\r\n }\r\n },\r\n props.task.isRestricted ? null : {\r\n name: \"Remove Attachment\",\r\n action: () => {\r\n setSeletectedTaskDocument(taskDocument);\r\n handleRemoveClick();\r\n }\r\n },\r\n {\r\n name: \"Rename\",\r\n action: () => {\r\n setSeletectedTaskDocument(taskDocument);\r\n var startEditingParams = {\r\n rowIndex: params.node.rowIndex,\r\n colKey: \"fileName\"\r\n };\r\n params.api.startEditingCell(startEditingParams);\r\n }\r\n },\r\n {\r\n name: \"Upload New Version\",\r\n action: () => {\r\n setSeletectedTaskDocument(taskDocument);\r\n handleUploadNewVersionClick(taskDocument);\r\n }\r\n },\r\n ];\r\n\r\n return result.filter(Boolean);\r\n };\r\n\r\n const uploadDisabled = (): boolean => {\r\n return (!props.task.allowMultipleAttachments && props.taskDocuments.length > 0)\r\n || props.taskIsNew\r\n || props.disabled;\r\n }\r\n\r\n const handleFullScreenClick = () => {\r\n setAttachmentDialogIsOpen(true);\r\n }\r\n\r\n const handleAttachmentsDialogClose = () => {\r\n setAttachmentDialogIsOpen(false);\r\n }\r\n\r\n const attachmentButtonProps = {\r\n addTaskDocumentFileUploadDialogIsOpen: addTaskDocumentFileUploadDialogIsOpen,\r\n setAddTaskDocumentFileUploadDialogIsOpen: setAddTaskDocumentFileUploadDialogIsOpen,\r\n className: classes.attachmentButtonDialog,\r\n clientName: props.clientName || \"\",\r\n engagementName: props.engagementName || \"\",\r\n uploadFolderId: props.uploadFolderId,\r\n onAddTaskDocuments: handleAddTaskDocument,\r\n disabled: uploadDisabled(),\r\n documentCount: props.taskDocuments.length,\r\n allowMultipleAttachments: props.allowMultipleAttachments,\r\n task: props.task,\r\n onAttachmentsUploaded: onAttachmentsCreated,\r\n }\r\n\r\n const getNoRowsOverlayComponent = (params: any) => {\r\n return params.isRestricted\r\n ? restrictedRequestInfoText\r\n : unrestrictedFilesWarningMessage\r\n }\r\n\r\n const attachmentDetails =\r\n
\r\n row.data.documentId}\r\n components={components}\r\n onCellValueChanged={handleGridCellValueChanged}\r\n editType=\"\"\r\n suppressClickEdit={true}\r\n getContextMenuItems={getContextMenuItems}\r\n onCellClicked={(params: any) => {\r\n if (params.column.colDef.field === '...') {\r\n params.api.contextMenuFactory.showMenu(params.node, params.column, params.value, params.event)\r\n }\r\n }}\r\n onCellContextMenu={(params: any) => {\r\n params.api.contextMenuFactory.hideActiveMenu()\r\n }}\r\n noRowsOverlayComponent={getNoRowsOverlayComponent}\r\n noRowsOverlayComponentParams={{ isRestricted: props.task.isRestricted }}\r\n stopEditingWhenCellsLoseFocus={true}\r\n defaultColDef={{\r\n editable: false,\r\n resizable: true,\r\n sortable: true,\r\n filter: true,\r\n floatingFilter: false,\r\n menuTabs: ['generalMenuTab', 'filterMenuTab']\r\n }}\r\n >\r\n {\r\n const docId = params.node.data.documentId;\r\n const name = params.data.displayName;\r\n return handleDownloadDocument(docId, params.node.data.displayName)}\r\n variant='link'\r\n buttonText={name}\r\n />\r\n }\r\n }\r\n editable={!props.disabled}\r\n />\r\n {\r\n return LocalDateTimeString(params.value, false);\r\n }}\r\n editable={false}\r\n cellRenderer={(params: ICellRendererParams) => {\r\n return <>\r\n {LocalDateTimeString(params.data.validFrom, false)}\r\n \r\n }}\r\n />\r\n }\r\n width={50}\r\n cellRenderer=\"privateFileCellRenderer\"\r\n editable={false}\r\n />\r\n \r\n \r\n
\r\n\r\n return (\r\n <>\r\n \r\n \r\n {selectedTaskDocument?.onMultipleTasks ? DeleteDocumentMultipleTasksWarningText : DeleteDocumentWarningText}}\r\n />\r\n {`This will remove the attachment from the request but not delete it from the Documents Library. Do you want to proceed?`}}\r\n />\r\n
\r\n {attachmentDialogIsOpen ?\r\n \r\n \r\n Attachments - {props.task.taskNumber} - {props.task.title}\r\n \r\n \r\n \r\n {attachmentDetails}\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n :\r\n \r\n { setIsAccordionExpanded(expanded) }}\r\n disabled={props.disabled || uploadDialogIsOpen || deleteConfirmDialogIsOpen || removeConfirmDialogIsOpen}\r\n >\r\n }\r\n aria-controls=\"AttachmentsGrid-content\"\r\n id=\"AttachmentsGrid-header\"\r\n className={classes.summary}\r\n >\r\n
\r\n \r\n Attachments \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n {attachmentDetails}\r\n \r\n \r\n \r\n }\r\n
\r\n \r\n );\r\n};\r\n\r\nexport default AttachmentsGrid;\r\n","import React from 'react';\r\nimport Button from '@material-ui/core/Button';\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport IConfirmDialogProps from './IConfirmDialogProps'\r\nimport MADialogTitle from '../MADialogTitle/MADialogTitle'\r\n\r\nexport const ConfirmDialog = (props: IConfirmDialogProps): JSX.Element => {\r\n const { isOpen, title, children, confirmButtonText = \"Yes\", confirmWithOptionsButtonText = \"Yes (with Options)\", closeButtonText = \"No\" } = props;\r\n\r\n return (\r\n \r\n \r\n {title}\r\n \r\n \r\n {children}\r\n \r\n \r\n \r\n {props.onConfirmWithOptions &&\r\n \r\n }\r\n \r\n \r\n \r\n )\r\n}","import { Location } from \"history\";\r\nimport React, { useEffect, useState } from \"react\";\r\nimport { Prompt } from \"react-router-dom\";\r\nimport { ConfirmDialog } from \"./ConfirmDialog\";\r\nimport { Typography } from '@material-ui/core';\r\nimport IRouteLeavingGuardProps from './IRouteLeavingGuardProps';\r\n\r\nconst RouteLeavingGuard = ({when, navigate, dialogTitle, dialogConfirmButtonText, dialogCloseButtonText, dialogBodyText, children}: IRouteLeavingGuardProps) => {\r\n const [modalVisible, setModalVisible] = useState(false);\r\n const [lastLocation, setLastLocation] = useState(null);\r\n const [confirmedNavigation, setConfirmedNavigation] = useState(false);\r\n const closeModal = () => {\r\n setModalVisible(false);\r\n };\r\n\r\n useEffect(() => {\r\n // Route leaving guard for browser buttons(back, forward, refresh)\r\n if(when){\r\n window.onbeforeunload = (e: BeforeUnloadEvent) => {\r\n // Show the prompt\r\n e.preventDefault(); // If you prevent default behavior in Mozilla Firefox prompt will always be shown\r\n // Chrome requires returnValue to be set\r\n e.returnValue = '';\r\n }\r\n } else {\r\n // Otherwise show no prompt\r\n window.onbeforeunload = null;\r\n }\r\n\r\n // Returned function will be called on component un-mount\r\n return () => {\r\n window.onbeforeunload = null;\r\n }\r\n }, [when])\r\n\r\n const handleBlockedNavigation = (nextLocation: Location): boolean => {\r\n if (!confirmedNavigation) {\r\n setModalVisible(true);\r\n setLastLocation(nextLocation);\r\n return false;\r\n }\r\n return true;\r\n };\r\n\r\n const handleConfirmNavigationClick = () => {\r\n setModalVisible(false);\r\n setConfirmedNavigation(true);\r\n }; \r\n\r\n useEffect(() => {\r\n if (confirmedNavigation && lastLocation) {\r\n // Navigate to the previous blocked location with your navigate function\r\n navigate(lastLocation.pathname);\r\n }\r\n }, [confirmedNavigation, lastLocation]);\r\n\r\n const _dialogBodyText = dialogBodyText || \"You have unsaved changes. Do you want to leave page and discard changes?\"\r\n const dialogChildren = (<>{_dialogBodyText}{children && children})\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n );\r\n};\r\nexport default RouteLeavingGuard;","import { makeStyles, CircularProgress } from \"@material-ui/core\";\r\nimport React from \"react\";\r\nimport ICustomDropzoneProps from \"./ICustomDropzoneProps\";\r\nimport \"./CustomDropzone.css\";\r\nimport { DropzoneArea } from \"material-ui-dropzone\";\r\nimport { validateFiles } from \"../../Validators/FileValidators\";\r\nimport { useSnackbar } from \"notistack\";\r\nimport { SnackbarVariantTypes } from \"../../helpers/enums/enums\";\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n dropzoneContainer: {\r\n position: \"relative\",\r\n height: \"100%\"\r\n },\r\n dropzone: {\r\n position: \"absolute\",\r\n width: \"100%\",\r\n height: \"100%\",\r\n top: 0,\r\n left: 0,\r\n pointerEvents: \"none\",\r\n borderRadius: \"3px\",\r\n },\r\n hidden: {\r\n display: \"none !important\",\r\n },\r\n loadingIndicator: {\r\n position: \"absolute\",\r\n width: \"100%\",\r\n height: \"100%\",\r\n top: 0,\r\n left: 0,\r\n borderRadius: \"3px\",\r\n display: \"flex\",\r\n justifyContent: \"center\",\r\n alignItems: \"center\",\r\n zIndex: 999,\r\n backgroundColor: \"#fff\",\r\n opacity: 0.75,\r\n },\r\n}));\r\n\r\nexport const CustomDropzone = (props: ICustomDropzoneProps): JSX.Element => {\r\n const classes = useStyles();\r\n const { enqueueSnackbar } = useSnackbar();\r\n\r\n const initialDropzoneClass = classes.dropzone;\r\n const [dropzoneClass, setDropzoneClass] = React.useState(initialDropzoneClass);\r\n const [isLoading, setIsLoading] = React.useState(!!props?.loading);\r\n\r\n const isLoadingControlled = props?.loading !== undefined;\r\n\r\n React.useEffect(() => {\r\n isLoadingControlled && setIsLoading(props.loading!);\r\n }, [props.loading]);\r\n\r\n\r\n React.useEffect(() => {\r\n if (props.fileUploadDialogIsOpen === false) {\r\n setDropzoneClass(initialDropzoneClass);\r\n setIsLoading(false);\r\n }\r\n }, [props.fileUploadDialogIsOpen]);\r\n\r\n const handleDragEnter = (event: any): void => {\r\n // verify that items are files (prevents UI from displaying other things as droppable)\r\n // if we want to use this component more generically in the future add a prop for supported item types\r\n const dragItems = Object.values(event.dataTransfer?.items);\r\n let itemsAreDroppable = dragItems && true;\r\n dragItems?.forEach((item: any) => {\r\n if (item.kind !== 'file') {\r\n itemsAreDroppable = false;\r\n }\r\n });\r\n if (itemsAreDroppable) {\r\n setDropzoneClass(`${classes.dropzone} MuiDropzoneArea-active`);\r\n }\r\n }\r\n\r\n const handleDragLeave = (event: any): void => {\r\n event.preventDefault();\r\n setDropzoneClass(initialDropzoneClass);\r\n }\r\n\r\n const finishedLoadingCallback = (): void => {\r\n !isLoadingControlled && setIsLoading(false);\r\n }\r\n\r\n const handleDrop = (event: any): void => {\r\n event.preventDefault();\r\n !isLoadingControlled && setIsLoading(true);\r\n if (event.dataTransfer.files) {\r\n var fileList: FileList = event.dataTransfer.files;\r\n const { fileSetSizeValidation, validFiles, invalidFiles } = validateFiles(Array.from(fileList));\r\n const doUpload = fileSetSizeValidation.isValid && validFiles.length;\r\n if (doUpload) {\r\n props.handleDrop(validFiles, finishedLoadingCallback);\r\n }\r\n else if (fileSetSizeValidation.isNotValid) {\r\n enqueueSnackbar(fileSetSizeValidation.error, { variant: SnackbarVariantTypes.Error });\r\n finishedLoadingCallback();\r\n }\r\n if (invalidFiles.length) {\r\n invalidFiles.forEach(invalidFile => {\r\n enqueueSnackbar(invalidFile.validation.error, { variant: SnackbarVariantTypes.Error });\r\n })\r\n !doUpload && finishedLoadingCallback();\r\n }\r\n }\r\n setDropzoneClass(initialDropzoneClass);\r\n }\r\n\r\n return
\r\n {isLoading &&\r\n
\r\n \r\n
\r\n }\r\n
\r\n {props.children}\r\n {/* this seems bad, but needed to use MuiDropzoneArea-active style, also seems\r\n to enable some other things that are required for dropping to work correctly */}\r\n \r\n
\r\n}","import React from \"react\";\r\n\r\nexport const useCountdown = (initialTime: number, active: boolean) => {\r\n const [countdown, setCountdown] = React.useState(initialTime);\r\n const [isCounting, setIsCounting] = React.useState(false);\r\n\r\n React.useEffect(() => {\r\n if (active && countdown !== 0) {\r\n setIsCounting(true);\r\n\r\n const timerId = setTimeout(() => {\r\n setCountdown(prev => prev - 1);\r\n }, 1000)\r\n\r\n return () => clearTimeout(timerId);\r\n }\r\n if (countdown === 0 || !active) {\r\n setIsCounting(false);\r\n }\r\n }, [countdown, initialTime, active])\r\n\r\n React.useEffect(() => {\r\n setCountdown(initialTime);\r\n }, [active])\r\n\r\n return { countdown, isCounting };\r\n}\r\n","import React from 'react'\r\nimport IConfirmDialogProps from '../../ConfirmDialog/IConfirmDialogProps'\r\nimport { ConfirmDialog } from '../../ConfirmDialog/ConfirmDialog'\r\nimport { Typography } from '@material-ui/core';\r\nimport { useCountdown } from '../../../hooks/useCountdown';\r\n\r\n\r\ninterface Props extends IConfirmDialogProps {\r\n useCountdown?: boolean;\r\n secondConfirmationText?: string;\r\n}\r\n\r\nconst secondConfirmationText = 'This action is irreversible. Are you sure that you want to continue?';\r\n\r\nexport default function DoubleConfirmDialog(props: Props) {\r\n const [confirmed, setConfirmed] = React.useState(false);\r\n const { countdown, isCounting: awaitingTimer } = useCountdown(3, confirmed);\r\n\r\n const onConfirm = () => {\r\n if (confirmed) {\r\n props.onConfirm();\r\n }\r\n else {\r\n setConfirmed(true);\r\n }\r\n }\r\n\r\n let confirmButtonText = confirmed ? 'I\\'m sure' : 'Yes';\r\n confirmButtonText = (props.useCountdown && awaitingTimer) ? `${countdown}` : confirmButtonText;\r\n\r\n return \r\n {props.children}\r\n {confirmed && {props.secondConfirmationText || secondConfirmationText}}\r\n \r\n}\r\n","import React from 'react'\r\nimport DoubleConfirmDialog from '../common/DoubleConfirmDialog/DoubleConfirmDialog'\r\nimport { Box, Typography } from '@material-ui/core'\r\nimport DataWriteService from '../../services/DataWriteService';\r\nimport ITask from '../../interfaces/ITask';\r\nimport { useSnackbar } from 'notistack';\r\nimport { SnackbarVariantTypes } from '../../helpers/enums/enums';\r\nimport useAsyncFunctionIsLoading from '../../hooks/useIsLoadingAsync';\r\nimport SpinnerBackdrop from '../common/SpinnerBackdrop';\r\n\r\ninterface Props {\r\n isOpen: boolean;\r\n tasks: ITask[];\r\n onDelete: () => void;\r\n onClose: () => void;\r\n}\r\n\r\nexport default function DeleteTasksConfirmDialog(props: Props) {\r\n const { enqueueSnackbar } = useSnackbar();\r\n\r\n const restrictedTasksSelected = props.tasks.some(t => t.isRestricted);\r\n\r\n const deleteTasks = async () => {\r\n const dataWriteService = new DataWriteService();\r\n const tasks: string[] = props.tasks?.map(t => t.taskId) as string[] || [];\r\n\r\n const response = await dataWriteService.PermanentlyDeleteTasks(tasks);\r\n\r\n if (response.status) {\r\n props.onDelete();\r\n enqueueSnackbar(\"Request(s) deleted successfully.\", { variant: SnackbarVariantTypes.Success });\r\n props.onClose();\r\n }\r\n else {\r\n enqueueSnackbar([...response.errorMessages], { variant: SnackbarVariantTypes.Error });\r\n }\r\n }\r\n\r\n const { onTrigger: onConfirm, loading } = useAsyncFunctionIsLoading(deleteTasks);\r\n\r\n return (\r\n \r\n \r\n Are you sure you would like to delete the selected request(s)?\r\n {\r\n restrictedTasksSelected && \r\n The attachments for all selected Restricted Requests will be permanently deleted if you proceed.\r\n \r\n }\r\n \r\n )\r\n}\r\n","import { Button, DialogActions, makeStyles, Paper, Popper, Typography } from '@material-ui/core';\r\nimport * as React from 'react';\r\nimport useIsLoadingAsync from '../../hooks/useIsLoadingAsync';\r\nimport SpinnerBackdrop from '../common/SpinnerBackdrop';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n popper: {\r\n zIndex: 1200,\r\n \"& .MuiPaper-root\": {\r\n padding: '16px 12px 6px 12px',\r\n },\r\n \"& .MuiDialogActions-root\": {\r\n padding: '8px 6px 6px',\r\n },\r\n }\r\n}))\r\n\r\nexport interface IConfirmationDialogPopperProps {\r\n anchorEl: HTMLButtonElement | null;\r\n popperText: string;\r\n onConfirmAsync: () => Promise;\r\n onCancel: React.MouseEventHandler;\r\n confirmDisabled: boolean;\r\n}\r\n\r\nconst ConfirmationDialogPopper = (props: IConfirmationDialogPopperProps) => {\r\n const {anchorEl, popperText, onCancel, confirmDisabled} = props;\r\n const classes = useStyles();\r\n const {onTrigger: onClick, loading} = useIsLoadingAsync(props.onConfirmAsync);\r\n \r\n return \r\n \r\n \r\n \r\n {popperText}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n}\r\n\r\nexport default ConfirmationDialogPopper","import React from 'react';\r\nimport saveAs from 'file-saver';\r\nimport { DateTime } from 'luxon';\r\nimport { useSnackbar } from 'notistack';\r\nimport { SnackbarVariantTypes } from '../../helpers/enums/enums';\r\nimport DataReadService from '../../services/DataReadService';\r\nimport { Utils } from '../../utilities/utils';\r\nimport ConfirmationDialogPopper, { IConfirmationDialogPopperProps } from '../ConfirmationDialogPopper/ConfirmationDialogPopper';\r\nimport ITask from '../../interfaces/ITask';\r\n\r\ninterface DownloadProps {\r\n tasks: ITask[];\r\n onCompleteRequest: Function;\r\n}\r\n \r\nexport type DownloadTaskDocumentPopperProps = DownloadProps & Omit;\r\n\r\nconst DownloadTaskDocumentsPopper: React.FunctionComponent = (props) => {\r\n const { enqueueSnackbar } = useSnackbar();\r\n\r\n const downloadTaskDocuments = async () => {\r\n const taskIds = props.tasks.map(task => task.taskId as string);\r\n const dataReadService = new DataReadService();\r\n return await dataReadService.DownloadDocumentsByTaskIdList(taskIds).then((response) => {\r\n if (response.status) {\r\n //@ts-ignore createObjectURL expects Blob or MediaSource object.\r\n //The api returns a BlobPart(superset that contains Blob) but IPlatformApiGetResult casts it to a BlobPart[]\r\n let url = window.URL.createObjectURL(response.data as Blob);\r\n saveAs(url, `MA_Portal_Documents_${DateTime.now().toFormat('yyyy_MM_dd')}.zip`);\r\n }\r\n else {\r\n if (response.timeoutOccured) {\r\n response.errorMessages = [\"The download failed due to time out. Please select fewer files and try again.\"];\r\n }\r\n Utils.enqueueMultiLineSnackbar([...response.errorMessages], enqueueSnackbar, { variant: SnackbarVariantTypes.Error });\r\n }\r\n props.onCompleteRequest();\r\n })\r\n }\r\n\r\n return \r\n}\r\n \r\nexport default DownloadTaskDocumentsPopper;","import { Button, Tooltip } from '@material-ui/core';\r\nimport { GetApp } from '@material-ui/icons';\r\nimport * as React from 'react';\r\nimport DownloadTaskDocumentsPopper, { DownloadTaskDocumentPopperProps } from '../DownloadTaskDocumentsPopper/DownloadTaskDocumentsPopper';\r\n\r\n\r\ninterface DownloadTaskDocumentsButtonProps {\r\n disabled: boolean;\r\n className: string;\r\n onClick: Function;\r\n popperProps: Omit;\r\n}\r\n\r\nconst DownloadTaskDocumentsButton = (props: DownloadTaskDocumentsButtonProps) => {\r\n const { disabled, className, onClick, popperProps } = props;\r\n const [anchorEl, setAnchorEl] = React.useState(null);\r\n\r\n const onClickButton = (event: React.MouseEvent) => {\r\n anchorEl === null && onClick && onClick(event);\r\n setAnchorEl(event.currentTarget);\r\n }\r\n\r\n const onClickCancelPopper = (event: React.MouseEvent) => {\r\n setAnchorEl(null);\r\n popperProps.onCancel(event);\r\n }\r\n\r\n const onCompleteBulkDownload = () => {\r\n setAnchorEl(null);\r\n popperProps.onCompleteRequest();\r\n }\r\n\r\n return <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n}\r\n\r\n\r\nexport default DownloadTaskDocumentsButton;","import * as React from 'react';\nimport createSvgIcon from './utils/createSvgIcon';\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z\"\n}), 'Warning');","import { Tooltip, makeStyles } from '@material-ui/core'\r\nimport { Warning } from '@material-ui/icons'\r\nimport React from 'react'\r\nimport { DateTime } from 'luxon';\r\nimport { LocalDateTimeString } from '../../helpers/DateHelpers';\r\nimport { useSelector } from 'react-redux';\r\nimport ICurrentUser from '../../interfaces/ICurrentUser';\r\n\r\ninterface Props {\r\n date: Date\r\n}\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n icon: {\r\n color: theme.palette.mossadams.orange,\r\n height: '22px',\r\n width: 'auto',\r\n verticalAlign: 'middle',\r\n },\r\n}));\r\n\r\nexport default function ExpirationWarningIcon({date}: Props) {\r\n const classes = useStyles();\r\n const currentUser = useSelector((state: any) => state.currentUser as ICurrentUser);\r\n\r\n if (!currentUser.isMossAdamsStaff) {\r\n return null;\r\n }\r\n\r\n const tooltip = `Expires on ${LocalDateTimeString(date, false)}`;\r\n\r\n const isDocumentExpiringSoon = () => {\r\n return DateTime.fromJSDate(date).startOf('day') <= DateTime.now().plus({days: 7}).endOf('day');\r\n }\r\n\r\n return (isDocumentExpiringSoon() ?\r\n \r\n \r\n \r\n : null\r\n )\r\n}\r\n\r\n","import React, { useState, useMemo, } from \"react\";\r\nimport { IDocumentTreeProps } from \"./IDocumentTreeProps\";\r\nimport { makeStyles } from \"@material-ui/core/styles\";\r\nimport { Typography, Paper, FormControl, TextField } from \"@material-ui/core\";\r\nimport SearchIcon from '@material-ui/icons/Search';\r\nimport DescriptionIcon from '@material-ui/icons/Description';\r\nimport IContentHierarchy from \"../../interfaces/IContentHierarchy\";\r\nimport DataReadService from \"../../services/DataReadService\"\r\nimport IContentHierarchyGetDto from \"../../interfaces/IContentHierarchyGetDto\";\r\nimport FolderIcon from \"@material-ui/icons/Folder\";\r\nimport { HierarchyType } from \"../../helpers/enums/HierarchyType\";\r\nimport { AgGridColumn, AgGridReact } from '@ag-grid-community/react';\r\nimport { ICellRendererParams, ValueGetterParams, RowClassParams } from \"@ag-grid-community/core\";\r\nimport { GridApi, AllModules, SelectionChangedEvent, GridReadyEvent } from \"@ag-grid-enterprise/all-modules\";\r\nimport { agGridThemeOverride } from \"../../helpers/portalTheme\";\r\nimport { associatedTasksComparator } from \"../../helpers/Comparators\";\r\nimport { LocalDateTimeString } from \"../../helpers/DateHelpers\";\r\nimport { Utils } from \"../../utilities/utils\";\r\nimport { PrivateHierarchyCellRenderer } from \"../AgGridRenderers/PrivateHierarchyCellRenderer\";\r\nimport RestrictedIcon from \"../common/RestrictedIcon/RestrictedIcon\";\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n height: \"100%\",\r\n margin: 0,\r\n ...agGridThemeOverride\r\n },\r\n cellIcon: {\r\n verticalAlign: \"middle\",\r\n marginRight: \"10px\",\r\n color: theme.palette.primary.main,\r\n height: \"26px\",\r\n width: \"auto\"\r\n },\r\n pageTitle: {\r\n fontSize: \"2rem\"\r\n },\r\n documentsGridWrapper: {\r\n display: \"flex\",\r\n minHeight: \"400px\",\r\n },\r\n documentGrid: {\r\n height: \"100%\",\r\n '& .ag-cell-value': {\r\n flexGrow: '1',\r\n },\r\n '& .ag-group-value': {\r\n flexGrow: '1',\r\n },\r\n '&& .ag-checkbox-input': {\r\n width: '18px',\r\n height: '18px',\r\n verticalAlign: 'middle',\r\n accentColor: theme.palette.primary.main,\r\n },\r\n },\r\n clientRow: {\r\n \"&&.ag-row\": {\r\n backgroundColor: theme.palette.mossadams.darkGreen600,\r\n color: theme.palette.common.white,\r\n\r\n \"&& .ag-icon\": {\r\n color: theme.palette.common.white\r\n }\r\n }\r\n },\r\n engagementRow: {\r\n \"&&.ag-row\": {\r\n backgroundColor: theme.palette.mossadams.darkGreen400,\r\n color: theme.palette.common.white,\r\n\r\n \"&& .ag-icon\": {\r\n color: theme.palette.common.white\r\n },\r\n \"&& .MuiSvgIcon-root\": {\r\n color: theme.palette.common.white\r\n }\r\n }\r\n },\r\n folderRow: {\r\n \"&&.ag-row\": {\r\n backgroundColor: theme.palette.mossadams.darkGreen200,\r\n }\r\n },\r\n rightAlignedGridCell: {\r\n textAlign: \"right\"\r\n },\r\n searchBox: {\r\n width: \"100%\",\r\n display: \"flex\",\r\n flexDirection: \"row\",\r\n justifyContent: \"end\",\r\n alignItems: \"center\",\r\n padding: theme.spacing(4)\r\n },\r\n searchIcon: {\r\n marginTop: theme.spacing(8),\r\n }\r\n}));\r\n\r\nconst DocumentTree = (props: IDocumentTreeProps): JSX.Element => {\r\n const classes = useStyles();\r\n const [hierarchy, setHierarchy] = useState();\r\n const [gridApi, setGridApi] = React.useState();\r\n const [searchField, setSearchField] = React.useState(\"\");\r\n\r\n const rowClassRules = {\r\n [classes.clientRow]: (rowClassParams: RowClassParams) => {\r\n if (rowClassParams.data.hierarchyTypeDescription === HierarchyType.Client.string) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n },\r\n [classes.engagementRow]: (rowClassParams: RowClassParams) => {\r\n if (rowClassParams.data.hierarchyTypeDescription === HierarchyType.Engagement.string) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n },\r\n [classes.folderRow]: (rowClassParams: RowClassParams) => {\r\n if (rowClassParams.data.hierarchyTypeDescription === HierarchyType.CustomFolder.string\r\n || rowClassParams.data.hierarchyTypeDescription === HierarchyType.SystemFolder.string\r\n || rowClassParams.data.hierarchyTypeDescription === HierarchyType.SecureFolder.string\r\n || rowClassParams.data.hierarchyTypeDescription === HierarchyType.RestrictedFolder.string) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n const onDocumentsGridReady = (params: GridReadyEvent) => {\r\n setGridApi(params.api);\r\n params.api.sizeColumnsToFit();\r\n }\r\n\r\n React.useEffect(() => {\r\n if (gridApi) {\r\n gridApi.setQuickFilter(searchField);\r\n }\r\n }, [searchField]);\r\n\r\n const handleSelectionChanged = (event: SelectionChangedEvent) => {\r\n const selectedRows = event.api.getSelectedRows();\r\n\r\n if (selectedRows && selectedRows.length > 0) {\r\n props.handleFileSelect(selectedRows);\r\n }\r\n }\r\n\r\n function getIndentClass(params: any) {\r\n var indent = 0;\r\n var node = params.node;\r\n while (node && node.parent) {\r\n indent++;\r\n node = node.parent;\r\n }\r\n return 'indent-' + indent;\r\n }\r\n\r\n const hierarchyNameSort = (a: string, b: string, nodeA: any, nodeB: any, inverted: boolean = false) => {\r\n if (!nodeA || !nodeB) { return 0; }\r\n return ((nodeB.data.hierarchyTypeDescription === HierarchyType.File.string ? 0 : 1) -\r\n (nodeA.data.hierarchyTypeDescription === HierarchyType.File.string ? 0 : 1))\r\n || + (a.toLowerCase() > b.toLowerCase())\r\n || - (a.toLowerCase() < b.toLowerCase())\r\n }\r\n\r\n const TreeCellRenderer = (props: ICellRendererParams) => {\r\n const rowData: IContentHierarchy = props.data;\r\n\r\n switch (rowData.hierarchyTypeDescription) {\r\n case HierarchyType.Client.string:\r\n return (<>{rowData.displayName});\r\n case HierarchyType.Engagement.string:\r\n case HierarchyType.SystemFolder.string:\r\n case HierarchyType.CustomFolder.string:\r\n case HierarchyType.SecureFolder.string:\r\n case HierarchyType.RestrictedFolder.string:\r\n return
\r\n {rowData.displayName}\r\n
;\r\n case HierarchyType.File.string:\r\n return (\r\n <>\r\n {rowData.displayName}\r\n );\r\n }\r\n }\r\n\r\n const components = {\r\n treeCellRenderer: TreeCellRenderer,\r\n privateFileCellRenderer: PrivateHierarchyCellRenderer,\r\n }\r\n\r\n const getParentLoop = (id: string, path: string[], data: IContentHierarchy[]): any => {\r\n let p = data.filter(i => i.id == id)[0];\r\n if (p.parentId) {\r\n path.unshift(p.displayName);\r\n return getParentLoop(p.parentId, path, data)\r\n }\r\n else {\r\n path.unshift(p.displayName);\r\n }\r\n return path;\r\n }\r\n\r\n const buildPath = (data: IContentHierarchy[]) => {\r\n return data.map(i => {\r\n i.path = []\r\n if (i.parentId) {\r\n i.path.push(i.displayName);\r\n getParentLoop(i.parentId, i.path, data);\r\n }\r\n else {\r\n i.path.push(i.displayName)\r\n }\r\n return i;\r\n });\r\n }\r\n\r\n const isRowSelectable = useMemo(() => {\r\n return (params: any) => {\r\n return params.data.hierarchyTypeDescription === HierarchyType.File.string;\r\n };\r\n }, []);\r\n\r\n function lastUpdatedFormatter(params: ValueGetterParams) {\r\n return LocalDateTimeString(params.data.updatedDateTime, false);\r\n }\r\n\r\n React.useEffect(() => {\r\n // Build the tree.\r\n if (props.clientId) {\r\n const data: IContentHierarchyGetDto = {\r\n clientIds: [props.clientId],\r\n engagementIds: null,\r\n excludeEngagementId: props.engagementId,\r\n includeAllClientEngagements: true\r\n };\r\n\r\n if (props.chooseFromCurrentEngagement) {\r\n data.engagementIds = [props.engagementId];\r\n data.excludeEngagementId = null;\r\n }\r\n\r\n const dataReadService = new DataReadService();\r\n dataReadService.GetContentHierarchy(data).then((response) => {\r\n let data = buildPath(response.data);\r\n setHierarchy(data);\r\n });\r\n\r\n } else {\r\n setHierarchy(null);\r\n }\r\n }, [props.clientId, props.engagementId]);\r\n\r\n let body: any = Working...;\r\n if (!props.clientId) {\r\n body = A client ID must be specified.;\r\n }\r\n if (hierarchy) {\r\n body =\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n {\r\n setSearchField(e.target.value);\r\n }}>\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n row.data.id}\r\n getDataPath={(data: any) => { return data.path; }}\r\n modules={AllModules}\r\n groupDefaultExpanded={-1}\r\n isRowSelectable={isRowSelectable}\r\n headerHeight={25}\r\n\r\n autoGroupColumnDef={{\r\n headerName: 'Name',\r\n minWidth: 300,\r\n width: 405,\r\n flex: 1,\r\n cellClass: getIndentClass,\r\n colId: \"name\",\r\n initialSort: 'asc',\r\n suppressCellFlash: true,\r\n filter: \"agTextColumnFilter\",\r\n cellRendererParams: {\r\n suppressCount: true,\r\n checkbox: true,\r\n innerRenderer: \"treeCellRenderer\"\r\n },\r\n comparator: hierarchyNameSort,\r\n }}\r\n defaultColDef={{\r\n editable: false,\r\n sortable: true,\r\n filter: true,\r\n resizable: true,\r\n floatingFilter: true,\r\n }}\r\n >\r\n {\r\n const data: IContentHierarchy = params.data;\r\n const val = data.associatedTasks?.length\r\n ? data.associatedTasks.map(at => at.taskNumber).join(',')\r\n : data.hierarchyTypeDescription === HierarchyType.File.string ? 'Unfiled' : ''\r\n return val;\r\n }\r\n }\r\n />\r\n }\r\n cellRenderer=\"privateFileCellRenderer\"\r\n />\r\n \r\n {\r\n return LocalDateTimeString(params.value as Date, false);\r\n }}\r\n minWidth={180}\r\n filterParams={{\r\n comparator: (filterLocalDateAtMidnight: any, cellValue: Date) => {\r\n var cellDate = new Date(cellValue.getFullYear(), cellValue.getMonth(), cellValue.getDate())\r\n if (filterLocalDateAtMidnight.getTime() === cellDate.getTime()) {\r\n return 0;\r\n }\r\n if (cellDate < filterLocalDateAtMidnight) {\r\n return -1;\r\n }\r\n if (cellDate > filterLocalDateAtMidnight) {\r\n return 1;\r\n }\r\n return 0;\r\n },\r\n inRangeInclusive: true,\r\n defaultOption: 'inRange'\r\n }}\r\n />\r\n {\r\n return params.data.hierarchyTypeDescription == HierarchyType.File.string ? Utils.getFileSize(params.data.fileSize) : ''\r\n }}\r\n />\r\n \r\n
\r\n
\r\n }\r\n\r\n return (<>{body});\r\n\r\n};\r\n\r\nexport default DocumentTree","import React from \"react\";\r\nimport { Button, Dialog, DialogActions, DialogContent } from \"@material-ui/core\";\r\nimport IFileSelectDialogProps from \"./IFileSelectDialogProps\"\r\nimport MADialogTitle from \"../MADialogTitle/MADialogTitle\"\r\nimport DocumentTree from \"./DocumentTree\";\r\nimport IContentHierarchy from \"../../interfaces/IContentHierarchy\";\r\nimport IDocumentCopyModel from '../../interfaces/IDocumentCopyModel';\r\nimport DataWriteService from \"../../services/DataWriteService\";\r\nimport IPlatformApiPostResult from '../../interfaces/IPlatformApiPostResult';\r\nimport { VariantType } from 'notistack';\r\nimport { useSnackbar } from 'notistack';\r\nimport { makeStyles } from \"@material-ui/core/styles\";\r\nimport { validateFileName } from \"../../Validators/FileValidators\";\r\nimport { SnackbarVariantTypes } from \"../../helpers/enums/enums\";\r\nimport { Utils } from \"../../utilities/utils\";\r\n\r\nexport const errorAttachingFileText = 'There was an error attaching the file.';\r\nexport const errorAttachingDuplicateFileText = \"A file with this name already exists in this folder. Please choose a different name for the file.\";\r\nexport const errorSeverity: VariantType = 'error';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n dialogPaper: {\r\n height: \"70vh\",\r\n width: \"70vw\",\r\n minWidth: \"900px !important\",\r\n maxWidth: \"none\"\r\n },\r\n dialogActionsClass: {\r\n flexDirection: \"column\",\r\n },\r\n fileNameTextField: {\r\n [theme.breakpoints.up(\"xl\")]: {\r\n zoom: \"160%\"\r\n }\r\n }\r\n}));\r\n\r\nexport default function FileSelectDialog(props: IFileSelectDialogProps) {\r\n\r\n const { enqueueSnackbar } = useSnackbar();\r\n const [selectedFiles, setSelectedFiles] = React.useState([]);\r\n const [fileNameValidationMessage, setFileNameValidationMessage] = React.useState(\"\");\r\n const [fileName, setFileName] = React.useState(\"\");\r\n const [isFileNameValid, setIsFileNameValid] = React.useState(true);\r\n const classes = useStyles();\r\n\r\n React.useEffect(() => {\r\n const validation = validateFileName(fileName);\r\n setIsFileNameValid(validation.isValid);\r\n setFileNameValidationMessage(validation.error);\r\n }, [fileName]);\r\n\r\n const handleClose = () => {\r\n setSelectedFiles([]);\r\n setIsFileNameValid(true);\r\n props.onClose();\r\n }\r\n\r\n const handleFileSelect = (files: IContentHierarchy[]) => {\r\n setSelectedFiles(files);\r\n if (files.length == 1) {\r\n setFileName(files[0].name);\r\n }\r\n }\r\n\r\n const handleClick = async () => {\r\n if (props.chooseFromCurrentEngagement) {\r\n props.onSelect(selectedFiles);\r\n handleClose();\r\n return;\r\n }\r\n\r\n // Call the copy document api and get new content hierarchy record\r\n const model: IDocumentCopyModel = {\r\n folderId: props.folderId!,\r\n fileName: fileName.length ? fileName : selectedFiles[0]!.name,\r\n sourceFileId: selectedFiles[0]!.id\r\n }\r\n const service = new DataWriteService();\r\n let result: IPlatformApiPostResult;\r\n result = await service.CopyDocument(model);\r\n if (result.status) {\r\n props.onSelect([result.response?.data]);\r\n handleClose();\r\n } else {\r\n let errors = [errorAttachingFileText];\r\n result.errorMessages.forEach((errorMessage) => {\r\n if (errorMessage.includes(\"name already exists\")) {\r\n setIsFileNameValid(false);\r\n setFileNameValidationMessage(errorAttachingDuplicateFileText);\r\n errors.push(errorAttachingDuplicateFileText);\r\n } else {\r\n errors.push(errorMessage);\r\n }\r\n });\r\n Utils.enqueueMultiLineSnackbar(errors, enqueueSnackbar, { variant: SnackbarVariantTypes.Error });\r\n }\r\n }\r\n\r\n const handleDialogClick = (e: any) => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n {props.chooseFromCurrentEngagement ? \"Attach\" : \"Copy\"} existing file(s) to Request# {props.taskNumber} - {props.taskTitle}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n}\r\n","import * as React from 'react';\nimport createSvgIcon from './utils/createSvgIcon';\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z\"\n}), 'CloudUpload');","import * as React from 'react';\nimport createSvgIcon from './utils/createSvgIcon';\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z\"\n}), 'Description');","import { Chip, Typography, makeStyles } from '@material-ui/core';\r\nimport React from 'react'\r\nimport { CloudUpload, Description } from '@material-ui/icons';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n dropzoneClass: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n flexDirection: 'column',\r\n minHeight: \"150px\",\r\n maxHeight: \"350px\",\r\n overflowY: \"auto\",\r\n border: 'none',\r\n backgroundImage: \"url(\" + \"\\\"data:image/svg+xml,%3csvg width='100%' height='100%' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%' height='100%' fill='none' rx='4' ry='4' stroke='%23B7C2C2FF' stroke-width='4' stroke-dasharray='10 20' stroke-dashoffset='4' stroke-linecap='square'/%3e%3c/svg%3e\" + \"\\\");\",\r\n borderRadius: \"4px\",\r\n marginBottom: \"15px\",\r\n \"& .MuiChip-root\": {\r\n height: \"auto\",\r\n },\r\n \"& .MuiChip-label\": {\r\n whiteSpace: \"normal\",\r\n overflow: \"auto\",\r\n overflowWrap: \"anywhere\"\r\n },\r\n cursor: 'pointer',\r\n padding: theme.spacing(3),\r\n },\r\n droppingClass: {\r\n backgroundColor: theme.palette.mossadams.warmGray200,\r\n },\r\n dropzoneParagraphClass: {\r\n marginTop: '30px',\r\n font: `${theme.typography.body1}`\r\n },\r\n chipClass: {\r\n backgroundColor: theme.palette.primary.light,\r\n '& .MuiChip-deleteIcon': {\r\n color: theme.palette.primary.contrastText,\r\n '&:hover': {\r\n color: theme.palette.mossadams.warmGray400,\r\n }\r\n },\r\n },\r\n previewChipLabelClass: {\r\n color: 'black'\r\n },\r\n chipIconClass: {\r\n color: theme.palette.primary.contrastText,\r\n },\r\n iconClass: {\r\n color: 'black',\r\n fontSize: '3rem'\r\n },\r\n\r\n}));\r\n\r\n\r\nexport interface IDropzoneProps {\r\n onAdd: (files: File[]) => void;\r\n onRemove: (file: File) => void;\r\n files: File[];\r\n}\r\n\r\nexport default function FileDropzone(props: IDropzoneProps) {\r\n const classes = useStyles();\r\n const [inputKey, setInputKey] = React.useState(new Date());\r\n const [dropping, setDropping] = React.useState(false);\r\n\r\n const inputRef = React.useRef(null);\r\n\r\n const onDragLeave = (event: React.DragEvent) => {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n\r\n const targetElement = document.getElementById('file-dropzone');\r\n const relatedTarget = event.relatedTarget as Node;\r\n\r\n if (relatedTarget && targetElement?.contains(relatedTarget)) {\r\n return;\r\n }\r\n\r\n setDropping(false);\r\n }\r\n\r\n const onClick = () => {\r\n inputRef.current?.click();\r\n }\r\n\r\n const onChangeFiles = React.useCallback((event: React.ChangeEvent) => {\r\n if (event.target.files) {\r\n const files = Array.from(event.target.files);\r\n props.onAdd(files);\r\n setInputKey(new Date());\r\n }\r\n }, [props.files])\r\n\r\n const onDrop = React.useCallback((event: React.DragEvent) => {\r\n event.preventDefault();\r\n\r\n if (event.dataTransfer) {\r\n const files = Array.from(event.dataTransfer.files);\r\n props.onAdd(files);\r\n setInputKey(new Date());\r\n setDropping(false);\r\n }\r\n }, [props.files])\r\n\r\n const onDragOver = React.useCallback((event: React.DragEvent) => {\r\n event.preventDefault();\r\n setDropping(true);\r\n }, [props.files])\r\n\r\n const dropzoneText = `Drag and drop or click here`;\r\n return (\r\n <>\r\n \r\n \r\n {props.files.length\r\n ? props.files.map(\r\n file => props.onRemove(file)} />\r\n )\r\n :\r\n <>\r\n \r\n {dropzoneText}\r\n \r\n \r\n \r\n }\r\n \r\n \r\n )\r\n}\r\n\r\nconst File = (props: { file: File, onRemove: () => void }) => {\r\n const classes = useStyles();\r\n\r\n return
\r\n }\r\n label={props.file.name}\r\n onDelete={props.onRemove}\r\n />\r\n
\r\n}\r\n","import React from 'react'\r\nimport { useSnackbar } from 'notistack';\r\nimport { SnackbarVariantTypes } from '../../helpers/enums/enums';\r\nimport { validateUploadSize } from '../../Validators/FileValidators';\r\nimport FileDropzone, { IDropzoneProps } from '../common/FileDropzone/FileDropzone';\r\nimport { getFileExtensionFromFileName } from '../../helpers/FileHelpers';\r\nimport { useFileUploadContext } from '../../hooks/useFileUploadContext';\r\n\r\ninterface Props {\r\n fileLimit?: number;\r\n acceptedFileTypes?: string[];\r\n}\r\n\r\nexport const errorUploadingFileDuplicateText = 'A file has already been selected with that name.';\r\nexport const wrongFileExtensionText = 'Invalid file type. File type must match the existing file.';\r\n\r\nexport default function FileUploadDropzone(props: Props) {\r\n const { enqueueSnackbar } = useSnackbar();\r\n\r\n const context = useFileUploadContext();\r\n const { files, handleFileChange: onAdd, handleRemoveFile: onRemove } = context;\r\n\r\n const getFileSizes = (files: File[]) => {\r\n return files\r\n .map(file => file.size)\r\n .reduce((prev, cur) => prev + cur, 0);\r\n }\r\n\r\n const allFilesAreDistinct = (filesToAdd: File[]) => {\r\n const newFileNames = filesToAdd.map((file) => file.name);\r\n const existingFileNames = files.map((file) => file.name);\r\n const duplicateFileNames = newFileNames.filter((fileName) => existingFileNames?.includes(fileName));\r\n\r\n if (duplicateFileNames.length > 0) {\r\n enqueueSnackbar(errorUploadingFileDuplicateText, { variant: SnackbarVariantTypes.Error });\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n const allFilesAreValidTypes = (files: File[]) => {\r\n if (props.acceptedFileTypes) {\r\n const fileExtensions = files.map(file => getFileExtensionFromFileName(file.name));\r\n if (!fileExtensions.every(extension => props.acceptedFileTypes?.includes(extension))) {\r\n enqueueSnackbar(wrongFileExtensionText, { variant: SnackbarVariantTypes.Error });\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n const fileCountIsWithinLimits = (newFiles: File[]) => {\r\n const withinLimits = !props.fileLimit || (files.length + newFiles.length) <= props.fileLimit;\r\n\r\n if (!withinLimits) {\r\n enqueueSnackbar(`Unable to add more than ${props.fileLimit} file(s).`, { variant: SnackbarVariantTypes.Error });\r\n }\r\n return withinLimits;\r\n }\r\n\r\n const uploadSizeIsValid = (newFiles: File[]) => {\r\n const { isValid, error, } = validateUploadSize(getFileSizes([...files, ...newFiles]));\r\n if (!isValid) {\r\n enqueueSnackbar(error, { variant: SnackbarVariantTypes.Error });\r\n }\r\n\r\n return isValid;\r\n }\r\n\r\n const ValidateAndAddFiles = (newFiles: File[]) => {\r\n if (!allFilesAreDistinct(newFiles)\r\n || !allFilesAreValidTypes(newFiles)\r\n || !fileCountIsWithinLimits(newFiles)\r\n || !uploadSizeIsValid(newFiles)) {\r\n return;\r\n }\r\n\r\n onAdd([...files, ...newFiles]);\r\n }\r\n\r\n return (\r\n \r\n )\r\n}\r\n","import React from 'react';\r\nimport Button from '@material-ui/core/Button';\r\nimport TextField from '@material-ui/core/TextField';\r\nimport { Dialog, DialogActions, DialogContent } from '@material-ui/core';\r\nimport IFileUploadDialogProps from './IFileUploadDialogProps'\r\nimport IPlatformApiPostResult from '../../interfaces/IPlatformApiPostResult';\r\nimport { VariantType } from 'notistack';\r\nimport MADialogTitle from '../MADialogTitle/MADialogTitle'\r\nimport { makeStyles } from \"@material-ui/core/styles\";\r\nimport IContentHierarchy from '../../interfaces/IContentHierarchy';\r\nimport RestrictedFileUserAssociationDialogContent from '../RestrictedFileAssociationDialog/RestrictedFileUserAssociationDialogContent';\r\nimport { useSelector } from 'react-redux';\r\nimport ICurrentUser from '../../interfaces/ICurrentUser';\r\nimport FileUploadDropzone from './FileUploadDropzone';\r\nimport { createUploadParams, UploadParams } from '../../contexts/FileUploadContext/UploadParams';\r\nimport { useFileUploadContext } from '../../hooks/useFileUploadContext';\r\n\r\nexport const errorUploadingFileDuplicateText = 'File already selected.';\r\nexport const errorUploadingFileText = 'There was an error selecting the file.';\r\nexport const successfullyUploadedFileText = 'File uploaded successfully.';\r\nexport const noFileExtensionText = 'Invalid file type. A file type is required.';\r\nexport const restrictedFilenameCollision = \"A file with that name already exists. Restricted file names must be unique.\";\r\nexport const errorSeverity: VariantType = 'error';\r\nexport const successSeverity: VariantType = 'success';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n dropzoneClass: {\r\n minHeight: \"150px\",\r\n maxHeight: \"350px\",\r\n padding: theme.spacing(3),\r\n overflowY: \"auto\",\r\n border: 'none',\r\n backgroundImage: \"url(\" + \"\\\"data:image/svg+xml,%3csvg width='100%' height='100%' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%' height='100%' fill='none' rx='4' ry='4' stroke='%23B7C2C2FF' stroke-width='4' stroke-dasharray='10 20' stroke-dashoffset='4' stroke-linecap='square'/%3e%3c/svg%3e\" + \"\\\");\",\r\n borderRadius: \"4px\",\r\n marginBottom: \"15px\",\r\n \"& .MuiChip-root\": {\r\n height: \"auto\",\r\n },\r\n \"& .MuiChip-label\": {\r\n whiteSpace: \"normal\",\r\n overflow: \"auto\",\r\n overflowWrap: \"anywhere\"\r\n }\r\n },\r\n dropzoneParagraphClass: {\r\n marginTop: '30px'\r\n },\r\n singlePreviewGridContainerClass: {\r\n marginTop: '35px',\r\n placeContent: \"center\",\r\n maxWidth: '500px',\r\n marginLeft: '15px'\r\n },\r\n multiplePreviewGridContainerClass: {\r\n display: \"block\",\r\n textAlignLast: \"justify\",\r\n padding: \"15px\"\r\n },\r\n previewChipLabelClass: {\r\n color: 'black'\r\n },\r\n dialogContentClass: {\r\n \"& .MuiDropzoneArea-textContainer\": {\r\n display: 'none'\r\n }\r\n },\r\n backdrop: {\r\n zIndex: 100,\r\n color: '#fff',\r\n },\r\n label: {\r\n minWidth: theme.spacing(65),\r\n margin: \"0px 12px 0px 0px\",\r\n justifyContent: \"flex-end\",\r\n fontSize: \"1.1rem\",\r\n },\r\n}));\r\n\r\nfunction FileUploadDialog(props: IFileUploadDialogProps) {\r\n const classes = useStyles();\r\n const currentUser = useSelector((state: any) => state.currentUser as ICurrentUser);\r\n \r\n const {\r\n files,\r\n handleFileChange,\r\n initiateUpload,\r\n uploadingBackdrop,\r\n } = useFileUploadContext();\r\n\r\n const handleClose = () => {\r\n props.onClose();\r\n handleFileChange([]);\r\n }\r\n React.useEffect(() => {\r\n handleFileChange([]);\r\n }, [props.isOpen]);\r\n\r\n const getUploadParams = (permittedUsers: string[]): UploadParams => {\r\n const { folderId, fileId, uploadRestrictedFiles, withNotifications, uploadWithAttachment } = props;\r\n if (folderId) {\r\n let uploadParams = createUploadParams()\r\n .withFolderId(folderId)\r\n .withPermittedUsers(permittedUsers)\r\n .withNewVersionId(fileId || null)\r\n .withRequestAttachment(uploadWithAttachment?.attachmentTask || null)\r\n .withRestriction(Boolean(uploadRestrictedFiles))\r\n .withNotifications(withNotifications, props.showDefaultSuccessToast ?? true)\r\n .onSuccess(onUploadSuccess);\r\n\r\n if (props.getConfirmationDialogConfig) {\r\n const dialogConfig = props.getConfirmationDialogConfig();\r\n uploadParams = dialogConfig ? uploadParams.withConfirmationDialog(dialogConfig) : uploadParams;\r\n }\r\n\r\n return uploadParams.build();\r\n }\r\n throw new Error(\"FolderId is required to upload files.\");\r\n }\r\n\r\n const onClickUpload = async (permittedUsers: string[] = []) => {\r\n initiateUpload(getUploadParams(permittedUsers));\r\n }\r\n\r\n const onUploadSuccess = (result: IPlatformApiPostResult) => {\r\n if (props.uploadWithAttachment) {\r\n props.uploadWithAttachment.onAttachmentsUploaded(result);\r\n }\r\n else if (props.onFilesUploaded) {\r\n props.onFilesUploaded(result?.response?.data as IContentHierarchy[]);\r\n } \r\n props.onClose();\r\n }\r\n\r\n const dropzoneAndLabels = <>\r\n \r\n \r\n \r\n \r\n\r\n const uploadDisabled = files.length === 0;\r\n return (\r\n <>\r\n \r\n {uploadingBackdrop}\r\n {(props.uploadRestrictedFiles && props.folderId && currentUser.isMossAdamsStaff)\r\n ?\r\n <>\r\n \r\n <>\r\n {dropzoneAndLabels}\r\n \r\n \r\n \r\n :\r\n <>\r\n \r\n Upload document(s)\r\n \r\n \r\n {dropzoneAndLabels}\r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n );\r\n}\r\n\r\nexport default FileUploadDialog;","import React from 'react';\r\nimport { Box, CircularProgress, createStyles, withStyles, Theme } from \"@material-ui/core\";\r\nimport { makeStyles } from \"@material-ui/core/styles\";\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n paddingTop: theme.spacing(8),\r\n paddingBottom: theme.spacing(8),\r\n width: \"100%\",\r\n display: \"flex\",\r\n \"&& .MuiCircularProgress-root\": {\r\n margin: \"0 auto\"\r\n }\r\n }\r\n}));\r\n\r\n\r\nconst LoadingIndicator = () => {\r\n const styles = useStyles();\r\n return (\r\n \r\n \r\n \r\n );\r\n}\r\n\r\nexport default LoadingIndicator;","import React from 'react';\r\nimport { Typography, Theme, createStyles, withStyles, WithStyles } from \"@material-ui/core\";\r\nimport MuiDialogTitle from '@material-ui/core/DialogTitle';\r\nimport IconButton from '@material-ui/core/IconButton';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\n\r\nconst styles = (theme: Theme) =>\r\n createStyles({\r\n root: {\r\n margin: 0,\r\n padding: \"24px\",\r\n },\r\n title: {\r\n textTransform: \"none\",\r\n marginTop: \"-8px\"\r\n },\r\n closeButton: {\r\n position: 'absolute',\r\n padding: 0,\r\n right: \"25px\",\r\n top: \"25px\",\r\n height: \"16px\",\r\n width: \"16px\",\r\n color: theme.palette.primary.main,\r\n \"& svg\": {\r\n fontWeight: 700,\r\n fontSize: \"1.6rem\"\r\n }\r\n },\r\n });\r\n\r\nexport interface DialogTitleProps extends WithStyles {\r\n id: string;\r\n children: React.ReactNode;\r\n onClose: () => void;\r\n}\r\n\r\n\r\nconst MADialogTitle = withStyles(styles)((props: DialogTitleProps) => {\r\n const { children, classes, onClose, ...other } = props;\r\n return (\r\n \r\n {children}\r\n {onClose ? (\r\n \r\n \r\n \r\n ) : null}\r\n \r\n );\r\n});\r\n\r\nexport default MADialogTitle;","import React, { useState } from 'react';\r\nimport { makeStyles } from '@material-ui/core';\r\nimport { FormControlLabel, TextField, Chip } from '@material-ui/core';\r\nimport { Autocomplete } from '@material-ui/lab';\r\nimport IMultiUserSelectorProps from \"./IMultiUserSelectorProps\";\r\nimport IUser from \"../../interfaces/IUser\";\r\nimport _ from 'lodash';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n display: \"flex\",\r\n paddingRight: theme.spacing(2.5),\r\n marginLeft: theme.spacing(6),\r\n position: \"relative\",\r\n \"&& .MuiTypography-body1\": {\r\n fontSize: \"1.1rem\",\r\n minWidth: theme.spacing(65),\r\n },\r\n \"&& .MuiAutocomplete-root\": {\r\n flex: 1,\r\n marginRight: theme.spacing(6)\r\n },\r\n \"&& .MuiInputBase-fullWidth\": {\r\n maxWidth: '300px'\r\n },\r\n '& .MuiAutocomplete-endAdornment': {\r\n top: 'auto',\r\n },\r\n },\r\n input: {\r\n fontSize: \"0.9rem\",\r\n \"& input\": {\r\n fontSize: \"0.9rem\",\r\n },\r\n \"& .MuiSelect-select.MuiSelect-select\": {\r\n paddingTop: theme.spacing(5.5),\r\n },\r\n \"& .MuiAutocomplete-inputRoot[class*=\\\"MuiInput-root\\\"] .MuiAutocomplete-input:first-child\": {\r\n paddingTop: theme.spacing(5)\r\n },\r\n \"& .MuiAutocomplete-popupIndicator\": {\r\n marginRight: 0,\r\n padding: theme.spacing(0.5),\r\n marginLeft: theme.spacing(0.5),\r\n },\r\n \"& .MuiIconButton-root\": {\r\n padding: theme.spacing(0.5),\r\n },\r\n },\r\n chip: {\r\n backgroundColor: theme.palette.primary.main,\r\n margin: theme.spacing(1),\r\n height: '1.6rem',\r\n fontWeight: 'normal',\r\n \"& .MuiChip-deleteIcon\": {\r\n opacity: 0.4,\r\n color: theme.palette.primary.contrastText,\r\n '&:hover': {\r\n opacity: 0.8,\r\n },\r\n },\r\n \"&.clientUser\": {\r\n backgroundColor: theme.palette.mossadams.darkGreen400,\r\n },\r\n\r\n },\r\n option: {\r\n padding: 0,\r\n fontSize: theme.typography.fontSize,\r\n },\r\n}))\r\n\r\nconst MultiUserSelector = (props: IMultiUserSelectorProps): JSX.Element => {\r\n const classes = useStyles();\r\n const [selectedUsers, setSelectedUsers] = useState(props.selectedUsers ? props.selectedUsers : []);\r\n const [isDropdownOpen, setIsDropdownOpen] = useState(false);\r\n\r\n const selectAllUserOption: IUser = { userId: '0', displayName: 'Select All', isMossAdamsStaff: false, isActive: false };\r\n\r\n React.useEffect(() => {\r\n setSelectedUsers(props.selectedUsers);\r\n }, [props.selectedUsers]);\r\n\r\n const handleOnChange = (event: React.ChangeEvent<{}>, value: IUser[], reason: any) => {\r\n if (props.selectAll && value.includes(selectAllUserOption)) {\r\n props.onSelectedUsersChange(event, props.userList, reason);\r\n }\r\n else {\r\n props.onSelectedUsersChange(event, value, reason);\r\n }\r\n }\r\n\r\n const isOptionDisabled = (option: IUser) => {\r\n if (_.isEqual(option, selectAllUserOption)) {\r\n return _.isEqual(selectedUsers.map(u => u.userId).sort(), props.userList.map(u => u.userId).sort());\r\n }\r\n else {\r\n return selectedUsers.some(user => user?.userId === option?.userId);\r\n }\r\n }\r\n\r\n return (\r\n <>\r\n setIsDropdownOpen(true)}\r\n onClose={() => setIsDropdownOpen(false)}\r\n id={props.name}\r\n disabled={props.disabled}\r\n options={props.selectAll ? [selectAllUserOption, ...props.userList] : props.userList}\r\n disabledItemsFocusable={false}\r\n getOptionDisabled={isOptionDisabled}\r\n getOptionLabel={user => user!.displayName!}\r\n clearOnBlur={false}\r\n onBlur={props.onBlur}\r\n onChange={props.disabled ? () => { } : handleOnChange}\r\n value={selectedUsers}\r\n renderTags={(tagValue, getTagProps) =>\r\n tagValue.map((option, index) => (\r\n \r\n ))\r\n }\r\n renderOption={(option, { selected }) => {\r\n const isSelectAllOption = option.userId === '0';\r\n const optionStyle = isSelectAllOption\r\n ? { fontWeight: 'bold' }\r\n : {};\r\n\r\n return (\r\n
\r\n {option.displayName}\r\n
\r\n );\r\n }}\r\n renderInput={params => (\r\n \r\n )}\r\n />\r\n }\r\n label={props.label}\r\n labelPlacement={\"start\"}\r\n />\r\n \r\n )\r\n}\r\n\r\nexport default MultiUserSelector;","import { makeStyles } from \"@material-ui/core/styles\";\r\nimport React from \"react\";\r\nimport { Typography, TypographyProps } from \"@material-ui/core\";\r\nimport IPageHeaderProps from \"./IPageHeaderProps\"\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n pageTitle: {\r\n color: theme.palette.primary.main,\r\n letterSpacing: \"0rem\",\r\n paddingBottom: '1.5rem',\r\n textTransform: \"none\",\r\n fontWeight: \"bold\",\r\n fontFamily: \"Berlingske Serif Bold\",\r\n fontSize: \"2.25rem\",\r\n lineHeight: \"2.688rem\",\r\n },\r\n noPadding: {\r\n paddingBottom: theme.spacing(0),\r\n }\r\n}));\r\n\r\nconst PageHeader = (props: TypographyProps & IPageHeaderProps) => {\r\n const classes = useStyles();\r\n const { withoutPadding, ...rest } = props;\r\n return (\r\n {props.children}\r\n )\r\n}\r\n\r\nexport default PageHeader;","import React from 'react'\r\nimport { FormLabel, makeStyles } from '@material-ui/core';\r\nimport { detailsPaneLastUpdatedStyle } from '../../helpers/portalTheme';\r\nimport ITask from '../../interfaces/ITask';\r\nimport { LocalDateTimeString } from '../../helpers/DateHelpers';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n lastUpdated: {\r\n ...detailsPaneLastUpdatedStyle\r\n },\r\n lastModifiedText: {\r\n marginRight: theme.spacing(3)\r\n }\r\n}))\r\n\r\nexport default function LastModified({ task }: { task: ITask }) {\r\n const classes = useStyles();\r\n return (\r\n \r\n \r\n Last Modified:\r\n \r\n \r\n {task.updatedByUserName ? task.updatedByUserName : \"\"} {LocalDateTimeString(task.updatedDateTime)}\r\n \r\n \r\n )\r\n}","import * as React from 'react';\nimport createSvgIcon from './utils/createSvgIcon';\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6h1.9c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm0 12H6V10h12v10z\"\n}), 'LockOpen');","import React from 'react'\r\nimport { Tooltip, makeStyles, Switch, FormLabel } from '@material-ui/core'\r\nimport { LockOpen } from '@material-ui/icons'\r\nimport ICurrentUser from '../../interfaces/ICurrentUser';\r\nimport { useSelector } from 'react-redux';\r\nimport RestrictedIcon from '../common/RestrictedIcon/RestrictedIcon';\r\nimport ITask from '../../interfaces/ITask';\r\nimport { useUpdateRequestRestriction } from '../../hooks/useUpdateRequestRestriction';\r\nimport SpinnerBackdrop from '../common/SpinnerBackdrop';\r\nimport RequestRestrictionConfirmDialog from '../RequestRestrictionConfirmDialog/RequestRestrictionConfirmDialog';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n buttonContainer: {\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n gap: theme.spacing(2)\r\n },\r\n switch: {\r\n \"& .MuiSwitch-thumb\": {\r\n marginTop: theme.spacing(-1.5)\r\n },\r\n \"& .MuiTypography-root\": {\r\n marginTop: theme.spacing(2),\r\n },\r\n \"& .MuiFormLabel-root\": {\r\n margin: 0,\r\n paddingLeft: '2px',\r\n },\r\n \"& .MuiFormControlLabel-labelPlacementStart\": {\r\n margin: 0,\r\n }\r\n },\r\n}));\r\n\r\ninterface RestrictRequestToggleProps {\r\n task: ITask;\r\n onUpdateTaskRestriction: (task: ITask) => void;\r\n}\r\n\r\nexport default function RestrictRequestToggle(props: RestrictRequestToggleProps) {\r\n const [confirmDialogOpen, setConfirmDialogOpen] = React.useState(false);\r\n const { updateRequestRestriction, loading } = useUpdateRequestRestriction();\r\n\r\n const isRestricted = props.task.isRestricted;\r\n\r\n const updateTaskRestriction = async () => {\r\n setConfirmDialogOpen(false);\r\n\r\n const updatedTask = await updateRequestRestriction([props.task], !props.task.isRestricted) as ITask;\r\n\r\n if (updatedTask) {\r\n props.onUpdateTaskRestriction(updatedTask);\r\n }\r\n }\r\n\r\n const onClickRestrictionToggle = () => {\r\n setConfirmDialogOpen(true);\r\n }\r\n\r\n return (<>\r\n \r\n setConfirmDialogOpen(false)}\r\n restricting={!isRestricted}\r\n />\r\n\r\n \r\n \r\n )\r\n}\r\n\r\nfunction Toggle({ isRestricted, onClick }: { isRestricted: boolean; onClick: () => void; }) {\r\n const classes = useStyles();\r\n const currentUser = useSelector((state: any) => state.currentUser as ICurrentUser);\r\n\r\n const icon = isRestricted ? : ;\r\n\r\n const handleChange = (event: React.ChangeEvent, checked: boolean) => {\r\n event.stopPropagation();\r\n onClick();\r\n };\r\n\r\n return currentUser.isMossAdamsStaff ? (\r\n \r\n \r\n \r\n Restricted:\r\n \r\n \r\n {icon}\r\n \r\n \r\n ) : null;\r\n}","import { Typography, makeStyles } from '@material-ui/core'\r\nimport { ConfirmDialog } from '../ConfirmDialog/ConfirmDialog';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n list: {\r\n \"& li\": {\r\n fontFamily: 'Founders Grotesk Reg',\r\n },\r\n },\r\n}));\r\n\r\ninterface Props {\r\n restricting: boolean;\r\n onClose: () => void;\r\n isOpen: boolean;\r\n onConfirm: () => void;\r\n}\r\n\r\nexport default function RequestRestrictionConfirmDialog({ restricting, onClose, isOpen, onConfirm }: Props) {\r\n const classes = useStyles();\r\n\r\n return (\r\n \r\n \r\n {restricting\r\n ? \"Restricting a request will:\"\r\n : \"Unlocking a request will:\"\r\n }\r\n \r\n
    \r\n
  • \r\n {restricting\r\n ? \"Grant all selected Assignees access to all attachments (overriding any file-level access), and\"\r\n : \"Make the request visible to all users with access to the portal, and\"\r\n }\r\n
  • \r\n
  • \r\n {restricting\r\n ? \"Restrict visibility of the request to only the selected Assignees and all MA users\"\r\n : \"Revert the current request-level access of associated attachments to their previous file-level access\"\r\n }\r\n
  • \r\n
\r\n Do you want to proceed?\r\n
\r\n )\r\n}\r\n","import React from 'react'\r\nimport { ConfirmDialog } from '../ConfirmDialog/ConfirmDialog'\r\nimport { Typography } from '@material-ui/core'\r\n\r\ninterface Props {\r\n isOpen: boolean\r\n onConfirm: () => void\r\n onClose: () => void\r\n}\r\n\r\nexport default function RestrictedAttachmentsConfirmDialog({ isOpen, onConfirm, onClose }: Props) {\r\n return (\r\n \r\n \r\n By attaching a file to a restricted request, its visibility may change. Only request assignees and Moss Adams users will have access. Would you like to continue?\r\n \r\n \r\n )\r\n}\r\n","import { Typography } from '@material-ui/core';\r\nimport _ from 'lodash';\r\nimport React from 'react'\r\nimport { ConfirmDialog } from '../ConfirmDialog/ConfirmDialog';\r\n\r\ninterface Props {\r\n isOpen: boolean;\r\n onClose: () => void;\r\n onConfirm: () => void;\r\n removeAll: boolean;\r\n}\r\n\r\nfunction BulkUpdateAccessDialog({ isOpen, onConfirm, onClose, removeAll }: Props) {\r\n const getTitle = (removeAll = false) => {\r\n return `Bulk ${removeAll ? 'Remove' : 'Update'} File Restrictions?`;\r\n }\r\n\r\n const getMessage = (removeAll = false) => {\r\n return `You are about to ${removeAll ? 'remove access restrictions from' : 'update access for'} all selected files. Are you sure that you want to proceed?`;\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n {getMessage()}\r\n \r\n \r\n\r\n \r\n \r\n {getMessage(true)}\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default BulkUpdateAccessDialog","import { Button, DialogActions, DialogContent, makeStyles, Typography, Grid, Tooltip } from '@material-ui/core'\r\nimport ArrowDropDown from '@material-ui/icons/ArrowDropDown'\r\nimport KeyboardArrowDown from '@material-ui/icons/KeyboardArrowDown'\r\nimport _ from 'lodash'\r\nimport { useSnackbar } from 'notistack'\r\nimport React from 'react'\r\nimport { SnackbarVariantTypes } from '../../helpers/enums/enums'\r\nimport { IUpdateDocumentAccessDto } from '../../interfaces/IUpdateDocumentPermissionsDto'\r\nimport DataWriteService from '../../services/DataWriteService'\r\nimport { Utils } from '../../utilities/utils'\r\nimport { ConfirmDialog } from '../ConfirmDialog/ConfirmDialog'\r\nimport { IBulkDocumentActionHelper } from '../documentManagement/useDocumentsBulkActionHelper'\r\nimport MADialogTitle from '../MADialogTitle/MADialogTitle'\r\nimport BulkUpdateAccessDialog from './BulkUpdateAccessDialog'\r\nimport RestrictedUserAutocomplete, { RestrictedUserOption } from './RestrictedUserAutocomplete'\r\nimport usePermittedUsers from '../../hooks/usePermittedUsers'\r\n\r\ntype NewRestrictedFileUploadProps = {\r\n onUpload: (users: string[], isRestricted: boolean) => void;\r\n currentUserId: string;\r\n folderId: string;\r\n}\r\n\r\ninterface RestrictedFileUserAssociationDialogContentProps {\r\n onClose: () => void;\r\n children?: JSX.Element;\r\n className?: string;\r\n submitDisabled?: boolean;\r\n title: string;\r\n}\r\n\r\ninterface UpdateDocumentAccessVariant {\r\n document?: UpdateDocumentAccessModel;\r\n bulkDocumentHelper?: IBulkDocumentActionHelper;\r\n onUpdateAccess: (isPrivate: boolean, usersWithAccess: string[]) => void;\r\n fileUploadProps?: never;\r\n}\r\n\r\ninterface FileUploadVariant {\r\n document?: never;\r\n onUpdateAccess?: never;\r\n bulkDocumentHelper?: never;\r\n fileUploadProps: NewRestrictedFileUploadProps\r\n}\r\n\r\nexport interface UpdateDocumentAccessModel {\r\n documentId: string;\r\n createdByUserId: string;\r\n parentId: string;\r\n isPrivate: boolean;\r\n}\r\n \r\ntype Props = (RestrictedFileUserAssociationDialogContentProps & UpdateDocumentAccessVariant)\r\n | (RestrictedFileUserAssociationDialogContentProps & FileUploadVariant)\r\n\r\nconst useStyles = makeStyles((theme) => {\r\n return {\r\n removeRestrictionsButton: {\r\n justifySelf: 'flex-start',\r\n alignSelf: 'center',\r\n },\r\n buttonGrid: {\r\n justifyContent: 'space-between',\r\n },\r\n uploadRestrictedFilesMessage: {\r\n paddingY: theme.spacing(2),\r\n fontSize: \"1rem !important\",\r\n },\r\n icon: {\r\n verticalAlign: 'middle',\r\n },\r\n}})\r\n\r\n\r\nfunction RestrictedFileUserAssociationDialogContent(props: Props) {\r\n const { onClose, fileUploadProps, submitDisabled, children, className, title, document, onUpdateAccess, bulkDocumentHelper } = props;\r\n\r\n const permittedUsers = usePermittedUsers();\r\n const [submitting, setSubmitting] = React.useState(false);\r\n const [showRemoveAccessRestrictionsDialog, setShowRemoveAccessRestrictionsDialog] = React.useState(false);\r\n const [showBulkAccessUpdateDialog, setShowBulkAccessUpdateDialog] = React.useState(false);\r\n const [removeAll, setRemoveAll] = React.useState(false);\r\n\r\n const { enqueueSnackbar } = useSnackbar();\r\n const classes = useStyles();\r\n\r\n const onUpload = fileUploadProps?.onUpload;\r\n const isUpdateAccessVariant = !!(document && document.createdByUserId && onUpdateAccess);\r\n const selectedDocumentIsUnrestricted = isUpdateAccessVariant && !document.isPrivate;\r\n const isBulkUpdateVariant = Boolean(bulkDocumentHelper?.isRestrictionMode);\r\n\r\n const uploadedByUserId = fileUploadProps?.currentUserId ?? document?.createdByUserId;\r\n const folderId = fileUploadProps?.folderId ?? document?.parentId;\r\n if (!uploadedByUserId || !folderId)\r\n return null;\r\n\r\n const onSubmit = async () => {\r\n if (submitting) return;\r\n\r\n if (isBulkUpdateVariant) {\r\n return setShowBulkAccessUpdateDialog(true);\r\n }\r\n\r\n const selectedUsers = removeAll ? [] : permittedUsers.getSelectedPermittedUserIdsForRequest();\r\n const isRestricted = !removeAll && permittedUsers.hasSelections;\r\n\r\n setSubmitting(true);\r\n if (onUpload) {\r\n onUpload(selectedUsers, isRestricted);\r\n }\r\n else if (isUpdateAccessVariant) {\r\n const dto: IUpdateDocumentAccessDto = {\r\n documentId: props.document!.documentId,\r\n userIds: selectedUsers,\r\n restricted: isRestricted\r\n }\r\n const dataWriteService = new DataWriteService();\r\n const response = await dataWriteService.UpdateDocumentAccessPermissions(dto);\r\n if (response.status) {\r\n const successMessage = isRestricted ? \"File access restrictions successfully updated.\" : \"All access restrictions were removed from the selected file.\";\r\n enqueueSnackbar(successMessage, { variant: SnackbarVariantTypes.Success });\r\n onUpdateAccess(isRestricted, permittedUsers.getPermittedUserIds());\r\n onClose();\r\n }\r\n else {\r\n Utils.enqueueMultiLineSnackbar([...response.errorMessages], enqueueSnackbar, { variant: SnackbarVariantTypes.Error });\r\n }\r\n }\r\n setSubmitting(false);\r\n setRemoveAll(false);\r\n }\r\n\r\n const onSubmitBulkUpdate = () => { \r\n const isRestricted = !removeAll && permittedUsers.hasSelections;\r\n\r\n const users = removeAll ? [] : permittedUsers.getSelectedPermittedUserIdsForRequest();\r\n bulkDocumentHelper?.execute(onUpdateAccess, users, isRestricted);\r\n setShowBulkAccessUpdateDialog(false);\r\n setRemoveAll(false);\r\n onClose();\r\n }\r\n\r\n const onClickRemoveAll = () => {\r\n setRemoveAll(true);\r\n if (isBulkUpdateVariant) {\r\n return setShowBulkAccessUpdateDialog(true);\r\n }\r\n setShowRemoveAccessRestrictionsDialog(true);\r\n }\r\n\r\n const shouldUserBeSelected = (option: RestrictedUserOption) => {\r\n const isUploadVariant = !isUpdateAccessVariant && !isBulkUpdateVariant;\r\n const selectUsersWithAccess = isUpdateAccessVariant && !isBulkUpdateVariant && option.hasAccess;\r\n const selectMAUsers = (isUpdateAccessVariant && !document.isPrivate) || isBulkUpdateVariant || isUploadVariant;\r\n\r\n return (selectUsersWithAccess\r\n || option.userId === uploadedByUserId\r\n || (selectMAUsers && option.isMossAdamsStaff));\r\n }\r\n\r\n const showMAUserSelectionMessage = (onUpload || isBulkUpdateVariant || selectedDocumentIsUnrestricted);\r\n\r\n return (\r\n <>\r\n \r\n {title}\r\n \r\n \r\n {children}\r\n { showMAUserSelectionMessage &&\r\n \r\n The file(s) will be accessible to all Moss Adams users unless you de-select them.\r\n \r\n }\r\n \r\n Click on the expand icon to view the members of this portal. Selected users will be able to see and access this file.\r\n \r\n \r\n \r\n {onUpload ?\r\n \r\n : \r\n \r\n {document?.isPrivate &&\r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n\r\n { \r\n setShowRemoveAccessRestrictionsDialog(false); \r\n setRemoveAll(false); \r\n }}\r\n >\r\n \r\n You are about to remove all restrictions on this file. Do you want to proceed?\r\n \r\n \r\n\r\n {\r\n setShowBulkAccessUpdateDialog(false);\r\n setRemoveAll(false);\r\n }}\r\n removeAll={removeAll}\r\n />\r\n\r\n \r\n )\r\n}\r\n\r\n\r\nexport default RestrictedFileUserAssociationDialogContent;","import { Checkbox, makeStyles, TextField, Chip, CircularProgress, Box } from '@material-ui/core'\r\nimport Autocomplete, { AutocompleteChangeDetails, AutocompleteChangeReason } from '@material-ui/lab/Autocomplete'\r\nimport _ from 'lodash'\r\nimport React from 'react'\r\nimport { IRestrictedUser } from '../../interfaces/IRestrictedUser'\r\nimport IRestrictedUserListDto from '../../interfaces/IRestrictedUserListDto'\r\nimport DataReadService from '../../services/DataReadService'\r\nimport { PermittedUserListProps } from '../../hooks/usePermittedUsers'\r\n\r\nconst useStyles = makeStyles((theme) => {\r\n const font = theme.typography.fontFamily;\r\n\r\n return {\r\n input: {\r\n fontSize: \"0.9rem\",\r\n \"& input\": {\r\n fontSize: \"0.9rem\",\r\n },\r\n \"& .MuiSelect-select.MuiSelect-select\": {\r\n paddingTop: theme.spacing(5.5),\r\n },\r\n \"& .MuiAutocomplete-inputRoot[class*=\\\"MuiInput-root\\\"] .MuiAutocomplete-input:first-child\": {\r\n paddingTop: theme.spacing(5)\r\n },\r\n \"& .MuiAutocomplete-popupIndicator\": {\r\n marginRight: 0,\r\n padding: 0,\r\n \"& .MuiSvgIcon-root\": {\r\n fontSize: \"2.1rem\",\r\n color: \"black\",\r\n }\r\n },\r\n \"& .MuiIconButton-root\": {\r\n padding: 0,\r\n },\r\n },\r\n checkbox: {\r\n \"& .MuiCheckbox-root\": {\r\n\r\n },\r\n \"& .Mui-checked\": {\r\n backgroundColor: theme.palette.primary.main,\r\n\r\n },\r\n \"&.MuiIconButton-root\": {\r\n padding: theme.spacing(1),\r\n },\r\n },\r\n autocomplete: {\r\n flex: \"1 1 100%\",\r\n },\r\n option: {\r\n padding: 0,\r\n fontFamily: font,\r\n fontSize: theme.typography.fontSize,\r\n },\r\n list: {\r\n \"& .MuiListSubheader-root\": {\r\n lineHeight: theme.spacing(1),\r\n },\r\n },\r\n chip: {\r\n backgroundColor: theme.palette.primary.main,\r\n margin: theme.spacing(1),\r\n height: '1.6rem',\r\n fontWeight: 'normal',\r\n \"& .MuiChip-deleteIcon\": {\r\n opacity: 0.4,\r\n color: theme.palette.primary.contrastText\r\n },\r\n \"&.clientUser\": {\r\n backgroundColor: theme.palette.mossadams.darkGreen400,\r\n }\r\n },\r\n spinner: {\r\n textAlign: 'center',\r\n margin: '1rem 0'\r\n },\r\n }\r\n})\r\n\r\n\r\ninterface Props {\r\n permittedUsers: PermittedUserListProps;\r\n documentId?: string; \r\n folderId: string;\r\n createdByUser?: {\r\n userId: string;\r\n label: string;\r\n }\r\n shouldUserBeSelected: (options: RestrictedUserOption) => boolean;\r\n}\r\n\r\nexport type RestrictedUserOption = IRestrictedUser & { firstLetter: string, groupName: string }\r\n\r\n\r\nfunction RestrictedUserAutocomplete({permittedUsers, documentId, folderId, createdByUser, shouldUserBeSelected}: Props) {\r\n\r\n const classes = useStyles();\r\n\r\n const { \r\n selectedUserOptions: values, \r\n setSelectedUserOptions: setValues, \r\n userOptions: options, \r\n setUserOptions: setOptions \r\n } = permittedUsers;\r\n\r\n React.useEffect(() => {\r\n getRestrictedUserList();\r\n }, [documentId, folderId])\r\n\r\n const getRestrictedUserList = async () => {\r\n const dataReadService = new DataReadService();\r\n\r\n const dto: IRestrictedUserListDto = {\r\n documentId: documentId,\r\n folderId: folderId\r\n }\r\n\r\n const list = await dataReadService.GetRestrictedUserList(dto);\r\n if (list.status) {\r\n const maGroupName = \"Moss Adams Users\";\r\n const clientGroupName = \"Client Users\"\r\n const optionsArray = list.data.map(restrictedUser => {\r\n return {\r\n ...restrictedUser,\r\n firstLetter: restrictedUser.displayName?.charAt(0),\r\n groupName: restrictedUser.isMossAdamsStaff ? maGroupName : clientGroupName\r\n }\r\n })\r\n const usersWithAccess: string[] = [];\r\n\r\n optionsArray.forEach(option => shouldUserBeSelected(option) && usersWithAccess.push(option.userId));\r\n\r\n const defaultValues = _.clone(optionsArray).filter(option => usersWithAccess.includes(option.userId));\r\n setValues(defaultValues);\r\n setOptions(optionsArray);\r\n }\r\n }\r\n\r\n const onChange = (e: React.ChangeEvent<{}>, selected: RestrictedUserOption[], reason: AutocompleteChangeReason, details?: AutocompleteChangeDetails) => {\r\n e.stopPropagation();\r\n\r\n let newValues = [...selected];\r\n // Handle removal explicitly - as it is inconsistent within MUI [between removing via clicking the chips and removing via clicking the checkbox]...\r\n if (reason === 'remove-option') {\r\n newValues = [...values];\r\n _.remove(newValues, option => details?.option?.userId === option.userId);\r\n }\r\n else if (reason === 'clear') {\r\n const createdByOption = options.find(optionIsCreatedByUser);\r\n newValues = createdByOption ? [createdByOption] : []\r\n }\r\n\r\n setValues(newValues);\r\n }\r\n\r\n const optionIsCreatedByUser = (option: RestrictedUserOption) => {\r\n return option.userId === createdByUser?.userId;\r\n }\r\n\r\n const createdByUserIdentifier = createdByUser ? ` ${createdByUser.label}` : '';\r\n return (\r\n !(options.length) ?
:\r\n \r\n -b.groupName.localeCompare(a.groupName) || -b.firstLetter.localeCompare(a.firstLetter))}\r\n onChange={onChange}\r\n onOpen={e => e.stopPropagation()}\r\n onClose={e => e.stopPropagation()}\r\n getOptionSelected={option => values.includes(option)}\r\n value={values}\r\n disableCloseOnSelect\r\n groupBy={(option) => option.groupName}\r\n getOptionLabel={(option) => option.displayName}\r\n fullWidth={true}\r\n renderInput={(params) => }\r\n renderOption={(option, { selected }) => (\r\n <>\r\n \r\n {option.displayName}{optionIsCreatedByUser(option) ? createdByUserIdentifier : ''}\r\n \r\n )}\r\n getOptionDisabled={optionIsCreatedByUser}\r\n renderTags={(values, getTagsProps) =>\r\n \r\n {\r\n values.map((option, index) => {\r\n const isUploadedByUser = optionIsCreatedByUser(option);\r\n const uploadedByUserProps = !isUploadedByUser ? {} : {\r\n disabled: true,\r\n onDelete: undefined,\r\n label: option.displayName + createdByUserIdentifier\r\n }\r\n return \r\n \r\n \r\n }\r\n\r\n )\r\n }\r\n \r\n }\r\n />\r\n \r\n )\r\n}\r\n\r\nexport default RestrictedUserAutocomplete","import { ColumnApi, ColumnState, GridApi } from '@ag-grid-enterprise/all-modules'\r\nimport React from 'react'\r\nimport { Utils } from '../utilities/utils';\r\nimport { useSnackbar } from 'notistack';\r\nimport { cloneDeep } from 'lodash';\r\n\r\n\r\n/**\r\n * A hook which allows preset AG Grid layouts to be managed and applied to the Grid associated with passed paramaters.\r\n * \r\n * Each unique grid which implements this feature should have a distinct storageKey (unless sharing views between grids is possible and desired). \r\n * Storage keys should be saved within {@link SavedViewKeys}\r\n * \r\n * Typically will be used with {@link SavedViewModal} component.\r\n * \r\n * @param gridApi\r\n * @param columnApi \r\n * @param storageKey \r\n * @returns {ISavedViewControls}\r\n */\r\nexport const useSavedView = (gridApi: GridApi | undefined, columnApi: ColumnApi | undefined, storageKey: string, onLoadView?: () => void): ISavedViewControls => {\r\n const [savedViews, setSavedViews] = React.useState([]);\r\n\r\n const { enqueueSnackbar, closeSnackbar } = useSnackbar();\r\n\r\n const viewBaseKey = `${storageKey}-view`\r\n const getLastUsedKey = () => `${storageKey}-last-used`;\r\n const getViewStorageKey = (id: string) => `${viewBaseKey}-${id}`;\r\n\r\n const maxViewsPerKey = 5;\r\n\r\n React.useEffect(() => {\r\n getSavedViewOptions();\r\n }, [viewBaseKey])\r\n\r\n\r\n React.useEffect(() => {\r\n if (gridApi && columnApi) {\r\n closeSnackbar();\r\n loadLastUsedView();\r\n }\r\n }, [gridApi, columnApi, viewBaseKey])\r\n\r\n const viewNameIsValid = (id: string) => {\r\n return (id.length && !savedViews.some(view => view.id === id));\r\n }\r\n\r\n const maxViewsReached = () => {\r\n return savedViews.length === maxViewsPerKey;\r\n }\r\n\r\n const saveView = (id: string) => {\r\n if (maxViewsReached()) {\r\n console.error(`Unable to save more than ${maxViewsPerKey} views for this key`);\r\n return;\r\n }\r\n\r\n if (gridApi && columnApi) {\r\n const view: ISavedView = {\r\n id: id,\r\n columnState: columnApi.getColumnState(),\r\n filterModel: gridApi.getFilterModel(),\r\n order: columnApi.getAllDisplayedColumns().map(col => col.getColId()),\r\n }\r\n\r\n saveViewToStorage(view);\r\n }\r\n }\r\n\r\n const saveViewToStorage = (view: ISavedView, newView = true) => {\r\n const key = getViewStorageKey(view.id);\r\n if (viewNameIsValid(view.id)){\r\n Utils.saveItemToLocalStorage(key, JSON.stringify(view));\r\n }\r\n\r\n if (localStorage.getItem(key) !== null && newView) {\r\n setSavedViews((prevValues) => [\r\n ...prevValues,\r\n view\r\n ]);\r\n saveLastUsedView(view);\r\n enqueueSnackbar(\"New grid layout saved\", { variant: 'success' });\r\n }\r\n else if (newView) {\r\n enqueueSnackbar(\"Unable to add grid layout\", { variant: 'error' });\r\n }\r\n }\r\n\r\n const loadView = (id: string, toastMessage?: string) => {\r\n const key = getViewStorageKey(id);\r\n\r\n const dataString = localStorage.getItem(key);\r\n if (dataString && gridApi && columnApi?.getAllColumns()) {\r\n const view: ISavedView = JSON.parse(dataString);\r\n columnApi.applyColumnState({ state: [...view.columnState] });\r\n gridApi.setFilterModel(view.filterModel);\r\n view.order.forEach((colId, index) => columnApi.moveColumn(colId, index));\r\n gridApi.refreshCells();\r\n onLoadView && onLoadView();\r\n\r\n saveLastUsedView(view);\r\n enqueueSnackbar(toastMessage || `Grid layout \"${id}\" was applied`, { variant: 'info' });\r\n }\r\n };\r\n\r\n const deleteView = (id: string, showDeleteToast = true) => {\r\n localStorage.removeItem(getViewStorageKey(id));\r\n setSavedViews(prevValues => prevValues.filter(view => view.id !== id));\r\n showDeleteToast && enqueueSnackbar(\"Grid layout deleted\", { variant: 'success' });\r\n }\r\n\r\n const renameView = (id: string, newId: string) => {\r\n const key = getViewStorageKey(id);\r\n\r\n const dataString = localStorage.getItem(key);\r\n if (dataString) {\r\n const prevViews = cloneDeep(savedViews);\r\n\r\n const view: ISavedView = JSON.parse(dataString);\r\n const viewIndex = savedViews.findIndex(view => view.id === id);\r\n view.id = newId;\r\n deleteView(id, false);\r\n saveViewToStorage(view, false);\r\n\r\n prevViews[viewIndex] = view; \r\n setSavedViews(prevViews);\r\n }\r\n }\r\n\r\n const saveLastUsedView = (view: ISavedView) => {\r\n Utils.saveItemToLocalStorage(getLastUsedKey(), view.id);\r\n }\r\n\r\n const loadLastUsedView = () => {\r\n const key = getLastUsedKey();\r\n const id = localStorage.getItem(key);\r\n\r\n if (id) {\r\n loadView(id);\r\n }\r\n }\r\n\r\n const getSavedViewOptions = () => {\r\n if (!savedViews.length) {\r\n const newSavedViews: ISavedView[] = [];\r\n\r\n for (let i = 0; i < localStorage.length; i++) {\r\n const key = localStorage.key(i);\r\n if (key?.startsWith(viewBaseKey)) {\r\n const view = JSON.parse(localStorage.getItem(key)!);\r\n newSavedViews.push(view);\r\n }\r\n }\r\n\r\n setSavedViews(newSavedViews);\r\n return newSavedViews;\r\n }\r\n\r\n return savedViews\r\n }\r\n\r\n React.useEffect(() => {\r\n const handleViewChanges = (e: StorageEvent) => {\r\n if (e.key && e.key.startsWith(viewBaseKey)) {\r\n if (e.newValue) {\r\n try {\r\n const newView: ISavedView = JSON.parse(e.newValue);\r\n setSavedViews((prevValues) => [\r\n ...prevValues,\r\n newView\r\n ])\r\n }\r\n catch (error) {\r\n console.error(\"Unable to parse saved layout.\", error);\r\n }\r\n }\r\n else if (e.oldValue) {\r\n try {\r\n const removedView: ISavedView = JSON.parse(e.oldValue);\r\n setSavedViews(prevValues => prevValues.filter(view => view.id !== removedView.id))\r\n }\r\n catch (error) {\r\n console.error(\"Unable to parse removed layout.\", error);\r\n }\r\n }\r\n }\r\n };\r\n\r\n window.addEventListener('storage', handleViewChanges);\r\n\r\n return () => {\r\n window.removeEventListener('storage', handleViewChanges);\r\n }\r\n }, [viewBaseKey])\r\n\r\n return { \r\n saveView, \r\n loadView, \r\n deleteView, \r\n renameView, \r\n maxViewsReached, \r\n viewBaseKey, \r\n savedViews \r\n };\r\n}\r\n\r\nexport interface ISavedView {\r\n id: string;\r\n filterModel: {\r\n [key: string]: any;\r\n };\r\n columnState: ColumnState[];\r\n order: string[];\r\n}\r\n\r\nexport interface ISavedViewControls {\r\n saveView: Function;\r\n loadView: Function;\r\n deleteView: Function;\r\n renameView: Function;\r\n maxViewsReached: Function;\r\n viewBaseKey: string;\r\n savedViews: ISavedView[];\r\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n width: '100%',\n overflowX: 'auto'\n }\n};\nvar TableContainer = /*#__PURE__*/React.forwardRef(function TableContainer(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref,\n className: clsx(classes.root, className)\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? TableContainer.propTypes = {\n /**\n * The table itself, normally ``\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTableContainer'\n})(TableContainer);","import * as React from 'react';\nimport createSvgIcon from './utils/createSvgIcon';\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z\"\n}), 'CheckCircle');","import * as React from 'react';\nimport createSvgIcon from './utils/createSvgIcon';\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 16.5l4-4h-3v-9h-2v9H8l4 4zm9-13h-6v1.99h6v14.03H3V5.49h6V3.5H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2v-14c0-1.1-.9-2-2-2z\"\n}), 'SystemUpdateAlt');","import * as React from 'react';\nimport createSvgIcon from './utils/createSvgIcon';\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z\"\n}), 'Cancel');","import React from 'react'\r\nimport { ISavedView, ISavedViewControls } from '../../hooks/useSavedView';\r\nimport { Button, Typography, Grid, TextField, Tooltip, makeStyles, TableCell, TableRow } from '@material-ui/core';\r\nimport { Cancel, CheckCircle, Delete, Edit, Save, SystemUpdateAlt } from '@material-ui/icons';\r\n\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n grid: {\r\n \"&:nth-child(odd)\": {\r\n backgroundColor: theme.palette.mossadams.everyOtherRowColor,\r\n },\r\n },\r\n buttonActionText: {\r\n fontSize: \"0.75rem\",\r\n },\r\n}))\r\n\r\nexport interface ISavedViewTableRowProps {\r\n view?: ISavedView, \r\n viewControls: ISavedViewControls, \r\n onLoadView: Function, \r\n onAddNewView?: Function, \r\n onCancelAddView?: Function \r\n}\r\n\r\nexport const SavedViewTableRow = ({ view, viewControls, onLoadView, onAddNewView, onCancelAddView }: ISavedViewTableRowProps) => {\r\n const [editActive, setEditActive] = React.useState(false);\r\n const [deleteActive, setDeleteActive] = React.useState(false);\r\n\r\n const [newName, setNewName] = React.useState(\"\");\r\n const [newNameIsDirty, setNewNameIsDirty] = React.useState(false);\r\n\r\n const classes = useStyles();\r\n\r\n const onChangeName = (e: React.ChangeEvent) => {\r\n setNewName(e.target.value);\r\n setNewNameIsDirty(true);\r\n }\r\n\r\n const onClickEdit = (id: string) => {\r\n setNewName(id);\r\n setNewNameIsDirty(false);\r\n setEditActive(prevValue => !prevValue);\r\n }\r\n\r\n const onClickSaveRename = (id: string) => {\r\n viewControls.renameView(id, newName);\r\n setEditActive(prevValue => !prevValue);\r\n }\r\n\r\n const onClickLoad = (id: string) => {\r\n viewControls.loadView(id);\r\n onLoadView();\r\n }\r\n\r\n const onSaveNewView = () => {\r\n if (!newNameIsInvalid) {\r\n viewControls.saveView(newName);\r\n onAddNewView && onAddNewView();\r\n }\r\n }\r\n\r\n const onClickCancelAddView = () => {\r\n onCancelAddView && onCancelAddView();\r\n }\r\n\r\n const getNewViewErrorMessage = () => {\r\n if (!newName.length) {\r\n return \"Name must contain at least one character\";\r\n }\r\n else {\r\n return \"Name must be unique\";\r\n }\r\n }\r\n\r\n const newNameIsInvalid = newNameIsDirty && (!newName.length || viewControls.savedViews.some(view => view.id === newName));\r\n\r\n const addRow = !view && \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n const viewRow = view && \r\n \r\n {editActive\r\n ? \r\n \r\n \r\n \r\n \r\n onClickSaveRename(view.id)} disabled={newNameIsInvalid}\r\n />\r\n setEditActive(false)} />\r\n \r\n \r\n : \r\n \r\n \r\n {view.id}\r\n \r\n {deleteActive &&\r\n \r\n Are you sure you want to delete this saved layout?\r\n \r\n }\r\n \r\n \r\n {deleteActive && <>\r\n }\r\n text=\"Confirm\"\r\n onClick={() => viewControls.deleteView(view.id)}\r\n />\r\n setDeleteActive(false)} />\r\n \r\n }\r\n \r\n \r\n }\r\n \r\n {!(deleteActive || editActive) ?\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n : <>\r\n \r\n \r\n \r\n \r\n\r\n }\r\n \r\n\r\n return <>\r\n {addRow}\r\n {viewRow}\r\n \r\n}\r\n\r\nconst IconTextButtonItem = ({ onClick, text, icon, disabled }: { onClick: () => void, text: string, icon: React.ReactNode, disabled?: boolean }) => {\r\n const classes = useStyles();\r\n\r\n return <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n}\r\n\r\nconst CancelButton = ({ onClick }: { onClick: () => void }) => {\r\n return <>\r\n }\r\n text={\"Cancel\"}\r\n />\r\n \r\n}\r\n\r\nconst SaveButton = ({ onClick, disabled }: { onClick: () => void, disabled?: boolean }) => {\r\n return <>\r\n }\r\n text={\"Save\"}\r\n disabled={disabled}\r\n />\r\n \r\n}","import React from 'react'\r\nimport { Typography, TableContainer, Table, TableHead, Paper, TableBody, TableCell, TableRow } from '@material-ui/core';\r\nimport { ISavedViewTableRowProps, SavedViewTableRow } from './SavedViewTableRow';\r\n\r\ninterface ISavedViewTableProps {\r\n addNewView: boolean;\r\n rowProps: Omit;\r\n}\r\n\r\nexport const SavedViewTable = (props: ISavedViewTableProps) => {\r\n const rows = <>\r\n {\r\n props.rowProps.viewControls.savedViews.map((view, i) =>\r\n )\r\n }\r\n {!props.rowProps.viewControls.maxViewsReached() && props.addNewView &&\r\n \r\n }\r\n \r\n\r\n return \r\n
\r\n \r\n {props.rowProps.viewControls.savedViews.length !== 0 &&\r\n \r\n Name\r\n Use Layout\r\n Rename\r\n Delete\r\n \r\n }\r\n \r\n \r\n {rows}\r\n \r\n
\r\n \r\n}","import React from 'react'\r\nimport { ISavedViewControls, useSavedView } from '../../hooks/useSavedView';\r\nimport { Button, Dialog, DialogActions, DialogContent, Grid, Typography } from '@material-ui/core';\r\nimport MADialogTitle from '../MADialogTitle/MADialogTitle';\r\nimport { ColumnApi, GridApi } from '@ag-grid-enterprise/all-modules';\r\nimport { SavedViewTable } from './SavedViewTable';\r\nimport ConditionalVisiblity from '../common/ConditionalVisibility/ConditionalVisiblity';\r\n\r\nexport interface SavedViewModalProps {\r\n isOpen: boolean;\r\n onClose: () => void;\r\n onClickResetColumns: () => void;\r\n onLoadView?: () => void;\r\n gridApi: GridApi | undefined;\r\n columnApi: ColumnApi | undefined;\r\n viewStorageKey: string;\r\n}\r\n\r\nexport default function SavedViewModal({ isOpen, onClose, gridApi, columnApi, viewStorageKey, onClickResetColumns, onLoadView }: SavedViewModalProps) {\r\n const controls: ISavedViewControls = useSavedView(gridApi, columnApi, viewStorageKey, onLoadView);\r\n\r\n const [addNewView, setAddNewView] = React.useState(false);\r\n\r\n const onAddNewView = () => {\r\n setAddNewView(false);\r\n onCloseModal();\r\n }\r\n\r\n const onClickReset = () => {\r\n onClickResetColumns();\r\n onCloseModal();\r\n }\r\n\r\n const onCloseModal = () => {\r\n setAddNewView(false);\r\n onClose();\r\n }\r\n\r\n const hasViews = controls.savedViews.length !== 0;\r\n\r\n const instructions = hasViews ? null \r\n : <>\r\n \r\n To add a custom layout based on the current grid click \"+ Save Current Layout,\" choose a name, then click Save.\r\n \r\n \r\n Your last used saved layout will be used automatically when you navigate to this page.\r\n \r\n ;\r\n\r\n return <>\r\n \r\n \r\n Layout Manager\r\n \r\n \r\n {instructions}\r\n \r\n setAddNewView(false),\r\n onLoadView: onCloseModal,\r\n onAddNewView: onAddNewView,\r\n }}\r\n addNewView={addNewView}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n {!controls.maxViewsReached() &&\r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n}","import * as React from 'react';\nimport createSvgIcon from './utils/createSvgIcon';\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10 10.02h5V21h-5zM17 21h3c1.1 0 2-.9 2-2v-9h-5v11zm3-18H5c-1.1 0-2 .9-2 2v3h19V5c0-1.1-.9-2-2-2zM3 19c0 1.1.9 2 2 2h3V10H3v9z\"\n}), 'TableChart');","import React from 'react'\r\nimport SavedViewModal, { SavedViewModalProps } from './SavedViewModal';\r\nimport TooltipIconButton from '../common/TooltipIconButton/TooltipIconButton';\r\nimport { TableChart } from '@material-ui/icons';\r\n\r\ntype Props = {\r\n modalProps: Omit;\r\n disabled?: boolean;\r\n}\r\n\r\n\r\nexport default function LayoutManagerModalButton(props: Props) {\r\n const [isOpen, setIsOpen] = React.useState(false); \r\n\r\n const disabled = props.disabled || !props.modalProps.gridApi || !props.modalProps.columnApi;\r\n\r\n return <>\r\n setIsOpen(true)} disabled={disabled}>\r\n \r\n \r\n setIsOpen(false)}\r\n {...props.modalProps}\r\n />\r\n \r\n}\r\n","import { ICellRendererParams } from \"@ag-grid-enterprise/all-modules\";\r\nimport { Grid, TextareaAutosize, Box, Typography, makeStyles, CircularProgress } from \"@material-ui/core\";\r\nimport React from \"react\";\r\nimport { LocalDateTimeString } from \"../../helpers/DateHelpers\";\r\nimport { commentMaxLength } from \"../TaskComments/TaskComments\";\r\n\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n commentUsername: {\r\n color: theme.palette.primary.main,\r\n fontSize: \"1rem\",\r\n },\r\n commentDateTime: {\r\n color: theme.palette.mossadams.gray400,\r\n textAlign: \"right\",\r\n },\r\n commentText: {\r\n fontFamily: \"Founders Grotesk Reg\",\r\n fontSize: \"1rem\",\r\n lineHeight: \"1.1rem\",\r\n wordBreak: \"break-word\",\r\n paddingBottom: theme.spacing(3),\r\n overflowWrap: \"break-word\",\r\n userSelect: \"text\",\r\n },\r\n modalCommentCell: {\r\n marginTop: theme.spacing(5.5),\r\n },\r\n errorText: {\r\n color: theme.palette.error.main,\r\n },\r\n editCommentTextArea: {\r\n fontFamily: \"Founders Grotesk Reg\",\r\n fontSize: \"1rem\",\r\n lineHeight: \"1.1rem\",\r\n wordBreak: \"break-word\",\r\n overflowWrap: \"break-word\",\r\n padding: theme.spacing(3),\r\n marginTop: theme.spacing(5.5),\r\n width: \"100%\",\r\n resize: \"none\",\r\n },\r\n}));\r\n\r\nexport const CommentCellRenderer = (params: ICellRendererParams) => {\r\n const { editNode, submitting, commentDialogIsOpen, submitEdit, endEdit } = params.context;\r\n const classes = useStyles();\r\n const taskCommentId = params.node.data.taskCommentId;\r\n const comment = params.data.comment;\r\n const updatedDate = params.data.updatedDateTime;\r\n const editCell = params.node === editNode;\r\n\r\n const [editedComment, setEditedComment] = React.useState('');\r\n const textAreaRef = React.useRef(null);\r\n const containerRef = React.useRef(null);\r\n\r\n React.useEffect(() => {\r\n if (editCell) {\r\n setEditedComment(editNode?.data?.comment);\r\n }\r\n else {\r\n setEditedComment('');\r\n }\r\n },[editNode, editCell])\r\n\r\n\r\n React.useEffect(() => {\r\n if (editNode && editedComment === editNode.data.comment) {\r\n const textArea = textAreaRef.current;\r\n const container = containerRef.current;\r\n \r\n if (textArea && container) {\r\n textArea.focus();\r\n textArea.selectionStart = textArea.value.length;\r\n textArea.selectionEnd = textArea.value.length;\r\n textArea.scrollTop = textArea.scrollHeight;\r\n\r\n textAreaRef.current = null;\r\n }\r\n }\r\n },[editedComment, editNode])\r\n\r\n const handleEditCommentChange = (e: any) => {\r\n setEditedComment(e.target.value);\r\n }\r\n\r\n const handleEnterKeyPress = (event: React.KeyboardEvent) => {\r\n if (event.key === 'Enter' && !event.shiftKey) {\r\n event.preventDefault();\r\n editedComment !== undefined && submitEdit(editedComment);\r\n }\r\n if (event.key === 'Escape') {\r\n endEdit();\r\n }\r\n }\r\n\r\n const cellContent = <>\r\n
\r\n {!commentDialogIsOpen &&\r\n \r\n \r\n {params.data.username}\r\n \r\n \r\n
\r\n {LocalDateTimeString(updatedDate || params.data.commentDateTime)}\r\n {updatedDate\r\n && (Edited)\r\n }\r\n
\r\n
\r\n
\r\n }\r\n
\r\n {comment.split(\"\\n\").map((i: string, key: number) => { return
{i}
})}\r\n
\r\n
\r\n \r\n\r\n const editCellContent = editedComment !== undefined && <>\r\n {\r\n submitting\r\n ? \r\n : \r\n \r\n \r\n \r\n \r\n \r\n \r\n Press enter to save or escape to cancel.\r\n \r\n commentMaxLength ? classes.errorText : ''}`}>\r\n {editedComment.length}/{commentMaxLength}\r\n \r\n \r\n \r\n \r\n }\r\n \r\n\r\n return (\r\n
\r\n {editCell\r\n ? editCellContent\r\n : cellContent\r\n }\r\n
);\r\n};","import React from \"react\"\r\nimport { connect } from \"react-redux\";\r\nimport { setCurrentUser } from \"../../store/actions\";\r\nimport { Accordion, AccordionDetails, AccordionSummary, Box, Button, Dialog, DialogContent, FormControl, makeStyles, TextField, Tooltip, Typography } from \"@material-ui/core\";\r\nimport ITaskComment from \"../../interfaces/ITaskComment\";\r\nimport ITaskCommentsProps from \"./ITaskCommentsProps\";\r\nimport DataReadService from \"../../services/DataReadService\";\r\nimport DataWriteService from \"../../services/DataWriteService\";\r\nimport { isEmpty } from '../../helpers/StringHelpers';\r\nimport { useSnackbar } from 'notistack';\r\nimport { SnackbarVariantTypes } from \"../../helpers/enums/enums\";\r\nimport { Utils } from \"../../utilities/utils\";\r\nimport { LocalDateTimeString } from \"../../helpers/DateHelpers\";\r\nimport ZoomOutMapIcon from '@material-ui/icons/ZoomOutMap';\r\nimport { detailPaneAccordionStyle } from \"../../helpers/portalTheme\";\r\nimport { AgGridColumn, AgGridReact } from '@ag-grid-community/react';\r\nimport { GetContextMenuItemsParams, GridApi, MenuItemDef, RowNode, SuppressKeyboardEventParams, ValueGetterParams } from \"@ag-grid-enterprise/all-modules\";\r\nimport { EllipsisButtonActionRenderer } from \"../AgGridRenderers/EllipsisButtonActionRenderer\";\r\nimport { ConfirmDialog } from \"../ConfirmDialog/ConfirmDialog\";\r\nimport { DeleteCommentWarningText } from \"../../helpers/Constants\";\r\nimport MADialogTitle from \"../MADialogTitle/MADialogTitle\";\r\nimport { agGridThemeOverride } from \"../../helpers/portalTheme\";\r\nimport { ExpandMore } from \"@material-ui/icons\";\r\nimport _ from \"lodash\";\r\nimport { CommentCellRenderer } from \"../AgGridRenderers/TaskCommentCellRenderer\";\r\nimport useAsyncFunctionIsLoading from \"../../hooks/useIsLoadingAsync\";\r\n\r\nconst errorGettingTaskCommentsText = \"There was an error getting the request comments\";\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n label: {\r\n fontSize: \"1.1rem\",\r\n paddingRight: theme.spacing(2.5),\r\n minWidth: theme.spacing(54),\r\n },\r\n formControl: {\r\n width: \"100%\",\r\n marginBottom: theme.spacing(5),\r\n },\r\n button: {\r\n marginTop: theme.spacing(10),\r\n },\r\n commentsSection: {\r\n backgroundColor: theme.palette.mossadams.gray100,\r\n \"& .MuiInputBase-root\": {\r\n minWidth: \"auto\",\r\n },\r\n display: \"flex\",\r\n flexGrow: 1,\r\n flexDirection: \"column\",\r\n \"&& .ag-header\": {\r\n display: \"none\"\r\n }\r\n },\r\n commentsSectionDialog: {\r\n height: \"100%\",\r\n \"&& .ag-header\": {\r\n display: \"block\"\r\n }\r\n },\r\n commentsHeading: {\r\n fontSize: \"1.3rem\",\r\n flex: 1\r\n },\r\n commentsListContainer: {\r\n overflow: \"auto\",\r\n \"& > div:nth-child(2n+2)\": {\r\n backgroundColor: \"white\"\r\n }\r\n },\r\n commentsGrid: {\r\n flex: 1,\r\n minHeight: \"300px\",\r\n width: \"100%\",\r\n ...agGridThemeOverride\r\n },\r\n commentLengthCounter: {\r\n textAlign: \"left\",\r\n flex: 1,\r\n marginLeft: theme.spacing(2)\r\n },\r\n commentInputContainer: {\r\n paddingTop: theme.spacing(3),\r\n },\r\n commentInputContainerDialog: {\r\n padding: theme.spacing(4),\r\n },\r\n commentInputText: {\r\n backgroundColor: theme.palette.background.paper,\r\n \"&& .MuiOutlinedInput-multiline\": {\r\n margin: theme.spacing(0),\r\n }\r\n },\r\n commentInputButtonDiv: {\r\n display: \"flex\",\r\n flexDirection: \"row-reverse\",\r\n },\r\n commentInputButton: {\r\n width: theme.spacing(90),\r\n marginTop: 0,\r\n },\r\n accordion: {\r\n ...detailPaneAccordionStyle,\r\n borderRadius: theme.spacing(1), //Overriding because the background color fights with the border color\r\n },\r\n accordionSummary: {\r\n backgroundColor: theme.palette.mossadams.darkGreen400,\r\n color: theme.palette.primary.contrastText,\r\n \"&& .MuiIconButton-label\": {\r\n color: theme.palette.primary.contrastText,\r\n }\r\n },\r\n editMessage: {\r\n flex: 1,\r\n color: theme.palette.primary.contrastText,\r\n textAlign: 'right'\r\n },\r\n commentDialog: {\r\n height: '90vh',\r\n \"&& .MuiPaper-root\": {\r\n height: \"100%\"\r\n }\r\n },\r\n errorText: {\r\n color: theme.palette.error.main,\r\n },\r\n}));\r\n\r\nexport const commentMaxLength: number = 4000;\r\n\r\nconst TaskComments = (props: ITaskCommentsProps): JSX.Element => {\r\n const classes = useStyles();\r\n const { enqueueSnackbar } = useSnackbar();\r\n\r\n const [taskComments, setTaskComments] = React.useState([]);\r\n const [newComment, setNewComment] = React.useState(\"\");\r\n const [selectedComment, setSelectedComment] = React.useState();\r\n const [commentsGridApi, setCommentsGridApi] = React.useState();\r\n const [deleteConfirmDialogIsOpen, setDeleteConfirmDialogIsOpen] = React.useState(false);\r\n const [commentDialogIsOpen, setCommentDialogIsOpen] = React.useState(false);\r\n const [editNode, setEditNode] = React.useState(null);\r\n const [submitting, setSubmitting] = React.useState(false);\r\n const [context, setContext] = React.useState({});\r\n\r\n const isEditing = editNode !== null;\r\n\r\n const components = {\r\n actionsRenderer: EllipsisButtonActionRenderer\r\n }\r\n\r\n React.useEffect(() => {\r\n setTaskComments([]);\r\n getTaskComments();\r\n }, [props.taskId]);\r\n\r\n React.useEffect(() => {\r\n const context = {\r\n editNode,\r\n submitting,\r\n commentDialogIsOpen,\r\n submitEdit: handleEditSubmission,\r\n endEdit: () => setEditNode(null)\r\n };\r\n\r\n setContext(context);\r\n }, [editNode, submitting, commentDialogIsOpen])\r\n\r\n React.useEffect(() => {\r\n commentsGridApi?.refreshCells({ force: true });\r\n }, [context])\r\n\r\n function handleCommentChange(e: any) {\r\n setNewComment(e.target.value);\r\n }\r\n\r\n function handleAddComment(e: any) {\r\n let taskComment: ITaskComment =\r\n {\r\n taskId: props.taskId || \"\",\r\n comment: newComment,\r\n };\r\n AddComment(taskComment);\r\n }\r\n\r\n const commentHasError = (comment: string) => {\r\n let commentHasError = false;\r\n if (isEmpty(comment)) {\r\n enqueueSnackbar(\"Comment cannot be blank.\", { variant: SnackbarVariantTypes.Error });\r\n commentHasError = true;\r\n }\r\n if (comment.length > commentMaxLength) {\r\n enqueueSnackbar(`Comment must be ${commentMaxLength} characters or less.`, { variant: SnackbarVariantTypes.Error });\r\n commentHasError = true;\r\n }\r\n\r\n return commentHasError;\r\n }\r\n\r\n const { onTrigger: getTaskComments } = useAsyncFunctionIsLoading(async () => {\r\n if (props.taskId) {\r\n const dataReadService = new DataReadService();\r\n\r\n const response = await dataReadService.GetTaskComments(props.taskId)\r\n if (response.status) {\r\n const newComments = response.data.map((item: ITaskComment) => {\r\n return {\r\n ...item,\r\n userHasAccess: item.userId == props.currentUser?.userId\r\n }\r\n })\r\n setTaskComments(newComments)\r\n } else {\r\n const errors = [errorGettingTaskCommentsText, ...response.errorMessages];\r\n Utils.enqueueMultiLineSnackbar(errors, enqueueSnackbar, { variant: SnackbarVariantTypes.Error });\r\n }\r\n }\r\n }, props.onLoadingStatusChanged)\r\n\r\n const AddComment = async (taskComment: ITaskComment) => {\r\n if (taskComment) {\r\n if (commentHasError(taskComment.comment) || submitting) return;\r\n\r\n setSubmitting(true);\r\n const dataWriteService = new DataWriteService();\r\n const result = await dataWriteService.CreateTaskComment(taskComment);\r\n if (result.status) {\r\n enqueueSnackbar(\"Comment saved successfully.\", { variant: SnackbarVariantTypes.Success });\r\n getTaskComments();\r\n setNewComment(\"\");\r\n props.onCommentCreated();\r\n } else {\r\n const errors = [\"Failed to save comment.\", ...result.errorMessages];\r\n Utils.enqueueMultiLineSnackbar(errors, enqueueSnackbar, { variant: SnackbarVariantTypes.Error });\r\n }\r\n setSubmitting(false);\r\n }\r\n }\r\n\r\n const deleteTaskComment = async (taskComment: ITaskComment) => {\r\n if (taskComment && taskComment.taskCommentId) {\r\n const dataWriteService = new DataWriteService();\r\n\r\n const result = await dataWriteService.DeleteTaskComment(taskComment.taskCommentId);\r\n if (result.status) {\r\n var comment = taskComments.find(t => t.taskCommentId == taskComment.taskCommentId);\r\n if (comment) {\r\n const filteredDocs = taskComments.filter((t: any) =>\r\n t.taskCommentId !== taskComment.taskCommentId\r\n );\r\n setTaskComments(filteredDocs);\r\n commentsGridApi && commentsGridApi.setRowData(filteredDocs);\r\n commentsGridApi?.refreshCells();\r\n enqueueSnackbar(\"Comment deleted successfully.\", { variant: SnackbarVariantTypes.Success });\r\n }\r\n } else {\r\n const errors = [\"Failed to delete task comment.\", ...result.errorMessages];\r\n Utils.enqueueMultiLineSnackbar(errors, enqueueSnackbar, { variant: SnackbarVariantTypes.Error });\r\n }\r\n }\r\n }\r\n\r\n const handleDeleteTaskComment = async (comment: ITaskComment) => {\r\n setDeleteConfirmDialogIsOpen(false);\r\n if (selectedComment) {\r\n await deleteTaskComment(selectedComment);\r\n }\r\n }\r\n\r\n const onAttachmentsGridReady = (params: any) => {\r\n setCommentsGridApi(params.api);\r\n }\r\n\r\n const handleEditSubmission = async (newComment: string) => {\r\n if (commentHasError(newComment) || submitting) return;\r\n\r\n setSubmitting(true);\r\n if (newComment && editNode?.data) {\r\n let taskComment = _.cloneDeep(taskComments.find(t => t.taskCommentId === editNode.data.taskCommentId));\r\n if (taskComment) {\r\n taskComment!.comment = newComment;\r\n\r\n const dataWriteService = new DataWriteService();\r\n const result = await dataWriteService.UpdateTaskComment(taskComment);\r\n if (result.status) {\r\n enqueueSnackbar(\"Comment updated successfully.\", { variant: SnackbarVariantTypes.Success });\r\n if (result.response) {\r\n let comment = taskComments.find(t => t.taskCommentId === editNode.data.taskCommentId);\r\n if (comment) {\r\n comment.comment = result.response.data.comment;\r\n comment.updatedDateTime = new Date(Date.now());\r\n\r\n if (commentsGridApi) {\r\n commentsGridApi?.applyTransaction({ update: [...taskComments] });\r\n setTaskComments([...taskComments]);\r\n commentsGridApi.refreshCells({ force: true });\r\n }\r\n }\r\n setEditNode(null);\r\n\r\n }\r\n } else {\r\n const errors = [\"Failed to update comment.\", ...result.errorMessages];\r\n Utils.enqueueMultiLineSnackbar(errors, enqueueSnackbar, { variant: SnackbarVariantTypes.Error });\r\n }\r\n }\r\n setSubmitting(false);\r\n }\r\n }\r\n\r\n const handleDeleteClick = () => {\r\n setDeleteConfirmDialogIsOpen(true);\r\n }\r\n\r\n const handleDeleteConfirmDialogClose = () => {\r\n setDeleteConfirmDialogIsOpen(false);\r\n };\r\n\r\n const handleDeleteConfirmDialogConfirm = async () => {\r\n setDeleteConfirmDialogIsOpen(false);\r\n if (selectedComment) {\r\n handleDeleteTaskComment(selectedComment);\r\n }\r\n };\r\n\r\n const getContextMenuItems = (params: GetContextMenuItemsParams) => {\r\n const node: RowNode | null = params.node;\r\n\r\n if (node === null || !params?.node?.data?.userHasAccess) {\r\n return [];\r\n }\r\n\r\n const result: (string | MenuItemDef)[] = props.disabled\r\n ? []\r\n : [\r\n {\r\n name: \"Edit\",\r\n action: () => {\r\n setEditNode(null);\r\n setEditNode(node);\r\n },\r\n },\r\n {\r\n name: \"Delete\",\r\n action: () => {\r\n setEditNode(null);\r\n setSelectedComment(node.data);\r\n handleDeleteClick();\r\n }\r\n },\r\n ];\r\n\r\n const useCopyOptions = params.column?.getColId() === 'comment';\r\n if (useCopyOptions) {\r\n result.splice(1, 0, 'copy');\r\n }\r\n\r\n return result;\r\n }\r\n\r\n const handleFullScreenClick = () => {\r\n setCommentDialogIsOpen(true);\r\n setEditNode(null);\r\n }\r\n\r\n const handleCommentDialogClose = () => {\r\n setCommentDialogIsOpen(false);\r\n setEditNode(null);\r\n }\r\n\r\n const dateFormatter = (value: Date) => {\r\n return LocalDateTimeString(value, false);\r\n }\r\n\r\n const handleSuppressKeyboardEvent = (params: SuppressKeyboardEventParams) => {\r\n const key = params.event.key;\r\n const keysToIgnoreWithCtrl = ['c', 'v'];\r\n const keysToIgnore = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'];\r\n if (params.event.ctrlKey && keysToIgnoreWithCtrl.includes(key)) {\r\n return true;\r\n }\r\n return keysToIgnore.includes(key);\r\n }\r\n\r\n const commentDetails = <>\r\n
\r\n
\r\n row.data.taskCommentId}\r\n components={components}\r\n readOnlyEdit={true}\r\n editType=\"\"\r\n suppressClickEdit={true}\r\n getContextMenuItems={getContextMenuItems}\r\n onCellClicked={(params: any) => {\r\n if (params.column.colDef.field === '...') {\r\n params.api.contextMenuFactory.showMenu(params.node, params.column, params.value, params.event)\r\n }\r\n }}\r\n stopEditingWhenCellsLoseFocus={true}\r\n defaultColDef={{\r\n editable: false,\r\n sortable: true,\r\n filter: true,\r\n resizable: true,\r\n floatingFilter: true,\r\n suppressMenu: true,\r\n menuTabs: ['generalMenuTab', 'filterMenuTab']\r\n }}\r\n context={context}\r\n >\r\n {!commentDialogIsOpen &&\r\n }\r\n {commentDialogIsOpen &&\r\n \r\n }\r\n {commentDialogIsOpen &&\r\n \r\n }\r\n {commentDialogIsOpen &&\r\n dateFormatter(params.data.commentDateTime)}\r\n minWidth={180}\r\n getQuickFilterText={(params: any) => {\r\n return LocalDateTimeString(params.value, false);\r\n }}\r\n />\r\n }\r\n {commentDialogIsOpen &&\r\n dateFormatter(params.data.updatedDateTime)}\r\n minWidth={180}\r\n getQuickFilterText={(params: any) => {\r\n return LocalDateTimeString(params.value, false);\r\n }}\r\n />\r\n }\r\n\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n commentMaxLength ? classes.errorText : ''}`}>\r\n {newComment.length}/{commentMaxLength}\r\n \r\n
\r\n
\r\n
\r\n \r\n\r\n\r\n return (\r\n <>\r\n {commentDialogIsOpen ?\r\n \r\n \r\n Comments - {props.taskNumber} - {props.taskTitle}\r\n \r\n \r\n {commentDetails}\r\n \r\n \r\n :\r\n \r\n }\r\n aria-controls=\"TaskComments-content\"\r\n id=\"TaskComments-header\"\r\n >\r\n Comments:\r\n {isEditing && Press enter to save}\r\n \r\n \r\n \r\n \r\n \r\n {commentDetails}\r\n \r\n \r\n }\r\n {DeleteCommentWarningText}}\r\n />\r\n \r\n );\r\n\r\n}\r\n\r\nconst mapStateToProps = (state: any) => {\r\n return ({\r\n currentUser: state.currentUser,\r\n })\r\n}\r\n\r\nconst mapDispatchToProps = (dispatch: any) => {\r\n return {\r\n setCurrentUser: (data: any) => dispatch(setCurrentUser(data)),\r\n }\r\n}\r\n\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(TaskComments);\r\n\r\n","import React from 'react';\r\nimport { Accordion, AccordionDetails, AccordionSummary, Tooltip, makeStyles } from '@material-ui/core';\r\nimport { Box, Button, Checkbox, Grid, TextField, Typography, FormControl, FormControlLabel, Paper, Divider, Dialog, DialogActions, DialogContent } from '@material-ui/core';\r\nimport { MuiPickersUtilsProvider, KeyboardDatePicker } from '@material-ui/pickers';\r\nimport DateFnsUtils from '@date-io/date-fns';\r\nimport ITask from \"../../interfaces/ITask\";\r\nimport ITaskDetailsEditorProps from \"./ITaskDetailsEditorProps\";\r\nimport { ConfirmDialog } from \"../ConfirmDialog/ConfirmDialog\";\r\nimport { TaskStatus } from \"../../helpers/enums/TaskStatus\";\r\nimport TaskValidator from \"../../Validators/TaskValidator\";\r\nimport { getLookupKey, getUserNameAllowNull, } from \"../../utilities/lookupUtils\";\r\nimport AttachmentsGrid from \"../AttachmentsGrid/AttachmentsGrid\";\r\nimport DataWriteService from \"../../services/DataWriteService\";\r\nimport { useSnackbar } from 'notistack';\r\nimport { SnackbarVariantTypes } from \"../../helpers/enums/enums\";\r\nimport _ from \"lodash\";\r\nimport ITaskDocument from '../../interfaces/ITaskDocument';\r\nimport { Utils } from '../../utilities/utils';\r\nimport { LocalDateTimeString } from '../../helpers/DateHelpers';\r\nimport { actionButtonVariant, detailPaneAccordionHeaderStyle, detailPaneAccordionStyle, detailPanePadding, detailPaneTextStyle, detailsPaneLastUpdatedStyle, marginAroundDescription } from \"../../helpers/portalTheme\";\r\nimport SaveIcon from '@material-ui/icons/Save';\r\nimport DiscardIcon from '@material-ui/icons/Undo';\r\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\r\nimport AutocompleteField from '../common/AutocompleteField/AutocompleteField';\r\nimport DetailDataField from '../common/DetailDataField/DetailDataField';\r\nimport DetailHeader from '../common/DetailHeader/DetailHeader';\r\nimport { LineOfBusinessId } from '../../helpers/enums/LineOfBusinessId';\r\nimport { getTrimmedTaskEntityForTask, isTaskOverdue } from '../../helpers/TaskHelpers';\r\nimport TaskComments from \"../TaskComments/TaskComments\";\r\nimport DataReadService from '../../services/DataReadService';\r\nimport MultiUserSelector from \"../MultiUserSelector/MultiUserSelector\";\r\nimport SpinnerBackdrop from '../common/SpinnerBackdrop';\r\nimport useAsyncFunctionIsLoading from '../../hooks/useIsLoadingAsync';\r\nimport { Delete } from '@material-ui/icons';\r\nimport DeleteTasksConfirmDialog from '../DeleteTasksConfirmDialog/DeleteTasksConfirmDialog';\r\nimport LastModified from '../RequestDetails/LastModified';\r\nimport RestrictRequestToggle from '../RequestDetails/RestrictRequestToggle';\r\nimport ConditionalVisiblity from '../common/ConditionalVisibility/ConditionalVisiblity';\r\nimport RestrictedIcon from '../common/RestrictedIcon/RestrictedIcon';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n backgroundColor: theme.palette.common.white,\r\n paddingTop: theme.spacing(0),\r\n maxHeight: `calc(100vh - ${theme.spacing(60)}px)`,\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n },\r\n luxInterior: {\r\n ...detailPanePadding,\r\n ...marginAroundDescription,\r\n \"& input,& textarea\": {\r\n ...detailPaneTextStyle\r\n },\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n flex: 1,\r\n overflowY: 'auto',\r\n overflowX: 'hidden',\r\n },\r\n header: {\r\n backgroundColor: theme.palette.mossadams.darkGreen400,\r\n color: theme.palette.primary.contrastText,\r\n \"&& .MuiIconButton-label\": {\r\n color: theme.palette.primary.contrastText,\r\n }\r\n },\r\n column: {\r\n display: \"flex\",\r\n flexDirection: \"column\"\r\n },\r\n formControl: {\r\n width: \"100%\",\r\n marginBottom: theme.spacing(5),\r\n },\r\n formControlLabelStart: {\r\n margin: \"0px 0px 0px 2px\",\r\n display: \"flex\",\r\n \"&.overdue\": {\r\n \"& .MuiInputBase-root input\": {\r\n color: \"red\"\r\n },\r\n \"& time \": {\r\n color: \"red\"\r\n },\r\n }\r\n },\r\n formControlLabelEnd: {\r\n marginLeft: \"0\"\r\n },\r\n label: {\r\n minWidth: theme.spacing(65),\r\n margin: \"0px 12px 0px 0px\",\r\n justifyContent: \"flex-end\",\r\n fontSize: \"1.1rem\",\r\n },\r\n disabledUserInput: {\r\n \"& .MuiSelect-select.MuiSelect-select\": {\r\n color: theme.palette.mossadams.gray200\r\n },\r\n },\r\n row: {\r\n display: \"flex\",\r\n flexDirection: \"row\"\r\n },\r\n draft: {\r\n \"&& .MuiInputBase-input \": {\r\n backgroundColor: theme.palette.background.paper,\r\n color: \"red\"\r\n }\r\n },\r\n completed: {\r\n color: theme.palette.mossadams.gray200,\r\n \"&& input, .MuiInputBase-input\": {\r\n color: theme.palette.mossadams.gray200,\r\n }\r\n },\r\n limitAccess: {\r\n marginRight: \"15px\",\r\n padding: \"15px\",\r\n backgroundColor: theme.palette.background.paper,\r\n \"& .MuiFormControlLabel-label\": {\r\n width: \"100%\"\r\n },\r\n \"& .MuiCheckbox-root\": {\r\n paddingLeft: 0,\r\n paddingTop: 0,\r\n paddingBottom: 0\r\n }\r\n },\r\n nonEditableField: {\r\n fontSize: \"1rem\"\r\n },\r\n checkboxGroup: {\r\n flex: 1,\r\n width: \"100%\"\r\n },\r\n attachments: {},\r\n descriptionTextField: {\r\n marginTop: theme.spacing(4),\r\n \"& .MuiInputLabel-outlined:not(.MuiInputLabel-shrink)\": {\r\n transform: \"translate(20px, 13px) scale(1)\",\r\n },\r\n \"& .MuiOutlinedInput-multiline\": {\r\n padding: '10px 10px',\r\n },\r\n \"&&& textarea\": {\r\n overflowY: \"auto !important\",\r\n maxHeight: \"360px\",\r\n fontSize: \"0.9rem\",\r\n fontFamily: \"inherit\",\r\n lineHeight: \"inherit\"\r\n },\r\n \"& legend\": {\r\n width: \"84px\"\r\n }\r\n },\r\n notesTextField: {\r\n marginTop: theme.spacing(4),\r\n \"& .MuiInputLabel-outlined:not(.MuiInputLabel-shrink)\": {\r\n transform: \"translate(20px, 13px) scale(1)\",\r\n },\r\n \"& .MuiOutlinedInput-multiline\": {\r\n padding: '10px 10px',\r\n },\r\n \"&&& textarea\": {\r\n overflowY: \"auto !important\",\r\n maxHeight: \"360px\",\r\n fontSize: \"0.9rem\",\r\n fontFamily: \"inherit\",\r\n lineHeight: \"inherit\"\r\n },\r\n \"& legend\": {\r\n width: \"84px\"\r\n }\r\n },\r\n buttonRow: {\r\n display: \"flex\",\r\n marginRight: theme.spacing(-5),\r\n marginLeft: theme.spacing(-5),\r\n },\r\n actionButton: {\r\n ...actionButtonVariant\r\n },\r\n accordion: {\r\n ...detailPaneAccordionStyle\r\n },\r\n accordionHeader: {\r\n ...detailPaneAccordionHeaderStyle\r\n },\r\n lastUpdated: {\r\n ...detailsPaneLastUpdatedStyle\r\n },\r\n dateInput: {\r\n \"& .MuiInputBase-input\": {\r\n padding: '4px 0 6px 0'\r\n }\r\n }\r\n}))\r\n\r\nexport const IsDirtyDisabledMessage = \"You must Save or Discard Changes to the request to update comments and attachments.\";\r\n\r\nexport const TaskDetailsEditor = (props: ITaskDetailsEditorProps): JSX.Element => {\r\n const {\r\n onTaskDocumentUpdated: handleTaskDocumentsUpdated\r\n } = props;\r\n\r\n const classes = useStyles();\r\n const { enqueueSnackbar } = useSnackbar();\r\n\r\n const [cancelConfirmDialogIsOpen, setCancelConfirmDialogIsOpen] = React.useState(false);\r\n const [updatedTask, setUpdatedTask] = React.useState(props.task);\r\n const [taskDocuments, setTaskDocuments] = React.useState([]);\r\n const [originalTask, setOriginalTask] = React.useState(props.task);\r\n const [commentsLoading, setCommentsLoading] = React.useState(false);\r\n const [attachmentsLoading, setAttachmentsLoading] = React.useState(false);\r\n const [isDirty, setIsDirty] = React.useState(false);\r\n const [deleteDialogOpen, setDeleteDialogOpen] = React.useState(false);\r\n\r\n let taskValidator = new TaskValidator(props.taskTypeList ? props.taskTypeList : []);\r\n\r\n React.useEffect(() => {\r\n setOriginalTask(props.task);\r\n setUpdatedTask(props.task);\r\n if (props.task.isNew) {\r\n setIsDirty(true);\r\n }\r\n }, [props.task]);\r\n\r\n React.useEffect(() => {\r\n props.onDataChanged(isDirty);\r\n }, [isDirty]);\r\n\r\n React.useEffect(() => {\r\n if (updatedTask.isNew) {\r\n setIsDirty(true);\r\n } else {\r\n setIsDirty(taskIsDirty());\r\n }\r\n\r\n }, [updatedTask]);\r\n\r\n const taskIsDirty = () => {\r\n return !_.isEqual(updatedTask, originalTask);\r\n }\r\n\r\n const handleRequestDateChange = (date: any) => {\r\n const task = { ...updatedTask, requestedDate: date };\r\n setUpdatedTask({\r\n ...task,\r\n isOverdue: isTaskOverdue(task)\r\n });\r\n };\r\n\r\n const handleCheckboxChange = (e: any) => {\r\n if (e === null) {\r\n return;\r\n }\r\n switch (e.target.name) {\r\n default:\r\n setUpdatedTask({\r\n ...updatedTask,\r\n [e.target.name]: e.target.checked,\r\n });\r\n break;\r\n }\r\n }\r\n\r\n const handleFieldChange = (e: any) => {\r\n if (e === null) {\r\n return;\r\n }\r\n switch (e.target.name) {\r\n case \"taskStatusDescription\":\r\n const statusId = getLookupKey(props.taskStatusList!, e.target.value);\r\n setUpdatedTask({\r\n ...updatedTask,\r\n taskStatusId: statusId,\r\n taskStatusDescription: e.target.value,\r\n });\r\n break;\r\n case \"socStatusDescription\":\r\n const socStatusId = getLookupKey(props.socStatusList!, e.target.value);\r\n setUpdatedTask({\r\n ...updatedTask,\r\n socStatusId: socStatusId,\r\n socStatusDescription: e.target.value,\r\n });\r\n break;\r\n case \"taskTypeDescription\":\r\n const typeId = getLookupKey(props.taskTypeList!, e.target.value);\r\n setUpdatedTask({\r\n ...updatedTask,\r\n taskTypeId: typeId,\r\n taskTypeDescription: e.target.value,\r\n });\r\n break;\r\n case \"taskPriorityDescription\":\r\n const priorityId = getLookupKey(props.taskPriorityList!, e.target.value);\r\n setUpdatedTask({\r\n ...updatedTask,\r\n taskPriorityId: priorityId,\r\n taskPriorityDescription: e.target.value,\r\n });\r\n break;\r\n case \"areaDescription\":\r\n const areaId = getLookupKey(props.areaList!, e.target.value);\r\n setUpdatedTask({\r\n ...updatedTask,\r\n areaId: areaId,\r\n areaDescription: e.target.value,\r\n });\r\n break;\r\n case \"phaseDescription\":\r\n const phaseId = getLookupKey(props.phaseList!, e.target.value);\r\n setUpdatedTask({\r\n ...updatedTask,\r\n phaseId: phaseId,\r\n phaseDescription: e.target.value,\r\n });\r\n break;\r\n case \"mossAdamsContactUserId\":\r\n const mossAdamsContactUserName = getUserNameAllowNull(props.mossAdamsUserList!, e.target.value);\r\n setUpdatedTask({\r\n ...updatedTask,\r\n mossAdamsContactUserId: e.target.value,\r\n mossAdamsContactUserName: mossAdamsContactUserName\r\n });\r\n break;\r\n case \"taskEntity\":\r\n setUpdatedTask({\r\n ...updatedTask,\r\n taskEntity: e.target.value === '' ? null : e.target.value.trimStart(),\r\n });\r\n break;\r\n\r\n case \"notes\":\r\n setUpdatedTask({\r\n ...updatedTask,\r\n notes: e.target.value === '' ? null : e.target.value.trimStart(),\r\n });\r\n break;\r\n case \"title\":\r\n case \"description\":\r\n default:\r\n setUpdatedTask({\r\n ...updatedTask,\r\n [e.target.name]: e.target.value,\r\n });\r\n break;\r\n }\r\n }\r\n\r\n const handleCancelClick = () => {\r\n setCancelConfirmDialogIsOpen(true);\r\n }\r\n const handleCancelConfirmDialogClose = () => { //discard => no\r\n setCancelConfirmDialogIsOpen(false);\r\n };\r\n const handleCancelConfirmDialogConfirm = () => { //discard => yes\r\n setCancelConfirmDialogIsOpen(false);\r\n\r\n if (updatedTask.isNew) {\r\n props.onCancelNewTask();\r\n }\r\n setUpdatedTask(originalTask);\r\n };\r\n\r\n const handleSaveClick = async () => {\r\n saveTask();\r\n }\r\n\r\n const getUpdatedTaskStatus = (task: ITask) => {\r\n if ((task.taskStatusId == TaskStatus.New.id || task.taskStatusId == TaskStatus.MossAdamsResponded.id) && props.currentUser?.isMossAdamsStaff == false) {\r\n task.taskStatusId = TaskStatus.SubmittedByClient.id;\r\n task.taskStatusDescription = TaskStatus.SubmittedByClient.string;\r\n }\r\n if ((task.taskStatusId == TaskStatus.New.id || task.taskStatusId == TaskStatus.SubmittedByClient.id) && props.currentUser?.isMossAdamsStaff == true) {\r\n task.taskStatusId = TaskStatus.MossAdamsResponded.id;\r\n task.taskStatusDescription = TaskStatus.MossAdamsResponded.string;\r\n }\r\n return task;\r\n }\r\n\r\n const handleCommentCreated = () => {\r\n var updatedData: ITask = {\r\n ...originalTask,\r\n }\r\n updatedData = getUpdatedTaskStatus(updatedData);\r\n\r\n if (originalTask.taskStatusId !== updatedData.taskStatusId) {\r\n updatedData.updatedDateTime = new Date();\r\n\r\n setOriginalTask(updatedData);\r\n setUpdatedTask(updatedData);\r\n props.onTaskUpdated(updatedData, updatedData.isNew);\r\n }\r\n }\r\n\r\n const handleAssigneesChange = (e: any, newValue: any) => {\r\n setUpdatedTask({\r\n ...updatedTask,\r\n taskAssignees: newValue,\r\n });\r\n }\r\n\r\n const { onTrigger: saveTask, loading: submitting } = useAsyncFunctionIsLoading(async () => {\r\n if (isDirty) {\r\n if (taskValidator.TaskIsValid(updatedTask) === false) {\r\n enqueueSnackbar(\"There are invalid values, please correct before saving.\", { variant: SnackbarVariantTypes.Error });\r\n return;\r\n }\r\n\r\n if (taskDocuments.length > 1 && updatedTask.allowMultipleAttachments === false && originalTask.allowMultipleAttachments === true) {\r\n enqueueSnackbar(\"You cannot unselect Allow Multiple Attachments while there are multiple attachments.\", { variant: SnackbarVariantTypes.Error });\r\n return;\r\n }\r\n\r\n const request: ITask = { ...updatedTask, taskEntity: getTrimmedTaskEntityForTask(updatedTask) };\r\n const dataWriteService = new DataWriteService();\r\n const dataReadService = new DataReadService();\r\n const result = await dataWriteService.UpdateTask(request);\r\n if (result.status) {\r\n const fetchedTask = await dataReadService.GetListOfTasks({ TaskListId: request.taskListId, Tasks: [request] });\r\n\r\n if (result.response && fetchedTask.data?.[0]) {\r\n const task: ITask = fetchedTask.data?.[0];\r\n task.engagementLineOfBusinessId = updatedTask.engagementLineOfBusinessId;\r\n task.hasAttachments = taskDocuments.length > 0;\r\n setUpdatedTask(task);\r\n props.onTaskUpdated(task, updatedTask.isNew);\r\n setIsDirty(false);\r\n enqueueSnackbar(\"Request saved successfully.\", { variant: SnackbarVariantTypes.Success });\r\n }\r\n else {\r\n enqueueSnackbar(\"Failed to retrieve updated request.\", { variant: SnackbarVariantTypes.Error });\r\n }\r\n\r\n } else {\r\n const errors = [\"Failed to save task.\", ...result.errorMessages];\r\n Utils.enqueueMultiLineSnackbar(errors, enqueueSnackbar, { variant: SnackbarVariantTypes.Error });\r\n }\r\n }\r\n });\r\n\r\n const onUpdateTaskRestriction = (task: ITask): void => {\r\n props.onTaskUpdated(task, false, false);\r\n setOriginalTask(task);\r\n const updated = isDirty ? { ...updatedTask, updatedDateTime: task.updatedDateTime, isRestricted: task.isRestricted } : { ...task };\r\n setUpdatedTask(updated);\r\n }\r\n\r\n return (\r\n <>\r\n {updatedTask ?\r\n \r\n Are you sure you would like to discard changes?}\r\n />\r\n setDeleteDialogOpen(false)}\r\n tasks={[props.task]}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n","import { makeStyles } from '@material-ui/core';\r\nimport React from 'react';\r\nimport { boxShadow } from '../../helpers/portalTheme';\r\n\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n\r\n popup: {\r\n overflow: 'hidden',\r\n backgroundColor: theme.palette.background.paper,\r\n color: theme.palette.primary.dark,\r\n padding: theme.spacing(4),\r\n fontSize: '0.88rem',\r\n fontFamily: \"Founders Grotesk Reg\",\r\n width: 'max-content',\r\n maxWidth: '33vw',\r\n maxHeight: '60vh',\r\n whiteSpace: 'break-spaces',\r\n border: '1px solid black',\r\n filter: `drop-shadow(${boxShadow.boxShadow})`,\r\n },\r\n\r\n}));\r\n\r\nconst replaceMultiLineBreaks = (text: string) => {\r\n return text.replace(/(\\r\\n|\\r|\\n){2,}/g, '$1\\n'); // replace multiple line breaks with a single line break.\r\n}\r\n\r\nexport const RequestDescriptionTooltip = (params: any) => {\r\n const classes = useStyles();\r\n\r\n let text = params.value.substring(0, 501);\r\n text = replaceMultiLineBreaks(text);\r\n const truncatedText = '...\\n\\n Please click the request to view the full description.';\r\n\r\n return
\r\n        {text}{text.length === params.value.length ? '' : {truncatedText}}\r\n    
\r\n}\r\n\r\nexport const RequestNotesTooltip = (params: any) => {\r\n const classes = useStyles();\r\n let text = replaceMultiLineBreaks(params.value);\r\n return
\r\n        {text}\r\n    
\r\n \r\n}","import { GroupCellRendererParams } from \"@ag-grid-enterprise/all-modules\";\r\nimport { LocalDateTimeString } from \"../../helpers/DateHelpers\";\r\nimport { taskIsNotPlaceholderNode } from \"../../helpers/TaskHelpers\";\r\nimport RestrictedIcon from \"../common/RestrictedIcon/RestrictedIcon\";\r\nimport { Tooltip } from \"@material-ui/core\";\r\n\r\nexport const dateRenderer = (params: GroupCellRendererParams) => {\r\n return (\r\n \r\n {params.value && LocalDateTimeString(params.value as Date, false)}\r\n \r\n );\r\n}\r\n\r\nexport const attachmentsRenderer = (params: GroupCellRendererParams) => {\r\n if (!(params && params.data) || params.data.taskNumber === '') return null;\r\n return (\r\n \r\n {params.data.hasAttachments ? \"Yes\" : \"No\"}\r\n \r\n );\r\n}\r\n\r\nexport const entityCellRenderer = (props: GroupCellRendererParams) => {\r\n const value = props.value;\r\n const isGroupNode = props?.node?.group;\r\n\r\n return (isGroupNode\r\n ? {value}\r\n : <>{taskIsNotPlaceholderNode(props?.node?.data) ? value : ''})\r\n}\r\n\r\n\r\nexport const restrictedRenderer = (params: GroupCellRendererParams) => {\r\n return params?.data?.isRestricted\r\n ? \r\n \r\n \r\n \r\n \r\n : null\r\n}\r\n","import { ValueFormatterParams } from \"@ag-grid-community/core\";\r\nimport IUser from \"../../interfaces/IUser\";\r\nimport IUserEngagement from \"../../interfaces/IUserEngagement\";\r\nimport ITaskAssignee from \"../../interfaces/ITaskAssignee\";\r\n\r\n\r\nexport const assignedToUserNameValueFormatter = (params: ValueFormatterParams, clientUserList: IUser[] | null, userEngagementList: IUserEngagement[]) => {\r\n if (!(params && params.data)) return null;\r\n\r\n let assignees: string[] = [];\r\n\r\n params.data.taskAssignees.forEach((assignee: ITaskAssignee) => {\r\n const user = clientUserList?.find(\r\n user => user.userId === assignee.userId\r\n );\r\n const userEngagement = userEngagementList.find(\r\n ue =>\r\n ue.userId === assignee.userId &&\r\n ue.engagementId === params.data.engagementId\r\n );\r\n if (userEngagement && user?.isActive) {\r\n assignees.push(assignee.displayName ? assignee.displayName : '');\r\n } else {\r\n assignees.push(assignee.displayName + ' (Inactive)');;\r\n }\r\n });\r\n return assignees.join(', ');\r\n}\r\n\r\nexport const mossAdamsContactUserNameValueFormatter = (params: ValueFormatterParams, mossAdamsUserList: IUser[], userEngagementList: IUserEngagement[]) => {\r\n if (!(params && params.data)) return null;\r\n const user = mossAdamsUserList?.find(\r\n user => user.userId === params.data.mossAdamsContactUserId\r\n );\r\n const userEngagement = userEngagementList.find(\r\n ue =>\r\n ue.userId === params.data.mossAdamsContactUserId &&\r\n ue.engagementId === params.data.engagementId\r\n );\r\n if (userEngagement && user?.isActive) {\r\n return params.value;\r\n } else {\r\n return params.value && `${params.value} (Inactive)`;\r\n }\r\n}","import React from 'react'\r\nimport { UploadParams } from './UploadParams';\r\n\r\nexport interface FileUploadContext {\r\n files: File[];\r\n handleFileChange: (files: File[]) => void;\r\n handleRemoveFile: (file: File) => void;\r\n cancelUpload: () => void;\r\n initiateUpload: (params: UploadParams) => Promise;\r\n uploadNewVersionOnCollision: () => Promise;\r\n uploadWithRenameOnCollision: () => Promise;\r\n fileNameCollisions: File[];\r\n uploadingBackdrop: JSX.Element;\r\n}\r\n\r\nexport const FileUploadContext = React.createContext(null);\r\n\r\n","import React from 'react';\r\nimport { Backdrop, Box, CircularProgress, Grid, Typography } from '@material-ui/core';\r\nimport { makeStyles } from \"@material-ui/core/styles\";\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n backdrop: {\r\n zIndex: 100000,\r\n color: theme.palette.common.white,\r\n },\r\n uploadProgress: {\r\n backgroundColor: theme.palette.primary.main,\r\n borderRadius: \"50%\"\r\n },\r\n uploadProgressText: {\r\n color: theme.palette.common.white,\r\n fontSize: \"1.2rem\"\r\n }\r\n}));\r\n\r\nexport interface IUploadingBackdropProps {\r\n progress: number;\r\n isUploading: boolean;\r\n}\r\n\r\n\r\nconst ProgressSpinnerBackdrop = (props: IUploadingBackdropProps) => {\r\n const [showProcessing, setShowProcessing] = React.useState(false);\r\n\r\n const classes = useStyles();\r\n\r\n if (props.progress === 99) {\r\n setTimeout(() => {\r\n setShowProcessing(true);\r\n }, 5000);\r\n }\r\n else if (showProcessing) {\r\n setShowProcessing(false);\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {`${props.progress}%`}\r\n \r\n
\r\n \r\n {showProcessing &&\r\n <>\r\n \r\n Finalizing upload, please wait.\r\n \r\n \r\n For large uploads this may take a few minutes.\r\n \r\n \r\n }\r\n \r\n \r\n )\r\n}\r\n\r\nexport default ProgressSpinnerBackdrop;","import React from 'react'\r\nimport { ConfirmDialog } from '../../../components/ConfirmDialog/ConfirmDialog'\r\nimport { Typography } from '@material-ui/core';\r\nimport { useFileUploadContext } from '../../../hooks/useFileUploadContext';\r\n\r\nexport default function FileNameCollisionDialog() {\r\n const [open, setOpen] = React.useState(false);\r\n const {\r\n files,\r\n uploadNewVersionOnCollision,\r\n uploadWithRenameOnCollision,\r\n uploadingBackdrop,\r\n fileNameCollisions,\r\n cancelUpload\r\n } = useFileUploadContext();\r\n\r\n React.useEffect(() => {\r\n if (fileNameCollisions.length && !open) {\r\n setOpen(true);\r\n }\r\n else if (!fileNameCollisions.length && open) {\r\n setOpen(false);\r\n }\r\n }, [fileNameCollisions])\r\n\r\n const onClickClose = () => {\r\n setOpen(false);\r\n cancelUpload();\r\n }\r\n\r\n return (<>\r\n {uploadingBackdrop}\r\n 1) ? 's' : ''}`}\r\n confirmWithOptionsButtonText=\"Save as New\"\r\n closeButtonText=\"Cancel\"\r\n children={<>\r\n \r\n The following files already exist. How do you want to proceed?\r\n \r\n {fileNameCollisions.map((file) => ({file.name}))}\r\n \r\n \r\n }\r\n />\r\n \r\n )\r\n}\r\n","import React, { useCallback } from 'react'\r\nimport { useFileUpload } from './hooks/useFileUpload';\r\nimport IDocumentsUploadModel from '../../interfaces/IDocumentsUploadModel';\r\nimport { FileUploadContext } from './FileUploadContext';\r\nimport { useGetFileCollisions } from './hooks/useGetFileCollisions';\r\nimport ProgressSpinnerBackdrop from '../../components/common/ProgressSpinnerBackdrop/ProgressSpinnerBackdrop';\r\nimport SpinnerBackdrop from '../../components/common/SpinnerBackdrop';\r\nimport { defaultUploadParams, UploadParams } from './UploadParams';\r\nimport _ from 'lodash';\r\nimport UploadConfirmationDialog from './dialogs/UploadConfirmationDialog';\r\nimport FileNameCollisionDialog from './dialogs/FileNameCollisionDialog';\r\n\r\nexport interface FileUploadContextProviderProps {\r\n children: React.ReactNode;\r\n}\r\n\r\ninterface UploadState {\r\n params: UploadParams;\r\n awaitingConfirmation: boolean;\r\n fileNameCollisions: File[];\r\n}\r\n\r\nconst defaultUploadState = {\r\n params: defaultUploadParams,\r\n awaitingConfirmation: false,\r\n fileNameCollisions: []\r\n}\r\n\r\nexport const FileUploadContextProvider = ({ children }: FileUploadContextProviderProps) => {\r\n const [uploadState, setUploadState] = React.useState(defaultUploadState);\r\n\r\n const {\r\n files,\r\n updateSelectedFiles,\r\n handleUpload,\r\n uploadProgress,\r\n isUploading,\r\n uploadResult,\r\n } = useFileUpload();\r\n\r\n const { getDuplicateFiles, loadingNameCollisions } = useGetFileCollisions();\r\n \r\n const canUploadFiles = () => {\r\n return files.length \r\n && !_.isEqual(defaultUploadParams, uploadState.params) \r\n && !uploadState.awaitingConfirmation\r\n && !isUploading\r\n && !loadingNameCollisions;\r\n }\r\n\r\n React.useEffect(() => {\r\n if (canUploadFiles()) {\r\n uploadFiles();\r\n } \r\n },[uploadState.params, uploadState.awaitingConfirmation])\r\n\r\n const onAfterUploadAttempted = () => {\r\n if (uploadResult) {\r\n if (uploadResult.status) {\r\n uploadState.params.uploadSuccessCallback(uploadResult);\r\n }\r\n else {\r\n uploadState.params.uploadFailureCallback(uploadResult);\r\n }\r\n onUploadEnded();\r\n }\r\n }\r\n\r\n React.useEffect(onAfterUploadAttempted, [uploadResult])\r\n\r\n const checkForFileNameCollisions = async () => {\r\n const nameCollisions = uploadState.params.uploadModel.newVersionDocumentId === null\r\n ? await getDuplicateFiles(files, uploadState.params.uploadModel.folderId)\r\n : [];\r\n if (nameCollisions === undefined) {\r\n return;\r\n }\r\n\r\n setUploadState(current => ({\r\n ...current,\r\n fileNameCollisions: nameCollisions\r\n }));\r\n return nameCollisions;\r\n }\r\n\r\n const getUploadModel = (overwriteExisting: boolean = true) => {\r\n const model = {...uploadState.params.uploadModel};\r\n model.overwriteExisting = overwriteExisting;\r\n return model;\r\n }\r\n\r\n const handleRemoveFile = (fileToRemove: File) => {\r\n const remainingFiles = files.filter((file) => file.name !== fileToRemove.name);\r\n updateSelectedFiles(remainingFiles);\r\n }\r\n\r\n const uploadFiles = async () => {\r\n const nameCollisions = await checkForFileNameCollisions();\r\n\r\n if (nameCollisions && !nameCollisions?.length) {\r\n await handleUpload(getUploadModel(), uploadState.params.showDefaultSuccessToast);\r\n }\r\n }\r\n\r\n const uploadNewVersionOnCollision = async () => {\r\n if (canUploadFiles() && uploadState.fileNameCollisions.length) {\r\n await handleUpload(getUploadModel(), uploadState.params.showDefaultSuccessToast);\r\n }\r\n }\r\n\r\n const uploadWithRenameOnCollision = async () => {\r\n if (canUploadFiles() && uploadState.fileNameCollisions.length) {\r\n await handleUpload(getUploadModel(false), uploadState.params.showDefaultSuccessToast);\r\n }\r\n }\r\n\r\n const initiateUpload = async (params: UploadParams, isConfirmed: boolean = false) => {\r\n const requiresConfirmation = Boolean(params.confirmationDialogConfig) && !isConfirmed;\r\n \r\n setUploadState({\r\n params,\r\n awaitingConfirmation: requiresConfirmation,\r\n fileNameCollisions: []\r\n });\r\n }\r\n\r\n const confirmUpload = () => {\r\n setUploadState(current => ({\r\n ...current,\r\n awaitingConfirmation: false,\r\n }));\r\n }\r\n\r\n const cancelUpload = () => {\r\n onUploadEnded();\r\n }\r\n\r\n const onUploadEnded = () => {\r\n uploadState.params.onEndedCallback();\r\n setUploadState({...defaultUploadState});\r\n }\r\n\r\n const uploadingBackdrop = isUploading \r\n ? \r\n : ;\r\n\r\n const value: FileUploadContext = {\r\n files,\r\n fileNameCollisions: uploadState.fileNameCollisions,\r\n handleFileChange: updateSelectedFiles,\r\n handleRemoveFile,\r\n initiateUpload,\r\n cancelUpload,\r\n uploadNewVersionOnCollision,\r\n uploadWithRenameOnCollision,\r\n uploadingBackdrop,\r\n }\r\n\r\n return \r\n {children}\r\n \r\n \r\n \r\n}","import React from 'react'\r\nimport IDocumentByFileNameRequestModel, { IDocumentByFileName } from '../../../interfaces/IDocumentByFileNameRequestModel';\r\nimport DataReadService from '../../../services/DataReadService';\r\nimport { getFileExtensionFromFileName } from '../../../helpers/FileHelpers';\r\nimport { Utils } from '../../../utilities/utils';\r\nimport { useSnackbar } from 'notistack';\r\nimport { SnackbarVariantTypes } from '../../../helpers/enums/enums';\r\nimport useAsyncFunctionIsLoading from '../../../hooks/useIsLoadingAsync';\r\n\r\nexport const restrictedFilenameCollision = \"A file with that name already exists. Restricted file names must be unique.\";\r\n\r\nexport const useGetFileCollisions = () => {\r\n const { enqueueSnackbar } = useSnackbar();\r\n\r\n const detectDuplicateFileNames = async (files: File[], folderId: string) => {\r\n const filesDtos = files.map((file) => {\r\n return {\r\n folderId: folderId || '',\r\n fileName: file.name,\r\n fileExtension: getFileExtensionFromFileName(file.name),\r\n } as IDocumentByFileName;\r\n })\r\n\r\n const model: IDocumentByFileNameRequestModel = {\r\n files: filesDtos || []\r\n }\r\n const dataReadService = new DataReadService();\r\n return await dataReadService.GetDocumentByFileName(model).then(async (response) => {\r\n if (response.errorMessages.length) {\r\n Utils.enqueueMultiLineSnackbar([...response.errorMessages], enqueueSnackbar, { variant: SnackbarVariantTypes.Error });\r\n return;\r\n }\r\n\r\n if (response.data.length > 0) {\r\n const nameCollisions = files?.filter(\r\n (file) => {\r\n return response.data.find((existingFile) => {\r\n return file.name.toLowerCase() === existingFile.displayName.toLowerCase();\r\n })\r\n }\r\n )\r\n\r\n return nameCollisions;\r\n }\r\n return [];\r\n });\r\n }\r\n\r\n const { onTrigger: getDuplicateFiles, loading: loadingNameCollisions } = useAsyncFunctionIsLoading(detectDuplicateFileNames);\r\n\r\n return { getDuplicateFiles, loadingNameCollisions }\r\n}","import _ from \"lodash\";\r\nimport IDocumentsUploadModel from \"../../interfaces/IDocumentsUploadModel\";\r\nimport IPlatformApiPostResult from \"../../interfaces/IPlatformApiPostResult\";\r\nimport ITask from \"../../interfaces/ITask\";\r\nimport { UploadConfirmationConfig } from \"./dialogs/UploadConfirmationDialog\";\r\n\r\nexport interface UploadParams {\r\n uploadSuccessCallback: (result: IPlatformApiPostResult) => void;\r\n uploadFailureCallback: (result: IPlatformApiPostResult) => void;\r\n onEndedCallback: () => void;\r\n confirmationDialogConfig?: UploadConfirmationConfig;\r\n uploadModel: IDocumentsUploadModel;\r\n showDefaultSuccessToast: boolean;\r\n}\r\n\r\nconst defaultUploadModel: IDocumentsUploadModel = {\r\n folderId: \"\",\r\n permittedUsers: [],\r\n suppressNotifications: true,\r\n newVersionDocumentId: null,\r\n task: null,\r\n isPrivate: false,\r\n documentFiles: [],\r\n overwriteExisting: false\r\n}\r\n\r\nexport const defaultUploadParams: UploadParams = {\r\n uploadModel: {...defaultUploadModel},\r\n uploadSuccessCallback: () => {},\r\n uploadFailureCallback: () => {},\r\n onEndedCallback: () => {},\r\n confirmationDialogConfig: undefined,\r\n showDefaultSuccessToast: true,\r\n};\r\n\r\nexport const createUploadParams = (): UploadParamsBuilder => {\r\n return new UploadParamsBuilder();\r\n};\r\n\r\nclass UploadParamsBuilder {\r\n private params: UploadParams;\r\n\r\n constructor() {\r\n this.params = _.cloneDeep(defaultUploadParams);\r\n }\r\n\r\n withFolderId(id: string): UploadParamsBuilder {\r\n this.params.uploadModel.folderId = id;\r\n return this;\r\n }\r\n\r\n withRestriction(isRestricted: boolean): UploadParamsBuilder {\r\n this.params.uploadModel.isPrivate = isRestricted;\r\n return this;\r\n }\r\n\r\n withPermittedUsers(users: string[]): UploadParamsBuilder {\r\n this.params.uploadModel.permittedUsers = users;\r\n return this;\r\n }\r\n\r\n withNotifications(sendBackendNotifications: boolean, showDefaultSuccessToast: boolean = true): UploadParamsBuilder {\r\n this.params.uploadModel.suppressNotifications = !sendBackendNotifications;\r\n this.params.showDefaultSuccessToast = showDefaultSuccessToast;\r\n return this;\r\n }\r\n\r\n withNewVersionId(id: string | null): UploadParamsBuilder {\r\n this.params.uploadModel.newVersionDocumentId = id;\r\n return this;\r\n }\r\n\r\n withRequestAttachment(task: ITask | null): UploadParamsBuilder {\r\n this.params.uploadModel.task = task;\r\n return this;\r\n }\r\n\r\n withConfirmationDialog(config: UploadConfirmationConfig): UploadParamsBuilder {\r\n this.params.confirmationDialogConfig = config;\r\n return this;\r\n }\r\n\r\n onSuccess(callback: (result: IPlatformApiPostResult) => void): UploadParamsBuilder {\r\n this.params.uploadSuccessCallback = callback;\r\n return this;\r\n }\r\n\r\n onFailure(callback: (result: IPlatformApiPostResult) => void): UploadParamsBuilder {\r\n this.params.uploadFailureCallback = callback;\r\n return this;\r\n }\r\n \r\n onEnded(callback: () => void): UploadParamsBuilder {\r\n this.params.onEndedCallback = callback;\r\n return this;\r\n }\r\n\r\n build(): UploadParams {\r\n if (!Boolean(this.params.uploadModel.folderId)) {\r\n throw new Error('folderId is required');\r\n }\r\n return this.params as UploadParams;\r\n }\r\n}","import { ConfirmDialog } from '../../../components/ConfirmDialog/ConfirmDialog'\r\nimport { Typography } from '@material-ui/core';\r\n\r\nexport interface UploadConfirmationDialogProps {\r\n config?: UploadConfirmationConfig;\r\n onConfirm: () => void;\r\n onCancel: () => void;\r\n isOpen: boolean;\r\n}\r\n\r\nexport default function UploadConfirmationDialog(props: UploadConfirmationDialogProps) {\r\n if (!props.config) return null;\r\n\r\n const onConfirm = () => {\r\n props.onConfirm();\r\n }\r\n\r\n const onClose = () => {\r\n props.onCancel();\r\n }\r\n\r\n return <>\r\n \r\n \r\n {props.config.message}\r\n \r\n }\r\n />\r\n \r\n}\r\n\r\nexport interface UploadConfirmationConfig {\r\n message: string;\r\n title?: string;\r\n}\r\n\r\nexport const clientLevelUploadsConfirmation: UploadConfirmationConfig = {\r\n message: 'Note: these files will be visible to all users with access to this or any other engagement portal within this client. Are you sure you want to proceed?',\r\n title: 'Upload Files At Client Level?'\r\n}\r\n","import React from \"react\";\r\nimport DataWriteService from \"../../../services/DataWriteService\";\r\nimport IDocumentsUploadModel from \"../../../interfaces/IDocumentsUploadModel\";\r\nimport { useSnackbar } from \"notistack\";\r\nimport IPlatformApiPostResult from \"../../../interfaces/IPlatformApiPostResult\";\r\nimport { validateFiles } from \"../../../Validators/FileValidators\";\r\nimport { SnackbarVariantTypes } from \"../../../helpers/enums/enums\";\r\nimport { Utils } from \"../../../utilities/utils\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { setClientEngagementSelectorDisabled } from \"../../../store/actions\";\r\nimport { AxiosProgressEvent } from \"axios\";\r\nimport ICurrentUser from \"../../../interfaces/ICurrentUser\";\r\n\r\nexport const errorUploadingFileText = 'There was an error uploading the file(s).';\r\nexport const successfullyUploadedFileText = 'Unrestricted file(s) uploaded successfully.';\r\nexport const successfullyUploadedRestrictedFileText = 'Restricted file(s) uploaded successfully.';\r\nexport const restrictedRequestAttachmentSuccess = \"The file(s) uploaded successfully and only the Assignee(s) of the request have access.\";\r\nexport const maUserUploadWarning = 'If you are intending to limit access, please utilize the restriction options.';\r\n\r\nexport const useFileUpload = () => {\r\n const [files, setFiles] = React.useState([]);\r\n const [uploadProgress, setUploadProgress] = React.useState(0);\r\n const [isUploading, setIsUploading] = React.useState(false);\r\n const [uploadResult, setUploadResult] = React.useState(null);\r\n const currentUser = useSelector((state: any) => state.currentUser as ICurrentUser);\r\n\r\n const dispatch = useDispatch();\r\n\r\n const { enqueueSnackbar } = useSnackbar();\r\n\r\n const updateSelectedFiles = (files: File[]) => {\r\n if (!files.length) {\r\n setFiles(files);\r\n return;\r\n }\r\n setUploadProgress(0);\r\n\r\n const { fileSetSizeValidation, validFiles, invalidFiles } = validateFiles(files);\r\n\r\n if (fileSetSizeValidation.isNotValid) {\r\n enqueueSnackbar(fileSetSizeValidation.error, { variant: SnackbarVariantTypes.Error });\r\n return;\r\n }\r\n if (invalidFiles.length) {\r\n invalidFiles.forEach(invalidFile => {\r\n enqueueSnackbar(invalidFile.validation.error, { variant: SnackbarVariantTypes.Error });\r\n })\r\n return;\r\n }\r\n\r\n setFiles(validFiles);\r\n }\r\n\r\n const handleUploadProgress = (e: AxiosProgressEvent) => {\r\n if (e.loaded && e.total) {\r\n let percentComplete = Math.round((e.loaded * 100) / e.total);\r\n\r\n if (percentComplete == 100) {\r\n percentComplete = 99;\r\n }\r\n setUploadProgress(percentComplete);\r\n }\r\n }\r\n\r\n const handleUpload = async (model: IDocumentsUploadModel, showDefaultSuccessToast = true) => {\r\n if (files.length && !isUploading) {\r\n dispatch(setClientEngagementSelectorDisabled(true));\r\n setIsUploading(true);\r\n setUploadResult(null);\r\n model.documentFiles = files;\r\n\r\n const service = new DataWriteService();\r\n let result: IPlatformApiPostResult = Boolean(model.task)\r\n ? await service.PostAttachments(model, handleUploadProgress)\r\n : await service.PostDocuments(model, handleUploadProgress);\r\n \r\n setUploadProgress(100);\r\n setUploadResult(result);\r\n\r\n if (result.status) {\r\n setFiles([]);\r\n if (showDefaultSuccessToast) {\r\n enqueueSnackbar(getSuccessMessage(model), { variant: SnackbarVariantTypes.Success, persist: true });\r\n }\r\n }\r\n else {\r\n const errors = [getErrorMessage(model), ...result.errorMessages];\r\n Utils.enqueueMultiLineSnackbar(errors, enqueueSnackbar, { variant: SnackbarVariantTypes.Error, persist: true });\r\n }\r\n setIsUploading(false);\r\n dispatch(setClientEngagementSelectorDisabled(false));\r\n return result;\r\n }\r\n }\r\n\r\n const getSuccessMessage = (model: IDocumentsUploadModel) => {\r\n if (model.task?.isRestricted) {\r\n return restrictedRequestAttachmentSuccess;\r\n }\r\n else if (model.isPrivate) {\r\n return successfullyUploadedRestrictedFileText;\r\n }\r\n return successfullyUploadedFileText;\r\n }\r\n\r\n const getErrorMessage = (model: IDocumentsUploadModel) => {\r\n return errorUploadingFileText;\r\n }\r\n\r\n\r\n return { files, uploadProgress, updateSelectedFiles, handleUpload, isUploading, uploadResult }\r\n}","import { InitialGroupOrderComparatorParams, RowNode } from \"@ag-grid-enterprise/all-modules\";\r\nimport IContentHierarchy from \"../interfaces/IContentHierarchy\";\r\nimport { AssociatedTask } from \"../interfaces/IContentHierarchy\";\r\nimport { isNumber } from \"lodash\";\r\n\r\n\r\nexport const entityColumnComparator = (valueA: any, valueB: any, nodeA: RowNode, nodeB: RowNode, isInverted: boolean) => {\r\n if (nodeA?.field === 'taskEntity' && nodeB?.field === 'taskEntity' && nodeA?.group && nodeB?.group) {\r\n valueA = nodeA.key || '';\r\n valueB = nodeB.key || '';\r\n return valueA.localeCompare(valueB);\r\n }\r\n}\r\n\r\nexport const initialEngagementRequestsGroupOrderComparatorem = (params: InitialGroupOrderComparatorParams) => {\r\n const {nodeA, nodeB} = params;\r\n const sortableGroups = ['taskEntity', 'engagementName'];\r\n const fieldA = nodeA?.field || '';\r\n const fieldB = nodeB?.field || '';\r\n if (fieldA === fieldB && \r\n nodeA?.group && nodeB?.group && \r\n sortableGroups.includes(fieldA) && sortableGroups.includes(fieldB)) \r\n {\r\n const valueA = params.nodeA.key || '';\r\n const valueB = params.nodeB.key || '';\r\n \r\n return valueA.localeCompare(valueB);\r\n }\r\n\r\n return 0;\r\n}\r\n\r\nexport const associatedTasksComparator = (valueA: any, valueB: any, nodeA: RowNode, nodeB: RowNode, isInverted: boolean) => {\r\n const intA = parseInt(valueA) || false;\r\n const intB = parseInt(valueB) || false;\r\n const hasUnfiledValue = !(intA && intB);\r\n\r\n // \"Unfiled\" field should sort below a filed document by default\r\n if (hasUnfiledValue) {\r\n return intA === intB ? 0 \r\n : isNumber(intB) ? 1 : -1;\r\n }\r\n\r\n return intA === intB ? 0\r\n : intA > intB ? 1 : -1;\r\n}","\r\nexport const DownloadFileErrorText: string = \"There was an error downloading the file.\";\r\nexport const DeleteDocumentMultipleTasksWarningText = \"This file is attached to multiple requests. Are you sure you want to remove this attachment and permanently delete this file?\";\r\nexport const DeleteDocumentWarningText = \"Are you sure you want to remove this attachment and permanently delete this file?\";\r\nexport const DeleteCommentWarningText = \"Are you sure you want to delete this comment?\";\r\nexport const FailedToLoadEngagementManagementText = \"Failed to load the request list. If you continue to see this error, please contact the Help Desk.\";\r\n\r\nexport const LastActivityTimestampKey = \"835E561F-7E00-47AC-914F-615E6417388F_lastActivityTimestamp\"\r\nexport const WasAutoLoggedOutKey = \"835E561F-7E00-47AC-914F-615E6417388F_wasAutoLoggedOut\"\r\n\r\nexport const SystemFolderNames = {\r\n FinalDocuments: \"Final Documents\",\r\n ClientDocuments: \"Client Documents\",\r\n Initial: \"Initial File Transfer\",\r\n}\r\n\r\nexport const ErrorRequestNotFoundText = \"The request was not found.\";\r\n","import { GridApi, RowNode } from \"@ag-grid-enterprise/all-modules\";\r\nimport IContentHierarchy from \"../interfaces/IContentHierarchy\";\r\nimport { HierarchyType } from \"./enums/HierarchyType\";\r\nimport { SystemFolderNames } from \"./Constants\";\r\n\r\nexport const hierarchyIsFolder = (hierarchy: IContentHierarchy) => {\r\n return !hierarchyIsFile(hierarchy);\r\n}\r\n\r\nexport const hierarchyIsFile = (hierarchy: IContentHierarchy) => {\r\n return hierarchy.hierarchyTypeDescription === HierarchyType.File.string;\r\n}\r\n\r\nexport const hierarchyIsClientLevelFolder = (hierarchy: IContentHierarchy | undefined | null) => {\r\n return hierarchy !== undefined && hierarchy !== null && hierarchy.engagementId === null;\r\n}\r\n\r\nexport const folderIsWithinFinalDocumentsFolder = (fullContentHierarchy: IContentHierarchy[] | undefined | null, hierarchy: IContentHierarchy | undefined | null): boolean => {\r\n if (!hierarchy || !hierarchyIsFolder(hierarchy) || !fullContentHierarchy) return false;\r\n\r\n const finalDocumentsFolderForEngagement = fullContentHierarchy.find(h => \r\n h.engagementId \r\n && h.hierarchyTypeDescription === HierarchyType.SystemFolder.string \r\n && h.name === SystemFolderNames.FinalDocuments\r\n && h.engagementId === hierarchy.engagementId \r\n );\r\n if (!finalDocumentsFolderForEngagement) return false;\r\n\r\n let currentHierarchy: IContentHierarchy | undefined = hierarchy;\r\n while (currentHierarchy) {\r\n if (currentHierarchy.id === finalDocumentsFolderForEngagement.id) {\r\n return true;\r\n }\r\n currentHierarchy = fullContentHierarchy.find(h => h.id === currentHierarchy?.parentId);\r\n }\r\n\r\n return false;\r\n}\r\n\r\nexport const hierarchyIsRestrictedFolder = (hierarchy: IContentHierarchy | undefined | null) => {\r\n return hierarchy !== undefined && hierarchy !== null && (hierarchy.hierarchyTypeDescription === HierarchyType.RestrictedFolder.string);\r\n}\r\n\r\nexport const getSelectedHierarchyTypeCount = (hierarchyTypeId: number, selectedHierarchies: IContentHierarchy[]) => {\r\n return selectedHierarchies.filter(h => h.hierarchyTypeId === hierarchyTypeId).length;\r\n}\r\n\r\nexport const getAllDescendentItems = (folder: IContentHierarchy, fullHierarchy: IContentHierarchy[], includeRoot: boolean = false) => {\r\n let descendents: IContentHierarchy[] = [];\r\n\r\n const getFolderDescendents = (folderId: string) => {\r\n fullHierarchy.forEach(item => {\r\n if (item.parentId && item.parentId === folderId) {\r\n descendents.push(item);\r\n hierarchyIsFolder(item) && getFolderDescendents(item.id);\r\n }\r\n });\r\n }\r\n\r\n if (hierarchyIsFolder(folder)) {\r\n getFolderDescendents(folder.id);\r\n includeRoot && descendents.push(folder);\r\n }\r\n\r\n return descendents;\r\n}\r\n\r\nexport const getContentHierarchyUrl = (hierarchy: IContentHierarchy) => {\r\n return `/document-management/${hierarchyIsFile(hierarchy) ? '' : 'folder/'}${hierarchy.id}`;\r\n}\r\n\r\nexport const buildPath = (data: IContentHierarchy[]) => {\r\n return data.map(ch => {\r\n ch.path = []\r\n if (ch.parentId) {\r\n ch.path.push(ch.displayName);\r\n getParentDataLoop(ch, ch.path, data);\r\n }\r\n else {\r\n ch.path.push(ch.displayName)\r\n }\r\n return ch;\r\n });\r\n}\r\nconst getParentDataLoop = (hierarchy: IContentHierarchy, path: string[], data: IContentHierarchy[]): any => {\r\n let p = data.filter(i => i.id == hierarchy.parentId)[0];\r\n hierarchy.parentIsRestricted = hierarchyIsRestrictedFolder(p);\r\n if (p.parentId) {\r\n path.unshift(p.displayName);\r\n return getParentDataLoop(p, path, data)\r\n }\r\n else {\r\n path.unshift(p.displayName);\r\n }\r\n return path;\r\n}\r\n\r\nexport const getParentGridDataForNewChild = (child: IContentHierarchy, gridApi: GridApi | undefined | null): void => {\r\n if (gridApi && child.parentId) {\r\n const rowNode = gridApi.getRowNode(child.parentId);\r\n if (rowNode?.data) {\r\n const parent = rowNode.data;\r\n child.path = [...parent.path, child.displayName];\r\n child.parentIsRestricted = hierarchyIsRestrictedFolder(parent);\r\n }\r\n }\r\n}\r\n\r\nexport function getUpdatedSubtreeForUpdatedFolder(updatedNode: RowNode, updatedNodeParent: RowNode, allUpdatedHierarchies: IContentHierarchy[] = []): IContentHierarchy[] {\r\n updateRowNodeParent(updatedNode, updatedNodeParent);\r\n allUpdatedHierarchies.push(updatedNode.data);\r\n\r\n if (updatedNode.allChildrenCount && updatedNode.allChildrenCount > 0) {\r\n updatedNode.childrenAfterGroup?.forEach(child => {\r\n return getUpdatedSubtreeForUpdatedFolder(child, updatedNode, allUpdatedHierarchies);\r\n })\r\n }\r\n return allUpdatedHierarchies;\r\n}\r\nfunction updateRowNodeParent(movedNode: RowNode, updatedParent: RowNode) {\r\n const parentData: IContentHierarchy = updatedParent.data;\r\n const moveNodeData: IContentHierarchy = movedNode.data;\r\n\r\n moveNodeData.path = parentData.path ? [...parentData.path, moveNodeData.displayName] : [moveNodeData.displayName];\r\n moveNodeData.parentId = parentData.id;\r\n const parentWasRestricted = moveNodeData.parentIsRestricted;\r\n moveNodeData.parentIsRestricted = hierarchyIsRestrictedFolder(parentData);\r\n moveNodeData.isPrivate = moveNodeData.isRestrictedDocument || (!parentWasRestricted && moveNodeData.isPrivate) || moveNodeData.parentIsRestricted;\r\n}","import { DateTime } from \"luxon\";\r\n\r\nexport const LocalDateTimeString = (date: Date | null | undefined, includeTime: boolean = true): string => {\r\n if (date) {\r\n let dateTime = DateTime.fromJSDate(date);\r\n\r\n if (includeTime) {\r\n const localDateString = dateTime.toLocaleString();\r\n const localTimeString = dateTime.toLocaleString({\r\n ...DateTime.TIME_SIMPLE,\r\n timeZoneName: \"short\",\r\n });\r\n return `${localDateString} ${localTimeString}`;\r\n } else {\r\n let formattedDate = dateTime.toFormat('MM/dd/yyyy');\r\n\r\n if (formattedDate == \"01/01/0001\") {\r\n return \"\";\r\n }\r\n\r\n return formattedDate;\r\n }\r\n } else {\r\n return \"\";\r\n }\r\n}\r\n\r\n\r\nconst isoDateFormat = /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d*)?(?:[-+]\\d{2}:?\\d{2}|Z)?$/;\r\n\r\nfunction isIsoDateString(value: any): boolean {\r\n return value && typeof value === \"string\" && isoDateFormat.test(value);\r\n}\r\n\r\nexport function handleDatesToSerialized(body: any) {\r\n\r\n if (body === null || body === undefined || typeof body !== \"object\")\r\n return body;\r\n\r\n for (const key of Object.keys(body)) {\r\n const value = body[key];\r\n if (value instanceof Date) {\r\n if (key === 'validFrom') {\r\n body[key] = DateTime.fromJSDate(new Date()).toISO();\r\n } else {\r\n body[key] = DateTime.fromJSDate(value).toISO();\r\n }\r\n }\r\n else if (typeof value === \"object\") handleDatesToSerialized(value);\r\n }\r\n}\r\n\r\n\r\nexport function handleSerializedDatesToJSDate(body: any) {\r\n\r\n if (body === null || body === undefined || typeof body !== \"object\")\r\n return body;\r\n\r\n // Necessary when referencing blob storage dates because information is lost due to higher fractional second precision than JS dates support.\r\n const keysToIgnore = ['fileVersion']; // Add keys to this array to avoid conversion.\r\n\r\n for (const key of Object.keys(body)) {\r\n const value = body[key];\r\n const alterKey = !keysToIgnore.includes(key);\r\n if (alterKey && isIsoDateString(value)) {\r\n body[key] = DateTime.fromISO(value);\r\n if (key !== 'requestedDate') {\r\n if (!value.endsWith('z') && !value.endsWith('Z')) {\r\n body[key] = body[key].setZone('utc', { keepLocalTime: true });\r\n }\r\n body[key] = body[key].toLocal();\r\n }\r\n body[key] = body[key].toJSDate();\r\n }\r\n else if (alterKey && typeof value === \"object\") handleSerializedDatesToJSDate(value);\r\n }\r\n}","\r\n\r\n// Previously the file extension was being derived from the File.type property. \r\n// This frequently works, but is dependent on the browser and operating system setting these values properly. \r\nexport const getFileExtensionFromFileName = (fileName: string) => {\r\n const extensionIndex = fileName.lastIndexOf('.') + 1;\r\n if (extensionIndex === 0) \r\n return \"\";\r\n const extension = fileName.substring(extensionIndex,fileName.length);\r\n return extension;\r\n}","import { GroupCellRendererParams } from \"@ag-grid-enterprise/all-modules\";\r\nimport ITask from \"../interfaces/ITask\";\r\nimport { LocalDateTimeString } from \"./DateHelpers\"\r\nimport { isTaskOverdue } from \"./TaskHelpers\";\r\n\r\nconst requestedDateRenderer = (params: GroupCellRendererParams, overdueDateClassName: string) => {\r\n const taskData: ITask = params.data;\r\n let jsDate = new Date(params.value);\r\n let className = \"\";\r\n \r\n if (isTaskOverdue(taskData) && overdueDateClassName) {\r\n className = overdueDateClassName;\r\n }\r\n\r\n return (\r\n \r\n {params.value && LocalDateTimeString(jsDate, false)}\r\n \r\n );\r\n}\r\n\r\nexport default requestedDateRenderer;\r\n","\r\n/**\r\n * These are base keys used to generate keys for saved views. (see {@link useSavedViews})\r\n * Each base key can have maxViewsPerKey associated views.\r\n * \r\n * Note that any changes made to existing keys will result in associated saved views becoming inaccessible to users. \r\n */\r\nexport const SavedViewKeys = {\r\n engagementManagement: \"EngagementManagement\",\r\n taskListManagement: \"TaskListManagement\",\r\n documentManagement: \"DocumentManagement\",\r\n recycleBin: \"DocumentRecycleBin\",\r\n}","//import moment from 'moment';\r\nimport { matchPath } from 'react-router';\r\n//import TDateFormat from '../types/TDateFormat';\r\n//import { MatrixApiEndpoints } from './Constants';\r\n\r\n/**\r\n * If a string exceeds the specified length, truncated and append an ellipsis to the end.\r\n * \r\n * @param input The string to truncate.\r\n * @param length The max number of characters in the string before it will be truncated.\r\n * \r\n * @returns Either the truncated string with ellipsis appended or the original unmodified string if less than or equal to the max length.\r\n */\r\nexport const truncate = (input: string, length: number): string => {\r\n\r\n return input.length > length ? `${input.substring(0, length)}...` : input;\r\n};\r\n\r\n/**\r\n * Check if a string is undefined, null, or only contains whitespace characters.\r\n * \r\n * @remarks\r\n * https://stackoverflow.com/questions/154059/how-can-i-check-for-an-empty-undefined-null-string-in-javascript\r\n * \r\n * @param text The string to evaluate.\r\n * \r\n * @returns true if undefined, null, or only whitespace; false otherwise.\r\n */\r\nexport const isEmpty = (text: string): boolean => {\r\n\r\n return text === undefined || text === null || text.match(/^\\s*$/) !== null;\r\n};\r\n\r\n\r\n/**\r\n * Evaluate if a given string is a GUID.\r\n * \r\n * @remarks\r\n * A GUID is a string of letters, numbers, and dashes that look something like this: b25df478-e497-4a26-b9fe-4770c475b789\r\n * They are used widely in the MATRIX application as ID values. GUID stands for globally unique identifier (GUID).\r\n * https://en.wikipedia.org/wiki/Universally_unique_identifier\r\n * https://stackoverflow.com/questions/11040707/c-sharp-regex-for-guid/35648213#35648213\r\n * \r\n * @param value The string to be checked for matching the GUID pattern.\r\n */\r\nexport const isGuid = (value: string): boolean => {\r\n\r\n const guidRegEx = new RegExp('^([0-9A-Fa-f]{8}[-][0-9A-Fa-f]{4}[-][0-9A-Fa-f]{4}[-][0-9A-Fa-f]{4}[-][0-9A-Fa-f]{12})$');\r\n\r\n return guidRegEx.test(value);\r\n};\r\n\r\n\r\n/**\r\n * A Regex expression that validates whether characters are numbers, have a minus sign, or have commas\r\n */\r\nexport const numberValidationMinusSignCommas = new RegExp(/^-?(?:\\d+|\\d{1,3}(?:,\\d{3})*)(?:\\.\\d{1,2})?$/);\r\n\r\n/**\r\n * A Regex expression that validates that that the characters are not spaces or whitespace only\r\n */\r\nexport const isNotWhiteSpaceOnly = new RegExp(/(?!^$)([^\\s])/);\r\n\r\n/**\r\n * A Regex expression that validates whether characters contain decimals\r\n */\r\nexport const validationHasDecimal = new RegExp(/^-?\\d+(\\.)/);\r\n\r\n/**\r\n * Evaluate if a given string is a number\r\n *\r\n * \r\n * @param value The string to be checked for matching the number pattern.\r\n */\r\nexport const isTextANumber = (value: string): boolean => {\r\n\r\n return !isEmpty(value) && !isNaN(+value);\r\n\r\n};\r\n\r\n/**\r\n * Evaluate if a given string contains a decimal\r\n *\r\n * \r\n * @param value The string to be checked for matching the number pattern.\r\n */\r\nexport const isDecimalInText = (value: string): boolean => {\r\n\r\n const decimalRegex = validationHasDecimal;\r\n\r\n return decimalRegex.test(value);\r\n};\r\n\r\n\r\n/**\r\n * Evaluate if a given string is an empty GUID.\r\n * \r\n * @remarks\r\n * An empty GUID is a GUID as described above, but only contains zeros: 00000000-0000-0000-0000-000000000000.\r\n * Intentional uses of empty GUIDs in the MATRIX application are using them to denote an unitialize state or testing.\r\n * Accidential uses would be on the API side if a GUID variable was not initialized.\r\n * \r\n * @param value The string to be checked for matching the GUID pattern.\r\n */\r\nexport const isEmptyGuid = (value: string): boolean => {\r\n\r\n const guidRegEx = new RegExp('^([0]{8}[-][0]{4}[-][0]{4}[-][0]{4}[-][0]{12})$');\r\n\r\n return guidRegEx.test(value);\r\n};\r\n\r\n/**\r\n * Determine if a string has a value, is a GUID, and is not an empty GUID.\r\n * \r\n * @param value The string to check if it is a GUID.\r\n */\r\nexport const isGuidValue = (value: string): boolean => {\r\n\r\n return !isEmpty(value) && isGuid(value) && !isEmptyGuid(value);\r\n};\r\n\r\n/**\r\n * Evaluate if the expected path name is the same as the actual path name of the current page.\r\n * \r\n * @remarks\r\n * If the expected path is '/trialbalance' it will match: '/trialbalance', '/trialbalance/', '/TRIALBALANCE', '/TrIaLbAlAnCe/'.\r\n * \r\n * @param expectedPath The path we are attempting to match.\r\n * @param actualPath The actual path. Most likely sourced from history.location.pathname\r\n * \r\n * @returns A boolean indicating a match. If true then the actual path is a match; otherwise false.\r\n */\r\nexport const isExpectedPath = (expectedPath: string, actualPath: string): boolean => {\r\n\r\n // This regular expression assserts the string starts at the beginning of the line, the match is case-insensitive, and contains zero or one trailing forward slash.\r\n return RegExp(`^\\\\${expectedPath}$`, 'i').test(actualPath);\r\n};\r\n\r\n/**\r\n * This function will remove commas from the input parameter string\r\n * It could be used when trying to sum numerical values that are stored as strings with commas\r\n * @param valueToUnformat the value that you want to format with commas\r\n */\r\nexport const removeCommasFromNumber = (valueToUnformat: string): string => {\r\n if (valueToUnformat === undefined || valueToUnformat === null || typeof valueToUnformat !== 'string') {\r\n return '';\r\n }\r\n return valueToUnformat.replace(/,/g, '');\r\n};\r\n\r\n/**\r\n * This function will remove commas from the input parameter string, parse the string, and return the string with commas\r\n * It can be used to update the UI in real time based on what the user is typing so commas are always added in the correct place in the number string\r\n * @param valueToFormat the value that you want to format with commas\r\n */\r\nexport const formatNumberWithCommas = (valueToFormat: string): string => {\r\n const valueWithoutCommas = removeCommasFromNumber(valueToFormat);\r\n const valueAsInt = parseInt(valueWithoutCommas);\r\n return isNaN(valueAsInt) ? valueToFormat : valueAsInt.toLocaleString('en');\r\n};\r\n\r\n/**\r\n * Given a first and last name, get the initials for that name.\r\n * \r\n * @param firstName The first name of a person's name.\r\n * @param lastName The last name of a person's name\r\n * \r\n * @returns Either the two letters of the person's initials or an empty string if there is an issue parsing the first or last name.\r\n */\r\nexport const getInitials = (firstName: string, lastName: string): string => {\r\n\r\n let initials = '';\r\n\r\n if (!isEmpty(firstName) && !isEmpty(lastName)) {\r\n\r\n initials = `${firstName.charAt(0)}${lastName.charAt(0)}`;\r\n }\r\n\r\n return initials;\r\n};\r\n\r\n\r\n","import ITask from \"../interfaces/ITask\";\r\nimport { TaskStatus } from \"./enums/TaskStatus\";\r\n\r\n\r\nexport const engagementManagementPlaceholderNodeTitle = \"No Requests Available\";\r\nexport const nullTaskEntityGroupName = \"No Entity\";\r\n\r\nexport const taskStatusIsDraft = (task: ITask) => {\r\n return task.taskStatusDescription === TaskStatus.Draft.string;\r\n}\r\n\r\nexport const taskStatusIsDeleted = (task: ITask) => {\r\n return task.taskStatusDescription === TaskStatus.Deleted.string;\r\n}\r\n\r\nexport const taskIsPlaceholderNode = (task: ITask) => {\r\n return task?.title === engagementManagementPlaceholderNodeTitle;\r\n}\r\n\r\nexport const taskIsNotPlaceholderNode = (task: ITask) => {\r\n return !taskIsPlaceholderNode(task);\r\n}\r\n\r\nexport const someTaskHasEntityValue = (tasks: ITask[] = []) => {\r\n return tasks.some(task => task.taskEntity !== null);\r\n}\r\n\r\nexport const someTaskHasEntityValueAnd = (tasks: ITask[], conjunctivePredicate: (task: ITask) => boolean) => {\r\n return tasks.some(task => (task.taskEntity !== null) && conjunctivePredicate(task));\r\n}\r\n\r\nexport const getTrimmedTaskEntityForTask = (task: ITask) => {\r\n if (task.taskEntity === null) return null;\r\n return task.taskEntity?.trim();\r\n}\r\n\r\nexport const isTaskOverdue = (task: ITask) => {\r\n if (!task?.requestedDate) return false;\r\n let jsDate = new Date(task.requestedDate);\r\n const overdue = jsDate.setHours(0, 0, 0, 0) < (new Date().setHours(0, 0, 0, 0));\r\n\r\n const completed = task.taskStatusId === TaskStatus.Completed.id;\r\n return !(completed) && overdue;\r\n}","import ILookup from \"../interfaces/ILookup\"\r\nimport IUser from \"../interfaces/IUser\"\r\nimport { LicenseManager } from '@ag-grid-enterprise/all-modules';\r\n\r\nexport const setAgGridLicense = (): void => {\r\n\r\n // AG Grid Config\r\n const agGridLicenseKey = 'CompanyName=Moss Adams LLP,LicensedApplication=MAA,LicenseType=SingleApplication,LicensedConcurrentDeveloperCount=5,LicensedProductionInstancesCount=1,AssetReference=AG-022388,ExpiryDate=15_December_2022_[v2]_MTY3MTA2MjQwMDAwMA==df5a46987b166b1b436c50366d7b657a';\r\n LicenseManager.setLicenseKey(agGridLicenseKey);\r\n};\r\nexport const convertLookupToArray = (list: ILookup[]) => {\r\n const lookup = list.map((item) => {\r\n return item.description;\r\n });\r\n return lookup;\r\n}\r\n\r\nexport function convertLookupToKeyValuePair(list: ILookup[]) {\r\n let lookup = {};\r\n for (let i = 0; i < list.length; i++) {\r\n //@ts-ignore\r\n lookup[list[i].id.toString()] = list[i].description;\r\n }\r\n return lookup;\r\n}\r\n\r\nexport function convertUserListToKeyValuePair(list: IUser[]) {\r\n let lookup = {};\r\n for (let i = 0; i < list.length; i++) {\r\n //@ts-ignore\r\n lookup[list[i].userId.toString()] = list[i].displayName;\r\n }\r\n return lookup;\r\n}\r\n\r\nexport const extractValues = (mappings: any, field: string) => {\r\n if (mappings) {\r\n let values = [];\r\n for (let i = 0; i < mappings.length; i++) {\r\n values.push(mappings[i][field]);\r\n }\r\n return values;\r\n } else {\r\n return null;\r\n }\r\n}\r\n\r\nexport const lookupValue = (list: ILookup[], id: number) => {\r\n if (list) {\r\n const item = list.find(i => i.id == id);\r\n if (item) {\r\n const kv = {};\r\n //@ts-ignore\r\n kv[item?.id.toString()] = item.description;\r\n return item?.description.toString();\r\n } else {\r\n return \"\";\r\n }\r\n } else {\r\n return \"\";\r\n }\r\n}\r\n\r\nexport const userListValue = (list: IUser[], id: string) => {\r\n if (list) {\r\n const item = list.find(i => i.userId == id);\r\n if (item) {\r\n const kv = {};\r\n //@ts-ignore\r\n kv[item?.userId.toString()] = item.displayName;\r\n return item?.displayName.toString();\r\n } else {\r\n return \"\";\r\n }\r\n } else {\r\n return \"\";\r\n }\r\n}\r\n\r\nexport const lookupKey = (list: ILookup[], name: string) => {\r\n if (list) {\r\n return list.find(i => i.description == name)!.description;\r\n } else {\r\n return null;\r\n }\r\n}\r\n\r\nexport const userListKey = (list: IUser[], name: string) => {\r\n if (list) {\r\n return list.find(i => i.displayName == name)!.userId;\r\n } else {\r\n return null;\r\n }\r\n}\r\n","// Ids are fragile due to this relationship being defined in ClientPlatform\\ClientPlatform.Db\\Scripts\\Seed\\0_HierarchyType_Seed.sql\r\n\r\nexport const HierarchyType = {\r\n Client: {\r\n id: 1,\r\n string: \"Client\"\r\n },\r\n Engagement: {\r\n id: 2,\r\n string: \"Engagement\"\r\n },\r\n SystemFolder: {\r\n id: 3,\r\n string: \"System Folder\"\r\n },\r\n CustomFolder: {\r\n id: 4,\r\n string: \"Custom Folder\"\r\n },\r\n SecureFolder: {\r\n id: 5,\r\n string: \"Secure Task Folder\"\r\n },\r\n File: {\r\n id: 6,\r\n string: \"File\"\r\n },\r\n RestrictedFolder: {\r\n id: 7,\r\n string: \"Restricted Folder\"\r\n },\r\n}","export const LineOfBusinessId = {\r\n ADMIN: \"ADMIN\",\r\n BA: \"BA\",\r\n CONS: \"CONS\",\r\n TAX: \"TAX\",\r\n};","\r\nexport const SocStatus = {\r\n PendingInitialRequest: {\r\n id: 1,\r\n string: \"Pending Initial Request\"\r\n },\r\n FollowUpRequired: {\r\n id: 2,\r\n string: \"Follow-Up Required\"\r\n },\r\n Provided: {\r\n id: 3,\r\n string: \"Provided\"\r\n },\r\n ControlRemoved: {\r\n id: 4,\r\n string: \"Control Removed\"\r\n },\r\n TestedNoExceptionsInterim: {\r\n id: 5,\r\n string: \"Tested-No Exceptions (Interim)\"\r\n },\r\n TestedExceptionsInterim: {\r\n id: 6,\r\n string: \"Tested-Exceptions (Interim)\"\r\n },\r\n TestedNoExceptionsFinal: {\r\n id: 7,\r\n string: \"Tested-No Exceptions (Final)\"\r\n },\r\n TestedExceptionsFinal: {\r\n id: 8,\r\n string: \"Tested-Exceptions (Final)\"\r\n },\r\n NA: {\r\n id: 9,\r\n string: \"N/A\"\r\n },\r\n}\r\n\r\nexport const SocStatusStrings: string[] = [\r\n SocStatus.PendingInitialRequest.string,\r\n SocStatus.FollowUpRequired.string,\r\n SocStatus.Provided.string,\r\n SocStatus.ControlRemoved.string,\r\n SocStatus.TestedNoExceptionsInterim.string,\r\n SocStatus.TestedExceptionsInterim.string,\r\n SocStatus.TestedNoExceptionsFinal.string,\r\n SocStatus.TestedExceptionsFinal.string,\r\n SocStatus.NA.string,\r\n];\r\n\r\nexport const SocStatusStringsLower = SocStatusStrings.map(s => s.toLowerCase());\r\n\r\nexport const SocStatusIds: number[] = [\r\n SocStatus.PendingInitialRequest.id,\r\n SocStatus.FollowUpRequired.id,\r\n SocStatus.Provided.id,\r\n SocStatus.ControlRemoved.id,\r\n SocStatus.TestedNoExceptionsInterim.id,\r\n SocStatus.TestedExceptionsInterim.id,\r\n SocStatus.TestedNoExceptionsFinal.id,\r\n SocStatus.TestedExceptionsFinal.id,\r\n SocStatus.NA.id,\r\n];","// Fragile due to this relationship being defined in ClientPlatform\\ClientPlatform.Db\\Scripts\\Seed\\0_Priority_Seed.sql\r\n\r\nexport const TaskPriority = {\r\n Normal: {\r\n id: 1,\r\n string: \"Normal\"\r\n },\r\n High: {\r\n id: 2,\r\n string: \"High\"\r\n }\r\n}\r\n\r\nexport const TaskPriorityStrings: string[] = [\r\n TaskPriority.Normal.string,\r\n TaskPriority.High.string\r\n];\r\n\r\nexport const TaskPriorityStringsLower = TaskPriorityStrings.map(s => s.toLowerCase());\r\n\r\nexport const TaskPriorityIds: number[] = [\r\n TaskPriority.Normal.id,\r\n TaskPriority.High.id,\r\n];","// Ids are fragile due to this relationship being defined in ClientPlatform\\ClientPlatform.Db\\Scripts\\Seed\\0_Phase_Seed.sql\r\n\r\nexport const TaskStatus = {\r\n Draft: {\r\n id: 1,\r\n string: \"Draft\"\r\n },\r\n New: {\r\n id: 2,\r\n string: \"New\"\r\n },\r\n SubmittedByClient: {\r\n id: 3,\r\n string: \"Submitted By Client\"\r\n },\r\n MossAdamsResponded: {\r\n id: 4,\r\n string: \"Moss Adams Responded\"\r\n },\r\n Completed: {\r\n id: 5,\r\n string: \"Completed\"\r\n },\r\n Deleted: {\r\n id: 6,\r\n string: \"Deleted\"\r\n }\r\n}\r\n\r\nexport const TaskStatusStrings: string[] = [\r\n TaskStatus.Draft.string,\r\n TaskStatus.New.string,\r\n TaskStatus.SubmittedByClient.string,\r\n TaskStatus.MossAdamsResponded.string,\r\n TaskStatus.Completed.string,\r\n TaskStatus.Deleted.string\r\n];\r\n\r\nexport const TaskStatusStringsLower = TaskStatusStrings.map(s => s.toLowerCase());\r\n\r\nexport const TaskStatusIds: number[] = [\r\n TaskStatus.Draft.id,\r\n TaskStatus.New.id,\r\n TaskStatus.SubmittedByClient.id,\r\n TaskStatus.MossAdamsResponded.id,\r\n TaskStatus.Completed.id,\r\n TaskStatus.Deleted.id\r\n];\r\n\r\nexport const GetTaskStatusById = (statusId: number) => {\r\n for (const [key, value] of Object.entries(TaskStatus)) {\r\n if (value?.id === +statusId) {\r\n return value?.string;\r\n }\r\n }\r\n return null;\r\n}","import { VariantType } from 'notistack';\r\n\r\n//Task related enums have moved to the following files\r\n// ./TaskArea.ts\r\n// ./TaskPhase.ts\r\n// ./TaskPriority.ts\r\n// ./TaskStatus.ts\r\n// ./TaskType.ts\r\n\r\nexport class SnackbarVariantTypes {\r\n static Default: VariantType = 'default';\r\n static Error: VariantType = 'error';\r\n static Success: VariantType = 'success';\r\n static Warning: VariantType = 'warning';\r\n static Info: VariantType = 'info';\r\n}","import { createTheme, Theme } from \"@material-ui/core/styles\";\r\nimport grey from \"@material-ui/core/colors/grey\";\r\nimport createSpacing from \"@material-ui/core/styles/createSpacing\";\r\nimport type { } from '@material-ui/lab/themeAugmentation'; // Enables mui/lab components to have css overrides.\r\n\r\n// Material-UI Theme Overrides Leveraging Theme Palette Colors https://stackoverflow.com/a/57632144\r\nconst portalTheme: Theme = createTheme();\r\n\r\n// Material UI's default spacing is 8 pixels, but we want to be able to\r\n// better fine-tune spacing so changing the default spacing to 2 pixels.\r\nportalTheme.spacing = createSpacing(2);\r\n\r\nportalTheme.palette = {\r\n ...portalTheme.palette,\r\n common: {\r\n ...portalTheme.palette.common,\r\n },\r\n signOff: {\r\n gray: \"#E8E8EB\",\r\n orange: \"#FA972D\",\r\n green: \"#67C60B\",\r\n },\r\n mossadams: {\r\n warmGray100: \"#FAF9F8\",\r\n warmGray200: \"#F0EEEA\",\r\n warmGray300: \"#E7E3DD\",\r\n warmGray400: \"#DDD8CF\",\r\n warmGray500: \"#D3CDC1\",\r\n warmGray600: \"#CFC7BA\",\r\n teal100: \"#F7FAF9\",\r\n teal200: \"#E7F0EE\",\r\n teal300: \"#D6E6E2\",\r\n teal400: \"#C6DBD7\",\r\n teal500: \"#C6DBD7\",\r\n teal600: \"#ADCCC6\",\r\n brightGreen100: \"#F6FEEB\",\r\n brightGreen200: \"#E3FCC2\",\r\n brightGreen300: \"#D1F99A\",\r\n brightGreen400: \"#BEF771\",\r\n brightGreen500: \"#ABF548\",\r\n brightGreen600: \"#A2F434\",\r\n brightGreen700: \"#5CB21A\",\r\n darkGreen100: \"#E7EBEB\",\r\n darkGreen200: \"#B7C3C3\",\r\n darkGreen300: \"#869C9B\",\r\n darkGreen400: \"#567473\",\r\n darkGreen500: \"#264C4B\",\r\n darkGreen600: \"#0E3837\",\r\n gray100: \"#F0F0F0\",\r\n gray200: \"#C0C0C0\",\r\n gray300: \"#979797\",\r\n gray400: \"#6D6D6D\",\r\n gray500: \"#454545\",\r\n gray600: \"#303030\",\r\n gray700: \"rgba(0, 0, 0, 0.87)\",\r\n orange: \"#EF730B\",\r\n red100: \"rgba(255,82,82, 0.25)\",\r\n red200: \"rgba(255,82,82, 0.5)\",\r\n selectedRow: \"#CEE0DD\",\r\n everyOtherRowColor: \"#F5F8F8\",\r\n divider: \"#707070\",\r\n border: \"#C4C4C4\",\r\n },\r\n primary: {\r\n main: \"#0E3837\",\r\n light: \"#264C4B\",\r\n dark: \"#000000\",\r\n contrastText: \"#FFFFFF\",\r\n },\r\n secondary: {\r\n main: \"#A2F434\",\r\n light: \"#BEF771\",\r\n dark: \"#A2F434\",\r\n contrastText: \"#FFFFFF\",\r\n },\r\n background: {\r\n paper: \"#FFFFFF\",\r\n default: \"#FFFFFF\"\r\n }\r\n};\r\n\r\nexport const detailPaneTextStyle = {\r\n fontFamily: \"Founders Grotesk Reg\",\r\n fontSize: \"1.1rem\",\r\n fontWeight: 400,\r\n lineHeight: 1.5,\r\n letterSpacing: \"0.00938em\"\r\n}\r\n\r\nportalTheme.overrides = {\r\n ...portalTheme.overrides,\r\n MuiChip: {\r\n root: {\r\n backgroundColor: grey[700],\r\n fontWeight: \"bold\",\r\n },\r\n label: {\r\n color: portalTheme.palette.common.white,\r\n paddingLeft: portalTheme.spacing(5),\r\n paddingRight: portalTheme.spacing(5),\r\n },\r\n },\r\n MuiDialogActions: {\r\n root: {\r\n padding: \"20px\"\r\n }\r\n },\r\n MuiLink: {\r\n root: {\r\n cursor: \"pointer\",\r\n }\r\n },\r\n MuiSvgIcon: {\r\n root: {\r\n \"&.MuiSelect-icon.Mui-disabled\": {\r\n display: \"none\"\r\n },\r\n },\r\n colorPrimary: {\r\n color: portalTheme.palette.primary.main,\r\n },\r\n colorSecondary: {\r\n color: portalTheme.palette.secondary.main,\r\n }\r\n },\r\n MuiCheckbox: {\r\n colorPrimary: {\r\n color: portalTheme.palette.primary.main,\r\n \"&.Mui-checked\": {\r\n color: portalTheme.palette.primary.main\r\n }\r\n },\r\n colorSecondary: {\r\n color: portalTheme.palette.mossadams.orange,\r\n \"&.Mui-checked\": {\r\n color: portalTheme.palette.mossadams.orange\r\n }\r\n }\r\n },\r\n MuiInputBase: {\r\n root: {}\r\n },\r\n MuiFormControl: {\r\n root: {}\r\n },\r\n MuiFormLabel: {\r\n root: {\r\n color: portalTheme.palette.common.black,\r\n fontFamily: \"Founders Grotesk Reg\",\r\n }\r\n },\r\n MuiInputLabel: {\r\n root: {},\r\n shrink: {\r\n color: portalTheme.palette.primary.main,\r\n fontSize: \".9rem\",\r\n textTransform: \"uppercase\",\r\n fontWeight: \"bold\"\r\n }\r\n },\r\n MuiPaper: {\r\n root: {}\r\n },\r\n MuiDialogContent: {\r\n root: {\r\n fontSize: \"1.2rem\",\r\n \"& p\": {\r\n fontSize: \"1.2rem\"\r\n },\r\n }\r\n },\r\n MuiFormHelperText: {\r\n root: {\r\n fontSize: \"0.75rem !important\"\r\n }\r\n },\r\n MuiRadio: {\r\n colorPrimary: {\r\n color: portalTheme.palette.primary.main,\r\n },\r\n colorSecondary: {\r\n color: portalTheme.palette.secondary.main\r\n }\r\n },\r\n MuiButton: {\r\n root: {\r\n cursor: \"pointer\",\r\n paddingLeft: portalTheme.spacing(8),\r\n paddingRight: portalTheme.spacing(8),\r\n paddingTop: portalTheme.spacing(3),\r\n paddingBottom: portalTheme.spacing(3),\r\n },\r\n label: {\r\n color: portalTheme.palette.primary.main,\r\n fontFamily: \"Founders Grotesk Reg\",\r\n letterSpacing: \"2px\",\r\n fontSize: \"1.2em\",\r\n fontWeight: 500,\r\n cursor: \"pointer\"\r\n },\r\n containedPrimary: {\r\n backgroundColor: portalTheme.palette.primary.main,\r\n \"& .MuiButton-label\": {\r\n color: portalTheme.palette.common.white,\r\n },\r\n \"&:hover\": {\r\n backgroundColor: portalTheme.palette.primary.main,\r\n }\r\n },\r\n outlined: {\r\n borderRadius: 0,\r\n borderWidth: \"3px !important\",\r\n\r\n },\r\n disabled: {\r\n \"& span\": {\r\n color: portalTheme.palette.grey[400],\r\n pointerEvents: \"auto\",\r\n }\r\n },\r\n outlinedPrimary: {\r\n borderWidth: \"3px\",\r\n borderColor: portalTheme.palette.secondary.main,\r\n \"&:hover\": {\r\n backgroundColor: portalTheme.palette.secondary.main,\r\n borderColor: portalTheme.palette.secondary.main\r\n },\r\n \"&:hover:disabled\": {\r\n color: portalTheme.palette.grey[400],\r\n borderColor: portalTheme.palette.grey[400],\r\n },\r\n },\r\n },\r\n MuiButtonBase: {\r\n root: {\r\n \"&.MuiPickersDay-daySelected\": {\r\n color: portalTheme.palette.common.white\r\n }\r\n }\r\n },\r\n MuiListItem: {\r\n selected: {\r\n \"& .MuiListItemText-primary\": {\r\n }\r\n }\r\n },\r\n MuiListItemIcon: {\r\n root: {\r\n color: portalTheme.palette.primary.main,\r\n }\r\n },\r\n MuiListItemText: {\r\n primary: {\r\n color: portalTheme.palette.mossadams.darkGreen400,\r\n fontSize: \"0.86rem\",\r\n letterSpacing: \"0.069rem\",\r\n }\r\n },\r\n MuiAccordionSummary: {\r\n root: {\r\n maxHeight: \"2.625rem\",\r\n \"&.Mui-expanded\": {\r\n minHeight: \"2.625rem\"\r\n }\r\n },\r\n content: {\r\n margin: \"0rem\",\r\n \"&.Mui-expanded\": {\r\n margin: \"0rem\"\r\n }\r\n }\r\n\r\n },\r\n MuiAccordionDetails: {\r\n root: {\r\n padding: \"0rem\"\r\n }\r\n },\r\n MuiAutocomplete: {\r\n root: {\r\n ...detailPaneTextStyle\r\n },\r\n option: {\r\n ...detailPaneTextStyle\r\n }\r\n },\r\n MuiSelect: {\r\n root: {\r\n ...detailPaneTextStyle,\r\n fontSize: '1rem',\r\n padding: '0.2rem',\r\n }\r\n },\r\n MuiMenuItem: {\r\n root: {\r\n ...detailPaneTextStyle,\r\n fontSize: '1rem',\r\n \"&$selected\": {\r\n backgroundColor: portalTheme.palette.primary.main,\r\n color: 'white',\r\n \"&:hover\": {\r\n backgroundColor: portalTheme.palette.mossadams.darkGreen500\r\n }\r\n },\r\n '&:hover': {\r\n backgroundColor: portalTheme.palette.mossadams.warmGray200\r\n }\r\n }\r\n },\r\n MuiTooltip: {\r\n tooltip: {\r\n fontSize: \"0.8rem\",\r\n backgroundColor: portalTheme.palette.primary.main,\r\n }\r\n },\r\n MuiTypography: {\r\n h1: {\r\n fontFamily: \"Founders Grotesk Cond Med\",\r\n color: portalTheme.palette.primary.main,\r\n textTransform: \"uppercase\",\r\n letterSpacing: \"2px\"\r\n },\r\n h2: {\r\n fontFamily: \"Founders Grotesk Cond Med\",\r\n color: portalTheme.palette.primary.main,\r\n textTransform: \"uppercase\",\r\n letterSpacing: \"2px\"\r\n },\r\n h3: {\r\n fontFamily: \"Founders Grotesk Cond Med\",\r\n color: portalTheme.palette.primary.main,\r\n textTransform: \"uppercase\",\r\n letterSpacing: \"2px\",\r\n fontSize: \"2rem\"\r\n },\r\n h4: {\r\n fontFamily: \"Founders Grotesk Cond Med\",\r\n color: portalTheme.palette.primary.main,\r\n //textTransform: \"uppercase\",\r\n //letterSpacing: \"2px\"\r\n },\r\n h5: {\r\n fontFamily: \"Founders Grotesk Cond Med\",\r\n color: portalTheme.palette.primary.main,\r\n //textTransform: \"uppercase\",\r\n //letterSpacing: \"2px\"\r\n },\r\n h6: {\r\n fontFamily: \"Founders Grotesk Cond Med\",\r\n //textTransform: \"uppercase\",\r\n //letterSpacing: \"2px\",\r\n color: grey[800],\r\n },\r\n subtitle1: {\r\n fontFamily: \"Founders Grotesk Reg\",\r\n color: portalTheme.palette.primary.dark,\r\n opacity: \"90%\",\r\n },\r\n subtitle2: {\r\n fontFamily: \"Founders Grotesk Reg\",\r\n color: portalTheme.palette.primary.main,\r\n },\r\n body1: {\r\n fontFamily: \"Founders Grotesk Reg\",\r\n },\r\n body2: {\r\n fontFamily: \"Founders Grotesk Reg\",\r\n }\r\n },\r\n};\r\n\r\nexport const border = {\r\n border: `solid ${portalTheme.spacing(0.5)}px ${portalTheme.palette.mossadams.border}`,\r\n borderRadius: portalTheme.spacing(2)\r\n}\r\n\r\nexport const detailPanePadding = {\r\n padding: portalTheme.spacing(4),\r\n}\r\n\r\nexport const detailPaneAccordionStyle = {\r\n boxShadow: \"none\",\r\n ...border,\r\n}\r\n\r\nexport const detailPaneAccordionHeaderStyle = {\r\n fontSize: \"1.3rem\",\r\n // fontWeight: portalTheme.typography.fontWeightRegular //todo\r\n}\r\n\r\nexport const marginAroundDescription = {\r\n \"& .MuiOutlinedInput-multiline\": {\r\n marginLeft: portalTheme.spacing(2.5),\r\n marginRight: portalTheme.spacing(2.5),\r\n }\r\n}\r\n\r\nexport const detailsPaneLastUpdatedStyle = {\r\n \"& div, & span\": {\r\n ...detailPaneTextStyle,\r\n fontSize: \"0.9rem\",\r\n paddingRight: portalTheme.spacing(2.5),\r\n minWidth: portalTheme.spacing(65)\r\n }\r\n}\r\n\r\nexport const boxShadow = { boxShadow: \"0px 1px 5px rgba(0, 0, 0, .3)\" }\r\n\r\nexport const fullWindowHeight = { height: `calc(100vh - ${portalTheme.spacing(104)}px)` }\r\n\r\nexport const actionButtonStyle = {\r\n flex: .25,\r\n width: \"100%\",\r\n paddingTop: portalTheme.spacing(4),\r\n paddingBottom: portalTheme.spacing(4),\r\n \"& .MuiButton-startIcon\": {\r\n color: portalTheme.palette.primary.main,\r\n },\r\n \"& .MuiButton-root\": {\r\n width: \"100%\",\r\n },\r\n \"& .MuiButton-label\": {\r\n textTransform: \"none\",\r\n color: portalTheme.palette.common.black,\r\n letterSpacing: 0\r\n },\r\n \"& .MuiButton-iconSizeMedium > *:first-child\": {\r\n fontSize: \"2rem\"\r\n },\r\n \"&.Mui-disabled .MuiButton-startIcon\": {\r\n color: portalTheme.palette.mossadams.gray300\r\n }\r\n}\r\n\r\nexport const actionButtonVariant = {\r\n ...actionButtonStyle,\r\n \"& .MuiButton-startIcon\": {\r\n color: portalTheme.palette.primary.contrastText,\r\n },\r\n \"&.Mui-disabled .MuiButton-startIcon\": {\r\n color: portalTheme.palette.mossadams.gray300\r\n }\r\n}\r\n\r\nexport const agGridThemeOverride = {\r\n \"& .ag-row-hover\": {\r\n backgroundColor: portalTheme.palette.mossadams.gray100,\r\n },\r\n \"& .ag-row-group .ag-group-value\": {\r\n width: \"100%\",\r\n },\r\n \"&& .ag-icon\": {\r\n color: portalTheme.palette.mossadams.darkGreen400\r\n },\r\n \"&& .ag-header-cell-text, && .ag-header-cell-label\": {\r\n fontFamily: \"Founders Grotesk Med\",\r\n color: portalTheme.palette.mossadams.darkGreen400,\r\n letterSpacing: \"0.72px\",\r\n fontSize: \".75rem\",\r\n textTransform: \"uppercase\",\r\n overflow: \"visible\",\r\n whiteSpace: \"normal\",\r\n textAlign: \"center\",\r\n fontWeight: \"normal\"\r\n },\r\n \"& .ag-theme-alpine\": {\r\n \"--ag-alpine-active-color\": portalTheme.palette.primary.main, //changes checkbox and other theme colors\r\n //according to ag-grid docs, alpine-active-color should have changed focus colors, but it did not\r\n \"--ag-input-focus-border-color\": portalTheme.palette.primary.main,\r\n //\"--ag-input-focus-box-shadow\": \"0 0 2px 0.1rem rgba(14, 56, 55, 0.4)\",\r\n //the commented out setting was not working, so below does the same thing, preserved for future reference\r\n \"& input[class^='ag-']:focus\": {\r\n boxShadow: \"0 0 2px 0.1rem rgba(14, 56, 55, 0.4)\",\r\n },\r\n \"& .ag-row-selected\": {\r\n backgroundColor: portalTheme.palette.mossadams.selectedRow,\r\n fontWeight: 'bold',\r\n },\r\n \"& .ag-root-wrapper\": {\r\n border: \"none\"\r\n },\r\n \"& .ag-header\": {\r\n backgroundColor: portalTheme.palette.mossadams.darkGreen100\r\n },\r\n \"& .MuiInputBase-input\": {\r\n fontFamily: \"Founders Grotesk Reg\",\r\n fontSize: \".88rem\"\r\n },\r\n \"& .ag-root .ag-row .ag-cell-inline-editing, .ag-root .ag-row .ag-cell-inline-editing .ag-react-container input:focus, .ag-root .ag-row .ag-cell-inline-editing .ag-react-container input:active\": {\r\n border: \"none !important\",\r\n outline: \"none !important\"\r\n },\r\n \"&.ag-popup div.ag-list.ag-select-list\": {\r\n minWidth: \"160px !important\"\r\n },\r\n \"& .ag-layout-auto-height .ag-center-cols-clipper, .ag-layout-auto-height .ag-center-cols-container, .ag-layout-print .ag-center-cols-clipper, .ag-layout-print .ag-center-cols-container\": {\r\n minHeight: \"0px\"\r\n },\r\n fontFamily: \"Founders Grotesk Reg\",\r\n },\r\n // The following themes are used by getRowClass to color rows bases on state\r\n complete: {\r\n \"&&.ag-row\": {\r\n color: portalTheme.palette.mossadams.gray300\r\n }\r\n },\r\n deleted: {\r\n \"&&.ag-row\": {\r\n color: portalTheme.palette.mossadams.gray400,\r\n fontStyle: \"italic\"\r\n }\r\n },\r\n highPriority: {\r\n \"&&.ag-row\": {\r\n backgroundColor: portalTheme.palette.mossadams.red100,\r\n \"& .ag-row-selected\": {\r\n backgroundColor: portalTheme.palette.mossadams.red200,\r\n },\r\n },\r\n \"&&.ag-row.ag-row-selected\": {\r\n backgroundColor: portalTheme.palette.mossadams.red200,\r\n },\r\n },\r\n\r\n validationError: {\r\n \"&&.ag-cell\": {\r\n borderColor: 'red'\r\n }\r\n },\r\n draft: {\r\n color: \"red\"\r\n }\r\n}\r\n\r\nexport default portalTheme;\r\n","import React from \"react\";\r\nimport { FileUploadContext } from \"../contexts/FileUploadContext/FileUploadContext\";\r\n\r\nexport const useFileUploadContext = () => {\r\n const context = React.useContext(FileUploadContext);\r\n\r\n if (context === null) {\r\n throw new Error('useFileUploadContext must be used with a FileUploadContext.Provider');\r\n }\r\n\r\n return context;\r\n}","import React from 'react';\r\n\r\ntype Params = unknown[];\r\n\r\ninterface ModifiedAsyncFunction {\r\n onTrigger: (...args: A) => Promise;\r\n loading: boolean;\r\n}\r\n\r\n\r\nconst useAsyncFunctionIsLoading = (asyncFunction: (...args: A) => Promise, onLoadingStatusChanged?: (loading: boolean) => void): ModifiedAsyncFunction => {\r\n const [loading, setLoading] = React.useState(false);\r\n\r\n React.useEffect(() => {\r\n if (onLoadingStatusChanged) {\r\n onLoadingStatusChanged(loading);\r\n }\r\n }, [loading])\r\n\r\n const onTrigger = async (...args: A) => {\r\n if (loading) {\r\n return;\r\n }\r\n\r\n setLoading(true);\r\n try {\r\n let result = await asyncFunction(...args);\r\n return result;\r\n }\r\n catch (error) {\r\n console.error('An unhandled error occured.', error);\r\n }\r\n finally {\r\n setLoading(false);\r\n }\r\n }\r\n\r\n return { onTrigger, loading };\r\n}\r\n\r\nexport default useAsyncFunctionIsLoading;","import { useDispatch, useSelector } from \"react-redux\"\r\nimport DataReadService from \"../services/DataReadService\";\r\nimport { ILookupLists } from \"../interfaces/ILookupLists\";\r\nimport { setLoadingLookupLists, setLookupLists } from \"../store/actions\";\r\nimport React from \"react\";\r\nimport { Utils } from \"../utilities/utils\";\r\n\r\nexport const useLookupLists = () => {\r\n const [lookupListError, setLookupListError] = React.useState(null);\r\n const lookupLists: ILookupLists = useSelector((state: any) => state.lookupLists as ILookupLists);\r\n const loadingLookups: boolean = useSelector((state: any) => state.loadingLookups as boolean);\r\n const dispatch = useDispatch();\r\n\r\n const getLookupLists = async () => {\r\n dispatch(setLoadingLookupLists(true));\r\n\r\n const lists: ILookupLists | undefined = getLookupListsFromLocalStorage() ?? await fetchLookupLists();\r\n if (lists) {\r\n dispatch(setLookupLists(lists));\r\n }\r\n else {\r\n setLookupListError(\"Failed to load Lookup lists.\");\r\n }\r\n\r\n dispatch(setLoadingLookupLists(false));\r\n }\r\n\r\n React.useEffect(() => {\r\n if (!lookupLists && !loadingLookups) {\r\n getLookupLists();\r\n }\r\n }, [])\r\n\r\n return { lookupLists, loadingLookups, lookupListError };\r\n}\r\n\r\nconst fetchLookupLists = async () => {\r\n const dataReadService = new DataReadService();\r\n\r\n const promises = {\r\n areas: dataReadService.GetAreaList(),\r\n phases: dataReadService.GetPhaseList(),\r\n priorities: dataReadService.GetTaskPriorityList(),\r\n statuses: dataReadService.GetTaskStatusList(),\r\n socStatuses: dataReadService.GetSocStatusList(),\r\n taskTypes: dataReadService.GetTaskTypeList(),\r\n }\r\n\r\n let data: ILookupLists | undefined;\r\n\r\n await Promise\r\n .all(Object.entries(promises).map(\r\n async ([key, promise]) => {\r\n const result = await promise;\r\n if (!result.status) {\r\n throw `Error: ${key} - ${result.status}`;\r\n }\r\n return [key, result?.data];\r\n }\r\n )\r\n )\r\n .then(results => {\r\n data = Object.fromEntries(results);\r\n })\r\n .catch(err => {\r\n console.log(err);\r\n });\r\n\r\n saveLookupListsToLocalStorage(data);\r\n\r\n return data;\r\n}\r\n\r\nconst lookupListsKey = \"CLIENT_PORTAL_LOOKUP_LISTS\";\r\n\r\nconst getLookupListsFromLocalStorage = (): ILookupLists | undefined => {\r\n let lookupLists, data;\r\n\r\n const dataString = localStorage.getItem(lookupListsKey);\r\n if (dataString) {\r\n data = JSON.parse(dataString);\r\n }\r\n\r\n if (data && data.buildStamp === process.env.REACT_APP_BUILD_STAMP && data.expirationTime > Date.now()) {\r\n lookupLists = data.lookupLists;\r\n }\r\n\r\n return lookupLists;\r\n}\r\n\r\nconst saveLookupListsToLocalStorage = (lookupLists: ILookupLists | undefined) => {\r\n if (lookupLists) {\r\n const minutesToRetain = 60;\r\n const expirationTime = Date.now() + (60 * 1000) * minutesToRetain;\r\n\r\n const item = {\r\n lookupLists,\r\n expirationTime,\r\n buildStamp: process.env.REACT_APP_BUILD_STAMP,\r\n }\r\n\r\n Utils.saveItemToLocalStorage(lookupListsKey, JSON.stringify(item));\r\n }\r\n}\r\n","import React from 'react'\r\nimport { RestrictedUserOption } from '../components/RestrictedFileAssociationDialog/RestrictedUserAutocomplete';\r\nimport { useSelector } from 'react-redux';\r\nimport ICurrentUser from '../interfaces/ICurrentUser';\r\n\r\nexport interface PermittedUserListProps {\r\n userOptions: RestrictedUserOption[];\r\n setUserOptions: (options: RestrictedUserOption[]) => void;\r\n selectedUserOptions: RestrictedUserOption[];\r\n setSelectedUserOptions: (options: RestrictedUserOption[]) => void;\r\n getSelectedPermittedUserIdsForRequest: () => string[];\r\n getPermittedUserIds: () => string[];\r\n hasSelections: boolean;\r\n}\r\n\r\n/**\r\n * A hook for managing the selection of permitted users for documents and folders. \r\n */\r\nexport default function usePermittedUsers(): PermittedUserListProps {\r\n const currentUser = useSelector((state: any) => state.currentUser as ICurrentUser);\r\n const [userOptions, setUserOptions] = React.useState([]);\r\n const [selectedUserOptions, setSelectedUserOptions] = React.useState([]);\r\n\r\n function getUserIds(options: RestrictedUserOption[]) {\r\n return options.map(option => option.userId);\r\n }\r\n\r\n function filterSelectedUserOptions(filterMossAdamsUsers = true): RestrictedUserOption[] {\r\n const optionsToSelect = [...selectedUserOptions];\r\n \r\n const selectedMaStaffIds = optionsToSelect\r\n .filter(option => option.isMossAdamsStaff)\r\n .map(option => option.userId);\r\n \r\n const maUserOptionIds = getUserIds(\r\n userOptions.filter(option => option.isMossAdamsStaff)\r\n );\r\n \r\n const assignedToAllMa =\r\n maUserOptionIds.every(id => selectedMaStaffIds.includes(id)) ||\r\n selectedMaStaffIds.length === 0;\r\n \r\n if (assignedToAllMa) {\r\n const externalUsers = optionsToSelect.filter(option => !option.isMossAdamsStaff);\r\n return filterMossAdamsUsers\r\n ? externalUsers\r\n : [...externalUsers, ...userOptions.filter(option => option.isMossAdamsStaff)];\r\n }\r\n \r\n return optionsToSelect;\r\n }\r\n\r\n function getSelectedPermittedUserIdsForRequest(): string[] {\r\n if (!currentUser.isMossAdamsStaff) {\r\n return [currentUser.userId];\r\n }\r\n\r\n return getUserIds(filterSelectedUserOptions());\r\n }\r\n\r\n function getPermittedUserIds(): string[] {\r\n return getUserIds(filterSelectedUserOptions(false));\r\n }\r\n \r\n return {\r\n userOptions,\r\n setUserOptions,\r\n selectedUserOptions,\r\n setSelectedUserOptions,\r\n getSelectedPermittedUserIdsForRequest,\r\n getPermittedUserIds,\r\n hasSelections: selectedUserOptions.length > 0\r\n }\r\n}","import React, { useState } from 'react';\r\nimport { useSelector } from 'react-redux';\r\n\r\nexport const useSelectedClientsAndEngagements = () => {\r\n const selectedClients: string[] = useSelector((state: any) => state.selectedClients);\r\n const selectedEngagements: string[] = useSelector((state: any) => state.selectedEngagements);\r\n const selectedClientEngagementIds: string[] = useSelector((state: any) => state.selectedClientEngagementIds);\r\n const areSelectedClientEngagementsLoaded: string[] = useSelector((state: any) => state.areSelectedClientEngagementsLoaded);\r\n\r\n\r\n return {\r\n selectedClients,\r\n selectedEngagements,\r\n selectedClientAndEngagementIds: selectedClientEngagementIds,\r\n areSelectedClientEngagementsLoaded,\r\n };\r\n};\r\n","import React from 'react';\r\nimport { useSnackbar } from 'notistack';\r\nimport DataWriteService from '../services/DataWriteService';\r\nimport useAsyncFunctionIsLoading from './useIsLoadingAsync';\r\nimport { SnackbarVariantTypes } from '../helpers/enums/enums';\r\nimport ITask from '../interfaces/ITask';\r\nimport ICurrentUser from '../interfaces/ICurrentUser';\r\nimport { useSelector } from 'react-redux';\r\nimport { Utils } from '../utilities/utils';\r\n\r\n\r\nexport interface RequestRestrictionDto {\r\n taskIds: string[];\r\n restrictTasks: boolean;\r\n}\r\n\r\nexport interface RequestRestrictionResponse {\r\n success: boolean;\r\n tasksWithInaccessibleDocuments: string[];\r\n tasksWithDocumentsAttachedToOtherRequests: string[];\r\n tasksWithAttachmentsInRestrictedFolders: string[];\r\n tasks: null | ITask[];\r\n}\r\n\r\nexport const useUpdateRequestRestriction = () => {\r\n const { enqueueSnackbar } = useSnackbar();\r\n const currentUser = useSelector((state: any) => state.currentUser as ICurrentUser);\r\n\r\n const dataWriteService = new DataWriteService();\r\n\r\n const [response, setResponse] = React.useState(null);\r\n\r\n const updateTask = (task: ITask, restricted: boolean) => {\r\n task.isRestricted = restricted;\r\n task.updatedDateTime = new Date();\r\n task.updatedByUserId = currentUser.userId;\r\n task.updatedByUserName = currentUser.name;\r\n return task;\r\n }\r\n\r\n // to be updated with bulk update implementation\r\n const handleBulkUpdate = (response: RequestRestrictionResponse, tasks: ITask[], restrictTasks: boolean) => {\r\n if (response && response.success) {\r\n tasks.forEach(task => {\r\n updateTask(task, restrictTasks);\r\n });\r\n enqueueSnackbar(`All requests have been successfully ${restrictTasks ? \"restricted\" : \"unrestricted\"}. Request and attachment access has been updated.`, { variant: SnackbarVariantTypes.Success });\r\n return tasks;\r\n }\r\n else {\r\n setResponse(response);\r\n const errorMessages = generateBulkErrorMessages(response, tasks);\r\n Utils.enqueueMultiLineSnackbar(errorMessages, enqueueSnackbar, { variant: SnackbarVariantTypes.Error, autoHideDuration: null });\r\n }\r\n }\r\n\r\n const generateBulkErrorMessages = (response: RequestRestrictionResponse, tasks: ITask[]) => {\r\n let messages = ['Unable to update request access for the following requests:'];\r\n\r\n const taskMap = new Map(tasks.map(task => [task.taskId, task]));\r\n\r\n const getTaskNumbers = (taskIds: string[]) => taskIds.map(id => taskMap.get(id)?.taskNumber).filter(Boolean).join(', ');\r\n\r\n if (response.tasksWithInaccessibleDocuments?.length) {\r\n const taskNumbers = getTaskNumbers(response.tasksWithInaccessibleDocuments);\r\n messages.push(`These requests have attachments which are inaccessible to you: ${taskNumbers}`);\r\n }\r\n if (response.tasksWithAttachmentsInRestrictedFolders?.length) {\r\n const taskNumbers = getTaskNumbers(response.tasksWithAttachmentsInRestrictedFolders);\r\n messages.push(`These requests have attachments in restricted folders. These attachments must be moved to a different folder or unattached before these requests can be restricted: ${taskNumbers}`);\r\n }\r\n if (response.tasksWithDocumentsAttachedToOtherRequests?.length) {\r\n const taskNumbers = getTaskNumbers(response.tasksWithDocumentsAttachedToOtherRequests);\r\n messages.push(`These requests have attachments which are attached to other requests: ${taskNumbers}`);\r\n }\r\n\r\n return messages;\r\n }\r\n\r\n const handleSingleUpdate = (response: RequestRestrictionResponse, task: ITask, restrictTasks: boolean) => {\r\n if (response && response.success) {\r\n updateTask(task, restrictTasks);\r\n enqueueSnackbar(`The request has been successfully ${restrictTasks ? \"restricted\" : \"unrestricted\"}. Request and attachment access has been updated.`, { variant: SnackbarVariantTypes.Success });\r\n return task;\r\n }\r\n else {\r\n const errorMessages = generateErrorMessages(response);\r\n Utils.enqueueMultiLineSnackbar(errorMessages, enqueueSnackbar, { variant: SnackbarVariantTypes.Error, autoHideDuration: null });\r\n }\r\n }\r\n\r\n const generateErrorMessages = (response: RequestRestrictionResponse) => {\r\n let messages = ['Unable to update request access.'];\r\n\r\n if (response.tasksWithInaccessibleDocuments?.length) {\r\n messages.push('This request has attachments which are inaccessible to you.');\r\n }\r\n if (response.tasksWithAttachmentsInRestrictedFolders?.length) {\r\n messages.push('This request has attachments in restricted folders. These attachments must be moved to a different folder or unattached before this request can be restricted.');\r\n }\r\n if (response.tasksWithDocumentsAttachedToOtherRequests?.length) {\r\n messages.push('This request has attachments which are attached to other requests. To restrict access to a request, all of its attachments must only be attached to that request.');\r\n }\r\n\r\n return messages;\r\n }\r\n\r\n const { onTrigger: updateRequestRestriction, loading } = useAsyncFunctionIsLoading(async (tasks: ITask[], restrictTasks: boolean) => {\r\n const dto: RequestRestrictionDto = {\r\n taskIds: tasks.map(t => t.taskId!),\r\n restrictTasks\r\n }\r\n\r\n const result = await dataWriteService.UpdateRequestRestriction(dto);\r\n\r\n const commandResponse = result.response?.data as RequestRestrictionResponse;\r\n if (commandResponse) {\r\n return tasks.length === 1\r\n ? handleSingleUpdate(commandResponse, tasks[0], restrictTasks)\r\n : handleBulkUpdate(commandResponse, tasks, restrictTasks);\r\n }\r\n else {\r\n enqueueSnackbar(result.errorMessages, { variant: SnackbarVariantTypes.Error });\r\n }\r\n });\r\n\r\n return { updateRequestRestriction, loading, response }\r\n}\r\n\r\n\r\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport const Constants = {\n LIBRARY_NAME: \"MSAL.JS\",\n SKU: \"msal.js.common\",\n // Prefix for all library cache entries\n CACHE_PREFIX: \"msal\",\n // default authority\n DEFAULT_AUTHORITY: \"https://login.microsoftonline.com/common/\",\n DEFAULT_AUTHORITY_HOST: \"login.microsoftonline.com\",\n // ADFS String\n ADFS: \"adfs\",\n // Default AAD Instance Discovery Endpoint\n AAD_INSTANCE_DISCOVERY_ENDPT: \"https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=\",\n // Resource delimiter - used for certain cache entries\n RESOURCE_DELIM: \"|\",\n // Placeholder for non-existent account ids/objects\n NO_ACCOUNT: \"NO_ACCOUNT\",\n // Claims\n CLAIMS: \"claims\",\n // Consumer UTID\n CONSUMER_UTID: \"9188040d-6c67-4c5b-b112-36a304b66dad\",\n // Default scopes\n OPENID_SCOPE: \"openid\",\n PROFILE_SCOPE: \"profile\",\n OFFLINE_ACCESS_SCOPE: \"offline_access\",\n EMAIL_SCOPE: \"email\",\n // Default response type for authorization code flow\n CODE_RESPONSE_TYPE: \"code\",\n CODE_GRANT_TYPE: \"authorization_code\",\n RT_GRANT_TYPE: \"refresh_token\",\n FRAGMENT_RESPONSE_MODE: \"fragment\",\n S256_CODE_CHALLENGE_METHOD: \"S256\",\n URL_FORM_CONTENT_TYPE: \"application/x-www-form-urlencoded;charset=utf-8\",\n AUTHORIZATION_PENDING: \"authorization_pending\",\n NOT_DEFINED: \"not_defined\",\n EMPTY_STRING: \"\",\n FORWARD_SLASH: \"/\",\n IMDS_ENDPOINT: \"http://169.254.169.254/metadata/instance/compute/location\",\n IMDS_VERSION: \"2020-06-01\",\n IMDS_TIMEOUT: 2000,\n AZURE_REGION_AUTO_DISCOVER_FLAG: \"TryAutoDetect\",\n REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX: \"login.microsoft.com\",\n KNOWN_PUBLIC_CLOUDS: [\"login.microsoftonline.com\", \"login.windows.net\", \"login.microsoft.com\", \"sts.windows.net\"]\n};\n\nexport const OIDC_DEFAULT_SCOPES = [\n Constants.OPENID_SCOPE,\n Constants.PROFILE_SCOPE,\n Constants.OFFLINE_ACCESS_SCOPE\n];\n\nexport const OIDC_SCOPES = [\n ...OIDC_DEFAULT_SCOPES,\n Constants.EMAIL_SCOPE\n];\n\n/**\n * Request header names\n */\nexport enum HeaderNames {\n CONTENT_TYPE = \"Content-Type\",\n RETRY_AFTER = \"Retry-After\",\n CCS_HEADER = \"X-AnchorMailbox\",\n WWWAuthenticate = \"WWW-Authenticate\",\n AuthenticationInfo = \"Authentication-Info\"\n}\n\n/**\n * Persistent cache keys MSAL which stay while user is logged in.\n */\nexport enum PersistentCacheKeys {\n ID_TOKEN = \"idtoken\",\n CLIENT_INFO = \"client.info\",\n ADAL_ID_TOKEN = \"adal.idtoken\",\n ERROR = \"error\",\n ERROR_DESC = \"error.description\",\n ACTIVE_ACCOUNT = \"active-account\"\n}\n\n/**\n * String constants related to AAD Authority\n */\nexport enum AADAuthorityConstants {\n COMMON = \"common\",\n ORGANIZATIONS = \"organizations\",\n CONSUMERS = \"consumers\"\n}\n\n/**\n * Keys in the hashParams sent by AAD Server\n */\nexport enum AADServerParamKeys {\n CLIENT_ID = \"client_id\",\n REDIRECT_URI = \"redirect_uri\",\n RESPONSE_TYPE = \"response_type\",\n RESPONSE_MODE = \"response_mode\",\n GRANT_TYPE = \"grant_type\",\n CLAIMS = \"claims\",\n SCOPE = \"scope\",\n ERROR = \"error\",\n ERROR_DESCRIPTION = \"error_description\",\n ACCESS_TOKEN = \"access_token\",\n ID_TOKEN = \"id_token\",\n REFRESH_TOKEN = \"refresh_token\",\n EXPIRES_IN = \"expires_in\",\n STATE = \"state\",\n NONCE = \"nonce\",\n PROMPT = \"prompt\",\n SESSION_STATE = \"session_state\",\n CLIENT_INFO = \"client_info\",\n CODE = \"code\",\n CODE_CHALLENGE = \"code_challenge\",\n CODE_CHALLENGE_METHOD = \"code_challenge_method\",\n CODE_VERIFIER = \"code_verifier\",\n CLIENT_REQUEST_ID = \"client-request-id\",\n X_CLIENT_SKU = \"x-client-SKU\",\n X_CLIENT_VER = \"x-client-VER\",\n X_CLIENT_OS = \"x-client-OS\",\n X_CLIENT_CPU = \"x-client-CPU\",\n X_CLIENT_CURR_TELEM = \"x-client-current-telemetry\",\n X_CLIENT_LAST_TELEM = \"x-client-last-telemetry\",\n X_MS_LIB_CAPABILITY = \"x-ms-lib-capability\",\n POST_LOGOUT_URI = \"post_logout_redirect_uri\",\n ID_TOKEN_HINT= \"id_token_hint\",\n DEVICE_CODE = \"device_code\",\n CLIENT_SECRET = \"client_secret\",\n CLIENT_ASSERTION = \"client_assertion\",\n CLIENT_ASSERTION_TYPE = \"client_assertion_type\",\n TOKEN_TYPE = \"token_type\",\n REQ_CNF = \"req_cnf\",\n OBO_ASSERTION = \"assertion\",\n REQUESTED_TOKEN_USE = \"requested_token_use\",\n ON_BEHALF_OF = \"on_behalf_of\",\n FOCI = \"foci\",\n CCS_HEADER = \"X-AnchorMailbox\",\n RETURN_SPA_CODE = \"return_spa_code\"\n}\n\n/**\n * Claims request keys\n */\nexport enum ClaimsRequestKeys {\n ACCESS_TOKEN = \"access_token\",\n XMS_CC = \"xms_cc\"\n}\n\n/**\n * we considered making this \"enum\" in the request instead of string, however it looks like the allowed list of\n * prompt values kept changing over past couple of years. There are some undocumented prompt values for some\n * internal partners too, hence the choice of generic \"string\" type instead of the \"enum\"\n */\nexport const PromptValue = {\n LOGIN: \"login\",\n SELECT_ACCOUNT: \"select_account\",\n CONSENT: \"consent\",\n NONE: \"none\",\n CREATE: \"create\"\n};\n\n/**\n * SSO Types - generated to populate hints\n */\nexport enum SSOTypes {\n ACCOUNT = \"account\",\n SID = \"sid\",\n LOGIN_HINT = \"login_hint\",\n ID_TOKEN = \"id_token\",\n DOMAIN_HINT = \"domain_hint\",\n ORGANIZATIONS = \"organizations\",\n CONSUMERS = \"consumers\",\n ACCOUNT_ID = \"accountIdentifier\",\n HOMEACCOUNT_ID = \"homeAccountIdentifier\"\n}\n\n/**\n * Disallowed extra query parameters.\n */\nexport const BlacklistedEQParams = [\n SSOTypes.SID,\n SSOTypes.LOGIN_HINT\n];\n\n/**\n * allowed values for codeVerifier\n */\nexport const CodeChallengeMethodValues = {\n PLAIN: \"plain\",\n S256: \"S256\"\n};\n\n/**\n * The method used to encode the code verifier for the code challenge parameter. can be one\n * of plain or s256. if excluded, code challenge is assumed to be plaintext. for more\n * information, see the pkce rcf: https://tools.ietf.org/html/rfc7636\n */\nexport const CodeChallengeMethodValuesArray: string[] = [\n CodeChallengeMethodValues.PLAIN,\n CodeChallengeMethodValues.S256\n];\n\n/**\n * allowed values for response_mode\n */\nexport enum ResponseMode {\n QUERY = \"query\",\n FRAGMENT = \"fragment\",\n FORM_POST = \"form_post\"\n}\n\n/**\n * allowed grant_type\n */\nexport enum GrantType {\n IMPLICIT_GRANT = \"implicit\",\n AUTHORIZATION_CODE_GRANT = \"authorization_code\",\n CLIENT_CREDENTIALS_GRANT = \"client_credentials\",\n RESOURCE_OWNER_PASSWORD_GRANT = \"password\",\n REFRESH_TOKEN_GRANT = \"refresh_token\",\n DEVICE_CODE_GRANT = \"device_code\",\n JWT_BEARER = \"urn:ietf:params:oauth:grant-type:jwt-bearer\"\n}\n\n/**\n * Account types in Cache\n */\nexport enum CacheAccountType {\n MSSTS_ACCOUNT_TYPE = \"MSSTS\",\n ADFS_ACCOUNT_TYPE = \"ADFS\",\n MSAV1_ACCOUNT_TYPE = \"MSA\",\n GENERIC_ACCOUNT_TYPE = \"Generic\" // NTLM, Kerberos, FBA, Basic etc\n}\n\n/**\n * Separators used in cache\n */\nexport enum Separators {\n CACHE_KEY_SEPARATOR = \"-\",\n CLIENT_INFO_SEPARATOR = \".\"\n}\n\n/**\n * Credential Type stored in the cache\n */\nexport enum CredentialType {\n ID_TOKEN = \"IdToken\",\n ACCESS_TOKEN = \"AccessToken\",\n ACCESS_TOKEN_WITH_AUTH_SCHEME = \"AccessToken_With_AuthScheme\",\n REFRESH_TOKEN = \"RefreshToken\",\n}\n\n/**\n * Credential Type stored in the cache\n */\nexport enum CacheSchemaType {\n ACCOUNT = \"Account\",\n CREDENTIAL = \"Credential\",\n ID_TOKEN = \"IdToken\",\n ACCESS_TOKEN = \"AccessToken\",\n REFRESH_TOKEN = \"RefreshToken\",\n APP_METADATA = \"AppMetadata\",\n TEMPORARY = \"TempCache\",\n TELEMETRY = \"Telemetry\",\n UNDEFINED = \"Undefined\",\n THROTTLING = \"Throttling\"\n}\n\n/**\n * Combine all cache types\n */\nexport enum CacheType {\n ADFS = 1001,\n MSA = 1002,\n MSSTS = 1003,\n GENERIC = 1004,\n ACCESS_TOKEN = 2001,\n REFRESH_TOKEN = 2002,\n ID_TOKEN = 2003,\n APP_METADATA = 3001,\n UNDEFINED = 9999\n}\n\n/**\n * More Cache related constants\n */\nexport const APP_METADATA = \"appmetadata\";\nexport const CLIENT_INFO = \"client_info\";\nexport const THE_FAMILY_ID = \"1\";\n\nexport const AUTHORITY_METADATA_CONSTANTS = {\n CACHE_KEY: \"authority-metadata\",\n REFRESH_TIME_SECONDS: 3600 * 24 // 24 Hours\n};\n\nexport enum AuthorityMetadataSource {\n CONFIG = \"config\",\n CACHE = \"cache\",\n NETWORK = \"network\"\n}\n\nexport const SERVER_TELEM_CONSTANTS = {\n SCHEMA_VERSION: 5,\n MAX_CUR_HEADER_BYTES: 80, // ESTS limit is 100B, set to 80 to provide a 20B buffer\n MAX_LAST_HEADER_BYTES: 330, // ESTS limit is 350B, set to 330 to provide a 20B buffer,\n MAX_CACHED_ERRORS: 50, // Limit the number of errors that can be stored to prevent uncontrolled size gains\n CACHE_KEY: \"server-telemetry\",\n CATEGORY_SEPARATOR: \"|\",\n VALUE_SEPARATOR: \",\",\n OVERFLOW_TRUE: \"1\",\n OVERFLOW_FALSE: \"0\",\n UNKNOWN_ERROR: \"unknown_error\"\n};\n\n/**\n * Type of the authentication request\n */\nexport enum AuthenticationScheme {\n BEARER = \"Bearer\",\n POP = \"pop\",\n SSH = \"ssh-cert\"\n}\n\n/**\n * Constants related to throttling\n */\nexport const ThrottlingConstants = {\n // Default time to throttle RequestThumbprint in seconds\n DEFAULT_THROTTLE_TIME_SECONDS: 60,\n // Default maximum time to throttle in seconds, overrides what the server sends back\n DEFAULT_MAX_THROTTLE_TIME_SECONDS: 3600,\n // Prefix for storing throttling entries\n THROTTLING_PREFIX: \"throttling\",\n // Value assigned to the x-ms-lib-capability header to indicate to the server the library supports throttling\n X_MS_LIB_CAPABILITY_VALUE: \"retry-after, h429\"\n};\n\nexport const Errors = {\n INVALID_GRANT_ERROR: \"invalid_grant\",\n CLIENT_MISMATCH_ERROR: \"client_mismatch\",\n};\n\n/**\n * Password grant parameters\n */\nexport enum PasswordGrantConstants {\n username = \"username\",\n password = \"password\"\n}\n\n/**\n * Response codes\n */\nexport enum ResponseCodes {\n httpSuccess = 200,\n httpBadRequest = 400\n}\n\n/**\n * Region Discovery Sources\n */\nexport enum RegionDiscoverySources {\n FAILED_AUTO_DETECTION = \"1\",\n INTERNAL_CACHE = \"2\",\n ENVIRONMENT_VARIABLE = \"3\",\n IMDS = \"4\",\n}\n\n/**\n * Region Discovery Outcomes\n */\nexport enum RegionDiscoveryOutcomes {\n CONFIGURED_MATCHES_DETECTED = \"1\",\n CONFIGURED_NO_AUTO_DETECTION = \"2\",\n CONFIGURED_NOT_DETECTED = \"3\",\n AUTO_DETECTION_REQUESTED_SUCCESSFUL = \"4\",\n AUTO_DETECTION_REQUESTED_FAILED = \"5\"\n}\n\nexport enum CacheOutcome {\n NO_CACHE_HIT = \"0\",\n FORCE_REFRESH = \"1\",\n NO_CACHED_ACCESS_TOKEN = \"2\",\n CACHED_ACCESS_TOKEN_EXPIRED = \"3\",\n REFRESH_CACHED_ACCESS_TOKEN = \"4\"\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { OIDC_DEFAULT_SCOPES } from \"@azure/msal-common\";\nimport { PopupRequest } from \"../request/PopupRequest\";\nimport { RedirectRequest } from \"../request/RedirectRequest\";\n\n/**\n * Constants\n */\nexport const BrowserConstants = {\n /**\n * Interaction in progress cache value\n */\n INTERACTION_IN_PROGRESS_VALUE: \"interaction_in_progress\",\n /**\n * Invalid grant error code\n */\n INVALID_GRANT_ERROR: \"invalid_grant\",\n /**\n * Default popup window width\n */\n POPUP_WIDTH: 483,\n /**\n * Default popup window height\n */\n POPUP_HEIGHT: 600,\n /**\n * Name of the popup window starts with\n */\n POPUP_NAME_PREFIX: \"msal\",\n /**\n * Default popup monitor poll interval in milliseconds\n */\n POLL_INTERVAL_MS: 50,\n /**\n * Msal-browser SKU\n */\n MSAL_SKU: \"msal.js.browser\",\n};\n\nexport enum BrowserCacheLocation {\n LocalStorage = \"localStorage\",\n SessionStorage = \"sessionStorage\",\n MemoryStorage = \"memoryStorage\"\n}\n\n/**\n * HTTP Request types supported by MSAL.\n */\nexport enum HTTP_REQUEST_TYPE {\n GET = \"GET\",\n POST = \"POST\"\n}\n\n/**\n * Temporary cache keys for MSAL, deleted after any request.\n */\nexport enum TemporaryCacheKeys {\n AUTHORITY = \"authority\",\n ACQUIRE_TOKEN_ACCOUNT = \"acquireToken.account\",\n SESSION_STATE = \"session.state\",\n REQUEST_STATE = \"request.state\",\n NONCE_IDTOKEN = \"nonce.id_token\",\n ORIGIN_URI = \"request.origin\",\n RENEW_STATUS = \"token.renew.status\",\n URL_HASH = \"urlHash\",\n REQUEST_PARAMS = \"request.params\",\n SCOPES = \"scopes\",\n INTERACTION_STATUS_KEY = \"interaction.status\",\n CCS_CREDENTIAL = \"ccs.credential\",\n CORRELATION_ID = \"request.correlationId\"\n}\n\n/**\n * Cache keys stored in-memory\n */\nexport enum InMemoryCacheKeys {\n WRAPPER_SKU = \"wrapper.sku\",\n WRAPPER_VER = \"wrapper.version\"\n}\n\n/**\n * API Codes for Telemetry purposes. \n * Before adding a new code you must claim it in the MSAL Telemetry tracker as these number spaces are shared across all MSALs\n * 0-99 Silent Flow\n * 800-899 Auth Code Flow\n */\nexport enum ApiId {\n acquireTokenRedirect = 861,\n acquireTokenPopup = 862,\n ssoSilent = 863,\n acquireTokenSilent_authCode = 864,\n handleRedirectPromise = 865,\n acquireTokenByCode = 866,\n acquireTokenSilent_silentFlow = 61,\n logout = 961,\n logoutPopup = 962\n}\n\n/*\n * Interaction type of the API - used for state and telemetry\n */\nexport enum InteractionType {\n Redirect = \"redirect\",\n Popup = \"popup\",\n Silent = \"silent\"\n}\n\n/**\n * Types of interaction currently in progress.\n * Used in events in wrapper libraries to invoke functions when certain interaction is in progress or all interactions are complete.\n */\nexport enum InteractionStatus {\n /**\n * Initial status before interaction occurs\n */\n Startup = \"startup\",\n /**\n * Status set when all login calls occuring\n */\n Login = \"login\",\n /**\n * Status set when logout call occuring\n */ \n Logout = \"logout\",\n /**\n * Status set for acquireToken calls\n */\n AcquireToken = \"acquireToken\",\n /**\n * Status set for ssoSilent calls\n */\n SsoSilent = \"ssoSilent\",\n /**\n * Status set when handleRedirect in progress\n */\n HandleRedirect = \"handleRedirect\",\n /**\n * Status set when interaction is complete\n */\n None = \"none\"\n}\n\nexport const DEFAULT_REQUEST: RedirectRequest|PopupRequest = {\n scopes: OIDC_DEFAULT_SCOPES\n};\n\n/**\n * JWK Key Format string (Type MUST be defined for window crypto APIs)\n */\nexport const KEY_FORMAT_JWK = \"jwk\";\n\n// Supported wrapper SKUs\nexport enum WrapperSKU {\n React = \"@azure/msal-react\",\n Angular = \"@azure/msal-angular\"\n}\n\n// DatabaseStorage Constants\nexport const DB_NAME = \"msal.db\";\nexport const DB_VERSION = 1;\nexport const DB_TABLE_NAME = `${DB_NAME}.keys`;\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { StringUtils } from \"../utils/StringUtils\";\nimport { LoggerOptions } from \"../config/ClientConfiguration\";\nimport { Constants } from \"../utils/Constants\";\n\n/**\n * Options for logger messages.\n */\nexport type LoggerMessageOptions = {\n logLevel: LogLevel,\n containsPii?: boolean,\n context?: string,\n correlationId?: string\n};\n\n/**\n * Log message level.\n */\nexport enum LogLevel {\n Error,\n Warning,\n Info,\n Verbose,\n Trace\n}\n\n/**\n * Callback to send the messages to.\n */\nexport interface ILoggerCallback {\n (level: LogLevel, message: string, containsPii: boolean): void;\n}\n\n/**\n * Class which facilitates logging of messages to a specific place.\n */\nexport class Logger {\n\n // Correlation ID for request, usually set by user.\n private correlationId: string;\n\n // Current log level, defaults to info.\n private level: LogLevel = LogLevel.Info;\n\n // Boolean describing whether PII logging is allowed.\n private piiLoggingEnabled: boolean;\n\n // Callback to send messages to.\n private localCallback: ILoggerCallback;\n\n // Package name implementing this logger\n private packageName: string;\n\n // Package version implementing this logger\n private packageVersion: string;\n\n constructor(loggerOptions: LoggerOptions, packageName?: string, packageVersion?: string) {\n const defaultLoggerCallback = () => {\n return;\n };\n this.localCallback = loggerOptions.loggerCallback || defaultLoggerCallback;\n this.piiLoggingEnabled = loggerOptions.piiLoggingEnabled || false;\n this.level = typeof(loggerOptions.logLevel) === \"number\" ? loggerOptions.logLevel : LogLevel.Info;\n this.correlationId = loggerOptions.correlationId || \"\";\n\n this.packageName = packageName || Constants.EMPTY_STRING;\n this.packageVersion = packageVersion || Constants.EMPTY_STRING;\n }\n\n /**\n * Create new Logger with existing configurations.\n */\n public clone(packageName: string, packageVersion: string, correlationId?: string): Logger {\n return new Logger({loggerCallback: this.localCallback, piiLoggingEnabled: this.piiLoggingEnabled, logLevel: this.level, correlationId: correlationId || this.correlationId}, packageName, packageVersion);\n }\n\n /**\n * Log message with required options.\n */\n private logMessage(logMessage: string, options: LoggerMessageOptions): void {\n if ((options.logLevel > this.level) || (!this.piiLoggingEnabled && options.containsPii)) {\n return;\n }\n const timestamp = new Date().toUTCString();\n\n // Add correlationId to logs if set, correlationId provided on log messages take precedence\n let logHeader: string;\n if (!StringUtils.isEmpty(options.correlationId)) {\n logHeader = `[${timestamp}] : [${options.correlationId}]`;\n } else if (!StringUtils.isEmpty(this.correlationId)) {\n logHeader = `[${timestamp}] : [${this.correlationId}]`;\n } else {\n logHeader = `[${timestamp}]`;\n }\n\n const log = `${logHeader} : ${this.packageName}@${this.packageVersion} : ${LogLevel[options.logLevel]} - ${logMessage}`;\n // debug(`msal:${LogLevel[options.logLevel]}${options.containsPii ? \"-Pii\": \"\"}${options.context ? `:${options.context}` : \"\"}`)(logMessage);\n this.executeCallback(options.logLevel, log, options.containsPii || false);\n }\n\n /**\n * Execute callback with message.\n */\n executeCallback(level: LogLevel, message: string, containsPii: boolean): void {\n if (this.localCallback) {\n this.localCallback(level, message, containsPii);\n }\n }\n\n /**\n * Logs error messages.\n */\n error(message: string, correlationId?: string): void {\n this.logMessage(message, {\n logLevel: LogLevel.Error,\n containsPii: false,\n correlationId: correlationId || \"\"\n });\n }\n\n /**\n * Logs error messages with PII.\n */\n errorPii(message: string, correlationId?: string): void {\n this.logMessage(message, {\n logLevel: LogLevel.Error,\n containsPii: true,\n correlationId: correlationId || \"\"\n });\n }\n\n /**\n * Logs warning messages.\n */\n warning(message: string, correlationId?: string): void {\n this.logMessage(message, {\n logLevel: LogLevel.Warning,\n containsPii: false,\n correlationId: correlationId || \"\"\n });\n }\n\n /**\n * Logs warning messages with PII.\n */\n warningPii(message: string, correlationId?: string): void {\n this.logMessage(message, {\n logLevel: LogLevel.Warning,\n containsPii: true,\n correlationId: correlationId || \"\"\n });\n }\n\n /**\n * Logs info messages.\n */\n info(message: string, correlationId?: string): void {\n this.logMessage(message, {\n logLevel: LogLevel.Info,\n containsPii: false,\n correlationId: correlationId || \"\"\n });\n }\n\n /**\n * Logs info messages with PII.\n */\n infoPii(message: string, correlationId?: string): void {\n this.logMessage(message, {\n logLevel: LogLevel.Info,\n containsPii: true,\n correlationId: correlationId || \"\"\n });\n }\n\n /**\n * Logs verbose messages.\n */\n verbose(message: string, correlationId?: string): void {\n this.logMessage(message, {\n logLevel: LogLevel.Verbose,\n containsPii: false,\n correlationId: correlationId || \"\"\n });\n }\n\n /**\n * Logs verbose messages with PII.\n */\n verbosePii(message: string, correlationId?: string): void {\n this.logMessage(message, {\n logLevel: LogLevel.Verbose,\n containsPii: true,\n correlationId: correlationId || \"\"\n });\n }\n\n /**\n * Logs trace messages.\n */\n trace(message: string, correlationId?: string): void {\n this.logMessage(message, {\n logLevel: LogLevel.Trace,\n containsPii: false,\n correlationId: correlationId || \"\"\n });\n }\n\n /**\n * Logs trace messages with PII.\n */\n tracePii(message: string, correlationId?: string): void {\n this.logMessage(message, {\n logLevel: LogLevel.Trace,\n containsPii: true,\n correlationId: correlationId || \"\"\n });\n }\n\n /**\n * Returns whether PII Logging is enabled or not.\n */\n isPiiLoggingEnabled(): boolean {\n return this.piiLoggingEnabled || false;\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Utility class for math specific functions in browser.\n */\nexport class MathUtils {\n\n /**\n * Decimal to Hex\n *\n * @param num\n */\n static decimalToHex(num: number): string {\n let hex: string = num.toString(16);\n while (hex.length < 2) {\n hex = \"0\" + hex;\n }\n return hex;\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { MathUtils } from \"../utils/MathUtils\";\nimport { BrowserCrypto } from \"./BrowserCrypto\";\n\nexport class GuidGenerator {\n\n // browser crypto object used to generate random values\n private cryptoObj: BrowserCrypto;\n\n constructor(cryptoObj: BrowserCrypto) {\n this.cryptoObj = cryptoObj;\n }\n\n /*\n * RFC4122: The version 4 UUID is meant for generating UUIDs from truly-random or\n * pseudo-random numbers.\n * The algorithm is as follows:\n * Set the two most significant bits (bits 6 and 7) of the\n * clock_seq_hi_and_reserved to zero and one, respectively.\n * Set the four most significant bits (bits 12 through 15) of the\n * time_hi_and_version field to the 4-bit version number from\n * Section 4.1.3. Version4\n * Set all the other bits to randomly (or pseudo-randomly) chosen\n * values.\n * UUID = time-low \"-\" time-mid \"-\"time-high-and-version \"-\"clock-seq-reserved and low(2hexOctet)\"-\" node\n * time-low = 4hexOctet\n * time-mid = 2hexOctet\n * time-high-and-version = 2hexOctet\n * clock-seq-and-reserved = hexOctet:\n * clock-seq-low = hexOctet\n * node = 6hexOctet\n * Format: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\n * y could be 1000, 1001, 1010, 1011 since most significant two bits needs to be 10\n * y values are 8, 9, A, B\n */\n generateGuid(): string {\n try {\n const buffer: Uint8Array = new Uint8Array(16);\n this.cryptoObj.getRandomValues(buffer);\n\n // buffer[6] and buffer[7] represents the time_hi_and_version field. We will set the four most significant bits (4 through 7) of buffer[6] to represent decimal number 4 (UUID version number).\n buffer[6] |= 0x40; // buffer[6] | 01000000 will set the 6 bit to 1.\n buffer[6] &= 0x4f; // buffer[6] & 01001111 will set the 4, 5, and 7 bit to 0 such that bits 4-7 == 0100 = \"4\".\n\n // buffer[8] represents the clock_seq_hi_and_reserved field. We will set the two most significant bits (6 and 7) of the clock_seq_hi_and_reserved to zero and one, respectively.\n buffer[8] |= 0x80; // buffer[8] | 10000000 will set the 7 bit to 1.\n buffer[8] &= 0xbf; // buffer[8] & 10111111 will set the 6 bit to 0.\n\n return MathUtils.decimalToHex(buffer[0]) + MathUtils.decimalToHex(buffer[1])\n + MathUtils.decimalToHex(buffer[2]) + MathUtils.decimalToHex(buffer[3])\n + \"-\" + MathUtils.decimalToHex(buffer[4]) + MathUtils.decimalToHex(buffer[5])\n + \"-\" + MathUtils.decimalToHex(buffer[6]) + MathUtils.decimalToHex(buffer[7])\n + \"-\" + MathUtils.decimalToHex(buffer[8]) + MathUtils.decimalToHex(buffer[9])\n + \"-\" + MathUtils.decimalToHex(buffer[10]) + MathUtils.decimalToHex(buffer[11])\n + MathUtils.decimalToHex(buffer[12]) + MathUtils.decimalToHex(buffer[13])\n + MathUtils.decimalToHex(buffer[14]) + MathUtils.decimalToHex(buffer[15]);\n }\n catch (err) {\n const guidHolder: string = \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\";\n const hex: string = \"0123456789abcdef\";\n let r: number = 0;\n let guidResponse: string = \"\";\n for (let i: number = 0; i < 36; i++) {\n if (guidHolder[i] !== \"-\" && guidHolder[i] !== \"4\") {\n // each x and y needs to be random\n r = Math.random() * 16 | 0;\n }\n if (guidHolder[i] === \"x\") {\n guidResponse += hex[r];\n } else if (guidHolder[i] === \"y\") {\n // clock-seq-and-reserved first hex is filtered and remaining hex values are random\n r &= 0x3; // bit and with 0011 to set pos 2 to zero ?0??\n r |= 0x8; // set pos 3 to 1 as 1???\n guidResponse += hex[r];\n } else {\n guidResponse += guidHolder[i];\n }\n }\n return guidResponse;\n }\n }\n\n /**\n * verifies if a string is GUID\n * @param guid\n */\n static isGuid(guid: string): boolean {\n const regexGuid = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;\n return regexGuid.test(guid);\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Utility functions for strings in a browser. See here for implementation details:\n * https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#Solution_2_%E2%80%93_JavaScript's_UTF-16_%3E_UTF-8_%3E_base64\n */\nexport class BrowserStringUtils {\n\n /**\n * Converts string to Uint8Array\n * @param sDOMStr \n */\n static stringToUtf8Arr (sDOMStr: string): Uint8Array {\n let nChr;\n let nArrLen = 0;\n const nStrLen = sDOMStr.length;\n /* mapping... */\n for (let nMapIdx = 0; nMapIdx < nStrLen; nMapIdx++) {\n nChr = sDOMStr.charCodeAt(nMapIdx);\n nArrLen += nChr < 0x80 ? 1 : nChr < 0x800 ? 2 : nChr < 0x10000 ? 3 : nChr < 0x200000 ? 4 : nChr < 0x4000000 ? 5 : 6;\n }\n\n const aBytes = new Uint8Array(nArrLen);\n\n /* transcription... */\n\n for (let nIdx = 0, nChrIdx = 0; nIdx < nArrLen; nChrIdx++) {\n nChr = sDOMStr.charCodeAt(nChrIdx);\n if (nChr < 128) {\n /* one byte */\n aBytes[nIdx++] = nChr;\n } else if (nChr < 0x800) {\n /* two bytes */\n aBytes[nIdx++] = 192 + (nChr >>> 6);\n aBytes[nIdx++] = 128 + (nChr & 63);\n } else if (nChr < 0x10000) {\n /* three bytes */\n aBytes[nIdx++] = 224 + (nChr >>> 12);\n aBytes[nIdx++] = 128 + (nChr >>> 6 & 63);\n aBytes[nIdx++] = 128 + (nChr & 63);\n } else if (nChr < 0x200000) {\n /* four bytes */\n aBytes[nIdx++] = 240 + (nChr >>> 18);\n aBytes[nIdx++] = 128 + (nChr >>> 12 & 63);\n aBytes[nIdx++] = 128 + (nChr >>> 6 & 63);\n aBytes[nIdx++] = 128 + (nChr & 63);\n } else if (nChr < 0x4000000) {\n /* five bytes */\n aBytes[nIdx++] = 248 + (nChr >>> 24);\n aBytes[nIdx++] = 128 + (nChr >>> 18 & 63);\n aBytes[nIdx++] = 128 + (nChr >>> 12 & 63);\n aBytes[nIdx++] = 128 + (nChr >>> 6 & 63);\n aBytes[nIdx++] = 128 + (nChr & 63);\n } else /* if (nChr <= 0x7fffffff) */ {\n /* six bytes */\n aBytes[nIdx++] = 252 + (nChr >>> 30);\n aBytes[nIdx++] = 128 + (nChr >>> 24 & 63);\n aBytes[nIdx++] = 128 + (nChr >>> 18 & 63);\n aBytes[nIdx++] = 128 + (nChr >>> 12 & 63);\n aBytes[nIdx++] = 128 + (nChr >>> 6 & 63);\n aBytes[nIdx++] = 128 + (nChr & 63);\n }\n }\n\n return aBytes; \n }\n\n /**\n * Converst string to ArrayBuffer\n * @param dataString \n */\n static stringToArrayBuffer(dataString: string): ArrayBuffer {\n const data = new ArrayBuffer(dataString.length);\n const dataView = new Uint8Array(data);\n for (let i: number = 0; i < dataString.length; i++) {\n dataView[i] = dataString.charCodeAt(i);\n }\n return data;\n }\n\n /**\n * Converts Uint8Array to a string\n * @param aBytes \n */\n static utf8ArrToString (aBytes: Uint8Array): string {\n let sView = \"\";\n for (let nPart, nLen = aBytes.length, nIdx = 0; nIdx < nLen; nIdx++) {\n nPart = aBytes[nIdx];\n sView += String.fromCharCode(\n nPart > 251 && nPart < 254 && nIdx + 5 < nLen ? /* six bytes */\n /* (nPart - 252 << 30) may be not so safe in ECMAScript! So...: */\n (nPart - 252) * 1073741824 + (aBytes[++nIdx] - 128 << 24) + (aBytes[++nIdx] - 128 << 18) + (aBytes[++nIdx] - 128 << 12) + (aBytes[++nIdx] - 128 << 6) + aBytes[++nIdx] - 128\n : nPart > 247 && nPart < 252 && nIdx + 4 < nLen ? /* five bytes */\n (nPart - 248 << 24) + (aBytes[++nIdx] - 128 << 18) + (aBytes[++nIdx] - 128 << 12) + (aBytes[++nIdx] - 128 << 6) + aBytes[++nIdx] - 128\n : nPart > 239 && nPart < 248 && nIdx + 3 < nLen ? /* four bytes */\n (nPart - 240 << 18) + (aBytes[++nIdx] - 128 << 12) + (aBytes[++nIdx] - 128 << 6) + aBytes[++nIdx] - 128\n : nPart > 223 && nPart < 240 && nIdx + 2 < nLen ? /* three bytes */\n (nPart - 224 << 12) + (aBytes[++nIdx] - 128 << 6) + aBytes[++nIdx] - 128\n : nPart > 191 && nPart < 224 && nIdx + 1 < nLen ? /* two bytes */\n (nPart - 192 << 6) + aBytes[++nIdx] - 128\n : /* nPart < 127 ? */ /* one byte */\n nPart\n );\n }\n return sView;\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { BrowserStringUtils } from \"../utils/BrowserStringUtils\";\n\n/**\n * Class which exposes APIs to encode plaintext to base64 encoded string. See here for implementation details:\n * https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#Solution_2_%E2%80%93_JavaScript's_UTF-16_%3E_UTF-8_%3E_base64\n */\nexport class Base64Encode {\n \n /**\n * Returns URL Safe b64 encoded string from a plaintext string.\n * @param input \n */\n urlEncode(input: string): string {\n return encodeURIComponent(this.encode(input)\n .replace(/=/g, \"\")\n .replace(/\\+/g, \"-\")\n .replace(/\\//g, \"_\"));\n }\n\n /**\n * Returns URL Safe b64 encoded string from an int8Array.\n * @param inputArr \n */\n urlEncodeArr(inputArr: Uint8Array): string {\n return this.base64EncArr(inputArr)\n .replace(/=/g, \"\")\n .replace(/\\+/g, \"-\")\n .replace(/\\//g, \"_\");\n }\n\n /**\n * Returns b64 encoded string from plaintext string.\n * @param input \n */\n encode(input: string): string {\n const inputUtf8Arr = BrowserStringUtils.stringToUtf8Arr(input);\n return this.base64EncArr(inputUtf8Arr);\n }\n\n /**\n * Base64 encode byte array\n * @param aBytes \n */\n private base64EncArr(aBytes: Uint8Array): string { \n const eqLen = (3 - (aBytes.length % 3)) % 3;\n let sB64Enc = \"\";\n \n for (let nMod3, nLen = aBytes.length, nUint24 = 0, nIdx = 0; nIdx < nLen; nIdx++) {\n nMod3 = nIdx % 3;\n /* Uncomment the following line in order to split the output in lines 76-character long: */\n /*\n *if (nIdx > 0 && (nIdx * 4 / 3) % 76 === 0) { sB64Enc += \"\\r\\n\"; }\n */\n nUint24 |= aBytes[nIdx] << (16 >>> nMod3 & 24);\n if (nMod3 === 2 || aBytes.length - nIdx === 1) {\n sB64Enc += String.fromCharCode(\n this.uint6ToB64(nUint24 >>> 18 & 63), \n this.uint6ToB64(nUint24 >>> 12 & 63), \n this.uint6ToB64(nUint24 >>> 6 & 63), \n this.uint6ToB64(nUint24 & 63)\n );\n nUint24 = 0;\n }\n }\n\n return eqLen === 0 ? sB64Enc : sB64Enc.substring(0, sB64Enc.length - eqLen) + (eqLen === 1 ? \"=\" : \"==\");\n }\n\n /**\n * Base64 string to array encoding helper\n * @param nUint6 \n */\n private uint6ToB64 (nUint6: number): number {\n return nUint6 < 26 ?\n nUint6 + 65\n : nUint6 < 52 ?\n nUint6 + 71\n : nUint6 < 62 ?\n nUint6 - 4\n : nUint6 === 62 ?\n 43\n : nUint6 === 63 ?\n 47\n :\n 65;\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { BrowserStringUtils } from \"../utils/BrowserStringUtils\";\n\n/**\n * Class which exposes APIs to decode base64 strings to plaintext. See here for implementation details:\n * https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#Solution_2_%E2%80%93_JavaScript's_UTF-16_%3E_UTF-8_%3E_base64\n */\nexport class Base64Decode {\n\n /**\n * Returns a URL-safe plaintext decoded string from b64 encoded input.\n * @param input \n */\n decode(input: string): string {\n let encodedString = input.replace(/-/g, \"+\").replace(/_/g, \"/\");\n switch (encodedString.length % 4) {\n case 0:\n break;\n case 2:\n encodedString += \"==\";\n break;\n case 3:\n encodedString += \"=\";\n break;\n default:\n throw new Error(\"Invalid base64 string\");\n }\n\n const inputUtf8Arr = this.base64DecToArr(encodedString);\n return BrowserStringUtils.utf8ArrToString(inputUtf8Arr);\n }\n\n /**\n * Decodes base64 into Uint8Array\n * @param base64String \n * @param nBlockSize \n */\n private base64DecToArr(base64String: string, nBlockSize?: number): Uint8Array {\n const sB64Enc = base64String.replace(/[^A-Za-z0-9\\+\\/]/g, \"\");\n const nInLen = sB64Enc.length;\n const nOutLen = nBlockSize ? Math.ceil((nInLen * 3 + 1 >>> 2) / nBlockSize) * nBlockSize : nInLen * 3 + 1 >>> 2;\n const aBytes = new Uint8Array(nOutLen);\n\n for (let nMod3, nMod4, nUint24 = 0, nOutIdx = 0, nInIdx = 0; nInIdx < nInLen; nInIdx++) {\n nMod4 = nInIdx & 3;\n nUint24 |= this.b64ToUint6(sB64Enc.charCodeAt(nInIdx)) << 18 - 6 * nMod4;\n if (nMod4 === 3 || nInLen - nInIdx === 1) {\n for (nMod3 = 0; nMod3 < 3 && nOutIdx < nOutLen; nMod3++, nOutIdx++) {\n aBytes[nOutIdx] = nUint24 >>> (16 >>> nMod3 & 24) & 255;\n }\n nUint24 = 0;\n }\n }\n\n return aBytes;\n }\n\n /**\n * Base64 string to array decoding helper\n * @param charNum \n */\n private b64ToUint6(charNum: number): number {\n return charNum > 64 && charNum < 91 ?\n charNum - 65\n : charNum > 96 && charNum < 123 ? \n charNum - 71\n : charNum > 47 && charNum < 58 ?\n charNum + 4\n : charNum === 43 ?\n 62\n : charNum === 47 ?\n 63\n :\n 0;\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { Constants } from \"../utils/Constants\";\n\n/**\n * AuthErrorMessage class containing string constants used by error codes and messages.\n */\nexport const AuthErrorMessage = {\n unexpectedError: {\n code: \"unexpected_error\",\n desc: \"Unexpected error in authentication.\"\n }\n};\n\n/**\n * General error class thrown by the MSAL.js library.\n */\nexport class AuthError extends Error {\n\n /**\n * Short string denoting error\n */\n errorCode: string;\n\n /**\n * Detailed description of error\n */\n errorMessage: string;\n\n /**\n * Describes the subclass of an error\n */\n subError: string;\n\n /**\n * CorrelationId associated with the error\n */\n correlationId: string;\n\n constructor(errorCode?: string, errorMessage?: string, suberror?: string) {\n const errorString = errorMessage ? `${errorCode}: ${errorMessage}` : errorCode;\n super(errorString);\n Object.setPrototypeOf(this, AuthError.prototype);\n\n this.errorCode = errorCode || Constants.EMPTY_STRING;\n this.errorMessage = errorMessage || \"\";\n this.subError = suberror || \"\";\n this.name = \"AuthError\";\n }\n\n setCorrelationId(correlationId: string): void {\n this.correlationId = correlationId;\n }\n\n /**\n * Creates an error that is thrown when something unexpected happens in the library.\n * @param errDesc\n */\n static createUnexpectedError(errDesc: string): AuthError {\n return new AuthError(AuthErrorMessage.unexpectedError.code, `${AuthErrorMessage.unexpectedError.desc}: ${errDesc}`);\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AuthError } from \"./AuthError\";\n\n/**\n * ClientAuthErrorMessage class containing string constants used by error codes and messages.\n */\nexport const ClientAuthErrorMessage = {\n clientInfoDecodingError: {\n code: \"client_info_decoding_error\",\n desc: \"The client info could not be parsed/decoded correctly. Please review the trace to determine the root cause.\"\n },\n clientInfoEmptyError: {\n code: \"client_info_empty_error\",\n desc: \"The client info was empty. Please review the trace to determine the root cause.\"\n },\n tokenParsingError: {\n code: \"token_parsing_error\",\n desc: \"Token cannot be parsed. Please review stack trace to determine root cause.\"\n },\n nullOrEmptyToken: {\n code: \"null_or_empty_token\",\n desc: \"The token is null or empty. Please review the trace to determine the root cause.\"\n },\n endpointResolutionError: {\n code: \"endpoints_resolution_error\",\n desc: \"Error: could not resolve endpoints. Please check network and try again.\"\n },\n networkError: {\n code: \"network_error\",\n desc: \"Network request failed. Please check network trace to determine root cause.\"\n },\n unableToGetOpenidConfigError: {\n code: \"openid_config_error\",\n desc: \"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.\"\n },\n hashNotDeserialized: {\n code: \"hash_not_deserialized\",\n desc: \"The hash parameters could not be deserialized. Please review the trace to determine the root cause.\"\n },\n blankGuidGenerated: {\n code: \"blank_guid_generated\",\n desc: \"The guid generated was blank. Please review the trace to determine the root cause.\"\n },\n invalidStateError: {\n code: \"invalid_state\",\n desc: \"State was not the expected format. Please check the logs to determine whether the request was sent using ProtocolUtils.setRequestState().\"\n },\n stateMismatchError: {\n code: \"state_mismatch\",\n desc: \"State mismatch error. Please check your network. Continued requests may cause cache overflow.\"\n },\n stateNotFoundError: {\n code: \"state_not_found\",\n desc: \"State not found\"\n },\n nonceMismatchError: {\n code: \"nonce_mismatch\",\n desc: \"Nonce mismatch error. This may be caused by a race condition in concurrent requests.\"\n },\n nonceNotFoundError: {\n code: \"nonce_not_found\",\n desc: \"nonce not found\"\n },\n noTokensFoundError: {\n code: \"no_tokens_found\",\n desc: \"No tokens were found for the given scopes, and no authorization code was passed to acquireToken. You must retrieve an authorization code before making a call to acquireToken().\"\n },\n multipleMatchingTokens: {\n code: \"multiple_matching_tokens\",\n desc: \"The cache contains multiple tokens satisfying the requirements. \" +\n \"Call AcquireToken again providing more requirements such as authority or account.\"\n },\n multipleMatchingAccounts: {\n code: \"multiple_matching_accounts\",\n desc: \"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account\"\n },\n multipleMatchingAppMetadata: {\n code: \"multiple_matching_appMetadata\",\n desc: \"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata\"\n },\n tokenRequestCannotBeMade: {\n code: \"request_cannot_be_made\",\n desc: \"Token request cannot be made without authorization code or refresh token.\"\n },\n appendEmptyScopeError: {\n code: \"cannot_append_empty_scope\",\n desc: \"Cannot append null or empty scope to ScopeSet. Please check the stack trace for more info.\"\n },\n removeEmptyScopeError: {\n code: \"cannot_remove_empty_scope\",\n desc: \"Cannot remove null or empty scope from ScopeSet. Please check the stack trace for more info.\"\n },\n appendScopeSetError: {\n code: \"cannot_append_scopeset\",\n desc: \"Cannot append ScopeSet due to error.\"\n },\n emptyInputScopeSetError: {\n code: \"empty_input_scopeset\",\n desc: \"Empty input ScopeSet cannot be processed.\"\n },\n DeviceCodePollingCancelled: {\n code: \"device_code_polling_cancelled\",\n desc: \"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.\"\n },\n DeviceCodeExpired: {\n code: \"device_code_expired\",\n desc: \"Device code is expired.\"\n },\n DeviceCodeUnknownError: {\n code: \"device_code_unknown_error\",\n desc: \"Device code stopped polling for unknown reasons.\"\n },\n NoAccountInSilentRequest: {\n code: \"no_account_in_silent_request\",\n desc: \"Please pass an account object, silent flow is not supported without account information\"\n },\n invalidCacheRecord: {\n code: \"invalid_cache_record\",\n desc: \"Cache record object was null or undefined.\"\n },\n invalidCacheEnvironment: {\n code: \"invalid_cache_environment\",\n desc: \"Invalid environment when attempting to create cache entry\"\n },\n noAccountFound: {\n code: \"no_account_found\",\n desc: \"No account found in cache for given key.\"\n },\n CachePluginError: {\n code: \"no cache plugin set on CacheManager\",\n desc: \"ICachePlugin needs to be set before using readFromStorage or writeFromStorage\"\n },\n noCryptoObj: {\n code: \"no_crypto_object\",\n desc: \"No crypto object detected. This is required for the following operation: \"\n },\n invalidCacheType: {\n code: \"invalid_cache_type\",\n desc: \"Invalid cache type\"\n },\n unexpectedAccountType: {\n code: \"unexpected_account_type\",\n desc: \"Unexpected account type.\"\n },\n unexpectedCredentialType: {\n code: \"unexpected_credential_type\",\n desc: \"Unexpected credential type.\"\n },\n invalidAssertion: {\n code: \"invalid_assertion\",\n desc: \"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515\"\n },\n invalidClientCredential: {\n code: \"invalid_client_credential\",\n desc: \"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential\"\n },\n tokenRefreshRequired: {\n code: \"token_refresh_required\",\n desc: \"Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired.\"\n },\n userTimeoutReached: {\n code: \"user_timeout_reached\",\n desc: \"User defined timeout for device code polling reached\",\n },\n tokenClaimsRequired: {\n code: \"token_claims_cnf_required_for_signedjwt\",\n desc: \"Cannot generate a POP jwt if the token_claims are not populated\"\n },\n noAuthorizationCodeFromServer: {\n code: \"authorization_code_missing_from_server_response\",\n desc: \"Server response does not contain an authorization code to proceed\"\n },\n noAzureRegionDetected: {\n code: \"no_azure_region_detected\",\n desc: \"No azure region was detected and no fallback was made available\"\n },\n accessTokenEntityNullError: {\n code: \"access_token_entity_null\",\n desc: \"Access token entity is null, please check logs and cache to ensure a valid access token is present.\"\n },\n bindingKeyNotRemovedError: {\n code: \"binding_key_not_removed\",\n desc: \"Could not remove the credential's binding key from storage.\"\n },\n logoutNotSupported: {\n code: \"end_session_endpoint_not_supported\",\n desc: \"Provided authority does not support logout.\"\n }\n};\n\n/**\n * Error thrown when there is an error in the client code running on the browser.\n */\nexport class ClientAuthError extends AuthError {\n\n constructor(errorCode: string, errorMessage?: string) {\n super(errorCode, errorMessage);\n this.name = \"ClientAuthError\";\n\n Object.setPrototypeOf(this, ClientAuthError.prototype);\n }\n\n /**\n * Creates an error thrown when client info object doesn't decode correctly.\n * @param caughtError\n */\n static createClientInfoDecodingError(caughtError: string): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.clientInfoDecodingError.code,\n `${ClientAuthErrorMessage.clientInfoDecodingError.desc} Failed with error: ${caughtError}`);\n }\n\n /**\n * Creates an error thrown if the client info is empty.\n * @param rawClientInfo\n */\n static createClientInfoEmptyError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.clientInfoEmptyError.code,\n `${ClientAuthErrorMessage.clientInfoEmptyError.desc}`);\n }\n\n /**\n * Creates an error thrown when the id token extraction errors out.\n * @param err\n */\n static createTokenParsingError(caughtExtractionError: string): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.tokenParsingError.code,\n `${ClientAuthErrorMessage.tokenParsingError.desc} Failed with error: ${caughtExtractionError}`);\n }\n\n /**\n * Creates an error thrown when the id token string is null or empty.\n * @param invalidRawTokenString\n */\n static createTokenNullOrEmptyError(invalidRawTokenString: string) : ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.nullOrEmptyToken.code,\n `${ClientAuthErrorMessage.nullOrEmptyToken.desc} Raw Token Value: ${invalidRawTokenString}`);\n }\n\n /**\n * Creates an error thrown when the endpoint discovery doesn't complete correctly.\n */\n static createEndpointDiscoveryIncompleteError(errDetail: string): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.endpointResolutionError.code,\n `${ClientAuthErrorMessage.endpointResolutionError.desc} Detail: ${errDetail}`);\n }\n\n /**\n * Creates an error thrown when the fetch client throws\n */\n static createNetworkError(endpoint: string, errDetail: string): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.networkError.code,\n `${ClientAuthErrorMessage.networkError.desc} | Fetch client threw: ${errDetail} | Attempted to reach: ${endpoint.split(\"?\")[0]}`);\n }\n\n /**\n * Creates an error thrown when the openid-configuration endpoint cannot be reached or does not contain the required data\n */\n static createUnableToGetOpenidConfigError(errDetail: string): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.unableToGetOpenidConfigError.code,\n `${ClientAuthErrorMessage.unableToGetOpenidConfigError.desc} Attempted to retrieve endpoints from: ${errDetail}`);\n }\n\n /**\n * Creates an error thrown when the hash cannot be deserialized.\n * @param hashParamObj\n */\n static createHashNotDeserializedError(hashParamObj: string): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.hashNotDeserialized.code,\n `${ClientAuthErrorMessage.hashNotDeserialized.desc} Given Object: ${hashParamObj}`);\n }\n\n /**\n * Creates an error thrown when the state cannot be parsed.\n * @param invalidState\n */\n static createInvalidStateError(invalidState: string, errorString?: string): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.invalidStateError.code,\n `${ClientAuthErrorMessage.invalidStateError.desc} Invalid State: ${invalidState}, Root Err: ${errorString}`);\n }\n\n /**\n * Creates an error thrown when two states do not match.\n */\n static createStateMismatchError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.stateMismatchError.code,\n ClientAuthErrorMessage.stateMismatchError.desc);\n }\n\n /**\n * Creates an error thrown when the state is not present\n * @param missingState\n */\n static createStateNotFoundError(missingState: string): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.stateNotFoundError.code,\n `${ClientAuthErrorMessage.stateNotFoundError.desc}: ${missingState}`);\n }\n\n /**\n * Creates an error thrown when the nonce does not match.\n */\n static createNonceMismatchError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.nonceMismatchError.code,\n ClientAuthErrorMessage.nonceMismatchError.desc);\n }\n\n /**\n * Creates an error thrown when the mnonce is not present\n * @param missingNonce\n */\n static createNonceNotFoundError(missingNonce: string): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.nonceNotFoundError.code,\n `${ClientAuthErrorMessage.nonceNotFoundError.desc}: ${missingNonce}`);\n }\n\n /**\n * Throws error when multiple tokens are in cache.\n */\n static createMultipleMatchingTokensInCacheError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.multipleMatchingTokens.code,\n `${ClientAuthErrorMessage.multipleMatchingTokens.desc}.`);\n }\n\n /**\n * Throws error when multiple accounts are in cache for the given params\n */\n static createMultipleMatchingAccountsInCacheError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.multipleMatchingAccounts.code,\n ClientAuthErrorMessage.multipleMatchingAccounts.desc);\n }\n\n /**\n * Throws error when multiple appMetada are in cache for the given clientId.\n */\n static createMultipleMatchingAppMetadataInCacheError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.multipleMatchingAppMetadata.code,\n ClientAuthErrorMessage.multipleMatchingAppMetadata.desc);\n }\n\n /**\n * Throws error when no auth code or refresh token is given to ServerTokenRequestParameters.\n */\n static createTokenRequestCannotBeMadeError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.tokenRequestCannotBeMade.code, ClientAuthErrorMessage.tokenRequestCannotBeMade.desc);\n }\n\n /**\n * Throws error when attempting to append a null, undefined or empty scope to a set\n * @param givenScope\n */\n static createAppendEmptyScopeToSetError(givenScope: string): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.appendEmptyScopeError.code, `${ClientAuthErrorMessage.appendEmptyScopeError.desc} Given Scope: ${givenScope}`);\n }\n\n /**\n * Throws error when attempting to append a null, undefined or empty scope to a set\n * @param givenScope\n */\n static createRemoveEmptyScopeFromSetError(givenScope: string): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.removeEmptyScopeError.code, `${ClientAuthErrorMessage.removeEmptyScopeError.desc} Given Scope: ${givenScope}`);\n }\n\n /**\n * Throws error when attempting to append null or empty ScopeSet.\n * @param appendError\n */\n static createAppendScopeSetError(appendError: string): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.appendScopeSetError.code, `${ClientAuthErrorMessage.appendScopeSetError.desc} Detail Error: ${appendError}`);\n }\n\n /**\n * Throws error if ScopeSet is null or undefined.\n * @param givenScopeSet\n */\n static createEmptyInputScopeSetError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.emptyInputScopeSetError.code, `${ClientAuthErrorMessage.emptyInputScopeSetError.desc}`);\n }\n\n /**\n * Throws error if user sets CancellationToken.cancel = true during polling of token endpoint during device code flow\n */\n static createDeviceCodeCancelledError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.DeviceCodePollingCancelled.code, `${ClientAuthErrorMessage.DeviceCodePollingCancelled.desc}`);\n }\n\n /**\n * Throws error if device code is expired\n */\n static createDeviceCodeExpiredError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.DeviceCodeExpired.code, `${ClientAuthErrorMessage.DeviceCodeExpired.desc}`);\n }\n\n /**\n * Throws error if device code is expired\n */\n static createDeviceCodeUnknownError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.DeviceCodeUnknownError.code, `${ClientAuthErrorMessage.DeviceCodeUnknownError.desc}`);\n }\n\n /**\n * Throws error when silent requests are made without an account object\n */\n static createNoAccountInSilentRequestError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.NoAccountInSilentRequest.code, `${ClientAuthErrorMessage.NoAccountInSilentRequest.desc}`);\n }\n\n /**\n * Throws error when cache record is null or undefined.\n */\n static createNullOrUndefinedCacheRecord(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.invalidCacheRecord.code, ClientAuthErrorMessage.invalidCacheRecord.desc);\n }\n\n /**\n * Throws error when provided environment is not part of the CloudDiscoveryMetadata object\n */\n static createInvalidCacheEnvironmentError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.invalidCacheEnvironment.code, ClientAuthErrorMessage.invalidCacheEnvironment.desc);\n }\n\n /**\n * Throws error when account is not found in cache.\n */\n static createNoAccountFoundError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.noAccountFound.code, ClientAuthErrorMessage.noAccountFound.desc);\n }\n\n /**\n * Throws error if ICachePlugin not set on CacheManager.\n */\n static createCachePluginError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.CachePluginError.code, `${ClientAuthErrorMessage.CachePluginError.desc}`);\n }\n\n /**\n * Throws error if crypto object not found.\n * @param operationName\n */\n static createNoCryptoObjectError(operationName: string): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.noCryptoObj.code, `${ClientAuthErrorMessage.noCryptoObj.desc}${operationName}`);\n }\n\n /**\n * Throws error if cache type is invalid.\n */\n static createInvalidCacheTypeError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.invalidCacheType.code, `${ClientAuthErrorMessage.invalidCacheType.desc}`);\n }\n\n /**\n * Throws error if unexpected account type.\n */\n static createUnexpectedAccountTypeError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.unexpectedAccountType.code, `${ClientAuthErrorMessage.unexpectedAccountType.desc}`);\n }\n\n /**\n * Throws error if unexpected credential type.\n */\n static createUnexpectedCredentialTypeError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.unexpectedCredentialType.code, `${ClientAuthErrorMessage.unexpectedCredentialType.desc}`);\n }\n\n /**\n * Throws error if client assertion is not valid.\n */\n static createInvalidAssertionError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.invalidAssertion.code, `${ClientAuthErrorMessage.invalidAssertion.desc}`);\n }\n\n /**\n * Throws error if client assertion is not valid.\n */\n static createInvalidCredentialError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.invalidClientCredential.code, `${ClientAuthErrorMessage.invalidClientCredential.desc}`);\n }\n\n /**\n * Throws error if token cannot be retrieved from cache due to refresh being required.\n */\n static createRefreshRequiredError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.tokenRefreshRequired.code, ClientAuthErrorMessage.tokenRefreshRequired.desc);\n }\n\n /**\n * Throws error if the user defined timeout is reached.\n */\n static createUserTimeoutReachedError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.userTimeoutReached.code, ClientAuthErrorMessage.userTimeoutReached.desc);\n }\n\n /*\n * Throws error if token claims are not populated for a signed jwt generation\n */\n static createTokenClaimsRequiredError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.tokenClaimsRequired.code, ClientAuthErrorMessage.tokenClaimsRequired.desc);\n }\n\n /**\n * Throws error when the authorization code is missing from the server response\n */\n static createNoAuthCodeInServerResponseError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.noAuthorizationCodeFromServer.code, ClientAuthErrorMessage.noAuthorizationCodeFromServer.desc);\n }\n\n static createBindingKeyNotRemovedError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.bindingKeyNotRemovedError.code, ClientAuthErrorMessage.bindingKeyNotRemovedError.desc);\n }\n\n /**\n * Thrown when logout is attempted for an authority that doesnt have an end_session_endpoint\n */\n static createLogoutNotSupportedError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.logoutNotSupported.code, ClientAuthErrorMessage.logoutNotSupported.desc);\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { DecodedAuthToken } from \"../account/DecodedAuthToken\";\nimport { ClientAuthError } from \"../error/ClientAuthError\";\n\n/**\n * @hidden\n */\nexport class StringUtils {\n\n /**\n * decode a JWT\n *\n * @param authToken\n */\n static decodeAuthToken(authToken: string): DecodedAuthToken {\n if (StringUtils.isEmpty(authToken)) {\n throw ClientAuthError.createTokenNullOrEmptyError(authToken);\n }\n const tokenPartsRegex = /^([^\\.\\s]*)\\.([^\\.\\s]+)\\.([^\\.\\s]*)$/;\n const matches = tokenPartsRegex.exec(authToken);\n if (!matches || matches.length < 4) {\n throw ClientAuthError.createTokenParsingError(`Given token is malformed: ${JSON.stringify(authToken)}`);\n }\n const crackedToken: DecodedAuthToken = {\n header: matches[1],\n JWSPayload: matches[2],\n JWSSig: matches[3]\n };\n return crackedToken;\n }\n\n /**\n * Check if a string is empty.\n *\n * @param str\n */\n static isEmpty(str?: string): boolean {\n return (typeof str === \"undefined\" || !str || 0 === str.length);\n }\n\n /**\n * Check if stringified object is empty\n * @param strObj \n */\n static isEmptyObj(strObj?: string): boolean {\n if (strObj && !StringUtils.isEmpty(strObj)) {\n try {\n const obj = JSON.parse(strObj);\n return Object.keys(obj).length === 0;\n } catch (e) {}\n }\n return true;\n }\n\n static startsWith(str: string, search: string): boolean {\n return str.indexOf(search) === 0;\n }\n\n static endsWith(str: string, search: string): boolean {\n return (str.length >= search.length) && (str.lastIndexOf(search) === (str.length - search.length));\n }\n\n /**\n * Parses string into an object.\n *\n * @param query\n */\n static queryStringToObject(query: string): T {\n const obj: {} = {};\n const params = query.split(\"&\");\n const decode = (s: string) => decodeURIComponent(s.replace(/\\+/g, \" \"));\n params.forEach((pair) => {\n if (pair.trim()) {\n const [key, value] = pair.split(/=(.+)/g, 2); // Split on the first occurence of the '=' character\n if (key && value) {\n obj[decode(key)] = decode(value);\n }\n }\n });\n return obj as T;\n }\n\n /**\n * Trims entries in an array.\n *\n * @param arr\n */\n static trimArrayEntries(arr: Array): Array {\n return arr.map(entry => entry.trim());\n }\n\n /**\n * Removes empty strings from array\n * @param arr\n */\n static removeEmptyStringsFromArray(arr: Array): Array {\n return arr.filter(entry => {\n return !StringUtils.isEmpty(entry);\n });\n }\n\n /**\n * Attempts to parse a string into JSON\n * @param str\n */\n static jsonParseHelper(str: string): T | null {\n try {\n return JSON.parse(str) as T;\n } catch (e) {\n return null;\n }\n }\n\n /**\n * Tests if a given string matches a given pattern, with support for wildcards and queries.\n * @param pattern Wildcard pattern to string match. Supports \"*\" for wildcards and \"?\" for queries\n * @param input String to match against\n */\n static matchPattern(pattern: string, input: string): boolean {\n /**\n * Wildcard support: https://stackoverflow.com/a/3117248/4888559\n * Queries: replaces \"?\" in string with escaped \"\\?\" for regex test\n */\n const regex: RegExp = new RegExp(pattern.replace(/\\\\/g, \"\\\\\\\\\").replace(/\\*/g, \"[^ ]*\").replace(/\\?/g, \"\\\\\\?\")); // eslint-disable-line security/detect-non-literal-regexp\n\n return regex.test(input);\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AuthError, StringUtils } from \"@azure/msal-common\";\n\n/**\n * BrowserAuthErrorMessage class containing string constants used by error codes and messages.\n */\nexport const BrowserAuthErrorMessage = {\n pkceNotGenerated: {\n code: \"pkce_not_created\",\n desc: \"The PKCE code challenge and verifier could not be generated.\"\n },\n cryptoDoesNotExist: {\n code: \"crypto_nonexistent\",\n desc: \"The crypto object or function is not available.\"\n },\n httpMethodNotImplementedError: {\n code: \"http_method_not_implemented\",\n desc: \"The HTTP method given has not been implemented in this library.\"\n },\n emptyNavigateUriError: {\n code: \"empty_navigate_uri\",\n desc: \"Navigation URI is empty. Please check stack trace for more info.\"\n },\n hashEmptyError: {\n code: \"hash_empty_error\",\n desc: \"Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash.\"\n },\n hashDoesNotContainStateError: {\n code: \"no_state_in_hash\",\n desc: \"Hash does not contain state. Please verify that the request originated from msal.\"\n },\n hashDoesNotContainKnownPropertiesError: {\n code: \"hash_does_not_contain_known_properties\",\n desc: \"Hash does not contain known properites. Please verify that your redirectUri is not changing the hash.\"\n },\n unableToParseStateError: {\n code: \"unable_to_parse_state\",\n desc: \"Unable to parse state. Please verify that the request originated from msal.\"\n },\n stateInteractionTypeMismatchError: {\n code: \"state_interaction_type_mismatch\",\n desc: \"Hash contains state but the interaction type does not match the caller.\"\n },\n interactionInProgress: {\n code: \"interaction_in_progress\",\n desc: \"Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. For more visit: aka.ms/msaljs/browser-errors.\"\n },\n popupWindowError: {\n code: \"popup_window_error\",\n desc: \"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser.\"\n },\n emptyWindowError: {\n code: \"empty_window_error\",\n desc: \"window.open returned null or undefined window object.\"\n },\n userCancelledError: {\n code: \"user_cancelled\",\n desc: \"User cancelled the flow.\"\n },\n monitorPopupTimeoutError: {\n code: \"monitor_window_timeout\",\n desc: \"Token acquisition in popup failed due to timeout. For more visit: aka.ms/msaljs/browser-errors.\"\n },\n monitorIframeTimeoutError: {\n code: \"monitor_window_timeout\",\n desc: \"Token acquisition in iframe failed due to timeout. For more visit: aka.ms/msaljs/browser-errors.\"\n },\n redirectInIframeError: {\n code: \"redirect_in_iframe\",\n desc: \"Code flow is not supported inside an iframe. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs.\"\n },\n blockTokenRequestsInHiddenIframeError: {\n code: \"block_iframe_reload\",\n desc: \"Request was blocked inside an iframe because MSAL detected an authentication response. For more visit: aka.ms/msaljs/browser-errors\"\n },\n blockAcquireTokenInPopupsError: {\n code: \"block_nested_popups\",\n desc: \"Request was blocked inside a popup because MSAL detected it was running in a popup.\"\n },\n iframeClosedPrematurelyError: {\n code: \"iframe_closed_prematurely\",\n desc: \"The iframe being monitored was closed prematurely.\"\n },\n silentLogoutUnsupportedError: {\n code: \"silent_logout_unsupported\",\n desc: \"Silent logout not supported. Please call logoutRedirect or logoutPopup instead.\"\n },\n noAccountError: {\n code: \"no_account_error\",\n desc: \"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request.\"\n },\n silentPromptValueError: {\n code: \"silent_prompt_value_error\",\n desc: \"The value given for the prompt value is not valid for silent requests - must be set to 'none'.\"\n },\n noTokenRequestCacheError: {\n code: \"no_token_request_cache_error\",\n desc: \"No token request found in cache.\"\n },\n unableToParseTokenRequestCacheError: {\n code: \"unable_to_parse_token_request_cache_error\",\n desc: \"The cached token request could not be parsed.\"\n },\n noCachedAuthorityError: {\n code: \"no_cached_authority_error\",\n desc: \"No cached authority found.\"\n },\n authRequestNotSet: {\n code: \"auth_request_not_set_error\",\n desc: \"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler\"\n },\n invalidCacheType: {\n code: \"invalid_cache_type\",\n desc: \"Invalid cache type\"\n },\n notInBrowserEnvironment: {\n code: \"non_browser_environment\",\n desc: \"Login and token requests are not supported in non-browser environments.\"\n },\n databaseNotOpen: {\n code: \"database_not_open\",\n desc: \"Database is not open!\"\n },\n noNetworkConnectivity: {\n code: \"no_network_connectivity\",\n desc: \"No network connectivity. Check your internet connection.\"\n },\n postRequestFailed: {\n code: \"post_request_failed\",\n desc: \"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'\"\n },\n getRequestFailed: {\n code: \"get_request_failed\",\n desc: \"Network request failed. Please check the network trace to determine root cause.\"\n },\n failedToParseNetworkResponse: {\n code: \"failed_to_parse_response\",\n desc: \"Failed to parse network response. Check network trace.\"\n },\n unableToLoadTokenError: {\n code: \"unable_to_load_token\",\n desc: \"Error loading token to cache.\"\n },\n signingKeyNotFoundInStorage: {\n code: \"crypto_key_not_found\",\n desc: \"Cryptographic Key or Keypair not found in browser storage.\"\n },\n authCodeRequired: {\n code: \"auth_code_required\",\n desc: \"An authorization code must be provided (as the `code` property on the request) to this flow.\"\n },\n databaseUnavailable: {\n code: \"database_unavailable\",\n desc: \"IndexedDB, which is required for persistent cryptographic key storage, is unavailable. This may be caused by browser privacy features which block persistent storage in third-party contexts.\"\n }\n};\n\n/**\n * Browser library error class thrown by the MSAL.js library for SPAs\n */\nexport class BrowserAuthError extends AuthError {\n\n constructor(errorCode: string, errorMessage?: string) {\n super(errorCode, errorMessage);\n\n Object.setPrototypeOf(this, BrowserAuthError.prototype);\n this.name = \"BrowserAuthError\";\n }\n\n /**\n * Creates an error thrown when PKCE is not implemented.\n * @param errDetail \n */\n static createPkceNotGeneratedError(errDetail: string): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.pkceNotGenerated.code,\n `${BrowserAuthErrorMessage.pkceNotGenerated.desc} Detail:${errDetail}`);\n }\n\n /**\n * Creates an error thrown when the crypto object is unavailable.\n * @param errDetail \n */\n static createCryptoNotAvailableError(errDetail: string): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.cryptoDoesNotExist.code,\n `${BrowserAuthErrorMessage.cryptoDoesNotExist.desc} Detail:${errDetail}`);\n }\n\n /**\n * Creates an error thrown when an HTTP method hasn't been implemented by the browser class.\n * @param method \n */\n static createHttpMethodNotImplementedError(method: string): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.httpMethodNotImplementedError.code,\n `${BrowserAuthErrorMessage.httpMethodNotImplementedError.desc} Given Method: ${method}`);\n }\n\n /**\n * Creates an error thrown when the navigation URI is empty.\n */\n static createEmptyNavigationUriError(): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.emptyNavigateUriError.code, BrowserAuthErrorMessage.emptyNavigateUriError.desc);\n }\n\n /**\n * Creates an error thrown when the hash string value is unexpectedly empty.\n * @param hashValue \n */\n static createEmptyHashError(hashValue: string): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.hashEmptyError.code, `${BrowserAuthErrorMessage.hashEmptyError.desc} Given Url: ${hashValue}`);\n }\n\n /**\n * Creates an error thrown when the hash string value is unexpectedly empty.\n */\n static createHashDoesNotContainStateError(): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.hashDoesNotContainStateError.code, BrowserAuthErrorMessage.hashDoesNotContainStateError.desc);\n }\n\n /**\n * Creates an error thrown when the hash string value does not contain known properties\n */\n static createHashDoesNotContainKnownPropertiesError(): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.hashDoesNotContainKnownPropertiesError.code, BrowserAuthErrorMessage.hashDoesNotContainKnownPropertiesError.desc);\n }\n\n /**\n * Creates an error thrown when the hash string value is unexpectedly empty.\n */\n static createUnableToParseStateError(): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.unableToParseStateError.code, BrowserAuthErrorMessage.unableToParseStateError.desc);\n }\n\n /**\n * Creates an error thrown when the state value in the hash does not match the interaction type of the API attempting to consume it.\n */\n static createStateInteractionTypeMismatchError(): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.stateInteractionTypeMismatchError.code, BrowserAuthErrorMessage.stateInteractionTypeMismatchError.desc);\n }\n\n /**\n * Creates an error thrown when a browser interaction (redirect or popup) is in progress.\n */\n static createInteractionInProgressError(): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.interactionInProgress.code, BrowserAuthErrorMessage.interactionInProgress.desc);\n }\n\n /**\n * Creates an error thrown when the popup window could not be opened.\n * @param errDetail \n */\n static createPopupWindowError(errDetail?: string): BrowserAuthError {\n let errorMessage = BrowserAuthErrorMessage.popupWindowError.desc;\n errorMessage = !StringUtils.isEmpty(errDetail) ? `${errorMessage} Details: ${errDetail}` : errorMessage;\n return new BrowserAuthError(BrowserAuthErrorMessage.popupWindowError.code, errorMessage);\n }\n\n /**\n * Creates an error thrown when window.open returns an empty window object.\n * @param errDetail \n */\n static createEmptyWindowCreatedError(): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.emptyWindowError.code, BrowserAuthErrorMessage.emptyWindowError.desc);\n }\n\n /**\n * Creates an error thrown when the user closes a popup.\n */\n static createUserCancelledError(): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.userCancelledError.code,\n BrowserAuthErrorMessage.userCancelledError.desc);\n }\n\n /**\n * Creates an error thrown when monitorPopupFromHash times out for a given popup.\n */\n static createMonitorPopupTimeoutError(): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.monitorPopupTimeoutError.code,\n BrowserAuthErrorMessage.monitorPopupTimeoutError.desc);\n }\n\n /**\n * Creates an error thrown when monitorIframeFromHash times out for a given iframe.\n */\n static createMonitorIframeTimeoutError(): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.monitorIframeTimeoutError.code,\n BrowserAuthErrorMessage.monitorIframeTimeoutError.desc);\n }\n\n /**\n * Creates an error thrown when navigateWindow is called inside an iframe.\n * @param windowParentCheck \n */\n static createRedirectInIframeError(windowParentCheck: boolean): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.redirectInIframeError.code, \n `${BrowserAuthErrorMessage.redirectInIframeError.desc} (window.parent !== window) => ${windowParentCheck}`);\n }\n\n /**\n * Creates an error thrown when an auth reload is done inside an iframe.\n */\n static createBlockReloadInHiddenIframeError(): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.blockTokenRequestsInHiddenIframeError.code,\n BrowserAuthErrorMessage.blockTokenRequestsInHiddenIframeError.desc);\n }\n\n /**\n * Creates an error thrown when a popup attempts to call an acquireToken API\n * @returns \n */\n static createBlockAcquireTokenInPopupsError(): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.blockAcquireTokenInPopupsError.code, \n BrowserAuthErrorMessage.blockAcquireTokenInPopupsError.desc);\n }\n\n /**\n * Creates an error thrown when an iframe is found to be closed before the timeout is reached.\n */\n static createIframeClosedPrematurelyError(): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.iframeClosedPrematurelyError.code, BrowserAuthErrorMessage.iframeClosedPrematurelyError.desc);\n }\n\n /**\n * Creates an error thrown when the logout API is called on any of the silent interaction clients\n */\n static createSilentLogoutUnsupportedError(): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.silentLogoutUnsupportedError.code, BrowserAuthErrorMessage.silentLogoutUnsupportedError.desc);\n }\n\n /**\n * Creates an error thrown when the account object is not provided in the acquireTokenSilent API.\n */\n static createNoAccountError(): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.noAccountError.code, BrowserAuthErrorMessage.noAccountError.desc);\n }\n\n /**\n * Creates an error thrown when a given prompt value is invalid for silent requests.\n */\n static createSilentPromptValueError(givenPrompt: string): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.silentPromptValueError.code, `${BrowserAuthErrorMessage.silentPromptValueError.desc} Given value: ${givenPrompt}`);\n }\n\n /**\n * Creates an error thrown when the cached token request could not be retrieved from the cache\n */\n static createUnableToParseTokenRequestCacheError(): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.unableToParseTokenRequestCacheError.code,\n BrowserAuthErrorMessage.unableToParseTokenRequestCacheError.desc);\n }\n\n /**\n * Creates an error thrown when the token request could not be retrieved from the cache\n */\n static createNoTokenRequestCacheError(): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.noTokenRequestCacheError.code,\n BrowserAuthErrorMessage.noTokenRequestCacheError.desc);\n }\n\n /**\n * Creates an error thrown when handleCodeResponse is called before initiateAuthRequest (InteractionHandler)\n */\n static createAuthRequestNotSetError(): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.authRequestNotSet.code,\n BrowserAuthErrorMessage.authRequestNotSet.desc);\n }\n\n /**\n * Creates an error thrown when the authority could not be retrieved from the cache\n */\n static createNoCachedAuthorityError(): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.noCachedAuthorityError.code,\n BrowserAuthErrorMessage.noCachedAuthorityError.desc);\n }\n\n /**\n * Creates an error thrown if cache type is invalid.\n */\n static createInvalidCacheTypeError(): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.invalidCacheType.code, `${BrowserAuthErrorMessage.invalidCacheType.desc}`);\n }\n\n /**\n * Create an error thrown when login and token requests are made from a non-browser environment\n */\n static createNonBrowserEnvironmentError(): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.notInBrowserEnvironment.code, BrowserAuthErrorMessage.notInBrowserEnvironment.desc);\n }\n\n /**\n * Create an error thrown when indexDB database is not open\n */\n static createDatabaseNotOpenError(): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.databaseNotOpen.code, BrowserAuthErrorMessage.databaseNotOpen.desc);\n }\n\n /**\n * Create an error thrown when token fetch fails due to no internet\n */\n static createNoNetworkConnectivityError(): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.noNetworkConnectivity.code, BrowserAuthErrorMessage.noNetworkConnectivity.desc);\n }\n\n /**\n * Create an error thrown when token fetch fails due to reasons other than internet connectivity\n */\n static createPostRequestFailedError(errorDesc: string, endpoint: string): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.postRequestFailed.code, `${BrowserAuthErrorMessage.postRequestFailed.desc} | Network client threw: ${errorDesc} | Attempted to reach: ${endpoint.split(\"?\")[0]}`);\n }\n\n /**\n * Create an error thrown when get request fails due to reasons other than internet connectivity\n */\n static createGetRequestFailedError(errorDesc: string, endpoint: string): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.getRequestFailed.code, `${BrowserAuthErrorMessage.getRequestFailed.desc} | Network client threw: ${errorDesc} | Attempted to reach: ${endpoint.split(\"?\")[0]}`);\n }\n\n /**\n * Create an error thrown when network client fails to parse network response\n */\n static createFailedToParseNetworkResponseError(endpoint: string): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.failedToParseNetworkResponse.code, `${BrowserAuthErrorMessage.failedToParseNetworkResponse.desc} | Attempted to reach: ${endpoint.split(\"?\")[0]}`);\n }\n\n /**\n * Create an error thrown when the necessary information is not available to sideload tokens \n */\n static createUnableToLoadTokenError(errorDetail: string): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.unableToLoadTokenError.code, `${BrowserAuthErrorMessage.unableToLoadTokenError.desc} | ${errorDetail}`);\n }\n \n /**\n * Create an error thrown when the queried cryptographic key is not found in IndexedDB\n */\n static createSigningKeyNotFoundInStorageError(keyId: string): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.signingKeyNotFoundInStorage.code, `${BrowserAuthErrorMessage.signingKeyNotFoundInStorage.desc} | No match found for KeyId: ${keyId}`);\n }\n\n /**\n * Create an error when an authorization code is required but not provided\n */\n static createAuthCodeRequiredError(): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.authCodeRequired.code, BrowserAuthErrorMessage.authCodeRequired.desc);\n }\n\n /**\n * Create an error when IndexedDB is unavailable\n */\n static createDatabaseUnavailableError(): BrowserAuthError {\n return new BrowserAuthError(BrowserAuthErrorMessage.databaseUnavailable.code, BrowserAuthErrorMessage.databaseUnavailable.desc);\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { PkceCodes } from \"@azure/msal-common\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\nimport { Base64Encode } from \"../encode/Base64Encode\";\nimport { BrowserCrypto } from \"./BrowserCrypto\";\n\n// Constant byte array length\nconst RANDOM_BYTE_ARR_LENGTH = 32;\n\n/**\n * Class which exposes APIs to generate PKCE codes and code verifiers.\n */\nexport class PkceGenerator {\n\n private base64Encode: Base64Encode;\n private cryptoObj: BrowserCrypto;\n\n constructor(cryptoObj: BrowserCrypto) {\n this.base64Encode = new Base64Encode();\n this.cryptoObj = cryptoObj;\n }\n\n /**\n * Generates PKCE Codes. See the RFC for more information: https://tools.ietf.org/html/rfc7636\n */\n async generateCodes(): Promise {\n const codeVerifier = this.generateCodeVerifier();\n const codeChallenge = await this.generateCodeChallengeFromVerifier(codeVerifier);\n return {\n verifier: codeVerifier,\n challenge: codeChallenge\n };\n }\n\n /**\n * Generates a random 32 byte buffer and returns the base64\n * encoded string to be used as a PKCE Code Verifier\n */\n private generateCodeVerifier(): string {\n try {\n // Generate random values as utf-8\n const buffer: Uint8Array = new Uint8Array(RANDOM_BYTE_ARR_LENGTH);\n this.cryptoObj.getRandomValues(buffer);\n // encode verifier as base64\n const pkceCodeVerifierB64: string = this.base64Encode.urlEncodeArr(buffer);\n return pkceCodeVerifierB64;\n } catch (e) {\n throw BrowserAuthError.createPkceNotGeneratedError(e);\n }\n }\n\n /**\n * Creates a base64 encoded PKCE Code Challenge string from the\n * hash created from the PKCE Code Verifier supplied\n */\n private async generateCodeChallengeFromVerifier(pkceCodeVerifier: string): Promise {\n try {\n // hashed verifier\n const pkceHashedCodeVerifier = await this.cryptoObj.sha256Digest(pkceCodeVerifier);\n // encode hash as base64\n return this.base64Encode.urlEncodeArr(new Uint8Array(pkceHashedCodeVerifier));\n } catch (e) {\n throw BrowserAuthError.createPkceNotGeneratedError(e);\n }\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { BrowserStringUtils } from \"../utils/BrowserStringUtils\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\nimport { KEY_FORMAT_JWK } from \"../utils/BrowserConstants\";\nimport { Logger } from \"..\";\n/**\n * See here for more info on RsaHashedKeyGenParams: https://developer.mozilla.org/en-US/docs/Web/API/RsaHashedKeyGenParams\n */\n// RSA KeyGen Algorithm\nconst PKCS1_V15_KEYGEN_ALG = \"RSASSA-PKCS1-v1_5\";\n// SHA-256 hashing algorithm\nconst S256_HASH_ALG = \"SHA-256\";\n// MOD length for PoP tokens\nconst MODULUS_LENGTH = 2048;\n// Public Exponent\nconst PUBLIC_EXPONENT: Uint8Array = new Uint8Array([0x01, 0x00, 0x01]);\n\n/**\n * This class implements functions used by the browser library to perform cryptography operations such as\n * hashing and encoding. It also has helper functions to validate the availability of specific APIs.\n */\nexport class BrowserCrypto {\n\n private _keygenAlgorithmOptions: RsaHashedKeyGenParams;\n private logger: Logger;\n\n constructor(logger: Logger) {\n this.logger = logger;\n \n if (!(this.hasCryptoAPI())) {\n throw BrowserAuthError.createCryptoNotAvailableError(\"Browser crypto or msCrypto object not available.\");\n }\n\n this._keygenAlgorithmOptions = {\n name: PKCS1_V15_KEYGEN_ALG,\n hash: S256_HASH_ALG,\n modulusLength: MODULUS_LENGTH,\n publicExponent: PUBLIC_EXPONENT\n };\n }\n\n /**\n * Returns a sha-256 hash of the given dataString as an ArrayBuffer.\n * @param dataString \n */\n async sha256Digest(dataString: string): Promise {\n const data = BrowserStringUtils.stringToUtf8Arr(dataString);\n\n return this.hasIECrypto() ? this.getMSCryptoDigest(S256_HASH_ALG, data) : this.getSubtleCryptoDigest(S256_HASH_ALG, data);\n }\n\n /**\n * Populates buffer with cryptographically random values.\n * @param dataBuffer \n */\n getRandomValues(dataBuffer: Uint8Array): void {\n const cryptoObj = window[\"msCrypto\"] || window.crypto;\n if (!cryptoObj.getRandomValues) {\n throw BrowserAuthError.createCryptoNotAvailableError(\"getRandomValues does not exist.\");\n }\n cryptoObj.getRandomValues(dataBuffer);\n }\n\n /**\n * Generates a keypair based on current keygen algorithm config.\n * @param extractable \n * @param usages \n */\n async generateKeyPair(extractable: boolean, usages: Array): Promise {\n return (\n this.hasIECrypto() ? \n this.msCryptoGenerateKey(extractable, usages) \n : window.crypto.subtle.generateKey(this._keygenAlgorithmOptions, extractable, usages)\n ) as Promise;\n }\n\n /**\n * Export key as Json Web Key (JWK)\n * @param key \n * @param format \n */\n async exportJwk(key: CryptoKey): Promise {\n return this.hasIECrypto() ? this.msCryptoExportJwk(key) : window.crypto.subtle.exportKey(KEY_FORMAT_JWK, key);\n }\n\n /**\n * Imports key as Json Web Key (JWK), can set extractable and usages.\n * @param key \n * @param format \n * @param extractable \n * @param usages \n */\n async importJwk(key: JsonWebKey, extractable: boolean, usages: Array): Promise {\n const keyString = BrowserCrypto.getJwkString(key);\n const keyBuffer = BrowserStringUtils.stringToArrayBuffer(keyString);\n\n return this.hasIECrypto() ? \n this.msCryptoImportKey(keyBuffer, extractable, usages) \n : window.crypto.subtle.importKey(KEY_FORMAT_JWK, key, this._keygenAlgorithmOptions, extractable, usages);\n }\n\n /**\n * Signs given data with given key\n * @param key \n * @param data \n */\n async sign(key: CryptoKey, data: ArrayBuffer): Promise {\n return this.hasIECrypto() ?\n this.msCryptoSign(key, data)\n : window.crypto.subtle.sign(this._keygenAlgorithmOptions, key, data);\n }\n\n /**\n * Check whether IE crypto or other browser cryptography is available.\n */\n private hasCryptoAPI(): boolean {\n return this.hasIECrypto() || this.hasBrowserCrypto();\n }\n\n /**\n * Checks whether IE crypto (AKA msCrypto) is available.\n */\n private hasIECrypto(): boolean {\n return \"msCrypto\" in window;\n }\n\n /**\n * Check whether browser crypto is available.\n */\n private hasBrowserCrypto(): boolean {\n return \"crypto\" in window;\n }\n\n /**\n * Helper function for SHA digest.\n * @param algorithm \n * @param data \n */\n private async getSubtleCryptoDigest(algorithm: string, data: Uint8Array): Promise {\n return window.crypto.subtle.digest(algorithm, data);\n }\n\n /**\n * IE Helper function for SHA digest.\n * @param algorithm \n * @param data \n */\n private async getMSCryptoDigest(algorithm: string, data: Uint8Array): Promise {\n return new Promise((resolve, reject) => {\n const digestOperation = window[\"msCrypto\"].subtle.digest(algorithm, data.buffer);\n digestOperation.addEventListener(\"complete\", (e: { target: { result: ArrayBuffer | PromiseLike; }; }) => {\n resolve(e.target.result);\n });\n digestOperation.addEventListener(\"error\", (error: string) => {\n reject(error);\n });\n });\n }\n\n /**\n * IE Helper function for generating a keypair\n * @param extractable \n * @param usages \n */\n private async msCryptoGenerateKey(extractable: boolean, usages: Array): Promise {\n return new Promise((resolve: Function, reject: Function) => {\n const msGenerateKey = window[\"msCrypto\"].subtle.generateKey(this._keygenAlgorithmOptions, extractable, usages);\n msGenerateKey.addEventListener(\"complete\", (e: { target: { result: CryptoKeyPair | PromiseLike; }; }) => {\n resolve(e.target.result);\n });\n\n msGenerateKey.addEventListener(\"error\", (error: string) => {\n reject(error);\n });\n });\n }\n\n /**\n * IE Helper function for exportKey\n * @param key \n * @param format \n */\n private async msCryptoExportJwk(key: CryptoKey): Promise {\n return new Promise((resolve: Function, reject: Function) => {\n const msExportKey = window[\"msCrypto\"].subtle.exportKey(KEY_FORMAT_JWK, key);\n msExportKey.addEventListener(\"complete\", (e: { target: { result: ArrayBuffer; }; }) => {\n const resultBuffer: ArrayBuffer = e.target.result;\n\n const resultString = BrowserStringUtils.utf8ArrToString(new Uint8Array(resultBuffer))\n .replace(/\\r/g, \"\")\n .replace(/\\n/g, \"\")\n .replace(/\\t/g, \"\")\n .split(\" \").join(\"\")\n .replace(\"\\u0000\", \"\");\n\n try {\n resolve(JSON.parse(resultString));\n } catch (e) {\n reject(e);\n }\n });\n\n msExportKey.addEventListener(\"error\", (error: string) => {\n reject(error);\n });\n });\n }\n\n /**\n * IE Helper function for importKey\n * @param key \n * @param format \n * @param extractable \n * @param usages \n */\n private async msCryptoImportKey(keyBuffer: ArrayBuffer, extractable: boolean, usages: Array): Promise {\n return new Promise((resolve: Function, reject: Function) => {\n const msImportKey = window[\"msCrypto\"].subtle.importKey(KEY_FORMAT_JWK, keyBuffer, this._keygenAlgorithmOptions, extractable, usages);\n msImportKey.addEventListener(\"complete\", (e: { target: { result: CryptoKey | PromiseLike; }; }) => {\n resolve(e.target.result);\n });\n\n msImportKey.addEventListener(\"error\", (error: string) => {\n reject(error);\n });\n });\n }\n\n /**\n * IE Helper function for sign JWT\n * @param key \n * @param data \n */\n private async msCryptoSign(key: CryptoKey, data: ArrayBuffer): Promise {\n return new Promise((resolve: Function, reject: Function) => {\n const msSign = window[\"msCrypto\"].subtle.sign(this._keygenAlgorithmOptions, key, data);\n msSign.addEventListener(\"complete\", (e: { target: { result: ArrayBuffer | PromiseLike; }; }) => {\n resolve(e.target.result);\n });\n\n msSign.addEventListener(\"error\", (error: string) => {\n reject(error);\n });\n });\n }\n\n /**\n * Returns stringified jwk.\n * @param jwk \n */\n static getJwkString(jwk: JsonWebKey): string {\n return JSON.stringify(jwk, Object.keys(jwk).sort());\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\nimport { DB_NAME, DB_TABLE_NAME, DB_VERSION } from \"../utils/BrowserConstants\";\nimport { IAsyncStorage } from \"./IAsyncMemoryStorage\";\n\ninterface IDBOpenDBRequestEvent extends Event {\n target: IDBOpenDBRequest & EventTarget;\n}\n\ninterface IDBOpenOnUpgradeNeededEvent extends IDBVersionChangeEvent {\n target: IDBOpenDBRequest & EventTarget;\n}\n\ninterface IDBRequestEvent extends Event {\n target: IDBRequest & EventTarget;\n}\n\n/**\n * Storage wrapper for IndexedDB storage in browsers: https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API\n */\nexport class DatabaseStorage implements IAsyncStorage {\n private db: IDBDatabase|undefined;\n private dbName: string;\n private tableName: string;\n private version: number;\n private dbOpen: boolean;\n\n constructor() {\n this.dbName = DB_NAME;\n this.version = DB_VERSION;\n this.tableName = DB_TABLE_NAME;\n this.dbOpen = false;\n }\n\n /**\n * Opens IndexedDB instance.\n */\n async open(): Promise {\n return new Promise((resolve, reject) => {\n const openDB = window.indexedDB.open(this.dbName, this.version);\n openDB.addEventListener(\"upgradeneeded\", (e: IDBVersionChangeEvent) => {\n const event = e as IDBOpenOnUpgradeNeededEvent;\n event.target.result.createObjectStore(this.tableName);\n });\n openDB.addEventListener(\"success\", (e: Event) => {\n const event = e as IDBOpenDBRequestEvent;\n this.db = event.target.result;\n this.dbOpen = true;\n resolve();\n });\n openDB.addEventListener(\"error\", () => reject(BrowserAuthError.createDatabaseUnavailableError()));\n });\n }\n\n /**\n * Opens database if it's not already open\n */\n private async validateDbIsOpen(): Promise {\n if (!this.dbOpen) {\n return await this.open();\n }\n }\n\n /**\n * Retrieves item from IndexedDB instance.\n * @param key \n */\n async getItem(key: string): Promise {\n await this.validateDbIsOpen();\n\n return new Promise((resolve, reject) => {\n // TODO: Add timeouts?\n if (!this.db) {\n return reject(BrowserAuthError.createDatabaseNotOpenError());\n }\n const transaction = this.db.transaction([this.tableName], \"readonly\");\n const objectStore = transaction.objectStore(this.tableName);\n const dbGet = objectStore.get(key);\n dbGet.addEventListener(\"success\", (e: Event) => {\n const event = e as IDBRequestEvent;\n resolve(event.target.result);\n });\n dbGet.addEventListener(\"error\", (e) => reject(e));\n });\n }\n\n /**\n * Adds item to IndexedDB under given key\n * @param key \n * @param payload \n */\n async setItem(key: string, payload: T): Promise {\n await this.validateDbIsOpen();\n\n return new Promise((resolve: Function, reject: Function) => {\n // TODO: Add timeouts?\n if (!this.db) {\n return reject(BrowserAuthError.createDatabaseNotOpenError());\n }\n const transaction = this.db.transaction([this.tableName], \"readwrite\");\n\n const objectStore = transaction.objectStore(this.tableName);\n\n const dbPut = objectStore.put(payload, key);\n\n dbPut.addEventListener(\"success\", () => resolve());\n dbPut.addEventListener(\"error\", (e) => reject(e));\n });\n }\n\n /**\n * Removes item from IndexedDB under given key\n * @param key\n */\n async removeItem(key: string): Promise {\n await this.validateDbIsOpen();\n\n return new Promise((resolve: Function, reject: Function) => {\n if (!this.db) {\n return reject(BrowserAuthError.createDatabaseNotOpenError());\n }\n const transaction = this.db.transaction([this.tableName], \"readwrite\");\n const objectStore = transaction.objectStore(this.tableName);\n const dbDelete = objectStore.delete(key);\n dbDelete.addEventListener(\"success\", () => resolve());\n dbDelete.addEventListener(\"error\", (e) => reject(e));\n });\n }\n\n /**\n * Get all the keys from the storage object as an iterable array of strings.\n */\n async getKeys(): Promise {\n await this.validateDbIsOpen();\n\n return new Promise((resolve: Function, reject: Function) => {\n if (!this.db) {\n return reject(BrowserAuthError.createDatabaseNotOpenError());\n }\n\n const transaction = this.db.transaction([this.tableName], \"readonly\");\n const objectStore = transaction.objectStore(this.tableName);\n const dbGetKeys = objectStore.getAllKeys();\n dbGetKeys.addEventListener(\"success\", (e: Event) => {\n const event = e as IDBRequestEvent;\n resolve(event.target.result);\n });\n dbGetKeys.addEventListener(\"error\", (e: Event) => reject(e));\n });\n }\n\n /**\n * \n * Checks whether there is an object under the search key in the object store\n */\n async containsKey(key: string): Promise {\n await this.validateDbIsOpen();\n\n return new Promise((resolve: Function, reject: Function) => {\n if (!this.db) {\n return reject(BrowserAuthError.createDatabaseNotOpenError());\n }\n const transaction = this.db.transaction([this.tableName], \"readonly\");\n const objectStore = transaction.objectStore(this.tableName);\n const dbContainsKey = objectStore.count(key);\n dbContainsKey.addEventListener(\"success\", (e: Event) => {\n const event = e as IDBRequestEvent;\n resolve(event.target.result === 1);\n });\n dbContainsKey.addEventListener(\"error\", (e: Event) => reject(e));\n });\n }\n\n /**\n * Deletes the MSAL database. The database is deleted rather than cleared to make it possible\n * for client applications to downgrade to a previous MSAL version without worrying about forward compatibility issues\n * with IndexedDB database versions.\n */\n async deleteDatabase(): Promise {\n return new Promise((resolve: Function, reject: Function) => {\n const deleteDbRequest = window.indexedDB.deleteDatabase(DB_NAME);\n deleteDbRequest.addEventListener(\"success\", () => resolve(true));\n deleteDbRequest.addEventListener(\"error\", () => reject(false));\n });\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IWindowStorage } from \"./IWindowStorage\";\n\nexport class MemoryStorage implements IWindowStorage {\n\n private cache: Map;\n\n constructor() {\n this.cache = new Map();\n }\n\n getItem(key: string): T | null {\n return this.cache.get(key) || null;\n }\n\n setItem(key: string, value: T): void {\n this.cache.set(key, value);\n }\n\n removeItem(key: string): void {\n this.cache.delete(key);\n }\n\n getKeys(): string[] {\n const cacheKeys: string[] = [];\n this.cache.forEach((value: T, key: string) => {\n cacheKeys.push(key);\n });\n return cacheKeys;\n }\n\n containsKey(key: string): boolean {\n return this.cache.has(key);\n }\n\n clear() :void {\n this.cache.clear();\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { Logger } from \"@azure/msal-common\";\nimport { BrowserAuthError, BrowserAuthErrorMessage } from \"../error/BrowserAuthError\";\nimport { DatabaseStorage } from \"./DatabaseStorage\";\nimport { IAsyncStorage } from \"./IAsyncMemoryStorage\";\nimport { MemoryStorage } from \"./MemoryStorage\";\n\n/**\n * This class allows MSAL to store artifacts asynchronously using the DatabaseStorage IndexedDB wrapper,\n * backed up with the more volatile MemoryStorage object for cases in which IndexedDB may be unavailable.\n */\nexport class AsyncMemoryStorage implements IAsyncStorage {\n private inMemoryCache: MemoryStorage;\n private indexedDBCache: DatabaseStorage;\n private logger: Logger;\n\n constructor(logger: Logger) {\n this.inMemoryCache = new MemoryStorage();\n this.indexedDBCache = new DatabaseStorage();\n this.logger = logger;\n }\n\n private handleDatabaseAccessError(error: unknown): void {\n if (error instanceof BrowserAuthError && error.errorCode === BrowserAuthErrorMessage.databaseUnavailable.code) {\n this.logger.error(\"Could not access persistent storage. This may be caused by browser privacy features which block persistent storage in third-party contexts.\");\n }\n }\n /**\n * Get the item matching the given key. Tries in-memory cache first, then in the asynchronous\n * storage object if item isn't found in-memory.\n * @param key \n */\n async getItem(key: string): Promise {\n const item = this.inMemoryCache.getItem(key);\n if(!item) {\n try {\n this.logger.verbose(\"Queried item not found in in-memory cache, now querying persistent storage.\");\n return await this.indexedDBCache.getItem(key);\n } catch (e) {\n this.handleDatabaseAccessError(e);\n }\n }\n return item;\n }\n\n /**\n * Sets the item in the in-memory cache and then tries to set it in the asynchronous\n * storage object with the given key.\n * @param key \n * @param value \n */\n async setItem(key: string, value: T): Promise {\n this.inMemoryCache.setItem(key, value);\n try {\n await this.indexedDBCache.setItem(key, value);\n } catch (e) {\n this.handleDatabaseAccessError(e);\n }\n }\n\n /**\n * Removes the item matching the key from the in-memory cache, then tries to remove it from the asynchronous storage object.\n * @param key \n */\n async removeItem(key: string): Promise {\n this.inMemoryCache.removeItem(key);\n try {\n await this.indexedDBCache.removeItem(key);\n } catch (e) {\n this.handleDatabaseAccessError(e);\n }\n }\n\n /**\n * Get all the keys from the in-memory cache as an iterable array of strings. If no keys are found, query the keys in the \n * asynchronous storage object.\n */\n async getKeys(): Promise {\n const cacheKeys = this.inMemoryCache.getKeys();\n if (cacheKeys.length === 0) {\n try {\n this.logger.verbose(\"In-memory cache is empty, now querying persistent storage.\");\n return await this.indexedDBCache.getKeys();\n } catch (e) {\n this.handleDatabaseAccessError(e);\n }\n }\n return cacheKeys;\n }\n\n /**\n * Returns true or false if the given key is present in the cache.\n * @param key \n */\n async containsKey(key: string): Promise {\n const containsKey = this.inMemoryCache.containsKey(key);\n if(!containsKey) {\n try {\n this.logger.verbose(\"Key not found in in-memory cache, now querying persistent storage.\");\n return await this.indexedDBCache.containsKey(key);\n } catch (e) {\n this.handleDatabaseAccessError(e);\n }\n }\n return containsKey;\n }\n\n /**\n * Clears in-memory Map and tries to delete the IndexedDB database.\n */\n async clear(): Promise {\n this.inMemoryCache.clear();\n try {\n await this.indexedDBCache.deleteDatabase();\n } catch (e) {\n this.handleDatabaseAccessError(e);\n }\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ICrypto, Logger, PkceCodes, SignedHttpRequest, SignedHttpRequestParameters } from \"@azure/msal-common\";\nimport { GuidGenerator } from \"./GuidGenerator\";\nimport { Base64Encode } from \"../encode/Base64Encode\";\nimport { Base64Decode } from \"../encode/Base64Decode\";\nimport { PkceGenerator } from \"./PkceGenerator\";\nimport { BrowserCrypto } from \"./BrowserCrypto\";\nimport { BrowserStringUtils } from \"../utils/BrowserStringUtils\";\nimport { KEY_FORMAT_JWK } from \"../utils/BrowserConstants\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\nimport { AsyncMemoryStorage } from \"../cache/AsyncMemoryStorage\";\n\nexport type CachedKeyPair = {\n publicKey: CryptoKey,\n privateKey: CryptoKey,\n requestMethod?: string,\n requestUri?: string\n};\n\n/**\n * MSAL CryptoKeyStore DB Version 2\n */\nexport type CryptoKeyStore = {\n asymmetricKeys: AsyncMemoryStorage;\n symmetricKeys: AsyncMemoryStorage;\n};\n\n/**\n * This class implements MSAL's crypto interface, which allows it to perform base64 encoding and decoding, generating cryptographically random GUIDs and \n * implementing Proof Key for Code Exchange specs for the OAuth Authorization Code Flow using PKCE (rfc here: https://tools.ietf.org/html/rfc7636).\n */\nexport class CryptoOps implements ICrypto {\n\n private browserCrypto: BrowserCrypto;\n private guidGenerator: GuidGenerator;\n private b64Encode: Base64Encode;\n private b64Decode: Base64Decode;\n private pkceGenerator: PkceGenerator;\n private logger: Logger;\n\n private static POP_KEY_USAGES: Array = [\"sign\", \"verify\"];\n private static EXTRACTABLE: boolean = true;\n private cache: CryptoKeyStore;\n\n constructor(logger: Logger) {\n this.logger = logger;\n // Browser crypto needs to be validated first before any other classes can be set.\n this.browserCrypto = new BrowserCrypto(this.logger);\n this.b64Encode = new Base64Encode();\n this.b64Decode = new Base64Decode();\n this.guidGenerator = new GuidGenerator(this.browserCrypto);\n this.pkceGenerator = new PkceGenerator(this.browserCrypto);\n this.cache = {\n asymmetricKeys: new AsyncMemoryStorage(this.logger),\n symmetricKeys: new AsyncMemoryStorage(this.logger)\n };\n }\n\n /**\n * Creates a new random GUID - used to populate state and nonce.\n * @returns string (GUID)\n */\n createNewGuid(): string {\n return this.guidGenerator.generateGuid();\n }\n\n /**\n * Encodes input string to base64.\n * @param input \n */\n base64Encode(input: string): string {\n return this.b64Encode.encode(input);\n } \n \n /**\n * Decodes input string from base64.\n * @param input \n */\n base64Decode(input: string): string {\n return this.b64Decode.decode(input);\n }\n\n /**\n * Generates PKCE codes used in Authorization Code Flow.\n */\n async generatePkceCodes(): Promise {\n return this.pkceGenerator.generateCodes();\n }\n\n /**\n * Generates a keypair, stores it and returns a thumbprint\n * @param request\n */\n async getPublicKeyThumbprint(request: SignedHttpRequestParameters): Promise {\n // Generate Keypair\n const keyPair: CryptoKeyPair = await this.browserCrypto.generateKeyPair(CryptoOps.EXTRACTABLE, CryptoOps.POP_KEY_USAGES);\n\n // Generate Thumbprint for Public Key\n const publicKeyJwk: JsonWebKey = await this.browserCrypto.exportJwk(keyPair.publicKey);\n \n const pubKeyThumprintObj: JsonWebKey = {\n e: publicKeyJwk.e,\n kty: publicKeyJwk.kty,\n n: publicKeyJwk.n\n };\n\n const publicJwkString: string = BrowserCrypto.getJwkString(pubKeyThumprintObj);\n const publicJwkHash = await this.hashString(publicJwkString);\n\n // Generate Thumbprint for Private Key\n const privateKeyJwk: JsonWebKey = await this.browserCrypto.exportJwk(keyPair.privateKey);\n // Re-import private key to make it unextractable\n const unextractablePrivateKey: CryptoKey = await this.browserCrypto.importJwk(privateKeyJwk, false, [\"sign\"]);\n\n // Store Keypair data in keystore\n await this.cache.asymmetricKeys.setItem(\n publicJwkHash, \n {\n privateKey: unextractablePrivateKey,\n publicKey: keyPair.publicKey,\n requestMethod: request.resourceRequestMethod,\n requestUri: request.resourceRequestUri\n }\n );\n\n return publicJwkHash;\n }\n\n /**\n * Removes cryptographic keypair from key store matching the keyId passed in\n * @param kid \n */\n async removeTokenBindingKey(kid: string): Promise {\n await this.cache.asymmetricKeys.removeItem(kid);\n const keyFound = await this.cache.asymmetricKeys.containsKey(kid);\n return !keyFound;\n }\n\n /**\n * Removes all cryptographic keys from IndexedDB storage\n */\n async clearKeystore(): Promise {\n const dataStoreNames = Object.keys(this.cache);\n const databaseStorage = this.cache[dataStoreNames[0]];\n return databaseStorage ? await databaseStorage.deleteDatabase() : false;\n }\n\n /**\n * Signs the given object as a jwt payload with private key retrieved by given kid.\n * @param payload \n * @param kid \n */\n async signJwt(payload: SignedHttpRequest, kid: string): Promise {\n const cachedKeyPair = await this.cache.asymmetricKeys.getItem(kid);\n \n if (!cachedKeyPair) {\n throw BrowserAuthError.createSigningKeyNotFoundInStorageError(kid);\n }\n\n // Get public key as JWK\n const publicKeyJwk = await this.browserCrypto.exportJwk(cachedKeyPair.publicKey);\n const publicKeyJwkString = BrowserCrypto.getJwkString(publicKeyJwk);\n\n // Generate header\n const header = {\n alg: publicKeyJwk.alg,\n type: KEY_FORMAT_JWK\n };\n const encodedHeader = this.b64Encode.urlEncode(JSON.stringify(header));\n\n // Generate payload\n payload.cnf = {\n jwk: JSON.parse(publicKeyJwkString)\n };\n const encodedPayload = this.b64Encode.urlEncode(JSON.stringify(payload));\n\n // Form token string\n const tokenString = `${encodedHeader}.${encodedPayload}`;\n\n // Sign token\n const tokenBuffer = BrowserStringUtils.stringToArrayBuffer(tokenString);\n const signatureBuffer = await this.browserCrypto.sign(cachedKeyPair.privateKey, tokenBuffer);\n const encodedSignature = this.b64Encode.urlEncodeArr(new Uint8Array(signatureBuffer));\n\n return `${tokenString}.${encodedSignature}`;\n }\n\n /**\n * Returns the SHA-256 hash of an input string\n * @param plainText\n */\n async hashString(plainText: string): Promise {\n const hashBuffer: ArrayBuffer = await this.browserCrypto.sha256Digest(plainText);\n const hashBytes = new Uint8Array(hashBuffer);\n return this.b64Encode.urlEncodeArr(hashBytes);\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Authority types supported by MSAL.\n */\nexport enum AuthorityType {\n Default,\n Adfs\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AuthError } from \"../error/AuthError\";\nimport { BaseAuthRequest } from \"../request/BaseAuthRequest\";\nimport { SignedHttpRequest } from \"./SignedHttpRequest\";\n\n/**\n * The PkceCodes type describes the structure\n * of objects that contain PKCE code\n * challenge and verifier pairs\n */\nexport type PkceCodes = {\n verifier: string,\n challenge: string\n};\n\nexport type SignedHttpRequestParameters = Pick;\n\n/**\n * Interface for crypto functions used by library\n */\nexport interface ICrypto {\n /**\n * Creates a guid randomly.\n */\n createNewGuid(): string;\n /**\n * base64 Encode string\n * @param input \n */\n base64Encode(input: string): string;\n /**\n * base64 decode string\n * @param input \n */\n base64Decode(input: string): string;\n /**\n * Generate PKCE codes for OAuth. See RFC here: https://tools.ietf.org/html/rfc7636\n */\n generatePkceCodes(): Promise;\n /**\n * Generates an JWK RSA S256 Thumbprint\n * @param request\n */\n getPublicKeyThumbprint(request: SignedHttpRequestParameters): Promise;\n /**\n * Removes cryptographic keypair from key store matching the keyId passed in\n * @param kid \n */\n removeTokenBindingKey(kid: string): Promise;\n /**\n * Removes all cryptographic keys from IndexedDB storage\n */\n clearKeystore(): Promise;\n /** \n * Returns a signed proof-of-possession token with a given acces token that contains a cnf claim with the required kid.\n * @param accessToken \n */\n signJwt(payload: SignedHttpRequest, kid: string): Promise;\n /**\n * Returns the SHA-256 hash of an input string\n * @param plainText\n */\n hashString(plainText: string): Promise;\n}\n\nexport const DEFAULT_CRYPTO_IMPLEMENTATION: ICrypto = {\n createNewGuid: (): string => {\n const notImplErr = \"Crypto interface - createNewGuid() has not been implemented\";\n throw AuthError.createUnexpectedError(notImplErr);\n },\n base64Decode: (): string => {\n const notImplErr = \"Crypto interface - base64Decode() has not been implemented\";\n throw AuthError.createUnexpectedError(notImplErr);\n },\n base64Encode: (): string => {\n const notImplErr = \"Crypto interface - base64Encode() has not been implemented\";\n throw AuthError.createUnexpectedError(notImplErr);\n },\n async generatePkceCodes(): Promise {\n const notImplErr = \"Crypto interface - generatePkceCodes() has not been implemented\";\n throw AuthError.createUnexpectedError(notImplErr);\n },\n async getPublicKeyThumbprint(): Promise {\n const notImplErr = \"Crypto interface - getPublicKeyThumbprint() has not been implemented\";\n throw AuthError.createUnexpectedError(notImplErr);\n },\n async removeTokenBindingKey(): Promise {\n const notImplErr = \"Crypto interface - removeTokenBindingKey() has not been implemented\";\n throw AuthError.createUnexpectedError(notImplErr);\n },\n async clearKeystore(): Promise {\n const notImplErr = \"Crypto interface - clearKeystore() has not been implemented\";\n throw AuthError.createUnexpectedError(notImplErr);\n },\n async signJwt(): Promise {\n const notImplErr = \"Crypto interface - signJwt() has not been implemented\";\n throw AuthError.createUnexpectedError(notImplErr);\n },\n async hashString(): Promise {\n const notImplErr = \"Crypto interface - hashString() has not been implemented\";\n throw AuthError.createUnexpectedError(notImplErr);\n }\n};\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AuthError } from \"./AuthError\";\n\n/**\n * Error thrown when there is an error with the server code, for example, unavailability.\n */\nexport class ServerError extends AuthError {\n\n constructor(errorCode?: string, errorMessage?: string, subError?: string) {\n super(errorCode, errorMessage, subError);\n this.name = \"ServerError\";\n\n Object.setPrototypeOf(this, ServerError.prototype);\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AuthError } from \"./AuthError\";\n\n/**\n * InteractionRequiredServerErrorMessage contains string constants used by error codes and messages returned by the server indicating interaction is required\n */\nexport const InteractionRequiredServerErrorMessage = [\n \"interaction_required\",\n \"consent_required\",\n \"login_required\"\n];\n\nexport const InteractionRequiredAuthSubErrorMessage = [\n \"message_only\",\n \"additional_action\",\n \"basic_action\",\n \"user_password_expired\",\n \"consent_required\"\n];\n\n/**\n * Interaction required errors defined by the SDK\n */\nexport const InteractionRequiredAuthErrorMessage = {\n noTokensFoundError: {\n code: \"no_tokens_found\",\n desc: \"No refresh token found in the cache. Please sign-in.\"\n }\n};\n\n/**\n * Error thrown when user interaction is required.\n */\nexport class InteractionRequiredAuthError extends AuthError {\n\n constructor(errorCode?: string, errorMessage?: string, subError?: string) {\n super(errorCode, errorMessage, subError);\n this.name = \"InteractionRequiredAuthError\";\n\n Object.setPrototypeOf(this, InteractionRequiredAuthError.prototype);\n }\n\n /**\n * Helper function used to determine if an error thrown by the server requires interaction to resolve\n * @param errorCode \n * @param errorString \n * @param subError \n */\n static isInteractionRequiredError(errorCode?: string, errorString?: string, subError?: string) : boolean {\n const isInteractionRequiredErrorCode = !!errorCode && InteractionRequiredServerErrorMessage.indexOf(errorCode) > -1;\n const isInteractionRequiredSubError = !!subError && InteractionRequiredAuthSubErrorMessage.indexOf(subError) > -1;\n const isInteractionRequiredErrorDesc = !!errorString && InteractionRequiredServerErrorMessage.some((irErrorCode) => {\n return errorString.indexOf(irErrorCode) > -1;\n });\n\n return isInteractionRequiredErrorCode || isInteractionRequiredErrorDesc || isInteractionRequiredSubError;\n }\n\n /**\n * Creates an error thrown when the authorization code required for a token request is null or empty.\n */\n static createNoTokensFoundError(): InteractionRequiredAuthError {\n return new InteractionRequiredAuthError(InteractionRequiredAuthErrorMessage.noTokensFoundError.code, InteractionRequiredAuthErrorMessage.noTokensFoundError.desc);\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ClientAuthError } from \"../error/ClientAuthError\";\nimport { StringUtils } from \"../utils/StringUtils\";\nimport { ICrypto } from \"../crypto/ICrypto\";\nimport { Separators, Constants } from \"../utils/Constants\";\n\n/**\n * Client info object which consists of two IDs. Need to add more info here.\n */\nexport type ClientInfo = {\n uid: string,\n utid: string\n};\n\n/**\n * Function to build a client info object from server clientInfo string\n * @param rawClientInfo\n * @param crypto\n */\nexport function buildClientInfo(rawClientInfo: string, crypto: ICrypto): ClientInfo {\n if (StringUtils.isEmpty(rawClientInfo)) {\n throw ClientAuthError.createClientInfoEmptyError();\n }\n\n try {\n const decodedClientInfo: string = crypto.base64Decode(rawClientInfo);\n return JSON.parse(decodedClientInfo) as ClientInfo;\n } catch (e) {\n throw ClientAuthError.createClientInfoDecodingError(e);\n }\n}\n\n/**\n * Function to build a client info object from cached homeAccountId string\n * @param homeAccountId \n */\nexport function buildClientInfoFromHomeAccountId(homeAccountId: string): ClientInfo {\n if (StringUtils.isEmpty(homeAccountId)) {\n throw ClientAuthError.createClientInfoDecodingError(\"Home account ID was empty.\");\n }\n const clientInfoParts: string[] = homeAccountId.split(Separators.CLIENT_INFO_SEPARATOR, 2);\n return {\n uid: clientInfoParts[0],\n utid: clientInfoParts.length < 2 ? Constants.EMPTY_STRING : clientInfoParts[1]\n };\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport type CcsCredential = {\n credential: string,\n type: CcsCredentialType\n};\n\nexport enum CcsCredentialType {\n HOME_ACCOUNT_ID = \"home_account_id\",\n UPN = \"UPN\"\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n Separators,\n CacheAccountType,\n CacheType,\n Constants,\n} from \"../../utils/Constants\";\nimport { Authority } from \"../../authority/Authority\";\nimport { AuthToken } from \"../../account/AuthToken\";\nimport { ICrypto } from \"../../crypto/ICrypto\";\nimport { buildClientInfo } from \"../../account/ClientInfo\";\nimport { StringUtils } from \"../../utils/StringUtils\";\nimport { AccountInfo } from \"../../account/AccountInfo\";\nimport { ClientAuthError } from \"../../error/ClientAuthError\";\nimport { AuthorityType } from \"../../authority/AuthorityType\";\nimport { Logger } from \"../../logger/Logger\";\nimport { TokenClaims } from \"../../account/TokenClaims\";\n\n/**\n * Type that defines required and optional parameters for an Account field (based on universal cache schema implemented by all MSALs).\n *\n * Key : Value Schema\n *\n * Key: --\n *\n * Value Schema:\n * {\n * homeAccountId: home account identifier for the auth scheme,\n * environment: entity that issued the token, represented as a full host\n * realm: Full tenant or organizational identifier that the account belongs to\n * localAccountId: Original tenant-specific accountID, usually used for legacy cases\n * username: primary username that represents the user, usually corresponds to preferred_username in the v2 endpt\n * authorityType: Accounts authority type as a string\n * name: Full name for the account, including given name and family name,\n * clientInfo: Full base64 encoded client info received from ESTS\n * lastModificationTime: last time this entity was modified in the cache\n * lastModificationApp:\n * oboAssertion: access token passed in as part of OBO request\n * idTokenClaims: Object containing claims parsed from ID token\n * }\n */\nexport class AccountEntity {\n homeAccountId: string;\n environment: string;\n realm: string;\n localAccountId: string;\n username: string;\n authorityType: string;\n name?: string;\n clientInfo?: string;\n lastModificationTime?: string;\n lastModificationApp?: string;\n oboAssertion?: string;\n cloudGraphHostName?: string;\n msGraphHost?: string; \n idTokenClaims?: TokenClaims;\n\n /**\n * Generate Account Id key component as per the schema: -\n */\n generateAccountId(): string {\n const accountId: Array = [this.homeAccountId, this.environment];\n return accountId.join(Separators.CACHE_KEY_SEPARATOR).toLowerCase();\n }\n\n /**\n * Generate Account Cache Key as per the schema: --\n */\n generateAccountKey(): string {\n return AccountEntity.generateAccountCacheKey({\n homeAccountId: this.homeAccountId,\n environment: this.environment,\n tenantId: this.realm,\n username: this.username,\n localAccountId: this.localAccountId\n });\n }\n\n /**\n * returns the type of the cache (in this case account)\n */\n generateType(): number {\n switch (this.authorityType) {\n case CacheAccountType.ADFS_ACCOUNT_TYPE:\n return CacheType.ADFS;\n case CacheAccountType.MSAV1_ACCOUNT_TYPE:\n return CacheType.MSA;\n case CacheAccountType.MSSTS_ACCOUNT_TYPE:\n return CacheType.MSSTS;\n case CacheAccountType.GENERIC_ACCOUNT_TYPE:\n return CacheType.GENERIC;\n default: {\n throw ClientAuthError.createUnexpectedAccountTypeError();\n }\n }\n }\n\n /**\n * Returns the AccountInfo interface for this account.\n */\n getAccountInfo(): AccountInfo {\n return {\n homeAccountId: this.homeAccountId,\n environment: this.environment,\n tenantId: this.realm,\n username: this.username,\n localAccountId: this.localAccountId,\n name: this.name,\n idTokenClaims: this.idTokenClaims\n };\n }\n\n /**\n * Generates account key from interface\n * @param accountInterface\n */\n static generateAccountCacheKey(accountInterface: AccountInfo): string {\n const accountKey = [\n accountInterface.homeAccountId,\n accountInterface.environment || \"\",\n accountInterface.tenantId || \"\",\n ];\n\n return accountKey.join(Separators.CACHE_KEY_SEPARATOR).toLowerCase();\n }\n\n /**\n * Build Account cache from IdToken, clientInfo and authority/policy. Associated with AAD.\n * @param clientInfo\n * @param authority\n * @param idToken\n * @param policy\n */\n static createAccount(\n clientInfo: string,\n homeAccountId: string,\n idToken: AuthToken,\n authority?: Authority,\n oboAssertion?: string,\n cloudGraphHostName?: string,\n msGraphHost?: string,\n environment?: string\n ): AccountEntity {\n const account: AccountEntity = new AccountEntity();\n\n account.authorityType = CacheAccountType.MSSTS_ACCOUNT_TYPE;\n account.clientInfo = clientInfo;\n account.homeAccountId = homeAccountId;\n\n const env = environment || (authority && authority.getPreferredCache());\n\n if (!env) {\n throw ClientAuthError.createInvalidCacheEnvironmentError();\n }\n\n account.environment = env;\n // non AAD scenarios can have empty realm\n account.realm = idToken?.claims?.tid || \"\";\n account.oboAssertion = oboAssertion;\n \n if (idToken) {\n account.idTokenClaims = idToken.claims;\n\n // How do you account for MSA CID here?\n account.localAccountId = idToken?.claims?.oid || idToken?.claims?.sub || \"\";\n\n /*\n * In B2C scenarios the emails claim is used instead of preferred_username and it is an array. In most cases it will contain a single email.\n * This field should not be relied upon if a custom policy is configured to return more than 1 email.\n */\n account.username = idToken?.claims?.preferred_username || (idToken?.claims?.emails? idToken.claims.emails[0]: \"\");\n account.name = idToken?.claims?.name;\n }\n\n account.cloudGraphHostName = cloudGraphHostName;\n account.msGraphHost = msGraphHost;\n\n return account;\n }\n\n /**\n * Builds non-AAD/ADFS account.\n * @param authority\n * @param idToken\n */\n static createGenericAccount(\n homeAccountId: string,\n idToken: AuthToken,\n authority?: Authority,\n oboAssertion?: string,\n cloudGraphHostName?: string,\n msGraphHost?: string,\n environment?: string\n ): AccountEntity {\n const account: AccountEntity = new AccountEntity();\n\n account.authorityType = (authority && authority.authorityType === AuthorityType.Adfs) ? CacheAccountType.ADFS_ACCOUNT_TYPE : CacheAccountType.GENERIC_ACCOUNT_TYPE;\n account.homeAccountId = homeAccountId;\n // non AAD scenarios can have empty realm\n account.realm = \"\";\n account.oboAssertion = oboAssertion;\n\n const env = environment || authority && authority.getPreferredCache();\n\n if (!env) {\n throw ClientAuthError.createInvalidCacheEnvironmentError();\n }\n\n if (idToken) {\n // How do you account for MSA CID here?\n account.localAccountId = idToken?.claims?.oid || idToken?.claims?.sub || \"\";\n // upn claim for most ADFS scenarios\n account.username = idToken?.claims?.upn || \"\";\n account.name = idToken?.claims?.name || \"\";\n account.idTokenClaims = idToken?.claims;\n }\n\n account.environment = env;\n\n account.cloudGraphHostName = cloudGraphHostName;\n account.msGraphHost = msGraphHost;\n\n /*\n * add uniqueName to claims\n * account.name = idToken.claims.uniqueName;\n */\n\n return account;\n }\n\n /**\n * Generate HomeAccountId from server response\n * @param serverClientInfo\n * @param authType\n */\n static generateHomeAccountId(serverClientInfo: string, authType: AuthorityType, logger: Logger, cryptoObj: ICrypto, idToken?: AuthToken): string {\n\n const accountId = idToken?.claims?.sub ? idToken.claims.sub : Constants.EMPTY_STRING;\n\n // since ADFS does not have tid and does not set client_info\n if (authType === AuthorityType.Adfs) {\n return accountId;\n }\n\n // for cases where there is clientInfo\n if (serverClientInfo) {\n try {\n const clientInfo = buildClientInfo(serverClientInfo, cryptoObj);\n if (!StringUtils.isEmpty(clientInfo.uid) && !StringUtils.isEmpty(clientInfo.utid)) {\n return `${clientInfo.uid}${Separators.CLIENT_INFO_SEPARATOR}${clientInfo.utid}`;\n }\n } catch (e) {}\n }\n\n // default to \"sub\" claim\n logger.verbose(\"No client info in response\");\n return accountId;\n }\n\n /**\n * Validates an entity: checks for all expected params\n * @param entity\n */\n static isAccountEntity(entity: object): boolean {\n\n if (!entity) {\n return false;\n }\n\n return (\n entity.hasOwnProperty(\"homeAccountId\") &&\n entity.hasOwnProperty(\"environment\") &&\n entity.hasOwnProperty(\"realm\") &&\n entity.hasOwnProperty(\"localAccountId\") &&\n entity.hasOwnProperty(\"username\") &&\n entity.hasOwnProperty(\"authorityType\")\n );\n }\n\n /**\n * Helper function to determine whether 2 accountInfo objects represent the same account\n * @param accountA \n * @param accountB \n * @param compareClaims - If set to true idTokenClaims will also be compared to determine account equality\n */\n static accountInfoIsEqual(accountA: AccountInfo | null, accountB: AccountInfo | null, compareClaims?: boolean): boolean {\n if (!accountA || !accountB) {\n return false;\n }\n\n let claimsMatch = true; // default to true so as to not fail comparison below if compareClaims: false\n if (compareClaims) {\n const accountAClaims = (accountA.idTokenClaims || {}) as TokenClaims;\n const accountBClaims = (accountB.idTokenClaims || {}) as TokenClaims;\n\n // issued at timestamp and nonce are expected to change each time a new id token is acquired\n claimsMatch = (accountAClaims.iat === accountBClaims.iat) &&\n (accountAClaims.nonce === accountBClaims.nonce);\n }\n\n return (accountA.homeAccountId === accountB.homeAccountId) && \n (accountA.localAccountId === accountB.localAccountId) &&\n (accountA.username === accountB.username) &&\n (accountA.tenantId === accountB.tenantId) &&\n (accountA.environment === accountB.environment) &&\n claimsMatch;\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { Separators, CredentialType, CacheType, Constants, AuthenticationScheme } from \"../../utils/Constants\";\nimport { ClientAuthError } from \"../../error/ClientAuthError\";\n\n/**\n * Base type for credentials to be stored in the cache: eg: ACCESS_TOKEN, ID_TOKEN etc\n *\n * Key:Value Schema:\n *\n * Key: -------\n *\n * Value Schema:\n * {\n * homeAccountId: home account identifier for the auth scheme,\n * environment: entity that issued the token, represented as a full host\n * credentialType: Type of credential as a string, can be one of the following: RefreshToken, AccessToken, IdToken, Password, Cookie, Certificate, Other\n * clientId: client ID of the application\n * secret: Actual credential as a string\n * familyId: Family ID identifier, usually only used for refresh tokens\n * realm: Full tenant or organizational identifier that the account belongs to\n * target: Permissions that are included in the token, or for refresh tokens, the resource identifier.\n * oboAssertion: access token passed in as part of OBO request\n * tokenType: Matches the authentication scheme for which the token was issued (i.e. Bearer or pop)\n * requestedClaimsHash: Matches the SHA 256 hash of the claims object included in the token request\n * }\n */\nexport class CredentialEntity {\n homeAccountId: string;\n environment: string;\n credentialType: CredentialType;\n clientId: string;\n secret: string;\n familyId?: string;\n realm?: string;\n target?: string;\n oboAssertion?: string;\n tokenType?: AuthenticationScheme;\n keyId?: string;\n requestedClaimsHash?: string;\n\n /**\n * Generate Account Id key component as per the schema: -\n */\n generateAccountId(): string {\n return CredentialEntity.generateAccountIdForCacheKey(this.homeAccountId, this.environment);\n }\n\n /**\n * Generate Credential Id key component as per the schema: --\n */\n generateCredentialId(): string {\n return CredentialEntity.generateCredentialIdForCacheKey(\n this.credentialType,\n this.clientId,\n this.realm,\n this.familyId\n );\n }\n\n /**\n * Generate target key component as per schema: \n */\n generateTarget(): string {\n return CredentialEntity.generateTargetForCacheKey(this.target);\n }\n\n /**\n * generates credential key\n */\n generateCredentialKey(): string {\n return CredentialEntity.generateCredentialCacheKey(\n this.homeAccountId,\n this.environment,\n this.credentialType,\n this.clientId,\n this.realm,\n this.target,\n this.familyId,\n this.tokenType,\n this.requestedClaimsHash\n );\n }\n\n /**\n * returns the type of the cache (in this case credential)\n */\n generateType(): number {\n switch (this.credentialType) {\n case CredentialType.ID_TOKEN:\n return CacheType.ID_TOKEN;\n case CredentialType.ACCESS_TOKEN:\n case CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME:\n return CacheType.ACCESS_TOKEN;\n case CredentialType.REFRESH_TOKEN:\n return CacheType.REFRESH_TOKEN;\n default: {\n throw ClientAuthError.createUnexpectedCredentialTypeError();\n }\n }\n }\n\n /**\n * helper function to return `CredentialType`\n * @param key\n */\n static getCredentialType(key: string): string {\n // First keyword search will match all \"AccessToken\" and \"AccessToken_With_AuthScheme\" credentials\n if (key.indexOf(CredentialType.ACCESS_TOKEN.toLowerCase()) !== -1) {\n // Perform second search to differentiate between \"AccessToken\" and \"AccessToken_With_AuthScheme\" credential types\n if (key.indexOf(CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()) !== -1) {\n return CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME;\n }\n return CredentialType.ACCESS_TOKEN;\n } else if (key.indexOf(CredentialType.ID_TOKEN.toLowerCase()) !== -1) {\n return CredentialType.ID_TOKEN;\n } else if (key.indexOf(CredentialType.REFRESH_TOKEN.toLowerCase()) !== -1) {\n return CredentialType.REFRESH_TOKEN;\n }\n\n return Constants.NOT_DEFINED;\n }\n\n /**\n * generates credential key\n * -\\-----\n */\n static generateCredentialCacheKey(\n homeAccountId: string,\n environment: string,\n credentialType: CredentialType,\n clientId: string,\n realm?: string,\n target?: string,\n familyId?: string,\n tokenType?: AuthenticationScheme,\n requestedClaimsHash?: string\n ): string {\n const credentialKey = [\n this.generateAccountIdForCacheKey(homeAccountId, environment),\n this.generateCredentialIdForCacheKey(credentialType, clientId, realm, familyId),\n this.generateTargetForCacheKey(target),\n this.generateClaimsHashForCacheKey(requestedClaimsHash),\n this.generateSchemeForCacheKey(tokenType)\n ];\n\n return credentialKey.join(Separators.CACHE_KEY_SEPARATOR).toLowerCase();\n }\n\n /**\n * generates Account Id for keys\n * @param homeAccountId\n * @param environment\n */\n private static generateAccountIdForCacheKey(\n homeAccountId: string,\n environment: string\n ): string {\n const accountId: Array = [homeAccountId, environment];\n return accountId.join(Separators.CACHE_KEY_SEPARATOR).toLowerCase();\n }\n\n /**\n * Generates Credential Id for keys\n * @param credentialType\n * @param realm\n * @param clientId\n * @param familyId\n */\n private static generateCredentialIdForCacheKey(\n credentialType: CredentialType,\n clientId: string,\n realm?: string,\n familyId?: string\n ): string {\n const clientOrFamilyId =\n credentialType === CredentialType.REFRESH_TOKEN\n ? familyId || clientId\n : clientId;\n const credentialId: Array = [\n credentialType,\n clientOrFamilyId,\n realm || \"\",\n ];\n\n return credentialId.join(Separators.CACHE_KEY_SEPARATOR).toLowerCase();\n }\n\n /**\n * Generate target key component as per schema: \n */\n private static generateTargetForCacheKey(scopes?: string): string {\n return (scopes || \"\").toLowerCase();\n }\n\n /**\n * Generate requested claims key component as per schema: \n */\n private static generateClaimsHashForCacheKey(requestedClaimsHash?: string): string {\n return(requestedClaimsHash || \"\").toLowerCase();\n }\n\n /**\n * Generate scheme key componenet as per schema: \n */\n private static generateSchemeForCacheKey(tokenType?: string): string {\n /*\n * PoP Tokens and SSH certs include scheme in cache key\n * Cast to lowercase to handle \"bearer\" from ADFS\n */\n return (tokenType && tokenType.toLowerCase() !== AuthenticationScheme.BEARER.toLowerCase()) ? tokenType.toLowerCase() : \"\";\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ClientAuthError } from \"./ClientAuthError\";\n\n/**\n * ClientConfigurationErrorMessage class containing string constants used by error codes and messages.\n */\nexport const ClientConfigurationErrorMessage = {\n redirectUriNotSet: {\n code: \"redirect_uri_empty\",\n desc: \"A redirect URI is required for all calls, and none has been set.\"\n },\n postLogoutUriNotSet: {\n code: \"post_logout_uri_empty\",\n desc: \"A post logout redirect has not been set.\"\n },\n claimsRequestParsingError: {\n code: \"claims_request_parsing_error\",\n desc: \"Could not parse the given claims request object.\"\n },\n authorityUriInsecure: {\n code: \"authority_uri_insecure\",\n desc: \"Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options\"\n },\n urlParseError: {\n code: \"url_parse_error\",\n desc: \"URL could not be parsed into appropriate segments.\"\n },\n urlEmptyError: {\n code: \"empty_url_error\",\n desc: \"URL was empty or null.\"\n },\n emptyScopesError: {\n code: \"empty_input_scopes_error\",\n desc: \"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.\"\n },\n nonArrayScopesError: {\n code: \"nonarray_input_scopes_error\",\n desc: \"Scopes cannot be passed as non-array.\"\n },\n clientIdSingleScopeError: {\n code: \"clientid_input_scopes_error\",\n desc: \"Client ID can only be provided as a single scope.\"\n },\n invalidPrompt: {\n code: \"invalid_prompt_value\",\n desc: \"Supported prompt values are 'login', 'select_account', 'consent', 'create' and 'none'. Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest\",\n },\n invalidClaimsRequest: {\n code: \"invalid_claims\",\n desc: \"Given claims parameter must be a stringified JSON object.\"\n },\n tokenRequestEmptyError: {\n code: \"token_request_empty\",\n desc: \"Token request was empty and not found in cache.\"\n },\n logoutRequestEmptyError: {\n code: \"logout_request_empty\",\n desc: \"The logout request was null or undefined.\"\n },\n invalidCodeChallengeMethod: {\n code: \"invalid_code_challenge_method\",\n desc: \"code_challenge_method passed is invalid. Valid values are \\\"plain\\\" and \\\"S256\\\".\"\n },\n invalidCodeChallengeParams: {\n code: \"pkce_params_missing\",\n desc: \"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request\"\n },\n invalidCloudDiscoveryMetadata: {\n code: \"invalid_cloud_discovery_metadata\",\n desc: \"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields\"\n },\n invalidAuthorityMetadata: {\n code: \"invalid_authority_metadata\",\n desc: \"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.\"\n },\n untrustedAuthority: {\n code: \"untrusted_authority\",\n desc: \"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.\"\n },\n missingSshJwk: {\n code: \"missing_ssh_jwk\",\n desc: \"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.\"\n },\n missingSshKid: {\n code: \"missing_ssh_kid\",\n desc: \"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.\"\n },\n missingNonceAuthenticationHeader: {\n code: \"missing_nonce_authentication_header\",\n desc: \"Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.\"\n },\n invalidAuthenticationHeader: {\n code: \"invalid_authentication_header\",\n desc: \"Invalid authentication header provided\"\n }\n};\n\n/**\n * Error thrown when there is an error in configuration of the MSAL.js library.\n */\nexport class ClientConfigurationError extends ClientAuthError {\n\n constructor(errorCode: string, errorMessage?: string) {\n super(errorCode, errorMessage);\n this.name = \"ClientConfigurationError\";\n Object.setPrototypeOf(this, ClientConfigurationError.prototype);\n }\n\n /**\n * Creates an error thrown when the redirect uri is empty (not set by caller)\n */\n static createRedirectUriEmptyError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.redirectUriNotSet.code,\n ClientConfigurationErrorMessage.redirectUriNotSet.desc);\n }\n\n /**\n * Creates an error thrown when the post-logout redirect uri is empty (not set by caller)\n */\n static createPostLogoutRedirectUriEmptyError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.postLogoutUriNotSet.code,\n ClientConfigurationErrorMessage.postLogoutUriNotSet.desc);\n }\n\n /**\n * Creates an error thrown when the claims request could not be successfully parsed\n */\n static createClaimsRequestParsingError(claimsRequestParseError: string): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.claimsRequestParsingError.code,\n `${ClientConfigurationErrorMessage.claimsRequestParsingError.desc} Given value: ${claimsRequestParseError}`);\n }\n\n /**\n * Creates an error thrown if authority uri is given an insecure protocol.\n * @param urlString\n */\n static createInsecureAuthorityUriError(urlString: string): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.authorityUriInsecure.code,\n `${ClientConfigurationErrorMessage.authorityUriInsecure.desc} Given URI: ${urlString}`);\n }\n\n /**\n * Creates an error thrown if URL string does not parse into separate segments.\n * @param urlString\n */\n static createUrlParseError(urlParseError: string): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.urlParseError.code,\n `${ClientConfigurationErrorMessage.urlParseError.desc} Given Error: ${urlParseError}`);\n }\n\n /**\n * Creates an error thrown if URL string is empty or null.\n * @param urlString\n */\n static createUrlEmptyError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.urlEmptyError.code,\n ClientConfigurationErrorMessage.urlEmptyError.desc);\n }\n\n /**\n * Error thrown when scopes are empty.\n * @param scopesValue\n */\n static createEmptyScopesArrayError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.emptyScopesError.code,\n `${ClientConfigurationErrorMessage.emptyScopesError.desc}`);\n }\n\n /**\n * Error thrown when client id scope is not provided as single scope.\n * @param inputScopes\n */\n static createClientIdSingleScopeError(inputScopes: Array): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.clientIdSingleScopeError.code,\n `${ClientConfigurationErrorMessage.clientIdSingleScopeError.desc} Given Scopes: ${inputScopes}`);\n }\n\n /**\n * Error thrown when prompt is not an allowed type.\n * @param promptValue\n */\n static createInvalidPromptError(promptValue: string): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.invalidPrompt.code,\n `${ClientConfigurationErrorMessage.invalidPrompt.desc} Given value: ${promptValue}`);\n }\n\n /**\n * Creates error thrown when claims parameter is not a stringified JSON object\n */\n static createInvalidClaimsRequestError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.invalidClaimsRequest.code,\n ClientConfigurationErrorMessage.invalidClaimsRequest.desc);\n }\n\n /**\n * Throws error when token request is empty and nothing cached in storage.\n */\n static createEmptyLogoutRequestError(): ClientConfigurationError {\n return new ClientConfigurationError(\n ClientConfigurationErrorMessage.logoutRequestEmptyError.code,\n ClientConfigurationErrorMessage.logoutRequestEmptyError.desc\n );\n }\n\n /**\n * Throws error when token request is empty and nothing cached in storage.\n */\n static createEmptyTokenRequestError(): ClientConfigurationError {\n return new ClientConfigurationError(\n ClientConfigurationErrorMessage.tokenRequestEmptyError.code,\n ClientConfigurationErrorMessage.tokenRequestEmptyError.desc\n );\n }\n\n /**\n * Throws error when an invalid code_challenge_method is passed by the user\n */\n static createInvalidCodeChallengeMethodError(): ClientConfigurationError {\n return new ClientConfigurationError(\n ClientConfigurationErrorMessage.invalidCodeChallengeMethod.code,\n ClientConfigurationErrorMessage.invalidCodeChallengeMethod.desc\n );\n }\n\n /**\n * Throws error when both params: code_challenge and code_challenge_method are not passed together\n */\n static createInvalidCodeChallengeParamsError(): ClientConfigurationError {\n return new ClientConfigurationError(\n ClientConfigurationErrorMessage.invalidCodeChallengeParams.code,\n ClientConfigurationErrorMessage.invalidCodeChallengeParams.desc\n );\n }\n\n /**\n * Throws an error when the user passes invalid cloudDiscoveryMetadata\n */\n static createInvalidCloudDiscoveryMetadataError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.invalidCloudDiscoveryMetadata.code,\n ClientConfigurationErrorMessage.invalidCloudDiscoveryMetadata.desc);\n }\n\n /**\n * Throws an error when the user passes invalid cloudDiscoveryMetadata\n */\n static createInvalidAuthorityMetadataError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.invalidAuthorityMetadata.code,\n ClientConfigurationErrorMessage.invalidAuthorityMetadata.desc);\n }\n\n /**\n * Throws error when provided authority is not a member of the trusted host list\n */\n static createUntrustedAuthorityError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.untrustedAuthority.code,\n ClientConfigurationErrorMessage.untrustedAuthority.desc);\n }\n /*\n * Throws an error when the authentication scheme is set to SSH but the SSH public key is omitted from the request\n */\n static createMissingSshJwkError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.missingSshJwk.code,\n ClientConfigurationErrorMessage.missingSshJwk.desc);\n }\n\n /**\n * Throws an error when the authentication scheme is set to SSH but the SSH public key ID is omitted from the request\n */\n static createMissingSshKidError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.missingSshKid.code,\n ClientConfigurationErrorMessage.missingSshKid.desc);\n }\n\n /**\n * Throws error when provided headers don't contain a header that a server nonce can be extracted from\n */\n static createMissingNonceAuthenticationHeadersError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.missingNonceAuthenticationHeader.code,\n ClientConfigurationErrorMessage.missingNonceAuthenticationHeader.desc);\n }\n\n /**\n * Throws error when a provided header is invalid in any way\n */\n static createInvalidAuthenticationHeaderError(invalidHeaderName: string, details: string): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.invalidAuthenticationHeader.code,\n `${ClientConfigurationErrorMessage.invalidAuthenticationHeader.desc}. Invalid header: ${invalidHeaderName}. Details: ${details}`);\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ClientConfigurationError } from \"../error/ClientConfigurationError\";\nimport { StringUtils } from \"../utils/StringUtils\";\nimport { ClientAuthError } from \"../error/ClientAuthError\";\nimport { OIDC_SCOPES } from \"../utils/Constants\";\n\n/**\n * The ScopeSet class creates a set of scopes. Scopes are case-insensitive, unique values, so the Set object in JS makes\n * the most sense to implement for this class. All scopes are trimmed and converted to lower case strings in intersection and union functions\n * to ensure uniqueness of strings.\n */\nexport class ScopeSet {\n // Scopes as a Set of strings\n private scopes: Set;\n\n constructor(inputScopes: Array) {\n // Filter empty string and null/undefined array items\n const scopeArr = inputScopes ? StringUtils.trimArrayEntries([...inputScopes]) : [];\n const filteredInput = scopeArr ? StringUtils.removeEmptyStringsFromArray(scopeArr) : [];\n\n // Validate and filter scopes (validate function throws if validation fails)\n this.validateInputScopes(filteredInput);\n\n this.scopes = new Set(); // Iterator in constructor not supported by IE11\n filteredInput.forEach(scope => this.scopes.add(scope));\n }\n\n /**\n * Factory method to create ScopeSet from space-delimited string\n * @param inputScopeString\n * @param appClientId\n * @param scopesRequired\n */\n static fromString(inputScopeString: string): ScopeSet {\n const scopeString = inputScopeString || \"\";\n const inputScopes: Array = scopeString.split(\" \");\n return new ScopeSet(inputScopes);\n }\n\n /**\n * Used to validate the scopes input parameter requested by the developer.\n * @param {Array} inputScopes - Developer requested permissions. Not all scopes are guaranteed to be included in the access token returned.\n * @param {boolean} scopesRequired - Boolean indicating whether the scopes array is required or not\n */\n private validateInputScopes(inputScopes: Array): void {\n // Check if scopes are required but not given or is an empty array\n if (!inputScopes || inputScopes.length < 1) {\n throw ClientConfigurationError.createEmptyScopesArrayError();\n }\n }\n\n /**\n * Check if a given scope is present in this set of scopes.\n * @param scope\n */\n containsScope(scope: string): boolean {\n const lowerCaseScopes = this.printScopesLowerCase().split(\" \");\n const lowerCaseScopesSet = new ScopeSet(lowerCaseScopes);\n // compare lowercase scopes\n return !StringUtils.isEmpty(scope) ? lowerCaseScopesSet.scopes.has(scope.toLowerCase()) : false;\n }\n\n /**\n * Check if a set of scopes is present in this set of scopes.\n * @param scopeSet\n */\n containsScopeSet(scopeSet: ScopeSet): boolean {\n if (!scopeSet || scopeSet.scopes.size <= 0) {\n return false;\n }\n\n return (this.scopes.size >= scopeSet.scopes.size && scopeSet.asArray().every(scope => this.containsScope(scope)));\n }\n\n /**\n * Check if set of scopes contains only the defaults\n */\n containsOnlyOIDCScopes(): boolean {\n let defaultScopeCount = 0;\n OIDC_SCOPES.forEach((defaultScope: string) => {\n if (this.containsScope(defaultScope)) {\n defaultScopeCount += 1;\n }\n });\n\n return this.scopes.size === defaultScopeCount;\n }\n\n /**\n * Appends single scope if passed\n * @param newScope\n */\n appendScope(newScope: string): void {\n if (!StringUtils.isEmpty(newScope)) {\n this.scopes.add(newScope.trim());\n }\n }\n\n /**\n * Appends multiple scopes if passed\n * @param newScopes\n */\n appendScopes(newScopes: Array): void {\n try {\n newScopes.forEach(newScope => this.appendScope(newScope));\n } catch (e) {\n throw ClientAuthError.createAppendScopeSetError(e);\n }\n }\n\n /**\n * Removes element from set of scopes.\n * @param scope\n */\n removeScope(scope: string): void {\n if (StringUtils.isEmpty(scope)) {\n throw ClientAuthError.createRemoveEmptyScopeFromSetError(scope);\n }\n this.scopes.delete(scope.trim());\n }\n\n /**\n * Removes default scopes from set of scopes\n * Primarily used to prevent cache misses if the default scopes are not returned from the server\n */\n removeOIDCScopes(): void {\n OIDC_SCOPES.forEach((defaultScope: string) => {\n this.scopes.delete(defaultScope);\n });\n }\n\n /**\n * Combines an array of scopes with the current set of scopes.\n * @param otherScopes\n */\n unionScopeSets(otherScopes: ScopeSet): Set {\n if (!otherScopes) {\n throw ClientAuthError.createEmptyInputScopeSetError();\n }\n const unionScopes = new Set(); // Iterator in constructor not supported in IE11\n otherScopes.scopes.forEach(scope => unionScopes.add(scope.toLowerCase()));\n this.scopes.forEach(scope => unionScopes.add(scope.toLowerCase()));\n return unionScopes;\n }\n\n /**\n * Check if scopes intersect between this set and another.\n * @param otherScopes\n */\n intersectingScopeSets(otherScopes: ScopeSet): boolean {\n if (!otherScopes) {\n throw ClientAuthError.createEmptyInputScopeSetError();\n }\n \n // Do not allow OIDC scopes to be the only intersecting scopes\n if (!otherScopes.containsOnlyOIDCScopes()) {\n otherScopes.removeOIDCScopes();\n }\n const unionScopes = this.unionScopeSets(otherScopes);\n const sizeOtherScopes = otherScopes.getScopeCount();\n const sizeThisScopes = this.getScopeCount();\n const sizeUnionScopes = unionScopes.size;\n return sizeUnionScopes < (sizeThisScopes + sizeOtherScopes);\n }\n\n /**\n * Returns size of set of scopes.\n */\n getScopeCount(): number {\n return this.scopes.size;\n }\n\n /**\n * Returns the scopes as an array of string values\n */\n asArray(): Array {\n const array: Array = [];\n this.scopes.forEach(val => array.push(val));\n return array;\n }\n\n /**\n * Prints scopes into a space-delimited string\n */\n printScopes(): string {\n if (this.scopes) {\n const scopeArr = this.asArray();\n return scopeArr.join(\" \");\n }\n return \"\";\n }\n\n /**\n * Prints scopes into a space-delimited lower-case string (used for caching)\n */\n printScopesLowerCase(): string {\n return this.printScopes().toLowerCase();\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { TokenClaims } from \"./TokenClaims\";\nimport { DecodedAuthToken } from \"./DecodedAuthToken\";\nimport { ClientAuthError } from \"../error/ClientAuthError\";\nimport { StringUtils } from \"../utils/StringUtils\";\nimport { ICrypto } from \"../crypto/ICrypto\";\n\n/**\n * JWT Token representation class. Parses token string and generates claims object.\n */\nexport class AuthToken {\n\n // Raw Token string\n rawToken: string;\n // Claims inside token\n claims: TokenClaims;\n constructor(rawToken: string, crypto: ICrypto) {\n if (StringUtils.isEmpty(rawToken)) {\n throw ClientAuthError.createTokenNullOrEmptyError(rawToken);\n }\n\n this.rawToken = rawToken;\n this.claims = AuthToken.extractTokenClaims(rawToken, crypto);\n }\n\n /**\n * Extract token by decoding the rawToken\n *\n * @param encodedToken\n */\n static extractTokenClaims(encodedToken: string, crypto: ICrypto): TokenClaims {\n\n const decodedToken: DecodedAuthToken = StringUtils.decodeAuthToken(encodedToken);\n\n // token will be decoded to get the username\n try {\n const base64TokenPayload = decodedToken.JWSPayload;\n\n // base64Decode() should throw an error if there is an issue\n const base64Decoded = crypto.base64Decode(base64TokenPayload);\n return JSON.parse(base64Decoded) as TokenClaims;\n } catch (err) {\n throw ClientAuthError.createTokenParsingError(err);\n }\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AccountCache, AccountFilter, CredentialFilter, CredentialCache, ValidCredentialType, AppMetadataFilter, AppMetadataCache } from \"./utils/CacheTypes\";\nimport { CacheRecord } from \"./entities/CacheRecord\";\nimport { CacheSchemaType, CredentialType, Constants, APP_METADATA, THE_FAMILY_ID, AUTHORITY_METADATA_CONSTANTS, AuthenticationScheme } from \"../utils/Constants\";\nimport { CredentialEntity } from \"./entities/CredentialEntity\";\nimport { ScopeSet } from \"../request/ScopeSet\";\nimport { AccountEntity } from \"./entities/AccountEntity\";\nimport { AccessTokenEntity } from \"./entities/AccessTokenEntity\";\nimport { IdTokenEntity } from \"./entities/IdTokenEntity\";\nimport { RefreshTokenEntity } from \"./entities/RefreshTokenEntity\";\nimport { AuthError } from \"../error/AuthError\";\nimport { ICacheManager } from \"./interface/ICacheManager\";\nimport { ClientAuthError } from \"../error/ClientAuthError\";\nimport { AccountInfo } from \"../account/AccountInfo\";\nimport { AppMetadataEntity } from \"./entities/AppMetadataEntity\";\nimport { ServerTelemetryEntity } from \"./entities/ServerTelemetryEntity\";\nimport { ThrottlingEntity } from \"./entities/ThrottlingEntity\";\nimport { AuthToken } from \"../account/AuthToken\";\nimport { ICrypto } from \"../crypto/ICrypto\";\nimport { AuthorityMetadataEntity } from \"./entities/AuthorityMetadataEntity\";\nimport { BaseAuthRequest } from \"../request/BaseAuthRequest\";\n\n/**\n * Interface class which implement cache storage functions used by MSAL to perform validity checks, and store tokens.\n */\nexport abstract class CacheManager implements ICacheManager {\n protected clientId: string;\n protected cryptoImpl: ICrypto;\n\n constructor(clientId: string, cryptoImpl: ICrypto) {\n this.clientId = clientId;\n this.cryptoImpl = cryptoImpl;\n }\n\n /**\n * fetch the account entity from the platform cache\n * @param accountKey\n */\n abstract getAccount(accountKey: string): AccountEntity | null;\n\n /**\n * set account entity in the platform cache\n * @param account\n */\n abstract setAccount(account: AccountEntity): void;\n\n /**\n * fetch the idToken entity from the platform cache\n * @param idTokenKey\n */\n abstract getIdTokenCredential(idTokenKey: string): IdTokenEntity | null;\n\n /**\n * set idToken entity to the platform cache\n * @param idToken\n */\n abstract setIdTokenCredential(idToken: IdTokenEntity): void;\n\n /**\n * fetch the idToken entity from the platform cache\n * @param accessTokenKey\n */\n abstract getAccessTokenCredential(accessTokenKey: string): AccessTokenEntity | null;\n\n /**\n * set idToken entity to the platform cache\n * @param accessToken\n */\n abstract setAccessTokenCredential(accessToken: AccessTokenEntity): void;\n\n /**\n * fetch the idToken entity from the platform cache\n * @param refreshTokenKey\n */\n abstract getRefreshTokenCredential(refreshTokenKey: string): RefreshTokenEntity | null;\n\n /**\n * set idToken entity to the platform cache\n * @param refreshToken\n */\n abstract setRefreshTokenCredential(refreshToken: RefreshTokenEntity): void;\n\n /**\n * fetch appMetadata entity from the platform cache\n * @param appMetadataKey\n */\n abstract getAppMetadata(appMetadataKey: string): AppMetadataEntity | null;\n\n /**\n * set appMetadata entity to the platform cache\n * @param appMetadata\n */\n abstract setAppMetadata(appMetadata: AppMetadataEntity): void;\n\n /**\n * fetch server telemetry entity from the platform cache\n * @param serverTelemetryKey\n */\n abstract getServerTelemetry(serverTelemetryKey: string): ServerTelemetryEntity | null;\n\n /**\n * set server telemetry entity to the platform cache\n * @param serverTelemetryKey\n * @param serverTelemetry\n */\n abstract setServerTelemetry(serverTelemetryKey: string, serverTelemetry: ServerTelemetryEntity): void;\n\n /**\n * fetch cloud discovery metadata entity from the platform cache\n * @param key\n */\n abstract getAuthorityMetadata(key: string): AuthorityMetadataEntity | null;\n\n /**\n * \n */\n abstract getAuthorityMetadataKeys(): Array;\n\n /**\n * set cloud discovery metadata entity to the platform cache\n * @param key\n * @param value\n */\n abstract setAuthorityMetadata(key: string, value: AuthorityMetadataEntity): void;\n\n /**\n * fetch throttling entity from the platform cache\n * @param throttlingCacheKey\n */\n abstract getThrottlingCache(throttlingCacheKey: string): ThrottlingEntity | null;\n\n /**\n * set throttling entity to the platform cache\n * @param throttlingCacheKey\n * @param throttlingCache\n */\n abstract setThrottlingCache(throttlingCacheKey: string, throttlingCache: ThrottlingEntity): void;;\n\n /**\n * Function to remove an item from cache given its key.\n * @param key\n */\n abstract removeItem(key: string, type?: string): boolean;\n\n /**\n * Function which returns boolean whether cache contains a specific key.\n * @param key\n */\n abstract containsKey(key: string, type?: string): boolean;\n\n /**\n * Function which retrieves all current keys from the cache.\n */\n abstract getKeys(): string[];\n\n /**\n * Function which clears cache.\n */\n abstract clear(): Promise;\n\n /**\n * Function which updates an outdated credential cache key\n */\n abstract updateCredentialCacheKey(currentCacheKey: string, credential: ValidCredentialType): string;\n\n /**\n * Returns all accounts in cache\n */\n getAllAccounts(): AccountInfo[] {\n const currentAccounts: AccountCache = this.getAccountsFilteredBy();\n const accountValues: AccountEntity[] = Object.keys(currentAccounts).map(accountKey => currentAccounts[accountKey]);\n const numAccounts = accountValues.length;\n if (numAccounts < 1) {\n return [];\n } else {\n const allAccounts = accountValues.map((value) => {\n const accountEntity = CacheManager.toObject(new AccountEntity(), value);\n const accountInfo = accountEntity.getAccountInfo();\n const idToken = this.readIdTokenFromCache(this.clientId, accountInfo);\n if (idToken && !accountInfo.idTokenClaims) {\n accountInfo.idTokenClaims = new AuthToken(idToken.secret, this.cryptoImpl).claims;\n }\n\n return accountInfo;\n \n });\n return allAccounts;\n }\n }\n\n /**\n * saves a cache record\n * @param cacheRecord\n */\n async saveCacheRecord(cacheRecord: CacheRecord): Promise {\n if (!cacheRecord) {\n throw ClientAuthError.createNullOrUndefinedCacheRecord();\n }\n\n if (!!cacheRecord.account) {\n this.setAccount(cacheRecord.account);\n }\n\n if (!!cacheRecord.idToken) {\n this.setIdTokenCredential(cacheRecord.idToken);\n }\n\n if (!!cacheRecord.accessToken) {\n await this.saveAccessToken(cacheRecord.accessToken);\n }\n\n if (!!cacheRecord.refreshToken) {\n this.setRefreshTokenCredential(cacheRecord.refreshToken);\n }\n\n if (!!cacheRecord.appMetadata) {\n this.setAppMetadata(cacheRecord.appMetadata);\n }\n }\n\n /**\n * saves access token credential\n * @param credential\n */\n private async saveAccessToken(credential: AccessTokenEntity): Promise {\n const currentTokenCache = this.getCredentialsFilteredBy({\n clientId: credential.clientId,\n credentialType: credential.credentialType,\n environment: credential.environment,\n homeAccountId: credential.homeAccountId,\n realm: credential.realm,\n tokenType: credential.tokenType,\n requestedClaimsHash: credential.requestedClaimsHash\n });\n\n const currentScopes = ScopeSet.fromString(credential.target);\n const currentAccessTokens: AccessTokenEntity[] = Object.keys(currentTokenCache.accessTokens).map(key => currentTokenCache.accessTokens[key]);\n\n if (currentAccessTokens) {\n const removedAccessTokens: Array> = [];\n currentAccessTokens.forEach((tokenEntity) => {\n const tokenScopeSet = ScopeSet.fromString(tokenEntity.target);\n if (tokenScopeSet.intersectingScopeSets(currentScopes)) {\n removedAccessTokens.push(this.removeCredential(tokenEntity));\n }\n });\n await Promise.all(removedAccessTokens);\n }\n this.setAccessTokenCredential(credential);\n }\n\n /**\n * retrieve accounts matching all provided filters; if no filter is set, get all accounts\n * not checking for casing as keys are all generated in lower case, remember to convert to lower case if object properties are compared\n * @param homeAccountId\n * @param environment\n * @param realm\n */\n getAccountsFilteredBy(accountFilter?: AccountFilter): AccountCache {\n return this.getAccountsFilteredByInternal(\n accountFilter ? accountFilter.homeAccountId : \"\",\n accountFilter ? accountFilter.environment : \"\",\n accountFilter ? accountFilter.realm : \"\"\n );\n }\n\n /**\n * retrieve accounts matching all provided filters; if no filter is set, get all accounts\n * not checking for casing as keys are all generated in lower case, remember to convert to lower case if object properties are compared\n * @param homeAccountId\n * @param environment\n * @param realm\n */\n private getAccountsFilteredByInternal(\n homeAccountId?: string,\n environment?: string,\n realm?: string\n ): AccountCache {\n const allCacheKeys = this.getKeys();\n const matchingAccounts: AccountCache = {};\n\n allCacheKeys.forEach((cacheKey) => {\n const entity: AccountEntity | null = this.getAccount(cacheKey);\n\n if (!entity) {\n return;\n }\n\n if (!!homeAccountId && !this.matchHomeAccountId(entity, homeAccountId)) {\n return;\n }\n\n if (!!environment && !this.matchEnvironment(entity, environment)) {\n return;\n }\n\n if (!!realm && !this.matchRealm(entity, realm)) {\n return;\n }\n\n matchingAccounts[cacheKey] = entity;\n });\n\n return matchingAccounts;\n }\n\n /**\n * retrieve credentails matching all provided filters; if no filter is set, get all credentials\n * @param homeAccountId\n * @param environment\n * @param credentialType\n * @param clientId\n * @param realm\n * @param target\n */\n getCredentialsFilteredBy(filter: CredentialFilter): CredentialCache {\n return this.getCredentialsFilteredByInternal(\n filter.homeAccountId,\n filter.environment,\n filter.credentialType,\n filter.clientId,\n filter.familyId,\n filter.realm,\n filter.target,\n filter.oboAssertion,\n filter.tokenType,\n filter.keyId,\n filter.requestedClaimsHash\n );\n }\n\n /**\n * Support function to help match credentials\n * @param homeAccountId\n * @param environment\n * @param credentialType\n * @param clientId\n * @param realm\n * @param target\n * @param oboAssertion\n * @param tokenType\n */\n private getCredentialsFilteredByInternal(\n homeAccountId?: string,\n environment?: string,\n credentialType?: string,\n clientId?: string,\n familyId?: string,\n realm?: string,\n target?: string,\n oboAssertion?: string,\n tokenType?: AuthenticationScheme,\n keyId?: string,\n requestedClaimsHash?: string\n ): CredentialCache {\n const allCacheKeys = this.getKeys();\n const matchingCredentials: CredentialCache = {\n idTokens: {},\n accessTokens: {},\n refreshTokens: {},\n };\n \n allCacheKeys.forEach((cacheKey) => {\n // don't parse any non-credential type cache entities\n const credType = CredentialEntity.getCredentialType(cacheKey);\n\n if (credType === Constants.NOT_DEFINED) {\n return;\n }\n\n // Attempt retrieval\n const entity = this.getSpecificCredential(cacheKey, credType);\n\n if (!entity) {\n return;\n }\n\n if (!!oboAssertion && !this.matchOboAssertion(entity, oboAssertion)) {\n return;\n }\n\n if (!!homeAccountId && !this.matchHomeAccountId(entity, homeAccountId)) {\n return;\n }\n\n if (!!environment && !this.matchEnvironment(entity, environment)) {\n return;\n }\n\n if (!!realm && !this.matchRealm(entity, realm)) {\n return;\n }\n\n if (!!credentialType && !this.matchCredentialType(entity, credentialType)) {\n return;\n }\n\n if (!!clientId && !this.matchClientId(entity, clientId)) {\n return;\n }\n\n if (!!familyId && !this.matchFamilyId(entity, familyId)) {\n return;\n }\n\n /*\n * idTokens do not have \"target\", target specific refreshTokens do exist for some types of authentication\n * Resource specific refresh tokens case will be added when the support is deemed necessary\n */\n if (!!target && !this.matchTarget(entity, target)) {\n return;\n }\n \n // If request OR cached entity has requested Claims Hash, check if they match\n if (requestedClaimsHash || entity.requestedClaimsHash) {\n // Don't match if either is undefined or they are different\n if (entity.requestedClaimsHash !== requestedClaimsHash) {\n return;\n }\n }\n\n // Access Token with Auth Scheme specific matching\n if (credentialType === CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME) {\n if(!!tokenType && !this.matchTokenType(entity, tokenType)) {\n return;\n }\n\n // KeyId (sshKid) in request must match cached SSH certificate keyId because SSH cert is bound to a specific key\n if (tokenType === AuthenticationScheme.SSH) {\n if(keyId && !this.matchKeyId(entity, keyId)) {\n return;\n }\n }\n }\n\n // At this point, the entity matches the request, update cache key if key schema has changed\n const updatedCacheKey = this.updateCredentialCacheKey(cacheKey, entity);\n\n switch (credType) {\n case CredentialType.ID_TOKEN:\n matchingCredentials.idTokens[updatedCacheKey] = entity as IdTokenEntity;\n break;\n case CredentialType.ACCESS_TOKEN:\n case CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME:\n matchingCredentials.accessTokens[updatedCacheKey] = entity as AccessTokenEntity;\n break;\n case CredentialType.REFRESH_TOKEN:\n matchingCredentials.refreshTokens[updatedCacheKey] = entity as RefreshTokenEntity;\n break;\n }\n });\n\n return matchingCredentials;\n }\n\n /**\n * retrieve appMetadata matching all provided filters; if no filter is set, get all appMetadata\n * @param filter\n */\n getAppMetadataFilteredBy(filter: AppMetadataFilter): AppMetadataCache {\n return this.getAppMetadataFilteredByInternal(\n filter.environment,\n filter.clientId,\n );\n }\n\n /**\n * Support function to help match appMetadata\n * @param environment\n * @param clientId\n */\n private getAppMetadataFilteredByInternal(\n environment?: string,\n clientId?: string\n ): AppMetadataCache {\n\n const allCacheKeys = this.getKeys();\n const matchingAppMetadata: AppMetadataCache = {};\n\n allCacheKeys.forEach((cacheKey) => {\n // don't parse any non-appMetadata type cache entities\n if (!this.isAppMetadata(cacheKey)) {\n return;\n }\n\n // Attempt retrieval\n const entity = this.getAppMetadata(cacheKey);\n\n if (!entity) {\n return;\n }\n\n if (!!environment && !this.matchEnvironment(entity, environment)) {\n return;\n }\n\n if (!!clientId && !this.matchClientId(entity, clientId)) {\n return;\n }\n\n matchingAppMetadata[cacheKey] = entity;\n\n });\n\n return matchingAppMetadata;\n }\n\n /**\n * retrieve authorityMetadata that contains a matching alias\n * @param filter\n */\n getAuthorityMetadataByAlias(host: string): AuthorityMetadataEntity | null {\n const allCacheKeys = this.getAuthorityMetadataKeys();\n let matchedEntity = null;\n\n allCacheKeys.forEach((cacheKey) => {\n // don't parse any non-authorityMetadata type cache entities\n if (!this.isAuthorityMetadata(cacheKey) || cacheKey.indexOf(this.clientId) === -1) {\n return;\n }\n\n // Attempt retrieval\n const entity = this.getAuthorityMetadata(cacheKey);\n\n if (!entity) {\n return;\n }\n\n if (entity.aliases.indexOf(host) === -1) {\n return;\n }\n\n matchedEntity = entity;\n\n });\n \n return matchedEntity;\n }\n\n /**\n * Removes all accounts and related tokens from cache.\n */\n async removeAllAccounts(): Promise {\n const allCacheKeys = this.getKeys();\n const removedAccounts: Array> = [];\n\n allCacheKeys.forEach((cacheKey) => {\n const entity = this.getAccount(cacheKey);\n if (!entity) {\n return;\n }\n removedAccounts.push(this.removeAccount(cacheKey));\n });\n \n await Promise.all(removedAccounts);\n return true;\n }\n\n /**\n * returns a boolean if the given account is removed\n * @param account\n */\n async removeAccount(accountKey: string): Promise {\n const account = this.getAccount(accountKey);\n if (!account) {\n throw ClientAuthError.createNoAccountFoundError();\n }\n return (await this.removeAccountContext(account) && this.removeItem(accountKey, CacheSchemaType.ACCOUNT));\n }\n\n /**\n * returns a boolean if the given account is removed\n * @param account\n */\n async removeAccountContext(account: AccountEntity): Promise {\n const allCacheKeys = this.getKeys();\n const accountId = account.generateAccountId();\n const removedCredentials: Array> = [];\n\n allCacheKeys.forEach((cacheKey) => {\n // don't parse any non-credential type cache entities\n const credType = CredentialEntity.getCredentialType(cacheKey);\n if (credType === Constants.NOT_DEFINED) {\n return;\n }\n\n const cacheEntity = this.getSpecificCredential(cacheKey, credType);\n if (!!cacheEntity && accountId === cacheEntity.generateAccountId()) {\n removedCredentials.push(this.removeCredential(cacheEntity));\n }\n });\n\n await Promise.all(removedCredentials);\n return true;\n }\n\n /**\n * returns a boolean if the given credential is removed\n * @param credential\n */\n async removeCredential(credential: CredentialEntity): Promise {\n const key = credential.generateCredentialKey();\n\n // Remove Token Binding Key from key store for PoP Tokens Credentials\n if (credential.credentialType.toLowerCase() === CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()) {\n if(credential.tokenType === AuthenticationScheme.POP) {\n const accessTokenWithAuthSchemeEntity = credential as AccessTokenEntity;\n const kid = accessTokenWithAuthSchemeEntity.keyId;\n \n if (kid) {\n try {\n await this.cryptoImpl.removeTokenBindingKey(kid);\n } catch (error) {\n throw ClientAuthError.createBindingKeyNotRemovedError();\n }\n }\n }\n }\n\n return this.removeItem(key, CacheSchemaType.CREDENTIAL);\n }\n\n /**\n * Removes all app metadata objects from cache.\n */\n removeAppMetadata(): boolean {\n const allCacheKeys = this.getKeys();\n allCacheKeys.forEach((cacheKey) => {\n if (this.isAppMetadata(cacheKey)) {\n this.removeItem(cacheKey, CacheSchemaType.APP_METADATA);\n }\n });\n\n return true;\n }\n\n /**\n * Retrieve the cached credentials into a cacherecord\n * @param account\n * @param clientId\n * @param scopes\n * @param environment\n * @param authScheme\n */\n readCacheRecord(account: AccountInfo, clientId: string, request: BaseAuthRequest, environment: string): CacheRecord {\n\n const cachedAccount = this.readAccountFromCache(account);\n const cachedIdToken = this.readIdTokenFromCache(clientId, account);\n const cachedAccessToken = this.readAccessTokenFromCache(clientId, account, request);\n const cachedRefreshToken = this.readRefreshTokenFromCache(clientId, account, false);\n const cachedAppMetadata = this.readAppMetadataFromCache(environment, clientId);\n\n if (cachedAccount && cachedIdToken) {\n cachedAccount.idTokenClaims = new AuthToken(cachedIdToken.secret, this.cryptoImpl).claims;\n }\n\n return {\n account: cachedAccount,\n idToken: cachedIdToken,\n accessToken: cachedAccessToken,\n refreshToken: cachedRefreshToken,\n appMetadata: cachedAppMetadata,\n };\n }\n\n /**\n * Retrieve AccountEntity from cache\n * @param account\n */\n readAccountFromCache(account: AccountInfo): AccountEntity | null {\n const accountKey: string = AccountEntity.generateAccountCacheKey(account);\n return this.getAccount(accountKey);\n }\n\n /**\n * Retrieve IdTokenEntity from cache\n * @param clientId\n * @param account\n * @param inputRealm\n */\n readIdTokenFromCache(clientId: string, account: AccountInfo): IdTokenEntity | null {\n const idTokenFilter: CredentialFilter = {\n homeAccountId: account.homeAccountId,\n environment: account.environment,\n credentialType: CredentialType.ID_TOKEN,\n clientId: clientId,\n realm: account.tenantId,\n };\n\n const credentialCache: CredentialCache = this.getCredentialsFilteredBy(idTokenFilter);\n const idTokens = Object.keys(credentialCache.idTokens).map((key) => credentialCache.idTokens[key]);\n const numIdTokens = idTokens.length;\n\n if (numIdTokens < 1) {\n return null;\n } else if (numIdTokens > 1) {\n throw ClientAuthError.createMultipleMatchingTokensInCacheError();\n }\n\n return idTokens[0] as IdTokenEntity;\n }\n\n /**\n * Retrieve AccessTokenEntity from cache\n * @param clientId\n * @param account\n * @param scopes\n * @param authScheme\n */\n readAccessTokenFromCache(clientId: string, account: AccountInfo, request: BaseAuthRequest): AccessTokenEntity | null {\n const scopes = new ScopeSet(request.scopes || []);\n const authScheme = request.authenticationScheme || AuthenticationScheme.BEARER;\n /*\n * Distinguish between Bearer and PoP/SSH token cache types\n * Cast to lowercase to handle \"bearer\" from ADFS\n */\n const credentialType = (authScheme && authScheme.toLowerCase() !== AuthenticationScheme.BEARER.toLowerCase()) ? CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME : CredentialType.ACCESS_TOKEN;\n\n const accessTokenFilter: CredentialFilter = {\n homeAccountId: account.homeAccountId,\n environment: account.environment,\n credentialType: credentialType,\n clientId,\n realm: account.tenantId,\n target: scopes.printScopesLowerCase(),\n tokenType: authScheme,\n keyId: request.sshKid,\n requestedClaimsHash: request.requestedClaimsHash\n };\n\n const credentialCache: CredentialCache = this.getCredentialsFilteredBy(accessTokenFilter);\n \n const accessTokens = Object.keys(credentialCache.accessTokens).map((key) => credentialCache.accessTokens[key]);\n \n const numAccessTokens = accessTokens.length;\n if (numAccessTokens < 1) {\n return null;\n } else if (numAccessTokens > 1) {\n throw ClientAuthError.createMultipleMatchingTokensInCacheError();\n }\n\n return accessTokens[0] as AccessTokenEntity;\n }\n\n /**\n * Helper to retrieve the appropriate refresh token from cache\n * @param clientId\n * @param account\n * @param familyRT\n */\n readRefreshTokenFromCache(clientId: string, account: AccountInfo, familyRT: boolean): RefreshTokenEntity | null {\n const id = familyRT ? THE_FAMILY_ID : undefined;\n const refreshTokenFilter: CredentialFilter = {\n homeAccountId: account.homeAccountId,\n environment: account.environment,\n credentialType: CredentialType.REFRESH_TOKEN,\n clientId: clientId,\n familyId: id\n };\n\n const credentialCache: CredentialCache = this.getCredentialsFilteredBy(refreshTokenFilter);\n const refreshTokens = Object.keys(credentialCache.refreshTokens).map((key) => credentialCache.refreshTokens[key]);\n\n const numRefreshTokens = refreshTokens.length;\n if (numRefreshTokens < 1) {\n return null;\n }\n // address the else case after remove functions address environment aliases\n\n return refreshTokens[0] as RefreshTokenEntity;\n }\n\n /**\n * Retrieve AppMetadataEntity from cache\n */\n readAppMetadataFromCache(environment: string, clientId: string): AppMetadataEntity | null {\n const appMetadataFilter: AppMetadataFilter = {\n environment,\n clientId,\n };\n\n const appMetadata: AppMetadataCache = this.getAppMetadataFilteredBy(appMetadataFilter);\n const appMetadataEntries: AppMetadataEntity[] = Object.keys(appMetadata).map((key) => appMetadata[key]);\n\n const numAppMetadata = appMetadataEntries.length;\n if (numAppMetadata < 1) {\n return null;\n } else if (numAppMetadata > 1) {\n throw ClientAuthError.createMultipleMatchingAppMetadataInCacheError();\n }\n\n return appMetadataEntries[0] as AppMetadataEntity;\n }\n\n /**\n * Return the family_id value associated with FOCI\n * @param environment\n * @param clientId\n */\n isAppMetadataFOCI(environment: string, clientId: string): boolean {\n const appMetadata = this.readAppMetadataFromCache(environment, clientId);\n return !!(appMetadata && appMetadata.familyId === THE_FAMILY_ID);\n }\n\n /**\n * helper to match account ids\n * @param value\n * @param homeAccountId\n */\n private matchHomeAccountId(entity: AccountEntity | CredentialEntity, homeAccountId: string): boolean {\n return !!(entity.homeAccountId && homeAccountId === entity.homeAccountId);\n }\n\n /**\n * helper to match assertion\n * @param value\n * @param oboAssertion\n */\n private matchOboAssertion(entity: AccountEntity | CredentialEntity, oboAssertion: string): boolean {\n return !!(entity.oboAssertion && oboAssertion === entity.oboAssertion);\n }\n\n /**\n * helper to match environment\n * @param value\n * @param environment\n */\n private matchEnvironment(entity: AccountEntity | CredentialEntity | AppMetadataEntity, environment: string): boolean {\n const cloudMetadata = this.getAuthorityMetadataByAlias(environment);\n if (cloudMetadata && cloudMetadata.aliases.indexOf(entity.environment) > -1) {\n return true;\n }\n\n return false;\n }\n\n /**\n * helper to match credential type\n * @param entity\n * @param credentialType\n */\n private matchCredentialType(entity: CredentialEntity, credentialType: string): boolean {\n return (entity.credentialType && credentialType.toLowerCase() === entity.credentialType.toLowerCase());\n }\n\n /**\n * helper to match client ids\n * @param entity\n * @param clientId\n */\n private matchClientId(entity: CredentialEntity | AppMetadataEntity, clientId: string): boolean {\n return !!(entity.clientId && clientId === entity.clientId);\n }\n\n /**\n * helper to match family ids\n * @param entity\n * @param familyId\n */\n private matchFamilyId(entity: CredentialEntity | AppMetadataEntity, familyId: string): boolean {\n return !!(entity.familyId && familyId === entity.familyId);\n }\n\n /**\n * helper to match realm\n * @param entity\n * @param realm\n */\n private matchRealm(entity: AccountEntity | CredentialEntity, realm: string): boolean {\n return !!(entity.realm && realm === entity.realm);\n }\n\n /**\n * Returns true if the target scopes are a subset of the current entity's scopes, false otherwise.\n * @param entity\n * @param target\n */\n private matchTarget(entity: CredentialEntity, target: string): boolean {\n const isNotAccessTokenCredential = (entity.credentialType !== CredentialType.ACCESS_TOKEN && entity.credentialType !== CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME);\n\n if ( isNotAccessTokenCredential || !entity.target) {\n return false;\n }\n\n const entityScopeSet: ScopeSet = ScopeSet.fromString(entity.target);\n const requestTargetScopeSet: ScopeSet = ScopeSet.fromString(target);\n\n if (!requestTargetScopeSet.containsOnlyOIDCScopes()) {\n requestTargetScopeSet.removeOIDCScopes(); // ignore OIDC scopes\n } else {\n requestTargetScopeSet.removeScope(Constants.OFFLINE_ACCESS_SCOPE);\n }\n return entityScopeSet.containsScopeSet(requestTargetScopeSet);\n }\n\n /**\n * Returns true if the credential's tokenType or Authentication Scheme matches the one in the request, false otherwise\n * @param entity \n * @param tokenType \n */\n private matchTokenType(entity: CredentialEntity, tokenType: AuthenticationScheme): boolean {\n return !!(entity.tokenType && entity.tokenType === tokenType);\n }\n\n /**\n * Returns true if the credential's keyId matches the one in the request, false otherwise\n * @param entity \n * @param tokenType \n */\n private matchKeyId(entity: CredentialEntity, keyId: string): boolean {\n return !!(entity.keyId && entity.keyId === keyId);\n }\n\n /**\n * returns if a given cache entity is of the type appmetadata\n * @param key\n */\n private isAppMetadata(key: string): boolean {\n return key.indexOf(APP_METADATA) !== -1;\n }\n\n /**\n * returns if a given cache entity is of the type authoritymetadata\n * @param key\n */\n protected isAuthorityMetadata(key: string): boolean {\n return key.indexOf(AUTHORITY_METADATA_CONSTANTS.CACHE_KEY) !== -1;\n }\n\n /**\n * returns cache key used for cloud instance metadata\n */\n generateAuthorityMetadataCacheKey(authority: string): string {\n return `${AUTHORITY_METADATA_CONSTANTS.CACHE_KEY}-${this.clientId}-${authority}`;\n }\n\n /**\n * Returns the specific credential (IdToken/AccessToken/RefreshToken) from the cache\n * @param key\n * @param credType\n */\n private getSpecificCredential(key: string, credType: string): ValidCredentialType | null {\n switch (credType) {\n case CredentialType.ID_TOKEN: {\n return this.getIdTokenCredential(key);\n }\n case CredentialType.ACCESS_TOKEN:\n case CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME: {\n return this.getAccessTokenCredential(key);\n }\n case CredentialType.REFRESH_TOKEN: {\n return this.getRefreshTokenCredential(key);\n }\n default:\n return null;\n }\n }\n\n /**\n * Helper to convert serialized data to object\n * @param obj\n * @param json\n */\n static toObject(obj: T, json: object): T {\n for (const propertyName in json) {\n obj[propertyName] = json[propertyName];\n }\n return obj;\n }\n}\n\nexport class DefaultStorageClass extends CacheManager {\n setAccount(): void {\n const notImplErr = \"Storage interface - setAccount() has not been implemented for the cacheStorage interface.\";\n throw AuthError.createUnexpectedError(notImplErr);\n }\n getAccount(): AccountEntity {\n const notImplErr = \"Storage interface - getAccount() has not been implemented for the cacheStorage interface.\";\n throw AuthError.createUnexpectedError(notImplErr);\n }\n setIdTokenCredential(): void {\n const notImplErr = \"Storage interface - setIdTokenCredential() has not been implemented for the cacheStorage interface.\";\n throw AuthError.createUnexpectedError(notImplErr);\n }\n getIdTokenCredential(): IdTokenEntity {\n const notImplErr = \"Storage interface - getIdTokenCredential() has not been implemented for the cacheStorage interface.\";\n throw AuthError.createUnexpectedError(notImplErr);\n }\n setAccessTokenCredential(): void {\n const notImplErr = \"Storage interface - setAccessTokenCredential() has not been implemented for the cacheStorage interface.\";\n throw AuthError.createUnexpectedError(notImplErr);\n }\n getAccessTokenCredential(): AccessTokenEntity {\n const notImplErr = \"Storage interface - getAccessTokenCredential() has not been implemented for the cacheStorage interface.\";\n throw AuthError.createUnexpectedError(notImplErr);\n }\n setRefreshTokenCredential(): void {\n const notImplErr = \"Storage interface - setRefreshTokenCredential() has not been implemented for the cacheStorage interface.\";\n throw AuthError.createUnexpectedError(notImplErr);\n }\n getRefreshTokenCredential(): RefreshTokenEntity {\n const notImplErr = \"Storage interface - getRefreshTokenCredential() has not been implemented for the cacheStorage interface.\";\n throw AuthError.createUnexpectedError(notImplErr);\n }\n setAppMetadata(): void {\n const notImplErr = \"Storage interface - setAppMetadata() has not been implemented for the cacheStorage interface.\";\n throw AuthError.createUnexpectedError(notImplErr);\n }\n getAppMetadata(): AppMetadataEntity {\n const notImplErr = \"Storage interface - getAppMetadata() has not been implemented for the cacheStorage interface.\";\n throw AuthError.createUnexpectedError(notImplErr);\n }\n setServerTelemetry(): void {\n const notImplErr = \"Storage interface - setServerTelemetry() has not been implemented for the cacheStorage interface.\";\n throw AuthError.createUnexpectedError(notImplErr);\n }\n getServerTelemetry(): ServerTelemetryEntity {\n const notImplErr = \"Storage interface - getServerTelemetry() has not been implemented for the cacheStorage interface.\";\n throw AuthError.createUnexpectedError(notImplErr);\n }\n setAuthorityMetadata(): void {\n const notImplErr = \"Storage interface - setAuthorityMetadata() has not been implemented for the cacheStorage interface.\";\n throw AuthError.createUnexpectedError(notImplErr);\n }\n getAuthorityMetadata(): AuthorityMetadataEntity | null {\n const notImplErr = \"Storage interface - getAuthorityMetadata() has not been implemented for the cacheStorage interface.\";\n throw AuthError.createUnexpectedError(notImplErr);\n }\n getAuthorityMetadataKeys(): Array {\n const notImplErr = \"Storage interface - getAuthorityMetadataKeys() has not been implemented for the cacheStorage interface.\";\n throw AuthError.createUnexpectedError(notImplErr);\n }\n setThrottlingCache(): void {\n const notImplErr = \"Storage interface - setThrottlingCache() has not been implemented for the cacheStorage interface.\";\n throw AuthError.createUnexpectedError(notImplErr);\n }\n getThrottlingCache(): ThrottlingEntity {\n const notImplErr = \"Storage interface - getThrottlingCache() has not been implemented for the cacheStorage interface.\";\n throw AuthError.createUnexpectedError(notImplErr);\n }\n removeItem(): boolean {\n const notImplErr = \"Storage interface - removeItem() has not been implemented for the cacheStorage interface.\";\n throw AuthError.createUnexpectedError(notImplErr);\n }\n containsKey(): boolean {\n const notImplErr = \"Storage interface - containsKey() has not been implemented for the cacheStorage interface.\";\n throw AuthError.createUnexpectedError(notImplErr);\n }\n getKeys(): string[] {\n const notImplErr = \"Storage interface - getKeys() has not been implemented for the cacheStorage interface.\";\n throw AuthError.createUnexpectedError(notImplErr);\n }\n async clear(): Promise {\n const notImplErr = \"Storage interface - clear() has not been implemented for the cacheStorage interface.\";\n throw AuthError.createUnexpectedError(notImplErr);\n }\n updateCredentialCacheKey(): string {\n const notImplErr = \"Storage interface - updateCredentialCacheKey() has not been implemented for the cacheStorage interface.\";\n throw AuthError.createUnexpectedError(notImplErr);\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { CredentialEntity } from \"./CredentialEntity\";\nimport { CredentialType } from \"../../utils/Constants\";\n\n/**\n * ID_TOKEN Cache\n *\n * Key:Value Schema:\n *\n * Key Example: uid.utid-login.microsoftonline.com-idtoken-clientId-contoso.com-\n *\n * Value Schema:\n * {\n * homeAccountId: home account identifier for the auth scheme,\n * environment: entity that issued the token, represented as a full host\n * credentialType: Type of credential as a string, can be one of the following: RefreshToken, AccessToken, IdToken, Password, Cookie, Certificate, Other\n * clientId: client ID of the application\n * secret: Actual credential as a string\n * realm: Full tenant or organizational identifier that the account belongs to\n * }\n */\nexport class IdTokenEntity extends CredentialEntity {\n realm: string;\n\n /**\n * Create IdTokenEntity\n * @param homeAccountId\n * @param authenticationResult\n * @param clientId\n * @param authority\n */\n static createIdTokenEntity(\n homeAccountId: string,\n environment: string,\n idToken: string,\n clientId: string,\n tenantId: string,\n oboAssertion?: string\n ): IdTokenEntity {\n const idTokenEntity = new IdTokenEntity();\n\n idTokenEntity.credentialType = CredentialType.ID_TOKEN;\n idTokenEntity.homeAccountId = homeAccountId;\n idTokenEntity.environment = environment;\n idTokenEntity.clientId = clientId;\n idTokenEntity.secret = idToken;\n idTokenEntity.realm = tenantId;\n idTokenEntity.oboAssertion = oboAssertion;\n\n return idTokenEntity;\n }\n\n /**\n * Validates an entity: checks for all expected params\n * @param entity\n */\n static isIdTokenEntity(entity: object): boolean {\n\n if (!entity) {\n return false;\n }\n\n return (\n entity.hasOwnProperty(\"homeAccountId\") &&\n entity.hasOwnProperty(\"environment\") &&\n entity.hasOwnProperty(\"credentialType\") &&\n entity.hasOwnProperty(\"realm\") &&\n entity.hasOwnProperty(\"clientId\") &&\n entity.hasOwnProperty(\"secret\") &&\n entity[\"credentialType\"] === CredentialType.ID_TOKEN\n );\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Utility class which exposes functions for managing date and time operations.\n */\nexport class TimeUtils {\n\n /**\n * return the current time in Unix time (seconds).\n */\n static nowSeconds(): number {\n // Date.getTime() returns in milliseconds.\n return Math.round(new Date().getTime() / 1000.0);\n }\n \n /**\n * check if a token is expired based on given UTC time in seconds.\n * @param expiresOn\n */\n static isTokenExpired(expiresOn: string, offset: number): boolean {\n // check for access token expiry\n const expirationSec = Number(expiresOn) || 0;\n const offsetCurrentTimeSec = TimeUtils.nowSeconds() + offset;\n\n // If current time + offset is greater than token expiration time, then token is expired.\n return (offsetCurrentTimeSec > expirationSec);\n }\n\n /**\n * If the current time is earlier than the time that a token was cached at, we must discard the token\n * i.e. The system clock was turned back after acquiring the cached token\n * @param cachedAt \n * @param offset \n */\n static wasClockTurnedBack(cachedAt: string): boolean {\n const cachedAtSec = Number(cachedAt);\n\n return cachedAtSec > TimeUtils.nowSeconds();\n }\n\n /**\n * Waits for t number of milliseconds\n * @param t number\n * @param value T\n */\n static delay(t: number, value?: T): Promise {\n return new Promise((resolve) => setTimeout(() => resolve(value), t));\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { CredentialEntity } from \"./CredentialEntity\";\nimport { CredentialType, AuthenticationScheme } from \"../../utils/Constants\";\nimport { TimeUtils } from \"../../utils/TimeUtils\";\nimport { StringUtils } from \"../../utils/StringUtils\";\nimport { ICrypto } from \"../../crypto/ICrypto\";\nimport { TokenClaims } from \"../../account/TokenClaims\";\nimport { AuthToken } from \"../../account/AuthToken\";\nimport { ClientAuthError } from \"../../error/ClientAuthError\";\n\n/**\n * ACCESS_TOKEN Credential Type\n *\n * Key:Value Schema:\n *\n * Key Example: uid.utid-login.microsoftonline.com-accesstoken-clientId-contoso.com-user.read\n *\n * Value Schema:\n * {\n * homeAccountId: home account identifier for the auth scheme,\n * environment: entity that issued the token, represented as a full host\n * credentialType: Type of credential as a string, can be one of the following: RefreshToken, AccessToken, IdToken, Password, Cookie, Certificate, Other\n * clientId: client ID of the application\n * secret: Actual credential as a string\n * familyId: Family ID identifier, usually only used for refresh tokens\n * realm: Full tenant or organizational identifier that the account belongs to\n * target: Permissions that are included in the token, or for refresh tokens, the resource identifier.\n * cachedAt: Absolute device time when entry was created in the cache.\n * expiresOn: Token expiry time, calculated based on current UTC time in seconds. Represented as a string.\n * extendedExpiresOn: Additional extended expiry time until when token is valid in case of server-side outage. Represented as string in UTC seconds.\n * keyId: used for POP and SSH tokenTypes\n * tokenType: Type of the token issued. Usually \"Bearer\"\n * }\n */\nexport class AccessTokenEntity extends CredentialEntity {\n realm: string;\n target: string;\n cachedAt: string;\n expiresOn: string;\n extendedExpiresOn?: string;\n refreshOn?: string;\n keyId?: string; // for POP and SSH tokenTypes\n tokenType?: AuthenticationScheme;\n requestedClaims?: string;\n requestedClaimsHash?: string;\n\n /**\n * Create AccessTokenEntity\n * @param homeAccountId\n * @param environment\n * @param accessToken\n * @param clientId\n * @param tenantId\n * @param scopes\n * @param expiresOn\n * @param extExpiresOn\n */\n static createAccessTokenEntity(\n homeAccountId: string,\n environment: string,\n accessToken: string,\n clientId: string,\n tenantId: string,\n scopes: string,\n expiresOn: number,\n extExpiresOn: number,\n cryptoUtils: ICrypto,\n refreshOn?: number,\n tokenType?: AuthenticationScheme,\n oboAssertion?: string,\n keyId?: string,\n requestedClaims?: string,\n requestedClaimsHash?: string \n ): AccessTokenEntity {\n const atEntity: AccessTokenEntity = new AccessTokenEntity();\n\n atEntity.homeAccountId = homeAccountId;\n atEntity.credentialType = CredentialType.ACCESS_TOKEN;\n atEntity.secret = accessToken;\n\n const currentTime = TimeUtils.nowSeconds();\n atEntity.cachedAt = currentTime.toString();\n\n /*\n * Token expiry time.\n * This value should be  calculated based on the current UTC time measured locally and the value  expires_in Represented as a string in JSON.\n */\n atEntity.expiresOn = expiresOn.toString();\n atEntity.extendedExpiresOn = extExpiresOn.toString();\n if (refreshOn) {\n atEntity.refreshOn = refreshOn.toString();\n }\n\n atEntity.environment = environment;\n atEntity.clientId = clientId;\n atEntity.realm = tenantId;\n atEntity.target = scopes;\n atEntity.oboAssertion = oboAssertion;\n\n atEntity.tokenType = StringUtils.isEmpty(tokenType) ? AuthenticationScheme.BEARER : tokenType;\n\n if (requestedClaims) {\n atEntity.requestedClaims = requestedClaims;\n atEntity.requestedClaimsHash = requestedClaimsHash;\n }\n\n /*\n * Create Access Token With Auth Scheme instead of regular access token\n * Cast to lower to handle \"bearer\" from ADFS\n */\n if (atEntity.tokenType?.toLowerCase() !== AuthenticationScheme.BEARER.toLowerCase()) {\n atEntity.credentialType = CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME;\n switch (atEntity.tokenType) {\n case AuthenticationScheme.POP:\n // Make sure keyId is present and add it to credential\n const tokenClaims: TokenClaims | null = AuthToken.extractTokenClaims(accessToken, cryptoUtils);\n if (!tokenClaims?.cnf?.kid) {\n throw ClientAuthError.createTokenClaimsRequiredError();\n }\n atEntity.keyId = tokenClaims.cnf.kid;\n break;\n case AuthenticationScheme.SSH:\n atEntity.keyId = keyId;\n }\n }\n\n return atEntity;\n }\n\n /**\n * Validates an entity: checks for all expected params\n * @param entity\n */\n static isAccessTokenEntity(entity: object): boolean {\n\n if (!entity) {\n return false;\n }\n\n return (\n entity.hasOwnProperty(\"homeAccountId\") &&\n entity.hasOwnProperty(\"environment\") &&\n entity.hasOwnProperty(\"credentialType\") &&\n entity.hasOwnProperty(\"realm\") &&\n entity.hasOwnProperty(\"clientId\") &&\n entity.hasOwnProperty(\"secret\") &&\n entity.hasOwnProperty(\"target\") &&\n (entity[\"credentialType\"] === CredentialType.ACCESS_TOKEN || entity[\"credentialType\"] === CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME)\n );\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { CredentialEntity } from \"./CredentialEntity\";\nimport { CredentialType } from \"../../utils/Constants\";\n\n/**\n * REFRESH_TOKEN Cache\n *\n * Key:Value Schema:\n *\n * Key Example: uid.utid-login.microsoftonline.com-refreshtoken-clientId--\n *\n * Value:\n * {\n * homeAccountId: home account identifier for the auth scheme,\n * environment: entity that issued the token, represented as a full host\n * credentialType: Type of credential as a string, can be one of the following: RefreshToken, AccessToken, IdToken, Password, Cookie, Certificate, Other\n * clientId: client ID of the application\n * secret: Actual credential as a string\n * familyId: Family ID identifier, '1' represents Microsoft Family\n * realm: Full tenant or organizational identifier that the account belongs to\n * target: Permissions that are included in the token, or for refresh tokens, the resource identifier.\n * }\n */\nexport class RefreshTokenEntity extends CredentialEntity {\n familyId?: string;\n\n /**\n * Create RefreshTokenEntity\n * @param homeAccountId\n * @param authenticationResult\n * @param clientId\n * @param authority\n */\n static createRefreshTokenEntity(\n homeAccountId: string,\n environment: string,\n refreshToken: string,\n clientId: string,\n familyId?: string,\n oboAssertion?: string\n ): RefreshTokenEntity {\n const rtEntity = new RefreshTokenEntity();\n\n rtEntity.clientId = clientId;\n rtEntity.credentialType = CredentialType.REFRESH_TOKEN;\n rtEntity.environment = environment;\n rtEntity.homeAccountId = homeAccountId;\n rtEntity.secret = refreshToken;\n rtEntity.oboAssertion = oboAssertion;\n\n if (familyId)\n rtEntity.familyId = familyId;\n\n return rtEntity;\n }\n\n /**\n * Validates an entity: checks for all expected params\n * @param entity\n */\n static isRefreshTokenEntity(entity: object): boolean {\n\n if (!entity) {\n return false;\n }\n\n return (\n entity.hasOwnProperty(\"homeAccountId\") &&\n entity.hasOwnProperty(\"environment\") &&\n entity.hasOwnProperty(\"credentialType\") &&\n entity.hasOwnProperty(\"clientId\") &&\n entity.hasOwnProperty(\"secret\") &&\n entity[\"credentialType\"] === CredentialType.REFRESH_TOKEN\n );\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { APP_METADATA, Separators } from \"../../utils/Constants\";\n\n/**\n * APP_METADATA Cache\n *\n * Key:Value Schema:\n *\n * Key: appmetadata--\n *\n * Value:\n * {\n * clientId: client ID of the application\n * environment: entity that issued the token, represented as a full host\n * familyId: Family ID identifier, '1' represents Microsoft Family\n * }\n */\nexport class AppMetadataEntity {\n clientId: string;\n environment: string;\n familyId?: string;\n\n /**\n * Generate AppMetadata Cache Key as per the schema: appmetadata--\n */\n generateAppMetadataKey(): string {\n return AppMetadataEntity.generateAppMetadataCacheKey(this.environment, this.clientId);\n }\n\n /**\n * Generate AppMetadata Cache Key\n */\n static generateAppMetadataCacheKey(environment: string, clientId: string): string {\n const appMetaDataKeyArray: Array = [\n APP_METADATA,\n environment,\n clientId,\n ];\n return appMetaDataKeyArray.join(Separators.CACHE_KEY_SEPARATOR).toLowerCase();\n }\n\n /**\n * Creates AppMetadataEntity\n * @param clientId\n * @param environment\n * @param familyId\n */\n static createAppMetadataEntity(clientId: string, environment: string, familyId?: string): AppMetadataEntity {\n const appMetadata = new AppMetadataEntity();\n\n appMetadata.clientId = clientId;\n appMetadata.environment = environment;\n if (familyId) {\n appMetadata.familyId = familyId;\n }\n\n return appMetadata;\n }\n\n /**\n * Validates an entity: checks for all expected params\n * @param entity\n */\n static isAppMetadataEntity(key: string, entity: object): boolean {\n\n if (!entity) {\n return false;\n }\n\n return (\n key.indexOf(APP_METADATA) === 0 &&\n entity.hasOwnProperty(\"clientId\") &&\n entity.hasOwnProperty(\"environment\")\n );\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { SERVER_TELEM_CONSTANTS } from \"../../utils/Constants\";\n\nexport class ServerTelemetryEntity {\n failedRequests: Array;\n errors: string[];\n cacheHits: number;\n\n constructor() {\n this.failedRequests = [];\n this.errors = [];\n this.cacheHits = 0;\n }\n\n /**\n * validates if a given cache entry is \"Telemetry\", parses \n * @param key\n * @param entity\n */\n static isServerTelemetryEntity(key: string, entity?: object): boolean {\n\n const validateKey: boolean = key.indexOf(SERVER_TELEM_CONSTANTS.CACHE_KEY) === 0;\n let validateEntity: boolean = true;\n\n if (entity) {\n validateEntity =\n entity.hasOwnProperty(\"failedRequests\") &&\n entity.hasOwnProperty(\"errors\") &&\n entity.hasOwnProperty(\"cacheHits\");\n }\n\n return validateKey && validateEntity;\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { CloudDiscoveryMetadata } from \"../../authority/CloudDiscoveryMetadata\";\nimport { OpenIdConfigResponse } from \"../../authority/OpenIdConfigResponse\";\nimport { AUTHORITY_METADATA_CONSTANTS } from \"../../utils/Constants\";\nimport { TimeUtils } from \"../../utils/TimeUtils\";\n\nexport class AuthorityMetadataEntity {\n aliases: Array;\n preferred_cache: string;\n preferred_network: string;\n canonical_authority: string;\n authorization_endpoint: string;\n token_endpoint: string;\n end_session_endpoint?: string;\n issuer: string;\n aliasesFromNetwork: boolean;\n endpointsFromNetwork: boolean;\n expiresAt: number;\n\n constructor() {\n this.expiresAt = TimeUtils.nowSeconds() + AUTHORITY_METADATA_CONSTANTS.REFRESH_TIME_SECONDS;\n }\n\n /**\n * Update the entity with new aliases, preferred_cache and preferred_network values\n * @param metadata \n * @param fromNetwork \n */\n updateCloudDiscoveryMetadata(metadata: CloudDiscoveryMetadata, fromNetwork: boolean): void {\n this.aliases = metadata.aliases;\n this.preferred_cache = metadata.preferred_cache;\n this.preferred_network = metadata.preferred_network;\n this.aliasesFromNetwork = fromNetwork;\n }\n\n /**\n * Update the entity with new endpoints\n * @param metadata \n * @param fromNetwork \n */\n updateEndpointMetadata(metadata: OpenIdConfigResponse, fromNetwork: boolean): void {\n this.authorization_endpoint = metadata.authorization_endpoint;\n this.token_endpoint = metadata.token_endpoint;\n this.end_session_endpoint = metadata.end_session_endpoint;\n this.issuer = metadata.issuer;\n this.endpointsFromNetwork = fromNetwork;\n }\n\n /**\n * Save the authority that was used to create this cache entry\n * @param authority \n */\n updateCanonicalAuthority(authority: string): void {\n this.canonical_authority = authority;\n }\n\n /**\n * Reset the exiresAt value\n */\n resetExpiresAt(): void {\n this.expiresAt = TimeUtils.nowSeconds() + AUTHORITY_METADATA_CONSTANTS.REFRESH_TIME_SECONDS;\n }\n\n /**\n * Returns whether or not the data needs to be refreshed\n */\n isExpired(): boolean {\n return this.expiresAt <= TimeUtils.nowSeconds();\n }\n\n /**\n * Validates an entity: checks for all expected params\n * @param entity\n */\n static isAuthorityMetadataEntity(key: string, entity: object): boolean {\n\n if (!entity) {\n return false;\n }\n\n return (\n key.indexOf(AUTHORITY_METADATA_CONSTANTS.CACHE_KEY) === 0 &&\n entity.hasOwnProperty(\"aliases\") &&\n entity.hasOwnProperty(\"preferred_cache\") &&\n entity.hasOwnProperty(\"preferred_network\") &&\n entity.hasOwnProperty(\"canonical_authority\") &&\n entity.hasOwnProperty(\"authorization_endpoint\") &&\n entity.hasOwnProperty(\"token_endpoint\") &&\n entity.hasOwnProperty(\"issuer\") &&\n entity.hasOwnProperty(\"aliasesFromNetwork\") &&\n entity.hasOwnProperty(\"endpointsFromNetwork\") &&\n entity.hasOwnProperty(\"expiresAt\")\n );\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ThrottlingConstants } from \"../../utils/Constants\";\n\nexport class ThrottlingEntity {\n // Unix-time value representing the expiration of the throttle\n throttleTime: number;\n // Information provided by the server\n error?: string;\n errorCodes?: Array;\n errorMessage?: string;\n subError?: string;\n\n /**\n * validates if a given cache entry is \"Throttling\", parses \n * @param key\n * @param entity\n */\n static isThrottlingEntity(key: string, entity?: object): boolean {\n \n let validateKey: boolean = false;\n if (key) {\n validateKey = key.indexOf(ThrottlingConstants.THROTTLING_PREFIX) === 0;\n }\n \n let validateEntity: boolean = true;\n if (entity) {\n validateEntity = entity.hasOwnProperty(\"throttleTime\");\n }\n\n return validateKey && validateEntity;\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { StringUtils } from \"./StringUtils\";\nimport { Constants } from \"./Constants\";\nimport { ICrypto } from \"../crypto/ICrypto\";\nimport { ClientAuthError } from \"../error/ClientAuthError\";\n\n/**\n * Type which defines the object that is stringified, encoded and sent in the state value.\n * Contains the following:\n * - id - unique identifier for this request\n * - ts - timestamp for the time the request was made. Used to ensure that token expiration is not calculated incorrectly.\n * - platformState - string value sent from the platform.\n */\nexport type LibraryStateObject = {\n id: string,\n meta?: Record\n};\n\n/**\n * Type which defines the stringified and encoded object sent to the service in the authorize request.\n */\nexport type RequestStateObject = {\n userRequestState: string,\n libraryState: LibraryStateObject\n};\n\n/**\n * Class which provides helpers for OAuth 2.0 protocol specific values\n */\nexport class ProtocolUtils {\n\n /**\n * Appends user state with random guid, or returns random guid.\n * @param userState \n * @param randomGuid \n */\n static setRequestState(cryptoObj: ICrypto, userState?: string, meta?: Record): string {\n const libraryState = ProtocolUtils.generateLibraryState(cryptoObj, meta);\n return !StringUtils.isEmpty(userState) ? `${libraryState}${Constants.RESOURCE_DELIM}${userState}` : libraryState;\n }\n\n /**\n * Generates the state value used by the common library.\n * @param randomGuid \n * @param cryptoObj \n */\n static generateLibraryState(cryptoObj: ICrypto, meta?: Record): string {\n if (!cryptoObj) {\n throw ClientAuthError.createNoCryptoObjectError(\"generateLibraryState\");\n }\n\n // Create a state object containing a unique id and the timestamp of the request creation\n const stateObj: LibraryStateObject = {\n id: cryptoObj.createNewGuid()\n };\n\n if (meta) {\n stateObj.meta = meta;\n }\n\n const stateString = JSON.stringify(stateObj);\n\n return cryptoObj.base64Encode(stateString);\n }\n\n /**\n * Parses the state into the RequestStateObject, which contains the LibraryState info and the state passed by the user.\n * @param state \n * @param cryptoObj \n */\n static parseRequestState(cryptoObj: ICrypto, state: string): RequestStateObject {\n if (!cryptoObj) {\n throw ClientAuthError.createNoCryptoObjectError(\"parseRequestState\");\n }\n\n if (StringUtils.isEmpty(state)) {\n throw ClientAuthError.createInvalidStateError(state, \"Null, undefined or empty state\");\n }\n\n try {\n // Split the state between library state and user passed state and decode them separately\n const splitState = state.split(Constants.RESOURCE_DELIM);\n const libraryState = splitState[0];\n const userState = splitState.length > 1 ? splitState.slice(1).join(Constants.RESOURCE_DELIM) : \"\";\n const libraryStateString = cryptoObj.base64Decode(libraryState);\n const libraryStateObj = JSON.parse(libraryStateString) as LibraryStateObject;\n return {\n userRequestState: !StringUtils.isEmpty(userState) ? userState : \"\",\n libraryState: libraryStateObj\n };\n } catch(e) {\n throw ClientAuthError.createInvalidStateError(state, e);\n }\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Protocol modes supported by MSAL.\n */\nexport enum ProtocolMode {\n AAD = \"AAD\",\n OIDC = \"OIDC\"\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AuthError } from \"@azure/msal-common\";\n\n/**\n * BrowserAuthErrorMessage class containing string constants used by error codes and messages.\n */\nexport const BrowserConfigurationAuthErrorMessage = {\n redirectUriNotSet: {\n code: \"redirect_uri_empty\",\n desc: \"A redirect URI is required for all calls, and none has been set.\"\n },\n postLogoutUriNotSet: {\n code: \"post_logout_uri_empty\",\n desc: \"A post logout redirect has not been set.\"\n },\n storageNotSupportedError: {\n code: \"storage_not_supported\",\n desc: \"Given storage configuration option was not supported.\"\n },\n noRedirectCallbacksSet: {\n code: \"no_redirect_callbacks\",\n desc: \"No redirect callbacks have been set. Please call setRedirectCallbacks() with the appropriate function arguments before continuing. \" +\n \"More information is available here: https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics.\"\n },\n invalidCallbackObject: {\n code: \"invalid_callback_object\",\n desc: \"The object passed for the callback was invalid. \" +\n \"More information is available here: https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics.\"\n },\n stubPcaInstanceCalled: {\n code: \"stubbed_public_client_application_called\",\n desc: \"Stub instance of Public Client Application was called. If using msal-react, please ensure context is not used without a provider. For more visit: aka.ms/msaljs/browser-errors\"\n },\n inMemRedirectUnavailable: {\n code: \"in_mem_redirect_unavailable\",\n desc: \"Redirect cannot be supported. In-memory storage was selected and storeAuthStateInCookie=false, which would cause the library to be unable to handle the incoming hash. If you would like to use the redirect API, please use session/localStorage or set storeAuthStateInCookie=true.\"\n }\n};\n\n/**\n * Browser library error class thrown by the MSAL.js library for SPAs\n */\nexport class BrowserConfigurationAuthError extends AuthError {\n\n constructor(errorCode: string, errorMessage?: string) {\n super(errorCode, errorMessage);\n this.name = \"BrowserConfigurationAuthError\";\n\n Object.setPrototypeOf(this, BrowserConfigurationAuthError.prototype);\n }\n\n /**\n * Creates an error thrown when the redirect uri is empty (not set by caller)\n */\n static createRedirectUriEmptyError(): BrowserConfigurationAuthError {\n return new BrowserConfigurationAuthError(BrowserConfigurationAuthErrorMessage.redirectUriNotSet.code,\n BrowserConfigurationAuthErrorMessage.redirectUriNotSet.desc);\n }\n\n /**\n * Creates an error thrown when the post-logout redirect uri is empty (not set by caller)\n */\n static createPostLogoutRedirectUriEmptyError(): BrowserConfigurationAuthError {\n return new BrowserConfigurationAuthError(BrowserConfigurationAuthErrorMessage.postLogoutUriNotSet.code,\n BrowserConfigurationAuthErrorMessage.postLogoutUriNotSet.desc);\n }\n\n /**\n * Creates error thrown when given storage location is not supported.\n * @param givenStorageLocation \n */\n static createStorageNotSupportedError(givenStorageLocation: string): BrowserConfigurationAuthError {\n return new BrowserConfigurationAuthError(BrowserConfigurationAuthErrorMessage.storageNotSupportedError.code, `${BrowserConfigurationAuthErrorMessage.storageNotSupportedError.desc} Given Location: ${givenStorageLocation}`);\n }\n\n /**\n * Creates error thrown when redirect callbacks are not set before calling loginRedirect() or acquireTokenRedirect().\n */\n static createRedirectCallbacksNotSetError(): BrowserConfigurationAuthError {\n return new BrowserConfigurationAuthError(BrowserConfigurationAuthErrorMessage.noRedirectCallbacksSet.code, \n BrowserConfigurationAuthErrorMessage.noRedirectCallbacksSet.desc);\n }\n\n /**\n * Creates error thrown when the stub instance of PublicClientApplication is called.\n */\n static createStubPcaInstanceCalledError(): BrowserConfigurationAuthError {\n return new BrowserConfigurationAuthError(BrowserConfigurationAuthErrorMessage.stubPcaInstanceCalled.code,\n BrowserConfigurationAuthErrorMessage.stubPcaInstanceCalled.desc);\n }\n\n /*\n * Create an error thrown when in-memory storage is used and storeAuthStateInCookie=false.\n */\n static createInMemoryRedirectUnavailableError(): BrowserConfigurationAuthError {\n return new BrowserConfigurationAuthError(BrowserConfigurationAuthErrorMessage.inMemRedirectUnavailable.code, BrowserConfigurationAuthErrorMessage.inMemRedirectUnavailable.desc);\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { BrowserConfigurationAuthError } from \"../error/BrowserConfigurationAuthError\";\nimport { BrowserCacheLocation } from \"../utils/BrowserConstants\";\nimport { IWindowStorage } from \"./IWindowStorage\";\n\nexport class BrowserStorage implements IWindowStorage {\n\n private windowStorage: Storage;\n\n constructor(cacheLocation: string) {\n this.validateWindowStorage(cacheLocation);\n this.windowStorage = window[cacheLocation];\n }\n\n private validateWindowStorage(cacheLocation: string): void {\n if (cacheLocation !== BrowserCacheLocation.LocalStorage && cacheLocation !== BrowserCacheLocation.SessionStorage) {\n throw BrowserConfigurationAuthError.createStorageNotSupportedError(cacheLocation);\n }\n const storageSupported = !!window[cacheLocation];\n if (!storageSupported) {\n throw BrowserConfigurationAuthError.createStorageNotSupportedError(cacheLocation);\n }\n }\n\n getItem(key: string): string | null {\n return this.windowStorage.getItem(key);\n }\n\n setItem(key: string, value: string): void {\n this.windowStorage.setItem(key, value);\n }\n\n removeItem(key: string): void {\n this.windowStorage.removeItem(key);\n }\n\n getKeys(): string[] {\n return Object.keys(this.windowStorage);\n }\n\n containsKey(key: string): boolean {\n return this.windowStorage.hasOwnProperty(key);\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ServerAuthorizationCodeResponse } from \"../response/ServerAuthorizationCodeResponse\";\nimport { ClientConfigurationError } from \"../error/ClientConfigurationError\";\nimport { ClientAuthError } from \"../error/ClientAuthError\";\nimport { StringUtils } from \"../utils/StringUtils\";\nimport { IUri } from \"./IUri\";\nimport { AADAuthorityConstants, Constants } from \"../utils/Constants\";\n\n/**\n * Url object class which can perform various transformations on url strings.\n */\nexport class UrlString {\n\n // internal url string field\n private _urlString: string;\n public get urlString(): string {\n return this._urlString;\n }\n \n constructor(url: string) {\n this._urlString = url;\n if (StringUtils.isEmpty(this._urlString)) {\n // Throws error if url is empty\n throw ClientConfigurationError.createUrlEmptyError();\n }\n\n if (StringUtils.isEmpty(this.getHash())) {\n this._urlString = UrlString.canonicalizeUri(url);\n }\n }\n\n /**\n * Ensure urls are lower case and end with a / character.\n * @param url \n */\n static canonicalizeUri(url: string): string {\n if (url) {\n let lowerCaseUrl = url.toLowerCase();\n\n if (StringUtils.endsWith(lowerCaseUrl, \"?\")) {\n lowerCaseUrl = lowerCaseUrl.slice(0, -1);\n } else if (StringUtils.endsWith(lowerCaseUrl, \"?/\")) {\n lowerCaseUrl = lowerCaseUrl.slice(0, -2);\n }\n\n if (!StringUtils.endsWith(lowerCaseUrl, \"/\")) {\n lowerCaseUrl += \"/\";\n }\n\n return lowerCaseUrl;\n }\n\n return url;\n }\n\n /**\n * Throws if urlString passed is not a valid authority URI string.\n */\n validateAsUri(): void {\n // Attempts to parse url for uri components\n let components;\n try {\n components = this.getUrlComponents();\n } catch (e) {\n throw ClientConfigurationError.createUrlParseError(e);\n }\n\n // Throw error if URI or path segments are not parseable.\n if (!components.HostNameAndPort || !components.PathSegments) {\n throw ClientConfigurationError.createUrlParseError(`Given url string: ${this.urlString}`);\n }\n\n // Throw error if uri is insecure.\n if(!components.Protocol || components.Protocol.toLowerCase() !== \"https:\") {\n throw ClientConfigurationError.createInsecureAuthorityUriError(this.urlString);\n }\n }\n\n /**\n * Given a url and a query string return the url with provided query string appended\n * @param url \n * @param queryString \n */\n static appendQueryString(url: string, queryString: string): string {\n if (StringUtils.isEmpty(queryString)) {\n return url;\n }\n\n return url.indexOf(\"?\") < 0 ? `${url}?${queryString}` : `${url}&${queryString}`;\n }\n\n /**\n * Returns a url with the hash removed\n * @param url \n */\n static removeHashFromUrl(url: string): string {\n return UrlString.canonicalizeUri(url.split(\"#\")[0]);\n }\n\n /**\n * Given a url like https://a:b/common/d?e=f#g, and a tenantId, returns https://a:b/tenantId/d\n * @param href The url\n * @param tenantId The tenant id to replace\n */\n replaceTenantPath(tenantId: string): UrlString {\n const urlObject = this.getUrlComponents();\n const pathArray = urlObject.PathSegments;\n if (tenantId && (pathArray.length !== 0 && (pathArray[0] === AADAuthorityConstants.COMMON || pathArray[0] === AADAuthorityConstants.ORGANIZATIONS))) {\n pathArray[0] = tenantId;\n }\n return UrlString.constructAuthorityUriFromObject(urlObject);\n }\n\n /**\n * Returns the anchor part(#) of the URL\n */\n getHash(): string {\n return UrlString.parseHash(this.urlString);\n }\n\n /**\n * Parses out the components from a url string.\n * @returns An object with the various components. Please cache this value insted of calling this multiple times on the same url.\n */\n getUrlComponents(): IUri {\n // https://gist.github.com/curtisz/11139b2cfcaef4a261e0\n const regEx = RegExp(\"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\\\?([^#]*))?(#(.*))?\");\n\n // If url string does not match regEx, we throw an error\n const match = this.urlString.match(regEx);\n if (!match) {\n throw ClientConfigurationError.createUrlParseError(`Given url string: ${this.urlString}`);\n }\n\n // Url component object\n const urlComponents = {\n Protocol: match[1],\n HostNameAndPort: match[4],\n AbsolutePath: match[5],\n QueryString: match[7]\n } as IUri;\n\n let pathSegments = urlComponents.AbsolutePath.split(\"/\");\n pathSegments = pathSegments.filter((val) => val && val.length > 0); // remove empty elements\n urlComponents.PathSegments = pathSegments;\n\n if (!StringUtils.isEmpty(urlComponents.QueryString) && urlComponents.QueryString.endsWith(\"/\")) {\n urlComponents.QueryString = urlComponents.QueryString.substring(0, urlComponents.QueryString.length-1);\n }\n return urlComponents;\n }\n\n static getDomainFromUrl(url: string): string {\n const regEx = RegExp(\"^([^:/?#]+://)?([^/?#]*)\");\n\n const match = url.match(regEx);\n\n if (!match) {\n throw ClientConfigurationError.createUrlParseError(`Given url string: ${url}`);\n }\n\n return match[2];\n }\n\n static getAbsoluteUrl(relativeUrl: string, baseUrl: string): string {\n if (relativeUrl[0] === Constants.FORWARD_SLASH) {\n const url = new UrlString(baseUrl);\n const baseComponents = url.getUrlComponents();\n\n return baseComponents.Protocol + \"//\" + baseComponents.HostNameAndPort + relativeUrl;\n }\n \n return relativeUrl;\n }\n \n /**\n * Parses hash string from given string. Returns empty string if no hash symbol is found.\n * @param hashString \n */\n static parseHash(hashString: string): string {\n const hashIndex1 = hashString.indexOf(\"#\");\n const hashIndex2 = hashString.indexOf(\"#/\");\n if (hashIndex2 > -1) {\n return hashString.substring(hashIndex2 + 2);\n } else if (hashIndex1 > -1) {\n return hashString.substring(hashIndex1 + 1);\n }\n return \"\";\n }\n\n static constructAuthorityUriFromObject(urlObject: IUri): UrlString {\n return new UrlString(urlObject.Protocol + \"//\" + urlObject.HostNameAndPort + \"/\" + urlObject.PathSegments.join(\"/\"));\n }\n\n /**\n * Returns URL hash as server auth code response object.\n */\n static getDeserializedHash(hash: string): ServerAuthorizationCodeResponse {\n // Check if given hash is empty\n if (StringUtils.isEmpty(hash)) {\n return {};\n }\n // Strip the # symbol if present\n const parsedHash = UrlString.parseHash(hash);\n // If # symbol was not present, above will return empty string, so give original hash value\n const deserializedHash: ServerAuthorizationCodeResponse = StringUtils.queryStringToObject(StringUtils.isEmpty(parsedHash) ? hash : parsedHash);\n // Check if deserialization didn't work\n if (!deserializedHash) {\n throw ClientAuthError.createHashNotDeserializedError(JSON.stringify(deserializedHash));\n }\n return deserializedHash;\n }\n\n /**\n * Check if the hash of the URL string contains known properties\n */\n static hashContainsKnownProperties(hash: string): boolean {\n if (StringUtils.isEmpty(hash) || hash.indexOf(\"=\") < 0) {\n // Hash doesn't contain key/value pairs\n return false;\n }\n\n const parameters: ServerAuthorizationCodeResponse = UrlString.getDeserializedHash(hash);\n return !!(\n parameters.code ||\n parameters.error_description ||\n parameters.error ||\n parameters.state\n );\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { InteractionType } from \"./BrowserConstants\";\nimport { StringUtils, ClientAuthError, ICrypto, RequestStateObject, ProtocolUtils, ServerAuthorizationCodeResponse, UrlString } from \"@azure/msal-common\";\n\nexport type BrowserStateObject = {\n interactionType: InteractionType\n};\n\nexport class BrowserProtocolUtils {\n\n /**\n * Extracts the BrowserStateObject from the state string.\n * @param browserCrypto \n * @param state \n */\n static extractBrowserRequestState(browserCrypto: ICrypto, state: string): BrowserStateObject | null {\n if (StringUtils.isEmpty(state)) {\n return null;\n }\n\n try {\n const requestStateObj: RequestStateObject = ProtocolUtils.parseRequestState(browserCrypto, state);\n return requestStateObj.libraryState.meta as BrowserStateObject;\n } catch (e) {\n throw ClientAuthError.createInvalidStateError(state, e);\n }\n }\n\n /**\n * Parses properties of server response from url hash\n * @param locationHash Hash from url\n */\n static parseServerResponseFromHash(locationHash: string): ServerAuthorizationCodeResponse {\n if (!locationHash) {\n return {};\n }\n \n const hashUrlString = new UrlString(locationHash);\n return UrlString.getDeserializedHash(hashUrlString.getHash());\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { Constants, PersistentCacheKeys, StringUtils, CommonAuthorizationCodeRequest, ICrypto, AccountEntity, IdTokenEntity, AccessTokenEntity, RefreshTokenEntity, AppMetadataEntity, CacheManager, ServerTelemetryEntity, ThrottlingEntity, ProtocolUtils, Logger, AuthorityMetadataEntity, DEFAULT_CRYPTO_IMPLEMENTATION, AccountInfo, CcsCredential, CcsCredentialType, IdToken, ValidCredentialType } from \"@azure/msal-common\";\nimport { CacheOptions } from \"../config/Configuration\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\nimport { BrowserCacheLocation, InteractionType, TemporaryCacheKeys, InMemoryCacheKeys } from \"../utils/BrowserConstants\";\nimport { BrowserStorage } from \"./BrowserStorage\";\nimport { MemoryStorage } from \"./MemoryStorage\";\nimport { IWindowStorage } from \"./IWindowStorage\";\nimport { BrowserProtocolUtils } from \"../utils/BrowserProtocolUtils\";\n\n/**\n * This class implements the cache storage interface for MSAL through browser local or session storage.\n * Cookies are only used if storeAuthStateInCookie is true, and are only used for\n * parameters such as state and nonce, generally.\n */\nexport class BrowserCacheManager extends CacheManager {\n\n // Cache configuration, either set by user or default values.\n private cacheConfig: Required;\n // Window storage object (either local or sessionStorage)\n private browserStorage: IWindowStorage;\n // Internal in-memory storage object used for data used by msal that does not need to persist across page loads\n private internalStorage: MemoryStorage;\n // Temporary cache\n private temporaryCacheStorage: IWindowStorage;\n // Client id of application. Used in cache keys to partition cache correctly in the case of multiple instances of MSAL.\n private logger: Logger;\n\n // Cookie life calculation (hours * minutes * seconds * ms)\n private readonly COOKIE_LIFE_MULTIPLIER = 24 * 60 * 60 * 1000;\n\n constructor(clientId: string, cacheConfig: Required, cryptoImpl: ICrypto, logger: Logger) {\n super(clientId, cryptoImpl);\n\n this.cacheConfig = cacheConfig;\n this.logger = logger;\n this.internalStorage = new MemoryStorage();\n this.browserStorage = this.setupBrowserStorage(this.cacheConfig.cacheLocation);\n this.temporaryCacheStorage = this.setupTemporaryCacheStorage(this.cacheConfig.cacheLocation);\n\n // Migrate any cache entries from older versions of MSAL.\n this.migrateCacheEntries();\n }\n\n /**\n * Returns a window storage class implementing the IWindowStorage interface that corresponds to the configured cacheLocation.\n * @param cacheLocation\n */\n private setupBrowserStorage(cacheLocation: BrowserCacheLocation | string): IWindowStorage {\n switch (cacheLocation) {\n case BrowserCacheLocation.LocalStorage:\n case BrowserCacheLocation.SessionStorage:\n try {\n // Temporary cache items will always be stored in session storage to mitigate problems caused by multiple tabs\n return new BrowserStorage(cacheLocation);\n } catch (e) {\n this.logger.verbose(e);\n break;\n }\n case BrowserCacheLocation.MemoryStorage:\n default:\n break;\n }\n this.cacheConfig.cacheLocation = BrowserCacheLocation.MemoryStorage;\n return new MemoryStorage();\n }\n\n /**\n *\n * @param cacheLocation\n */\n private setupTemporaryCacheStorage(cacheLocation: BrowserCacheLocation | string): IWindowStorage {\n switch (cacheLocation) {\n case BrowserCacheLocation.LocalStorage:\n case BrowserCacheLocation.SessionStorage:\n try {\n // Temporary cache items will always be stored in session storage to mitigate problems caused by multiple tabs\n return new BrowserStorage(BrowserCacheLocation.SessionStorage);\n } catch (e) {\n this.logger.verbose(e);\n return this.internalStorage;\n }\n case BrowserCacheLocation.MemoryStorage:\n default:\n return this.internalStorage;\n }\n }\n\n /**\n * Migrate all old cache entries to new schema. No rollback supported.\n * @param storeAuthStateInCookie\n */\n private migrateCacheEntries(): void {\n const idTokenKey = `${Constants.CACHE_PREFIX}.${PersistentCacheKeys.ID_TOKEN}`;\n const clientInfoKey = `${Constants.CACHE_PREFIX}.${PersistentCacheKeys.CLIENT_INFO}`;\n const errorKey = `${Constants.CACHE_PREFIX}.${PersistentCacheKeys.ERROR}`;\n const errorDescKey = `${Constants.CACHE_PREFIX}.${PersistentCacheKeys.ERROR_DESC}`;\n\n const idTokenValue = this.browserStorage.getItem(idTokenKey);\n const clientInfoValue = this.browserStorage.getItem(clientInfoKey);\n const errorValue = this.browserStorage.getItem(errorKey);\n const errorDescValue = this.browserStorage.getItem(errorDescKey);\n\n const values = [idTokenValue, clientInfoValue, errorValue, errorDescValue];\n const keysToMigrate = [PersistentCacheKeys.ID_TOKEN, PersistentCacheKeys.CLIENT_INFO, PersistentCacheKeys.ERROR, PersistentCacheKeys.ERROR_DESC];\n\n keysToMigrate.forEach((cacheKey:string, index: number) => this.migrateCacheEntry(cacheKey, values[index]));\n }\n\n /**\n * Utility function to help with migration.\n * @param newKey\n * @param value\n * @param storeAuthStateInCookie\n */\n private migrateCacheEntry(newKey: string, value: string|null): void {\n if (value) {\n this.setTemporaryCache(newKey, value, true);\n }\n }\n\n /**\n * Parses passed value as JSON object, JSON.parse() will throw an error.\n * @param input\n */\n private validateAndParseJson(jsonValue: string): object | null {\n try {\n const parsedJson = JSON.parse(jsonValue);\n /**\n * There are edge cases in which JSON.parse will successfully parse a non-valid JSON object\n * (e.g. JSON.parse will parse an escaped string into an unescaped string), so adding a type check\n * of the parsed value is necessary in order to be certain that the string represents a valid JSON object.\n *\n */\n return (parsedJson && typeof parsedJson === \"object\") ? parsedJson : null;\n } catch (error) {\n return null;\n }\n }\n\n /**\n * fetches the entry from the browser storage based off the key\n * @param key\n */\n getItem(key: string): string | null {\n return this.browserStorage.getItem(key);\n }\n\n /**\n * sets the entry in the browser storage\n * @param key\n * @param value\n */\n setItem(key: string, value: string): void {\n this.browserStorage.setItem(key, value);\n }\n\n /**\n * fetch the account entity from the platform cache\n * @param accountKey\n */\n getAccount(accountKey: string): AccountEntity | null {\n const account = this.getItem(accountKey);\n if (!account) {\n return null;\n }\n\n const parsedAccount = this.validateAndParseJson(account);\n if (!parsedAccount || !AccountEntity.isAccountEntity(parsedAccount)) {\n return null;\n }\n\n return CacheManager.toObject(new AccountEntity(), parsedAccount);\n }\n\n /**\n * set account entity in the platform cache\n * @param key\n * @param value\n */\n setAccount(account: AccountEntity): void {\n this.logger.trace(\"BrowserCacheManager.setAccount called\");\n const key = account.generateAccountKey();\n this.setItem(key, JSON.stringify(account));\n }\n\n /**\n * generates idToken entity from a string\n * @param idTokenKey\n */\n getIdTokenCredential(idTokenKey: string): IdTokenEntity | null {\n const value = this.getItem(idTokenKey);\n if (!value) {\n this.logger.trace(\"BrowserCacheManager.getIdTokenCredential: called, no cache hit\");\n return null;\n }\n\n const parsedIdToken = this.validateAndParseJson(value);\n if (!parsedIdToken || !IdTokenEntity.isIdTokenEntity(parsedIdToken)) {\n this.logger.trace(\"BrowserCacheManager.getIdTokenCredential: called, no cache hit\");\n return null;\n }\n\n this.logger.trace(\"BrowserCacheManager.getIdTokenCredential: cache hit\");\n return CacheManager.toObject(new IdTokenEntity(), parsedIdToken);\n }\n\n /**\n * set IdToken credential to the platform cache\n * @param idToken\n */\n setIdTokenCredential(idToken: IdTokenEntity): void {\n this.logger.trace(\"BrowserCacheManager.setIdTokenCredential called\");\n const idTokenKey = idToken.generateCredentialKey();\n this.setItem(idTokenKey, JSON.stringify(idToken));\n }\n\n /**\n * generates accessToken entity from a string\n * @param key\n */\n getAccessTokenCredential(accessTokenKey: string): AccessTokenEntity | null {\n const value = this.getItem(accessTokenKey);\n if (!value) {\n this.logger.trace(\"BrowserCacheManager.getAccessTokenCredential: called, no cache hit\");\n return null;\n }\n const parsedAccessToken = this.validateAndParseJson(value);\n if (!parsedAccessToken || !AccessTokenEntity.isAccessTokenEntity(parsedAccessToken)) {\n this.logger.trace(\"BrowserCacheManager.getAccessTokenCredential: called, no cache hit\");\n return null;\n }\n\n this.logger.trace(\"BrowserCacheManager.getAccessTokenCredential: cache hit\");\n return CacheManager.toObject(new AccessTokenEntity(), parsedAccessToken);\n }\n\n /**\n * set accessToken credential to the platform cache\n * @param accessToken\n */\n setAccessTokenCredential(accessToken: AccessTokenEntity): void {\n this.logger.trace(\"BrowserCacheManager.setAccessTokenCredential called\");\n const accessTokenKey = accessToken.generateCredentialKey();\n this.setItem(accessTokenKey, JSON.stringify(accessToken));\n }\n\n /**\n * generates refreshToken entity from a string\n * @param refreshTokenKey\n */\n getRefreshTokenCredential(refreshTokenKey: string): RefreshTokenEntity | null {\n const value = this.getItem(refreshTokenKey);\n if (!value) {\n this.logger.trace(\"BrowserCacheManager.getRefreshTokenCredential: called, no cache hit\");\n return null;\n }\n const parsedRefreshToken = this.validateAndParseJson(value);\n if (!parsedRefreshToken || !RefreshTokenEntity.isRefreshTokenEntity(parsedRefreshToken)) {\n this.logger.trace(\"BrowserCacheManager.getRefreshTokenCredential: called, no cache hit\");\n return null;\n }\n\n this.logger.trace(\"BrowserCacheManager.getRefreshTokenCredential: cache hit\");\n return CacheManager.toObject(new RefreshTokenEntity(), parsedRefreshToken);\n }\n\n /**\n * set refreshToken credential to the platform cache\n * @param refreshToken\n */\n setRefreshTokenCredential(refreshToken: RefreshTokenEntity): void {\n this.logger.trace(\"BrowserCacheManager.setRefreshTokenCredential called\");\n const refreshTokenKey = refreshToken.generateCredentialKey();\n this.setItem(refreshTokenKey, JSON.stringify(refreshToken));\n }\n\n /**\n * fetch appMetadata entity from the platform cache\n * @param appMetadataKey\n */\n getAppMetadata(appMetadataKey: string): AppMetadataEntity | null {\n const value = this.getItem(appMetadataKey);\n if (!value) {\n this.logger.trace(\"BrowserCacheManager.getAppMetadata: called, no cache hit\");\n return null;\n }\n\n const parsedMetadata = this.validateAndParseJson(value);\n if (!parsedMetadata || !AppMetadataEntity.isAppMetadataEntity(appMetadataKey, parsedMetadata)) {\n this.logger.trace(\"BrowserCacheManager.getAppMetadata: called, no cache hit\");\n return null;\n }\n\n this.logger.trace(\"BrowserCacheManager.getAppMetadata: cache hit\");\n return CacheManager.toObject(new AppMetadataEntity(), parsedMetadata);\n }\n\n /**\n * set appMetadata entity to the platform cache\n * @param appMetadata\n */\n setAppMetadata(appMetadata: AppMetadataEntity): void {\n this.logger.trace(\"BrowserCacheManager.setAppMetadata called\");\n const appMetadataKey = appMetadata.generateAppMetadataKey();\n this.setItem(appMetadataKey, JSON.stringify(appMetadata));\n }\n\n /**\n * fetch server telemetry entity from the platform cache\n * @param serverTelemetryKey\n */\n getServerTelemetry(serverTelemetryKey: string): ServerTelemetryEntity | null {\n const value = this.getItem(serverTelemetryKey);\n if (!value) {\n this.logger.trace(\"BrowserCacheManager.getServerTelemetry: called, no cache hit\");\n return null;\n }\n const parsedMetadata = this.validateAndParseJson(value);\n if (!parsedMetadata || !ServerTelemetryEntity.isServerTelemetryEntity(serverTelemetryKey, parsedMetadata)) {\n this.logger.trace(\"BrowserCacheManager.getServerTelemetry: called, no cache hit\");\n return null;\n }\n\n this.logger.trace(\"BrowserCacheManager.getServerTelemetry: cache hit\");\n return CacheManager.toObject(new ServerTelemetryEntity(), parsedMetadata);\n }\n\n /**\n * set server telemetry entity to the platform cache\n * @param serverTelemetryKey\n * @param serverTelemetry\n */\n setServerTelemetry(serverTelemetryKey: string, serverTelemetry: ServerTelemetryEntity): void {\n this.logger.trace(\"BrowserCacheManager.setServerTelemetry called\");\n this.setItem(serverTelemetryKey, JSON.stringify(serverTelemetry));\n }\n\n /**\n *\n */\n getAuthorityMetadata(key: string) : AuthorityMetadataEntity | null {\n const value = this.internalStorage.getItem(key);\n if (!value) {\n this.logger.trace(\"BrowserCacheManager.getAuthorityMetadata: called, no cache hit\");\n return null;\n }\n const parsedMetadata = this.validateAndParseJson(value);\n if (parsedMetadata && AuthorityMetadataEntity.isAuthorityMetadataEntity(key, parsedMetadata)) {\n this.logger.trace(\"BrowserCacheManager.getAuthorityMetadata: cache hit\");\n return CacheManager.toObject(new AuthorityMetadataEntity(), parsedMetadata);\n }\n return null;\n }\n\n /**\n *\n */\n getAuthorityMetadataKeys(): Array {\n const allKeys = this.internalStorage.getKeys();\n return allKeys.filter((key) => {\n return this.isAuthorityMetadata(key);\n });\n }\n\n /**\n * Sets wrapper metadata in memory\n * @param wrapperSKU \n * @param wrapperVersion \n */\n setWrapperMetadata(wrapperSKU: string, wrapperVersion: string): void {\n this.internalStorage.setItem(InMemoryCacheKeys.WRAPPER_SKU, wrapperSKU);\n this.internalStorage.setItem(InMemoryCacheKeys.WRAPPER_VER, wrapperVersion);\n }\n\n /**\n * Returns wrapper metadata from in-memory storage\n */\n getWrapperMetadata(): [string, string] {\n const sku = this.internalStorage.getItem(InMemoryCacheKeys.WRAPPER_SKU) || \"\";\n const version = this.internalStorage.getItem(InMemoryCacheKeys.WRAPPER_VER) || \"\";\n return [sku, version];\n }\n\n /**\n *\n * @param entity\n */\n setAuthorityMetadata(key: string, entity: AuthorityMetadataEntity): void {\n this.logger.trace(\"BrowserCacheManager.setAuthorityMetadata called\");\n this.internalStorage.setItem(key, JSON.stringify(entity));\n }\n\n /**\n * Gets the active account\n */\n getActiveAccount(): AccountInfo | null {\n const activeAccountIdKey = this.generateCacheKey(PersistentCacheKeys.ACTIVE_ACCOUNT);\n const activeAccountId = this.browserStorage.getItem(activeAccountIdKey);\n if (!activeAccountId) {\n return null;\n }\n return this.getAccountInfoByFilter({localAccountId: activeAccountId})[0] || null;\n }\n\n /**\n * Sets the active account's localAccountId in cache\n * @param account \n */\n setActiveAccount(account: AccountInfo | null): void {\n const activeAccountIdKey = this.generateCacheKey(PersistentCacheKeys.ACTIVE_ACCOUNT);\n if (account) {\n this.logger.verbose(\"setActiveAccount: Active account set\");\n this.browserStorage.setItem(activeAccountIdKey, account.localAccountId);\n } else {\n this.logger.verbose(\"setActiveAccount: No account passed, active account not set\");\n this.browserStorage.removeItem(activeAccountIdKey);\n }\n }\n\n /**\n * Gets a list of accounts that match all of the filters provided\n * @param account \n */\n getAccountInfoByFilter(accountFilter: Partial>): AccountInfo[] {\n const allAccounts = this.getAllAccounts();\n return allAccounts.filter((accountObj) => {\n if (accountFilter.username && accountFilter.username.toLowerCase() !== accountObj.username.toLowerCase()) {\n return false;\n }\n\n if (accountFilter.homeAccountId && accountFilter.homeAccountId !== accountObj.homeAccountId) {\n return false;\n }\n\n if (accountFilter.localAccountId && accountFilter.localAccountId !== accountObj.localAccountId) {\n return false;\n }\n\n if (accountFilter.tenantId && accountFilter.tenantId !== accountObj.tenantId) {\n return false;\n }\n\n if (accountFilter.environment && accountFilter.environment !== accountObj.environment) {\n return false;\n }\n \n return true;\n });\n }\n\n /**\n * fetch throttling entity from the platform cache\n * @param throttlingCacheKey\n */\n getThrottlingCache(throttlingCacheKey: string): ThrottlingEntity | null {\n const value = this.getItem(throttlingCacheKey);\n if (!value) {\n this.logger.trace(\"BrowserCacheManager.getThrottlingCache: called, no cache hit\");\n return null;\n }\n\n const parsedThrottlingCache = this.validateAndParseJson(value);\n if (!parsedThrottlingCache || !ThrottlingEntity.isThrottlingEntity(throttlingCacheKey, parsedThrottlingCache)) {\n this.logger.trace(\"BrowserCacheManager.getThrottlingCache: called, no cache hit\");\n return null;\n }\n\n this.logger.trace(\"BrowserCacheManager.getThrottlingCache: cache hit\");\n return CacheManager.toObject(new ThrottlingEntity(), parsedThrottlingCache);\n }\n\n /**\n * set throttling entity to the platform cache\n * @param throttlingCacheKey\n * @param throttlingCache\n */\n setThrottlingCache(throttlingCacheKey: string, throttlingCache: ThrottlingEntity): void {\n this.logger.trace(\"BrowserCacheManager.setThrottlingCache called\");\n this.setItem(throttlingCacheKey, JSON.stringify(throttlingCache));\n }\n\n /**\n * Gets cache item with given key.\n * Will retrieve from cookies if storeAuthStateInCookie is set to true.\n * @param key\n */\n getTemporaryCache(cacheKey: string, generateKey?: boolean): string | null {\n const key = generateKey ? this.generateCacheKey(cacheKey) : cacheKey;\n if (this.cacheConfig.storeAuthStateInCookie) {\n const itemCookie = this.getItemCookie(key);\n if (itemCookie) {\n this.logger.trace(\"BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies\");\n return itemCookie;\n }\n }\n\n const value = this.temporaryCacheStorage.getItem(key);\n if (!value) {\n // If temp cache item not found in session/memory, check local storage for items set by old versions\n if (this.cacheConfig.cacheLocation === BrowserCacheLocation.LocalStorage) {\n const item = this.browserStorage.getItem(key);\n if (item) {\n this.logger.trace(\"BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage\");\n return item;\n }\n }\n this.logger.trace(\"BrowserCacheManager.getTemporaryCache: No cache item found in local storage\");\n return null;\n }\n this.logger.trace(\"BrowserCacheManager.getTemporaryCache: Temporary cache item returned\");\n return value;\n }\n\n /**\n * Sets the cache item with the key and value given.\n * Stores in cookie if storeAuthStateInCookie is set to true.\n * This can cause cookie overflow if used incorrectly.\n * @param key\n * @param value\n */\n setTemporaryCache(cacheKey: string, value: string, generateKey?: boolean): void {\n const key = generateKey ? this.generateCacheKey(cacheKey) : cacheKey;\n\n this.temporaryCacheStorage.setItem(key, value);\n if (this.cacheConfig.storeAuthStateInCookie) {\n this.logger.trace(\"BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie\");\n this.setItemCookie(key, value);\n }\n }\n\n /**\n * Removes the cache item with the given key.\n * Will also clear the cookie item if storeAuthStateInCookie is set to true.\n * @param key\n */\n removeItem(key: string): boolean {\n this.browserStorage.removeItem(key);\n this.temporaryCacheStorage.removeItem(key);\n if (this.cacheConfig.storeAuthStateInCookie) {\n this.logger.trace(\"BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie\");\n this.clearItemCookie(key);\n }\n return true;\n }\n\n /**\n * Checks whether key is in cache.\n * @param key\n */\n containsKey(key: string): boolean {\n return this.browserStorage.containsKey(key) || this.temporaryCacheStorage.containsKey(key);\n }\n\n /**\n * Gets all keys in window.\n */\n getKeys(): string[] {\n return [\n ...this.browserStorage.getKeys(),\n ...this.temporaryCacheStorage.getKeys()\n ];\n }\n\n /**\n * Clears all cache entries created by MSAL.\n */\n async clear(): Promise {\n // Removes all accounts and their credentials\n await this.removeAllAccounts();\n this.removeAppMetadata();\n\n // Removes all remaining MSAL cache items\n this.getKeys().forEach((cacheKey: string) => {\n // Check if key contains msal prefix; For now, we are clearing all the cache items created by MSAL.js\n if ((this.browserStorage.containsKey(cacheKey) || this.temporaryCacheStorage.containsKey(cacheKey)) && ((cacheKey.indexOf(Constants.CACHE_PREFIX) !== -1) || (cacheKey.indexOf(this.clientId) !== -1))) {\n this.removeItem(cacheKey);\n }\n });\n\n this.internalStorage.clear();\n }\n\n /**\n * Add value to cookies\n * @param cookieName\n * @param cookieValue\n * @param expires\n */\n setItemCookie(cookieName: string, cookieValue: string, expires?: number): void {\n let cookieStr = `${encodeURIComponent(cookieName)}=${encodeURIComponent(cookieValue)};path=/;`;\n if (expires) {\n const expireTime = this.getCookieExpirationTime(expires);\n cookieStr += `expires=${expireTime};`;\n }\n\n if (this.cacheConfig.secureCookies) {\n cookieStr += \"Secure;\";\n }\n \n document.cookie = cookieStr;\n }\n\n /**\n * Get one item by key from cookies\n * @param cookieName\n */\n getItemCookie(cookieName: string): string {\n const name = `${encodeURIComponent(cookieName)}=`;\n const cookieList = document.cookie.split(\";\");\n for (let i: number = 0; i < cookieList.length; i++) {\n let cookie = cookieList[i];\n while (cookie.charAt(0) === \" \") {\n cookie = cookie.substring(1);\n }\n if (cookie.indexOf(name) === 0) {\n return decodeURIComponent(cookie.substring(name.length, cookie.length));\n }\n }\n return \"\";\n }\n\n /**\n * Clear all msal-related cookies currently set in the browser. Should only be used to clear temporary cache items.\n */\n clearMsalCookies(): void {\n const cookiePrefix = `${Constants.CACHE_PREFIX}.${this.clientId}`;\n const cookieList = document.cookie.split(\";\");\n cookieList.forEach((cookie: string): void => {\n while (cookie.charAt(0) === \" \") {\n // eslint-disable-next-line no-param-reassign\n cookie = cookie.substring(1);\n }\n if (cookie.indexOf(cookiePrefix) === 0) {\n const cookieKey = cookie.split(\"=\")[0];\n this.clearItemCookie(cookieKey);\n }\n });\n }\n\n /**\n * Clear an item in the cookies by key\n * @param cookieName\n */\n clearItemCookie(cookieName: string): void {\n this.setItemCookie(cookieName, \"\", -1);\n }\n\n /**\n * Get cookie expiration time\n * @param cookieLifeDays\n */\n getCookieExpirationTime(cookieLifeDays: number): string {\n const today = new Date();\n const expr = new Date(today.getTime() + cookieLifeDays * this.COOKIE_LIFE_MULTIPLIER);\n return expr.toUTCString();\n }\n\n /**\n * Gets the cache object referenced by the browser\n */\n getCache(): object {\n return this.browserStorage;\n }\n\n /**\n * interface compat, we cannot overwrite browser cache; Functionality is supported by individual entities in browser\n */\n setCache(): void {\n // sets nothing\n }\n\n /**\n * Prepend msal. to each key; Skip for any JSON object as Key (defined schemas do not need the key appended: AccessToken Keys or the upcoming schema)\n * @param key\n * @param addInstanceId\n */\n generateCacheKey(key: string): string {\n const generatedKey = this.validateAndParseJson(key);\n if (!generatedKey) {\n if (StringUtils.startsWith(key, Constants.CACHE_PREFIX) || StringUtils.startsWith(key, PersistentCacheKeys.ADAL_ID_TOKEN)) {\n return key;\n }\n return `${Constants.CACHE_PREFIX}.${this.clientId}.${key}`;\n }\n\n return JSON.stringify(key);\n }\n\n /**\n * Create authorityKey to cache authority\n * @param state\n */\n generateAuthorityKey(stateString: string): string {\n const {\n libraryState: {\n id: stateId\n }\n } = ProtocolUtils.parseRequestState(this.cryptoImpl, stateString);\n\n return this.generateCacheKey(`${TemporaryCacheKeys.AUTHORITY}.${stateId}`);\n }\n\n /**\n * Create Nonce key to cache nonce\n * @param state\n */\n generateNonceKey(stateString: string): string {\n const {\n libraryState: {\n id: stateId\n }\n } = ProtocolUtils.parseRequestState(this.cryptoImpl, stateString);\n\n return this.generateCacheKey(`${TemporaryCacheKeys.NONCE_IDTOKEN}.${stateId}`);\n }\n\n /**\n * Creates full cache key for the request state\n * @param stateString State string for the request\n */\n generateStateKey(stateString: string): string {\n // Use the library state id to key temp storage for uniqueness for multiple concurrent requests\n const {\n libraryState: {\n id: stateId\n }\n } = ProtocolUtils.parseRequestState(this.cryptoImpl, stateString);\n return this.generateCacheKey(`${TemporaryCacheKeys.REQUEST_STATE}.${stateId}`);\n } \n\n /**\n * Gets the cached authority based on the cached state. Returns empty if no cached state found.\n */\n getCachedAuthority(cachedState: string): string | null {\n const stateCacheKey = this.generateStateKey(cachedState);\n const state = this.getTemporaryCache(stateCacheKey);\n if (!state) {\n return null;\n }\n\n const authorityCacheKey = this.generateAuthorityKey(state);\n return this.getTemporaryCache(authorityCacheKey);\n }\n\n /**\n * Updates account, authority, and state in cache\n * @param serverAuthenticationRequest\n * @param account\n */\n updateCacheEntries(state: string, nonce: string, authorityInstance: string, loginHint: string, account: AccountInfo|null): void {\n this.logger.trace(\"BrowserCacheManager.updateCacheEntries called\");\n // Cache the request state\n const stateCacheKey = this.generateStateKey(state);\n this.setTemporaryCache(stateCacheKey, state, false);\n\n // Cache the nonce\n const nonceCacheKey = this.generateNonceKey(state);\n this.setTemporaryCache(nonceCacheKey, nonce, false);\n\n // Cache authorityKey\n const authorityCacheKey = this.generateAuthorityKey(state);\n this.setTemporaryCache(authorityCacheKey, authorityInstance, false);\n\n if (account) {\n const ccsCredential: CcsCredential = {\n credential: account.homeAccountId,\n type: CcsCredentialType.HOME_ACCOUNT_ID\n };\n this.setTemporaryCache(TemporaryCacheKeys.CCS_CREDENTIAL, JSON.stringify(ccsCredential), true);\n } else if (!StringUtils.isEmpty(loginHint)) {\n const ccsCredential: CcsCredential = {\n credential: loginHint,\n type: CcsCredentialType.UPN\n };\n this.setTemporaryCache(TemporaryCacheKeys.CCS_CREDENTIAL, JSON.stringify(ccsCredential), true);\n }\n }\n\n /**\n * Reset all temporary cache items\n * @param state\n */\n resetRequestCache(state: string): void {\n this.logger.trace(\"BrowserCacheManager.resetRequestCache called\");\n // check state and remove associated cache items\n if (!StringUtils.isEmpty(state)) {\n this.getKeys().forEach(key => {\n if (key.indexOf(state) !== -1) {\n this.removeItem(key);\n }\n });\n }\n\n // delete generic interactive request parameters\n if (state) {\n this.removeItem(this.generateStateKey(state));\n this.removeItem(this.generateNonceKey(state));\n this.removeItem(this.generateAuthorityKey(state));\n }\n this.removeItem(this.generateCacheKey(TemporaryCacheKeys.REQUEST_PARAMS));\n this.removeItem(this.generateCacheKey(TemporaryCacheKeys.ORIGIN_URI));\n this.removeItem(this.generateCacheKey(TemporaryCacheKeys.URL_HASH));\n this.removeItem(this.generateCacheKey(TemporaryCacheKeys.CORRELATION_ID));\n this.removeItem(this.generateCacheKey(TemporaryCacheKeys.CCS_CREDENTIAL));\n this.setInteractionInProgress(false);\n }\n\n /**\n * Removes temporary cache for the provided state\n * @param stateString \n */\n cleanRequestByState(stateString: string): void {\n this.logger.trace(\"BrowserCacheManager.cleanRequestByState called\");\n // Interaction is completed - remove interaction status.\n if (stateString) {\n const stateKey = this.generateStateKey(stateString);\n const cachedState = this.temporaryCacheStorage.getItem(stateKey);\n this.logger.infoPii(`BrowserCacheManager.cleanRequestByState: Removing temporary cache items for state: ${cachedState}`);\n this.resetRequestCache(cachedState || \"\");\n }\n this.clearMsalCookies();\n }\n\n /**\n * Looks in temporary cache for any state values with the provided interactionType and removes all temporary cache items for that state\n * Used in scenarios where temp cache needs to be cleaned but state is not known, such as clicking browser back button.\n * @param interactionType \n */\n cleanRequestByInteractionType(interactionType: InteractionType): void {\n this.logger.trace(\"BrowserCacheManager.cleanRequestByInteractionType called\");\n // Loop through all keys to find state key\n this.getKeys().forEach((key) => {\n // If this key is not the state key, move on\n if (key.indexOf(TemporaryCacheKeys.REQUEST_STATE) === -1) {\n return;\n }\n \n // Retrieve state value, return if not a valid value\n const stateValue = this.temporaryCacheStorage.getItem(key);\n if (!stateValue) {\n return;\n }\n // Extract state and ensure it matches given InteractionType, then clean request cache\n const parsedState = BrowserProtocolUtils.extractBrowserRequestState(this.cryptoImpl, stateValue);\n if (parsedState && parsedState.interactionType === interactionType) {\n this.logger.infoPii(`BrowserCacheManager.cleanRequestByInteractionType: Removing temporary cache items for state: ${stateValue}`);\n this.resetRequestCache(stateValue);\n }\n });\n this.clearMsalCookies();\n this.setInteractionInProgress(false);\n }\n\n cacheCodeRequest(authCodeRequest: CommonAuthorizationCodeRequest, browserCrypto: ICrypto): void {\n this.logger.trace(\"BrowserCacheManager.cacheCodeRequest called\");\n\n const encodedValue = browserCrypto.base64Encode(JSON.stringify(authCodeRequest));\n this.setTemporaryCache(TemporaryCacheKeys.REQUEST_PARAMS, encodedValue, true);\n }\n\n /**\n * Gets the token exchange parameters from the cache. Throws an error if nothing is found.\n */\n getCachedRequest(state: string, browserCrypto: ICrypto): CommonAuthorizationCodeRequest {\n this.logger.trace(\"BrowserCacheManager.getCachedRequest called\");\n // Get token request from cache and parse as TokenExchangeParameters.\n const encodedTokenRequest = this.getTemporaryCache(TemporaryCacheKeys.REQUEST_PARAMS, true);\n if (!encodedTokenRequest) {\n throw BrowserAuthError.createNoTokenRequestCacheError();\n }\n\n const parsedRequest = this.validateAndParseJson(browserCrypto.base64Decode(encodedTokenRequest)) as CommonAuthorizationCodeRequest;\n if (!parsedRequest) {\n throw BrowserAuthError.createUnableToParseTokenRequestCacheError();\n }\n this.removeItem(this.generateCacheKey(TemporaryCacheKeys.REQUEST_PARAMS));\n\n // Get cached authority and use if no authority is cached with request.\n if (StringUtils.isEmpty(parsedRequest.authority)) {\n const authorityCacheKey: string = this.generateAuthorityKey(state);\n const cachedAuthority = this.getTemporaryCache(authorityCacheKey);\n if (!cachedAuthority) {\n throw BrowserAuthError.createNoCachedAuthorityError();\n }\n parsedRequest.authority = cachedAuthority;\n }\n\n return parsedRequest;\n }\n\n isInteractionInProgress(matchClientId?: boolean): boolean {\n const clientId = this.getInteractionInProgress();\n\n if (matchClientId) {\n return clientId === this.clientId;\n } else {\n return !!clientId;\n }\n }\n\n getInteractionInProgress(): string | null {\n const key = `${Constants.CACHE_PREFIX}.${TemporaryCacheKeys.INTERACTION_STATUS_KEY}`;\n return this.getTemporaryCache(key, false);\n }\n\n setInteractionInProgress(inProgress: boolean): void {\n const clientId = this.getInteractionInProgress();\n // Ensure we don't overwrite interaction in progress for a different clientId\n const key = `${Constants.CACHE_PREFIX}.${TemporaryCacheKeys.INTERACTION_STATUS_KEY}`;\n if (inProgress && !clientId) {\n // No interaction is in progress\n this.setTemporaryCache(key, this.clientId, false);\n } else if (!inProgress && clientId === this.clientId) {\n this.removeItem(key);\n }\n }\n\n /**\n * Returns username retrieved from ADAL or MSAL v1 idToken\n */\n getLegacyLoginHint(): string | null {\n // Only check for adal/msal token if no SSO params are being used\n const adalIdTokenString = this.getTemporaryCache(PersistentCacheKeys.ADAL_ID_TOKEN);\n if (adalIdTokenString) {\n this.browserStorage.removeItem(PersistentCacheKeys.ADAL_ID_TOKEN);\n this.logger.verbose(\"Cached ADAL id token retrieved.\");\n }\n\n // Check for cached MSAL v1 id token\n const msalIdTokenString = this.getTemporaryCache(PersistentCacheKeys.ID_TOKEN, true);\n if (msalIdTokenString) {\n this.removeItem(this.generateCacheKey(PersistentCacheKeys.ID_TOKEN));\n this.logger.verbose(\"Cached MSAL.js v1 id token retrieved\");\n }\n\n const cachedIdTokenString = msalIdTokenString || adalIdTokenString;\n if (cachedIdTokenString) {\n const cachedIdToken = new IdToken(cachedIdTokenString, this.cryptoImpl);\n if (cachedIdToken.claims && cachedIdToken.claims.preferred_username) {\n this.logger.verbose(\"No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 preferred_username as loginHint\");\n return cachedIdToken.claims.preferred_username;\n }\n else if (cachedIdToken.claims && cachedIdToken.claims.upn) {\n this.logger.verbose(\"No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 upn as loginHint\");\n return cachedIdToken.claims.upn;\n }\n else {\n this.logger.verbose(\"No SSO params used and ADAL/MSAL v1 token retrieved, however, no account hint claim found. Enable preferred_username or upn id token claim to get SSO.\");\n }\n }\n\n return null;\n }\n\n /**\n * Updates a credential's cache key if the current cache key is outdated\n */\n updateCredentialCacheKey(currentCacheKey: string, credential: ValidCredentialType): string {\n const updatedCacheKey = credential.generateCredentialKey();\n\n if (currentCacheKey !== updatedCacheKey) {\n const cacheItem = this.getItem(currentCacheKey);\n if (cacheItem) {\n this.removeItem(currentCacheKey);\n this.setItem(updatedCacheKey, cacheItem);\n this.logger.verbose(`Updated an outdated ${credential.credentialType} cache key`);\n return updatedCacheKey;\n } else {\n this.logger.error(`Attempted to update an outdated ${credential.credentialType} cache key but no item matching the outdated key was found in storage`);\n }\n }\n\n return currentCacheKey;\n }\n}\n\nexport const DEFAULT_BROWSER_CACHE_MANAGER = (clientId: string, logger: Logger): BrowserCacheManager => {\n const cacheOptions = {\n cacheLocation: BrowserCacheLocation.MemoryStorage,\n storeAuthStateInCookie: false,\n secureCookies: false\n };\n return new BrowserCacheManager(clientId, cacheOptions, DEFAULT_CRYPTO_IMPLEMENTATION, logger);\n};\n","/* eslint-disable header/header */\nexport const name = \"@azure/msal-common\";\nexport const version = \"6.0.0\";\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { INetworkModule } from \"../network/INetworkModule\";\nimport { DEFAULT_CRYPTO_IMPLEMENTATION, ICrypto } from \"../crypto/ICrypto\";\nimport { AuthError } from \"../error/AuthError\";\nimport { ILoggerCallback, LogLevel } from \"../logger/Logger\";\nimport { Constants } from \"../utils/Constants\";\nimport { version } from \"../packageMetadata\";\nimport { Authority } from \"../authority/Authority\";\nimport { CacheManager, DefaultStorageClass } from \"../cache/CacheManager\";\nimport { ServerTelemetryManager } from \"../telemetry/server/ServerTelemetryManager\";\nimport { ICachePlugin } from \"../cache/interface/ICachePlugin\";\nimport { ISerializableTokenCache } from \"../cache/interface/ISerializableTokenCache\";\n\n// Token renewal offset default in seconds\nconst DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;\n\n/**\n * Use the configuration object to configure MSAL Modules and initialize the base interfaces for MSAL.\n *\n * This object allows you to configure important elements of MSAL functionality:\n * - authOptions - Authentication for application\n * - cryptoInterface - Implementation of crypto functions\n * - libraryInfo - Library metadata\n * - loggerOptions - Logging for application\n * - networkInterface - Network implementation\n * - storageInterface - Storage implementation\n * - systemOptions - Additional library options\n * - clientCredentials - Credentials options for confidential clients\n */\nexport type ClientConfiguration = {\n authOptions: AuthOptions,\n systemOptions?: SystemOptions,\n loggerOptions?: LoggerOptions,\n storageInterface?: CacheManager,\n networkInterface?: INetworkModule,\n cryptoInterface?: ICrypto,\n clientCredentials?: ClientCredentials,\n libraryInfo?: LibraryInfo\n serverTelemetryManager?: ServerTelemetryManager | null,\n persistencePlugin?: ICachePlugin | null,\n serializableCache?: ISerializableTokenCache | null\n};\n\nexport type CommonClientConfiguration = {\n authOptions: Required,\n systemOptions: Required,\n loggerOptions : Required,\n storageInterface: CacheManager,\n networkInterface : INetworkModule,\n cryptoInterface : Required,\n libraryInfo : LibraryInfo,\n serverTelemetryManager: ServerTelemetryManager | null,\n clientCredentials: ClientCredentials,\n persistencePlugin: ICachePlugin | null,\n serializableCache: ISerializableTokenCache | null\n};\n\n/**\n * Use this to configure the auth options in the ClientConfiguration object\n *\n * - clientId - Client ID of your app registered with our Application registration portal : https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview in Microsoft Identity Platform\n * - authority - You can configure a specific authority, defaults to \" \" or \"https://login.microsoftonline.com/common\"\n * - knownAuthorities - An array of URIs that are known to be valid. Used in B2C scenarios.\n * - cloudDiscoveryMetadata - A string containing the cloud discovery response. Used in AAD scenarios.\n * - clientCapabilities - Array of capabilities which will be added to the claims.access_token.xms_cc request property on every network request.\n * - protocolMode - Enum that represents the protocol that msal follows. Used for configuring proper endpoints.\n */\nexport type AuthOptions = {\n clientId: string;\n authority: Authority;\n clientCapabilities?: Array;\n};\n\n/**\n * Use this to configure token renewal info in the Configuration object\n *\n * - tokenRenewalOffsetSeconds - Sets the window of offset needed to renew the token before expiry\n */\nexport type SystemOptions = {\n tokenRenewalOffsetSeconds?: number;\n preventCorsPreflight?: boolean;\n};\n\n/**\n * Use this to configure the logging that MSAL does, by configuring logger options in the Configuration object\n *\n * - loggerCallback - Callback for logger\n * - piiLoggingEnabled - Sets whether pii logging is enabled\n * - logLevel - Sets the level at which logging happens\n * - correlationId - Sets the correlationId printed by the logger\n */\nexport type LoggerOptions = {\n loggerCallback?: ILoggerCallback,\n piiLoggingEnabled?: boolean,\n logLevel?: LogLevel,\n correlationId?: string\n};\n\n/**\n * Library-specific options\n */\nexport type LibraryInfo = {\n sku: string,\n version: string,\n cpu: string,\n os: string\n};\n\n/**\n * Credentials for confidential clients\n */\nexport type ClientCredentials = {\n clientSecret?: string,\n clientAssertion? : {\n assertion: string,\n assertionType: string\n };\n};\n\nexport const DEFAULT_SYSTEM_OPTIONS: Required = {\n tokenRenewalOffsetSeconds: DEFAULT_TOKEN_RENEWAL_OFFSET_SEC,\n preventCorsPreflight: false\n};\n\nconst DEFAULT_LOGGER_IMPLEMENTATION: Required = {\n loggerCallback: () => {\n // allow users to not set loggerCallback\n },\n piiLoggingEnabled: false,\n logLevel: LogLevel.Info,\n correlationId: \"\"\n};\n\nconst DEFAULT_NETWORK_IMPLEMENTATION: INetworkModule = {\n async sendGetRequestAsync(): Promise {\n const notImplErr = \"Network interface - sendGetRequestAsync() has not been implemented\";\n throw AuthError.createUnexpectedError(notImplErr);\n },\n async sendPostRequestAsync(): Promise {\n const notImplErr = \"Network interface - sendPostRequestAsync() has not been implemented\";\n throw AuthError.createUnexpectedError(notImplErr);\n }\n};\n\nconst DEFAULT_LIBRARY_INFO: LibraryInfo = {\n sku: Constants.SKU,\n version: version,\n cpu: \"\",\n os: \"\"\n};\n\nconst DEFAULT_CLIENT_CREDENTIALS: ClientCredentials = {\n clientSecret: \"\",\n clientAssertion: undefined\n};\n\n/**\n * Function that sets the default options when not explicitly configured from app developer\n *\n * @param Configuration\n *\n * @returns Configuration\n */\nexport function buildClientConfiguration(\n {\n authOptions: userAuthOptions,\n systemOptions: userSystemOptions,\n loggerOptions: userLoggerOption,\n storageInterface: storageImplementation,\n networkInterface: networkImplementation,\n cryptoInterface: cryptoImplementation,\n clientCredentials: clientCredentials,\n libraryInfo: libraryInfo,\n serverTelemetryManager: serverTelemetryManager,\n persistencePlugin: persistencePlugin,\n serializableCache: serializableCache\n }: ClientConfiguration): CommonClientConfiguration {\n \n const loggerOptions = { ...DEFAULT_LOGGER_IMPLEMENTATION, ...userLoggerOption };\n \n return {\n authOptions: buildAuthOptions(userAuthOptions),\n systemOptions: { ...DEFAULT_SYSTEM_OPTIONS, ...userSystemOptions },\n loggerOptions: loggerOptions,\n storageInterface: storageImplementation || new DefaultStorageClass(userAuthOptions.clientId, DEFAULT_CRYPTO_IMPLEMENTATION),\n networkInterface: networkImplementation || DEFAULT_NETWORK_IMPLEMENTATION,\n cryptoInterface: cryptoImplementation || DEFAULT_CRYPTO_IMPLEMENTATION,\n clientCredentials: clientCredentials || DEFAULT_CLIENT_CREDENTIALS,\n libraryInfo: { ...DEFAULT_LIBRARY_INFO, ...libraryInfo },\n serverTelemetryManager: serverTelemetryManager || null,\n persistencePlugin: persistencePlugin || null,\n serializableCache: serializableCache || null\n };\n}\n\n/**\n * Construct authoptions from the client and platform passed values\n * @param authOptions\n */\nfunction buildAuthOptions(authOptions: AuthOptions): Required {\n return {\n clientCapabilities: [],\n ...authOptions\n };\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AuthError } from \"../error/AuthError\";\nimport { NetworkResponse } from \"./NetworkManager\";\n\n/**\n * Options allowed by network request APIs.\n */\nexport type NetworkRequestOptions = {\n headers?: Record,\n body?: string;\n};\n\n/**\n * Client network interface to send backend requests.\n * @interface\n */\nexport interface INetworkModule {\n\n /**\n * Interface function for async network \"GET\" requests. Based on the Fetch standard: https://fetch.spec.whatwg.org/\n * @param url\n * @param requestParams\n * @param enableCaching\n */\n sendGetRequestAsync(url: string, options?: NetworkRequestOptions, cancellationToken?: number): Promise>;\n\n /**\n * Interface function for async network \"POST\" requests. Based on the Fetch standard: https://fetch.spec.whatwg.org/\n * @param url\n * @param requestParams\n * @param enableCaching\n */\n sendPostRequestAsync(url: string, options?: NetworkRequestOptions): Promise>;\n}\n\nexport const StubbedNetworkModule: INetworkModule = {\n sendGetRequestAsync: () => {\n const notImplErr = \"Network interface - sendGetRequestAsync() has not been implemented for the Network interface.\";\n return Promise.reject(AuthError.createUnexpectedError(notImplErr));\n },\n sendPostRequestAsync: () => {\n const notImplErr = \"Network interface - sendPostRequestAsync() has not been implemented for the Network interface.\";\n return Promise.reject(AuthError.createUnexpectedError(notImplErr));\n }\n};\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { INetworkModule, NetworkRequestOptions, NetworkResponse } from \"@azure/msal-common\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\nimport { HTTP_REQUEST_TYPE } from \"../utils/BrowserConstants\";\n\n/**\n * This class implements the Fetch API for GET and POST requests. See more here: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API\n */\nexport class FetchClient implements INetworkModule {\n\n /**\n * Fetch Client for REST endpoints - Get request\n * @param url \n * @param headers \n * @param body \n */\n async sendGetRequestAsync(url: string, options?: NetworkRequestOptions): Promise> {\n let response;\n try {\n response = await fetch(url, {\n method: HTTP_REQUEST_TYPE.GET,\n headers: this.getFetchHeaders(options)\n });\n } catch (e) {\n if (window.navigator.onLine) {\n throw BrowserAuthError.createGetRequestFailedError(e, url);\n } else {\n throw BrowserAuthError.createNoNetworkConnectivityError();\n }\n }\n\n try {\n return {\n headers: this.getHeaderDict(response.headers),\n body: await response.json() as T,\n status: response.status\n };\n } catch (e) {\n throw BrowserAuthError.createFailedToParseNetworkResponseError(url);\n }\n }\n\n /**\n * Fetch Client for REST endpoints - Post request\n * @param url \n * @param headers \n * @param body \n */\n async sendPostRequestAsync(url: string, options?: NetworkRequestOptions): Promise> {\n const reqBody = (options && options.body) || \"\";\n\n let response;\n try {\n response = await fetch(url, {\n method: HTTP_REQUEST_TYPE.POST,\n headers: this.getFetchHeaders(options),\n body: reqBody\n });\n } catch (e) {\n if (window.navigator.onLine) {\n throw BrowserAuthError.createPostRequestFailedError(e, url);\n } else {\n throw BrowserAuthError.createNoNetworkConnectivityError();\n }\n }\n\n try {\n return {\n headers: this.getHeaderDict(response.headers),\n body: await response.json() as T,\n status: response.status\n };\n } catch (e) {\n throw BrowserAuthError.createFailedToParseNetworkResponseError(url);\n }\n }\n\n /**\n * Get Fetch API Headers object from string map\n * @param inputHeaders \n */\n private getFetchHeaders(options?: NetworkRequestOptions): Headers {\n const headers = new Headers();\n if (!(options && options.headers)) {\n return headers;\n }\n const optionsHeaders = options.headers;\n Object.keys(optionsHeaders).forEach((key) => {\n headers.append(key, optionsHeaders[key]);\n });\n return headers;\n }\n\n private getHeaderDict(headers: Headers): Record {\n const headerDict: Record = {};\n headers.forEach((value: string, key: string) => {\n headerDict[key] = value;\n });\n return headerDict;\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { INetworkModule, NetworkRequestOptions, NetworkResponse } from \"@azure/msal-common\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\nimport { HTTP_REQUEST_TYPE } from \"../utils/BrowserConstants\";\n\n/**\n * This client implements the XMLHttpRequest class to send GET and POST requests.\n */\nexport class XhrClient implements INetworkModule {\n\n /**\n * XhrClient for REST endpoints - Get request\n * @param url \n * @param headers \n * @param body \n */\n async sendGetRequestAsync(url: string, options?: NetworkRequestOptions): Promise> {\n return this.sendRequestAsync(url, HTTP_REQUEST_TYPE.GET, options);\n }\n\n /**\n * XhrClient for REST endpoints - Post request\n * @param url \n * @param headers \n * @param body \n */\n async sendPostRequestAsync(url: string, options?: NetworkRequestOptions): Promise> {\n return this.sendRequestAsync(url, HTTP_REQUEST_TYPE.POST, options);\n }\n\n /**\n * Helper for XhrClient requests.\n * @param url \n * @param method \n * @param options \n */\n private sendRequestAsync(url: string, method: HTTP_REQUEST_TYPE, options?: NetworkRequestOptions): Promise> {\n return new Promise>((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n xhr.open(method, url, /* async: */ true);\n this.setXhrHeaders(xhr, options);\n xhr.onload = (): void => {\n if (xhr.status < 200 || xhr.status >= 300) {\n if (method === HTTP_REQUEST_TYPE.POST) {\n reject(BrowserAuthError.createPostRequestFailedError(`Failed with status ${xhr.status}`, url));\n } else {\n reject(BrowserAuthError.createGetRequestFailedError(`Failed with status ${xhr.status}`, url));\n }\n }\n try {\n const jsonResponse = JSON.parse(xhr.responseText) as T;\n const networkResponse: NetworkResponse = {\n headers: this.getHeaderDict(xhr),\n body: jsonResponse,\n status: xhr.status\n };\n resolve(networkResponse);\n } catch (e) {\n reject(BrowserAuthError.createFailedToParseNetworkResponseError(url));\n }\n };\n\n xhr.onerror = (): void => {\n if (window.navigator.onLine) {\n if (method === HTTP_REQUEST_TYPE.POST) {\n reject(BrowserAuthError.createPostRequestFailedError(`Failed with status ${xhr.status}`, url));\n } else {\n reject(BrowserAuthError.createGetRequestFailedError(`Failed with status ${xhr.status}`, url));\n }\n } else {\n reject(BrowserAuthError.createNoNetworkConnectivityError());\n }\n };\n\n if (method === HTTP_REQUEST_TYPE.POST && options && options.body) {\n xhr.send(options.body);\n } else if (method === HTTP_REQUEST_TYPE.GET) {\n xhr.send();\n } else {\n throw BrowserAuthError.createHttpMethodNotImplementedError(method);\n }\n });\n }\n\n /**\n * Helper to set XHR headers for request.\n * @param xhr \n * @param options \n */\n private setXhrHeaders(xhr: XMLHttpRequest, options?: NetworkRequestOptions): void {\n if (options && options.headers) {\n const headers = options.headers;\n Object.keys(headers).forEach((key: string) => {\n xhr.setRequestHeader(key, headers[key]);\n });\n }\n }\n\n /**\n * Gets a string map of the headers received in the response.\n * \n * Algorithm comes from https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/getAllResponseHeaders\n * @param xhr \n */\n private getHeaderDict(xhr: XMLHttpRequest): Record {\n const headerString = xhr.getAllResponseHeaders();\n const headerArr = headerString.trim().split(/[\\r\\n]+/);\n const headerDict: Record = {};\n headerArr.forEach((value: string) => {\n const parts = value.split(\": \");\n const headerName = parts.shift();\n const headerVal = parts.join(\": \");\n if (headerName && headerVal) {\n headerDict[headerName] = headerVal;\n }\n });\n\n return headerDict;\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { Constants, INetworkModule, UrlString } from \"@azure/msal-common\";\nimport { FetchClient } from \"../network/FetchClient\";\nimport { XhrClient } from \"../network/XhrClient\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\nimport { InteractionType, BrowserConstants } from \"./BrowserConstants\";\n\n/**\n * Utility class for browser specific functions\n */\nexport class BrowserUtils {\n\n // #region Window Navigation and URL management\n\n /**\n * Clears hash from window url.\n */\n static clearHash(contentWindow: Window): void {\n // Office.js sets history.replaceState to null\n contentWindow.location.hash = Constants.EMPTY_STRING;\n if (typeof contentWindow.history.replaceState === \"function\") {\n // Full removes \"#\" from url\n contentWindow.history.replaceState(null, Constants.EMPTY_STRING, `${contentWindow.location.origin}${contentWindow.location.pathname}${contentWindow.location.search}`);\n }\n }\n\n /**\n * Replaces current hash with hash from provided url\n */\n static replaceHash(url: string): void {\n const urlParts = url.split(\"#\");\n urlParts.shift(); // Remove part before the hash\n window.location.hash = urlParts.length > 0 ? urlParts.join(\"#\") : \"\";\n }\n\n /**\n * Returns boolean of whether the current window is in an iframe or not.\n */\n static isInIframe(): boolean {\n return window.parent !== window;\n }\n\n /**\n * Returns boolean of whether or not the current window is a popup opened by msal\n */\n static isInPopup(): boolean {\n return typeof window !== \"undefined\" && !!window.opener && \n window.opener !== window && \n typeof window.name === \"string\" && \n window.name.indexOf(`${BrowserConstants.POPUP_NAME_PREFIX}.`) === 0;\n }\n\n // #endregion\n\n /**\n * Returns current window URL as redirect uri\n */\n static getCurrentUri(): string {\n return window.location.href.split(\"?\")[0].split(\"#\")[0];\n }\n\n /**\n * Gets the homepage url for the current window location.\n */\n static getHomepage(): string {\n const currentUrl = new UrlString(window.location.href);\n const urlComponents = currentUrl.getUrlComponents();\n return `${urlComponents.Protocol}//${urlComponents.HostNameAndPort}/`;\n }\n\n /**\n * Returns best compatible network client object. \n */\n static getBrowserNetworkClient(): INetworkModule {\n if (window.fetch && window.Headers) {\n return new FetchClient();\n } else {\n return new XhrClient();\n }\n }\n\n /**\n * Throws error if we have completed an auth and are \n * attempting another auth request inside an iframe.\n */\n static blockReloadInHiddenIframes(): void {\n const isResponseHash = UrlString.hashContainsKnownProperties(window.location.hash);\n // return an error if called from the hidden iframe created by the msal js silent calls\n if (isResponseHash && BrowserUtils.isInIframe()) {\n throw BrowserAuthError.createBlockReloadInHiddenIframeError();\n }\n }\n\n /**\n * Block redirect operations in iframes unless explicitly allowed\n * @param interactionType Interaction type for the request\n * @param allowRedirectInIframe Config value to allow redirects when app is inside an iframe\n */\n static blockRedirectInIframe(interactionType: InteractionType, allowRedirectInIframe: boolean): void {\n const isIframedApp = BrowserUtils.isInIframe();\n if (interactionType === InteractionType.Redirect && isIframedApp && !allowRedirectInIframe) {\n // If we are not in top frame, we shouldn't redirect. This is also handled by the service.\n throw BrowserAuthError.createRedirectInIframeError(isIframedApp);\n }\n }\n\n /**\n * Block redirectUri loaded in popup from calling AcquireToken APIs\n */\n static blockAcquireTokenInPopups(): void {\n // Popups opened by msal popup APIs are given a name that starts with \"msal.\"\n if (BrowserUtils.isInPopup()) {\n throw BrowserAuthError.createBlockAcquireTokenInPopupsError();\n }\n }\n\n /**\n * Throws error if token requests are made in non-browser environment\n * @param isBrowserEnvironment Flag indicating if environment is a browser.\n */\n static blockNonBrowserEnvironment(isBrowserEnvironment: boolean): void {\n if (!isBrowserEnvironment) {\n throw BrowserAuthError.createNonBrowserEnvironmentError();\n }\n }\n\n /**\n * Returns boolean of whether current browser is an Internet Explorer or Edge browser.\n */\n static detectIEOrEdge(): boolean {\n const ua = window.navigator.userAgent;\n const msie = ua.indexOf(\"MSIE \");\n const msie11 = ua.indexOf(\"Trident/\");\n const msedge = ua.indexOf(\"Edge/\");\n const isIE = msie > 0 || msie11 > 0;\n const isEdge = msedge > 0;\n return isIE || isEdge;\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { INavigationClient } from \"./INavigationClient\";\nimport { NavigationOptions } from \"./NavigationOptions\";\n\nexport class NavigationClient implements INavigationClient {\n /**\n * Navigates to other pages within the same web application\n * @param url \n * @param options \n */\n navigateInternal(url: string, options: NavigationOptions): Promise{\n return NavigationClient.defaultNavigateWindow(url, options);\n }\n\n /**\n * Navigates to other pages outside the web application i.e. the Identity Provider\n * @param url \n * @param options \n */\n navigateExternal(url: string, options: NavigationOptions): Promise {\n return NavigationClient.defaultNavigateWindow(url, options);\n }\n\n /**\n * Default navigation implementation invoked by the internal and external functions\n * @param url \n * @param options \n */\n private static defaultNavigateWindow(url: string, options: NavigationOptions): Promise {\n if (options.noHistory) {\n window.location.replace(url);\n } else {\n window.location.assign(url);\n }\n\n return new Promise((resolve) => {\n setTimeout(() => {\n resolve(true);\n }, options.timeout);\n });\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { SystemOptions, LoggerOptions, INetworkModule, DEFAULT_SYSTEM_OPTIONS, Constants, ProtocolMode, LogLevel, StubbedNetworkModule } from \"@azure/msal-common\";\nimport { BrowserUtils } from \"../utils/BrowserUtils\";\nimport { BrowserCacheLocation } from \"../utils/BrowserConstants\";\nimport { INavigationClient } from \"../navigation/INavigationClient\";\nimport { NavigationClient } from \"../navigation/NavigationClient\";\n\n// Default timeout for popup windows and iframes in milliseconds\nexport const DEFAULT_POPUP_TIMEOUT_MS = 60000;\nexport const DEFAULT_IFRAME_TIMEOUT_MS = 6000;\nexport const DEFAULT_REDIRECT_TIMEOUT_MS = 30000;\n\n/**\n * Use this to configure the auth options in the Configuration object\n *\n * - clientId - Client ID of your app registered with our Application registration portal : https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview in Microsoft Identity Platform\n * - authority - You can configure a specific authority, defaults to \" \" or \"https://login.microsoftonline.com/common\"\n * - knownAuthorities - An array of URIs that are known to be valid. Used in B2C scenarios.\n * - cloudDiscoveryMetadata - A string containing the cloud discovery response. Used in AAD scenarios.\n * - redirectUri - The redirect URI where authentication responses can be received by your application. It must exactly match one of the redirect URIs registered in the Azure portal.\n * - postLogoutRedirectUri - The redirect URI where the window navigates after a successful logout.\n * - navigateToLoginRequestUrl - Boolean indicating whether to navigate to the original request URL after the auth server navigates to the redirect URL.\n * - clientCapabilities - Array of capabilities which will be added to the claims.access_token.xms_cc request property on every network request.\n * - protocolMode - Enum that represents the protocol that msal follows. Used for configuring proper endpoints.\n */\nexport type BrowserAuthOptions = {\n clientId: string;\n authority?: string;\n knownAuthorities?: Array;\n cloudDiscoveryMetadata?: string;\n authorityMetadata?: string;\n redirectUri?: string;\n postLogoutRedirectUri?: string | null;\n navigateToLoginRequestUrl?: boolean;\n clientCapabilities?: Array;\n protocolMode?: ProtocolMode;\n};\n\n/**\n * Use this to configure the below cache configuration options:\n *\n * - cacheLocation - Used to specify the cacheLocation user wants to set. Valid values are \"localStorage\" and \"sessionStorage\"\n * - storeAuthStateInCookie - If set, MSAL stores the auth request state required for validation of the auth flows in the browser cookies. By default this flag is set to false.\n * - secureCookies - If set, MSAL sets the \"Secure\" flag on cookies so they can only be sent over HTTPS. By default this flag is set to false.\n */\nexport type CacheOptions = {\n cacheLocation?: BrowserCacheLocation | string;\n storeAuthStateInCookie?: boolean;\n secureCookies?: boolean;\n};\n\n/**\n * Library Specific Options\n *\n * - tokenRenewalOffsetSeconds - Sets the window of offset needed to renew the token before expiry\n * - loggerOptions - Used to initialize the Logger object (See ClientConfiguration.ts)\n * - networkClient - Network interface implementation\n * - windowHashTimeout - Sets the timeout for waiting for a response hash in a popup. Will take precedence over loadFrameTimeout if both are set.\n * - iframeHashTimeout - Sets the timeout for waiting for a response hash in an iframe. Will take precedence over loadFrameTimeout if both are set.\n * - loadFrameTimeout - Sets the timeout for waiting for a response hash in an iframe or popup\n * - navigateFrameWait - Maximum time the library should wait for a frame to load\n * - redirectNavigationTimeout - Time to wait for redirection to occur before resolving promise\n * - asyncPopups - Sets whether popups are opened asynchronously. By default, this flag is set to false. When set to false, blank popups are opened before anything else happens. When set to true, popups are opened when making the network request.\n * - allowRedirectInIframe - Flag to enable redirect opertaions when the app is rendered in an iframe (to support scenarios such as embedded B2C login).\n */\nexport type BrowserSystemOptions = SystemOptions & {\n loggerOptions?: LoggerOptions;\n networkClient?: INetworkModule;\n navigationClient?: INavigationClient;\n windowHashTimeout?: number;\n iframeHashTimeout?: number;\n loadFrameTimeout?: number;\n navigateFrameWait?: number;\n redirectNavigationTimeout?: number;\n asyncPopups?: boolean;\n allowRedirectInIframe?: boolean;\n};\n\n/**\n * Use the configuration object to configure MSAL and initialize the UserAgentApplication.\n *\n * This object allows you to configure important elements of MSAL functionality:\n * - auth: this is where you configure auth elements like clientID, authority used for authenticating against the Microsoft Identity Platform\n * - cache: this is where you configure cache location and whether to store cache in cookies\n * - system: this is where you can configure the network client, logger, token renewal offset\n */\nexport type Configuration = {\n auth: BrowserAuthOptions,\n cache?: CacheOptions,\n system?: BrowserSystemOptions\n};\n\nexport type BrowserConfiguration = {\n auth: Required,\n cache: Required,\n system: Required\n};\n\n/**\n * MSAL function that sets the default options when not explicitly configured from app developer\n *\n * @param auth\n * @param cache\n * @param system\n *\n * @returns Configuration object\n */\nexport function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system: userInputSystem }: Configuration, isBrowserEnvironment: boolean): BrowserConfiguration {\n\n // Default auth options for browser\n const DEFAULT_AUTH_OPTIONS: Required = {\n clientId: \"\",\n authority: `${Constants.DEFAULT_AUTHORITY}`,\n knownAuthorities: [],\n cloudDiscoveryMetadata: \"\",\n authorityMetadata: \"\",\n redirectUri: \"\",\n postLogoutRedirectUri: \"\",\n navigateToLoginRequestUrl: true,\n clientCapabilities: [],\n protocolMode: ProtocolMode.AAD\n };\n\n // Default cache options for browser\n const DEFAULT_CACHE_OPTIONS: Required = {\n cacheLocation: BrowserCacheLocation.SessionStorage,\n storeAuthStateInCookie: false,\n secureCookies: false\n };\n\n // Default logger options for browser\n const DEFAULT_LOGGER_OPTIONS: LoggerOptions = {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n loggerCallback: (): void => {},\n logLevel: LogLevel.Info,\n piiLoggingEnabled: false\n };\n\n // Default system options for browser\n const DEFAULT_BROWSER_SYSTEM_OPTIONS: Required = {\n ...DEFAULT_SYSTEM_OPTIONS,\n loggerOptions: DEFAULT_LOGGER_OPTIONS,\n networkClient: isBrowserEnvironment ? BrowserUtils.getBrowserNetworkClient() : StubbedNetworkModule,\n navigationClient: new NavigationClient(),\n loadFrameTimeout: 0,\n // If loadFrameTimeout is provided, use that as default.\n windowHashTimeout: (userInputSystem && userInputSystem.loadFrameTimeout) || DEFAULT_POPUP_TIMEOUT_MS,\n iframeHashTimeout: (userInputSystem && userInputSystem.loadFrameTimeout) || DEFAULT_IFRAME_TIMEOUT_MS,\n navigateFrameWait: isBrowserEnvironment && BrowserUtils.detectIEOrEdge() ? 500 : 0,\n redirectNavigationTimeout: DEFAULT_REDIRECT_TIMEOUT_MS,\n asyncPopups: false,\n allowRedirectInIframe: false\n };\n\n const overlayedConfig: BrowserConfiguration = {\n auth: { ...DEFAULT_AUTH_OPTIONS, ...userInputAuth },\n cache: { ...DEFAULT_CACHE_OPTIONS, ...userInputCache },\n system: { ...DEFAULT_BROWSER_SYSTEM_OPTIONS, ...userInputSystem }\n };\n return overlayedConfig;\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport enum EventType {\n ACCOUNT_ADDED = \"msal:accountAdded\",\n ACCOUNT_REMOVED = \"msal:accountRemoved\",\n LOGIN_START = \"msal:loginStart\",\n LOGIN_SUCCESS = \"msal:loginSuccess\",\n LOGIN_FAILURE = \"msal:loginFailure\",\n ACQUIRE_TOKEN_START = \"msal:acquireTokenStart\",\n ACQUIRE_TOKEN_SUCCESS = \"msal:acquireTokenSuccess\",\n ACQUIRE_TOKEN_FAILURE = \"msal:acquireTokenFailure\",\n ACQUIRE_TOKEN_NETWORK_START = \"msal:acquireTokenFromNetworkStart\",\n SSO_SILENT_START = \"msal:ssoSilentStart\",\n SSO_SILENT_SUCCESS = \"msal:ssoSilentSuccess\",\n SSO_SILENT_FAILURE = \"msal:ssoSilentFailure\",\n ACQUIRE_TOKEN_BY_CODE_START = \"msal:acquireTokenByCodeStart\",\n ACQUIRE_TOKEN_BY_CODE_SUCCESS = \"msal:acquireTokenByCodeSuccess\",\n ACQUIRE_TOKEN_BY_CODE_FAILURE = \"msal:acquireTokenByCodeFailure\",\n HANDLE_REDIRECT_START = \"msal:handleRedirectStart\",\n HANDLE_REDIRECT_END = \"msal:handleRedirectEnd\",\n POPUP_OPENED = \"msal:popupOpened\",\n LOGOUT_START = \"msal:logoutStart\",\n LOGOUT_SUCCESS = \"msal:logoutSuccess\",\n LOGOUT_FAILURE = \"msal:logoutFailure\",\n LOGOUT_END = \"msal:logoutEnd\"\n}\n","/* eslint-disable header/header */\nexport const name = \"@azure/msal-browser\";\nexport const version = \"2.21.0\";\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ICrypto, SignedHttpRequestParameters } from \"./ICrypto\";\nimport { AuthToken } from \"../account/AuthToken\";\nimport { TokenClaims } from \"../account/TokenClaims\";\nimport { TimeUtils } from \"../utils/TimeUtils\";\nimport { UrlString } from \"../url/UrlString\";\nimport { ClientAuthError } from \"../error/ClientAuthError\";\n\n/**\n * See eSTS docs for more info.\n * - A kid element, with the value containing an RFC 7638-compliant JWK thumbprint that is base64 encoded.\n * - xms_ksl element, representing the storage location of the key's secret component on the client device. One of two values:\n * - sw: software storage\n * - uhw: hardware storage\n */\ntype ReqCnf = {\n kid: string;\n xms_ksl: KeyLocation;\n};\n\nenum KeyLocation {\n SW = \"sw\",\n UHW = \"uhw\"\n}\n\nexport class PopTokenGenerator {\n\n private cryptoUtils: ICrypto;\n\n constructor(cryptoUtils: ICrypto) {\n this.cryptoUtils = cryptoUtils;\n }\n\n async generateCnf(request: SignedHttpRequestParameters): Promise {\n const reqCnf = await this.generateKid(request);\n return this.cryptoUtils.base64Encode(JSON.stringify(reqCnf));\n }\n\n async generateKid(request: SignedHttpRequestParameters): Promise {\n const kidThumbprint = await this.cryptoUtils.getPublicKeyThumbprint(request);\n\n return {\n kid: kidThumbprint,\n xms_ksl: KeyLocation.SW\n };\n }\n\n async signPopToken(accessToken: string, request: SignedHttpRequestParameters): Promise {\n const tokenClaims: TokenClaims | null = AuthToken.extractTokenClaims(accessToken, this.cryptoUtils);\n if (!tokenClaims?.cnf?.kid) {\n throw ClientAuthError.createTokenClaimsRequiredError();\n }\n \n return this.signPayload(accessToken, tokenClaims.cnf.kid, request);\n }\n\n async signPayload(payload: string, kid: string, request: SignedHttpRequestParameters, claims?: object): Promise {\n // Deconstruct request to extract SHR parameters\n const { resourceRequestMethod, resourceRequestUri, shrClaims, shrNonce } = request;\n\n const resourceUrlString = (resourceRequestUri) ? new UrlString(resourceRequestUri) : undefined;\n const resourceUrlComponents = resourceUrlString?.getUrlComponents();\n\n return await this.cryptoUtils.signJwt({\n at: payload,\n ts: TimeUtils.nowSeconds(),\n m: resourceRequestMethod?.toUpperCase(),\n u: resourceUrlComponents?.HostNameAndPort,\n nonce: shrNonce || this.cryptoUtils.createNewGuid(),\n p: resourceUrlComponents?.AbsolutePath,\n q: (resourceUrlComponents?.QueryString) ? [[], resourceUrlComponents.QueryString] : undefined,\n client_claims: shrClaims || undefined,\n ...claims\n }, kid);\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ICrypto, Logger, AccountEntity, CacheManager } from \"@azure/msal-common\";\nimport { InteractionType } from \"../utils/BrowserConstants\";\nimport { EventCallbackFunction, EventError, EventMessage, EventPayload } from \"./EventMessage\";\nimport { EventType } from \"./EventType\";\n\nexport class EventHandler {\n // Callback for subscribing to events\n private eventCallbacks: Map;\n private logger: Logger;\n private browserCrypto: ICrypto;\n private listeningToStorageEvents: boolean;\n\n constructor(logger: Logger, browserCrypto: ICrypto) {\n this.eventCallbacks = new Map();\n this.logger = logger;\n this.browserCrypto = browserCrypto;\n this.listeningToStorageEvents = false;\n this.handleAccountCacheChange = this.handleAccountCacheChange.bind(this);\n }\n\n /**\n * Adds event callbacks to array\n * @param callback\n */\n addEventCallback(callback: EventCallbackFunction): string | null {\n if (typeof window !== \"undefined\") {\n const callbackId = this.browserCrypto.createNewGuid();\n this.eventCallbacks.set(callbackId, callback);\n this.logger.verbose(`Event callback registered with id: ${callbackId}`);\n \n return callbackId;\n }\n \n return null;\n }\n\n /**\n * Removes callback with provided id from callback array\n * @param callbackId\n */\n removeEventCallback(callbackId: string): void {\n this.eventCallbacks.delete(callbackId);\n this.logger.verbose(`Event callback ${callbackId} removed.`);\n }\n\n /**\n * Adds event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window\n */\n enableAccountStorageEvents(): void {\n if (typeof window === \"undefined\") {\n return;\n }\n\n if (!this.listeningToStorageEvents) {\n this.logger.verbose(\"Adding account storage listener.\");\n this.listeningToStorageEvents = true;\n window.addEventListener(\"storage\", this.handleAccountCacheChange);\n } else {\n this.logger.verbose(\"Account storage listener already registered.\");\n }\n }\n\n /**\n * Removes event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window\n */\n disableAccountStorageEvents(): void {\n if (typeof window === \"undefined\") {\n return;\n }\n\n if (this.listeningToStorageEvents) {\n this.logger.verbose(\"Removing account storage listener.\");\n window.removeEventListener(\"storage\", this.handleAccountCacheChange);\n this.listeningToStorageEvents = false;\n } else {\n this.logger.verbose(\"No account storage listener registered.\");\n }\n }\n\n /**\n * Emits events by calling callback with event message\n * @param eventType\n * @param interactionType\n * @param payload\n * @param error\n */\n emitEvent(eventType: EventType, interactionType?: InteractionType, payload?: EventPayload, error?: EventError): void {\n if (typeof window !== \"undefined\") {\n const message: EventMessage = {\n eventType: eventType,\n interactionType: interactionType || null,\n payload: payload || null,\n error: error || null,\n timestamp: Date.now()\n };\n\n this.logger.info(`Emitting event: ${eventType}`);\n\n this.eventCallbacks.forEach((callback: EventCallbackFunction, callbackId: string) => {\n this.logger.verbose(`Emitting event to callback ${callbackId}: ${eventType}`);\n callback.apply(null, [message]);\n });\n }\n }\n\n /**\n * Emit account added/removed events when cached accounts are changed in a different tab or frame\n */\n private handleAccountCacheChange(e: StorageEvent): void {\n try {\n const cacheValue = e.newValue || e.oldValue;\n if (!cacheValue) {\n return;\n }\n const parsedValue = JSON.parse(cacheValue);\n if (typeof parsedValue !== \"object\" || !AccountEntity.isAccountEntity(parsedValue)) {\n return;\n }\n const accountEntity = CacheManager.toObject(new AccountEntity(), parsedValue);\n const accountInfo = accountEntity.getAccountInfo();\n if (!e.oldValue && e.newValue) {\n this.logger.info(\"Account was added to cache in a different window\");\n this.emitEvent(EventType.ACCOUNT_ADDED, undefined, accountInfo);\n } else if (!e.newValue && e.oldValue) {\n this.logger.info(\"Account was removed from cache in a different window\");\n this.emitEvent(EventType.ACCOUNT_REMOVED, undefined, accountInfo);\n }\n } catch (e) {\n return;\n }\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { NetworkResponse } from \"./NetworkManager\";\nimport { ServerAuthorizationTokenResponse } from \"../response/ServerAuthorizationTokenResponse\";\nimport { HeaderNames, CacheSchemaType, ThrottlingConstants, Constants } from \"../utils/Constants\";\nimport { CacheManager } from \"../cache/CacheManager\";\nimport { ServerError } from \"../error/ServerError\";\nimport { RequestThumbprint } from \"./RequestThumbprint\";\nimport { ThrottlingEntity } from \"../cache/entities/ThrottlingEntity\";\nimport { BaseAuthRequest } from \"../request/BaseAuthRequest\";\n\nexport class ThrottlingUtils {\n\n /**\n * Prepares a RequestThumbprint to be stored as a key.\n * @param thumbprint\n */\n static generateThrottlingStorageKey(thumbprint: RequestThumbprint): string {\n return `${ThrottlingConstants.THROTTLING_PREFIX}.${JSON.stringify(thumbprint)}`;\n }\n\n /**\n * Performs necessary throttling checks before a network request.\n * @param cacheManager\n * @param thumbprint\n */\n static preProcess(cacheManager: CacheManager, thumbprint: RequestThumbprint): void {\n const key = ThrottlingUtils.generateThrottlingStorageKey(thumbprint);\n const value = cacheManager.getThrottlingCache(key);\n\n if (value) {\n if (value.throttleTime < Date.now()) {\n cacheManager.removeItem(key, CacheSchemaType.THROTTLING);\n return;\n }\n throw new ServerError(value.errorCodes?.join(\" \") || Constants.EMPTY_STRING, value.errorMessage, value.subError);\n }\n }\n\n /**\n * Performs necessary throttling checks after a network request.\n * @param cacheManager\n * @param thumbprint\n * @param response\n */\n static postProcess(cacheManager: CacheManager, thumbprint: RequestThumbprint, response: NetworkResponse): void {\n if (ThrottlingUtils.checkResponseStatus(response) || ThrottlingUtils.checkResponseForRetryAfter(response)) {\n const thumbprintValue: ThrottlingEntity = {\n throttleTime: ThrottlingUtils.calculateThrottleTime(parseInt(response.headers[HeaderNames.RETRY_AFTER])),\n error: response.body.error,\n errorCodes: response.body.error_codes,\n errorMessage: response.body.error_description,\n subError: response.body.suberror\n };\n cacheManager.setThrottlingCache(\n ThrottlingUtils.generateThrottlingStorageKey(thumbprint),\n thumbprintValue\n );\n }\n }\n\n /**\n * Checks a NetworkResponse object's status codes against 429 or 5xx\n * @param response\n */\n static checkResponseStatus(response: NetworkResponse): boolean {\n return response.status === 429 || response.status >= 500 && response.status < 600;\n }\n\n /**\n * Checks a NetworkResponse object's RetryAfter header\n * @param response\n */\n static checkResponseForRetryAfter(response: NetworkResponse): boolean {\n if (response.headers) {\n return response.headers.hasOwnProperty(HeaderNames.RETRY_AFTER) && (response.status < 200 || response.status >= 300);\n }\n return false;\n }\n\n /**\n * Calculates the Unix-time value for a throttle to expire given throttleTime in seconds.\n * @param throttleTime\n */\n static calculateThrottleTime(throttleTime: number): number {\n const time = throttleTime <= 0 ? 0 : throttleTime;\n\n const currentSeconds = Date.now() / 1000;\n return Math.floor(Math.min(\n currentSeconds + (time || ThrottlingConstants.DEFAULT_THROTTLE_TIME_SECONDS),\n currentSeconds + ThrottlingConstants.DEFAULT_MAX_THROTTLE_TIME_SECONDS\n ) * 1000);\n }\n\n static removeThrottle(cacheManager: CacheManager, clientId: string, request: BaseAuthRequest, homeAccountIdentifier?: string): boolean {\n const thumbprint: RequestThumbprint = {\n clientId: clientId,\n authority: request.authority,\n scopes: request.scopes,\n homeAccountIdentifier: homeAccountIdentifier,\n claims: request.claims,\n authenticationScheme: request.authenticationScheme,\n resourceRequestMethod: request.resourceRequestMethod,\n resourceRequestUri: request.resourceRequestUri,\n shrClaims: request.shrClaims,\n sshKid: request.sshKid\n };\n\n const key = this.generateThrottlingStorageKey(thumbprint);\n return cacheManager.removeItem(key, CacheSchemaType.THROTTLING);\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { INetworkModule, NetworkRequestOptions } from \"./INetworkModule\";\nimport { RequestThumbprint } from \"./RequestThumbprint\";\nimport { ThrottlingUtils } from \"./ThrottlingUtils\";\nimport { CacheManager } from \"../cache/CacheManager\";\nimport { ClientAuthError } from \"../error/ClientAuthError\";\nimport { AuthError } from \"../error/AuthError\";\n\nexport type NetworkResponse = {\n headers: Record;\n body: T;\n status: number;\n};\n\nexport class NetworkManager {\n private networkClient: INetworkModule;\n private cacheManager: CacheManager;\n\n constructor(networkClient: INetworkModule, cacheManager: CacheManager) {\n this.networkClient = networkClient;\n this.cacheManager = cacheManager;\n }\n\n /**\n * Wraps sendPostRequestAsync with necessary preflight and postflight logic\n * @param thumbprint\n * @param tokenEndpoint\n * @param options\n */\n async sendPostRequest(thumbprint: RequestThumbprint, tokenEndpoint: string, options: NetworkRequestOptions): Promise> {\n ThrottlingUtils.preProcess(this.cacheManager, thumbprint);\n\n let response;\n try {\n response = await this.networkClient.sendPostRequestAsync(tokenEndpoint, options);\n } catch (e) {\n if (e instanceof AuthError) {\n throw e;\n } else {\n throw ClientAuthError.createNetworkError(tokenEndpoint, e);\n }\n }\n\n ThrottlingUtils.postProcess(this.cacheManager, thumbprint, response);\n\n return response;\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ClientConfiguration, buildClientConfiguration, CommonClientConfiguration } from \"../config/ClientConfiguration\";\nimport { INetworkModule } from \"../network/INetworkModule\";\nimport { NetworkManager, NetworkResponse } from \"../network/NetworkManager\";\nimport { ICrypto } from \"../crypto/ICrypto\";\nimport { Authority } from \"../authority/Authority\";\nimport { Logger } from \"../logger/Logger\";\nimport { Constants, HeaderNames } from \"../utils/Constants\";\nimport { ServerAuthorizationTokenResponse } from \"../response/ServerAuthorizationTokenResponse\";\nimport { CacheManager } from \"../cache/CacheManager\";\nimport { ServerTelemetryManager } from \"../telemetry/server/ServerTelemetryManager\";\nimport { RequestThumbprint } from \"../network/RequestThumbprint\";\nimport { version, name } from \"../packageMetadata\";\nimport { ClientAuthError } from \"../error/ClientAuthError\";\nimport { CcsCredential, CcsCredentialType } from \"../account/CcsCredential\";\nimport { buildClientInfoFromHomeAccountId } from \"../account/ClientInfo\";\n\n/**\n * Base application class which will construct requests to send to and handle responses from the Microsoft STS using the authorization code flow.\n */\nexport abstract class BaseClient {\n // Logger object\n public logger: Logger;\n\n // Application config\n protected config: CommonClientConfiguration;\n\n // Crypto Interface\n protected cryptoUtils: ICrypto;\n\n // Storage Interface\n protected cacheManager: CacheManager;\n\n // Network Interface\n protected networkClient: INetworkModule;\n\n // Server Telemetry Manager\n protected serverTelemetryManager: ServerTelemetryManager | null;\n\n // Network Manager\n protected networkManager: NetworkManager;\n\n // Default authority object\n public authority: Authority;\n\n protected constructor(configuration: ClientConfiguration) {\n // Set the configuration\n this.config = buildClientConfiguration(configuration);\n\n // Initialize the logger\n this.logger = new Logger(this.config.loggerOptions, name, version);\n\n // Initialize crypto\n this.cryptoUtils = this.config.cryptoInterface;\n\n // Initialize storage interface\n this.cacheManager = this.config.storageInterface;\n\n // Set the network interface\n this.networkClient = this.config.networkInterface;\n\n // Set the NetworkManager\n this.networkManager = new NetworkManager(this.networkClient, this.cacheManager);\n\n // Set TelemetryManager\n this.serverTelemetryManager = this.config.serverTelemetryManager;\n\n // set Authority\n this.authority = this.config.authOptions.authority;\n }\n\n /**\n * Creates default headers for requests to token endpoint\n */\n protected createTokenRequestHeaders(ccsCred?: CcsCredential): Record {\n const headers: Record = {};\n headers[HeaderNames.CONTENT_TYPE] = Constants.URL_FORM_CONTENT_TYPE;\n\n if (!this.config.systemOptions.preventCorsPreflight && ccsCred) {\n switch (ccsCred.type) {\n case CcsCredentialType.HOME_ACCOUNT_ID:\n try {\n const clientInfo = buildClientInfoFromHomeAccountId(ccsCred.credential);\n headers[HeaderNames.CCS_HEADER] = `Oid:${clientInfo.uid}@${clientInfo.utid}`;\n } catch (e) {\n this.logger.verbose(\"Could not parse home account ID for CCS Header: \" + e);\n }\n break;\n case CcsCredentialType.UPN:\n headers[HeaderNames.CCS_HEADER] = `UPN: ${ccsCred.credential}`;\n break;\n }\n }\n return headers;\n }\n\n /**\n * Http post to token endpoint\n * @param tokenEndpoint\n * @param queryString\n * @param headers\n * @param thumbprint\n */\n protected async executePostToTokenEndpoint(tokenEndpoint: string, queryString: string, headers: Record, thumbprint: RequestThumbprint): Promise> {\n const response = await this.networkManager.sendPostRequest(\n thumbprint,\n tokenEndpoint,\n { body: queryString, headers: headers }\n );\n\n if (this.config.serverTelemetryManager && response.status < 500 && response.status !== 429) {\n // Telemetry data successfully logged by server, clear Telemetry cache\n this.config.serverTelemetryManager.clearTelemetryCache();\n }\n\n return response;\n }\n\n /**\n * Updates the authority object of the client. Endpoint discovery must be completed.\n * @param updatedAuthority \n */\n updateAuthority(updatedAuthority: Authority): void {\n if (!updatedAuthority.discoveryComplete()) {\n throw ClientAuthError.createEndpointDiscoveryIncompleteError(\"Updated authority has not completed endpoint discovery.\");\n }\n this.authority = updatedAuthority;\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { StringUtils } from \"../utils/StringUtils\";\nimport { ClientConfigurationError } from \"../error/ClientConfigurationError\";\nimport { PromptValue, CodeChallengeMethodValues} from \"../utils/Constants\";\nimport { StringDict } from \"../utils/MsalTypes\";\n\n/**\n * Validates server consumable params from the \"request\" objects\n */\nexport class RequestValidator {\n\n /**\n * Utility to check if the `redirectUri` in the request is a non-null value\n * @param redirectUri\n */\n static validateRedirectUri(redirectUri: string) : void {\n if (StringUtils.isEmpty(redirectUri)) {\n throw ClientConfigurationError.createRedirectUriEmptyError();\n }\n }\n\n /**\n * Utility to validate prompt sent by the user in the request\n * @param prompt\n */\n static validatePrompt(prompt: string) : void {\n const promptValues = [];\n\n for (const value in PromptValue) {\n promptValues.push(PromptValue[value]);\n }\n\n if (promptValues.indexOf(prompt) < 0) {\n throw ClientConfigurationError.createInvalidPromptError(prompt);\n }\n }\n\n static validateClaims(claims: string) : void {\n try {\n JSON.parse(claims);\n } catch(e) {\n throw ClientConfigurationError.createInvalidClaimsRequestError();\n }\n }\n\n /**\n * Utility to validate code_challenge and code_challenge_method\n * @param codeChallenge\n * @param codeChallengeMethod\n */\n static validateCodeChallengeParams(codeChallenge: string, codeChallengeMethod: string) : void {\n if (StringUtils.isEmpty(codeChallenge) || StringUtils.isEmpty(codeChallengeMethod)) {\n throw ClientConfigurationError.createInvalidCodeChallengeParamsError();\n } else {\n this.validateCodeChallengeMethod(codeChallengeMethod);\n }\n }\n\n /**\n * Utility to validate code_challenge_method\n * @param codeChallengeMethod\n */\n static validateCodeChallengeMethod(codeChallengeMethod: string) : void {\n if (\n [\n CodeChallengeMethodValues.PLAIN,\n CodeChallengeMethodValues.S256\n ].indexOf(codeChallengeMethod) < 0\n ) {\n throw ClientConfigurationError.createInvalidCodeChallengeMethodError();\n }\n }\n\n /**\n * Removes unnecessary or duplicate query parameters from extraQueryParameters\n * @param request\n */\n static sanitizeEQParams(eQParams: StringDict, queryParams: Map) : StringDict {\n if (!eQParams) {\n return {};\n }\n\n // Remove any query parameters already included in SSO params\n queryParams.forEach((value, key) => {\n if (eQParams[key]) {\n delete eQParams[key];\n }\n });\n\n return eQParams;\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AADServerParamKeys, Constants, ResponseMode, SSOTypes, CLIENT_INFO, AuthenticationScheme, ClaimsRequestKeys, PasswordGrantConstants, OIDC_DEFAULT_SCOPES, ThrottlingConstants, HeaderNames} from \"../utils/Constants\";\nimport { ScopeSet } from \"./ScopeSet\";\nimport { ClientConfigurationError } from \"../error/ClientConfigurationError\";\nimport { StringDict } from \"../utils/MsalTypes\";\nimport { RequestValidator } from \"./RequestValidator\";\nimport { LibraryInfo } from \"../config/ClientConfiguration\";\nimport { StringUtils } from \"../utils/StringUtils\";\nimport { ServerTelemetryManager } from \"../telemetry/server/ServerTelemetryManager\";\nimport { ClientInfo } from \"../account/ClientInfo\";\n\nexport class RequestParameterBuilder {\n\n private parameters: Map;\n\n constructor() {\n this.parameters = new Map();\n }\n\n /**\n * add response_type = code\n */\n addResponseTypeCode(): void {\n this.parameters.set(\n AADServerParamKeys.RESPONSE_TYPE, encodeURIComponent(Constants.CODE_RESPONSE_TYPE)\n );\n }\n\n /**\n * add response_mode. defaults to query.\n * @param responseMode\n */\n addResponseMode(responseMode?: ResponseMode): void {\n this.parameters.set(\n AADServerParamKeys.RESPONSE_MODE,\n encodeURIComponent((responseMode) ? responseMode : ResponseMode.QUERY)\n );\n }\n\n /**\n * add scopes. set addOidcScopes to false to prevent default scopes in non-user scenarios\n * @param scopeSet\n * @param addOidcScopes\n */\n addScopes(scopes: string[], addOidcScopes: boolean = true): void {\n const requestScopes = addOidcScopes ? [...scopes || [], ...OIDC_DEFAULT_SCOPES] : scopes || [];\n const scopeSet = new ScopeSet(requestScopes);\n this.parameters.set(AADServerParamKeys.SCOPE, encodeURIComponent(scopeSet.printScopes()));\n }\n\n /**\n * add clientId\n * @param clientId\n */\n addClientId(clientId: string): void {\n this.parameters.set(AADServerParamKeys.CLIENT_ID, encodeURIComponent(clientId));\n }\n\n /**\n * add redirect_uri\n * @param redirectUri\n */\n addRedirectUri(redirectUri: string): void {\n RequestValidator.validateRedirectUri(redirectUri);\n this.parameters.set(AADServerParamKeys.REDIRECT_URI, encodeURIComponent(redirectUri));\n }\n\n /**\n * add post logout redirectUri\n * @param redirectUri\n */\n addPostLogoutRedirectUri(redirectUri: string): void {\n RequestValidator.validateRedirectUri(redirectUri);\n this.parameters.set(AADServerParamKeys.POST_LOGOUT_URI, encodeURIComponent(redirectUri));\n }\n\n /**\n * add id_token_hint to logout request\n * @param idTokenHint\n */\n addIdTokenHint(idTokenHint: string): void {\n this.parameters.set(AADServerParamKeys.ID_TOKEN_HINT, encodeURIComponent(idTokenHint));\n }\n\n /**\n * add domain_hint\n * @param domainHint\n */\n addDomainHint(domainHint: string): void {\n this.parameters.set(SSOTypes.DOMAIN_HINT, encodeURIComponent(domainHint));\n }\n\n /**\n * add login_hint\n * @param loginHint\n */\n addLoginHint(loginHint: string): void {\n this.parameters.set(SSOTypes.LOGIN_HINT, encodeURIComponent(loginHint));\n }\n\n /**\n * Adds the CCS (Cache Credential Service) query parameter for login_hint\n * @param loginHint \n */\n addCcsUpn(loginHint: string): void {\n this.parameters.set(HeaderNames.CCS_HEADER, encodeURIComponent(`UPN:${loginHint}`));\n }\n\n /**\n * Adds the CCS (Cache Credential Service) query parameter for account object\n * @param loginHint \n */\n addCcsOid(clientInfo: ClientInfo): void {\n this.parameters.set(HeaderNames.CCS_HEADER, encodeURIComponent(`Oid:${clientInfo.uid}@${clientInfo.utid}`));\n }\n\n /**\n * add sid\n * @param sid\n */\n addSid(sid: string): void {\n this.parameters.set(SSOTypes.SID, encodeURIComponent(sid));\n }\n\n /**\n * add claims\n * @param claims\n */\n addClaims(claims?: string, clientCapabilities?: Array): void {\n const mergedClaims = this.addClientCapabilitiesToClaims(claims, clientCapabilities);\n RequestValidator.validateClaims(mergedClaims);\n this.parameters.set(AADServerParamKeys.CLAIMS, encodeURIComponent(mergedClaims));\n }\n\n /**\n * add correlationId\n * @param correlationId\n */\n addCorrelationId(correlationId: string): void {\n this.parameters.set(AADServerParamKeys.CLIENT_REQUEST_ID, encodeURIComponent(correlationId));\n }\n\n /**\n * add library info query params\n * @param libraryInfo\n */\n addLibraryInfo(libraryInfo: LibraryInfo): void {\n // Telemetry Info\n this.parameters.set(AADServerParamKeys.X_CLIENT_SKU, libraryInfo.sku);\n this.parameters.set(AADServerParamKeys.X_CLIENT_VER, libraryInfo.version);\n this.parameters.set(AADServerParamKeys.X_CLIENT_OS, libraryInfo.os);\n this.parameters.set(AADServerParamKeys.X_CLIENT_CPU, libraryInfo.cpu);\n }\n\n /**\n * add prompt\n * @param prompt\n */\n addPrompt(prompt: string): void {\n RequestValidator.validatePrompt(prompt);\n this.parameters.set(`${AADServerParamKeys.PROMPT}`, encodeURIComponent(prompt));\n }\n\n /**\n * add state\n * @param state\n */\n addState(state: string): void {\n if (!StringUtils.isEmpty(state)) {\n this.parameters.set(AADServerParamKeys.STATE, encodeURIComponent(state));\n }\n }\n\n /**\n * add nonce\n * @param nonce\n */\n addNonce(nonce: string): void {\n this.parameters.set(AADServerParamKeys.NONCE, encodeURIComponent(nonce));\n }\n\n /**\n * add code_challenge and code_challenge_method\n * - throw if either of them are not passed\n * @param codeChallenge\n * @param codeChallengeMethod\n */\n addCodeChallengeParams(\n codeChallenge: string,\n codeChallengeMethod: string\n ): void {\n RequestValidator.validateCodeChallengeParams(codeChallenge, codeChallengeMethod);\n if (codeChallenge && codeChallengeMethod) {\n this.parameters.set(AADServerParamKeys.CODE_CHALLENGE, encodeURIComponent(codeChallenge));\n this.parameters.set(AADServerParamKeys.CODE_CHALLENGE_METHOD, encodeURIComponent(codeChallengeMethod));\n } else {\n throw ClientConfigurationError.createInvalidCodeChallengeParamsError();\n }\n }\n\n /**\n * add the `authorization_code` passed by the user to exchange for a token\n * @param code\n */\n addAuthorizationCode(code: string): void {\n this.parameters.set(AADServerParamKeys.CODE, encodeURIComponent(code));\n }\n\n /**\n * add the `authorization_code` passed by the user to exchange for a token\n * @param code\n */\n addDeviceCode(code: string): void {\n this.parameters.set(AADServerParamKeys.DEVICE_CODE, encodeURIComponent(code));\n }\n\n /**\n * add the `refreshToken` passed by the user\n * @param refreshToken\n */\n addRefreshToken(refreshToken: string): void {\n this.parameters.set(AADServerParamKeys.REFRESH_TOKEN, encodeURIComponent(refreshToken));\n }\n\n /**\n * add the `code_verifier` passed by the user to exchange for a token\n * @param codeVerifier\n */\n addCodeVerifier(codeVerifier: string): void {\n this.parameters.set(AADServerParamKeys.CODE_VERIFIER, encodeURIComponent(codeVerifier));\n }\n\n /**\n * add client_secret\n * @param clientSecret\n */\n addClientSecret(clientSecret: string): void {\n this.parameters.set(AADServerParamKeys.CLIENT_SECRET, encodeURIComponent(clientSecret));\n }\n\n /**\n * add clientAssertion for confidential client flows\n * @param clientAssertion\n */\n addClientAssertion(clientAssertion: string): void {\n this.parameters.set(AADServerParamKeys.CLIENT_ASSERTION, encodeURIComponent(clientAssertion));\n }\n\n /**\n * add clientAssertionType for confidential client flows\n * @param clientAssertionType\n */\n addClientAssertionType(clientAssertionType: string): void {\n this.parameters.set(AADServerParamKeys.CLIENT_ASSERTION_TYPE, encodeURIComponent(clientAssertionType));\n }\n\n /**\n * add OBO assertion for confidential client flows\n * @param clientAssertion\n */\n addOboAssertion(oboAssertion: string): void {\n this.parameters.set(AADServerParamKeys.OBO_ASSERTION, encodeURIComponent(oboAssertion));\n }\n\n /**\n * add grant type\n * @param grantType\n */\n addRequestTokenUse(tokenUse: string): void {\n this.parameters.set(AADServerParamKeys.REQUESTED_TOKEN_USE, encodeURIComponent(tokenUse));\n }\n\n /**\n * add grant type\n * @param grantType\n */\n addGrantType(grantType: string): void {\n this.parameters.set(AADServerParamKeys.GRANT_TYPE, encodeURIComponent(grantType));\n }\n\n /**\n * add client info\n *\n */\n addClientInfo(): void {\n this.parameters.set(CLIENT_INFO, \"1\");\n }\n\n /**\n * add extraQueryParams\n * @param eQparams\n */\n addExtraQueryParameters(eQparams: StringDict): void {\n RequestValidator.sanitizeEQParams(eQparams, this.parameters);\n Object.keys(eQparams).forEach((key) => {\n this.parameters.set(key, eQparams[key]);\n });\n }\n\n addClientCapabilitiesToClaims(claims?: string, clientCapabilities?: Array): string {\n let mergedClaims: object;\n\n // Parse provided claims into JSON object or initialize empty object\n if (!claims) {\n mergedClaims = {};\n } else {\n try {\n mergedClaims = JSON.parse(claims);\n } catch(e) {\n throw ClientConfigurationError.createInvalidClaimsRequestError();\n }\n }\n\n if (clientCapabilities && clientCapabilities.length > 0) {\n if (!mergedClaims.hasOwnProperty(ClaimsRequestKeys.ACCESS_TOKEN)){\n // Add access_token key to claims object\n mergedClaims[ClaimsRequestKeys.ACCESS_TOKEN] = {};\n }\n\n // Add xms_cc claim with provided clientCapabilities to access_token key\n mergedClaims[ClaimsRequestKeys.ACCESS_TOKEN][ClaimsRequestKeys.XMS_CC] = {\n values: clientCapabilities\n };\n }\n\n return JSON.stringify(mergedClaims);\n }\n\n /**\n * adds `username` for Password Grant flow\n * @param username\n */\n addUsername(username: string): void {\n this.parameters.set(PasswordGrantConstants.username, username);\n }\n\n /**\n * adds `password` for Password Grant flow\n * @param password\n */\n addPassword(password: string): void {\n this.parameters.set(PasswordGrantConstants.password, password);\n }\n\n /**\n * add pop_jwk to query params\n * @param cnfString\n */\n addPopToken(cnfString: string): void {\n if (!StringUtils.isEmpty(cnfString)) {\n this.parameters.set(AADServerParamKeys.TOKEN_TYPE, AuthenticationScheme.POP);\n this.parameters.set(AADServerParamKeys.REQ_CNF, encodeURIComponent(cnfString));\n }\n }\n\n /**\n * add SSH JWK and key ID to query params \n */\n addSshJwk(sshJwkString: string): void {\n if(!StringUtils.isEmpty(sshJwkString)) {\n this.parameters.set(AADServerParamKeys.TOKEN_TYPE, AuthenticationScheme.SSH);\n this.parameters.set(AADServerParamKeys.REQ_CNF, encodeURIComponent(sshJwkString));\n }\n }\n\n /**\n * add server telemetry fields\n * @param serverTelemetryManager \n */\n addServerTelemetry(serverTelemetryManager: ServerTelemetryManager): void {\n this.parameters.set(AADServerParamKeys.X_CLIENT_CURR_TELEM, serverTelemetryManager.generateCurrentRequestHeaderValue());\n this.parameters.set(AADServerParamKeys.X_CLIENT_LAST_TELEM, serverTelemetryManager.generateLastRequestHeaderValue());\n }\n\n /**\n * Adds parameter that indicates to the server that throttling is supported\n */\n addThrottling(): void {\n this.parameters.set(AADServerParamKeys.X_MS_LIB_CAPABILITY, ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE);\n }\n\n /**\n * Utility to create a URL from the params map\n */\n createQueryString(): string {\n const queryParameterArray: Array = new Array();\n\n this.parameters.forEach((value, key) => {\n queryParameterArray.push(`${key}=${value}`);\n });\n\n return queryParameterArray.join(\"&\");\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IdTokenEntity } from \"./IdTokenEntity\";\nimport { AccessTokenEntity } from \"./AccessTokenEntity\";\nimport { RefreshTokenEntity } from \"./RefreshTokenEntity\";\nimport { AccountEntity } from \"./AccountEntity\";\nimport { AppMetadataEntity } from \"./AppMetadataEntity\";\n\nexport class CacheRecord {\n account: AccountEntity | null;\n idToken: IdTokenEntity | null;\n accessToken: AccessTokenEntity | null;\n refreshToken: RefreshTokenEntity | null;\n appMetadata: AppMetadataEntity | null;\n\n constructor(accountEntity?: AccountEntity | null, idTokenEntity?: IdTokenEntity | null, accessTokenEntity?: AccessTokenEntity | null, refreshTokenEntity?: RefreshTokenEntity | null, appMetadataEntity?: AppMetadataEntity | null) {\n this.account = accountEntity || null;\n this.idToken = idTokenEntity || null;\n this.accessToken = accessTokenEntity || null;\n this.refreshToken = refreshTokenEntity || null;\n this.appMetadata = appMetadataEntity || null;\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ISerializableTokenCache } from \"../interface/ISerializableTokenCache\";\n\n/**\n * This class instance helps track the memory changes facilitating\n * decisions to read from and write to the persistent cache\n */export class TokenCacheContext {\n /**\n * boolean indicating cache change\n */\n hasChanged: boolean;\n /**\n * serializable token cache interface\n */\n cache: ISerializableTokenCache;\n\n constructor(tokenCache: ISerializableTokenCache, hasChanged: boolean) {\n this.cache = tokenCache;\n this.hasChanged = hasChanged;\n }\n\n /**\n * boolean which indicates the changes in cache\n */\n get cacheHasChanged(): boolean {\n return this.hasChanged;\n }\n\n /**\n * function to retrieve the token cache\n */\n get tokenCache(): ISerializableTokenCache {\n return this.cache;\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ServerAuthorizationTokenResponse } from \"./ServerAuthorizationTokenResponse\";\nimport { buildClientInfo} from \"../account/ClientInfo\";\nimport { ICrypto } from \"../crypto/ICrypto\";\nimport { ClientAuthError } from \"../error/ClientAuthError\";\nimport { StringUtils } from \"../utils/StringUtils\";\nimport { ServerAuthorizationCodeResponse } from \"./ServerAuthorizationCodeResponse\";\nimport { Logger } from \"../logger/Logger\";\nimport { ServerError } from \"../error/ServerError\";\nimport { AuthToken } from \"../account/AuthToken\";\nimport { ScopeSet } from \"../request/ScopeSet\";\nimport { AuthenticationResult } from \"./AuthenticationResult\";\nimport { AccountEntity } from \"../cache/entities/AccountEntity\";\nimport { Authority } from \"../authority/Authority\";\nimport { AuthorityType } from \"../authority/AuthorityType\";\nimport { IdTokenEntity } from \"../cache/entities/IdTokenEntity\";\nimport { AccessTokenEntity } from \"../cache/entities/AccessTokenEntity\";\nimport { RefreshTokenEntity } from \"../cache/entities/RefreshTokenEntity\";\nimport { InteractionRequiredAuthError } from \"../error/InteractionRequiredAuthError\";\nimport { CacheRecord } from \"../cache/entities/CacheRecord\";\nimport { CacheManager } from \"../cache/CacheManager\";\nimport { ProtocolUtils, RequestStateObject } from \"../utils/ProtocolUtils\";\nimport { AuthenticationScheme, Constants, THE_FAMILY_ID } from \"../utils/Constants\";\nimport { PopTokenGenerator } from \"../crypto/PopTokenGenerator\";\nimport { AppMetadataEntity } from \"../cache/entities/AppMetadataEntity\";\nimport { ICachePlugin } from \"../cache/interface/ICachePlugin\";\nimport { TokenCacheContext } from \"../cache/persistence/TokenCacheContext\";\nimport { ISerializableTokenCache } from \"../cache/interface/ISerializableTokenCache\";\nimport { AuthorizationCodePayload } from \"./AuthorizationCodePayload\";\nimport { BaseAuthRequest } from \"../request/BaseAuthRequest\";\n\n/**\n * Class that handles response parsing.\n */\nexport class ResponseHandler {\n private clientId: string;\n private cacheStorage: CacheManager;\n private cryptoObj: ICrypto;\n private logger: Logger;\n private homeAccountIdentifier: string;\n private serializableCache: ISerializableTokenCache | null;\n private persistencePlugin: ICachePlugin | null;\n\n constructor(clientId: string, cacheStorage: CacheManager, cryptoObj: ICrypto, logger: Logger, serializableCache: ISerializableTokenCache | null, persistencePlugin: ICachePlugin | null) {\n this.clientId = clientId;\n this.cacheStorage = cacheStorage;\n this.cryptoObj = cryptoObj;\n this.logger = logger;\n this.serializableCache = serializableCache;\n this.persistencePlugin = persistencePlugin;\n }\n\n /**\n * Function which validates server authorization code response.\n * @param serverResponseHash\n * @param cachedState\n * @param cryptoObj\n */\n validateServerAuthorizationCodeResponse(serverResponseHash: ServerAuthorizationCodeResponse, cachedState: string, cryptoObj: ICrypto): void {\n\n if (!serverResponseHash.state || !cachedState) {\n throw !serverResponseHash.state ? ClientAuthError.createStateNotFoundError(\"Server State\") : ClientAuthError.createStateNotFoundError(\"Cached State\");\n }\n\n if (decodeURIComponent(serverResponseHash.state) !== decodeURIComponent(cachedState)) {\n throw ClientAuthError.createStateMismatchError();\n }\n\n // Check for error\n if (serverResponseHash.error || serverResponseHash.error_description || serverResponseHash.suberror) {\n if (InteractionRequiredAuthError.isInteractionRequiredError(serverResponseHash.error, serverResponseHash.error_description, serverResponseHash.suberror)) {\n throw new InteractionRequiredAuthError(serverResponseHash.error || Constants.EMPTY_STRING, serverResponseHash.error_description, serverResponseHash.suberror);\n }\n\n throw new ServerError(serverResponseHash.error || Constants.EMPTY_STRING, serverResponseHash.error_description, serverResponseHash.suberror);\n }\n\n if (serverResponseHash.client_info) {\n buildClientInfo(serverResponseHash.client_info, cryptoObj);\n }\n }\n\n /**\n * Function which validates server authorization token response.\n * @param serverResponse\n */\n validateTokenResponse(serverResponse: ServerAuthorizationTokenResponse): void {\n // Check for error\n if (serverResponse.error || serverResponse.error_description || serverResponse.suberror) {\n if (InteractionRequiredAuthError.isInteractionRequiredError(serverResponse.error, serverResponse.error_description, serverResponse.suberror)) {\n throw new InteractionRequiredAuthError(serverResponse.error, serverResponse.error_description, serverResponse.suberror);\n }\n\n const errString = `${serverResponse.error_codes} - [${serverResponse.timestamp}]: ${serverResponse.error_description} - Correlation ID: ${serverResponse.correlation_id} - Trace ID: ${serverResponse.trace_id}`;\n throw new ServerError(serverResponse.error, errString, serverResponse.suberror);\n }\n }\n\n /**\n * Returns a constructed token response based on given string. Also manages the cache updates and cleanups.\n * @param serverTokenResponse\n * @param authority\n */\n async handleServerTokenResponse(\n serverTokenResponse: ServerAuthorizationTokenResponse,\n authority: Authority,\n reqTimestamp: number,\n request: BaseAuthRequest,\n authCodePayload?: AuthorizationCodePayload,\n oboAssertion?: string,\n handlingRefreshTokenResponse?: boolean): Promise {\n\n // create an idToken object (not entity)\n let idTokenObj: AuthToken | undefined;\n if (serverTokenResponse.id_token) {\n idTokenObj = new AuthToken(serverTokenResponse.id_token || Constants.EMPTY_STRING, this.cryptoObj);\n \n // token nonce check (TODO: Add a warning if no nonce is given?)\n if (authCodePayload && !StringUtils.isEmpty(authCodePayload.nonce)) {\n if (idTokenObj.claims.nonce !== authCodePayload.nonce) {\n throw ClientAuthError.createNonceMismatchError();\n }\n }\n }\n\n // generate homeAccountId\n this.homeAccountIdentifier = AccountEntity.generateHomeAccountId(serverTokenResponse.client_info || Constants.EMPTY_STRING, authority.authorityType, this.logger, this.cryptoObj, idTokenObj);\n\n // save the response tokens\n let requestStateObj: RequestStateObject | undefined;\n if (!!authCodePayload && !!authCodePayload.state) {\n requestStateObj = ProtocolUtils.parseRequestState(this.cryptoObj, authCodePayload.state);\n }\n\n // Add keyId from request to serverTokenResponse if defined\n serverTokenResponse.key_id = serverTokenResponse.key_id || request.sshKid || undefined;\n\n const cacheRecord = this.generateCacheRecord(serverTokenResponse, authority, reqTimestamp, request, idTokenObj, oboAssertion, authCodePayload);\n let cacheContext;\n try {\n if (this.persistencePlugin && this.serializableCache) {\n this.logger.verbose(\"Persistence enabled, calling beforeCacheAccess\");\n cacheContext = new TokenCacheContext(this.serializableCache, true);\n await this.persistencePlugin.beforeCacheAccess(cacheContext);\n }\n /*\n * When saving a refreshed tokens to the cache, it is expected that the account that was used is present in the cache.\n * If not present, we should return null, as it's the case that another application called removeAccount in between\n * the calls to getAllAccounts and acquireTokenSilent. We should not overwrite that removal.\n */\n if (handlingRefreshTokenResponse && cacheRecord.account) {\n const key = cacheRecord.account.generateAccountKey();\n const account = this.cacheStorage.getAccount(key);\n if (!account) {\n this.logger.warning(\"Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache\");\n return ResponseHandler.generateAuthenticationResult(this.cryptoObj, authority, cacheRecord, false, request, idTokenObj, requestStateObj);\n }\n }\n await this.cacheStorage.saveCacheRecord(cacheRecord);\n } finally {\n if (this.persistencePlugin && this.serializableCache && cacheContext) {\n this.logger.verbose(\"Persistence enabled, calling afterCacheAccess\");\n await this.persistencePlugin.afterCacheAccess(cacheContext);\n }\n }\n return ResponseHandler.generateAuthenticationResult(this.cryptoObj, authority, cacheRecord, false, request, idTokenObj, requestStateObj, serverTokenResponse.spa_code);\n }\n\n /**\n * Generates CacheRecord\n * @param serverTokenResponse\n * @param idTokenObj\n * @param authority\n */\n private generateCacheRecord(serverTokenResponse: ServerAuthorizationTokenResponse, authority: Authority, reqTimestamp: number, request: BaseAuthRequest, idTokenObj?: AuthToken, oboAssertion?: string, authCodePayload?: AuthorizationCodePayload): CacheRecord {\n const env = authority.getPreferredCache();\n if (StringUtils.isEmpty(env)) {\n throw ClientAuthError.createInvalidCacheEnvironmentError();\n }\n\n // IdToken: non AAD scenarios can have empty realm\n let cachedIdToken: IdTokenEntity | undefined;\n let cachedAccount: AccountEntity | undefined;\n if (!StringUtils.isEmpty(serverTokenResponse.id_token) && !!idTokenObj) {\n cachedIdToken = IdTokenEntity.createIdTokenEntity(\n this.homeAccountIdentifier,\n env,\n serverTokenResponse.id_token || Constants.EMPTY_STRING,\n this.clientId,\n idTokenObj.claims.tid || Constants.EMPTY_STRING,\n oboAssertion\n );\n\n cachedAccount = this.generateAccountEntity(\n serverTokenResponse,\n idTokenObj,\n authority,\n oboAssertion,\n authCodePayload\n );\n }\n\n // AccessToken\n let cachedAccessToken: AccessTokenEntity | null = null;\n if (!StringUtils.isEmpty(serverTokenResponse.access_token)) {\n\n // If scopes not returned in server response, use request scopes\n const responseScopes = serverTokenResponse.scope ? ScopeSet.fromString(serverTokenResponse.scope) : new ScopeSet(request.scopes || []);\n\n /*\n * Use timestamp calculated before request\n * Server may return timestamps as strings, parse to numbers if so.\n */\n const expiresIn: number = (typeof serverTokenResponse.expires_in === \"string\" ? parseInt(serverTokenResponse.expires_in, 10) : serverTokenResponse.expires_in) || 0;\n const extExpiresIn: number = (typeof serverTokenResponse.ext_expires_in === \"string\" ? parseInt(serverTokenResponse.ext_expires_in, 10) : serverTokenResponse.ext_expires_in) || 0;\n const refreshIn: number | undefined = (typeof serverTokenResponse.refresh_in === \"string\" ? parseInt(serverTokenResponse.refresh_in, 10) : serverTokenResponse.refresh_in) || undefined;\n const tokenExpirationSeconds = reqTimestamp + expiresIn;\n const extendedTokenExpirationSeconds = tokenExpirationSeconds + extExpiresIn;\n const refreshOnSeconds = refreshIn && refreshIn > 0 ? reqTimestamp + refreshIn : undefined;\n\n // non AAD scenarios can have empty realm\n cachedAccessToken = AccessTokenEntity.createAccessTokenEntity(\n this.homeAccountIdentifier,\n env,\n serverTokenResponse.access_token || Constants.EMPTY_STRING,\n this.clientId,\n idTokenObj ? idTokenObj.claims.tid || Constants.EMPTY_STRING : authority.tenant,\n responseScopes.printScopes(),\n tokenExpirationSeconds,\n extendedTokenExpirationSeconds,\n this.cryptoObj,\n refreshOnSeconds,\n serverTokenResponse.token_type,\n oboAssertion,\n serverTokenResponse.key_id,\n request.claims,\n request.requestedClaimsHash\n );\n }\n \n // refreshToken\n let cachedRefreshToken: RefreshTokenEntity | null = null;\n if (!StringUtils.isEmpty(serverTokenResponse.refresh_token)) {\n cachedRefreshToken = RefreshTokenEntity.createRefreshTokenEntity(\n this.homeAccountIdentifier,\n env,\n serverTokenResponse.refresh_token || Constants.EMPTY_STRING,\n this.clientId,\n serverTokenResponse.foci,\n oboAssertion\n );\n }\n\n // appMetadata\n let cachedAppMetadata: AppMetadataEntity | null = null;\n if (!StringUtils.isEmpty(serverTokenResponse.foci)) {\n cachedAppMetadata = AppMetadataEntity.createAppMetadataEntity(this.clientId, env, serverTokenResponse.foci);\n }\n\n return new CacheRecord(cachedAccount, cachedIdToken, cachedAccessToken, cachedRefreshToken, cachedAppMetadata);\n }\n\n /**\n * Generate Account\n * @param serverTokenResponse\n * @param idToken\n * @param authority\n */\n private generateAccountEntity(serverTokenResponse: ServerAuthorizationTokenResponse, idToken: AuthToken, authority: Authority, oboAssertion?: string, authCodePayload?: AuthorizationCodePayload): AccountEntity {\n const authorityType = authority.authorityType;\n const cloudGraphHostName = authCodePayload ? authCodePayload.cloud_graph_host_name : \"\";\n const msGraphhost = authCodePayload ? authCodePayload.msgraph_host : \"\";\n\n // ADFS does not require client_info in the response\n if (authorityType === AuthorityType.Adfs) {\n this.logger.verbose(\"Authority type is ADFS, creating ADFS account\");\n return AccountEntity.createGenericAccount(this.homeAccountIdentifier, idToken, authority, oboAssertion, cloudGraphHostName, msGraphhost);\n }\n\n // This fallback applies to B2C as well as they fall under an AAD account type.\n if (StringUtils.isEmpty(serverTokenResponse.client_info) && authority.protocolMode === \"AAD\") {\n throw ClientAuthError.createClientInfoEmptyError();\n }\n\n return serverTokenResponse.client_info ?\n AccountEntity.createAccount(serverTokenResponse.client_info, this.homeAccountIdentifier, idToken, authority, oboAssertion, cloudGraphHostName, msGraphhost) :\n AccountEntity.createGenericAccount(this.homeAccountIdentifier, idToken, authority, oboAssertion, cloudGraphHostName, msGraphhost);\n }\n\n /**\n * Creates an @AuthenticationResult from @CacheRecord , @IdToken , and a boolean that states whether or not the result is from cache.\n *\n * Optionally takes a state string that is set as-is in the response.\n *\n * @param cacheRecord\n * @param idTokenObj\n * @param fromTokenCache\n * @param stateString\n */\n static async generateAuthenticationResult(\n cryptoObj: ICrypto, \n authority: Authority,\n cacheRecord: CacheRecord, \n fromTokenCache: boolean, \n request: BaseAuthRequest,\n idTokenObj?: AuthToken,\n requestState?: RequestStateObject,\n code?: string\n ): Promise {\n let accessToken: string = \"\";\n let responseScopes: Array = [];\n let expiresOn: Date | null = null;\n let extExpiresOn: Date | undefined;\n let familyId: string = Constants.EMPTY_STRING;\n\n if (cacheRecord.accessToken) {\n if (cacheRecord.accessToken.tokenType === AuthenticationScheme.POP) {\n const popTokenGenerator: PopTokenGenerator = new PopTokenGenerator(cryptoObj);\n accessToken = await popTokenGenerator.signPopToken(cacheRecord.accessToken.secret, request);\n } else {\n accessToken = cacheRecord.accessToken.secret;\n }\n responseScopes = ScopeSet.fromString(cacheRecord.accessToken.target).asArray();\n expiresOn = new Date(Number(cacheRecord.accessToken.expiresOn) * 1000);\n extExpiresOn = new Date(Number(cacheRecord.accessToken.extendedExpiresOn) * 1000);\n }\n\n if (cacheRecord.appMetadata) {\n familyId = cacheRecord.appMetadata.familyId === THE_FAMILY_ID ? THE_FAMILY_ID : Constants.EMPTY_STRING;\n }\n const uid = idTokenObj?.claims.oid || idTokenObj?.claims.sub || Constants.EMPTY_STRING;\n const tid = idTokenObj?.claims.tid || Constants.EMPTY_STRING;\n\n return {\n authority: authority.canonicalAuthority,\n uniqueId: uid,\n tenantId: tid,\n scopes: responseScopes,\n account: cacheRecord.account ? cacheRecord.account.getAccountInfo() : null,\n idToken: idTokenObj ? idTokenObj.rawToken : Constants.EMPTY_STRING,\n idTokenClaims: idTokenObj ? idTokenObj.claims : {},\n accessToken: accessToken,\n fromCache: fromTokenCache,\n expiresOn: expiresOn,\n correlationId: request.correlationId,\n extExpiresOn: extExpiresOn,\n familyId: familyId,\n tokenType: cacheRecord.accessToken?.tokenType || Constants.EMPTY_STRING,\n state: requestState ? requestState.userRequestState : Constants.EMPTY_STRING,\n cloudGraphHostName: cacheRecord.account?.cloudGraphHostName || Constants.EMPTY_STRING,\n msGraphHost: cacheRecord.account?.msGraphHost || Constants.EMPTY_STRING,\n code\n };\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { BaseClient } from \"./BaseClient\";\nimport { CommonAuthorizationUrlRequest } from \"../request/CommonAuthorizationUrlRequest\";\nimport { CommonAuthorizationCodeRequest } from \"../request/CommonAuthorizationCodeRequest\";\nimport { Authority } from \"../authority/Authority\";\nimport { RequestParameterBuilder } from \"../request/RequestParameterBuilder\";\nimport { GrantType, AuthenticationScheme, PromptValue, Separators, AADServerParamKeys } from \"../utils/Constants\";\nimport { ClientConfiguration } from \"../config/ClientConfiguration\";\nimport { ServerAuthorizationTokenResponse } from \"../response/ServerAuthorizationTokenResponse\";\nimport { NetworkResponse } from \"../network/NetworkManager\";\nimport { ResponseHandler } from \"../response/ResponseHandler\";\nimport { AuthenticationResult } from \"../response/AuthenticationResult\";\nimport { StringUtils } from \"../utils/StringUtils\";\nimport { ClientAuthError } from \"../error/ClientAuthError\";\nimport { UrlString } from \"../url/UrlString\";\nimport { ServerAuthorizationCodeResponse } from \"../response/ServerAuthorizationCodeResponse\";\nimport { CommonEndSessionRequest } from \"../request/CommonEndSessionRequest\";\nimport { PopTokenGenerator } from \"../crypto/PopTokenGenerator\";\nimport { RequestThumbprint } from \"../network/RequestThumbprint\";\nimport { AuthorizationCodePayload } from \"../response/AuthorizationCodePayload\";\nimport { TimeUtils } from \"../utils/TimeUtils\";\nimport { TokenClaims } from \"../account/TokenClaims\";\nimport { AccountInfo } from \"../account/AccountInfo\";\nimport { buildClientInfoFromHomeAccountId, buildClientInfo } from \"../account/ClientInfo\";\nimport { CcsCredentialType, CcsCredential } from \"../account/CcsCredential\";\nimport { ClientConfigurationError } from \"../error/ClientConfigurationError\";\nimport { RequestValidator } from \"../request/RequestValidator\";\n\n/**\n * Oauth2.0 Authorization Code client\n */\nexport class AuthorizationCodeClient extends BaseClient {\n // Flag to indicate if client is for hybrid spa auth code redemption\n protected includeRedirectUri: boolean = true;\n\n constructor(configuration: ClientConfiguration) {\n super(configuration);\n }\n\n /**\n * Creates the URL of the authorization request letting the user input credentials and consent to the\n * application. The URL target the /authorize endpoint of the authority configured in the\n * application object.\n *\n * Once the user inputs their credentials and consents, the authority will send a response to the redirect URI\n * sent in the request and should contain an authorization code, which can then be used to acquire tokens via\n * acquireToken(AuthorizationCodeRequest)\n * @param request\n */\n async getAuthCodeUrl(request: CommonAuthorizationUrlRequest): Promise {\n const queryString = this.createAuthCodeUrlQueryString(request);\n\n return UrlString.appendQueryString(this.authority.authorizationEndpoint, queryString);\n }\n\n /**\n * API to acquire a token in exchange of 'authorization_code` acquired by the user in the first leg of the\n * authorization_code_grant\n * @param request\n */\n async acquireToken(request: CommonAuthorizationCodeRequest, authCodePayload?: AuthorizationCodePayload): Promise {\n this.logger.info(\"in acquireToken call\");\n if (!request || StringUtils.isEmpty(request.code)) {\n throw ClientAuthError.createTokenRequestCannotBeMadeError();\n }\n\n const reqTimestamp = TimeUtils.nowSeconds();\n const response = await this.executeTokenRequest(this.authority, request);\n\n const responseHandler = new ResponseHandler(\n this.config.authOptions.clientId,\n this.cacheManager,\n this.cryptoUtils,\n this.logger,\n this.config.serializableCache,\n this.config.persistencePlugin\n );\n\n // Validate response. This function throws a server error if an error is returned by the server.\n responseHandler.validateTokenResponse(response.body);\n return await responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request, authCodePayload);\n }\n\n /**\n * Handles the hash fragment response from public client code request. Returns a code response used by\n * the client to exchange for a token in acquireToken.\n * @param hashFragment\n */\n handleFragmentResponse(hashFragment: string, cachedState: string): AuthorizationCodePayload {\n // Handle responses.\n const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, null, null);\n\n // Deserialize hash fragment response parameters.\n const hashUrlString = new UrlString(hashFragment);\n // Deserialize hash fragment response parameters.\n const serverParams: ServerAuthorizationCodeResponse = UrlString.getDeserializedHash(hashUrlString.getHash());\n\n // Get code response\n responseHandler.validateServerAuthorizationCodeResponse(serverParams, cachedState, this.cryptoUtils);\n\n // throw when there is no auth code in the response\n if (!serverParams.code) {\n throw ClientAuthError.createNoAuthCodeInServerResponseError();\n }\n return {\n ...serverParams,\n // Code param is optional in ServerAuthorizationCodeResponse but required in AuthorizationCodePaylod\n code: serverParams.code\n };\n }\n\n /**\n * Used to log out the current user, and redirect the user to the postLogoutRedirectUri.\n * Default behaviour is to redirect the user to `window.location.href`.\n * @param authorityUri\n */\n getLogoutUri(logoutRequest: CommonEndSessionRequest): string {\n // Throw error if logoutRequest is null/undefined\n if (!logoutRequest) {\n throw ClientConfigurationError.createEmptyLogoutRequestError();\n }\n const queryString = this.createLogoutUrlQueryString(logoutRequest);\n\n // Construct logout URI.\n return UrlString.appendQueryString(this.authority.endSessionEndpoint, queryString);\n }\n\n /**\n * Executes POST request to token endpoint\n * @param authority\n * @param request\n */\n private async executeTokenRequest(authority: Authority, request: CommonAuthorizationCodeRequest): Promise> {\n const thumbprint: RequestThumbprint = {\n clientId: this.config.authOptions.clientId,\n authority: authority.canonicalAuthority,\n scopes: request.scopes,\n claims: request.claims,\n authenticationScheme: request.authenticationScheme,\n resourceRequestMethod: request.resourceRequestMethod,\n resourceRequestUri: request.resourceRequestUri,\n shrClaims: request.shrClaims,\n sshKid: request.sshKid\n };\n\n const requestBody = await this.createTokenRequestBody(request);\n const queryParameters = this.createTokenQueryParameters(request);\n let ccsCredential: CcsCredential | undefined = undefined;\n if (request.clientInfo) {\n try {\n const clientInfo = buildClientInfo(request.clientInfo, this.cryptoUtils);\n ccsCredential = {\n credential: `${clientInfo.uid}${Separators.CLIENT_INFO_SEPARATOR}${clientInfo.utid}`,\n type: CcsCredentialType.HOME_ACCOUNT_ID\n };\n } catch (e) {\n this.logger.verbose(\"Could not parse client info for CCS Header: \" + e);\n }\n }\n const headers: Record = this.createTokenRequestHeaders(ccsCredential || request.ccsCredential);\n const endpoint = StringUtils.isEmpty(queryParameters) ? authority.tokenEndpoint : `${authority.tokenEndpoint}?${queryParameters}`;\n\n return this.executePostToTokenEndpoint(endpoint, requestBody, headers, thumbprint);\n }\n\n /**\n * Creates query string for the /token request\n * @param request \n */\n private createTokenQueryParameters(request: CommonAuthorizationCodeRequest): string {\n const parameterBuilder = new RequestParameterBuilder();\n\n if (request.tokenQueryParameters) {\n parameterBuilder.addExtraQueryParameters(request.tokenQueryParameters);\n }\n\n return parameterBuilder.createQueryString();\n }\n\n /**\n * Generates a map for all the params to be sent to the service\n * @param request\n */\n private async createTokenRequestBody(request: CommonAuthorizationCodeRequest): Promise {\n const parameterBuilder = new RequestParameterBuilder();\n\n parameterBuilder.addClientId(this.config.authOptions.clientId);\n\n /*\n * For hybrid spa flow, there will be a code but no verifier\n * In this scenario, don't include redirect uri as auth code will not be bound to redirect URI\n */\n if (!this.includeRedirectUri) {\n // Just validate\n RequestValidator.validateRedirectUri(request.redirectUri);\n } else {\n // Validate and include redirect uri\n parameterBuilder.addRedirectUri(request.redirectUri);\n }\n\n // Add scope array, parameter builder will add default scopes and dedupe\n parameterBuilder.addScopes(request.scopes);\n\n // add code: user set, not validated\n parameterBuilder.addAuthorizationCode(request.code);\n\n // Add library metadata\n parameterBuilder.addLibraryInfo(this.config.libraryInfo);\n\n parameterBuilder.addThrottling();\n \n if (this.serverTelemetryManager) {\n parameterBuilder.addServerTelemetry(this.serverTelemetryManager);\n }\n\n // add code_verifier if passed\n if (request.codeVerifier) {\n parameterBuilder.addCodeVerifier(request.codeVerifier);\n }\n\n if (this.config.clientCredentials.clientSecret) {\n parameterBuilder.addClientSecret(this.config.clientCredentials.clientSecret);\n }\n\n if (this.config.clientCredentials.clientAssertion) {\n const clientAssertion = this.config.clientCredentials.clientAssertion;\n parameterBuilder.addClientAssertion(clientAssertion.assertion);\n parameterBuilder.addClientAssertionType(clientAssertion.assertionType);\n }\n\n parameterBuilder.addGrantType(GrantType.AUTHORIZATION_CODE_GRANT);\n parameterBuilder.addClientInfo();\n\n if (request.authenticationScheme === AuthenticationScheme.POP) {\n const popTokenGenerator = new PopTokenGenerator(this.cryptoUtils);\n const cnfString = await popTokenGenerator.generateCnf(request);\n parameterBuilder.addPopToken(cnfString);\n } else if (request.authenticationScheme === AuthenticationScheme.SSH) {\n if(request.sshJwk) {\n parameterBuilder.addSshJwk(request.sshJwk);\n } else {\n throw ClientConfigurationError.createMissingSshJwkError();\n }\n }\n\n const correlationId = request.correlationId || this.config.cryptoInterface.createNewGuid();\n parameterBuilder.addCorrelationId(correlationId);\n\n if (!StringUtils.isEmptyObj(request.claims) || this.config.authOptions.clientCapabilities && this.config.authOptions.clientCapabilities.length > 0) {\n parameterBuilder.addClaims(request.claims, this.config.authOptions.clientCapabilities);\n }\n \n let ccsCred: CcsCredential | undefined = undefined;\n if (request.clientInfo) {\n try {\n const clientInfo = buildClientInfo(request.clientInfo, this.cryptoUtils);\n ccsCred = {\n credential: `${clientInfo.uid}${Separators.CLIENT_INFO_SEPARATOR}${clientInfo.utid}`,\n type: CcsCredentialType.HOME_ACCOUNT_ID\n };\n } catch (e) {\n this.logger.verbose(\"Could not parse client info for CCS Header: \" + e);\n }\n } else {\n ccsCred = request.ccsCredential;\n }\n\n // Adds these as parameters in the request instead of headers to prevent CORS preflight request\n if (this.config.systemOptions.preventCorsPreflight && ccsCred) {\n switch (ccsCred.type) {\n case CcsCredentialType.HOME_ACCOUNT_ID:\n try {\n const clientInfo = buildClientInfoFromHomeAccountId(ccsCred.credential);\n parameterBuilder.addCcsOid(clientInfo);\n } catch (e) {\n this.logger.verbose(\"Could not parse home account ID for CCS Header: \" + e);\n }\n break;\n case CcsCredentialType.UPN:\n parameterBuilder.addCcsUpn(ccsCred.credential);\n break;\n }\n }\n\n if (request.tokenBodyParameters) {\n parameterBuilder.addExtraQueryParameters(request.tokenBodyParameters);\n }\n\n // Add hybrid spa parameters if not already provided\n if (request.enableSpaAuthorizationCode && (!request.tokenBodyParameters || !request.tokenBodyParameters[AADServerParamKeys.RETURN_SPA_CODE])) {\n parameterBuilder.addExtraQueryParameters({\n [AADServerParamKeys.RETURN_SPA_CODE]: \"1\"\n });\n }\n \n return parameterBuilder.createQueryString();\n }\n\n /**\n * This API validates the `AuthorizationCodeUrlRequest` and creates a URL\n * @param request\n */\n private createAuthCodeUrlQueryString(request: CommonAuthorizationUrlRequest): string {\n const parameterBuilder = new RequestParameterBuilder();\n\n parameterBuilder.addClientId(this.config.authOptions.clientId);\n\n const requestScopes = [...request.scopes || [], ...request.extraScopesToConsent || []];\n parameterBuilder.addScopes(requestScopes);\n\n // validate the redirectUri (to be a non null value)\n parameterBuilder.addRedirectUri(request.redirectUri);\n\n // generate the correlationId if not set by the user and add\n const correlationId = request.correlationId || this.config.cryptoInterface.createNewGuid();\n parameterBuilder.addCorrelationId(correlationId);\n\n // add response_mode. If not passed in it defaults to query.\n parameterBuilder.addResponseMode(request.responseMode);\n\n // add response_type = code\n parameterBuilder.addResponseTypeCode();\n\n // add library info parameters\n parameterBuilder.addLibraryInfo(this.config.libraryInfo);\n\n // add client_info=1\n parameterBuilder.addClientInfo();\n\n if (request.codeChallenge && request.codeChallengeMethod) {\n parameterBuilder.addCodeChallengeParams(request.codeChallenge, request.codeChallengeMethod);\n }\n\n if (request.prompt) {\n parameterBuilder.addPrompt(request.prompt);\n }\n\n if (request.domainHint) {\n parameterBuilder.addDomainHint(request.domainHint);\n }\n\n // Add sid or loginHint with preference for sid -> loginHint -> username of AccountInfo object\n if (request.prompt !== PromptValue.SELECT_ACCOUNT) {\n // AAD will throw if prompt=select_account is passed with an account hint\n if (request.sid && request.prompt === PromptValue.NONE) {\n // SessionID is only used in silent calls\n this.logger.verbose(\"createAuthCodeUrlQueryString: Prompt is none, adding sid from request\");\n parameterBuilder.addSid(request.sid);\n } else if (request.account) {\n const accountSid = this.extractAccountSid(request.account);\n // If account and loginHint are provided, we will check account first for sid before adding loginHint\n if (accountSid && request.prompt === PromptValue.NONE) {\n // SessionId is only used in silent calls\n this.logger.verbose(\"createAuthCodeUrlQueryString: Prompt is none, adding sid from account\");\n parameterBuilder.addSid(accountSid);\n try {\n const clientInfo = buildClientInfoFromHomeAccountId(request.account.homeAccountId);\n parameterBuilder.addCcsOid(clientInfo);\n } catch (e) {\n this.logger.verbose(\"Could not parse home account ID for CCS Header: \" + e);\n }\n } else if (request.loginHint) {\n this.logger.verbose(\"createAuthCodeUrlQueryString: Adding login_hint from request\");\n parameterBuilder.addLoginHint(request.loginHint);\n parameterBuilder.addCcsUpn(request.loginHint);\n } else if (request.account.username) {\n // Fallback to account username if provided\n this.logger.verbose(\"createAuthCodeUrlQueryString: Adding login_hint from account\");\n parameterBuilder.addLoginHint(request.account.username);\n try {\n const clientInfo = buildClientInfoFromHomeAccountId(request.account.homeAccountId);\n parameterBuilder.addCcsOid(clientInfo);\n } catch (e) {\n this.logger.verbose(\"Could not parse home account ID for CCS Header: \" + e);\n }\n }\n } else if (request.loginHint) {\n this.logger.verbose(\"createAuthCodeUrlQueryString: No account, adding login_hint from request\");\n parameterBuilder.addLoginHint(request.loginHint);\n parameterBuilder.addCcsUpn(request.loginHint);\n }\n } else {\n this.logger.verbose(\"createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints\");\n }\n\n if (request.nonce) {\n parameterBuilder.addNonce(request.nonce);\n }\n\n if (request.state) {\n parameterBuilder.addState(request.state);\n }\n\n if (!StringUtils.isEmpty(request.claims) || this.config.authOptions.clientCapabilities && this.config.authOptions.clientCapabilities.length > 0) {\n parameterBuilder.addClaims(request.claims, this.config.authOptions.clientCapabilities);\n }\n\n if (request.extraQueryParameters) {\n parameterBuilder.addExtraQueryParameters(request.extraQueryParameters);\n }\n\n return parameterBuilder.createQueryString();\n }\n\n /**\n * This API validates the `EndSessionRequest` and creates a URL\n * @param request\n */\n private createLogoutUrlQueryString(request: CommonEndSessionRequest): string {\n const parameterBuilder = new RequestParameterBuilder();\n\n if (request.postLogoutRedirectUri) {\n parameterBuilder.addPostLogoutRedirectUri(request.postLogoutRedirectUri);\n }\n\n if (request.correlationId) {\n parameterBuilder.addCorrelationId(request.correlationId);\n }\n\n if (request.idTokenHint) {\n parameterBuilder.addIdTokenHint(request.idTokenHint);\n }\n \n if(request.state) {\n parameterBuilder.addState(request.state);\n }\n\n if (request.extraQueryParameters) {\n parameterBuilder.addExtraQueryParameters(request.extraQueryParameters);\n }\n\n return parameterBuilder.createQueryString();\n }\n\n /**\n * Helper to get sid from account. Returns null if idTokenClaims are not present or sid is not present.\n * @param account \n */\n private extractAccountSid(account: AccountInfo): string | null {\n if (account.idTokenClaims) {\n const tokenClaims = account.idTokenClaims as TokenClaims;\n return tokenClaims.sid || null;\n }\n return null;\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Tenant Discovery Response which contains the relevant OAuth endpoints and data needed for authentication and authorization.\n */\nexport type OpenIdConfigResponse = {\n authorization_endpoint: string;\n token_endpoint: string;\n end_session_endpoint?: string;\n issuer: string;\n};\n\nexport function isOpenIdConfigResponse(response: object): boolean {\n return (\n response.hasOwnProperty(\"authorization_endpoint\") &&\n response.hasOwnProperty(\"token_endpoint\") && \n response.hasOwnProperty(\"issuer\")\n );\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { INetworkModule } from \"../network/INetworkModule\";\nimport { NetworkResponse } from \"../network/NetworkManager\";\nimport { IMDSBadResponse } from \"../response/IMDSBadResponse\";\nimport { Constants, RegionDiscoverySources, ResponseCodes } from \"../utils/Constants\";\nimport { RegionDiscoveryMetadata } from \"./RegionDiscoveryMetadata\";\n\nexport class RegionDiscovery {\n // Network interface to make requests with.\n protected networkInterface: INetworkModule;\n // Options for the IMDS endpoint request\n protected static IMDS_OPTIONS = {headers: {\"Metadata\": \"true\"}};\n\n constructor(networkInterface: INetworkModule) {\n this.networkInterface = networkInterface;\n }\n\n /**\n * Detect the region from the application's environment.\n * \n * @returns Promise\n */\n public async detectRegion(environmentRegion: string | undefined, regionDiscoveryMetadata: RegionDiscoveryMetadata): Promise {\n // Initialize auto detected region with the region from the envrionment \n let autodetectedRegionName = environmentRegion;\n\n // Check if a region was detected from the environment, if not, attempt to get the region from IMDS \n if (!autodetectedRegionName) {\n try {\n const localIMDSVersionResponse = await this.getRegionFromIMDS(Constants.IMDS_VERSION);\n if (localIMDSVersionResponse.status === ResponseCodes.httpSuccess) {\n autodetectedRegionName = localIMDSVersionResponse.body;\n regionDiscoveryMetadata.region_source = RegionDiscoverySources.IMDS;\n } \n \n // If the response using the local IMDS version failed, try to fetch the current version of IMDS and retry. \n if (localIMDSVersionResponse.status === ResponseCodes.httpBadRequest) {\n const currentIMDSVersion = await this.getCurrentVersion();\n if (!currentIMDSVersion) {\n regionDiscoveryMetadata.region_source = RegionDiscoverySources.FAILED_AUTO_DETECTION;\n return null;\n }\n\n const currentIMDSVersionResponse = await this.getRegionFromIMDS(currentIMDSVersion);\n if (currentIMDSVersionResponse.status === ResponseCodes.httpSuccess) {\n autodetectedRegionName = currentIMDSVersionResponse.body;\n regionDiscoveryMetadata.region_source = RegionDiscoverySources.IMDS;\n }\n }\n } catch(e) {\n regionDiscoveryMetadata.region_source = RegionDiscoverySources.FAILED_AUTO_DETECTION;\n return null;\n } \n } else {\n regionDiscoveryMetadata.region_source = RegionDiscoverySources.ENVIRONMENT_VARIABLE;\n }\n\n // If no region was auto detected from the environment or from the IMDS endpoint, mark the attempt as a FAILED_AUTO_DETECTION\n if (!autodetectedRegionName) {\n regionDiscoveryMetadata.region_source = RegionDiscoverySources.FAILED_AUTO_DETECTION;\n }\n\n return autodetectedRegionName || null;\n }\n\n /**\n * Make the call to the IMDS endpoint\n * \n * @param imdsEndpointUrl\n * @returns Promise>\n */\n private async getRegionFromIMDS(version: string): Promise> {\n return this.networkInterface.sendGetRequestAsync(`${Constants.IMDS_ENDPOINT}?api-version=${version}&format=text`, RegionDiscovery.IMDS_OPTIONS, Constants.IMDS_TIMEOUT);\n }\n\n /**\n * Get the most recent version of the IMDS endpoint available\n * \n * @returns Promise\n */\n private async getCurrentVersion(): Promise {\n try {\n const response = await this.networkInterface.sendGetRequestAsync(`${Constants.IMDS_ENDPOINT}?format=json`, RegionDiscovery.IMDS_OPTIONS);\n\n // When IMDS endpoint is called without the api version query param, bad request response comes back with latest version.\n if (response.status === ResponseCodes.httpBadRequest && response.body && response.body[\"newest-versions\"] && response.body[\"newest-versions\"].length > 0) {\n return response.body[\"newest-versions\"][0];\n }\n\n return null;\n } catch (e) {\n return null;\n }\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AuthorityType } from \"./AuthorityType\";\nimport { isOpenIdConfigResponse, OpenIdConfigResponse } from \"./OpenIdConfigResponse\";\nimport { UrlString } from \"../url/UrlString\";\nimport { IUri } from \"../url/IUri\";\nimport { ClientAuthError } from \"../error/ClientAuthError\";\nimport { INetworkModule } from \"../network/INetworkModule\";\nimport { AuthorityMetadataSource, Constants, RegionDiscoveryOutcomes } from \"../utils/Constants\";\nimport { ClientConfigurationError } from \"../error/ClientConfigurationError\";\nimport { ProtocolMode } from \"./ProtocolMode\";\nimport { ICacheManager } from \"../cache/interface/ICacheManager\";\nimport { AuthorityMetadataEntity } from \"../cache/entities/AuthorityMetadataEntity\";\nimport { AuthorityOptions } from \"./AuthorityOptions\";\nimport { CloudInstanceDiscoveryResponse, isCloudInstanceDiscoveryResponse } from \"./CloudInstanceDiscoveryResponse\";\nimport { CloudDiscoveryMetadata } from \"./CloudDiscoveryMetadata\";\nimport { RegionDiscovery } from \"./RegionDiscovery\";\nimport { RegionDiscoveryMetadata } from \"./RegionDiscoveryMetadata\";\n\n/**\n * The authority class validates the authority URIs used by the user, and retrieves the OpenID Configuration Data from the\n * endpoint. It will store the pertinent config data in this object for use during token calls.\n */\nexport class Authority {\n\n // Canonical authority url string\n private _canonicalAuthority: UrlString;\n // Canonicaly authority url components\n private _canonicalAuthorityUrlComponents: IUri | null;\n // Network interface to make requests with.\n protected networkInterface: INetworkModule;\n // Cache Manager to cache network responses\n protected cacheManager: ICacheManager;\n // Protocol mode to construct endpoints\n private authorityOptions: AuthorityOptions;\n // Authority metadata\n private metadata: AuthorityMetadataEntity;\n // Region discovery service\n private regionDiscovery: RegionDiscovery;\n // Region discovery metadata\n public regionDiscoveryMetadata: RegionDiscoveryMetadata;\n\n constructor(authority: string, networkInterface: INetworkModule, cacheManager: ICacheManager, authorityOptions: AuthorityOptions) {\n this.canonicalAuthority = authority;\n this._canonicalAuthority.validateAsUri();\n this.networkInterface = networkInterface;\n this.cacheManager = cacheManager;\n this.authorityOptions = authorityOptions;\n this.regionDiscovery = new RegionDiscovery(networkInterface);\n this.regionDiscoveryMetadata = { region_used: undefined, region_source: undefined, region_outcome: undefined };\n }\n\n // See above for AuthorityType\n public get authorityType(): AuthorityType {\n const pathSegments = this.canonicalAuthorityUrlComponents.PathSegments;\n\n if (pathSegments.length && pathSegments[0].toLowerCase() === Constants.ADFS) {\n return AuthorityType.Adfs;\n }\n\n return AuthorityType.Default;\n }\n\n /**\n * ProtocolMode enum representing the way endpoints are constructed.\n */\n public get protocolMode(): ProtocolMode {\n return this.authorityOptions.protocolMode;\n }\n\n /**\n * Returns authorityOptions which can be used to reinstantiate a new authority instance\n */\n public get options(): AuthorityOptions {\n return this.authorityOptions;\n }\n\n /**\n * A URL that is the authority set by the developer\n */\n public get canonicalAuthority(): string {\n return this._canonicalAuthority.urlString;\n }\n\n /**\n * Sets canonical authority.\n */\n public set canonicalAuthority(url: string) {\n this._canonicalAuthority = new UrlString(url);\n this._canonicalAuthority.validateAsUri();\n this._canonicalAuthorityUrlComponents = null;\n }\n\n /**\n * Get authority components.\n */\n public get canonicalAuthorityUrlComponents(): IUri {\n if (!this._canonicalAuthorityUrlComponents) {\n this._canonicalAuthorityUrlComponents = this._canonicalAuthority.getUrlComponents();\n }\n\n return this._canonicalAuthorityUrlComponents;\n }\n\n /**\n * Get hostname and port i.e. login.microsoftonline.com\n */\n public get hostnameAndPort(): string {\n return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase();\n }\n\n /**\n * Get tenant for authority.\n */\n public get tenant(): string {\n return this.canonicalAuthorityUrlComponents.PathSegments[0];\n }\n\n /**\n * OAuth /authorize endpoint for requests\n */\n public get authorizationEndpoint(): string {\n if(this.discoveryComplete()) {\n const endpoint = this.replacePath(this.metadata.authorization_endpoint);\n return this.replaceTenant(endpoint);\n } else {\n throw ClientAuthError.createEndpointDiscoveryIncompleteError(\"Discovery incomplete.\");\n }\n }\n\n /**\n * OAuth /token endpoint for requests\n */\n public get tokenEndpoint(): string {\n if(this.discoveryComplete()) {\n const endpoint = this.replacePath(this.metadata.token_endpoint);\n return this.replaceTenant(endpoint);\n } else {\n throw ClientAuthError.createEndpointDiscoveryIncompleteError(\"Discovery incomplete.\");\n }\n }\n\n public get deviceCodeEndpoint(): string {\n if(this.discoveryComplete()) {\n const endpoint = this.replacePath(this.metadata.token_endpoint.replace(\"/token\", \"/devicecode\"));\n return this.replaceTenant(endpoint);\n } else {\n throw ClientAuthError.createEndpointDiscoveryIncompleteError(\"Discovery incomplete.\");\n }\n }\n\n /**\n * OAuth logout endpoint for requests\n */\n public get endSessionEndpoint(): string {\n if(this.discoveryComplete()) {\n // ROPC policies may not have end_session_endpoint set\n if (!this.metadata.end_session_endpoint) {\n throw ClientAuthError.createLogoutNotSupportedError();\n }\n const endpoint = this.replacePath(this.metadata.end_session_endpoint);\n return this.replaceTenant(endpoint);\n } else {\n throw ClientAuthError.createEndpointDiscoveryIncompleteError(\"Discovery incomplete.\");\n }\n }\n\n /**\n * OAuth issuer for requests\n */\n public get selfSignedJwtAudience(): string {\n if(this.discoveryComplete()) {\n const endpoint = this.replacePath(this.metadata.issuer);\n return this.replaceTenant(endpoint);\n } else {\n throw ClientAuthError.createEndpointDiscoveryIncompleteError(\"Discovery incomplete.\");\n }\n }\n\n /**\n * Replaces tenant in url path with current tenant. Defaults to common.\n * @param urlString\n */\n private replaceTenant(urlString: string): string {\n return urlString.replace(/{tenant}|{tenantid}/g, this.tenant);\n }\n\n /**\n * Replaces path such as tenant or policy with the current tenant or policy.\n * @param urlString \n */\n private replacePath(urlString: string): string {\n let endpoint = urlString;\n const cachedAuthorityUrl = new UrlString(this.metadata.canonical_authority);\n const cachedAuthorityParts = cachedAuthorityUrl.getUrlComponents().PathSegments;\n const currentAuthorityParts = this.canonicalAuthorityUrlComponents.PathSegments;\n\n currentAuthorityParts.forEach((currentPart, index) => {\n const cachedPart = cachedAuthorityParts[index];\n if (currentPart !== cachedPart) {\n endpoint = endpoint.replace(`/${cachedPart}/`, `/${currentPart}/`);\n }\n });\n\n return endpoint;\n }\n\n /**\n * The default open id configuration endpoint for any canonical authority.\n */\n protected get defaultOpenIdConfigurationEndpoint(): string {\n if (this.authorityType === AuthorityType.Adfs || this.protocolMode === ProtocolMode.OIDC) {\n return `${this.canonicalAuthority}.well-known/openid-configuration`;\n }\n return `${this.canonicalAuthority}v2.0/.well-known/openid-configuration`;\n }\n\n /**\n * Boolean that returns whethr or not tenant discovery has been completed.\n */\n discoveryComplete(): boolean {\n return !!this.metadata;\n }\n\n /**\n * Perform endpoint discovery to discover aliases, preferred_cache, preferred_network\n * and the /authorize, /token and logout endpoints.\n */\n public async resolveEndpointsAsync(): Promise {\n let metadataEntity = this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort);\n if (!metadataEntity) {\n metadataEntity = new AuthorityMetadataEntity();\n metadataEntity.updateCanonicalAuthority(this.canonicalAuthority);\n }\n\n const cloudDiscoverySource = await this.updateCloudDiscoveryMetadata(metadataEntity);\n this.canonicalAuthority = this.canonicalAuthority.replace(this.hostnameAndPort, metadataEntity.preferred_network);\n const endpointSource = await this.updateEndpointMetadata(metadataEntity);\n\n if (cloudDiscoverySource !== AuthorityMetadataSource.CACHE && endpointSource !== AuthorityMetadataSource.CACHE) {\n // Reset the expiration time unless both values came from a successful cache lookup\n metadataEntity.resetExpiresAt();\n metadataEntity.updateCanonicalAuthority(this.canonicalAuthority);\n } \n\n const cacheKey = this.cacheManager.generateAuthorityMetadataCacheKey(metadataEntity.preferred_cache);\n this.cacheManager.setAuthorityMetadata(cacheKey, metadataEntity);\n this.metadata = metadataEntity;\n }\n\n /**\n * Update AuthorityMetadataEntity with new endpoints and return where the information came from\n * @param metadataEntity \n */\n private async updateEndpointMetadata(metadataEntity: AuthorityMetadataEntity): Promise {\n let metadata = this.getEndpointMetadataFromConfig();\n if (metadata) {\n metadataEntity.updateEndpointMetadata(metadata, false);\n return AuthorityMetadataSource.CONFIG;\n }\n\n if (this.isAuthoritySameType(metadataEntity) && metadataEntity.endpointsFromNetwork && !metadataEntity.isExpired()) {\n // No need to update\n return AuthorityMetadataSource.CACHE;\n }\n\n metadata = await this.getEndpointMetadataFromNetwork();\n if (metadata) {\n // If the user prefers to use an azure region replace the global endpoints with regional information.\n if (this.authorityOptions.azureRegionConfiguration?.azureRegion) {\n const autodetectedRegionName = await this.regionDiscovery.detectRegion(this.authorityOptions.azureRegionConfiguration.environmentRegion, this.regionDiscoveryMetadata);\n\n const azureRegion = this.authorityOptions.azureRegionConfiguration.azureRegion === Constants.AZURE_REGION_AUTO_DISCOVER_FLAG \n ? autodetectedRegionName \n : this.authorityOptions.azureRegionConfiguration.azureRegion;\n\n if (this.authorityOptions.azureRegionConfiguration.azureRegion === Constants.AZURE_REGION_AUTO_DISCOVER_FLAG) {\n this.regionDiscoveryMetadata.region_outcome = autodetectedRegionName ?\n RegionDiscoveryOutcomes.AUTO_DETECTION_REQUESTED_SUCCESSFUL :\n RegionDiscoveryOutcomes.AUTO_DETECTION_REQUESTED_FAILED;\n } else {\n if (autodetectedRegionName) {\n this.regionDiscoveryMetadata.region_outcome = (this.authorityOptions.azureRegionConfiguration.azureRegion === autodetectedRegionName) ?\n RegionDiscoveryOutcomes.CONFIGURED_MATCHES_DETECTED :\n RegionDiscoveryOutcomes.CONFIGURED_NOT_DETECTED;\n } else {\n this.regionDiscoveryMetadata.region_outcome = RegionDiscoveryOutcomes.CONFIGURED_NO_AUTO_DETECTION;\n }\n }\n\n if (azureRegion) {\n this.regionDiscoveryMetadata.region_used = azureRegion;\n metadata = Authority.replaceWithRegionalInformation(metadata, azureRegion);\n }\n }\n\n metadataEntity.updateEndpointMetadata(metadata, true);\n return AuthorityMetadataSource.NETWORK;\n } else {\n throw ClientAuthError.createUnableToGetOpenidConfigError(this.defaultOpenIdConfigurationEndpoint);\n }\n }\n\n /**\n * Compares the number of url components after the domain to determine if the cached authority metadata can be used for the requested authority\n * Protects against same domain different authority such as login.microsoftonline.com/tenant and login.microsoftonline.com/tfp/tenant/policy\n * @param metadataEntity\n */\n private isAuthoritySameType(metadataEntity: AuthorityMetadataEntity): boolean {\n const cachedAuthorityUrl = new UrlString(metadataEntity.canonical_authority);\n const cachedParts = cachedAuthorityUrl.getUrlComponents().PathSegments;\n \n return cachedParts.length === this.canonicalAuthorityUrlComponents.PathSegments.length;\n }\n\n /**\n * Parse authorityMetadata config option\n */\n private getEndpointMetadataFromConfig(): OpenIdConfigResponse | null {\n if (this.authorityOptions.authorityMetadata) {\n try {\n return JSON.parse(this.authorityOptions.authorityMetadata) as OpenIdConfigResponse;\n } catch (e) {\n throw ClientConfigurationError.createInvalidAuthorityMetadataError();\n }\n }\n\n return null;\n }\n\n /**\n * Gets OAuth endpoints from the given OpenID configuration endpoint.\n */\n private async getEndpointMetadataFromNetwork(): Promise {\n try {\n const response = await this.networkInterface.sendGetRequestAsync(this.defaultOpenIdConfigurationEndpoint);\n return isOpenIdConfigResponse(response.body) ? response.body : null;\n } catch (e) {\n return null;\n }\n }\n\n /**\n * Updates the AuthorityMetadataEntity with new aliases, preferred_network and preferred_cache and returns where the information was retrived from\n * @param cachedMetadata \n * @param newMetadata \n */\n private async updateCloudDiscoveryMetadata(metadataEntity: AuthorityMetadataEntity): Promise {\n let metadata = this.getCloudDiscoveryMetadataFromConfig();\n if (metadata) {\n metadataEntity.updateCloudDiscoveryMetadata(metadata, false);\n return AuthorityMetadataSource.CONFIG;\n }\n\n // If The cached metadata came from config but that config was not passed to this instance, we must go to the network\n if (this.isAuthoritySameType(metadataEntity) && metadataEntity.aliasesFromNetwork && !metadataEntity.isExpired()) {\n // No need to update\n return AuthorityMetadataSource.CACHE;\n }\n\n metadata = await this.getCloudDiscoveryMetadataFromNetwork();\n if (metadata) {\n metadataEntity.updateCloudDiscoveryMetadata(metadata, true);\n return AuthorityMetadataSource.NETWORK;\n } else {\n // Metadata could not be obtained from config, cache or network\n throw ClientConfigurationError.createUntrustedAuthorityError();\n }\n }\n\n /**\n * Parse cloudDiscoveryMetadata config or check knownAuthorities\n */\n private getCloudDiscoveryMetadataFromConfig(): CloudDiscoveryMetadata | null {\n // Check if network response was provided in config\n if (this.authorityOptions.cloudDiscoveryMetadata) {\n try {\n const parsedResponse = JSON.parse(this.authorityOptions.cloudDiscoveryMetadata) as CloudInstanceDiscoveryResponse;\n const metadata = Authority.getCloudDiscoveryMetadataFromNetworkResponse(parsedResponse.metadata, this.hostnameAndPort);\n if (metadata) {\n return metadata;\n }\n } catch (e) {\n throw ClientConfigurationError.createInvalidCloudDiscoveryMetadataError();\n }\n }\n\n // If cloudDiscoveryMetadata is empty or does not contain the host, check knownAuthorities\n if (this.isInKnownAuthorities()) {\n return Authority.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);\n }\n\n return null;\n }\n\n /**\n * Called to get metadata from network if CloudDiscoveryMetadata was not populated by config\n * @param networkInterface \n */\n private async getCloudDiscoveryMetadataFromNetwork(): Promise {\n const instanceDiscoveryEndpoint = `${Constants.AAD_INSTANCE_DISCOVERY_ENDPT}${this.canonicalAuthority}oauth2/v2.0/authorize`;\n let match = null;\n try {\n const response = await this.networkInterface.sendGetRequestAsync(instanceDiscoveryEndpoint);\n const metadata = isCloudInstanceDiscoveryResponse(response.body) ? response.body.metadata : [];\n if (metadata.length === 0) {\n // If no metadata is returned, authority is untrusted\n return null;\n }\n match = Authority.getCloudDiscoveryMetadataFromNetworkResponse(metadata, this.hostnameAndPort);\n } catch(e) {\n return null;\n }\n\n if (!match) {\n // Custom Domain scenario, host is trusted because Instance Discovery call succeeded \n match = Authority.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);\n }\n return match;\n } \n\n /**\n * Helper function to determine if this host is included in the knownAuthorities config option\n */\n private isInKnownAuthorities(): boolean {\n const matches = this.authorityOptions.knownAuthorities.filter((authority) => {\n return UrlString.getDomainFromUrl(authority).toLowerCase() === this.hostnameAndPort;\n });\n\n return matches.length > 0;\n }\n\n /**\n * Creates cloud discovery metadata object from a given host\n * @param host \n */\n static createCloudDiscoveryMetadataFromHost(host: string): CloudDiscoveryMetadata {\n return {\n preferred_network: host,\n preferred_cache: host,\n aliases: [host]\n };\n }\n\n /**\n * Searches instance discovery network response for the entry that contains the host in the aliases list\n * @param response \n * @param authority \n */\n static getCloudDiscoveryMetadataFromNetworkResponse(response: CloudDiscoveryMetadata[], authority: string): CloudDiscoveryMetadata | null {\n for (let i = 0; i < response.length; i++) {\n const metadata = response[i];\n if (metadata.aliases.indexOf(authority) > -1) {\n return metadata;\n }\n }\n\n return null;\n }\n\n /**\n * helper function to generate environment from authority object\n */\n getPreferredCache(): string {\n if(this.discoveryComplete()) {\n return this.metadata.preferred_cache;\n } else {\n throw ClientAuthError.createEndpointDiscoveryIncompleteError(\"Discovery incomplete.\");\n }\n }\n\n /**\n * Returns whether or not the provided host is an alias of this authority instance\n * @param host \n */\n isAlias(host: string): boolean {\n return this.metadata.aliases.indexOf(host) > -1;\n }\n\n /**\n * Checks whether the provided host is that of a public cloud authority\n * \n * @param authority string\n * @returns bool\n */\n static isPublicCloudAuthority(host: string): boolean {\n return Constants.KNOWN_PUBLIC_CLOUDS.indexOf(host) >= 0;\n }\n\n /**\n * Rebuild the authority string with the region\n * \n * @param host string\n * @param region string \n */\n static buildRegionalAuthorityString(host: string, region: string, queryString?: string): string {\n // Create and validate a Url string object with the initial authority string\n const authorityUrlInstance = new UrlString(host);\n authorityUrlInstance.validateAsUri();\n\n const authorityUrlParts = authorityUrlInstance.getUrlComponents();\n\n let hostNameAndPort= `${region}.${authorityUrlParts.HostNameAndPort}`;\n\n if (this.isPublicCloudAuthority(authorityUrlParts.HostNameAndPort)) {\n hostNameAndPort = `${region}.${Constants.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`;\n }\n\n // Include the query string portion of the url\n const url = UrlString.constructAuthorityUriFromObject({\n ...authorityUrlInstance.getUrlComponents(),\n HostNameAndPort: hostNameAndPort\n }).urlString;\n\n // Add the query string if a query string was provided\n if (queryString) return `${url}?${queryString}`;\n\n return url;\n }\n\n /**\n * Replace the endpoints in the metadata object with their regional equivalents.\n * \n * @param metadata OpenIdConfigResponse\n * @param azureRegion string\n */\n static replaceWithRegionalInformation(metadata: OpenIdConfigResponse, azureRegion: string): OpenIdConfigResponse {\n metadata.authorization_endpoint = Authority.buildRegionalAuthorityString(metadata.authorization_endpoint, azureRegion);\n // TODO: Enquire on whether we should leave the query string or remove it before releasing the feature\n metadata.token_endpoint = Authority.buildRegionalAuthorityString(metadata.token_endpoint, azureRegion, \"allowestsrnonmsi=true\");\n\n if (metadata.end_session_endpoint) {\n metadata.end_session_endpoint = Authority.buildRegionalAuthorityString(metadata.end_session_endpoint, azureRegion);\n }\n \n return metadata;\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { CloudDiscoveryMetadata } from \"./CloudDiscoveryMetadata\";\n\n/**\n * The OpenID Configuration Endpoint Response type. Used by the authority class to get relevant OAuth endpoints.\n */\nexport type CloudInstanceDiscoveryResponse = {\n tenant_discovery_endpoint: string;\n metadata: Array;\n};\n\nexport function isCloudInstanceDiscoveryResponse(response: object): boolean {\n return (\n response.hasOwnProperty(\"tenant_discovery_endpoint\") &&\n response.hasOwnProperty(\"metadata\")\n );\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { Authority } from \"./Authority\";\nimport { ClientConfigurationError } from \"../error/ClientConfigurationError\";\nimport { INetworkModule } from \"../network/INetworkModule\";\nimport { StringUtils } from \"../utils/StringUtils\";\nimport { ClientAuthError } from \"../error/ClientAuthError\";\nimport { ICacheManager } from \"../cache/interface/ICacheManager\";\nimport { AuthorityOptions } from \"./AuthorityOptions\";\n\nexport class AuthorityFactory {\n\n /**\n * Create an authority object of the correct type based on the url\n * Performs basic authority validation - checks to see if the authority is of a valid type (i.e. aad, b2c, adfs)\n *\n * Also performs endpoint discovery.\n *\n * @param authorityUri\n * @param networkClient\n * @param protocolMode\n */\n static async createDiscoveredInstance(authorityUri: string, networkClient: INetworkModule, cacheManager: ICacheManager, authorityOptions: AuthorityOptions): Promise {\n // Initialize authority and perform discovery endpoint check.\n const acquireTokenAuthority: Authority = AuthorityFactory.createInstance(authorityUri, networkClient, cacheManager, authorityOptions);\n\n try {\n await acquireTokenAuthority.resolveEndpointsAsync();\n return acquireTokenAuthority;\n } catch (e) {\n throw ClientAuthError.createEndpointDiscoveryIncompleteError(e);\n }\n }\n\n /**\n * Create an authority object of the correct type based on the url\n * Performs basic authority validation - checks to see if the authority is of a valid type (i.e. aad, b2c, adfs)\n *\n * Does not perform endpoint discovery.\n *\n * @param authorityUrl\n * @param networkInterface\n * @param protocolMode\n */\n static createInstance(authorityUrl: string, networkInterface: INetworkModule, cacheManager: ICacheManager, authorityOptions: AuthorityOptions): Authority {\n // Throw error if authority url is empty\n if (StringUtils.isEmpty(authorityUrl)) {\n throw ClientConfigurationError.createUrlEmptyError();\n }\n\n return new Authority(authorityUrl, networkInterface, cacheManager, authorityOptions);\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { SERVER_TELEM_CONSTANTS, Separators, CacheOutcome, Constants, RegionDiscoverySources, RegionDiscoveryOutcomes } from \"../../utils/Constants\";\nimport { CacheManager } from \"../../cache/CacheManager\";\nimport { AuthError } from \"../../error/AuthError\";\nimport { ServerTelemetryRequest } from \"./ServerTelemetryRequest\";\nimport { ServerTelemetryEntity } from \"../../cache/entities/ServerTelemetryEntity\";\nimport { StringUtils } from \"../../utils/StringUtils\";\nimport { RegionDiscoveryMetadata } from \"../../authority/RegionDiscoveryMetadata\";\n\nexport class ServerTelemetryManager {\n private cacheManager: CacheManager;\n private apiId: number;\n private correlationId: string;\n private telemetryCacheKey: string;\n private wrapperSKU: String;\n private wrapperVer: String;\n private regionUsed: string | undefined;\n private regionSource: RegionDiscoverySources | undefined;\n private regionOutcome: RegionDiscoveryOutcomes | undefined;\n private cacheOutcome: CacheOutcome = CacheOutcome.NO_CACHE_HIT;\n\n constructor(telemetryRequest: ServerTelemetryRequest, cacheManager: CacheManager) {\n this.cacheManager = cacheManager;\n this.apiId = telemetryRequest.apiId;\n this.correlationId = telemetryRequest.correlationId;\n this.wrapperSKU = telemetryRequest.wrapperSKU || Constants.EMPTY_STRING;\n this.wrapperVer = telemetryRequest.wrapperVer || Constants.EMPTY_STRING;\n\n this.telemetryCacheKey = SERVER_TELEM_CONSTANTS.CACHE_KEY + Separators.CACHE_KEY_SEPARATOR + telemetryRequest.clientId;\n }\n\n /**\n * API to add MSER Telemetry to request\n */\n generateCurrentRequestHeaderValue(): string {\n const request = `${this.apiId}${SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR}${this.cacheOutcome}`;\n const platformFields = [this.wrapperSKU, this.wrapperVer].join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR);\n const regionDiscoveryFields = this.getRegionDiscoveryFields();\n const requestWithRegionDiscoveryFields = [request, regionDiscoveryFields].join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR);\n\n return [SERVER_TELEM_CONSTANTS.SCHEMA_VERSION, requestWithRegionDiscoveryFields, platformFields].join(SERVER_TELEM_CONSTANTS.CATEGORY_SEPARATOR);\n }\n\n /**\n * API to add MSER Telemetry for the last failed request\n */\n generateLastRequestHeaderValue(): string {\n const lastRequests = this.getLastRequests();\n\n const maxErrors = ServerTelemetryManager.maxErrorsToSend(lastRequests);\n const failedRequests = lastRequests.failedRequests.slice(0, 2*maxErrors).join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR);\n const errors = lastRequests.errors.slice(0, maxErrors).join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR);\n const errorCount = lastRequests.errors.length;\n\n // Indicate whether this header contains all data or partial data\n const overflow = maxErrors < errorCount ? SERVER_TELEM_CONSTANTS.OVERFLOW_TRUE : SERVER_TELEM_CONSTANTS.OVERFLOW_FALSE;\n const platformFields = [errorCount, overflow].join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR);\n\n return [SERVER_TELEM_CONSTANTS.SCHEMA_VERSION, lastRequests.cacheHits, failedRequests, errors, platformFields].join(SERVER_TELEM_CONSTANTS.CATEGORY_SEPARATOR);\n }\n\n /**\n * API to cache token failures for MSER data capture\n * @param error\n */\n cacheFailedRequest(error: AuthError): void {\n const lastRequests = this.getLastRequests();\n if (lastRequests.errors.length >= SERVER_TELEM_CONSTANTS.MAX_CACHED_ERRORS) {\n // Remove a cached error to make room, first in first out\n lastRequests.failedRequests.shift(); // apiId\n lastRequests.failedRequests.shift(); // correlationId\n lastRequests.errors.shift();\n }\n \n lastRequests.failedRequests.push(this.apiId, this.correlationId);\n\n if (!StringUtils.isEmpty(error.subError)) {\n lastRequests.errors.push(error.subError);\n } else if (!StringUtils.isEmpty(error.errorCode)) {\n lastRequests.errors.push(error.errorCode);\n } else if (!!error && error.toString()) {\n lastRequests.errors.push(error.toString());\n } else {\n lastRequests.errors.push(SERVER_TELEM_CONSTANTS.UNKNOWN_ERROR);\n }\n\n this.cacheManager.setServerTelemetry(this.telemetryCacheKey, lastRequests);\n\n return;\n }\n\n /**\n * Update server telemetry cache entry by incrementing cache hit counter\n */\n incrementCacheHits(): number {\n const lastRequests = this.getLastRequests();\n lastRequests.cacheHits += 1;\n\n this.cacheManager.setServerTelemetry(this.telemetryCacheKey, lastRequests);\n return lastRequests.cacheHits;\n }\n\n /**\n * Get the server telemetry entity from cache or initialize a new one\n */\n getLastRequests(): ServerTelemetryEntity {\n const initialValue: ServerTelemetryEntity = new ServerTelemetryEntity();\n const lastRequests = this.cacheManager.getServerTelemetry(this.telemetryCacheKey) as ServerTelemetryEntity;\n\n return lastRequests || initialValue;\n }\n\n /**\n * Remove server telemetry cache entry\n */\n clearTelemetryCache(): void {\n const lastRequests = this.getLastRequests();\n const numErrorsFlushed = ServerTelemetryManager.maxErrorsToSend(lastRequests);\n const errorCount = lastRequests.errors.length;\n if (numErrorsFlushed === errorCount) {\n // All errors were sent on last request, clear Telemetry cache\n this.cacheManager.removeItem(this.telemetryCacheKey);\n } else {\n // Partial data was flushed to server, construct a new telemetry cache item with errors that were not flushed\n const serverTelemEntity = new ServerTelemetryEntity();\n serverTelemEntity.failedRequests = lastRequests.failedRequests.slice(numErrorsFlushed*2); // failedRequests contains 2 items for each error\n serverTelemEntity.errors = lastRequests.errors.slice(numErrorsFlushed);\n\n this.cacheManager.setServerTelemetry(this.telemetryCacheKey, serverTelemEntity);\n }\n }\n\n /**\n * Returns the maximum number of errors that can be flushed to the server in the next network request\n * @param serverTelemetryEntity\n */\n static maxErrorsToSend(serverTelemetryEntity: ServerTelemetryEntity): number {\n let i;\n let maxErrors = 0;\n let dataSize = 0;\n const errorCount = serverTelemetryEntity.errors.length;\n for (i = 0; i < errorCount; i++) {\n // failedRequests parameter contains pairs of apiId and correlationId, multiply index by 2 to preserve pairs\n const apiId = serverTelemetryEntity.failedRequests[2*i] || Constants.EMPTY_STRING;\n const correlationId = serverTelemetryEntity.failedRequests[2*i + 1] || Constants.EMPTY_STRING;\n const errorCode = serverTelemetryEntity.errors[i] || Constants.EMPTY_STRING;\n\n // Count number of characters that would be added to header, each character is 1 byte. Add 3 at the end to account for separators\n dataSize += apiId.toString().length + correlationId.toString().length + errorCode.length + 3;\n\n if (dataSize < SERVER_TELEM_CONSTANTS.MAX_LAST_HEADER_BYTES) {\n // Adding this entry to the header would still keep header size below the limit\n maxErrors += 1;\n } else {\n break;\n }\n }\n\n return maxErrors;\n }\n\n /**\n * Get the region discovery fields\n * \n * @returns string\n */\n getRegionDiscoveryFields(): string {\n const regionDiscoveryFields: string[] = [];\n\n regionDiscoveryFields.push(this.regionUsed || \"\");\n regionDiscoveryFields.push(this.regionSource || \"\");\n regionDiscoveryFields.push(this.regionOutcome || \"\");\n\n return regionDiscoveryFields.join(\",\");\n }\n\n /**\n * Update the region discovery metadata\n * \n * @param regionDiscoveryMetadata\n * @returns void\n */\n updateRegionDiscoveryMetadata(regionDiscoveryMetadata: RegionDiscoveryMetadata): void {\n this.regionUsed = regionDiscoveryMetadata.region_used;\n this.regionSource = regionDiscoveryMetadata.region_source;\n this.regionOutcome = regionDiscoveryMetadata.region_outcome;\n }\n\n /**\n * Set cache outcome \n */\n setCacheOutcome(cacheOutcome: CacheOutcome): void {\n this.cacheOutcome = cacheOutcome;\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ICrypto, Logger, ServerTelemetryManager, CommonAuthorizationCodeRequest, Constants, AuthorizationCodeClient, ClientConfiguration, AuthorityOptions, Authority, AuthorityFactory, ServerAuthorizationCodeResponse, UrlString, CommonEndSessionRequest, ProtocolUtils, ResponseMode, StringUtils } from \"@azure/msal-common\";\nimport { BaseInteractionClient } from \"./BaseInteractionClient\";\nimport { BrowserConfiguration } from \"../config/Configuration\";\nimport { AuthorizationUrlRequest } from \"../request/AuthorizationUrlRequest\";\nimport { BrowserCacheManager } from \"../cache/BrowserCacheManager\";\nimport { EventHandler } from \"../event/EventHandler\";\nimport { BrowserConstants, InteractionType } from \"../utils/BrowserConstants\";\nimport { version } from \"../packageMetadata\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\nimport { BrowserProtocolUtils, BrowserStateObject } from \"../utils/BrowserProtocolUtils\";\nimport { EndSessionRequest } from \"../request/EndSessionRequest\";\nimport { BrowserUtils } from \"../utils/BrowserUtils\";\nimport { INavigationClient } from \"../navigation/INavigationClient\";\nimport { RedirectRequest } from \"../request/RedirectRequest\";\nimport { PopupRequest } from \"../request/PopupRequest\";\nimport { SsoSilentRequest } from \"../request/SsoSilentRequest\";\n\n/**\n * Defines the class structure and helper functions used by the \"standard\", non-brokered auth flows (popup, redirect, silent (RT), silent (iframe))\n */\nexport abstract class StandardInteractionClient extends BaseInteractionClient {\n protected navigationClient: INavigationClient;\n\n constructor(config: BrowserConfiguration, storageImpl: BrowserCacheManager, browserCrypto: ICrypto, logger: Logger, eventHandler: EventHandler, navigationClient: INavigationClient, correlationId?: string) {\n super(config, storageImpl, browserCrypto, logger, eventHandler, correlationId);\n this.navigationClient = navigationClient;\n }\n \n /**\n * Generates an auth code request tied to the url request.\n * @param request\n */\n protected async initializeAuthorizationCodeRequest(request: AuthorizationUrlRequest): Promise {\n this.logger.verbose(\"initializeAuthorizationRequest called\", request.correlationId);\n const generatedPkceParams = await this.browserCrypto.generatePkceCodes();\n\n const authCodeRequest: CommonAuthorizationCodeRequest = {\n ...request,\n redirectUri: request.redirectUri,\n code: \"\",\n codeVerifier: generatedPkceParams.verifier\n };\n\n request.codeChallenge = generatedPkceParams.challenge;\n request.codeChallengeMethod = Constants.S256_CODE_CHALLENGE_METHOD;\n\n return authCodeRequest;\n }\n\n /**\n * Initializer for the logout request.\n * @param logoutRequest\n */\n protected initializeLogoutRequest(logoutRequest?: EndSessionRequest): CommonEndSessionRequest {\n this.logger.verbose(\"initializeLogoutRequest called\", logoutRequest?.correlationId);\n\n // Check if interaction is in progress. Throw error if true.\n if (this.browserStorage.isInteractionInProgress()) {\n throw BrowserAuthError.createInteractionInProgressError();\n }\n\n const validLogoutRequest: CommonEndSessionRequest = {\n correlationId: this.browserCrypto.createNewGuid(),\n ...logoutRequest\n };\n\n /*\n * Only set redirect uri if logout request isn't provided or the set uri isn't null.\n * Otherwise, use passed uri, config, or current page.\n */\n if (!logoutRequest || logoutRequest.postLogoutRedirectUri !== null) {\n if (logoutRequest && logoutRequest.postLogoutRedirectUri) {\n this.logger.verbose(\"Setting postLogoutRedirectUri to uri set on logout request\", validLogoutRequest.correlationId);\n validLogoutRequest.postLogoutRedirectUri = UrlString.getAbsoluteUrl(logoutRequest.postLogoutRedirectUri, BrowserUtils.getCurrentUri());\n } else if (this.config.auth.postLogoutRedirectUri === null) {\n this.logger.verbose(\"postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect\", validLogoutRequest.correlationId);\n } else if (this.config.auth.postLogoutRedirectUri) {\n this.logger.verbose(\"Setting postLogoutRedirectUri to configured uri\", validLogoutRequest.correlationId);\n validLogoutRequest.postLogoutRedirectUri = UrlString.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri, BrowserUtils.getCurrentUri());\n } else {\n this.logger.verbose(\"Setting postLogoutRedirectUri to current page\", validLogoutRequest.correlationId);\n validLogoutRequest.postLogoutRedirectUri = UrlString.getAbsoluteUrl(BrowserUtils.getCurrentUri(), BrowserUtils.getCurrentUri());\n }\n } else {\n this.logger.verbose(\"postLogoutRedirectUri passed as null, not setting post logout redirect uri\", validLogoutRequest.correlationId);\n }\n\n return validLogoutRequest;\n }\n\n /**\n * Creates an Authorization Code Client with the given authority, or the default authority.\n * @param serverTelemetryManager\n * @param authorityUrl\n */\n protected async createAuthCodeClient(serverTelemetryManager: ServerTelemetryManager, authorityUrl?: string): Promise {\n // Create auth module.\n const clientConfig = await this.getClientConfiguration(serverTelemetryManager, authorityUrl);\n return new AuthorizationCodeClient(clientConfig);\n }\n\n /**\n * Creates a Client Configuration object with the given request authority, or the default authority.\n * @param serverTelemetryManager\n * @param requestAuthority\n * @param requestCorrelationId\n */\n protected async getClientConfiguration(serverTelemetryManager: ServerTelemetryManager, requestAuthority?: string): Promise {\n this.logger.verbose(\"getClientConfiguration called\");\n const discoveredAuthority = await this.getDiscoveredAuthority(requestAuthority);\n\n return {\n authOptions: {\n clientId: this.config.auth.clientId,\n authority: discoveredAuthority,\n clientCapabilities: this.config.auth.clientCapabilities\n },\n systemOptions: {\n tokenRenewalOffsetSeconds: this.config.system.tokenRenewalOffsetSeconds,\n preventCorsPreflight: true\n },\n loggerOptions: {\n loggerCallback: this.config.system.loggerOptions.loggerCallback,\n piiLoggingEnabled: this.config.system.loggerOptions.piiLoggingEnabled,\n logLevel: this.config.system.loggerOptions.logLevel,\n correlationId: this.correlationId\n },\n cryptoInterface: this.browserCrypto,\n networkInterface: this.networkClient,\n storageInterface: this.browserStorage,\n serverTelemetryManager: serverTelemetryManager,\n libraryInfo: {\n sku: BrowserConstants.MSAL_SKU,\n version: version,\n cpu: \"\",\n os: \"\"\n }\n };\n }\n\n /**\n * @param hash\n * @param interactionType\n */\n protected validateAndExtractStateFromHash(hash: string, interactionType: InteractionType, requestCorrelationId?: string): string {\n this.logger.verbose(\"validateAndExtractStateFromHash called\", requestCorrelationId);\n // Deserialize hash fragment response parameters.\n const serverParams: ServerAuthorizationCodeResponse = UrlString.getDeserializedHash(hash);\n if (!serverParams.state) {\n throw BrowserAuthError.createHashDoesNotContainStateError();\n }\n\n const platformStateObj = BrowserProtocolUtils.extractBrowserRequestState(this.browserCrypto, serverParams.state);\n if (!platformStateObj) {\n throw BrowserAuthError.createUnableToParseStateError();\n }\n\n if (platformStateObj.interactionType !== interactionType) {\n throw BrowserAuthError.createStateInteractionTypeMismatchError();\n }\n\n this.logger.verbose(\"Returning state from hash\", requestCorrelationId);\n return serverParams.state;\n }\n\n /**\n * Used to get a discovered version of the default authority.\n * @param requestAuthority\n * @param requestCorrelationId\n */\n protected async getDiscoveredAuthority(requestAuthority?: string): Promise {\n this.logger.verbose(\"getDiscoveredAuthority called\");\n const authorityOptions: AuthorityOptions = {\n protocolMode: this.config.auth.protocolMode,\n knownAuthorities: this.config.auth.knownAuthorities,\n cloudDiscoveryMetadata: this.config.auth.cloudDiscoveryMetadata,\n authorityMetadata: this.config.auth.authorityMetadata\n };\n\n if (requestAuthority) {\n this.logger.verbose(\"Creating discovered authority with request authority\");\n return await AuthorityFactory.createDiscoveredInstance(requestAuthority, this.config.system.networkClient, this.browserStorage, authorityOptions);\n }\n\n this.logger.verbose(\"Creating discovered authority with configured authority\");\n return await AuthorityFactory.createDiscoveredInstance(this.config.auth.authority, this.config.system.networkClient, this.browserStorage, authorityOptions);\n }\n\n /**\n * Helper to validate app environment before making a request.\n * @param request\n * @param interactionType\n */\n protected async preflightInteractiveRequest(request: RedirectRequest|PopupRequest, interactionType: InteractionType): Promise {\n this.logger.verbose(\"preflightInteractiveRequest called, validating app environment\", request?.correlationId);\n // block the reload if it occurred inside a hidden iframe\n BrowserUtils.blockReloadInHiddenIframes();\n \n // Check if interaction is in progress. Throw error if true.\n if (this.browserStorage.isInteractionInProgress(false)) {\n throw BrowserAuthError.createInteractionInProgressError();\n }\n \n return await this.initializeAuthorizationRequest(request, interactionType);\n }\n\n /**\n * Helper to initialize required request parameters for interactive APIs and ssoSilent()\n * @param request\n * @param interactionType\n */\n protected async initializeAuthorizationRequest(request: RedirectRequest|PopupRequest|SsoSilentRequest, interactionType: InteractionType): Promise {\n this.logger.verbose(\"initializeAuthorizationRequest called\");\n const redirectUri = this.getRedirectUri(request.redirectUri);\n const browserState: BrowserStateObject = {\n interactionType: interactionType\n };\n\n const state = ProtocolUtils.setRequestState(\n this.browserCrypto,\n (request && request.state) || \"\",\n browserState\n );\n\n const validatedRequest: AuthorizationUrlRequest = {\n ...await this.initializeBaseRequest(request),\n redirectUri: redirectUri,\n state: state,\n nonce: request.nonce || this.browserCrypto.createNewGuid(),\n responseMode: ResponseMode.FRAGMENT\n };\n\n const account = request.account || this.browserStorage.getActiveAccount();\n if (account) {\n this.logger.verbose(\"Setting validated request account\");\n this.logger.verbosePii(`Setting validated request account: ${account}`);\n validatedRequest.account = account;\n }\n\n // Check for ADAL/MSAL v1 SSO\n if (StringUtils.isEmpty(validatedRequest.loginHint) && !account) {\n const legacyLoginHint = this.browserStorage.getLegacyLoginHint();\n if (legacyLoginHint) {\n validatedRequest.loginHint = legacyLoginHint;\n }\n }\n\n this.browserStorage.updateCacheEntries(validatedRequest.state, validatedRequest.nonce, validatedRequest.authority, validatedRequest.loginHint || \"\", validatedRequest.account || null);\n\n return validatedRequest;\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ICrypto, INetworkModule, Logger, AuthenticationResult, AccountInfo, AccountEntity, BaseAuthRequest, AuthenticationScheme, UrlString, ServerTelemetryManager, ServerTelemetryRequest, ClientConfigurationError, StringUtils } from \"@azure/msal-common\";\nimport { BrowserConfiguration } from \"../config/Configuration\";\nimport { BrowserCacheManager } from \"../cache/BrowserCacheManager\";\nimport { EventHandler } from \"../event/EventHandler\";\nimport { EndSessionRequest } from \"../request/EndSessionRequest\";\nimport { RedirectRequest } from \"../request/RedirectRequest\";\nimport { PopupRequest } from \"../request/PopupRequest\";\nimport { SsoSilentRequest } from \"../request/SsoSilentRequest\";\nimport { version } from \"../packageMetadata\";\nimport { BrowserConstants } from \"../utils/BrowserConstants\";\nimport { BrowserUtils } from \"../utils/BrowserUtils\";\n\nexport abstract class BaseInteractionClient {\n\n protected config: BrowserConfiguration;\n protected browserStorage: BrowserCacheManager;\n protected browserCrypto: ICrypto;\n protected networkClient: INetworkModule;\n protected logger: Logger;\n protected eventHandler: EventHandler;\n protected correlationId: string;\n\n constructor(config: BrowserConfiguration, storageImpl: BrowserCacheManager, browserCrypto: ICrypto, logger: Logger, eventHandler: EventHandler, correlationId?: string) {\n this.config = config;\n this.browserStorage = storageImpl;\n this.browserCrypto = browserCrypto;\n this.networkClient = this.config.system.networkClient;\n this.eventHandler = eventHandler;\n this.correlationId = correlationId || this.browserCrypto.createNewGuid();\n this.logger = logger.clone(BrowserConstants.MSAL_SKU, version, this.correlationId);\n }\n\n abstract acquireToken(request: RedirectRequest|PopupRequest|SsoSilentRequest): Promise;\n\n abstract logout(request: EndSessionRequest): Promise;\n\n protected async clearCacheOnLogout(account?: AccountInfo| null): Promise {\n if (account) {\n if (AccountEntity.accountInfoIsEqual(account, this.browserStorage.getActiveAccount(), false)) {\n this.logger.verbose(\"Setting active account to null\");\n this.browserStorage.setActiveAccount(null);\n }\n // Clear given account.\n try {\n await this.browserStorage.removeAccount(AccountEntity.generateAccountCacheKey(account));\n this.logger.verbose(\"Cleared cache items belonging to the account provided in the logout request.\");\n } catch (error) {\n this.logger.error(\"Account provided in logout request was not found. Local cache unchanged.\");\n }\n } else {\n try {\n // Clear all accounts and tokens\n await this.browserStorage.clear();\n // Clear any stray keys from IndexedDB\n await this.browserCrypto.clearKeystore();\n this.logger.verbose(\"No account provided in logout request, clearing all cache items.\");\n } catch(e) {\n this.logger.error(\"Attempted to clear all MSAL cache items and failed. Local cache unchanged.\");\n }\n }\n }\n\n /**\n * Initializer function for all request APIs\n * @param request\n */\n protected async initializeBaseRequest(request: Partial): Promise {\n this.logger.verbose(\"Initializing BaseAuthRequest\");\n const authority = request.authority || this.config.auth.authority;\n\n const scopes = [...((request && request.scopes) || [])];\n\n // Set authenticationScheme to BEARER if not explicitly set in the request\n if (!request.authenticationScheme) {\n request.authenticationScheme = AuthenticationScheme.BEARER;\n this.logger.verbose(\"Authentication Scheme wasn't explicitly set in request, defaulting to \\\"Bearer\\\" request\");\n } else {\n if (request.authenticationScheme === AuthenticationScheme.SSH) {\n if (!request.sshJwk) {\n throw ClientConfigurationError.createMissingSshJwkError();\n }\n if(!request.sshKid) {\n throw ClientConfigurationError.createMissingSshKidError();\n }\n }\n this.logger.verbose(`Authentication Scheme set to \"${request.authenticationScheme}\" as configured in Auth request`);\n }\n\n // Set requested claims hash if claims were requested\n if (request.claims && !StringUtils.isEmpty(request.claims)) {\n request.requestedClaimsHash = await this.browserCrypto.hashString(request.claims);\n } \n\n const validatedRequest: BaseAuthRequest = {\n ...request,\n correlationId: this.correlationId,\n authority,\n scopes\n };\n\n return validatedRequest;\n }\n\n /**\n *\n * Use to get the redirect uri configured in MSAL or null.\n * @param requestRedirectUri\n * @returns Redirect URL\n *\n */\n protected getRedirectUri(requestRedirectUri?: string): string {\n this.logger.verbose(\"getRedirectUri called\");\n const redirectUri = requestRedirectUri || this.config.auth.redirectUri || BrowserUtils.getCurrentUri();\n return UrlString.getAbsoluteUrl(redirectUri, BrowserUtils.getCurrentUri());\n }\n\n /**\n *\n * @param apiId\n * @param correlationId\n * @param forceRefresh\n */\n protected initializeServerTelemetryManager(apiId: number, forceRefresh?: boolean): ServerTelemetryManager {\n this.logger.verbose(\"initializeServerTelemetryManager called\");\n const telemetryPayload: ServerTelemetryRequest = {\n clientId: this.config.auth.clientId,\n correlationId: this.correlationId,\n apiId: apiId,\n forceRefresh: forceRefresh || false,\n wrapperSKU: this.browserStorage.getWrapperMetadata()[0],\n wrapperVer: this.browserStorage.getWrapperMetadata()[1]\n };\n\n return new ServerTelemetryManager(telemetryPayload, this.browserStorage);\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { CommonEndSessionRequest, Constants, Logger, StringUtils } from \"@azure/msal-common\";\nimport { BrowserCacheManager } from \"../cache/BrowserCacheManager\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\nimport { PopupParams } from \"../interaction_handler/PopupHandler\";\nimport { AuthorizationUrlRequest } from \"../request/AuthorizationUrlRequest\";\nimport { BrowserConstants, InteractionType } from \"./BrowserConstants\";\n\n/**\n * Popup configurations for setting dimensions and position of popup window\n */\nexport type PopupWindowAttributes = {\n popupSize?: PopupSize,\n popupPosition?: PopupPosition\n};\n\nexport type PopupSize = {\n height: number;\n width: number;\n};\n\nexport type PopupPosition = {\n top: number;\n left: number;\n};\n\nexport class PopupUtils {\n private browserStorage: BrowserCacheManager;\n private logger: Logger;\n private currentWindow: Window|undefined;\n\n constructor(storageImpl: BrowserCacheManager, logger: Logger) {\n this.browserStorage = storageImpl;\n this.logger = logger;\n\n // Properly sets this reference for the unload event.\n this.unloadWindow = this.unloadWindow.bind(this);\n }\n\n /**\n * @hidden\n *\n * Configures popup window for login.\n *\n * @param urlNavigate\n * @param title\n * @param popUpWidth\n * @param popUpHeight\n * @param popupWindowAttributes\n * @ignore\n * @hidden\n */\n openPopup(urlNavigate: string, popupParams: PopupParams): Window {\n try {\n let popupWindow;\n // Popup window passed in, setting url to navigate to\n if (popupParams.popup) {\n popupWindow = popupParams.popup;\n this.logger.verbosePii(`Navigating popup window to: ${urlNavigate}`);\n popupWindow.location.assign(urlNavigate);\n } else if (typeof popupParams.popup === \"undefined\") {\n // Popup will be undefined if it was not passed in\n this.logger.verbosePii(`Opening popup window to: ${urlNavigate}`);\n popupWindow = PopupUtils.openSizedPopup(urlNavigate, popupParams.popupName, popupParams.popupWindowAttributes, this.logger);\n }\n\n // Popup will be null if popups are blocked\n if (!popupWindow) {\n throw BrowserAuthError.createEmptyWindowCreatedError();\n }\n if (popupWindow.focus) {\n popupWindow.focus();\n }\n this.currentWindow = popupWindow;\n window.addEventListener(\"beforeunload\", this.unloadWindow);\n\n return popupWindow;\n } catch (e) {\n this.logger.error(\"error opening popup \" + e.message);\n this.browserStorage.setInteractionInProgress(false);\n throw BrowserAuthError.createPopupWindowError(e.toString());\n }\n }\n\n /**\n * Helper function to set popup window dimensions and position\n * @param urlNavigate \n * @param popupName \n * @param popupWindowAttributes \n * @returns \n */\n static openSizedPopup(urlNavigate: string, popupName: string, popupWindowAttributes: PopupWindowAttributes, logger: Logger): Window|null {\n /**\n * adding winLeft and winTop to account for dual monitor\n * using screenLeft and screenTop for IE8 and earlier\n */\n const winLeft = window.screenLeft ? window.screenLeft : window.screenX;\n const winTop = window.screenTop ? window.screenTop : window.screenY;\n /**\n * window.innerWidth displays browser window\"s height and width excluding toolbars\n * using document.documentElement.clientWidth for IE8 and earlier\n */\n const winWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;\n const winHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;\n\n let width = popupWindowAttributes.popupSize?.width;\n let height = popupWindowAttributes.popupSize?.height;\n let top = popupWindowAttributes.popupPosition?.top;\n let left = popupWindowAttributes.popupPosition?.left;\n\n if (!width || width < 0 || width > winWidth) {\n logger.verbose(\"Default popup window width used. Window width not configured or invalid.\");\n width = BrowserConstants.POPUP_WIDTH;\n }\n\n if (!height || height < 0 || height > winHeight) {\n logger.verbose(\"Default popup window height used. Window height not configured or invalid.\");\n height = BrowserConstants.POPUP_HEIGHT;\n }\n\n if (!top || top < 0 || top > winHeight) {\n logger.verbose(\"Default popup window top position used. Window top not configured or invalid.\");\n top = Math.max(0, ((winHeight / 2) - (BrowserConstants.POPUP_HEIGHT / 2)) + winTop);\n }\n\n if (!left || left < 0 || left > winWidth) {\n logger.verbose(\"Default popup window left position used. Window left not configured or invalid.\");\n left = Math.max(0, ((winWidth / 2) - (BrowserConstants.POPUP_WIDTH / 2)) + winLeft);\n }\n\n return window.open(urlNavigate, popupName, `width=${width}, height=${height}, top=${top}, left=${left}, scrollbars=yes`);\n }\n\n /**\n * Event callback to unload main window.\n */\n unloadWindow(e: Event): void {\n this.browserStorage.cleanRequestByInteractionType(InteractionType.Popup);\n if (this.currentWindow) {\n this.currentWindow.close();\n }\n // Guarantees browser unload will happen, so no other errors will be thrown.\n e.preventDefault();\n }\n\n /**\n * Closes popup, removes any state vars created during popup calls.\n * @param popupWindow\n */\n cleanPopup(popupWindow?: Window): void {\n if (popupWindow) {\n // Close window.\n popupWindow.close();\n }\n // Remove window unload function\n window.removeEventListener(\"beforeunload\", this.unloadWindow);\n\n // Interaction is completed - remove interaction status.\n this.browserStorage.setInteractionInProgress(false);\n }\n\n /**\n * Monitors a window until it loads a url with the same origin.\n * @param popupWindow - window that is being monitored\n */\n monitorPopupForSameOrigin(popupWindow: Window): Promise {\n return new Promise((resolve, reject) => {\n const intervalId = setInterval(() => {\n if (popupWindow.closed) {\n // Window is closed\n this.cleanPopup();\n clearInterval(intervalId);\n reject(BrowserAuthError.createUserCancelledError());\n return;\n }\n\n let href: string = Constants.EMPTY_STRING;\n try {\n /*\n * Will throw if cross origin,\n * which should be caught and ignored\n * since we need the interval to keep running while on STS UI.\n */\n href = popupWindow.location.href;\n } catch (e) {}\n\n // Don't process blank pages or cross domain\n if (StringUtils.isEmpty(href) || href === \"about:blank\") {\n return;\n }\n\n clearInterval(intervalId);\n resolve();\n }, BrowserConstants.POLL_INTERVAL_MS);\n });\n }\n\n /**\n * Generates the name for the popup based on the client id and request\n * @param clientId\n * @param request\n */\n static generatePopupName(clientId: string, request: AuthorizationUrlRequest): string {\n return `${BrowserConstants.POPUP_NAME_PREFIX}.${clientId}.${request.scopes.join(\"-\")}.${request.authority}.${request.correlationId}`;\n }\n\n /**\n * Generates the name for the popup based on the client id and request for logouts\n * @param clientId \n * @param request \n */\n static generateLogoutPopupName(clientId: string, request: CommonEndSessionRequest): string {\n const homeAccountId = request.account && request.account.homeAccountId;\n return `${BrowserConstants.POPUP_NAME_PREFIX}.${clientId}.${homeAccountId}.${request.correlationId}`;\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AuthorizationCodePayload , StringUtils, CommonAuthorizationCodeRequest, AuthenticationResult, AuthorizationCodeClient, AuthorityFactory, Authority, INetworkModule, ClientAuthError, CcsCredential, Logger } from \"@azure/msal-common\";\n\nimport { BrowserCacheManager } from \"../cache/BrowserCacheManager\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\nimport { TemporaryCacheKeys } from \"../utils/BrowserConstants\";\n\nexport type InteractionParams = {};\n\n/**\n * Abstract class which defines operations for a browser interaction handling class.\n */\nexport abstract class InteractionHandler {\n\n protected authModule: AuthorizationCodeClient;\n protected browserStorage: BrowserCacheManager;\n protected authCodeRequest: CommonAuthorizationCodeRequest;\n protected browserRequestLogger: Logger;\n\n constructor(authCodeModule: AuthorizationCodeClient, storageImpl: BrowserCacheManager, authCodeRequest: CommonAuthorizationCodeRequest, browserRequestLogger: Logger) {\n this.authModule = authCodeModule;\n this.browserStorage = storageImpl;\n this.authCodeRequest = authCodeRequest;\n this.browserRequestLogger = browserRequestLogger;\n }\n\n /**\n * Function to enable user interaction.\n * @param requestUrl\n */\n abstract initiateAuthRequest(requestUrl: string, params: InteractionParams): Window | Promise | Promise;\n\n /**\n * Function to handle response parameters from hash.\n * @param locationHash\n */\n async handleCodeResponseFromHash(locationHash: string, state: string, authority: Authority, networkModule: INetworkModule): Promise {\n this.browserRequestLogger.verbose(\"InteractionHandler.handleCodeResponse called\");\n // Check that location hash isn't empty.\n if (StringUtils.isEmpty(locationHash)) {\n throw BrowserAuthError.createEmptyHashError(locationHash);\n }\n\n // Handle code response.\n const stateKey = this.browserStorage.generateStateKey(state);\n const requestState = this.browserStorage.getTemporaryCache(stateKey);\n if (!requestState) {\n throw ClientAuthError.createStateNotFoundError(\"Cached State\");\n }\n const authCodeResponse = this.authModule.handleFragmentResponse(locationHash, requestState);\n\n return this.handleCodeResponseFromServer(authCodeResponse, state, authority, networkModule);\n }\n\n /**\n * Process auth code response from AAD\n * @param authCodeResponse \n * @param state \n * @param authority \n * @param networkModule \n * @returns \n */\n async handleCodeResponseFromServer(authCodeResponse: AuthorizationCodePayload, state: string, authority: Authority, networkModule: INetworkModule, validateNonce: boolean = true): Promise {\n this.browserRequestLogger.trace(\"InteractionHandler.handleCodeResponseFromServer called\");\n\n // Handle code response.\n const stateKey = this.browserStorage.generateStateKey(state);\n const requestState = this.browserStorage.getTemporaryCache(stateKey);\n if (!requestState) {\n throw ClientAuthError.createStateNotFoundError(\"Cached State\");\n }\n \n // Get cached items\n const nonceKey = this.browserStorage.generateNonceKey(requestState);\n const cachedNonce = this.browserStorage.getTemporaryCache(nonceKey);\n\n // Assign code to request\n this.authCodeRequest.code = authCodeResponse.code;\n\n // Check for new cloud instance\n if (authCodeResponse.cloud_instance_host_name) {\n await this.updateTokenEndpointAuthority(authCodeResponse.cloud_instance_host_name, authority, networkModule);\n }\n\n // Nonce validation not needed when redirect not involved (e.g. hybrid spa, renewing token via rt)\n if (validateNonce) {\n authCodeResponse.nonce = cachedNonce || undefined;\n }\n \n authCodeResponse.state = requestState;\n\n // Add CCS parameters if available\n if (authCodeResponse.client_info) {\n this.authCodeRequest.clientInfo = authCodeResponse.client_info;\n } else {\n const cachedCcsCred = this.checkCcsCredentials();\n if (cachedCcsCred) {\n this.authCodeRequest.ccsCredential = cachedCcsCred;\n }\n }\n\n // Acquire token with retrieved code.\n const tokenResponse = await this.authModule.acquireToken(this.authCodeRequest, authCodeResponse);\n this.browserStorage.cleanRequestByState(state);\n return tokenResponse;\n }\n\n /**\n * Updates authority based on cloudInstanceHostname\n * @param cloudInstanceHostname \n * @param authority \n * @param networkModule \n */\n protected async updateTokenEndpointAuthority(cloudInstanceHostname: string, authority: Authority, networkModule: INetworkModule): Promise {\n const cloudInstanceAuthorityUri = `https://${cloudInstanceHostname}/${authority.tenant}/`;\n const cloudInstanceAuthority = await AuthorityFactory.createDiscoveredInstance(cloudInstanceAuthorityUri, networkModule, this.browserStorage, authority.options);\n this.authModule.updateAuthority(cloudInstanceAuthority);\n }\n\n /**\n * Looks up ccs creds in the cache\n */\n protected checkCcsCredentials(): CcsCredential | null {\n // Look up ccs credential in temp cache\n const cachedCcsCred = this.browserStorage.getTemporaryCache(TemporaryCacheKeys.CCS_CREDENTIAL, true);\n if (cachedCcsCred) {\n try {\n return JSON.parse(cachedCcsCred) as CcsCredential;\n } catch (e) {\n this.authModule.logger.error(\"Cache credential could not be parsed\");\n this.authModule.logger.errorPii(`Cache credential could not be parsed: ${cachedCcsCred}`);\n }\n }\n return null;\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { UrlString, StringUtils, CommonAuthorizationCodeRequest, AuthorizationCodeClient, Logger } from \"@azure/msal-common\";\nimport { InteractionHandler, InteractionParams } from \"./InteractionHandler\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\nimport { BrowserCacheManager } from \"../cache/BrowserCacheManager\";\nimport { PopupWindowAttributes, PopupUtils } from \"../utils/PopupUtils\";\nimport { BrowserUtils } from \"../utils/BrowserUtils\";\n\nexport type PopupParams = InteractionParams & {\n popup?: Window|null;\n popupName: string;\n popupWindowAttributes: PopupWindowAttributes\n};\n\n/**\n * This class implements the interaction handler base class for browsers. It is written specifically for handling\n * popup window scenarios. It includes functions for monitoring the popup window for a hash.\n */\nexport class PopupHandler extends InteractionHandler {\n private popupUtils: PopupUtils;\n\n constructor(authCodeModule: AuthorizationCodeClient, storageImpl: BrowserCacheManager, authCodeRequest: CommonAuthorizationCodeRequest, browserRequestLogger: Logger) {\n super(authCodeModule, storageImpl, authCodeRequest, browserRequestLogger);\n\n // Properly sets this reference for the unload event.\n this.popupUtils = new PopupUtils(storageImpl, browserRequestLogger);\n }\n\n /**\n * Opens a popup window with given request Url.\n * @param requestUrl\n */\n initiateAuthRequest(requestUrl: string, params: PopupParams): Window {\n // Check that request url is not empty.\n if (!StringUtils.isEmpty(requestUrl)) {\n // Set interaction status in the library.\n this.browserStorage.setInteractionInProgress(true);\n this.browserRequestLogger.infoPii(`Navigate to: ${requestUrl}`);\n // Open the popup window to requestUrl.\n return this.popupUtils.openPopup(requestUrl, params);\n } else {\n // Throw error if request URL is empty.\n this.browserRequestLogger.error(\"Navigate url is empty\");\n throw BrowserAuthError.createEmptyNavigationUriError();\n }\n }\n\n /**\n * Monitors a window until it loads a url with a known hash, or hits a specified timeout.\n * @param popupWindow - window that is being monitored\n * @param timeout - milliseconds until timeout\n */\n monitorPopupForHash(popupWindow: Window): Promise {\n return this.popupUtils.monitorPopupForSameOrigin(popupWindow).then(() => {\n const contentHash = popupWindow.location.hash;\n BrowserUtils.clearHash(popupWindow);\n this.popupUtils.cleanPopup(popupWindow);\n\n if (!contentHash) {\n throw BrowserAuthError.createEmptyHashError(popupWindow.location.href);\n }\n\n if (UrlString.hashContainsKnownProperties(contentHash)) {\n return contentHash;\n } else {\n throw BrowserAuthError.createHashDoesNotContainKnownPropertiesError();\n }\n }\n );\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AuthenticationResult, CommonAuthorizationCodeRequest, AuthorizationCodeClient, ThrottlingUtils, CommonEndSessionRequest, UrlString, AuthError } from \"@azure/msal-common\";\nimport { AuthorizationUrlRequest } from \"../request/AuthorizationUrlRequest\";\nimport { StandardInteractionClient } from \"./StandardInteractionClient\";\nimport { PopupWindowAttributes, PopupUtils } from \"../utils/PopupUtils\";\nimport { EventType } from \"../event/EventType\";\nimport { InteractionType, ApiId } from \"../utils/BrowserConstants\";\nimport { PopupHandler, PopupParams } from \"../interaction_handler/PopupHandler\";\nimport { EndSessionPopupRequest } from \"../request/EndSessionPopupRequest\";\nimport { NavigationOptions } from \"../navigation/NavigationOptions\";\nimport { BrowserUtils } from \"../utils/BrowserUtils\";\nimport { PopupRequest } from \"../request/PopupRequest\";\n\nexport class PopupClient extends StandardInteractionClient {\n /**\n * Acquires tokens by opening a popup window to the /authorize endpoint of the authority\n * @param request \n */\n async acquireToken(request: PopupRequest): Promise {\n try {\n const validRequest = await this.preflightInteractiveRequest(request, InteractionType.Popup);\n const popupName = PopupUtils.generatePopupName(this.config.auth.clientId, validRequest);\n const popupWindowAttributes = request.popupWindowAttributes || {};\n\n // asyncPopups flag is true. Acquires token without first opening popup. Popup will be opened later asynchronously.\n if (this.config.system.asyncPopups) {\n this.logger.verbose(\"asyncPopups set to true, acquiring token\");\n // Passes on popup position and dimensions if in request\n return this.acquireTokenPopupAsync(validRequest, popupName, popupWindowAttributes);\n } else {\n // asyncPopups flag is set to false. Opens popup before acquiring token.\n this.logger.verbose(\"asyncPopup set to false, opening popup before acquiring token\");\n const popup = PopupUtils.openSizedPopup(\"about:blank\", popupName, popupWindowAttributes, this.logger);\n return this.acquireTokenPopupAsync(validRequest, popupName, popupWindowAttributes, popup);\n }\n } catch (e) {\n return Promise.reject(e);\n }\n }\n\n /**\n * Clears local cache for the current user then opens a popup window prompting the user to sign-out of the server\n * @param logoutRequest \n */\n logout(logoutRequest?: EndSessionPopupRequest): Promise {\n try {\n this.logger.verbose(\"logoutPopup called\");\n const validLogoutRequest = this.initializeLogoutRequest(logoutRequest);\n\n const popupName = PopupUtils.generateLogoutPopupName(this.config.auth.clientId, validLogoutRequest);\n const authority = logoutRequest && logoutRequest.authority;\n const mainWindowRedirectUri = logoutRequest && logoutRequest.mainWindowRedirectUri;\n const popupWindowAttributes = logoutRequest?.popupWindowAttributes || {};\n\n // asyncPopups flag is true. Acquires token without first opening popup. Popup will be opened later asynchronously.\n if (this.config.system.asyncPopups) {\n this.logger.verbose(\"asyncPopups set to true\");\n // Passes on popup position and dimensions if in request\n return this.logoutPopupAsync(validLogoutRequest, popupName, popupWindowAttributes, authority, undefined, mainWindowRedirectUri);\n } else {\n // asyncPopups flag is set to false. Opens popup before logging out.\n this.logger.verbose(\"asyncPopup set to false, opening popup\");\n const popup = PopupUtils.openSizedPopup(\"about:blank\", popupName, popupWindowAttributes, this.logger);\n return this.logoutPopupAsync(validLogoutRequest, popupName, popupWindowAttributes, authority, popup, mainWindowRedirectUri);\n }\n } catch (e) {\n // Since this function is synchronous we need to reject\n return Promise.reject(e);\n }\n }\n\n /**\n * Helper which obtains an access_token for your API via opening a popup window in the user's browser\n * @param validRequest\n * @param popupName\n * @param popup\n * @param popupWindowAttributes\n *\n * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.\n */\n private async acquireTokenPopupAsync(validRequest: AuthorizationUrlRequest, popupName: string, popupWindowAttributes: PopupWindowAttributes, popup?: Window|null): Promise {\n this.logger.verbose(\"acquireTokenPopupAsync called\");\n const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.acquireTokenPopup);\n\n try {\n // Create auth code request and generate PKCE params\n const authCodeRequest: CommonAuthorizationCodeRequest = await this.initializeAuthorizationCodeRequest(validRequest);\n\n // Initialize the client\n const authClient: AuthorizationCodeClient = await this.createAuthCodeClient(serverTelemetryManager, validRequest.authority);\n this.logger.verbose(\"Auth code client created\");\n\n // Create acquire token url.\n const navigateUrl = await authClient.getAuthCodeUrl(validRequest);\n\n // Create popup interaction handler.\n const interactionHandler = new PopupHandler(authClient, this.browserStorage, authCodeRequest, this.logger);\n\n // Show the UI once the url has been created. Get the window handle for the popup.\n const popupParameters: PopupParams = {\n popup,\n popupName,\n popupWindowAttributes\n };\n const popupWindow: Window = interactionHandler.initiateAuthRequest(navigateUrl, popupParameters);\n this.eventHandler.emitEvent(EventType.POPUP_OPENED, InteractionType.Popup, {popupWindow}, null);\n\n // Monitor the window for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.\n const hash = await interactionHandler.monitorPopupForHash(popupWindow);\n const state = this.validateAndExtractStateFromHash(hash, InteractionType.Popup, validRequest.correlationId);\n\n // Remove throttle if it exists\n ThrottlingUtils.removeThrottle(this.browserStorage, this.config.auth.clientId, authCodeRequest);\n\n // Handle response from hash string.\n const result = await interactionHandler.handleCodeResponseFromHash(hash, state, authClient.authority, this.networkClient);\n\n return result;\n } catch (e) { \n if (popup) {\n // Close the synchronous popup if an error is thrown before the window unload event is registered\n popup.close();\n }\n\n if (e instanceof AuthError) {\n e.setCorrelationId(this.correlationId);\n }\n\n serverTelemetryManager.cacheFailedRequest(e);\n this.browserStorage.cleanRequestByState(validRequest.state);\n throw e;\n }\n }\n\n /**\n * \n * @param validRequest \n * @param popupName \n * @param requestAuthority\n * @param popup \n * @param mainWindowRedirectUri \n * @param popupWindowAttributes \n */\n private async logoutPopupAsync(validRequest: CommonEndSessionRequest, popupName: string, popupWindowAttributes: PopupWindowAttributes, requestAuthority?: string, popup?: Window|null, mainWindowRedirectUri?: string): Promise {\n this.logger.verbose(\"logoutPopupAsync called\");\n this.eventHandler.emitEvent(EventType.LOGOUT_START, InteractionType.Popup, validRequest);\n\n const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.logoutPopup);\n \n try {\n // Clear cache on logout\n await this.clearCacheOnLogout(validRequest.account);\n\n this.browserStorage.setInteractionInProgress(true);\n // Initialize the client\n const authClient = await this.createAuthCodeClient(serverTelemetryManager, requestAuthority);\n this.logger.verbose(\"Auth code client created\");\n\n // Create logout string and navigate user window to logout.\n const logoutUri: string = authClient.getLogoutUri(validRequest);\n\n this.eventHandler.emitEvent(EventType.LOGOUT_SUCCESS, InteractionType.Popup, validRequest);\n\n const popupUtils = new PopupUtils(this.browserStorage, this.logger);\n // Open the popup window to requestUrl.\n const popupWindow = popupUtils.openPopup(logoutUri, {popupName, popupWindowAttributes, popup});\n this.eventHandler.emitEvent(EventType.POPUP_OPENED, InteractionType.Popup, {popupWindow}, null);\n\n try {\n // Don't care if this throws an error (User Cancelled)\n await popupUtils.monitorPopupForSameOrigin(popupWindow);\n this.logger.verbose(\"Popup successfully redirected to postLogoutRedirectUri\");\n } catch (e) {\n this.logger.verbose(`Error occurred while monitoring popup for same origin. Session on server may remain active. Error: ${e}`);\n }\n\n popupUtils.cleanPopup(popupWindow);\n\n if (mainWindowRedirectUri) {\n const navigationOptions: NavigationOptions = {\n apiId: ApiId.logoutPopup,\n timeout: this.config.system.redirectNavigationTimeout,\n noHistory: false\n };\n const absoluteUrl = UrlString.getAbsoluteUrl(mainWindowRedirectUri, BrowserUtils.getCurrentUri());\n\n this.logger.verbose(\"Redirecting main window to url specified in the request\");\n this.logger.verbosePii(`Redirecing main window to: ${absoluteUrl}`);\n this.navigationClient.navigateInternal(absoluteUrl, navigationOptions);\n } else {\n this.logger.verbose(\"No main window navigation requested\");\n }\n\n } catch (e) {\n if (popup) {\n // Close the synchronous popup if an error is thrown before the window unload event is registered\n popup.close();\n }\n\n if (e instanceof AuthError) {\n e.setCorrelationId(this.correlationId);\n }\n \n this.browserStorage.setInteractionInProgress(false);\n this.eventHandler.emitEvent(EventType.LOGOUT_FAILURE, InteractionType.Popup, null, e);\n this.eventHandler.emitEvent(EventType.LOGOUT_END, InteractionType.Popup);\n serverTelemetryManager.cacheFailedRequest(e);\n throw e;\n }\n\n this.eventHandler.emitEvent(EventType.LOGOUT_END, InteractionType.Popup);\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AuthorizationCodeClient, StringUtils, CommonAuthorizationCodeRequest, ICrypto, AuthenticationResult, ThrottlingUtils, Authority, INetworkModule, ClientAuthError, Logger } from \"@azure/msal-common\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\nimport { ApiId, TemporaryCacheKeys } from \"../utils/BrowserConstants\";\nimport { BrowserCacheManager } from \"../cache/BrowserCacheManager\";\nimport { InteractionHandler, InteractionParams } from \"./InteractionHandler\";\nimport { INavigationClient } from \"../navigation/INavigationClient\";\nimport { NavigationOptions } from \"../navigation/NavigationOptions\";\n\nexport type RedirectParams = InteractionParams & {\n navigationClient: INavigationClient;\n redirectTimeout: number;\n redirectStartPage: string;\n onRedirectNavigate?: (url: string) => void | boolean;\n};\n\nexport class RedirectHandler extends InteractionHandler {\n\n private browserCrypto: ICrypto;\n\n constructor(authCodeModule: AuthorizationCodeClient, storageImpl: BrowserCacheManager, authCodeRequest: CommonAuthorizationCodeRequest, browserRequestLogger: Logger, browserCrypto: ICrypto) {\n super(authCodeModule, storageImpl, authCodeRequest, browserRequestLogger);\n this.browserCrypto = browserCrypto;\n }\n\n /**\n * Redirects window to given URL.\n * @param urlNavigate\n */\n async initiateAuthRequest(requestUrl: string, params: RedirectParams): Promise {\n this.browserRequestLogger.verbose(\"RedirectHandler.initiateAuthRequest called\");\n // Navigate if valid URL\n if (!StringUtils.isEmpty(requestUrl)) {\n // Cache start page, returns to this page after redirectUri if navigateToLoginRequestUrl is true\n if (params.redirectStartPage) {\n this.browserRequestLogger.verbose(\"RedirectHandler.initiateAuthRequest: redirectStartPage set, caching start page\");\n this.browserStorage.setTemporaryCache(TemporaryCacheKeys.ORIGIN_URI, params.redirectStartPage, true);\n }\n\n // Set interaction status in the library.\n this.browserStorage.setInteractionInProgress(true);\n this.browserStorage.setTemporaryCache(TemporaryCacheKeys.CORRELATION_ID, this.authCodeRequest.correlationId, true);\n this.browserStorage.cacheCodeRequest(this.authCodeRequest, this.browserCrypto);\n this.browserRequestLogger.infoPii(`RedirectHandler.initiateAuthRequest: Navigate to: ${requestUrl}`);\n const navigationOptions: NavigationOptions = {\n apiId: ApiId.acquireTokenRedirect,\n timeout: params.redirectTimeout,\n noHistory: false\n };\n \n // If onRedirectNavigate is implemented, invoke it and provide requestUrl\n if (typeof params.onRedirectNavigate === \"function\") {\n this.browserRequestLogger.verbose(\"RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback\");\n const navigate = params.onRedirectNavigate(requestUrl);\n\n // Returning false from onRedirectNavigate will stop navigation\n if (navigate !== false) {\n this.browserRequestLogger.verbose(\"RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating\");\n await params.navigationClient.navigateExternal(requestUrl, navigationOptions);\n return;\n } else {\n this.browserRequestLogger.verbose(\"RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation\");\n return;\n }\n } else {\n // Navigate window to request URL\n this.browserRequestLogger.verbose(\"RedirectHandler.initiateAuthRequest: Navigating window to navigate url\");\n await params.navigationClient.navigateExternal(requestUrl, navigationOptions);\n return;\n }\n } else {\n // Throw error if request URL is empty.\n this.browserRequestLogger.info(\"RedirectHandler.initiateAuthRequest: Navigate url is empty\");\n throw BrowserAuthError.createEmptyNavigationUriError();\n }\n }\n\n /**\n * Handle authorization code response in the window.\n * @param hash\n */\n async handleCodeResponseFromHash(locationHash: string, state: string, authority: Authority, networkModule: INetworkModule, clientId?: string): Promise {\n this.browserRequestLogger.verbose(\"RedirectHandler.handleCodeResponse called\");\n\n // Check that location hash isn't empty.\n if (StringUtils.isEmpty(locationHash)) {\n throw BrowserAuthError.createEmptyHashError(locationHash);\n }\n\n // Interaction is completed - remove interaction status.\n this.browserStorage.setInteractionInProgress(false);\n\n // Handle code response.\n const stateKey = this.browserStorage.generateStateKey(state);\n const requestState = this.browserStorage.getTemporaryCache(stateKey);\n if (!requestState) {\n throw ClientAuthError.createStateNotFoundError(\"Cached State\");\n }\n const authCodeResponse = this.authModule.handleFragmentResponse(locationHash, requestState);\n\n // Get cached items\n const nonceKey = this.browserStorage.generateNonceKey(requestState);\n const cachedNonce = this.browserStorage.getTemporaryCache(nonceKey);\n\n // Assign code to request\n this.authCodeRequest.code = authCodeResponse.code;\n\n // Check for new cloud instance\n if (authCodeResponse.cloud_instance_host_name) {\n await this.updateTokenEndpointAuthority(authCodeResponse.cloud_instance_host_name, authority, networkModule);\n }\n\n authCodeResponse.nonce = cachedNonce || undefined;\n authCodeResponse.state = requestState;\n\n // Add CCS parameters if available\n if (authCodeResponse.client_info) {\n this.authCodeRequest.clientInfo = authCodeResponse.client_info;\n } else {\n const cachedCcsCred = this.checkCcsCredentials();\n if (cachedCcsCred) {\n this.authCodeRequest.ccsCredential = cachedCcsCred;\n }\n }\n\n // Remove throttle if it exists\n if (clientId) {\n ThrottlingUtils.removeThrottle(this.browserStorage, clientId, this.authCodeRequest);\n }\n\n // Acquire token with retrieved code.\n const tokenResponse = await this.authModule.acquireToken(this.authCodeRequest, authCodeResponse);\n\n this.browserStorage.cleanRequestByState(state);\n return tokenResponse;\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AuthenticationResult, CommonAuthorizationCodeRequest, AuthorizationCodeClient, UrlString, AuthError, ServerTelemetryManager } from \"@azure/msal-common\";\nimport { StandardInteractionClient } from \"./StandardInteractionClient\";\nimport { AuthorizationUrlRequest } from \"../request/AuthorizationUrlRequest\";\nimport { ApiId, InteractionType, TemporaryCacheKeys } from \"../utils/BrowserConstants\";\nimport { RedirectHandler } from \"../interaction_handler/RedirectHandler\";\nimport { BrowserUtils } from \"../utils/BrowserUtils\";\nimport { EndSessionRequest } from \"../request/EndSessionRequest\";\nimport { EventType } from \"../event/EventType\";\nimport { NavigationOptions } from \"../navigation/NavigationOptions\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\nimport { RedirectRequest } from \"../request/RedirectRequest\";\n\nexport class RedirectClient extends StandardInteractionClient { \n /**\n * Redirects the page to the /authorize endpoint of the IDP\n * @param request \n */\n async acquireToken(request: RedirectRequest): Promise {\n const validRequest: AuthorizationUrlRequest = await this.preflightInteractiveRequest(request, InteractionType.Redirect);\n const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.acquireTokenRedirect);\n\n try {\n // Create auth code request and generate PKCE params\n const authCodeRequest: CommonAuthorizationCodeRequest = await this.initializeAuthorizationCodeRequest(validRequest);\n\n // Initialize the client\n const authClient: AuthorizationCodeClient = await this.createAuthCodeClient(serverTelemetryManager, validRequest.authority);\n this.logger.verbose(\"Auth code client created\");\n\n // Create redirect interaction handler.\n const interactionHandler = new RedirectHandler(authClient, this.browserStorage, authCodeRequest, this.logger, this.browserCrypto);\n\n // Create acquire token url.\n const navigateUrl = await authClient.getAuthCodeUrl(validRequest);\n\n const redirectStartPage = this.getRedirectStartPage(request.redirectStartPage);\n this.logger.verbosePii(`Redirect start page: ${redirectStartPage}`);\n\n // Show the UI once the url has been created. Response will come back in the hash, which will be handled in the handleRedirectCallback function.\n return await interactionHandler.initiateAuthRequest(navigateUrl, {\n navigationClient: this.navigationClient,\n redirectTimeout: this.config.system.redirectNavigationTimeout,\n redirectStartPage: redirectStartPage,\n onRedirectNavigate: request.onRedirectNavigate\n });\n } catch (e) {\n if (e instanceof AuthError) {\n e.setCorrelationId(this.correlationId);\n }\n serverTelemetryManager.cacheFailedRequest(e);\n this.browserStorage.cleanRequestByState(validRequest.state);\n throw e;\n }\n }\n\n /**\n * Checks if navigateToLoginRequestUrl is set, and:\n * - if true, performs logic to cache and navigate\n * - if false, handles hash string and parses response\n * @param hash\n */\n async handleRedirectPromise(hash?: string): Promise {\n const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.handleRedirectPromise);\n try {\n if (!this.browserStorage.isInteractionInProgress(true)) {\n this.logger.info(\"handleRedirectPromise called but there is no interaction in progress, returning null.\");\n return null;\n }\n\n const responseHash = this.getRedirectResponseHash(hash || window.location.hash);\n if (!responseHash) {\n // Not a recognized server response hash or hash not associated with a redirect request\n this.logger.info(\"handleRedirectPromise did not detect a response hash as a result of a redirect. Cleaning temporary cache.\");\n this.browserStorage.cleanRequestByInteractionType(InteractionType.Redirect);\n return null;\n }\n\n let state: string;\n try {\n state = this.validateAndExtractStateFromHash(responseHash, InteractionType.Redirect);\n BrowserUtils.clearHash(window);\n this.logger.verbose(\"State extracted from hash\");\n } catch (e) {\n this.logger.info(`handleRedirectPromise was unable to extract state due to: ${e}`);\n this.browserStorage.cleanRequestByInteractionType(InteractionType.Redirect);\n return null;\n }\n\n // If navigateToLoginRequestUrl is true, get the url where the redirect request was initiated\n const loginRequestUrl = this.browserStorage.getTemporaryCache(TemporaryCacheKeys.ORIGIN_URI, true) || \"\";\n const loginRequestUrlNormalized = UrlString.removeHashFromUrl(loginRequestUrl);\n const currentUrlNormalized = UrlString.removeHashFromUrl(window.location.href);\n\n if (loginRequestUrlNormalized === currentUrlNormalized && this.config.auth.navigateToLoginRequestUrl) {\n // We are on the page we need to navigate to - handle hash\n this.logger.verbose(\"Current page is loginRequestUrl, handling hash\");\n const handleHashResult = await this.handleHash(responseHash, state, serverTelemetryManager);\n\n if (loginRequestUrl.indexOf(\"#\") > -1) {\n // Replace current hash with non-msal hash, if present\n BrowserUtils.replaceHash(loginRequestUrl);\n }\n\n return handleHashResult;\n } else if (!this.config.auth.navigateToLoginRequestUrl) {\n this.logger.verbose(\"NavigateToLoginRequestUrl set to false, handling hash\");\n return this.handleHash(responseHash, state, serverTelemetryManager);\n } else if (!BrowserUtils.isInIframe() || this.config.system.allowRedirectInIframe) {\n /*\n * Returned from authority using redirect - need to perform navigation before processing response\n * Cache the hash to be retrieved after the next redirect\n */\n this.browserStorage.setTemporaryCache(TemporaryCacheKeys.URL_HASH, responseHash, true);\n const navigationOptions: NavigationOptions = {\n apiId: ApiId.handleRedirectPromise,\n timeout: this.config.system.redirectNavigationTimeout,\n noHistory: true\n };\n\n /**\n * Default behavior is to redirect to the start page and not process the hash now. \n * The start page is expected to also call handleRedirectPromise which will process the hash in one of the checks above.\n */ \n let processHashOnRedirect: boolean = true;\n if (!loginRequestUrl || loginRequestUrl === \"null\") {\n // Redirect to home page if login request url is null (real null or the string null)\n const homepage = BrowserUtils.getHomepage();\n // Cache the homepage under ORIGIN_URI to ensure cached hash is processed on homepage\n this.browserStorage.setTemporaryCache(TemporaryCacheKeys.ORIGIN_URI, homepage, true);\n this.logger.warning(\"Unable to get valid login request url from cache, redirecting to home page\");\n processHashOnRedirect = await this.navigationClient.navigateInternal(homepage, navigationOptions);\n } else {\n // Navigate to page that initiated the redirect request\n this.logger.verbose(`Navigating to loginRequestUrl: ${loginRequestUrl}`);\n processHashOnRedirect = await this.navigationClient.navigateInternal(loginRequestUrl, navigationOptions);\n }\n\n // If navigateInternal implementation returns false, handle the hash now\n if (!processHashOnRedirect) {\n return this.handleHash(responseHash, state, serverTelemetryManager);\n }\n }\n\n return null;\n } catch (e) {\n if (e instanceof AuthError) {\n e.setCorrelationId(this.correlationId);\n }\n serverTelemetryManager.cacheFailedRequest(e);\n this.browserStorage.cleanRequestByInteractionType(InteractionType.Redirect);\n throw e;\n }\n }\n\n /**\n * Gets the response hash for a redirect request\n * Returns null if interactionType in the state value is not \"redirect\" or the hash does not contain known properties\n * @param hash\n */\n private getRedirectResponseHash(hash: string): string | null {\n this.logger.verbose(\"getRedirectResponseHash called\");\n // Get current location hash from window or cache.\n const isResponseHash: boolean = UrlString.hashContainsKnownProperties(hash);\n const cachedHash = this.browserStorage.getTemporaryCache(TemporaryCacheKeys.URL_HASH, true);\n this.browserStorage.removeItem(this.browserStorage.generateCacheKey(TemporaryCacheKeys.URL_HASH));\n\n if (isResponseHash) {\n this.logger.verbose(\"Hash contains known properties, returning response hash\");\n return hash;\n }\n\n this.logger.verbose(\"Hash does not contain known properties, returning cached hash\");\n return cachedHash;\n }\n\n /**\n * Checks if hash exists and handles in window.\n * @param hash\n * @param state\n */\n private async handleHash(hash: string, state: string, serverTelemetryManager: ServerTelemetryManager): Promise {\n const cachedRequest = this.browserStorage.getCachedRequest(state, this.browserCrypto);\n this.logger.verbose(\"handleHash called, retrieved cached request\");\n\n // Hash contains known properties - handle and return in callback\n const currentAuthority = this.browserStorage.getCachedAuthority(state);\n if (!currentAuthority) {\n throw BrowserAuthError.createNoCachedAuthorityError();\n }\n\n const authClient = await this.createAuthCodeClient(serverTelemetryManager, currentAuthority);\n this.logger.verbose(\"Auth code client created\");\n const interactionHandler = new RedirectHandler(authClient, this.browserStorage, cachedRequest, this.logger, this.browserCrypto);\n return await interactionHandler.handleCodeResponseFromHash(hash, state, authClient.authority, this.networkClient, this.config.auth.clientId);\n }\n\n /**\n * Use to log out the current user, and redirect the user to the postLogoutRedirectUri.\n * Default behaviour is to redirect the user to `window.location.href`.\n * @param logoutRequest\n */\n async logout(logoutRequest?: EndSessionRequest): Promise {\n this.logger.verbose(\"logoutRedirect called\");\n const validLogoutRequest = this.initializeLogoutRequest(logoutRequest);\n const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.logout);\n\n try {\n this.eventHandler.emitEvent(EventType.LOGOUT_START, InteractionType.Redirect, logoutRequest);\n \n // Clear cache on logout\n await this.clearCacheOnLogout(validLogoutRequest.account);\n \n const navigationOptions: NavigationOptions = {\n apiId: ApiId.logout,\n timeout: this.config.system.redirectNavigationTimeout,\n noHistory: false\n };\n const authClient = await this.createAuthCodeClient(serverTelemetryManager, logoutRequest && logoutRequest.authority);\n this.logger.verbose(\"Auth code client created\");\n\n // Create logout string and navigate user window to logout.\n const logoutUri: string = authClient.getLogoutUri(validLogoutRequest);\n \n this.eventHandler.emitEvent(EventType.LOGOUT_SUCCESS, InteractionType.Redirect, validLogoutRequest);\n // Check if onRedirectNavigate is implemented, and invoke it if so\n if (logoutRequest && typeof logoutRequest.onRedirectNavigate === \"function\") {\n const navigate = logoutRequest.onRedirectNavigate(logoutUri);\n\n if (navigate !== false) {\n this.logger.verbose(\"Logout onRedirectNavigate did not return false, navigating\");\n await this.navigationClient.navigateExternal(logoutUri, navigationOptions);\n return;\n } else {\n this.logger.verbose(\"Logout onRedirectNavigate returned false, stopping navigation\");\n }\n } else {\n await this.navigationClient.navigateExternal(logoutUri, navigationOptions);\n return;\n }\n } catch(e) {\n if (e instanceof AuthError) {\n e.setCorrelationId(this.correlationId);\n }\n serverTelemetryManager.cacheFailedRequest(e);\n this.eventHandler.emitEvent(EventType.LOGOUT_FAILURE, InteractionType.Redirect, null, e);\n this.eventHandler.emitEvent(EventType.LOGOUT_END, InteractionType.Redirect);\n throw e;\n }\n\n this.eventHandler.emitEvent(EventType.LOGOUT_END, InteractionType.Redirect);\n }\n\n /**\n * Use to get the redirectStartPage either from request or use current window\n * @param requestStartPage\n */\n protected getRedirectStartPage(requestStartPage?: string): string {\n const redirectStartPage = requestStartPage || window.location.href;\n return UrlString.getAbsoluteUrl(redirectStartPage, BrowserUtils.getCurrentUri());\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { UrlString, StringUtils, CommonAuthorizationCodeRequest, AuthorizationCodeClient, Constants, Logger } from \"@azure/msal-common\";\nimport { InteractionHandler } from \"./InteractionHandler\";\nimport { BrowserConstants } from \"../utils/BrowserConstants\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\nimport { BrowserCacheManager } from \"../cache/BrowserCacheManager\";\nimport { DEFAULT_IFRAME_TIMEOUT_MS } from \"../config/Configuration\";\n\nexport class SilentHandler extends InteractionHandler {\n\n private navigateFrameWait: number;\n constructor(authCodeModule: AuthorizationCodeClient, storageImpl: BrowserCacheManager, authCodeRequest: CommonAuthorizationCodeRequest, browserRequestLogger: Logger, navigateFrameWait: number) {\n super(authCodeModule, storageImpl, authCodeRequest, browserRequestLogger);\n this.navigateFrameWait = navigateFrameWait;\n }\n\n /**\n * Creates a hidden iframe to given URL using user-requested scopes as an id.\n * @param urlNavigate\n * @param userRequestScopes\n */\n async initiateAuthRequest(requestUrl: string): Promise {\n if (StringUtils.isEmpty(requestUrl)) {\n // Throw error if request URL is empty.\n this.browserRequestLogger.info(\"Navigate url is empty\");\n throw BrowserAuthError.createEmptyNavigationUriError();\n }\n\n return this.navigateFrameWait ? await this.loadFrame(requestUrl) : this.loadFrameSync(requestUrl);\n }\n\n /**\n * Monitors an iframe content window until it loads a url with a known hash, or hits a specified timeout.\n * @param iframe\n * @param timeout\n */\n monitorIframeForHash(iframe: HTMLIFrameElement, timeout: number): Promise {\n return new Promise((resolve, reject) => {\n if (timeout < DEFAULT_IFRAME_TIMEOUT_MS) {\n this.browserRequestLogger.warning(`system.loadFrameTimeout or system.iframeHashTimeout set to lower (${timeout}ms) than the default (${DEFAULT_IFRAME_TIMEOUT_MS}ms). This may result in timeouts.`);\n }\n\n /*\n * Polling for iframes can be purely timing based,\n * since we don't need to account for interaction.\n */\n const nowMark = window.performance.now();\n const timeoutMark = nowMark + timeout;\n\n const intervalId = setInterval(() => {\n if (window.performance.now() > timeoutMark) {\n this.removeHiddenIframe(iframe);\n clearInterval(intervalId);\n reject(BrowserAuthError.createMonitorIframeTimeoutError());\n return;\n }\n\n let href: string = Constants.EMPTY_STRING;\n const contentWindow = iframe.contentWindow;\n try {\n /*\n * Will throw if cross origin,\n * which should be caught and ignored\n * since we need the interval to keep running while on STS UI.\n */\n href = contentWindow ? contentWindow.location.href : Constants.EMPTY_STRING;\n } catch (e) {}\n\n if (StringUtils.isEmpty(href)) {\n return;\n }\n\n const contentHash = contentWindow ? contentWindow.location.hash: Constants.EMPTY_STRING;\n if (UrlString.hashContainsKnownProperties(contentHash)) {\n // Success case\n this.removeHiddenIframe(iframe);\n clearInterval(intervalId);\n resolve(contentHash);\n return;\n }\n }, BrowserConstants.POLL_INTERVAL_MS);\n });\n }\n\n /**\n * @hidden\n * Loads iframe with authorization endpoint URL\n * @ignore\n */\n private loadFrame(urlNavigate: string): Promise {\n /*\n * This trick overcomes iframe navigation in IE\n * IE does not load the page consistently in iframe\n */\n\n return new Promise((resolve, reject) => {\n const frameHandle = this.createHiddenIframe();\n\n setTimeout(() => {\n if (!frameHandle) {\n reject(\"Unable to load iframe\");\n return;\n }\n\n frameHandle.src = urlNavigate;\n\n resolve(frameHandle);\n }, this.navigateFrameWait);\n });\n }\n\n /**\n * @hidden\n * Loads the iframe synchronously when the navigateTimeFrame is set to `0`\n * @param urlNavigate\n * @param frameName\n * @param logger\n */\n private loadFrameSync(urlNavigate: string): HTMLIFrameElement{\n const frameHandle = this.createHiddenIframe();\n\n frameHandle.src = urlNavigate;\n\n return frameHandle;\n }\n\n /**\n * @hidden\n * Creates a new hidden iframe or gets an existing one for silent token renewal.\n * @ignore\n */\n private createHiddenIframe(): HTMLIFrameElement {\n const authFrame = document.createElement(\"iframe\");\n\n authFrame.style.visibility = \"hidden\";\n authFrame.style.position = \"absolute\";\n authFrame.style.width = authFrame.style.height = \"0\";\n authFrame.style.border = \"0\";\n authFrame.setAttribute(\"sandbox\", \"allow-scripts allow-same-origin allow-forms\");\n document.getElementsByTagName(\"body\")[0].appendChild(authFrame);\n\n return authFrame;\n }\n\n /**\n * @hidden\n * Removes a hidden iframe from the page.\n * @ignore\n */\n private removeHiddenIframe(iframe: HTMLIFrameElement): void {\n if (document.body === iframe.parentNode) {\n document.body.removeChild(iframe);\n }\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AuthenticationResult, ICrypto, Logger, StringUtils, PromptValue, CommonAuthorizationCodeRequest, AuthorizationCodeClient, AuthError } from \"@azure/msal-common\";\nimport { StandardInteractionClient } from \"./StandardInteractionClient\";\nimport { AuthorizationUrlRequest } from \"../request/AuthorizationUrlRequest\";\nimport { BrowserConfiguration } from \"../config/Configuration\";\nimport { BrowserCacheManager } from \"../cache/BrowserCacheManager\";\nimport { EventHandler } from \"../event/EventHandler\";\nimport { INavigationClient } from \"../navigation/INavigationClient\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\nimport { InteractionType, ApiId } from \"../utils/BrowserConstants\";\nimport { SilentHandler } from \"../interaction_handler/SilentHandler\";\nimport { SsoSilentRequest } from \"../request/SsoSilentRequest\";\n\nexport class SilentIframeClient extends StandardInteractionClient {\n private apiId: ApiId;\n\n constructor(config: BrowserConfiguration, storageImpl: BrowserCacheManager, browserCrypto: ICrypto, logger: Logger, eventHandler: EventHandler, navigationClient: INavigationClient, apiId: ApiId, correlationId?: string) {\n super(config, storageImpl, browserCrypto, logger, eventHandler, navigationClient, correlationId);\n this.apiId = apiId;\n }\n \n /**\n * Acquires a token silently by opening a hidden iframe to the /authorize endpoint with prompt=none\n * @param request \n */\n async acquireToken(request: SsoSilentRequest): Promise {\n this.logger.verbose(\"acquireTokenByIframe called\");\n // Check that we have some SSO data\n if (StringUtils.isEmpty(request.loginHint) && StringUtils.isEmpty(request.sid) && (!request.account || StringUtils.isEmpty(request.account.username))) {\n this.logger.warning(\"No user hint provided. The authorization server may need more information to complete this request.\");\n }\n\n // Check that prompt is set to none, throw error if it is set to anything else.\n if (request.prompt && request.prompt !== PromptValue.NONE) {\n throw BrowserAuthError.createSilentPromptValueError(request.prompt);\n }\n\n // Create silent request\n const silentRequest: AuthorizationUrlRequest = await this.initializeAuthorizationRequest({\n ...request,\n prompt: PromptValue.NONE\n }, InteractionType.Silent);\n\n const serverTelemetryManager = this.initializeServerTelemetryManager(this.apiId);\n\n try {\n // Create auth code request and generate PKCE params\n const authCodeRequest: CommonAuthorizationCodeRequest = await this.initializeAuthorizationCodeRequest(silentRequest);\n\n // Initialize the client\n const authClient: AuthorizationCodeClient = await this.createAuthCodeClient(serverTelemetryManager, silentRequest.authority);\n this.logger.verbose(\"Auth code client created\");\n\n // Create authorize request url\n const navigateUrl = await authClient.getAuthCodeUrl(silentRequest);\n\n return await this.silentTokenHelper(navigateUrl, authCodeRequest, authClient, this.logger);\n } catch (e) {\n if (e instanceof AuthError) {\n e.setCorrelationId(this.correlationId);\n }\n serverTelemetryManager.cacheFailedRequest(e);\n this.browserStorage.cleanRequestByState(silentRequest.state);\n throw e;\n }\n }\n\n /**\n * Currently Unsupported\n */\n logout(): Promise {\n // Synchronous so we must reject\n return Promise.reject(BrowserAuthError.createSilentLogoutUnsupportedError());\n }\n\n /**\n * Helper which acquires an authorization code silently using a hidden iframe from given url\n * using the scopes requested as part of the id, and exchanges the code for a set of OAuth tokens.\n * @param navigateUrl\n * @param userRequestScopes\n */\n private async silentTokenHelper(navigateUrl: string, authCodeRequest: CommonAuthorizationCodeRequest, authClient: AuthorizationCodeClient, browserRequestLogger: Logger): Promise {\n // Create silent handler\n const silentHandler = new SilentHandler(authClient, this.browserStorage, authCodeRequest, browserRequestLogger, this.config.system.navigateFrameWait);\n // Get the frame handle for the silent request\n const msalFrame = await silentHandler.initiateAuthRequest(navigateUrl);\n // Monitor the window for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.\n const hash = await silentHandler.monitorIframeForHash(msalFrame, this.config.system.iframeHashTimeout);\n const state = this.validateAndExtractStateFromHash(hash, InteractionType.Silent, authCodeRequest.correlationId);\n\n // Handle response from hash string\n return silentHandler.handleCodeResponseFromHash(hash, state, authClient.authority, this.networkClient);\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ClientConfiguration } from \"../config/ClientConfiguration\";\nimport { BaseClient } from \"./BaseClient\";\nimport { CommonRefreshTokenRequest } from \"../request/CommonRefreshTokenRequest\";\nimport { Authority } from \"../authority/Authority\";\nimport { ServerAuthorizationTokenResponse } from \"../response/ServerAuthorizationTokenResponse\";\nimport { RequestParameterBuilder } from \"../request/RequestParameterBuilder\";\nimport { GrantType, AuthenticationScheme, Errors } from \"../utils/Constants\";\nimport { ResponseHandler } from \"../response/ResponseHandler\";\nimport { AuthenticationResult } from \"../response/AuthenticationResult\";\nimport { PopTokenGenerator } from \"../crypto/PopTokenGenerator\";\nimport { StringUtils } from \"../utils/StringUtils\";\nimport { RequestThumbprint } from \"../network/RequestThumbprint\";\nimport { NetworkResponse } from \"../network/NetworkManager\";\nimport { CommonSilentFlowRequest } from \"../request/CommonSilentFlowRequest\";\nimport { ClientConfigurationError } from \"../error/ClientConfigurationError\";\nimport { ClientAuthError } from \"../error/ClientAuthError\";\nimport { ServerError } from \"../error/ServerError\";\nimport { TimeUtils } from \"../utils/TimeUtils\";\nimport { UrlString } from \"../url/UrlString\";\nimport { CcsCredentialType } from \"../account/CcsCredential\";\nimport { buildClientInfoFromHomeAccountId } from \"../account/ClientInfo\";\nimport { InteractionRequiredAuthError, InteractionRequiredAuthErrorMessage } from \"../error/InteractionRequiredAuthError\";\n\n/**\n * OAuth2.0 refresh token client\n */\nexport class RefreshTokenClient extends BaseClient {\n\n constructor(configuration: ClientConfiguration) {\n super(configuration);\n }\n\n public async acquireToken(request: CommonRefreshTokenRequest): Promise{\n const reqTimestamp = TimeUtils.nowSeconds();\n const response = await this.executeTokenRequest(request, this.authority);\n\n const responseHandler = new ResponseHandler(\n this.config.authOptions.clientId,\n this.cacheManager,\n this.cryptoUtils,\n this.logger,\n this.config.serializableCache,\n this.config.persistencePlugin\n );\n\n responseHandler.validateTokenResponse(response.body);\n return responseHandler.handleServerTokenResponse(\n response.body,\n this.authority,\n reqTimestamp,\n request,\n undefined,\n undefined,\n true\n );\n }\n\n /**\n * Gets cached refresh token and attaches to request, then calls acquireToken API\n * @param request\n */\n public async acquireTokenByRefreshToken(request: CommonSilentFlowRequest): Promise {\n // Cannot renew token if no request object is given.\n if (!request) {\n throw ClientConfigurationError.createEmptyTokenRequestError();\n }\n\n // We currently do not support silent flow for account === null use cases; This will be revisited for confidential flow usecases\n if (!request.account) {\n throw ClientAuthError.createNoAccountInSilentRequestError();\n }\n\n // try checking if FOCI is enabled for the given application\n const isFOCI = this.cacheManager.isAppMetadataFOCI(request.account.environment, this.config.authOptions.clientId);\n\n // if the app is part of the family, retrive a Family refresh token if present and make a refreshTokenRequest\n if (isFOCI) {\n try {\n return this.acquireTokenWithCachedRefreshToken(request, true);\n } catch (e) {\n const noFamilyRTInCache = e instanceof InteractionRequiredAuthError && e.errorCode === InteractionRequiredAuthErrorMessage.noTokensFoundError.code;\n const clientMismatchErrorWithFamilyRT = e instanceof ServerError && e.errorCode === Errors.INVALID_GRANT_ERROR && e.subError === Errors.CLIENT_MISMATCH_ERROR;\n\n // if family Refresh Token (FRT) cache acquisition fails or if client_mismatch error is seen with FRT, reattempt with application Refresh Token (ART)\n if (noFamilyRTInCache || clientMismatchErrorWithFamilyRT) {\n return this.acquireTokenWithCachedRefreshToken(request, false);\n // throw in all other cases\n } else {\n throw e;\n }\n }\n }\n\n // fall back to application refresh token acquisition\n return this.acquireTokenWithCachedRefreshToken(request, false);\n }\n\n /**\n * makes a network call to acquire tokens by exchanging RefreshToken available in userCache; throws if refresh token is not cached\n * @param request\n */\n private async acquireTokenWithCachedRefreshToken(request: CommonSilentFlowRequest, foci: boolean) {\n // fetches family RT or application RT based on FOCI value\n const refreshToken = this.cacheManager.readRefreshTokenFromCache(this.config.authOptions.clientId, request.account, foci);\n\n // no refresh Token\n if (!refreshToken) {\n throw InteractionRequiredAuthError.createNoTokensFoundError();\n }\n\n const refreshTokenRequest: CommonRefreshTokenRequest = {\n ...request,\n refreshToken: refreshToken.secret,\n authenticationScheme: request.authenticationScheme || AuthenticationScheme.BEARER,\n ccsCredential: {\n credential: request.account.homeAccountId,\n type: CcsCredentialType.HOME_ACCOUNT_ID\n }\n };\n\n return this.acquireToken(refreshTokenRequest);\n }\n\n /**\n * Constructs the network message and makes a NW call to the underlying secure token service\n * @param request\n * @param authority\n */\n private async executeTokenRequest(request: CommonRefreshTokenRequest, authority: Authority)\n : Promise> {\n\n const requestBody = await this.createTokenRequestBody(request);\n const queryParameters = this.createTokenQueryParameters(request);\n const headers: Record = this.createTokenRequestHeaders(request.ccsCredential);\n const thumbprint: RequestThumbprint = {\n clientId: this.config.authOptions.clientId,\n authority: authority.canonicalAuthority,\n scopes: request.scopes,\n claims: request.claims,\n authenticationScheme: request.authenticationScheme,\n resourceRequestMethod: request.resourceRequestMethod,\n resourceRequestUri: request.resourceRequestUri,\n shrClaims: request.shrClaims,\n sshKid: request.sshKid\n };\n\n const endpoint = UrlString.appendQueryString(authority.tokenEndpoint, queryParameters);\n return this.executePostToTokenEndpoint(endpoint, requestBody, headers, thumbprint);\n }\n\n /**\n * Creates query string for the /token request\n * @param request \n */\n private createTokenQueryParameters(request: CommonRefreshTokenRequest): string {\n const parameterBuilder = new RequestParameterBuilder();\n\n if (request.tokenQueryParameters) {\n parameterBuilder.addExtraQueryParameters(request.tokenQueryParameters);\n }\n\n return parameterBuilder.createQueryString();\n }\n\n /**\n * Helper function to create the token request body\n * @param request\n */\n private async createTokenRequestBody(request: CommonRefreshTokenRequest): Promise {\n const parameterBuilder = new RequestParameterBuilder();\n\n parameterBuilder.addClientId(this.config.authOptions.clientId);\n\n parameterBuilder.addScopes(request.scopes);\n\n parameterBuilder.addGrantType(GrantType.REFRESH_TOKEN_GRANT);\n\n parameterBuilder.addClientInfo();\n\n parameterBuilder.addLibraryInfo(this.config.libraryInfo);\n\n parameterBuilder.addThrottling();\n \n if (this.serverTelemetryManager) {\n parameterBuilder.addServerTelemetry(this.serverTelemetryManager);\n }\n\n const correlationId = request.correlationId || this.config.cryptoInterface.createNewGuid();\n parameterBuilder.addCorrelationId(correlationId);\n\n parameterBuilder.addRefreshToken(request.refreshToken);\n\n if (this.config.clientCredentials.clientSecret) {\n parameterBuilder.addClientSecret(this.config.clientCredentials.clientSecret);\n }\n\n if (this.config.clientCredentials.clientAssertion) {\n const clientAssertion = this.config.clientCredentials.clientAssertion;\n parameterBuilder.addClientAssertion(clientAssertion.assertion);\n parameterBuilder.addClientAssertionType(clientAssertion.assertionType);\n }\n\n if (request.authenticationScheme === AuthenticationScheme.POP) {\n const popTokenGenerator = new PopTokenGenerator(this.cryptoUtils);\n const cnfString = await popTokenGenerator.generateCnf(request);\n parameterBuilder.addPopToken(cnfString);\n } else if (request.authenticationScheme === AuthenticationScheme.SSH) {\n if(request.sshJwk) {\n parameterBuilder.addSshJwk(request.sshJwk);\n } else {\n throw ClientConfigurationError.createMissingSshJwkError();\n }\n }\n\n if (!StringUtils.isEmptyObj(request.claims) || this.config.authOptions.clientCapabilities && this.config.authOptions.clientCapabilities.length > 0) {\n parameterBuilder.addClaims(request.claims, this.config.authOptions.clientCapabilities);\n }\n\n if (this.config.systemOptions.preventCorsPreflight && request.ccsCredential) {\n switch (request.ccsCredential.type) {\n case CcsCredentialType.HOME_ACCOUNT_ID:\n try {\n const clientInfo = buildClientInfoFromHomeAccountId(request.ccsCredential.credential);\n parameterBuilder.addCcsOid(clientInfo);\n } catch (e) {\n this.logger.verbose(\"Could not parse home account ID for CCS Header: \" + e);\n }\n break;\n case CcsCredentialType.UPN:\n parameterBuilder.addCcsUpn(request.ccsCredential.credential);\n break;\n }\n }\n\n return parameterBuilder.createQueryString();\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { StandardInteractionClient } from \"./StandardInteractionClient\";\nimport { CommonSilentFlowRequest, AuthenticationResult, ServerTelemetryManager, RefreshTokenClient, AuthError } from \"@azure/msal-common\";\nimport { ApiId } from \"../utils/BrowserConstants\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\n\nexport class SilentRefreshClient extends StandardInteractionClient {\n /**\n * Exchanges the refresh token for new tokens\n * @param request \n */\n async acquireToken(request: CommonSilentFlowRequest): Promise {\n const silentRequest: CommonSilentFlowRequest = {\n ...request,\n ...await this.initializeBaseRequest(request)\n };\n const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.acquireTokenSilent_silentFlow);\n const refreshTokenClient = await this.createRefreshTokenClient(serverTelemetryManager, silentRequest.authority);\n this.logger.verbose(\"Refresh token client created\");\n \n // Send request to renew token. Auth module will throw errors if token cannot be renewed.\n return refreshTokenClient.acquireTokenByRefreshToken(silentRequest).catch(e => {\n if (e instanceof AuthError) {\n e.setCorrelationId(this.correlationId);\n }\n serverTelemetryManager.cacheFailedRequest(e);\n throw e;\n });\n }\n\n /**\n * Currently Unsupported\n */\n logout(): Promise {\n // Synchronous so we must reject\n return Promise.reject(BrowserAuthError.createSilentLogoutUnsupportedError());\n }\n\n /**\n * Creates a Refresh Client with the given authority, or the default authority.\n * @param serverTelemetryManager\n * @param authorityUrl\n */\n protected async createRefreshTokenClient(serverTelemetryManager: ServerTelemetryManager, authorityUrl?: string): Promise {\n // Create auth module.\n const clientConfig = await this.getClientConfiguration(serverTelemetryManager, authorityUrl);\n return new RefreshTokenClient(clientConfig);\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AccessTokenEntity, ICrypto, IdTokenEntity, Logger, ScopeSet, Authority, AuthorityOptions, ExternalTokenResponse, AccountEntity, AuthToken } from \"@azure/msal-common\";\nimport { BrowserConfiguration } from \"../config/Configuration\";\nimport { SilentRequest } from \"../request/SilentRequest\";\nimport { BrowserCacheManager } from \"./BrowserCacheManager\";\nimport { ITokenCache } from \"./ITokenCache\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\n\nexport type LoadTokenOptions = {\n clientInfo?: string,\n extendedExpiresOn?: number\n};\n\n/**\n * Token cache manager\n */\nexport class TokenCache implements ITokenCache {\n // Flag to indicate if in browser environment\n public isBrowserEnvironment: boolean;\n // Input configuration by developer/user\n protected config: BrowserConfiguration;\n // Browser cache storage\n private storage: BrowserCacheManager;\n // Logger\n private logger: Logger;\n // Crypto class\n private cryptoObj: ICrypto;\n\n constructor(configuration: BrowserConfiguration, storage: BrowserCacheManager, logger: Logger, cryptoObj: ICrypto) {\n this.isBrowserEnvironment = typeof window !== \"undefined\";\n this.config = configuration;\n this.storage = storage;\n this.logger = logger;\n this.cryptoObj = cryptoObj;\n }\n \n // Move getAllAccounts here and cache utility APIs\n\n /**\n * API to load tokens to msal-browser cache. \n * @param request \n * @param response\n * @param options\n */\n loadExternalTokens(request: SilentRequest, response: ExternalTokenResponse, options: LoadTokenOptions): void {\n this.logger.info(\"TokenCache - loadExternalTokens called\");\n\n if (!response.id_token) {\n throw BrowserAuthError.createUnableToLoadTokenError(\"Please ensure server response includes id token.\");\n }\n\n if (request.account) {\n this.loadIdToken(response.id_token, request.account.homeAccountId, request.account.environment, request.account.tenantId, options);\n this.loadAccessToken(request, response, request.account.homeAccountId, request.account.environment, request.account.tenantId, options);\n } else if (request.authority) {\n\n const authorityOptions: AuthorityOptions = {\n protocolMode: this.config.auth.protocolMode,\n knownAuthorities: this.config.auth.knownAuthorities,\n cloudDiscoveryMetadata: this.config.auth.cloudDiscoveryMetadata,\n authorityMetadata: this.config.auth.authorityMetadata\n };\n const authority = new Authority(request.authority, this.config.system.networkClient, this.storage, authorityOptions);\n\n // \"clientInfo\" from options takes precedence over \"clientInfo\" in response\n if (options.clientInfo) {\n this.logger.trace(\"TokenCache - homeAccountId from options\");\n this.loadIdToken(response.id_token, options.clientInfo, authority.hostnameAndPort, authority.tenant, options);\n this.loadAccessToken(request, response, options.clientInfo, authority.hostnameAndPort, authority.tenant, options);\n } else if (response.client_info) {\n this.logger.trace(\"TokenCache - homeAccountId from response\");\n this.loadIdToken(response.id_token, response.client_info, authority.hostnameAndPort, authority.tenant, options);\n this.loadAccessToken(request, response, response.client_info, authority.hostnameAndPort, authority.tenant, options);\n } else {\n throw BrowserAuthError.createUnableToLoadTokenError(\"Please provide clientInfo in the response or options.\");\n }\n } else {\n throw BrowserAuthError.createUnableToLoadTokenError(\"Please provide a request with an account or a request with authority.\");\n }\n }\n\n /**\n * Helper function to load id tokens to msal-browser cache\n * @param idToken \n * @param homeAccountId \n * @param environment \n * @param tenantId \n * @param options \n */\n private loadIdToken(idToken: string, homeAccountId: string, environment: string, tenantId: string, options: LoadTokenOptions): void {\n\n const idTokenEntity = IdTokenEntity.createIdTokenEntity(homeAccountId, environment, idToken, this.config.auth.clientId, tenantId);\n const idAuthToken = new AuthToken(idToken, this.cryptoObj);\n const accountEntity = options.clientInfo ?\n AccountEntity.createAccount(options.clientInfo, homeAccountId, idAuthToken, undefined, undefined, undefined, undefined, environment) :\n AccountEntity.createGenericAccount(homeAccountId, idAuthToken, undefined, undefined, undefined, undefined, environment);\n\n if (this.isBrowserEnvironment) {\n this.logger.verbose(\"TokenCache - loading id token\");\n this.storage.setAccount(accountEntity);\n this.storage.setIdTokenCredential(idTokenEntity);\n } else {\n throw BrowserAuthError.createUnableToLoadTokenError(\"loadExternalTokens is designed to work in browser environments only.\");\n }\n }\n\n /**\n * Helper function to load access tokens to msal-browser cache\n * @param request \n * @param response \n * @param options \n * @param homeAccountId \n * @param environment \n * @param tenantId \n * @returns \n */\n private loadAccessToken(request: SilentRequest, response: ExternalTokenResponse, homeAccountId: string, environment: string, tenantId: string, options: LoadTokenOptions): void {\n\n if (!response.access_token) {\n this.logger.verbose(\"TokenCache - No access token provided for caching\");\n return;\n }\n\n if (!response.expires_in) {\n throw BrowserAuthError.createUnableToLoadTokenError(\"Please ensure server response includes expires_in value.\");\n }\n\n if (!options.extendedExpiresOn) {\n throw BrowserAuthError.createUnableToLoadTokenError(\"Please provide an extendedExpiresOn value in the options.\");\n }\n \n const scopes = new ScopeSet(request.scopes).printScopes();\n const expiresOn = response.expires_in;\n const extendedExpiresOn = options.extendedExpiresOn;\n\n const accessTokenEntity = AccessTokenEntity.createAccessTokenEntity(homeAccountId, environment, response.access_token, this.config.auth.clientId, tenantId, scopes, expiresOn, extendedExpiresOn, this.cryptoObj);\n\n if (this.isBrowserEnvironment) {\n this.logger.verbose(\"TokenCache - loading access token\");\n this.storage.setAccessTokenCredential(accessTokenEntity);\n } else {\n throw BrowserAuthError.createUnableToLoadTokenError(\"loadExternalTokens is designed to work in browser environments only.\");\n }\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AuthorizationCodeClient, ClientConfiguration } from \"@azure/msal-common\";\n\nexport class HybridSpaAuthorizationCodeClient extends AuthorizationCodeClient {\n constructor(config: ClientConfiguration) {\n super(config);\n this.includeRedirectUri = false;\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AuthenticationResult, ICrypto, Logger, CommonAuthorizationCodeRequest, AuthError } from \"@azure/msal-common\";\nimport { StandardInteractionClient } from \"./StandardInteractionClient\";\nimport { AuthorizationUrlRequest } from \"../request/AuthorizationUrlRequest\";\nimport { BrowserConfiguration } from \"../config/Configuration\";\nimport { BrowserCacheManager } from \"../cache/BrowserCacheManager\";\nimport { EventHandler } from \"../event/EventHandler\";\nimport { INavigationClient } from \"../navigation/INavigationClient\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\nimport { InteractionType, ApiId } from \"../utils/BrowserConstants\";\nimport { SilentHandler } from \"../interaction_handler/SilentHandler\";\nimport { AuthorizationCodeRequest } from \"../request/AuthorizationCodeRequest\";\nimport { HybridSpaAuthorizationCodeClient } from \"./HybridSpaAuthorizationCodeClient\";\n\nexport class SilentAuthCodeClient extends StandardInteractionClient {\n private apiId: ApiId;\n\n constructor(config: BrowserConfiguration, storageImpl: BrowserCacheManager, browserCrypto: ICrypto, logger: Logger, eventHandler: EventHandler, navigationClient: INavigationClient, apiId: ApiId, correlationId?: string) {\n super(config, storageImpl, browserCrypto, logger, eventHandler, navigationClient, correlationId);\n this.apiId = apiId;\n }\n \n /**\n * Acquires a token silently by redeeming an authorization code against the /token endpoint\n * @param request \n */\n async acquireToken(request: AuthorizationCodeRequest): Promise {\n this.logger.trace(\"SilentAuthCodeClient.acquireToken called\");\n\n // Auth code payload is required\n if (!request.code) {\n throw BrowserAuthError.createAuthCodeRequiredError();\n }\n\n // Create silent request\n const silentRequest: AuthorizationUrlRequest = await this.initializeAuthorizationRequest(request, InteractionType.Silent);\n\n const serverTelemetryManager = this.initializeServerTelemetryManager(this.apiId);\n\n try {\n\n // Create auth code request (PKCE not needed)\n const authCodeRequest: CommonAuthorizationCodeRequest = {\n ...silentRequest,\n code: request.code\n };\n\n // Initialize the client\n const clientConfig = await this.getClientConfiguration(serverTelemetryManager, silentRequest.authority);\n const authClient: HybridSpaAuthorizationCodeClient = new HybridSpaAuthorizationCodeClient(clientConfig);\n this.logger.verbose(\"Auth code client created\");\n\n // Create silent handler\n const silentHandler = new SilentHandler(authClient, this.browserStorage, authCodeRequest, this.logger, this.config.system.navigateFrameWait);\n\n // Handle auth code parameters from request\n return silentHandler.handleCodeResponseFromServer(\n {\n code: request.code,\n msgraph_host: request.msGraphHost,\n cloud_graph_host_name: request.cloudGraphHostName,\n cloud_instance_host_name: request.cloudInstanceHostName\n },\n silentRequest.state, \n authClient.authority, \n this.networkClient,\n false\n );\n } catch (e) {\n if (e instanceof AuthError) {\n e.setCorrelationId(this.correlationId);\n }\n serverTelemetryManager.cacheFailedRequest(e);\n this.browserStorage.cleanRequestByState(silentRequest.state);\n throw e;\n }\n }\n\n /**\n * Currently Unsupported\n */\n logout(): Promise {\n // Synchronous so we must reject\n return Promise.reject(BrowserAuthError.createSilentLogoutUnsupportedError());\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { CryptoOps } from \"../crypto/CryptoOps\";\nimport { StringUtils, ServerError, InteractionRequiredAuthError, AccountInfo, Constants, INetworkModule, AuthenticationResult, Logger, CommonSilentFlowRequest, ICrypto, DEFAULT_CRYPTO_IMPLEMENTATION } from \"@azure/msal-common\";\nimport { BrowserCacheManager, DEFAULT_BROWSER_CACHE_MANAGER } from \"../cache/BrowserCacheManager\";\nimport { BrowserConfiguration, buildConfiguration, Configuration } from \"../config/Configuration\";\nimport { InteractionType, ApiId, BrowserConstants, BrowserCacheLocation, WrapperSKU, TemporaryCacheKeys } from \"../utils/BrowserConstants\";\nimport { BrowserUtils } from \"../utils/BrowserUtils\";\nimport { RedirectRequest } from \"../request/RedirectRequest\";\nimport { PopupRequest } from \"../request/PopupRequest\";\nimport { SsoSilentRequest } from \"../request/SsoSilentRequest\";\nimport { version, name } from \"../packageMetadata\";\nimport { EventCallbackFunction } from \"../event/EventMessage\";\nimport { EventType } from \"../event/EventType\";\nimport { EndSessionRequest } from \"../request/EndSessionRequest\";\nimport { BrowserConfigurationAuthError } from \"../error/BrowserConfigurationAuthError\";\nimport { EndSessionPopupRequest } from \"../request/EndSessionPopupRequest\";\nimport { INavigationClient } from \"../navigation/INavigationClient\";\nimport { EventHandler } from \"../event/EventHandler\";\nimport { PopupClient } from \"../interaction_client/PopupClient\";\nimport { RedirectClient } from \"../interaction_client/RedirectClient\";\nimport { SilentIframeClient } from \"../interaction_client/SilentIframeClient\";\nimport { SilentRefreshClient } from \"../interaction_client/SilentRefreshClient\";\nimport { TokenCache } from \"../cache/TokenCache\";\nimport { ITokenCache } from \"../cache/ITokenCache\";\nimport { SilentAuthCodeClient } from \"../interaction_client/SilentAuthCodeClient\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\nimport { AuthorizationCodeRequest } from \"../request/AuthorizationCodeRequest\";\n\nexport abstract class ClientApplication {\n\n // Crypto interface implementation\n protected readonly browserCrypto: ICrypto;\n\n // Storage interface implementation\n protected readonly browserStorage: BrowserCacheManager;\n\n // Network interface implementation\n protected readonly networkClient: INetworkModule;\n\n // Navigation interface implementation\n protected navigationClient: INavigationClient;\n\n // Input configuration by developer/user\n protected config: BrowserConfiguration;\n\n // Token cache implementation\n private tokenCache: TokenCache;\n\n // Logger\n protected logger: Logger;\n\n // Flag to indicate if in browser environment\n protected isBrowserEnvironment: boolean;\n\n protected eventHandler: EventHandler;\n\n // Redirect Response Object\n private redirectResponse: Map>;\n\n // Hybrid auth code responses\n private hybridAuthCodeResponses: Map>;\n\n /**\n * @constructor\n * Constructor for the PublicClientApplication used to instantiate the PublicClientApplication object\n *\n * Important attributes in the Configuration object for auth are:\n * - clientID: the application ID of your application. You can obtain one by registering your application with our Application registration portal : https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview\n * - authority: the authority URL for your application.\n * - redirect_uri: the uri of your application registered in the portal.\n *\n * In Azure AD, authority is a URL indicating the Azure active directory that MSAL uses to obtain tokens.\n * It is of the form https://login.microsoftonline.com/{Enter_the_Tenant_Info_Here}\n * If your application supports Accounts in one organizational directory, replace \"Enter_the_Tenant_Info_Here\" value with the Tenant Id or Tenant name (for example, contoso.microsoft.com).\n * If your application supports Accounts in any organizational directory, replace \"Enter_the_Tenant_Info_Here\" value with organizations.\n * If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace \"Enter_the_Tenant_Info_Here\" value with common.\n * To restrict support to Personal Microsoft accounts only, replace \"Enter_the_Tenant_Info_Here\" value with consumers.\n *\n * In Azure B2C, authority is of the form https://{instance}/tfp/{tenant}/{policyName}/\n * Full B2C functionality will be available in this library in future versions.\n *\n * @param configuration Object for the MSAL PublicClientApplication instance\n */\n constructor(configuration: Configuration) {\n /*\n * If loaded in an environment where window is not available,\n * set internal flag to false so that further requests fail.\n * This is to support server-side rendering environments.\n */\n this.isBrowserEnvironment = typeof window !== \"undefined\";\n // Set the configuration.\n this.config = buildConfiguration(configuration, this.isBrowserEnvironment);\n\n // Initialize logger\n this.logger = new Logger(this.config.system.loggerOptions, name, version);\n \n // Initialize the network module class.\n this.networkClient = this.config.system.networkClient;\n \n // Initialize the navigation client class.\n this.navigationClient = this.config.system.navigationClient;\n \n // Initialize redirectResponse Map\n this.redirectResponse = new Map();\n\n // Initial hybrid spa map\n this.hybridAuthCodeResponses = new Map();\n \n // Initialize the crypto class.\n this.browserCrypto = this.isBrowserEnvironment ? new CryptoOps(this.logger) : DEFAULT_CRYPTO_IMPLEMENTATION;\n\n this.eventHandler = new EventHandler(this.logger, this.browserCrypto);\n\n // Initialize the browser storage class.\n this.browserStorage = this.isBrowserEnvironment ? \n new BrowserCacheManager(this.config.auth.clientId, this.config.cache, this.browserCrypto, this.logger) : \n DEFAULT_BROWSER_CACHE_MANAGER(this.config.auth.clientId, this.logger);\n\n // Initialize the token cache\n this.tokenCache = new TokenCache(this.config, this.browserStorage, this.logger, this.browserCrypto);\n }\n\n // #region Redirect Flow\n\n /**\n * Event handler function which allows users to fire events after the PublicClientApplication object\n * has loaded during redirect flows. This should be invoked on all page loads involved in redirect\n * auth flows.\n * @param hash Hash to process. Defaults to the current value of window.location.hash. Only needs to be provided explicitly if the response to be handled is not contained in the current value.\n * @returns Token response or null. If the return value is null, then no auth redirect was detected.\n */\n async handleRedirectPromise(hash?: string): Promise {\n this.logger.verbose(\"handleRedirectPromise called\");\n const loggedInAccounts = this.getAllAccounts();\n if (this.isBrowserEnvironment) {\n /**\n * Store the promise on the PublicClientApplication instance if this is the first invocation of handleRedirectPromise,\n * otherwise return the promise from the first invocation. Prevents race conditions when handleRedirectPromise is called\n * several times concurrently.\n */\n const redirectResponseKey = hash || Constants.EMPTY_STRING;\n let response = this.redirectResponse.get(redirectResponseKey);\n if (typeof response === \"undefined\") {\n this.eventHandler.emitEvent(EventType.HANDLE_REDIRECT_START, InteractionType.Redirect);\n this.logger.verbose(\"handleRedirectPromise has been called for the first time, storing the promise\");\n const correlationId = this.browserStorage.getTemporaryCache(TemporaryCacheKeys.CORRELATION_ID, true) || \"\";\n const redirectClient = new RedirectClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, correlationId);\n response = redirectClient.handleRedirectPromise(hash)\n .then((result: AuthenticationResult | null) => {\n if (result) {\n // Emit login event if number of accounts change\n const isLoggingIn = loggedInAccounts.length < this.getAllAccounts().length;\n if (isLoggingIn) {\n this.eventHandler.emitEvent(EventType.LOGIN_SUCCESS, InteractionType.Redirect, result);\n this.logger.verbose(\"handleRedirectResponse returned result, login success\");\n } else {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, InteractionType.Redirect, result);\n this.logger.verbose(\"handleRedirectResponse returned result, acquire token success\");\n }\n }\n this.eventHandler.emitEvent(EventType.HANDLE_REDIRECT_END, InteractionType.Redirect);\n\n return result;\n })\n .catch((e) => {\n // Emit login event if there is an account\n if (loggedInAccounts.length > 0) {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, InteractionType.Redirect, null, e);\n } else {\n this.eventHandler.emitEvent(EventType.LOGIN_FAILURE, InteractionType.Redirect, null, e);\n }\n this.eventHandler.emitEvent(EventType.HANDLE_REDIRECT_END, InteractionType.Redirect);\n\n throw e;\n });\n this.redirectResponse.set(redirectResponseKey, response);\n } else {\n this.logger.verbose(\"handleRedirectPromise has been called previously, returning the result from the first call\");\n }\n \n return response;\n }\n this.logger.verbose(\"handleRedirectPromise returns null, not browser environment\");\n return null;\n }\n\n /**\n * Use when you want to obtain an access_token for your API by redirecting the user's browser window to the authorization endpoint. This function redirects\n * the page, so any code that follows this function will not execute.\n *\n * IMPORTANT: It is NOT recommended to have code that is dependent on the resolution of the Promise. This function will navigate away from the current\n * browser window. It currently returns a Promise in order to reflect the asynchronous nature of the code running in this function.\n *\n * @param request\n */\n async acquireTokenRedirect(request: RedirectRequest): Promise {\n // Preflight request\n this.preflightBrowserEnvironmentCheck(InteractionType.Redirect);\n this.logger.verbose(\"acquireTokenRedirect called\");\n\n // If logged in, emit acquire token events\n const isLoggedIn = this.getAllAccounts().length > 0;\n if (isLoggedIn) {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, InteractionType.Redirect, request);\n } else {\n this.eventHandler.emitEvent(EventType.LOGIN_START, InteractionType.Redirect, request);\n }\n \n const redirectClient = new RedirectClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, request.correlationId);\n return redirectClient.acquireToken(request).catch((e) => {\n // If logged in, emit acquire token events\n if (isLoggedIn) {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, InteractionType.Redirect, null, e);\n } else {\n this.eventHandler.emitEvent(EventType.LOGIN_FAILURE, InteractionType.Redirect, null, e);\n }\n throw e;\n });\n }\n\n // #endregion\n\n // #region Popup Flow\n\n /**\n * Use when you want to obtain an access_token for your API via opening a popup window in the user's browser\n *\n * @param request\n *\n * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.\n */\n acquireTokenPopup(request: PopupRequest): Promise {\n try {\n this.preflightBrowserEnvironmentCheck(InteractionType.Popup);\n this.logger.verbose(\"acquireTokenPopup called\", request.correlationId);\n } catch (e) {\n // Since this function is syncronous we need to reject\n return Promise.reject(e);\n }\n\n // If logged in, emit acquire token events\n const loggedInAccounts = this.getAllAccounts();\n if (loggedInAccounts.length > 0) {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, InteractionType.Popup, request);\n } else {\n this.eventHandler.emitEvent(EventType.LOGIN_START, InteractionType.Popup, request);\n }\n\n const popupClient = new PopupClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, request.correlationId);\n\n return popupClient.acquireToken(request).then((result) => {\n // If logged in, emit acquire token events\n const isLoggingIn = loggedInAccounts.length < this.getAllAccounts().length;\n if (isLoggingIn) {\n this.eventHandler.emitEvent(EventType.LOGIN_SUCCESS, InteractionType.Popup, result);\n } else {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, InteractionType.Popup, result);\n }\n\n return result;\n }).catch((e) => {\n if (loggedInAccounts.length > 0) {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, InteractionType.Popup, null, e);\n } else {\n this.eventHandler.emitEvent(EventType.LOGIN_FAILURE, InteractionType.Popup, null, e);\n }\n // Since this function is syncronous we need to reject\n return Promise.reject(e);\n });\n }\n\n // #endregion\n\n // #region Silent Flow\n\n /**\n * This function uses a hidden iframe to fetch an authorization code from the eSTS. There are cases where this may not work:\n * - Any browser using a form of Intelligent Tracking Prevention\n * - If there is not an established session with the service\n *\n * In these cases, the request must be done inside a popup or full frame redirect.\n *\n * For the cases where interaction is required, you cannot send a request with prompt=none.\n *\n * If your refresh token has expired, you can use this function to fetch a new set of tokens silently as long as\n * you session on the server still exists.\n * @param request {@link SsoSilentRequest}\n *\n * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.\n */\n async ssoSilent(request: SsoSilentRequest): Promise {\n this.preflightBrowserEnvironmentCheck(InteractionType.Silent);\n this.logger.verbose(\"ssoSilent called\", request.correlationId);\n this.eventHandler.emitEvent(EventType.SSO_SILENT_START, InteractionType.Silent, request);\n\n try {\n const silentIframeClient = new SilentIframeClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, ApiId.ssoSilent, request.correlationId);\n const silentTokenResult = await silentIframeClient.acquireToken(request);\n this.eventHandler.emitEvent(EventType.SSO_SILENT_SUCCESS, InteractionType.Silent, silentTokenResult);\n return silentTokenResult;\n } catch (e) {\n this.eventHandler.emitEvent(EventType.SSO_SILENT_FAILURE, InteractionType.Silent, null, e);\n throw e;\n }\n }\n\n /**\n * This function redeems an authorization code (passed as code) from the eSTS token endpoint.\n * This authorization code should be acquired server-side using a confidential client to acquire a spa_code.\n * This API is not indended for normal authorization code acquisition and redemption.\n * \n * Redemption of this authorization code will not require PKCE, as it was acquired by a confidential client.\n * \n * @param request {@link AuthorizationCodeRequest}\n * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.\n */\n async acquireTokenByCode(request: AuthorizationCodeRequest): Promise {\n this.preflightBrowserEnvironmentCheck(InteractionType.Silent);\n this.logger.trace(\"acquireTokenByCode called\", request.correlationId);\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_BY_CODE_START, InteractionType.Silent, request);\n\n try {\n if (!request.code) {\n throw BrowserAuthError.createAuthCodeRequiredError();\n }\n\n let response = this.hybridAuthCodeResponses.get(request.code);\n if (!response) {\n this.logger.verbose(\"Initiating new acquireTokenByCode request\", request.correlationId);\n response = this.acquireTokenByCodeAsync(request)\n .then((result: AuthenticationResult) => {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_BY_CODE_SUCCESS, InteractionType.Silent, result);\n this.hybridAuthCodeResponses.delete(request.code);\n return result;\n })\n .catch((error: Error) => {\n this.hybridAuthCodeResponses.delete(request.code);\n throw error;\n });\n\n this.hybridAuthCodeResponses.set(request.code, response);\n } else {\n this.logger.verbose(\"Existing acquireTokenByCode request found\", request.correlationId);\n }\n \n return response;\n } catch (e) {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_BY_CODE_FAILURE, InteractionType.Silent, null, e);\n throw e;\n }\n }\n\n /**\n * Creates a SilentAuthCodeClient to redeem an authorization code.\n * @param request \n * @returns Result of the operation to redeem the authorization code\n */\n private async acquireTokenByCodeAsync(request: AuthorizationCodeRequest): Promise {\n this.logger.trace(\"acquireTokenByCodeAsync called\", request.correlationId);\n const silentAuthCodeClient = new SilentAuthCodeClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, ApiId.acquireTokenByCode, request.correlationId);\n const silentTokenResult = await silentAuthCodeClient.acquireToken(request);\n return silentTokenResult;\n }\n\n /**\n * Use this function to obtain a token before every call to the API / resource provider\n *\n * MSAL return's a cached token when available\n * Or it send's a request to the STS to obtain a new token using a refresh token.\n *\n * @param {@link SilentRequest}\n *\n * To renew idToken, please pass clientId as the only scope in the Authentication Parameters\n * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.\n */\n protected async acquireTokenByRefreshToken(request: CommonSilentFlowRequest): Promise {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_NETWORK_START, InteractionType.Silent, request);\n // block the reload if it occurred inside a hidden iframe\n BrowserUtils.blockReloadInHiddenIframes();\n\n const silentRefreshClient = new SilentRefreshClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, request.correlationId);\n\n return silentRefreshClient.acquireToken(request).catch(e => {\n const isServerError = e instanceof ServerError;\n const isInteractionRequiredError = e instanceof InteractionRequiredAuthError;\n const isInvalidGrantError = (e.errorCode === BrowserConstants.INVALID_GRANT_ERROR);\n if (isServerError && isInvalidGrantError && !isInteractionRequiredError) {\n this.logger.verbose(\"Refresh token expired or invalid, attempting acquire token by iframe\", request.correlationId);\n\n const silentIframeClient = new SilentIframeClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, ApiId.acquireTokenSilent_authCode, request.correlationId);\n return silentIframeClient.acquireToken(request);\n }\n throw e;\n });\n }\n\n // #endregion\n\n // #region Logout\n\n /**\n * Deprecated logout function. Use logoutRedirect or logoutPopup instead\n * @param logoutRequest \n * @deprecated\n */\n async logout(logoutRequest?: EndSessionRequest): Promise {\n this.logger.warning(\"logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.\");\n return this.logoutRedirect(logoutRequest);\n }\n\n /**\n * Use to log out the current user, and redirect the user to the postLogoutRedirectUri.\n * Default behaviour is to redirect the user to `window.location.href`.\n * @param logoutRequest\n */\n async logoutRedirect(logoutRequest?: EndSessionRequest): Promise {\n this.preflightBrowserEnvironmentCheck(InteractionType.Redirect);\n const redirectClient = new RedirectClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, logoutRequest?.correlationId);\n return redirectClient.logout(logoutRequest);\n }\n\n /**\n * Clears local cache for the current user then opens a popup window prompting the user to sign-out of the server\n * @param logoutRequest \n */\n logoutPopup(logoutRequest?: EndSessionPopupRequest): Promise {\n try{\n this.preflightBrowserEnvironmentCheck(InteractionType.Popup);\n const popupClient = new PopupClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, logoutRequest?.correlationId);\n return popupClient.logout(logoutRequest);\n } catch (e) {\n // Since this function is syncronous we need to reject\n return Promise.reject(e);\n }\n }\n\n // #endregion\n\n // #region Account APIs\n\n /**\n * Returns all accounts that MSAL currently has data for.\n * (the account object is created at the time of successful login)\n * or empty array when no accounts are found\n * @returns Array of account objects in cache\n */\n getAllAccounts(): AccountInfo[] {\n this.logger.verbose(\"getAllAccounts called\");\n return this.isBrowserEnvironment ? this.browserStorage.getAllAccounts() : [];\n }\n\n /**\n * Returns the signed in account matching username.\n * (the account object is created at the time of successful login)\n * or null when no matching account is found.\n * This API is provided for convenience but getAccountById should be used for best reliability\n * @param userName\n * @returns The account object stored in MSAL\n */\n getAccountByUsername(userName: string): AccountInfo|null {\n const allAccounts = this.getAllAccounts();\n if (!StringUtils.isEmpty(userName) && allAccounts && allAccounts.length) {\n this.logger.verbose(\"Account matching username found, returning\");\n this.logger.verbosePii(`Returning signed-in accounts matching username: ${userName}`);\n return allAccounts.filter(accountObj => accountObj.username.toLowerCase() === userName.toLowerCase())[0] || null;\n } else {\n this.logger.verbose(\"getAccountByUsername: No matching account found, returning null\");\n return null;\n }\n }\n\n /**\n * Returns the signed in account matching homeAccountId.\n * (the account object is created at the time of successful login)\n * or null when no matching account is found\n * @param homeAccountId\n * @returns The account object stored in MSAL\n */\n getAccountByHomeId(homeAccountId: string): AccountInfo|null {\n const allAccounts = this.getAllAccounts();\n if (!StringUtils.isEmpty(homeAccountId) && allAccounts && allAccounts.length) {\n this.logger.verbose(\"Account matching homeAccountId found, returning\");\n this.logger.verbosePii(`Returning signed-in accounts matching homeAccountId: ${homeAccountId}`);\n return allAccounts.filter(accountObj => accountObj.homeAccountId === homeAccountId)[0] || null;\n } else {\n this.logger.verbose(\"getAccountByHomeId: No matching account found, returning null\");\n return null;\n }\n }\n\n /**\n * Returns the signed in account matching localAccountId.\n * (the account object is created at the time of successful login)\n * or null when no matching account is found\n * @param localAccountId\n * @returns The account object stored in MSAL\n */\n getAccountByLocalId(localAccountId: string): AccountInfo | null {\n const allAccounts = this.getAllAccounts();\n if (!StringUtils.isEmpty(localAccountId) && allAccounts && allAccounts.length) {\n this.logger.verbose(\"Account matching localAccountId found, returning\");\n this.logger.verbosePii(`Returning signed-in accounts matching localAccountId: ${localAccountId}`);\n return allAccounts.filter(accountObj => accountObj.localAccountId === localAccountId)[0] || null;\n } else {\n this.logger.verbose(\"getAccountByLocalId: No matching account found, returning null\");\n return null;\n }\n }\n\n /**\n * Sets the account to use as the active account. If no account is passed to the acquireToken APIs, then MSAL will use this active account.\n * @param account\n */\n setActiveAccount(account: AccountInfo | null): void {\n this.browserStorage.setActiveAccount(account);\n }\n\n /**\n * Gets the currently active account\n */\n getActiveAccount(): AccountInfo | null {\n return this.browserStorage.getActiveAccount();\n }\n\n // #endregion\n\n // #region Helpers\n\n /**\n * Helper to validate app environment before making an auth request\n * * @param interactionType\n */\n protected preflightBrowserEnvironmentCheck(interactionType: InteractionType): void {\n this.logger.verbose(\"preflightBrowserEnvironmentCheck started\");\n // Block request if not in browser environment\n BrowserUtils.blockNonBrowserEnvironment(this.isBrowserEnvironment);\n\n // Block redirects if in an iframe\n BrowserUtils.blockRedirectInIframe(interactionType, this.config.system.allowRedirectInIframe);\n\n // Block auth requests inside a hidden iframe\n BrowserUtils.blockReloadInHiddenIframes();\n\n // Block redirectUri opened in a popup from calling MSAL APIs\n BrowserUtils.blockAcquireTokenInPopups();\n\n // Block redirects if memory storage is enabled but storeAuthStateInCookie is not\n if (interactionType === InteractionType.Redirect &&\n this.config.cache.cacheLocation === BrowserCacheLocation.MemoryStorage &&\n !this.config.cache.storeAuthStateInCookie) {\n throw BrowserConfigurationAuthError.createInMemoryRedirectUnavailableError();\n }\n }\n\n /**\n * Adds event callbacks to array\n * @param callback\n */\n addEventCallback(callback: EventCallbackFunction): string | null {\n return this.eventHandler.addEventCallback(callback);\n }\n\n /**\n * Removes callback with provided id from callback array\n * @param callbackId\n */\n removeEventCallback(callbackId: string): void {\n this.eventHandler.removeEventCallback(callbackId);\n }\n\n /**\n * Adds event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window\n */\n enableAccountStorageEvents(): void {\n this.eventHandler.enableAccountStorageEvents();\n }\n\n /**\n * Removes event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window\n */\n disableAccountStorageEvents(): void {\n this.eventHandler.disableAccountStorageEvents();\n }\n\n /**\n * Gets the token cache for the application.\n */\n getTokenCache(): ITokenCache {\n return this.tokenCache;\n }\n\n /**\n * Returns the logger instance\n */\n getLogger(): Logger {\n return this.logger;\n }\n\n /**\n * Replaces the default logger set in configurations with new Logger with new configurations\n * @param logger Logger instance\n */\n setLogger(logger: Logger): void {\n this.logger = logger;\n }\n\n /**\n * Called by wrapper libraries (Angular & React) to set SKU and Version passed down to telemetry, logger, etc.\n * @param sku\n * @param version\n */\n initializeWrapperLibrary(sku: WrapperSKU, version: string): void {\n // Validate the SKU passed in is one we expect\n this.browserStorage.setWrapperMetadata(sku, version);\n }\n\n /**\n * Sets navigation client\n * @param navigationClient\n */\n setNavigationClient(navigationClient: INavigationClient): void {\n this.navigationClient = navigationClient;\n }\n\n /**\n * Returns the configuration object\n */\n getConfiguration(): BrowserConfiguration {\n return this.config;\n }\n\n // #endregion\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { BaseClient } from \"./BaseClient\";\nimport { ClientConfiguration } from \"../config/ClientConfiguration\";\nimport { CommonSilentFlowRequest } from \"../request/CommonSilentFlowRequest\";\nimport { AuthenticationResult } from \"../response/AuthenticationResult\";\nimport { AuthToken } from \"../account/AuthToken\";\nimport { TimeUtils } from \"../utils/TimeUtils\";\nimport { RefreshTokenClient } from \"./RefreshTokenClient\";\nimport { ClientAuthError, ClientAuthErrorMessage } from \"../error/ClientAuthError\";\nimport { ClientConfigurationError } from \"../error/ClientConfigurationError\";\nimport { ResponseHandler } from \"../response/ResponseHandler\";\nimport { CacheRecord } from \"../cache/entities/CacheRecord\";\nimport { CacheOutcome } from \"../utils/Constants\";\n\nexport class SilentFlowClient extends BaseClient {\n\n constructor(configuration: ClientConfiguration) {\n super(configuration);\n }\n\n /**\n * Retrieves a token from cache if it is still valid, or uses the cached refresh token to renew\n * the given token and returns the renewed token\n * @param request\n */\n async acquireToken(request: CommonSilentFlowRequest): Promise {\n try {\n return await this.acquireCachedToken(request);\n } catch (e) {\n if (e instanceof ClientAuthError && e.errorCode === ClientAuthErrorMessage.tokenRefreshRequired.code) {\n const refreshTokenClient = new RefreshTokenClient(this.config);\n return refreshTokenClient.acquireTokenByRefreshToken(request);\n } else {\n throw e;\n }\n }\n }\n\n /**\n * Retrieves token from cache or throws an error if it must be refreshed.\n * @param request\n */\n async acquireCachedToken(request: CommonSilentFlowRequest): Promise {\n // Cannot renew token if no request object is given.\n if (!request) {\n throw ClientConfigurationError.createEmptyTokenRequestError();\n }\n\n if (request.forceRefresh) {\n // Must refresh due to present force_refresh flag.\n this.serverTelemetryManager?.setCacheOutcome(CacheOutcome.FORCE_REFRESH);\n this.logger.info(\"SilentFlowClient:acquireCachedToken - Skipping cache because forceRefresh is true.\");\n throw ClientAuthError.createRefreshRequiredError();\n }\n\n // We currently do not support silent flow for account === null use cases; This will be revisited for confidential flow usecases\n if (!request.account) {\n throw ClientAuthError.createNoAccountInSilentRequestError();\n }\n\n const environment = request.authority || this.authority.getPreferredCache();\n\n const cacheRecord = this.cacheManager.readCacheRecord(request.account, this.config.authOptions.clientId, request, environment);\n \n if (!cacheRecord.accessToken) {\n // Must refresh due to non-existent access_token.\n this.serverTelemetryManager?.setCacheOutcome(CacheOutcome.NO_CACHED_ACCESS_TOKEN);\n this.logger.info(\"SilentFlowClient:acquireCachedToken - No access token found in cache for the given properties.\");\n throw ClientAuthError.createRefreshRequiredError();\n } else if (\n TimeUtils.wasClockTurnedBack(cacheRecord.accessToken.cachedAt) ||\n TimeUtils.isTokenExpired(cacheRecord.accessToken.expiresOn, this.config.systemOptions.tokenRenewalOffsetSeconds)\n ) {\n // Must refresh due to expired access_token.\n this.serverTelemetryManager?.setCacheOutcome(CacheOutcome.CACHED_ACCESS_TOKEN_EXPIRED);\n this.logger.info(`SilentFlowClient:acquireCachedToken - Cached access token is expired or will expire within ${this.config.systemOptions.tokenRenewalOffsetSeconds} seconds.`);\n throw ClientAuthError.createRefreshRequiredError();\n } else if (cacheRecord.accessToken.refreshOn && TimeUtils.isTokenExpired(cacheRecord.accessToken.refreshOn, 0)) {\n // Must refresh due to the refresh_in value.\n this.serverTelemetryManager?.setCacheOutcome(CacheOutcome.REFRESH_CACHED_ACCESS_TOKEN);\n this.logger.info(\"SilentFlowClient:acquireCachedToken - Cached access token's refreshOn property has been exceeded'.\");\n throw ClientAuthError.createRefreshRequiredError();\n }\n\n if (this.config.serverTelemetryManager) {\n this.config.serverTelemetryManager.incrementCacheHits();\n }\n\n return await this.generateResultFromCacheRecord(cacheRecord, request);\n }\n\n /**\n * Helper function to build response object from the CacheRecord\n * @param cacheRecord\n */\n private async generateResultFromCacheRecord(cacheRecord: CacheRecord, request: CommonSilentFlowRequest): Promise {\n let idTokenObj: AuthToken | undefined;\n if (cacheRecord.idToken) {\n idTokenObj = new AuthToken(cacheRecord.idToken.secret, this.config.cryptoInterface);\n }\n return await ResponseHandler.generateAuthenticationResult(\n this.cryptoUtils,\n this.authority,\n cacheRecord,\n true,\n request,\n idTokenObj\n );\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { StandardInteractionClient } from \"./StandardInteractionClient\";\nimport { CommonSilentFlowRequest, AuthenticationResult, SilentFlowClient, ServerTelemetryManager, AccountInfo } from \"@azure/msal-common\";\nimport { SilentRequest } from \"../request/SilentRequest\";\nimport { EventType } from \"../event/EventType\";\nimport { InteractionType, ApiId } from \"../utils/BrowserConstants\";\nimport { BrowserAuthError, BrowserAuthErrorMessage } from \"../error/BrowserAuthError\";\n\nexport class SilentCacheClient extends StandardInteractionClient {\n /**\n * Returns unexpired tokens from the cache, if available\n * @param silentRequest \n */\n async acquireToken(silentRequest: CommonSilentFlowRequest): Promise {\n // Telemetry manager only used to increment cacheHits here\n const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.acquireTokenSilent_silentFlow);\n const silentAuthClient = await this.createSilentFlowClient(serverTelemetryManager, silentRequest.authority);\n this.logger.verbose(\"Silent auth client created\");\n \n try {\n const cachedToken = await silentAuthClient.acquireCachedToken(silentRequest);\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, InteractionType.Silent, cachedToken);\n return cachedToken;\n } catch (error) {\n if (error instanceof BrowserAuthError && error.errorCode === BrowserAuthErrorMessage.signingKeyNotFoundInStorage.code) {\n this.logger.verbose(\"Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair.\");\n }\n throw error;\n }\n }\n \n /**\n * Currently Unsupported\n */\n logout(): Promise {\n // Synchronous so we must reject\n return Promise.reject(BrowserAuthError.createSilentLogoutUnsupportedError());\n }\n\n /**\n * Creates an Silent Flow Client with the given authority, or the default authority.\n * @param serverTelemetryManager\n * @param authorityUrl\n */\n protected async createSilentFlowClient(serverTelemetryManager: ServerTelemetryManager, authorityUrl?: string): Promise {\n // Create auth module.\n const clientConfig = await this.getClientConfiguration(serverTelemetryManager, authorityUrl);\n return new SilentFlowClient(clientConfig);\n }\n\n async initializeSilentRequest(request: SilentRequest, account: AccountInfo): Promise {\n return {\n ...request,\n ...await this.initializeBaseRequest(request),\n account: account,\n forceRefresh: request.forceRefresh || false\n };\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AccountInfo, AuthenticationResult, RequestThumbprint } from \"@azure/msal-common\";\nimport { Configuration } from \"../config/Configuration\";\nimport { DEFAULT_REQUEST, InteractionType } from \"../utils/BrowserConstants\";\nimport { IPublicClientApplication } from \"./IPublicClientApplication\";\nimport { RedirectRequest } from \"../request/RedirectRequest\";\nimport { PopupRequest } from \"../request/PopupRequest\";\nimport { ClientApplication } from \"./ClientApplication\";\nimport { SilentRequest } from \"../request/SilentRequest\";\nimport { EventType } from \"../event/EventType\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\nimport { SilentCacheClient } from \"../interaction_client/SilentCacheClient\";\n\n/**\n * The PublicClientApplication class is the object exposed by the library to perform authentication and authorization functions in Single Page Applications\n * to obtain JWT tokens as described in the OAuth 2.0 Authorization Code Flow with PKCE specification.\n */\nexport class PublicClientApplication extends ClientApplication implements IPublicClientApplication {\n\n // Active requests\n private activeSilentTokenRequests: Map>;\n\n /**\n * @constructor\n * Constructor for the PublicClientApplication used to instantiate the PublicClientApplication object\n *\n * Important attributes in the Configuration object for auth are:\n * - clientID: the application ID of your application. You can obtain one by registering your application with our Application registration portal : https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview\n * - authority: the authority URL for your application.\n * - redirect_uri: the uri of your application registered in the portal.\n *\n * In Azure AD, authority is a URL indicating the Azure active directory that MSAL uses to obtain tokens.\n * It is of the form https://login.microsoftonline.com/{Enter_the_Tenant_Info_Here}\n * If your application supports Accounts in one organizational directory, replace \"Enter_the_Tenant_Info_Here\" value with the Tenant Id or Tenant name (for example, contoso.microsoft.com).\n * If your application supports Accounts in any organizational directory, replace \"Enter_the_Tenant_Info_Here\" value with organizations.\n * If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace \"Enter_the_Tenant_Info_Here\" value with common.\n * To restrict support to Personal Microsoft accounts only, replace \"Enter_the_Tenant_Info_Here\" value with consumers.\n *\n * In Azure B2C, authority is of the form https://{instance}/tfp/{tenant}/{policyName}/\n * Full B2C functionality will be available in this library in future versions.\n *\n * @param configuration object for the MSAL PublicClientApplication instance\n */\n constructor(configuration: Configuration) {\n super(configuration);\n\n this.activeSilentTokenRequests = new Map();\n }\n\n /**\n * Use when initiating the login process by redirecting the user's browser to the authorization endpoint. This function redirects the page, so\n * any code that follows this function will not execute.\n *\n * IMPORTANT: It is NOT recommended to have code that is dependent on the resolution of the Promise. This function will navigate away from the current\n * browser window. It currently returns a Promise in order to reflect the asynchronous nature of the code running in this function.\n *\n * @param request\n */\n async loginRedirect(request?: RedirectRequest): Promise {\n this.logger.verbose(\"loginRedirect called\");\n return this.acquireTokenRedirect(request || DEFAULT_REQUEST);\n }\n\n /**\n * Use when initiating the login process via opening a popup window in the user's browser\n *\n * @param request\n *\n * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.\n */\n loginPopup(request?: PopupRequest): Promise {\n this.logger.verbose(\"loginPopup called\");\n return this.acquireTokenPopup(request || DEFAULT_REQUEST);\n }\n\n /**\n * Silently acquire an access token for a given set of scopes. Returns currently processing promise if parallel requests are made.\n *\n * @param {@link (SilentRequest:type)}\n * @returns {Promise.} - a promise that is fulfilled when this function has completed, or rejected if an error was raised. Returns the {@link AuthResponse} object\n */\n async acquireTokenSilent(request: SilentRequest): Promise {\n this.preflightBrowserEnvironmentCheck(InteractionType.Silent);\n this.logger.verbose(\"acquireTokenSilent called\", request.correlationId);\n const account = request.account || this.getActiveAccount();\n if (!account) {\n throw BrowserAuthError.createNoAccountError();\n }\n const thumbprint: RequestThumbprint = {\n clientId: this.config.auth.clientId,\n authority: request.authority || \"\",\n scopes: request.scopes,\n homeAccountIdentifier: account.homeAccountId,\n claims: request.claims,\n authenticationScheme: request.authenticationScheme,\n resourceRequestMethod: request.resourceRequestMethod,\n resourceRequestUri: request.resourceRequestUri,\n shrClaims: request.shrClaims,\n sshKid: request.sshKid\n };\n const silentRequestKey = JSON.stringify(thumbprint);\n const cachedResponse = this.activeSilentTokenRequests.get(silentRequestKey);\n if (typeof cachedResponse === \"undefined\") {\n this.logger.verbose(\"acquireTokenSilent called for the first time, storing active request\", request.correlationId);\n const response = this.acquireTokenSilentAsync(request, account)\n .then((result) => {\n this.activeSilentTokenRequests.delete(silentRequestKey);\n return result;\n })\n .catch((error) => {\n this.activeSilentTokenRequests.delete(silentRequestKey);\n throw error;\n });\n this.activeSilentTokenRequests.set(silentRequestKey, response);\n return response;\n } else {\n this.logger.verbose(\"acquireTokenSilent has been called previously, returning the result from the first call\", request.correlationId);\n return cachedResponse;\n }\n }\n\n /**\n * Silently acquire an access token for a given set of scopes. Will use cached token if available, otherwise will attempt to acquire a new token from the network via refresh token.\n * @param {@link (SilentRequest:type)}\n * @param {@link (AccountInfo:type)}\n * @returns {Promise.} - a promise that is fulfilled when this function has completed, or rejected if an error was raised. Returns the {@link AuthResponse} \n */\n private async acquireTokenSilentAsync(request: SilentRequest, account: AccountInfo): Promise{\n const silentCacheClient = new SilentCacheClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, request.correlationId);\n const silentRequest = await silentCacheClient.initializeSilentRequest(request, account);\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, InteractionType.Silent, request);\n\n return silentCacheClient.acquireToken(silentRequest).catch(async () => {\n try {\n const tokenRenewalResult = await this.acquireTokenByRefreshToken(silentRequest);\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, InteractionType.Silent, tokenRenewalResult);\n return tokenRenewalResult;\n } catch (tokenRenewalError) {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, InteractionType.Silent, null, tokenRenewalError);\n throw tokenRenewalError;\n }\n });\n }\n}\n","// Config object to be passed to Msal on creation\r\nexport const msalConfig = {\r\n auth: {\r\n clientId: `${process.env.REACT_APP_CLIENTPLATFORM_AZURE_APP_CLIENT_ID}`,\r\n redirectUri: `${process.env.REACT_APP_CLIENTPLATFORM_CLIENT_URL}`,\r\n authority: `${process.env.REACT_APP_CLIENTPLATFORM_AUTHORITY}`,\r\n knownAuthorities: [\r\n `${process.env.REACT_APP_CLIENTPLATFORM_AUTHORITY_ROOT}`,\r\n ],\r\n navigateToLoginRequestUrl: true,\r\n },\r\n cache: {\r\n cacheLocation: \"sessionStorage\", // This configures where your cache will be stored\r\n storeAuthStateInCookie: false, // Set this to \"true\" if you are having issues on IE11 or Edge\r\n },\r\n system: {\r\n loggerOptions: {\r\n /* loggerCallback: (level: any, message: any, containsPii: any) => {\r\n if (containsPii) {\r\n return;\r\n }\r\n console.error(message);\r\n } */\r\n },\r\n },\r\n};\r\n\r\n// Add here scopes for id token to be used at MS Identity Platform endpoints.\r\nexport const loginRequest = {\r\n scopes: [\"openid\"],\r\n forceRefresh: false,\r\n};\r\n","import axios, { AxiosError, AxiosRequestConfig, AxiosResponse } from \"axios\";\r\nimport { Store } from \"redux\";\r\nimport {\r\n AccountInfo,\r\n AuthError,\r\n AuthenticationResult,\r\n Configuration,\r\n PublicClientApplication,\r\n RedirectRequest,\r\n EndSessionRequest,\r\n SilentRequest,\r\n} from \"@azure/msal-browser\";\r\nimport { msalConfig, loginRequest } from \"./authConfig\";\r\nimport { emptyMsalAccountInfo } from \"../store/InitialState\";\r\nimport { setCurrentUser } from \"../store/actions/index\";\r\nimport ICurrentUser from \"../interfaces/ICurrentUser\";\r\n\r\n/**\r\n * Encapsulates the authentication methods into one class.\r\n */\r\nexport default class AuthenticationService {\r\n private msalBrowser: PublicClientApplication;\r\n private apiScope = `${process.env.REACT_APP_CLIENTPLATFORM_API_SCOPE}`;\r\n\r\n private silentRequestForClientPlatformApi: SilentRequest = {\r\n scopes: [this.apiScope], // For the token that grants access to the Client Platform API.\r\n account: { ...emptyMsalAccountInfo },\r\n forceRefresh: false,\r\n };\r\n\r\n constructor() {\r\n this.msalBrowser = new PublicClientApplication(msalConfig);\r\n }\r\n\r\n /**\r\n * First thing this checks for is whether we are in the middle of a redirect from login.microsoftonline.com. If so, and it gets\r\n * a result then it uses that information to also call the Micorosft Graph to get the user's profile info. (email, name, profile image).\r\n * If we are not in the redirect state, then the else case is to initiate the call to login.microsoftonline.com.\r\n *\r\n * @remarks\r\n * https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/initialization.md#redirect-apis\r\n *\r\n * The behavior of this function assumes that this is being called when the application loads (or re-loads) and there is no auth token in redux.\r\n */\r\n loginViaRedirect = async (): Promise => {\r\n let currentUser = {\r\n userId: \"\",\r\n isMossAdamsStaff: false,\r\n name: \"\",\r\n accessToken: \"\",\r\n accessTokenExpiresOn: null,\r\n } as ICurrentUser;\r\n\r\n await this.msalBrowser\r\n .handleRedirectPromise()\r\n .then(async (result: AuthenticationResult | null) => {\r\n if (result !== null) {\r\n const silentClientPlatformApiRequest = {\r\n ...this.silentRequestForClientPlatformApi,\r\n account: result.account!,\r\n };\r\n\r\n await this.msalBrowser\r\n .acquireTokenSilent(silentClientPlatformApiRequest)\r\n .then(async (userResult: AuthenticationResult) => {\r\n currentUser = await this.getCurrentUser(userResult.accessToken);\r\n currentUser.accessToken = userResult.accessToken;\r\n currentUser.accessTokenExpiresOn = userResult.expiresOn;\r\n currentUser.account = userResult.account!;\r\n })\r\n .catch((error: AuthError) => {\r\n console.log(error);\r\n });\r\n } else {\r\n try {\r\n await this.msalBrowser.loginRedirect(loginRequest);\r\n } catch (error) {\r\n console.log(error);\r\n }\r\n }\r\n })\r\n .catch((error: AuthError) => {\r\n console.log(error);\r\n });\r\n\r\n return currentUser;\r\n };\r\n\r\n logout = (userId?: string, redirectUri?: string) => {\r\n let account: AccountInfo | null = null;\r\n if (userId) {\r\n account = this.msalBrowser.getAccountByLocalId(userId);\r\n }\r\n\r\n if (account) {\r\n const logoutRequest: EndSessionRequest = {\r\n account: account,\r\n postLogoutRedirectUri: redirectUri ?? window.location.href,\r\n };\r\n this.msalBrowser.logoutRedirect(logoutRequest);\r\n } else {\r\n this.msalBrowser.logoutRedirect();\r\n }\r\n };\r\n\r\n /**\r\n * Get the user's profile image.\r\n *\r\n * @param accessToken The access token (a big string of letters, numbers, and dashes) from Microsoft Authentication Library (MSAL) for Microsoft's Graph API endpoints.\r\n *\r\n * @returns The user's profile image as a base64 encoded string or an empty string if they do not have a profile image.\r\n */\r\n private getCurrentUser = async (\r\n accessToken: string\r\n ): Promise => {\r\n let currentUser = {} as ICurrentUser;\r\n\r\n const axiosRequestConfig: AxiosRequestConfig = {\r\n headers: { Authorization: `Bearer ${accessToken}` },\r\n timeout: parseInt(\r\n process.env.REACT_APP_CLIENTPLATFORM_API_TIMEOUT as string\r\n ),\r\n };\r\n const endpoint = `${process.env.REACT_APP_CLIENTPLATFORM_API_URL}${process.env.REACT_APP_CLIENTPLATFORM_API_CURRENTUSER}`;\r\n\r\n await axios\r\n .get(endpoint, axiosRequestConfig)\r\n .then(async (response: AxiosResponse) => {\r\n currentUser = response.data;\r\n })\r\n .catch((error: AxiosError) => {\r\n console.log(error);\r\n });\r\n\r\n return currentUser;\r\n };\r\n\r\n /**\r\n * This call is for when the user needs to update and expired authentication token for accessing the MATRIX API.\r\n *\r\n * @param store A reference to the Redux store.\r\n *\r\n * @returns Either the updated token or an empty string unable to get a new token.\r\n */\r\n getClientPlatformApiTokenSilent = async (store: Store): Promise => {\r\n const { currentUser } = store.getState();\r\n const silentRequest = {\r\n ...this.silentRequestForClientPlatformApi,\r\n account: { ...currentUser.account },\r\n };\r\n let token = \"\";\r\n\r\n await this.msalBrowser\r\n .acquireTokenSilent(silentRequest)\r\n .then(async (graphResult: AuthenticationResult): Promise => {\r\n const userUpdated: ICurrentUser = {\r\n ...currentUser,\r\n accessToken: graphResult.accessToken,\r\n accessTokenExpiresOn: graphResult.expiresOn,\r\n };\r\n\r\n store.dispatch(setCurrentUser({ currentUser: userUpdated }));\r\n token = graphResult.accessToken;\r\n })\r\n .catch((error: AuthError) => {\r\n console.log(error);\r\n });\r\n\r\n return token;\r\n };\r\n}\r\n","import PlatformApiService from './PlatformApiService';\r\nimport IPlatformApiGetResult from '../interfaces/IPlatformApiGetResult';\r\nimport ICurrentUser from \"../interfaces/ICurrentUser\";\r\nimport IClient from \"../interfaces/IClient\";\r\nimport IClientEngagement from \"../interfaces/IClientEngagement\";\r\nimport IUser from \"../interfaces/IUser\";\r\nimport IEngagement from \"../interfaces/IEngagement\";\r\nimport IDocument from \"../interfaces/IDocument\";\r\nimport IContentHierarchy from \"../interfaces/IContentHierarchy\";\r\nimport IContentHierarchyGetDto from \"../interfaces/IContentHierarchyGetDto\";\r\nimport IStaffClientsEngagements from \"../interfaces/IStaffClientsEngagements\";\r\nimport IStaffClientsEngagementsGetDto from \"../interfaces/IStaffClientsEngagementsGetDto\";\r\nimport ITaskListRequestDto from \"../interfaces/ITaskListRequestDto\";\r\nimport ITaskListVM from \"../interfaces/ITaskListVM\";\r\nimport IEngagementManagementListVM from \"../interfaces/IEngagementManagementListVM\";\r\nimport IDocumentByFileNameRequestModel from '../interfaces/IDocumentByFileNameRequestModel';\r\nimport ITaskSummary from \"../interfaces/ITaskSummary\";\r\nimport IDueDatesForMonthRequestDto from '../interfaces/IDueDatesForMonthRequestDto'\r\nimport ITaskDocument from \"../interfaces/ITaskDocument\";\r\nimport ITaskComment from \"../interfaces/ITaskComment\";\r\nimport ITaskCommentForExportVM from \"../interfaces/ITaskCommentForExportVM\";\r\nimport IUserUsageReportDto from \"../interfaces/IUserUsageReportDto\";\r\nimport IUserAccessReportDto from '../interfaces/IUserAccessReportDto';\r\nimport IUserNotificationSettings from '../interfaces/IUserNotificationSettings';\r\nimport IDueDate from '../interfaces/IDueDate';\r\nimport ISummaryTask from '../interfaces/ISummaryTask';\r\nimport IMySummary from '../interfaces/IMySummary';\r\nimport ILookup from \"../interfaces/ILookup\";\r\nimport ISocDrlTestingStatusVM from \"../interfaces/ISocDrlTestingStatusVM\";\r\nimport IRecycleBinDocumentsRequestDto from \"../interfaces/IRecycleBinDocumentsRequestDto\";\r\nimport IRecycleBinDocument from '../interfaces/IRecycleBinDocument';\r\nimport { IDownloadDocumentsDto } from '../interfaces/IDownloadDocumentsDto';\r\nimport { IRestrictedUser } from '../interfaces/IRestrictedUser';\r\nimport IRestrictedUserListDto from '../interfaces/IRestrictedUserListDto';\r\nimport { ClientOption } from '../components/ClientEngagementSelector/ClientAutocomplete';\r\nimport { IListOfTasksDto } from '../interfaces/IListOfTasksDto';\r\nimport ITask from '../interfaces/ITask';\r\nimport IMyTaskRequestDto from \"../interfaces/IMyTaskRequestDto\";\r\nimport IDocumentHistoryItem from '../interfaces/IDocumentHistoryItem';\r\nimport IDocumentHistoryDto from '../interfaces/IDocumentHistoryDto';\r\n\r\n/** \r\n * A set of methods for making GET calls to the Platform API to request data.\r\n */\r\nexport default class DataReadService extends PlatformApiService {\r\n\r\n /**\r\n * Get the user's Clients by making a call to the Platform API endpoint.\r\n * \r\n * @returns A [[DataResult]] with the Clients as the data payload.\r\n */\r\n public async GetCurrentUser(): Promise> {\r\n\r\n const platformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_CURRENTUSER || '';\r\n\r\n return await this.PlatformApiGet(platformApiEndpointPath);\r\n }\r\n\r\n /**\r\n * Get the user's Clients by making a call to the Platform API endpoint.\r\n * \r\n * @returns A [[DataResult]] with the Clients as the data payload.\r\n */\r\n public async GetClients(params: URLSearchParams): Promise> {\r\n\r\n const platformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_CLIENTS || '';\r\n\r\n return await this.PlatformApiGet(platformApiEndpointPath, undefined, params);\r\n }\r\n\r\n /**\r\n * Get the user's Clients by making a call to the Platform API endpoint.\r\n * \r\n * @returns A [[DataResult]] with the Clients as the data payload.\r\n */\r\n public async GetClientEngagements(): Promise> {\r\n\r\n const platformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_CLIENTENGAGEMENTS || '';\r\n\r\n return await this.PlatformApiGet(platformApiEndpointPath);\r\n }\r\n\r\n\r\n /**\r\n * Get the the client and engagement Ids for the provided documentId by making a call to the Platform API endpoint.\r\n * \r\n * @returns A [[DataResult]] with the Clients as the data payload.\r\n */\r\n public async GetClientEngagementsByFolderOrDocumentId(documentOrFolderId: string): Promise> {\r\n\r\n const platformApiEndpointPath: string = `${process.env.REACT_APP_CLIENTPLATFORM_API_CLIENTENGAGEMENTSBYDOCUMENTID}/${documentOrFolderId}`;\r\n\r\n return await this.PlatformApiGet(platformApiEndpointPath);\r\n }\r\n\r\n /**\r\n * Get the user's Client\\Engagement for a given taskId by making a call to the Platform API endpoint.\r\n * \r\n * @returns A [[DataResult]] with the Client and Engagement Ids as the data payload.\r\n */\r\n public async GetClientEngagementsByTaskId(taskId: string): Promise> {\r\n\r\n const platformApiEndpointPath: string = `${process.env.REACT_APP_CLIENTPLATFORM_API_CLIENTENGAGEMENTSBYTASKID}/${taskId}`;\r\n\r\n return await this.PlatformApiGet(platformApiEndpointPath);\r\n }\r\n\r\n /**\r\n * Get the user's Engagements by client ID by making a call to the Platform API endpoint.\r\n * \r\n * @returns A [[DataResult]] with the Engagements as the data payload.\r\n */\r\n public async GetEngagements(clientId: string): Promise> {\r\n\r\n const platformApiEndpointPath: string = `${process.env.REACT_APP_CLIENTPLATFORM_API_ENGAGEMENTS}/${clientId}`;\r\n\r\n return await this.PlatformApiGet(platformApiEndpointPath);\r\n }\r\n\r\n /**\r\n * Get the task types for the given engagement Id.\r\n * \r\n * @returns A [[DataResult]] with the TaskTypes as an ILookup list.\r\n */\r\n public async GetTaskTypes(engagementId: string): Promise> {\r\n\r\n const platformApiEndpointPath: string = `${process.env.REACT_APP_CLIENTPLATFORM_API_TASKTYPES_GET}/${engagementId}`;\r\n\r\n return await this.PlatformApiGet(platformApiEndpointPath);\r\n }\r\n\r\n /**\r\n * Get task summary by making a call to the Platform API endpoint.\r\n * \r\n * @returns A [[DataResult]] with the TaskListSummary as the data payload.\r\n */\r\n public async GetTaskSummary(): Promise> {\r\n\r\n const platformApiEndpointPath: string = `${process.env.REACT_APP_CLIENTPLATFORM_API_TASKSUMMARY_GET}`;\r\n\r\n return await this.PlatformApiGet(platformApiEndpointPath);\r\n }\r\n\r\n /**\r\n * Get amount of due tasks on a specific date by making a call to the Platform API endpoint.\r\n * \r\n * @returns A [[DataResult]] with the DueTasks as the data payload.\r\n */\r\n public async GetDueDatesForMonth(model: IDueDatesForMonthRequestDto): Promise> {\r\n\r\n const platformApiEndpointPath: string = `${process.env.REACT_APP_CLIENTPLATFORM_API_DUEDATESFORMONTH_GET}`;\r\n\r\n return await this.PlatformApiPostRequest(platformApiEndpointPath, model);\r\n }\r\n\r\n /**\r\n * Get my summary for logged in user by making a call to the Platform API endpoint.\r\n * \r\n * @returns A [[DataResult]] with the MySummary as the data payload.\r\n */\r\n public async GetMySummary(engagementIds: string[]): Promise> {\r\n\r\n const platformApiEndpointPath: string = `${process.env.REACT_APP_CLIENTPLATFORM_API_MYSUMMARY_GET}` || '';\r\n\r\n return await this.PlatformApiPostRequest(platformApiEndpointPath, engagementIds);\r\n }\r\n\r\n /**\r\n * Get my tasks for logged in user by making a call to the Platform API endpoint.\r\n * @param filter: new, past due, due this week, due next week\r\n * @returns \r\n */\r\n public async GetMyTasks(dto: IMyTaskRequestDto): Promise> {\r\n\r\n const platformApiEndpointPath: string = `${process.env.REACT_APP_CLIENTPLATFORM_API_MYTASKS_GET}` || '';\r\n\r\n return await this.PlatformApiPostRequest(platformApiEndpointPath, dto);\r\n }\r\n\r\n\r\n /**\r\n * Get a tasklist with tasks by engagement ID by making a call to the Platform API endpoint.\r\n * \r\n * @returns A [[DataResult]] with the TaskList as the data payload.\r\n */\r\n public async GetTaskList(taskListId: string): Promise> {\r\n\r\n const platformApiEndpointPath: string = `${process.env.REACT_APP_CLIENTPLATFORM_API_TASKLIST_GET}/${taskListId}`;\r\n\r\n return await this.PlatformApiGet(platformApiEndpointPath);\r\n }\r\n\r\n /**\r\n * Get a List of TaskVM\r\n * \r\n * @param model: \r\n */\r\n\r\n public async GetListOfTasks(model: IListOfTasksDto): Promise> {\r\n const platformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_LISTOFTASKS_GET || \"\";\r\n\r\n return await this.PlatformApiPostRequest(platformApiEndpointPath, model);\r\n }\r\n\r\n /**\r\n * Get a a task's attached TaskDocuments.\r\n * \r\n * @returns A [[DataResult]] with the TaskDocuments as the data payload.\r\n */\r\n public async GetTaskDocuments(taskId: string): Promise> {\r\n\r\n const platformApiEndpointPath: string = `${process.env.REACT_APP_CLIENTPLATFORM_API_TASKDOCUMENTS_GET}/${taskId}`;\r\n\r\n return await this.PlatformApiGet(platformApiEndpointPath);\r\n }\r\n\r\n /**\r\n * Get a a task's attached TaskComments.\r\n * \r\n * @returns A [[DataResult]] with the TaskComments as the data payload.\r\n */\r\n public async GetTaskComments(taskId: string): Promise> {\r\n\r\n const platformApiEndpointPath: string = `${process.env.REACT_APP_CLIENTPLATFORM_API_TASKCOMMENTS_GET}/${taskId}`;\r\n\r\n return await this.PlatformApiGet(platformApiEndpointPath);\r\n }\r\n\r\n /**\r\n * Get a ISocDrlTestingStatusVM for the SocDrlTestingStatus dashboard widget.\r\n * \r\n * @returns A [[DataResult]] with the TaskList as the data payload.\r\n */\r\n public async GetTaskCommentsForExport(engagementIds: string[]): Promise> {\r\n\r\n const platformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_TASKCOMMENTSFOREXPORT_GET || '';\r\n\r\n return await this.PlatformApiPostRequest(platformApiEndpointPath, engagementIds);\r\n }\r\n\r\n /**\r\n * Get a tasklist with tasks by engagement ID by making a call to the Platform API endpoint.\r\n * \r\n * @returns A [[DataResult]] with the TaskList as the data payload.\r\n */\r\n public async GetEngagementManagementList(taskListRequestDto: ITaskListRequestDto): Promise> {\r\n\r\n const platformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_ENGAGEMENTMANAGEMENT_GET || '';\r\n\r\n return await this.PlatformApiPostRequest(platformApiEndpointPath, taskListRequestDto);\r\n }\r\n\r\n /**\r\n * Get a ISocDrlTestingStatusVM for the SocDrlTestingStatus dashboard widget.\r\n * \r\n * @returns A [[DataResult]] with the TaskList as the data payload.\r\n */\r\n public async GetSocDrlTestingStatus(engagementIds: string[]): Promise> {\r\n\r\n const platformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_SOCDRLTESTINGSTATUS_GET || '';\r\n\r\n return await this.PlatformApiPostRequest(platformApiEndpointPath, engagementIds);\r\n }\r\n\r\n /**\r\n * Gets list of documents for the Recycle Bin component.\r\n * \r\n * @returns A [[DataResult]] with the RecycleBinDocumentList as the data payload.\r\n */\r\n public async GetRecycleBinDocuments(dto: IRecycleBinDocumentsRequestDto): Promise> {\r\n\r\n const platformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_RECYCLEBINDOCUMENTS_GET || '';\r\n\r\n return await this.PlatformApiPostRequest(platformApiEndpointPath, dto);\r\n }\r\n\r\n /**\r\n * Get the content hierarchy list by client.\r\n * \r\n * @returns A [[DataResult]] with the ContentHierarchy list as the data payload.\r\n */\r\n public async GetContentHierarchy(contentHierarchyGetDto: IContentHierarchyGetDto): Promise> {\r\n\r\n const platformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_CONTENTHIERARCHY || '';\r\n\r\n return await this.PlatformApiPostRequest(platformApiEndpointPath, contentHierarchyGetDto);\r\n }\r\n\r\n /**\r\n * Get a document(file) by making a call to the Platform API endpoint.\r\n * \r\n * @returns A [[DataResult]] with the File as the data payload.\r\n */\r\n public async DownloadDocument(fileId: string, version?: string): Promise> {\r\n\r\n const platformApiEndpointPath: string = version ? `${process.env.REACT_APP_CLIENTPLATFORM_API_DOCUMENT_DOWNLOAD}/${fileId}/${version}` : `${process.env.REACT_APP_CLIENTPLATFORM_API_DOCUMENT_DOWNLOAD}/${fileId}`;\r\n\r\n return await this.PlatformApiGet(platformApiEndpointPath, \"application/octet-stream\");\r\n }\r\n\r\n /**\r\n * Get a Excel file of app usage by userId by making a call to the Platform API endpoint.\r\n * \r\n * @returns A [[DataResult]] with the File as the data payload.\r\n */\r\n public async GetUserUsageReport(dto: IUserUsageReportDto): Promise> {\r\n\r\n const platformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_REPORTS_GETUSERUSAGE || ''\r\n\r\n return await this.PlatformApiPostRequest(platformApiEndpointPath, dto, \"application/octet-stream\");\r\n }\r\n\r\n /**\r\n * Get an Excel file of client/engagment access by userId by making a call to the Platform API endpoint.\r\n * \r\n * @returns A [[DataResult]] with the File as the data payload.\r\n */\r\n public async GetUserAccessReport(dto: IUserAccessReportDto): Promise> {\r\n\r\n const platformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_REPORTS_GETUSERACCESS || ''\r\n\r\n return await this.PlatformApiPostRequest(platformApiEndpointPath, dto, \"application/octet-stream\");\r\n }\r\n\r\n /**\r\n * Get an Excel file of all tasks by userId by making a call to the Platform API endpoint.\r\n * \r\n * @returns A [[DataResult]] with the File as the data payload.\r\n */\r\n public async GetTaskReport(): Promise> {\r\n\r\n const platformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_REPORTS_GETTASKS || ''\r\n\r\n return await this.PlatformApiPostRequest(platformApiEndpointPath, {}, \"application/octet-stream\");\r\n }\r\n\r\n /**\r\n * Get a a list of users by searchText by making a call to the Platform API endpoint.\r\n * \r\n * @returns A list of users.\r\n */\r\n public async GetUsers(searchText: string): Promise> {\r\n\r\n const platformApiEndpointPath: string = `${process.env.REACT_APP_CLIENTPLATFORM_API_USERS_GET}/${searchText}`;\r\n\r\n return await this.PlatformApiGet(platformApiEndpointPath);\r\n }\r\n\r\n /**\r\n * Get a folder's size by making a call to the Platform API endpoint.\r\n * \r\n * @returns A number representing the total bytes of all the files in the folder.\r\n */\r\n public async GetFolderSize(folderId: string): Promise> {\r\n\r\n const platformApiEndpointPath: string = `${process.env.REACT_APP_CLIENTPLATFORM_API_DOCUMENT_GETFOLDERSIZE}/${folderId}`;\r\n\r\n return await this.PlatformApiGet(platformApiEndpointPath);\r\n }\r\n\r\n /**\r\n * Get a document(file)'s details and history by making a call to the Platform API endpoint.\r\n * \r\n * @returns A [[DataResult]] with the document's details as the data payload.\r\n */\r\n public async GetDocument(fileId: string): Promise> {\r\n\r\n const platformApiEndpointPath: string = `${process.env.REACT_APP_CLIENTPLATFORM_API_DOCUMENT_GET}/${fileId}`;\r\n\r\n return await this.PlatformApiGet(platformApiEndpointPath);\r\n }\r\n\r\n /* Get a tasklist with tasks by engagement ID by making a call to the Platform API endpoint.\r\n * \r\n * @returns A [[DataResult]] with the TaskList as the data payload.\r\n */\r\n public async GetDocumentByFileName(documentByFileNameRequestModel: IDocumentByFileNameRequestModel): Promise> {\r\n\r\n // TODO: IPlatformApiGetResult defines data as an array, but the back end returns a single object.\r\n\r\n const platformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_DOCUMENT_GETBYFILENAME || '';\r\n\r\n return await this.PlatformApiPostRequest(platformApiEndpointPath, documentByFileNameRequestModel);\r\n }\r\n\r\n /**\r\n * Get a folder and it's nexted content as a zip file.\r\n * \r\n * @returns A zip file as the data payload.\r\n */\r\n public async DownloadFolder(folderId: string): Promise> {\r\n\r\n const platformApiEndpointPath: string = `${process.env.REACT_APP_CLIENTPLATFORM_API_DOCUMENT_DOWNLOADFOLDER}/${folderId}`;\r\n\r\n return await this.PlatformApiGet(platformApiEndpointPath, \"application/octet-stream\");\r\n }\r\n\r\n /**\r\n * Get a list of documents as a zip file.\r\n * \r\n * @returns A zip file as the data payload.\r\n */\r\n public async DownloadDocuments(docs: IDownloadDocumentsDto[]): Promise> {\r\n\r\n const platformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_DOCUMENT_DOWNLOADDOCUMENTS || '';\r\n\r\n return await this.PlatformApiPostRequest(platformApiEndpointPath, docs, \"application/octet-stream\");\r\n }\r\n\r\n /**\r\n * Get a list of documents as a zip file.\r\n * \r\n * @returns A zip file as the data payload.\r\n */\r\n public async DownloadDocumentsByTaskIdList(taskIds: string[]): Promise> {\r\n\r\n const platformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_DOCUMENT_DOWNLOADTASKDOCUMENTS || '';\r\n\r\n return await this.PlatformApiPostRequest(platformApiEndpointPath, taskIds, \"application/octet-stream\");\r\n }\r\n\r\n /**\r\n * Get the team members (staff) associated with a list of clients and engagement ids.\r\n * \r\n * @returns A [[DataResult]] with the Staff list as the payload.\r\n */\r\n public async GetStaffByClientsAndEngagements(staffClientsEngagementsGetDto: IStaffClientsEngagementsGetDto): Promise> {\r\n\r\n const platformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_TEAMMEMBERS || '';\r\n\r\n return await this.PlatformApiPostRequest(platformApiEndpointPath, staffClientsEngagementsGetDto);\r\n\r\n }\r\n\r\n /**\r\n * Get notification settings for user\r\n * \r\n * @returns A [[DataResult]] with the notification settings as the payload.\r\n */\r\n public async GetNotificationSettings(): Promise> {\r\n\r\n const platformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_USERNOTIFICATIONSETTINGS_GET || '';\r\n\r\n return await this.PlatformApiGet(platformApiEndpointPath);\r\n\r\n }\r\n\r\n /**\r\n * Get users with access to client/engagement and whether or not already assigned to document\r\n * \r\n * @returns A [[DataResult]] with the Restricted User List as the payload.\r\n */\r\n public async GetRestrictedUserList(restrictedUserListDto: IRestrictedUserListDto): Promise> {\r\n\r\n const platformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_RESTRICTED_USER_LIST || '';\r\n\r\n return await this.PlatformApiPostRequest(platformApiEndpointPath, restrictedUserListDto);\r\n\r\n }\r\n\r\n \r\n /**\r\n * Get the Document History data for a given Document Guid.\r\n * \r\n * @returns A [[DataResult]] with the latest Document History entry for each FileVersion as the payload.\r\n */\r\n public async GetVersionHistory(historyDto: IDocumentHistoryDto): Promise> {\r\n\r\n const platformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_DOCUMENT_HISTORY_GET || '';\r\n\r\n return await this.PlatformApiPostRequest(platformApiEndpointPath, historyDto);\r\n\r\n }\r\n\r\n /**\r\n * Get the static Area list\r\n */\r\n public async GetAreaList(): Promise> {\r\n const platformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_LOOKUPS_AREAS || '';\r\n return await this.PlatformApiGet(platformApiEndpointPath);\r\n }\r\n\r\n /**\r\n * Get the static Phase list\r\n */\r\n public async GetPhaseList(): Promise> {\r\n const platformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_LOOKUPS_PHASES || '';\r\n return await this.PlatformApiGet(platformApiEndpointPath);\r\n\r\n }\r\n\r\n /**\r\n * Get the static Priority list \r\n */\r\n public async GetTaskPriorityList(): Promise> {\r\n const platformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_LOOKUPS_TASK_PRIORITY || '';\r\n return await this.PlatformApiGet(platformApiEndpointPath);\r\n\r\n }\r\n\r\n /**\r\n * Get the static Task Status list\r\n */\r\n public async GetTaskStatusList(): Promise> {\r\n const platformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_LOOKUPS_TASK_STATUS || '';\r\n return await this.PlatformApiGet(platformApiEndpointPath);\r\n\r\n }\r\n\r\n /**\r\n * Get the static Task Type list\r\n */\r\n public async GetTaskTypeList(): Promise> {\r\n const platformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_LOOKUPS_TASK_TYPE || '';\r\n return await this.PlatformApiGet(platformApiEndpointPath);\r\n\r\n }\r\n\r\n /**\r\n * Get the static Soc Status list\r\n */\r\n public async GetSocStatusList(): Promise> {\r\n const platformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_LOOKUPS_SOC_STATUS || '';\r\n return await this.PlatformApiGet(platformApiEndpointPath);\r\n\r\n }\r\n\r\n /**\r\n * Get the static Soc Status list\r\n */\r\n public async GetUserTermsAndConditionsAcceptanceStatus(): Promise> {\r\n const platformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_GET_CURRENT_USER_ACCEPTANCE_STATUS || '';\r\n return await this.PlatformApiGet(platformApiEndpointPath);\r\n }\r\n\r\n}\r\n","import { AxiosProgressEvent, AxiosRequestConfig } from 'axios';\r\nimport PlatformApiService from './PlatformApiService';\r\nimport IDocumentCopyModel from '../interfaces/IDocumentCopyModel';\r\nimport IContentHierarchy from '../interfaces/IContentHierarchy';\r\nimport IPlatformApiPostResult from '../interfaces/IPlatformApiPostResult';\r\nimport ICreateFolderModel from '../interfaces/ICreateFolderModel'\r\nimport IUpdateFavoriteModel from '../interfaces/IUpdateFavoriteModel';\r\nimport IUpdateTaskListCommandModel from '../interfaces/IUpdateTaskListCommandModel';\r\nimport IDeleteTaskDocumentDto from \"../interfaces/IDeleteTaskDocumentDto\";\r\nimport ITask from '../interfaces/ITask';\r\nimport ITaskComment from '../interfaces/ITaskComment';\r\nimport ITaskDocument from '../interfaces/ITaskDocument';\r\nimport IDocumentsUploadModel from '../interfaces/IDocumentsUploadModel';\r\nimport IDeleteFolderOrDocumentModel from '../interfaces/IDeleteFolderOrDocumentModel';\r\nimport { IUserClientEngagementNotificationSetting, IUserNotificationSetting } from '../interfaces/IUserNotificationSettings';\r\nimport { IUpdateDocumentAccessDto } from '../interfaces/IUpdateDocumentPermissionsDto';\r\nimport IUpdateFolderPermissionsDto from '../interfaces/IUpdateFolderPermissionsDto';\r\nimport { MoveDocumentsDto } from '../hooks/useMoveDocuments';\r\nimport { MoveFoldersDto } from '../hooks/useMoveFolders';\r\nimport { RequestRestrictionDto, RequestRestrictionResponse } from '../hooks/useUpdateRequestRestriction';\r\n\r\n/**\r\n * A set of methods for making POST calls to the Client Platform API to create or update data.\r\n */\r\nexport default class DataWriteService extends PlatformApiService {\r\n\r\n /**\r\n * Upload multiple documents to a folder\r\n * \r\n * @param IDocumentCopyModel \r\n */\r\n public async PostDocuments(model: IDocumentsUploadModel, progressCallback?: (progressEvent: AxiosProgressEvent) => void): Promise {\r\n const postDocumentEndpoint = process.env.REACT_APP_CLIENTPLATFORM_API_DOCUMENTS_UPLOAD || '';\r\n\r\n const formDataBody = this.GetFileUploadFormData(model);\r\n\r\n const axiosConfigurations: AxiosRequestConfig = {\r\n\r\n headers: {\r\n 'Content-Type': 'multipart/form-data',\r\n 'accept': 'application/json'\r\n },\r\n onUploadProgress: progressCallback,\r\n timeout: Number(process.env.REACT_APP_CLIENTPLATFORM_UPLOAD_TIMEOUT)\r\n };\r\n\r\n const response = await this.PlatformApiPost(postDocumentEndpoint, formDataBody, axiosConfigurations);\r\n\r\n return response;\r\n }\r\n\r\n private GetFileUploadFormData(model: IDocumentsUploadModel) {\r\n // The keys in this key value pair must match the parameter names in the API\r\n let formDataBody = new FormData();\r\n\r\n model.documentFiles.forEach((document) => {\r\n formDataBody.append(\"DocumentFiles\", document);\r\n });\r\n model.permittedUsers.forEach((userId) => {\r\n formDataBody.append(\"PermittedUsers\", userId);\r\n });\r\n\r\n formDataBody.append('FolderId', model.folderId);\r\n formDataBody.append('OverwriteExisting', model.overwriteExisting.toString());\r\n formDataBody.append('IsPrivate', model.isPrivate.toString());\r\n formDataBody.append('SuppressNotifications', Boolean(model.suppressNotifications).toString());\r\n\r\n if (model.newVersionDocumentId) {\r\n formDataBody.append('NewVersionDocumentId', model.newVersionDocumentId);\r\n }\r\n\r\n if (model.task?.taskId) {\r\n formDataBody.append('TaskId', model.task.taskId);\r\n }\r\n\r\n return formDataBody;\r\n }\r\n\r\n /**\r\n * Upload multiple documents to a folder and attach them to a request\r\n * \r\n * @param IDocumentCopyModel, @param progressCallback\r\n */\r\n public async PostAttachments(documentModel: IDocumentsUploadModel, progressCallback?: (progressEvent: AxiosProgressEvent) => void): Promise {\r\n const postDocumentEndpoint = process.env.REACT_APP_CLIENTPLATFORM_API_DOCUMENTS_UPLOAD_ATTACHMENTS || '';\r\n\r\n const formDataBody = this.GetFileUploadFormData(documentModel);\r\n\r\n const axiosConfigurations: AxiosRequestConfig = {\r\n headers: {\r\n 'Content-Type': 'multipart/form-data',\r\n 'accept': 'application/json'\r\n },\r\n onUploadProgress: progressCallback,\r\n timeout: Number(process.env.REACT_APP_CLIENTPLATFORM_UPLOAD_TIMEOUT)\r\n };\r\n\r\n const response = await this.PlatformApiPost(postDocumentEndpoint, formDataBody, axiosConfigurations);\r\n return response;\r\n }\r\n\r\n /**\r\n * Make an old document version a new head version\r\n * \r\n * @param docId\r\n * @param fileVersion\r\n */\r\n public async RestoreDocumentVersion(docId: string, fileVersion: string): Promise {\r\n const postDocumentEndpoint = process.env.REACT_APP_CLIENTPLATFORM_API_DOCUMENT_RESTOREVERSION || '';\r\n\r\n // FormData is used when sending files to a server\r\n const formDataBody = new FormData();\r\n // Append the file and entityId to the formData \r\n // The keys in this key value pair must match the parameter names in the API\r\n formDataBody.append('fileId', docId);\r\n formDataBody.append('version', fileVersion);\r\n\r\n const axiosConfigurations: AxiosRequestConfig = {\r\n\r\n headers: {\r\n 'Content-Type': 'multipart/form-data',\r\n 'accept': 'application/json'\r\n },\r\n // For file upload we will use a timeout of 2 minutes \r\n timeout: 120000\r\n };\r\n\r\n const response = await this.PlatformApiPost(postDocumentEndpoint, formDataBody, axiosConfigurations);\r\n\r\n return response;\r\n }\r\n\r\n /**\r\n * Copy an existing document to a different folder\r\n * \r\n * @param IDocumentCopyModel \r\n */\r\n public async CopyDocument(model: IDocumentCopyModel): Promise {\r\n const postDocumentEndpoint = process.env.REACT_APP_CLIENTPLATFORM_API_DOCUMENT_COPY || '';\r\n\r\n // FormData is used when sending files to a server\r\n const formDataBody = new FormData();\r\n // Append the file and entityId to the formData \r\n // The keys in this key value pair must match the parameter names in the API\r\n formDataBody.append('SourceFileId', model.sourceFileId);\r\n formDataBody.append('FolderId', model.folderId);\r\n formDataBody.append('FileName', model.fileName);\r\n\r\n const axiosConfigurations: AxiosRequestConfig = {\r\n\r\n headers: {\r\n 'Content-Type': 'multipart/form-data',\r\n 'accept': 'application/json'\r\n },\r\n // For file upload we will use a timeout of 5 minutes \r\n timeout: 300000\r\n };\r\n\r\n const response = await this.PlatformApiPost(postDocumentEndpoint, formDataBody, axiosConfigurations);\r\n\r\n return response;\r\n }\r\n\r\n /**\r\n * Update Document metadata\r\n * \r\n * @param model\r\n */\r\n public async UpdateDocument(model: IContentHierarchy): Promise {\r\n const updateDocumentEndpoint = process.env.REACT_APP_CLIENTPLATFORM_API_DOCUMENT_UPDATE || '';\r\n\r\n return await this.PlatformApiPost(updateDocumentEndpoint, model);\r\n }\r\n\r\n /**\r\n * Restore Document \r\n * \r\n * @param model\r\n */\r\n public async RestoreDocument(fileId: string): Promise {\r\n const restoreDocumentEndpoint = `${process.env.REACT_APP_CLIENTPLATFORM_API_DOCUMENT_RESTORE}/${fileId}`;\r\n return await this.PlatformApiPost(restoreDocumentEndpoint, fileId);\r\n }\r\n\r\n /**\r\n * Update Folder \r\n * \r\n * @param model\r\n */\r\n public async UpdateFolder(model: IContentHierarchy): Promise {\r\n const updateFolderEndpoint = process.env.REACT_APP_CLIENTPLATFORM_API_FOLDER_UPDATE || '';\r\n\r\n return await this.PlatformApiPost(updateFolderEndpoint, model);\r\n }\r\n\r\n /**\r\n * Delete an array of folders or documents represented by IDeleteFolderOrDocumentModel objects. \r\n * \r\n * @param documentsAndFolders \r\n */\r\n public async DeleteFoldersOrDocuments(documentsAndFolders: IDeleteFolderOrDocumentModel[]): Promise {\r\n const clientPlatformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_FOLDERS_OR_DOCUMENTS_DELETE || \"\";\r\n\r\n return await this.PlatformApiPost(clientPlatformApiEndpointPath, documentsAndFolders);\r\n }\r\n\r\n /**\r\n * Sends a delete request to the database API to delete an document\r\n * \r\n * @param fileId \r\n */\r\n public async DeleteDocument(fileId: string): Promise {\r\n const clientPlatformApiEndpointPath: string = `${process.env.REACT_APP_CLIENTPLATFORM_API_DOCUMENT_DELETE}/${fileId}`;\r\n\r\n return await this.PlatformApiDelete(clientPlatformApiEndpointPath, fileId);\r\n }\r\n\r\n /**\r\n * Add a sub folder to the specified parent folder\r\n * \r\n * @param model: ICreateFolderModel\r\n */\r\n public async CreateFolder(model: ICreateFolderModel): Promise {\r\n const clientPlatformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_FOLDER_CREATE || \"\";\r\n\r\n return await this.PlatformApiPost(clientPlatformApiEndpointPath, model);\r\n }\r\n\r\n /**\r\n * Toggle a whether or not a client is a \"favorite\"\r\n * \r\n * @param model: IUpdateFavoriteModel\r\n */\r\n\r\n public async UpdateFavorite(model: IUpdateFavoriteModel): Promise {\r\n const clientPlatformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_UPDATE_FAVORITE || \"/000122/updatefavorite\";\r\n\r\n return await this.PlatformApiPost(clientPlatformApiEndpointPath, model);\r\n }\r\n\r\n\r\n /**\r\n * Update the last accessed data for a client.\r\n * \r\n * @returns A [[DataResult]] with the Clients as the data payload.\r\n */\r\n public async UpdateLastAccess(clientIdParam: URLSearchParams): Promise {\r\n\r\n const platformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_CLIENT_LAST_ACCESS || '';\r\n\r\n let axiosConfig: AxiosRequestConfig = { params: clientIdParam };\r\n\r\n return await this.PlatformApiPost(platformApiEndpointPath, undefined, axiosConfig);\r\n }\r\n\r\n /**\r\n * Update Engagement Management record\r\n * \r\n * @param model: IUpdateFavoriteModel\r\n */\r\n\r\n public async UpdateEngagementManagementTaskAdmin(model: ITask): Promise {\r\n const clientPlatformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_UPDATE_ENGAGEMENTMANAGEMENT_TASK_ADMIN || \"\";\r\n\r\n return await this.PlatformApiPost(clientPlatformApiEndpointPath, model);\r\n }\r\n\r\n /**\r\n * Update Engagement Management record\r\n * \r\n * @param model: IUpdateFavoriteModel\r\n */\r\n\r\n public async UpdateEngagementManagementTaskClient(model: ITask): Promise {\r\n const clientPlatformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_UPDATE_ENGAGEMENTMANAGEMENT_TASK_CLIENT || \"\";\r\n\r\n return await this.PlatformApiPost(clientPlatformApiEndpointPath, model);\r\n }\r\n\r\n /**\r\n * Update Task List tasks\r\n * \r\n * @param model: ITaskListVM\r\n */\r\n\r\n public async UpdateTaskList(model: IUpdateTaskListCommandModel): Promise {\r\n const clientPlatformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_UPDATE_TASKLIST_UPDATE || \"\";\r\n\r\n return await this.PlatformApiPost(clientPlatformApiEndpointPath, model);\r\n }\r\n\r\n /**\r\n * Update Task \r\n * \r\n * @param model: ITaskM\r\n */\r\n\r\n public async UpdateTask(model: ITask): Promise {\r\n const clientPlatformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_UPDATE_TASK || \"\";\r\n\r\n return await this.PlatformApiPost(clientPlatformApiEndpointPath, model);\r\n }\r\n\r\n /**\r\n * Create Task Comment\r\n * \r\n * @param model: ITaskListVM\r\n */\r\n\r\n public async CreateTaskComment(model: ITaskComment): Promise {\r\n const clientPlatformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_CREATE_TASK_COMMENT || \"\";\r\n\r\n return await this.PlatformApiPost(clientPlatformApiEndpointPath, model);\r\n }\r\n\r\n /**\r\n * Update Task Comment\r\n * \r\n * @param model: ITaskListVM\r\n */\r\n\r\n public async UpdateTaskComment(model: ITaskComment): Promise {\r\n const clientPlatformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_TASKCOMMENT_UPDATE || \"\";\r\n\r\n return await this.PlatformApiPost(clientPlatformApiEndpointPath, model);\r\n }\r\n\r\n /**\r\n * Sends a delete request to the database API to delete a set of tasks\r\n * \r\n * @param taskId \r\n */\r\n public async PermanentlyDeleteTasks(taskIds: string[]): Promise {\r\n const clientPlatformApiEndpointPath: string = `${process.env.REACT_APP_CLIENTPLATFORM_API_TASKS_PERMANENTLY_DELETE}`;\r\n return await this.PlatformApiDelete(clientPlatformApiEndpointPath, taskIds);\r\n }\r\n\r\n /**\r\n * Sends a create task document request to the database API to delete a task document\r\n * \r\n * @param model\r\n * \r\n */\r\n public async CreateTaskDocument(model: ITaskDocument[]): Promise {\r\n const clientPlatformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_TASKDOCUMENT_CREATE || \"\";\r\n\r\n return await this.PlatformApiPost(clientPlatformApiEndpointPath, model);\r\n }\r\n\r\n /**\r\n * Sends a delete task document request to the database API to delete a task document\r\n * \r\n * @param taskId\r\n * @param documentId \r\n * \r\n */\r\n public async DeleteTaskDocument(model: IDeleteTaskDocumentDto): Promise {\r\n const clientPlatformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_TASKDOCUMENT_DELETE || \"\";\r\n\r\n return await this.PlatformApiDelete(clientPlatformApiEndpointPath, model);\r\n }\r\n\r\n /**\r\n * Sends a delete task comment request to the database API to delete a task comment\r\n * \r\n * @param taskId\r\n * @param documentId \r\n * \r\n */\r\n public async DeleteTaskComment(taskCommentId: string): Promise {\r\n const clientPlatformApiEndpointPath: string = `${process.env.REACT_APP_CLIENTPLATFORM_API_TASKCOMMENT_DELETE}/${taskCommentId}`;\r\n\r\n return await this.PlatformApiDelete(clientPlatformApiEndpointPath, taskCommentId);\r\n }\r\n\r\n /**\r\n * Toggle whether a notification setting is on or off\r\n * \r\n * @param model: INotificationSetting\r\n */\r\n\r\n public async UpdateNotificationSettings(model: IUserNotificationSetting[]): Promise {\r\n const clientPlatformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_USERNOTIFICATIONSETTINGS_UPDATE || \"\";\r\n\r\n return await this.PlatformApiPost(clientPlatformApiEndpointPath, model);\r\n }\r\n\r\n /**\r\n * Toggle whether a client/engagement notification setting is on or off\r\n * \r\n * @param model: INotificationSetting\r\n */\r\n\r\n public async UpdateClientEngagementNotificationSettings(model: IUserClientEngagementNotificationSetting[]): Promise {\r\n const clientPlatformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_USERCLIENTENGAGEMENTNOTIFICATIONSETTINGS_UPDATE || \"\";\r\n\r\n return await this.PlatformApiPost(clientPlatformApiEndpointPath, model);\r\n }\r\n\r\n /**\r\n * Update access permissions on restricted document\r\n * \r\n * @param model: IUpdateDocumentAccessDto\r\n */\r\n public async UpdateDocumentAccessPermissions(model: IUpdateDocumentAccessDto): Promise {\r\n const clientPlatformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_DOCUMENT_RESTRICTED_ACCESS_UPDATE || \"\";\r\n\r\n return await this.PlatformApiPost(clientPlatformApiEndpointPath, model);\r\n }\r\n\r\n /**\r\n * Update access permissions on restricted document\r\n * \r\n * @param model: IUpdateFolderPermissionsDto\r\n */\r\n public async UpdateFolderAccessPermissions(model: IUpdateFolderPermissionsDto): Promise {\r\n const clientPlatformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_FOLDER_UPDATE_ACCESS || \"\";\r\n\r\n return await this.PlatformApiPost(clientPlatformApiEndpointPath, model);\r\n }\r\n\r\n /**\r\n * Move documents to a new folder.\r\n * @param model: MoveDocumentsDto\r\n */\r\n public async MoveDocuments(model: MoveDocumentsDto): Promise {\r\n const clientPlatformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_DOCUMENTS_MOVE || \"\";\r\n\r\n return await this.PlatformApiPost(clientPlatformApiEndpointPath, model);\r\n }\r\n\r\n /**\r\n * Move folders to a new folder.\r\n * @param model: MoveFoldersDto\r\n */\r\n public async MoveFolders(model: MoveFoldersDto): Promise {\r\n const clientPlatformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_FOLDERS_MOVE || \"\";\r\n\r\n return await this.PlatformApiPost(clientPlatformApiEndpointPath, model);\r\n }\r\n\r\n\r\n /**\r\n * Update IsRestricted for a set of requests. \r\n * @param model: RequestRestrictionDto \r\n * @returns RequestRestrictionResponse\r\n */\r\n public async UpdateRequestRestriction(model: RequestRestrictionDto): Promise {\r\n const clientPlatformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_UPDATE_TASK_RESTRICTIONS || \"\";\r\n\r\n return await this.PlatformApiPost(clientPlatformApiEndpointPath, model);\r\n }\r\n\r\n /**\r\n * Update terms and condtions acceptance status for the current user.\r\n */\r\n public async AcceptTermsAndConditions(): Promise {\r\n const clientPlatformApiEndpointPath: string = process.env.REACT_APP_CLIENTPLATFORM_API_ACCEPT_TERMS_AND_CONDITIONS || \"\";\r\n\r\n return await this.PlatformApiPost(clientPlatformApiEndpointPath, undefined, undefined);\r\n }\r\n}","/**\r\n * Reformat the error messages returned from the ClientPlatform Api.\r\n * \r\n * @remarks\r\n * The errors arrive from the api as an object of an index signature type with keys (the source of the error)\r\n * of strings and values of an array of strings (the error message).\r\n * \r\n * @param errorsFromApi The errors as an object of type of an index signature.\r\n */\r\nexport const parseApiErrors = (errorsFromApi: { [key: string]: string[] }): string[] => {\r\n\r\n const errorsParsed: string[] = [];\r\n\r\n Object.keys(errorsFromApi).forEach((key: string) => {\r\n\r\n errorsFromApi[key].forEach((value: string) => {\r\n \r\n const errorMessage = `${key}: ${value}`;\r\n\r\n errorsParsed.push(errorMessage);\r\n });\r\n });\r\n\r\n return errorsParsed;\r\n};","import axios, { AxiosRequestConfig, AxiosResponse, AxiosError } from 'axios';\r\nimport { parseApiErrors } from '../helpers/DataFormatters';\r\nimport IPlatformApiGetResult from '../interfaces/IPlatformApiGetResult';\r\nimport IPlatformApiError400 from '../interfaces/IPlatformApiError400';\r\nimport IPlatformApiError404 from '../interfaces/IPlatformApiError404';\r\nimport IPlatformApiError500 from '../interfaces/IPlatformApiError500';\r\nimport IPlatformApiPostResult from '../interfaces/IPlatformApiPostResult';\r\nimport TRowData from '../types/TRowData';\r\n\r\nconst apiTimeOutLimit = parseInt(process.env.REACT_APP_CLIENTPLATFORM_API_TIMEOUT as string);\r\nconst fileDownloadTimoutLimit = parseInt(process.env.REACT_APP_CLIENTPLATFORM_DOWNLOAD_TIMEOUT as string);\r\n\r\n/**\r\n * Make GET and POST calls to the Platform API.\r\n * \r\n * @remarks\r\n * This is intended to be used like an abstract class would be in C#. That is it should not be used directly, but the other data service classes will extend this class.\r\n */\r\nexport default class PlatformApiService {\r\n\r\n\r\n /**\r\n * Make a GET request to the Platform API to request data.\r\n * \r\n * @param platformApiGetEndpointPath The unique path portion of the url to the Platform API endpoint.\r\n * \r\n * @returns The [[IDataResult]] with a data result of the type T.\r\n */\r\n protected async PlatformApiGet(platformApiGetEndpointPath: string, contentType?: string, searchParams?: URLSearchParams): Promise> {\r\n\r\n let result: IPlatformApiGetResult = { data: [], status: true, timeoutOccured: false, errorMessages: [] };\r\n\r\n const platformApiGetEndpoint = `${process.env.REACT_APP_CLIENTPLATFORM_API_URL}${platformApiGetEndpointPath}`;\r\n\r\n const config: AxiosRequestConfig = { timeout: apiTimeOutLimit, validateStatus: function (status: any) { return status < 500 } }\r\n if (contentType == \"application/octet-stream\") {\r\n config.responseType = \"blob\";\r\n config.timeout = fileDownloadTimoutLimit;\r\n }\r\n\r\n if (searchParams) {\r\n config.params = searchParams;\r\n }\r\n\r\n await axios.get(platformApiGetEndpoint, config)\r\n\r\n .then(response => {\r\n\r\n let platformApiError400: IPlatformApiError400;\r\n let platformApiError404: IPlatformApiError404;\r\n let platformApiError500: IPlatformApiError500;\r\n let errorMessagesParsed: string[];\r\n\r\n switch (response.status) {\r\n\r\n case 200:\r\n\r\n result = { ...result, data: response.data };\r\n\r\n break;\r\n\r\n case 400:\r\n\r\n platformApiError400 = response.data as unknown as IPlatformApiError400;\r\n\r\n errorMessagesParsed = parseApiErrors(platformApiError400.errors);\r\n\r\n result = { ...result, status: false, errorMessages: errorMessagesParsed };\r\n\r\n break;\r\n\r\n case 404:\r\n\r\n platformApiError404 = response.data as unknown as IPlatformApiError404;\r\n\r\n result = { ...result, status: false, errorMessages: [platformApiError404.detail] };\r\n\r\n break;\r\n\r\n default:\r\n\r\n result = { ...result, status: false, errorMessages: ['Sorry, there was an error. If you continue to see this error please, contact your champion.'] };\r\n\r\n break;\r\n }\r\n\r\n })\r\n .catch(error => {\r\n\r\n let errorMessage: string;\r\n\r\n if (error.response) {\r\n\r\n errorMessage = `PlatformApiGet returned error \"${error.response.status} ${error.response.statusText} when making a GET request to ${platformApiGetEndpointPath}\".`;\r\n\r\n } else {\r\n\r\n errorMessage = 'Error:Network Error';\r\n }\r\n\r\n if (!error.response && error.message.toString().includes('timeout') && error.message.toString().includes('exceeded')) {\r\n\r\n result = { ...result, timeoutOccured: true };\r\n }\r\n\r\n /* TODO: Add appInsights without causing tests to fail.\r\n const exceptionToTrack = generateAppInsightsError({\r\n message: errorMessage, \r\n name: 'PlatformApiGet error', \r\n id: 'platformApiServicePlatformApiGetFailure', \r\n severityLevel: SeverityLevel.Critical\r\n });\r\n\r\n appInsights.trackException(exceptionToTrack);\r\n */\r\n\r\n result = { ...result, status: false };\r\n });\r\n\r\n return result;\r\n }\r\n\r\n\r\n\r\n /**\r\n * Make a POST request to the Platform API to request data. Use this when you need to post complex data for the query that won't work on the URL.\r\n * \r\n * @param platformApiPostEndpointPath The unique path portion of the url to the Platform API endpoint.\r\n * \r\n * @returns The [[IDataResult]] with a data result of the type T.\r\n */\r\n protected async PlatformApiPostRequest(platformApiPostEndpointPath: string, data: U, contentType?: string): Promise> {\r\n\r\n let result: IPlatformApiGetResult = { data: [], status: true, timeoutOccured: false, errorMessages: [] };\r\n\r\n const platformApiPostEndpoint = `${process.env.REACT_APP_CLIENTPLATFORM_API_URL}${platformApiPostEndpointPath}`;\r\n\r\n const config: AxiosRequestConfig = { timeout: apiTimeOutLimit, validateStatus: function (status) { return status === 200 || status === 204 || status === 400 || status === 404 } };\r\n\r\n if (contentType == \"application/octet-stream\") {\r\n config.responseType = \"blob\";\r\n config.timeout = fileDownloadTimoutLimit;\r\n }\r\n\r\n await axios.post(platformApiPostEndpoint, data, config)\r\n .then(response => {\r\n if (!response?.data) throw response;\r\n let platformApiError400: IPlatformApiError400;\r\n let platformApiError404: IPlatformApiError404;\r\n let platformApiError500: IPlatformApiError500;\r\n let errorMessagesParsed: string[];\r\n\r\n switch (response.status) {\r\n\r\n case 200:\r\n case 204:\r\n\r\n result = { ...result, data: response.data };\r\n\r\n break;\r\n \r\n case 400:\r\n \r\n platformApiError400 = response.data as unknown as IPlatformApiError400;\r\n\r\n errorMessagesParsed = parseApiErrors(platformApiError400.errors);\r\n\r\n result = { ...result, status: false, errorMessages: errorMessagesParsed };\r\n\r\n break;\r\n\r\n case 404:\r\n\r\n platformApiError404 = response.data as unknown as IPlatformApiError404;\r\n\r\n result = { ...result, status: false, errorMessages: [platformApiError404.detail] };\r\n\r\n break;\r\n\r\n\r\n default:\r\n\r\n result = { ...result, status: false, errorMessages: ['Sorry, there was an error. If you continue to see this error please, contact your champion.'] };\r\n\r\n break;\r\n }\r\n\r\n })\r\n .catch(async error => {\r\n\r\n let errorMessages: string[] = [];\r\n\r\n const is500Error = error?.request?.status === 500;\r\n if (error.request?.responseType === 'blob' && is500Error) {\r\n let errorObjString = await error.response.data.text();\r\n let platformApiError500: IPlatformApiError500 = JSON.parse(errorObjString);\r\n errorMessages.push(`${platformApiError500.title} ${platformApiError500.detail ?? ''}`);\r\n }\r\n else if (is500Error) {\r\n errorMessages.push(error.response?.data?.detail);\r\n }\r\n\r\n if (!error.response && error?.message?.toString().includes('timeout') && error.message.toString().includes('exceeded')) {\r\n\r\n result = { ...result, timeoutOccured: true };\r\n }\r\n\r\n /* TODO: Add appInsights without causing tests to fail.\r\n const exceptionToTrack = generateAppInsightsError({\r\n message: errorMessage, \r\n name: 'PlatformApiGet error', \r\n id: 'platformApiServicePlatformApiGetFailure', \r\n severityLevel: SeverityLevel.Critical\r\n });\r\n\r\n appInsights.trackException(exceptionToTrack);\r\n */\r\n\r\n result = { ...result, status: false, errorMessages };\r\n });\r\n\r\n return result;\r\n }\r\n\r\n\r\n\r\n\r\n /**\r\n * Make a POST request to the Platform API to create or update data.\r\n * \r\n * @param platformApiPostEndpointPath The unique path portion of the url to the Platform API endpoint.\r\n * @param data The data payload of type U to be sent as the payload for the POST call.\r\n * \r\n * @returns TODO: Need to standardize the result response.\r\n */\r\n protected async PlatformApiPost(platformApiPostEndpointPath: string, data: U, axiosConfigurations?: AxiosRequestConfig): Promise {\r\n\r\n let result: IPlatformApiPostResult = { status: true, response: null, errorMessages: [], timeoutOccured: false };\r\n\r\n const platformApiPostEndpoint = `${process.env.REACT_APP_CLIENTPLATFORM_API_URL}${platformApiPostEndpointPath}`;\r\n\r\n // If a custom timeout response was provided in the axiosConfig parameters use that timeout, else use the standard api timeout limit\r\n const requestTimeout = axiosConfigurations?.timeout ? axiosConfigurations.timeout : apiTimeOutLimit;\r\n\r\n let axiosConfig: AxiosRequestConfig = { timeout: requestTimeout, validateStatus: function (status) { return status === 200 || status === 204 || status === 400 || status === 404 || status === 500 } };\r\n\r\n // Add a timeout to the axios configurations\r\n if (axiosConfigurations !== undefined) {\r\n\r\n axiosConfig = { ...axiosConfigurations, timeout: axiosConfig.timeout, validateStatus: axiosConfig.validateStatus };\r\n }\r\n\r\n await axios.post(platformApiPostEndpoint, data, axiosConfig)\r\n .then((response: AxiosResponse) => {\r\n\r\n let platformApiError400: IPlatformApiError400;\r\n let platformApiError404: IPlatformApiError404;\r\n let platformApiError500: IPlatformApiError500;\r\n let errorMessagesParsed: string[];\r\n\r\n switch (response.status) {\r\n\r\n case 200:\r\n case 204:\r\n\r\n result = { ...result, response: response };\r\n\r\n break;\r\n\r\n case 400:\r\n\r\n platformApiError400 = response.data as unknown as IPlatformApiError400;\r\n\r\n errorMessagesParsed = parseApiErrors(platformApiError400.errors);\r\n\r\n result = { ...result, status: false, errorMessages: errorMessagesParsed, response };\r\n\r\n break;\r\n\r\n case 404:\r\n\r\n platformApiError404 = response.data as unknown as IPlatformApiError404;\r\n\r\n result = { ...result, status: false, errorMessages: [`${platformApiError404.title} `, ` ${platformApiError404.detail ?? ''}`] };\r\n\r\n break;\r\n\r\n case 500:\r\n\r\n platformApiError500 = response.data as unknown as IPlatformApiError500;\r\n\r\n result = { ...result, status: false, errorMessages: [`${platformApiError500.title} ${platformApiError500.detail ?? ''}`] };\r\n\r\n break;\r\n\r\n default:\r\n\r\n result = { ...result, status: false, errorMessages: ['Sorry, there was an error. If you continue to see this error please, contact your champion.'] };\r\n\r\n break;\r\n }\r\n })\r\n .catch(error => {\r\n\r\n let errorMessage: string;\r\n\r\n if (!error.response) {\r\n\r\n errorMessage = 'Error:Network Error';\r\n\r\n } else {\r\n\r\n errorMessage = `PlatformApiPost returned error \"${error.response.status} ${error.response.statusText}\" when making a POST request to ${platformApiPostEndpointPath}\".`;\r\n }\r\n\r\n /* TODO: Add appInsights without causing tests to fail.\r\n const exceptionToTrack = generateAppInsightsError({\r\n message: errorMessage, \r\n name: 'PlatformApiPost error', \r\n id: 'platformApiServicePlatformApiPostFailure', \r\n severityLevel: SeverityLevel.Critical\r\n });\r\n\r\n appInsights.trackException(exceptionToTrack);\r\n */\r\n\r\n // Similar to the errorMessages in each case of the switch statement, return the useErrorMessage as an array type\r\n const userErrorMessage = error.message ? error.message : 'There was a server error. Please try again or report a bug.';\r\n\r\n result = { ...result, status: false, errorMessages: [userErrorMessage] };\r\n });\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Make a DELETE request to the Platform API to remove a record from the repository.\r\n * \r\n * @param platformApiPostEndpointPath The unique path portion of the url to the Platform API endpoint.\r\n * @param data The data payload of type U to be sent as the payload for the POST call.\r\n * \r\n * @returns TODO: Need to standardize the result response.\r\n */\r\n protected async PlatformApiDelete(platformApiGetEndpointPath: string, data: T): Promise {\r\n\r\n let result: IPlatformApiPostResult = { status: true, errorMessages: [], response: null, timeoutOccured: false };\r\n\r\n const platformApiGetEndpoint = `${process.env.REACT_APP_CLIENTPLATFORM_API_URL}${platformApiGetEndpointPath}`;\r\n\r\n const deleteConfig: AxiosRequestConfig = { data: data, timeout: apiTimeOutLimit };\r\n\r\n await axios.delete(platformApiGetEndpoint, deleteConfig)\r\n .then(response => {\r\n\r\n let platformApiError400: IPlatformApiError400;\r\n let platformApiError404: IPlatformApiError404;\r\n let platformApiError500: IPlatformApiError500;\r\n let errorMessagesParsed: string[];\r\n\r\n //Happens when the delete command throws an error. \r\n //It needs special handling because an error's payload differs in nesting between errors and successes. \r\n //@ts-ignore\r\n if (response?.isAxiosError === true) {\r\n //@ts-ignore\r\n response = response.response;\r\n } \r\n\r\n switch (response.status) {\r\n\r\n case 200:\r\n case 204:\r\n\r\n result = { ...result, response: response };\r\n\r\n break;\r\n\r\n case 400:\r\n\r\n platformApiError400 = response.data as unknown as IPlatformApiError400;\r\n\r\n errorMessagesParsed = parseApiErrors(platformApiError400.errors);\r\n\r\n result = { ...result, status: false, errorMessages: errorMessagesParsed, response };\r\n\r\n break;\r\n\r\n case 404:\r\n\r\n platformApiError404 = response.data as unknown as IPlatformApiError404;\r\n\r\n result = { ...result, status: false, errorMessages: [`${platformApiError404.title} `, ` ${platformApiError404.detail ?? ''}`] };\r\n\r\n break;\r\n\r\n case 500:\r\n\r\n platformApiError500 = response.data as unknown as IPlatformApiError500;\r\n\r\n result = { ...result, status: false, errorMessages: [`${platformApiError500.title} ${platformApiError500.detail ?? ''}`] };\r\n\r\n break;\r\n\r\n default:\r\n\r\n result = { ...result, status: false, errorMessages: ['Sorry, there was an error. If you continue to see this error please, contact your champion.'] };\r\n\r\n break;\r\n }\r\n })\r\n .catch(error => {\r\n let errorMessage: string;\r\n\r\n if (!error.response) {\r\n\r\n errorMessage = 'Error:Network Error';\r\n\r\n } else if (error.response.data.detail) {\r\n\r\n errorMessage = error.response.data.detail;\r\n\r\n } else {\r\n\r\n errorMessage = `PlatformApiDelete returned error \"${error.response.status} ${error.response.statusText} when making a DELETE request to ${platformApiGetEndpointPath}\".`;\r\n }\r\n\r\n result = { ...result, status: false, errorMessages: [errorMessage] };\r\n });\r\n\r\n return result;\r\n }\r\n\r\n\r\n /**\r\n * Make a PUT request to the Platform API to remove a record from the repository.\r\n * \r\n * @param platformApiPostEndpointPath The unique path portion of the url to the Platform API endpoint.\r\n * @param data The data payload of type U to be sent as the payload for the POST call.\r\n * \r\n * @returns TODO: Need to standardize the result response.\r\n */\r\n protected async PlatformApiPut(platformApiGetEndpointPath: string, data: T): Promise {\r\n\r\n let result: IPlatformApiPostResult = { status: true, errorMessages: [], response: null, timeoutOccured: false };\r\n\r\n const platformApiGetEndpoint = `${process.env.REACT_APP_CLIENTPLATFORM_API_URL}${platformApiGetEndpointPath}`;\r\n\r\n const putConfig: AxiosRequestConfig = { data: data, timeout: apiTimeOutLimit };\r\n\r\n await axios.put(platformApiGetEndpoint, data, putConfig)\r\n .then(response => {\r\n\r\n result = { ...result, response };\r\n })\r\n .catch(error => {\r\n\r\n let errorMessage: string;\r\n\r\n if (!error.response) {\r\n\r\n errorMessage = 'Error:Network Error';\r\n\r\n } else {\r\n\r\n errorMessage = `PlatformApiPut returned error \"${error.response.status} ${error.response.statusText} when making a PUT request to ${platformApiGetEndpointPath}\".`;\r\n }\r\n\r\n result = { ...result, status: false };\r\n });\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Make a PATCH request to the Platform API to create or update data.\r\n * \r\n * @param platformApiPostEndpointPath The unique path portion of the url to the Platform API endpoint.\r\n * @param data The data payload of type U to be sent as the payload for the PATCH call.\r\n * \r\n * @returns The Platform response object with either success or errors.\r\n */\r\n protected async PlatformApiPatch(platformApiPostEndpointPath: string, data: U, axiosConfigurations?: AxiosRequestConfig): Promise {\r\n\r\n let result: IPlatformApiPostResult = { status: true, response: null, errorMessages: [], timeoutOccured: false };\r\n\r\n const platformApiPostEndpoint = `${process.env.REACT_APP_CLIENTPLATFORM_API_URL}${platformApiPostEndpointPath}`;\r\n\r\n const requestTimeout = apiTimeOutLimit;\r\n\r\n let axiosConfig: AxiosRequestConfig = { timeout: requestTimeout, validateStatus: function (status) { return status === 200 || status === 204 || status === 400 || status === 404 || status === 500 } };\r\n\r\n // Add a timeout to the axios configurations\r\n if (axiosConfigurations !== undefined) {\r\n\r\n axiosConfig = { ...axiosConfigurations, timeout: axiosConfig.timeout, validateStatus: axiosConfig.validateStatus };\r\n }\r\n\r\n await axios.patch(platformApiPostEndpoint, data, axiosConfig)\r\n .then((response: AxiosResponse) => {\r\n\r\n let platformApiError400: IPlatformApiError400;\r\n let platformApiError404: IPlatformApiError404;\r\n let platformApiError500: IPlatformApiError500;\r\n let errorMessagesParsed: string[];\r\n\r\n switch (response.status) {\r\n\r\n case 200:\r\n\r\n result = { ...result, response: response };\r\n\r\n break;\r\n\r\n case 204:\r\n\r\n result = { ...result, response: response };\r\n\r\n break;\r\n\r\n case 400:\r\n\r\n platformApiError400 = response.data as unknown as IPlatformApiError400;\r\n\r\n errorMessagesParsed = parseApiErrors(platformApiError400.errors);\r\n\r\n result = { ...result, status: false, errorMessages: errorMessagesParsed, response };\r\n\r\n break;\r\n\r\n case 404:\r\n\r\n platformApiError404 = response.data as unknown as IPlatformApiError404;\r\n\r\n result = { ...result, status: false, errorMessages: [`${platformApiError404.title} ${platformApiError404.detail ?? ''}`] };\r\n\r\n break;\r\n\r\n case 500:\r\n\r\n platformApiError500 = response.data as unknown as IPlatformApiError500;\r\n\r\n result = { ...result, status: false, errorMessages: [`${platformApiError500.title} ${platformApiError500.detail ?? ''}`] };\r\n\r\n break;\r\n\r\n default:\r\n\r\n result = { ...result, status: false, errorMessages: ['Sorry, there was an error. If you continue to see this error please, contact your champion.'] };\r\n\r\n break;\r\n }\r\n })\r\n .catch((error: AxiosError) => {\r\n\r\n let errorMessage: string;\r\n\r\n if (!error.response) {\r\n\r\n errorMessage = 'Error:Network Error';\r\n\r\n } else {\r\n\r\n errorMessage = `PlatformApiPost returned error \"${error.response.status} ${error.response.statusText}\" when making a POST request to ${platformApiPostEndpointPath}\".`;\r\n }\r\n\r\n /* TODO: Add appInsights without causing tests to fail.\r\n const exceptionToTrack = generateAppInsightsError({\r\n message: errorMessage, \r\n name: 'PlatformApiPost error', \r\n id: 'platformApiServicePlatformApiPostFailure', \r\n severityLevel: SeverityLevel.Critical\r\n });\r\n\r\n appInsights.trackException(exceptionToTrack);\r\n */\r\n\r\n const userErrorMessage = error.message ? error.message : 'There was a server error. Please try again or report a bug.';\r\n\r\n result = { ...result, status: false, errorMessages: [userErrorMessage] };\r\n });\r\n\r\n return result;\r\n }\r\n}","import { AccountInfo } from '@azure/msal-browser';\r\n\r\n/**\r\n * The uninitalized state of the Microsoft Authentication Library (MSAL) AccountInfo.\r\n */\r\nexport const emptyMsalAccountInfo: AccountInfo = {\r\n\r\n environment: '',\r\n homeAccountId: '',\r\n localAccountId: '',\r\n tenantId: '',\r\n username: ''\r\n};\r\n\r\nconst InitialState = {\r\n clients: [],\r\n engagements: [],\r\n selectedClients: [],\r\n selectedEngagements: [],\r\n selectedClientEngagementIds: [],\r\n areSelectedClientEngagementsLoaded: false,\r\n currentUser: {\r\n userId: '',\r\n email: '',\r\n isMossAdamsStaff: false,\r\n name: '',\r\n accessToken: '',\r\n accessTokenExpiresOn: new Date(new Date().setFullYear(new Date().getFullYear() - 1)),\r\n account: { ...emptyMsalAccountInfo }\r\n },\r\n engagementManagementIsDirty: false,\r\n taskListEditorIsDirty: false,\r\n lookupLists: null,\r\n loadingLookupLists: false,\r\n clientEngagementSelectorDisabled: false,\r\n}\r\n\r\nexport default InitialState;","import IClientEngagement from \"../../interfaces/IClientEngagement\";\r\nimport { ILookupLists } from \"../../interfaces/ILookupLists\";\r\n\r\nexport const setClientsAndEngagements = (appState: { clients: IClientEngagement[], engagements: IClientEngagement[] }) => {\r\n return {\r\n type: 'SET_CLIENTS_AND_ENGAGEMENTS',\r\n payload: appState\r\n };\r\n};\r\n\r\nexport const setSelectedClients = (appState: string[]) => {\r\n return {\r\n type: 'SET_SELECTED_CLIENTS',\r\n payload: appState\r\n };\r\n};\r\n\r\nexport const setSelectedEngagements = (appState: string[]) => {\r\n return {\r\n type: 'SET_SELECTED_ENGAGEMENTS',\r\n payload: appState\r\n };\r\n};\r\n\r\nexport const setSelectedClientEngagementIds = (appState: string[]) => {\r\n return {\r\n type: 'SET_SELECTED_CLIENT_ENGAGEMENT_IDS',\r\n payload: appState\r\n };\r\n};\r\n\r\nexport const setAreSelectedClientEngagementsLoaded = (appState: boolean) => {\r\n return {\r\n type: 'SET_ARE_SELECTED_CLIENT_ENGAGEMENTS_LOADED',\r\n payload: appState\r\n };\r\n};\r\n\r\nexport const setCurrentUser = (appState: any) => {\r\n return {\r\n type: 'SET_CURRENT_USER',\r\n payload: appState\r\n };\r\n};\r\n\r\nexport const setEngagementManagementIsDirty = (appState: any) => {\r\n return {\r\n type: 'SET_ENGAGEMENT_MANAGEMENT_IS_DIRTY',\r\n payload: appState\r\n };\r\n};\r\n\r\nexport const setTaskListEditorIsDirty = (appState: any) => {\r\n return {\r\n type: 'SET_TASK_LIST_EDITOR_IS_DIRTY',\r\n payload: appState\r\n };\r\n};\r\n\r\nexport const setClientEngagementSelectorDisabled = (appState: boolean) => {\r\n return {\r\n type: 'SET_CLIENT_ENGAGEMENT_SELECTOR_DISABLED',\r\n payload: appState\r\n };\r\n};\r\n\r\nexport const setLookupLists = (appState: ILookupLists) => {\r\n return {\r\n type: 'SET_LOOKUP_LISTS',\r\n payload: appState\r\n };\r\n};\r\n\r\nexport const setLoadingLookupLists = (appState: boolean) => {\r\n return {\r\n type: 'SET_LOADING_LOOKUP_LISTS',\r\n payload: appState\r\n };\r\n};","import React from \"react\";\r\nimport { MenuItem } from '@material-ui/core';\r\nimport ILookup from \"../interfaces/ILookup\";\r\nimport IUser from \"../interfaces/IUser\";\r\n\r\nexport const renderOptions = (list: ILookup[]) => {\r\n return list.map((item, i) => {\r\n return (\r\n \r\n {item.description}\r\n \r\n );\r\n });\r\n}\r\n\r\nexport const renderOptionsIdValue = (list: ILookup[]) => {\r\n return list.map((item, i) => {\r\n return (\r\n \r\n {item.description}\r\n \r\n );\r\n });\r\n}\r\n\r\nexport const renderUsers = (list: IUser[]) => {\r\n return list.filter(user => user.isActive).map((item) => {\r\n return (\r\n \r\n {item.displayName}\r\n \r\n );\r\n });\r\n}\r\n\r\nexport const getLookupKey = (list: ILookup[], name: string | null) => {\r\n const key = Boolean(name) ? list.find(i => i.description == name)?.id : null;\r\n return nullIfUndefined(key);\r\n}\r\n\r\nexport const getLookupValue = (list: ILookup[], id: number) => {\r\n return nullIfUndefined(list.find(i => i.id == id)?.description);\r\n}\r\n\r\nexport const getUserKey = (list: IUser[], name: string | null) => {\r\n const key = Boolean(name) ? list.find(i => i.displayName == name)!.userId : null;\r\n return key;\r\n}\r\n\r\nexport const getUserName = (list: IUser[], userId: string) => {\r\n return list.find(i => i.userId == userId)!.displayName;\r\n}\r\n\r\nexport const getUserNameAllowNull = (list: IUser[], userId: string) => {\r\n return nullIfUndefined(list.find(i => i.userId == userId)?.displayName);\r\n}\r\n\r\nconst nullIfUndefined = (val: any) => {\r\n if(typeof(val) === undefined) return null;\r\n return val;\r\n}","import { ColumnApi, GridApi } from \"@ag-grid-enterprise/all-modules\";\r\nimport { OptionsObject, SnackbarKey, SnackbarMessage } from \"notistack\";\r\nimport { SnackbarVariantTypes } from \"../helpers/enums/enums\";\r\n\r\nexport class Utils {\r\n /**\r\n * If the object is null or has a length of zero then return true, else return false.\r\n * @param value The value to test against.\r\n * @returns true or false if empty or not empty.\r\n */\r\n public static isNullOrEmpty(value: any) {\r\n return value === undefined || value === null || value.length === 0;\r\n }\r\n\r\n public static endsWith(val: string, test: string): boolean {\r\n return val.substring(val.length - test.length) === test;\r\n }\r\n\r\n public static isGUID(val: string): boolean {\r\n var isGUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;\r\n return isGUID.test(val);\r\n }\r\n\r\n public static getLastGUID(string: string) {\r\n const parts = string.split(\"/\");\r\n for (let i = parts.length - 1; i > -1; i--) {\r\n if (Utils.isGUID(parts[i])) {\r\n return parts[i];\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n public static getUrlGUID = () => {\r\n return Utils.getLastGUID(window.location.pathname);\r\n }\r\n\r\n public static getUrlDocumentId = () => {\r\n const id = window.location.pathname.substring(window.location.pathname.lastIndexOf('/') + 1);\r\n return id !== 'document-management' ? id : null;\r\n }\r\n\r\n public static saveItemToLocalStorage(key: string, value: string, onErrorMessage: string = \"Unable to set item to local storage\") {\r\n try {\r\n localStorage.setItem(key, value);\r\n }\r\n catch (error) {\r\n console.error(onErrorMessage, error);\r\n }\r\n }\r\n\r\n /**\r\n * Save an item to the localStorage object.\r\n * @param key The unique identifier for the data to save.\r\n * @param value The value to save.\r\n */\r\n public static setLocalStorage(key: string, value: string) {\r\n if (this.isNullOrEmpty(value)) {\r\n window.localStorage.removeItem(\"MossAdams::\" + key);\r\n } else {\r\n this.saveItemToLocalStorage(\"MossAdams::\" + key, value);\r\n }\r\n }\r\n\r\n /**\r\n * Save an item to the sessionStorage object.\r\n * @param key The unique identifier for the data to save.\r\n * @param value The value to save.\r\n */\r\n public static setSessionStorage(key: string, value: string) {\r\n if (this.isNullOrEmpty(value)) {\r\n window.sessionStorage.removeItem(\"MossAdams::\" + key);\r\n } else {\r\n window.sessionStorage.setItem(\"MossAdams::\" + key, value);\r\n }\r\n }\r\n\r\n /**\r\n * Get an item from localStorage.\r\n * @param key The unique identifier of the data to retrieve.\r\n * @returns A string value.\r\n */\r\n public static getLocalStorage(key: string): string | number {\r\n const val = window.localStorage.getItem(\"MossAdams::\" + key);\r\n if (val != null && this.isNumber(val)) {\r\n return parseInt(val);\r\n }\r\n return val as string | number;\r\n }\r\n\r\n /**\r\n * Get an item from sessionStorage.\r\n * @param key The unique identifier of the data to retrieve.\r\n * @returns A string value.\r\n */\r\n public static getSessionStorage(key: string): string | number {\r\n const val = window.sessionStorage.getItem(\"MossAdams::\" + key);\r\n if (val != null && this.isNumber(val)) {\r\n return parseInt(val);\r\n }\r\n return val as string | number;\r\n }\r\n\r\n public static isNumber(value: string | number): boolean {\r\n if (value == null) {\r\n return false;\r\n }\r\n const toString = Object.prototype.toString;\r\n return (\r\n typeof value === \"number\" ||\r\n (!!value &&\r\n typeof value === \"object\" &&\r\n toString.call(value) === \"[object Number]\") ||\r\n parseInt(value, 10).toString() === value.toString()\r\n );\r\n }\r\n\r\n //in bytes\r\n public static oneHundredMB_binary = 104857600;\r\n public static maxUploadSize = 2147483648;\r\n\r\n /**\r\n * Takes in a number value and outputs a representation of that number as a file size.\r\n * Ex. 2140 -> 2.1 KB\r\n * Adapted from https://stackoverflow.com/questions/10420352/converting-file-size-in-bytes-to-human-readable-string\r\n */\r\n public static getFileSize(value: number): string {\r\n let chunk = 1024; //difference between kilo, mega, etc. IEC - 1024, SI - 1000\r\n let magnitude = Math.log(value) / Math.log(chunk) | 0;\r\n let outputValue = (value / Math.pow(chunk, magnitude)).toFixed(2);\r\n let outputString = ' ' + (magnitude ? 'KMGTPEZY'[--magnitude] + 'B' : 'B');\r\n\r\n return outputValue + outputString;\r\n }\r\n\r\n /**\r\n * Remove all entries from localStorage that begin with the specified key value.\r\n * @param key The key to search for to clear (clears all data that starts with the specified key value).\r\n */\r\n public static clearLocalStorage(key: string) {\r\n const toRemove: string[] = [];\r\n for (let i = 0; i < window.localStorage.length; i++) {\r\n const lskey = window.localStorage.key(i);\r\n if (lskey != null && lskey.startsWith(\"MossAdams::\" + key)) {\r\n toRemove.push(lskey);\r\n }\r\n }\r\n for (let i = 0; i < toRemove.length; i++) {\r\n window.localStorage.removeItem(toRemove[i]);\r\n }\r\n }\r\n\r\n /**\r\n * Remove all entries from sessionStorage that begin with the specified key value.\r\n * @param key The key to search for to clear (clears all data that starts with the specified key value).\r\n */\r\n public static clearSessionStorage(key: string) {\r\n const toRemove: string[] = [];\r\n for (let i = 0; i < window.sessionStorage.length; i++) {\r\n const lskey = window.sessionStorage.key(i);\r\n if (lskey != null && lskey.startsWith(\"MossAdams::\" + key)) {\r\n toRemove.push(lskey);\r\n }\r\n }\r\n for (let i = 0; i < toRemove.length; i++) {\r\n window.sessionStorage.removeItem(toRemove[i]);\r\n }\r\n }\r\n\r\n private static _canvas: HTMLCanvasElement | undefined = undefined;\r\n public static getTextWidth(text?: string, font?: string): number {\r\n // re-use canvas object for better performance\r\n if (text == null) {\r\n return 0;\r\n }\r\n const canvas =\r\n this._canvas || (this._canvas = document.createElement(\"canvas\"));\r\n const context = canvas.getContext(\"2d\");\r\n if (context == null) {\r\n return 0;\r\n }\r\n if (font != null) {\r\n context.font = font;\r\n }\r\n const metrics = context.measureText(text);\r\n return metrics.width;\r\n }\r\n\r\n public static getParameterByName(win: Window, name: string) {\r\n const isInIFrame = window.parent !== win;\r\n let parentUrl = win.location.href;\r\n name = name.replace(/[[]/, \"\\\\[\").replace(/[\\]]/, \"\\\\]\");\r\n const regexS = \"[\\\\?&]\" + name + \"=([^&#]*)\";\r\n const regex = new RegExp(regexS);\r\n let results = regex.exec(parentUrl);\r\n if (\r\n results == null ||\r\n results.length === 0 ||\r\n results[1].replace(/ /g, \" \") === \"\"\r\n ) {\r\n if (isInIFrame) {\r\n parentUrl = document.referrer;\r\n } else {\r\n return \"\";\r\n }\r\n results = regex.exec(parentUrl);\r\n if (results == null || results.length === 0) {\r\n return \"\";\r\n } else {\r\n return decodeURIComponent(results[1].replace(/ /g, \" \"));\r\n }\r\n } else {\r\n return decodeURIComponent(results[1].replace(/ /g, \" \"));\r\n }\r\n }\r\n\r\n /* reference for cookie methods: https://stackoverflow.com/questions/14573223/set-cookie-and-get-cookie-with-javascript */\r\n public static setCookie(name: string, value: string, days: number) {\r\n var expires = \"\";\r\n if (days) {\r\n var date = new Date();\r\n date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));\r\n expires = \"; expires=\" + date.toUTCString();\r\n }\r\n document.cookie = name + \"=\" + (value || \"\") + expires + \"; path=/\";\r\n }\r\n\r\n public static getCookie(name: string) {\r\n var nameEQ = name + \"=\";\r\n var ca = document.cookie.split(';');\r\n for (var i = 0; i < ca.length; i++) {\r\n var c = ca[i];\r\n while (c.charAt(0) == ' ') c = c.substring(1, c.length);\r\n if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);\r\n }\r\n return null;\r\n }\r\n\r\n public static eraseCookie(name: string) {\r\n document.cookie = name + '=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';\r\n }\r\n /* end cookie methods */\r\n\r\n public static enqueueMultiLineSnackbar(\r\n messages: string[],\r\n enqueueSnackbar: ((message: SnackbarMessage, options?: OptionsObject | undefined) => SnackbarKey),\r\n enqueueSnackbarProps?: OptionsObject | undefined\r\n ) {\r\n\r\n let uniqueMessages: string[] = [];\r\n\r\n for (const message of messages) {\r\n message && !uniqueMessages.includes(message) && uniqueMessages.push(message);\r\n }\r\n\r\n if (uniqueMessages.length) {\r\n enqueueSnackbar(uniqueMessages.join(\"\\n\"), { ...enqueueSnackbarProps, style: { whiteSpace: 'pre-line' } });\r\n }\r\n }\r\n}\r\n\r\n// For use with type guards, source: https://dev.to/mapleleaf/indexing-objects-in-typescript-1cgi\r\ntype PropertyKeys = string | number | symbol;\r\nexport function hasKey(obj: O, key: PropertyKeys): key is keyof O {\r\n return key in obj\r\n}\r\n","/**\n * If value is undefined, null or blank, returns null, otherwise returns the value\n * @param {T} value\n * @returns {T | null}\n */\nexport function makeNull(value?: T): T | null {\n if (value == null || value === '') {\n return null;\n }\n return value;\n}\n\nexport function exists(value: string | null | undefined, allowEmptyString?: boolean): value is string;\nexport function exists(value: T): value is NonNullable;\nexport function exists(value: any, allowEmptyString = false): boolean {\n return value != null && (value !== '' || allowEmptyString);\n}\n\nexport function missing(value: T | null | undefined): value is Exclude;\nexport function missing(value: any): boolean {\n return !exists(value);\n}\n\nexport function missingOrEmpty(value?: T[] | string | null): boolean {\n return value == null || value.length === 0;\n}\n\nexport function toStringOrNull(value: any): string | null {\n return value != null && typeof value.toString === 'function' ? value.toString() : null;\n}\n\n// for parsing html attributes, where we want empty strings and missing attributes to be undefined\nexport function attrToNumber(value?: number | string | null): number | null | undefined {\n if (value === undefined) {\n // undefined or empty means ignore the value\n return;\n }\n\n if (value === null || value === '') {\n // null or blank means clear\n return null;\n }\n\n if (typeof value === 'number') {\n return isNaN(value) ? undefined : value;\n }\n\n const valueParsed = parseInt(value, 10);\n\n return isNaN(valueParsed) ? undefined : valueParsed;\n}\n\n// for parsing html attributes, where we want empty strings and missing attributes to be undefined\nexport function attrToBoolean(value?: boolean | string | null): boolean | undefined {\n if (value === undefined) {\n // undefined or empty means ignore the value\n return;\n }\n\n if (value === null || value === '') {\n // null means clear\n return false;\n }\n\n if (typeof value === 'boolean') {\n // if simple boolean, return the boolean\n return value;\n }\n\n // if equal to the string 'true' (ignoring case) then return true\n return (/true/i).test(value);\n}\n\n// for parsing html attributes, where we want empty strings and missing attributes to be undefined\nexport function attrToString(value?: string): string | undefined {\n if (value == null || value === '') { return; }\n\n return value;\n}\n\n/** @deprecated */\nexport function referenceCompare(left: T, right: T): boolean {\n if (left == null && right == null) {\n return true;\n }\n\n if (left == null && right != null) {\n return false;\n }\n\n if (left != null && right == null) {\n return false;\n }\n\n return left === right;\n}\n\nexport function jsonEquals(val1: T1, val2: T2): boolean {\n const val1Json = val1 ? JSON.stringify(val1) : null;\n const val2Json = val2 ? JSON.stringify(val2) : null;\n\n return val1Json === val2Json;\n}\n\nexport function defaultComparator(valueA: any, valueB: any, accentedCompare: boolean = false): number {\n const valueAMissing = valueA == null;\n const valueBMissing = valueB == null;\n\n // this is for aggregations sum and avg, where the result can be a number that is wrapped.\n // if we didn't do this, then the toString() value would be used, which would result in\n // the strings getting used instead of the numbers.\n if (valueA && valueA.toNumber) {\n valueA = valueA.toNumber();\n }\n\n if (valueB && valueB.toNumber) {\n valueB = valueB.toNumber();\n }\n\n if (valueAMissing && valueBMissing) {\n return 0;\n }\n\n if (valueAMissing) {\n return -1;\n }\n\n if (valueBMissing) {\n return 1;\n }\n\n function doQuickCompare(a: T, b: T): number {\n return (a > b ? 1 : (a < b ? -1 : 0));\n }\n\n if (typeof valueA !== 'string') {\n return doQuickCompare(valueA, valueB);\n }\n\n if (!accentedCompare) {\n return doQuickCompare(valueA, valueB);\n }\n\n try {\n // using local compare also allows chinese comparisons\n return valueA.localeCompare(valueB);\n } catch (e) {\n // if something wrong with localeCompare, eg not supported\n // by browser, then just continue with the quick one\n return doQuickCompare(valueA, valueB);\n }\n\n}\n\nexport function values(object: { [key: string]: T; } | Set | Map): T[] {\n if (object instanceof Set || object instanceof Map) {\n const arr: T[] = [];\n\n object.forEach((value: T) => arr.push(value));\n\n return arr;\n }\n\n return Object.values(object);\n}\n","// class returns a unique id to use for the column. it checks the existing columns, and if the requested\n// id is already taken, it will start appending numbers until it gets a unique id.\n// eg, if the col field is 'name', it will try ids: {name, name_1, name_2...}\n// if no field or id provided in the col, it will try the ids of natural numbers\n\nimport { toStringOrNull } from \"../utils/generic\";\n\nexport class ColumnKeyCreator {\n\n private existingKeys: {[key: string]: boolean} = {};\n\n public addExistingKeys(keys: string[]): void {\n for (let i = 0; i < keys.length; i++) {\n this.existingKeys[keys[i]] = true;\n }\n }\n\n public getUniqueKey(colId?: string | null, colField?: string | null): string {\n // in case user passed in number for colId, convert to string\n colId = toStringOrNull(colId);\n\n let count = 0;\n\n while (true) {\n let idToTry: string;\n if (colId) {\n idToTry = colId;\n if (count !== 0) {\n idToTry += '_' + count;\n }\n } else if (colField) {\n idToTry = colField;\n if (count !== 0) {\n idToTry += '_' + count;\n }\n } else {\n idToTry = '' + count;\n }\n\n if (!this.existingKeys[idToTry]) {\n this.existingKeys[idToTry] = true;\n return idToTry;\n }\n\n count++;\n }\n }\n\n}","import { missing, exists, values } from './generic';\n\nexport function iterateObject(object: { [p: string]: T; } | T[] | null | undefined, callback: (key: string, value: T) => void) {\n if (object == null) { return; }\n\n if (Array.isArray(object)) {\n object.forEach((value, index) => callback(`${index}`, value));\n } else {\n Object.keys(object).forEach(key => callback(key, object[key]));\n }\n}\n\nexport function cloneObject(object: T): T {\n const copy = {} as T;\n const keys = Object.keys(object);\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const value = (object as any)[key];\n (copy as any)[key] = value;\n }\n\n return copy;\n}\n\nexport function deepCloneObject(object: T): T {\n return JSON.parse(JSON.stringify(object));\n}\n\n// returns copy of an object, doing a deep clone of any objects with that object.\n// this is used for eg creating copies of Column Definitions, where we want to\n// deep copy all objects, but do not want to deep copy functions (eg when user provides\n// a function or class for colDef.cellRenderer)\nexport function deepCloneDefinition(object: T, keysToSkip?: string[]): T | undefined {\n if (!object) { return; }\n\n const obj = object as any;\n const res: any = {};\n\n Object.keys(obj).forEach(key => {\n\n if (keysToSkip && keysToSkip.indexOf(key) >= 0) { return; }\n\n const value = obj[key];\n\n // 'simple object' means a bunch of key/value pairs, eg {filter: 'myFilter'}. it does\n // NOT include the following:\n // 1) arrays\n // 2) functions or classes (eg ColumnAPI instance)\n const sourceIsSimpleObject = isNonNullObject(value) && value.constructor === Object;\n\n if (sourceIsSimpleObject) {\n res[key] = deepCloneDefinition(value);\n } else {\n res[key] = value;\n }\n });\n\n return res;\n}\n\nexport function getProperty(object: T, key: K): any {\n return object[key];\n}\n\nexport function setProperty(object: T, key: K, value: any): void {\n object[key] = value;\n}\n\n/**\n * Will copy the specified properties from `source` into the equivalent properties on `target`, ignoring properties with\n * a value of `undefined`.\n */\nexport function copyPropertiesIfPresent(source: S, target: T, ...properties: K[]) {\n properties.forEach(p => copyPropertyIfPresent(source, target, p));\n}\n\n/**\n * Will copy the specified property from `source` into the equivalent property on `target`, unless the property has a\n * value of `undefined`. If a transformation is provided, it will be applied to the value before being set on `target`.\n */\nexport function copyPropertyIfPresent(source: S, target: T, property: K, transform?: (value: S[K]) => any) {\n const value = getProperty(source, property);\n\n if (value !== undefined) {\n setProperty(target, property, transform ? transform(value) : value);\n }\n}\n\nexport function getAllKeysInObjects(objects: any[]): string[] {\n const allValues: any = {};\n\n objects.filter(obj => obj != null).forEach(obj => {\n Object.keys(obj).forEach(key => allValues[key] = null);\n });\n\n return Object.keys(allValues);\n}\n\nexport function getAllValuesInObject(obj: T): any[] {\n if (!obj) { return []; }\n const anyObject = Object as any;\n if (typeof anyObject.values === 'function') {\n return anyObject.values(obj);\n }\n\n const ret: any[] = [];\n for (const key in obj) {\n if (obj.hasOwnProperty(key) && obj.propertyIsEnumerable(key)) {\n ret.push(obj[key]);\n }\n }\n\n return ret;\n}\n\nexport function mergeDeep(dest: any, source: any, copyUndefined = true, makeCopyOfSimpleObjects = false): void {\n if (!exists(source)) { return; }\n\n iterateObject(source, (key: string, sourceValue: any) => {\n let destValue: any = dest[key];\n\n if (destValue === sourceValue) { return; }\n\n // when creating params, we don't want to just copy objects over. otherwise merging ColDefs (eg DefaultColDef\n // and Column Types) would result in params getting shared between objects.\n // by putting an empty value into destValue first, it means we end up copying over values from\n // the source object, rather than just copying in the source object in it's entirety.\n if (makeCopyOfSimpleObjects) {\n const objectIsDueToBeCopied = destValue == null && sourceValue != null;\n\n if (objectIsDueToBeCopied) {\n // 'simple object' means a bunch of key/value pairs, eg {filter: 'myFilter'}, as opposed\n // to a Class instance (such as ColumnAPI instance).\n const sourceIsSimpleObject = typeof sourceValue === 'object' && sourceValue.constructor === Object;\n const dontCopy = sourceIsSimpleObject;\n\n if (dontCopy) {\n destValue = {};\n dest[key] = destValue;\n }\n }\n }\n\n if (isNonNullObject(sourceValue) && isNonNullObject(destValue) && !Array.isArray(destValue)) {\n mergeDeep(destValue, sourceValue, copyUndefined, makeCopyOfSimpleObjects);\n } else if (copyUndefined || sourceValue !== undefined) {\n dest[key] = sourceValue;\n }\n });\n}\n\nexport function missingOrEmptyObject(value: any): boolean {\n return missing(value) || Object.keys(value).length === 0;\n}\n\nexport function get(source: any, expression: string, defaultValue: any): any {\n if (source == null) { return defaultValue; }\n\n const keys = expression.split('.');\n let objectToRead = source;\n\n while (keys.length > 1) {\n objectToRead = objectToRead[keys.shift()!];\n\n if (objectToRead == null) {\n return defaultValue;\n }\n }\n\n const value = objectToRead[keys[0]];\n\n return value != null ? value : defaultValue;\n}\n\nexport function set(target: any, expression: string, value: any) {\n if (target == null) { return; }\n\n const keys = expression.split('.');\n let objectToUpdate = target;\n\n while (keys.length > 1) {\n objectToUpdate = objectToUpdate[keys.shift()!];\n\n if (objectToUpdate == null) {\n return;\n }\n }\n\n objectToUpdate[keys[0]] = value;\n}\n\nexport function deepFreeze(object: any): any {\n Object.freeze(object);\n\n values(object).forEach(v => {\n if (isNonNullObject(v) || typeof v === 'function') {\n deepFreeze(v);\n }\n });\n\n return object;\n}\n\nexport function getValueUsingField(data: any, field: string, fieldContainsDots: boolean): any {\n if (!field || !data) { return; }\n\n // if no '.', then it's not a deep value\n if (!fieldContainsDots) {\n return data[field];\n }\n\n // otherwise it is a deep value, so need to dig for it\n const fields = field.split('.');\n let currentObject = data;\n\n for (let i = 0; i < fields.length; i++) {\n if (currentObject == null) {\n return undefined;\n }\n currentObject = currentObject[fields[i]];\n }\n\n return currentObject;\n}\n\n// used by ColumnAPI and GridAPI to remove all references, so keeping grid in memory resulting in a\n// memory leak if user is not disposing of the GridAPI or ColumnApi references\nexport function removeAllReferences(obj: any, objectName: string): void {\n Object.keys(obj).forEach(key => {\n const value = obj[key];\n // we want to replace all the @autowired services, which are objects. any simple types (boolean, string etc)\n // we don't care about\n if (typeof value === 'object') {\n obj[key] = undefined;\n }\n });\n const proto = Object.getPrototypeOf(obj);\n const properties: any = {};\n\n Object.keys(proto).forEach(key => {\n const value = proto[key];\n // leave all basic types - this is needed for GridAPI to leave the \"destroyed: boolean\" attribute alone\n if (typeof value === 'function') {\n const func = () => {\n console.warn(\n `AG Grid: ${objectName} function ${key}() cannot be called as the grid has been destroyed.\n Please don't call grid API functions on destroyed grids - as a matter of fact you shouldn't\n be keeping the API reference, your application has a memory leak! Remove the API reference\n when the grid is destroyed.`\n );\n };\n properties[key] = { value: func, writable: true };\n }\n });\n\n Object.defineProperties(obj, properties);\n}\n\nexport function isNonNullObject(value: any): boolean {\n return typeof value === 'object' && value !== null;\n}\n","const FUNCTION_STRIP_COMMENTS = /((\\/\\/.*$)|(\\/\\*[\\s\\S]*?\\*\\/))/mg;\nconst FUNCTION_ARGUMENT_NAMES = /([^\\s,]+)/g;\nconst doOnceFlags: { [key: string]: boolean; } = {};\n\n/**\n * If the key was passed before, then doesn't execute the func\n * @param {Function} func\n * @param {string} key\n */\nexport function doOnce(func: () => void, key: string) {\n if (doOnceFlags[key]) { return; }\n\n func();\n doOnceFlags[key] = true;\n}\n\nexport function getFunctionName(funcConstructor: any) {\n // for every other browser in the world\n if (funcConstructor.name) {\n return funcConstructor.name;\n }\n\n // for the pestilence that is ie11\n const matches = /function\\s+([^\\(]+)/.exec(funcConstructor.toString());\n return matches && matches.length === 2 ? matches[1].trim() : null;\n}\n\n/** @deprecated */\nexport function getFunctionParameters(func: any) {\n const fnStr = func.toString().replace(FUNCTION_STRIP_COMMENTS, '');\n\n return fnStr.slice(fnStr.indexOf('(') + 1, fnStr.indexOf(')')).match(FUNCTION_ARGUMENT_NAMES) || [];\n}\n\nexport function isFunction(val: any): boolean {\n return !!(val && val.constructor && val.call && val.apply);\n}\n\nexport function executeInAWhile(funcs: Function[]): void {\n executeAfter(funcs, 400);\n}\n\nconst executeNextVMTurnFuncs: Function[] = [];\nlet executeNextVMTurnPending = false;\n\nexport function executeNextVMTurn(func: () => void): void {\n executeNextVMTurnFuncs.push(func);\n\n if (executeNextVMTurnPending) { return; }\n\n executeNextVMTurnPending = true;\n window.setTimeout(() => {\n const funcsCopy = executeNextVMTurnFuncs.slice();\n executeNextVMTurnFuncs.length = 0;\n executeNextVMTurnPending = false;\n funcsCopy.forEach(func => func());\n }, 0);\n}\n\nexport function executeAfter(funcs: Function[], milliseconds = 0): void {\n if (funcs.length > 0) {\n window.setTimeout(() => funcs.forEach(func => func()), milliseconds);\n }\n}\n\n/**\n * from https://stackoverflow.com/questions/24004791/can-someone-explain-the-debounce-function-in-javascript\n * @param {Function} func The function to be debounced\n * @param {number} wait The time in ms to debounce\n * @param {boolean} immediate If it should run immediately or wait for the initial debounce delay\n * @return {Function} The debounced function\n */\nexport function debounce(func: (...args: any[]) => void, wait: number, immediate: boolean = false): (...args: any[]) => void {\n // 'private' variable for instance\n // The returned function will be able to reference this due to closure.\n // Each call to the returned function will share this common timer.\n let timeout: any;\n\n // Calling debounce returns a new anonymous function\n return function(...args: any[]) {\n // reference the context and args for the setTimeout function\n const context = this;\n\n // Should the function be called now? If immediate is true\n // and not already in a timeout then the answer is: Yes\n const callNow = immediate && !timeout;\n\n // This is the basic debounce behaviour where you can call this\n // function several times, but it will only execute once\n // [before or after imposing a delay].\n // Each time the returned function is called, the timer starts over.\n window.clearTimeout(timeout);\n\n // Set the new timeout\n timeout = window.setTimeout(function() {\n // Inside the timeout function, clear the timeout variable\n // which will let the next execution run when in 'immediate' mode\n timeout = null;\n\n // Check if the function already ran with the immediate flag\n if (!immediate) {\n // Call the original function with apply\n // apply lets you define the 'this' object as well as the arguments\n // (both captured before setTimeout)\n func.apply(context, args);\n }\n }, wait);\n\n // Immediate mode and no wait timer? Execute the function..\n if (callNow) {\n func.apply(context, args);\n }\n };\n}\n\n/**\n * @param {Function} func The function to be throttled\n * @param {number} wait The time in ms to throttle\n * @return {Function} The throttled function\n */\nexport function throttle(func: (...args: any[]) => void, wait: number): (...args: any[]) => void {\n let previousCall = 0;\n\n return function(...args: any[]) {\n const context = this;\n const currentCall = new Date().getTime();\n\n if (currentCall - previousCall < wait) { return; }\n\n previousCall = currentCall;\n\n func.apply(context, args);\n };\n}\n\nexport function waitUntil(condition: () => boolean, callback: () => void, timeout: number = 100, timeoutMessage?: string) {\n const timeStamp = new Date().getTime();\n\n let interval: number | null = null;\n let executed: boolean = false;\n\n const internalCallback = () => {\n const reachedTimeout = ((new Date().getTime()) - timeStamp) > timeout;\n if (condition() || reachedTimeout) {\n callback();\n executed = true;\n if (interval != null) {\n window.clearInterval(interval);\n interval = null;\n }\n\n if (reachedTimeout && timeoutMessage) {\n console.warn(timeoutMessage);\n }\n }\n };\n\n internalCallback();\n\n if (!executed) {\n interval = window.setInterval(internalCallback, 10);\n }\n}\n\nexport function compose(...fns: Function[]) {\n return (arg: any) => fns.reduce((composed, f) => f(composed), arg);\n}\n\nexport function callIfPresent(func: Function): void {\n if (func) { func(); }\n}\n","import { ILogger } from \"../iLogger\";\nimport { Component } from \"../widgets/component\";\nimport { exists, values } from \"../utils/generic\";\nimport { iterateObject } from \"../utils/object\";\nimport { getFunctionName } from \"../utils/function\";\n\n// steps in booting up:\n// 1. create all beans\n// 2. autowire all attributes\n// 3. wire all beans\n// 4. initialise the model\n// 5. initialise the view\n// 6. boot??? (not sure if this is needed)\n// each bean is responsible for initialising itself, taking items from the gridOptionsWrapper\n\nexport interface ContextParams {\n providedBeanInstances: any;\n beanClasses: any[];\n debug: boolean;\n}\n\nexport interface ComponentMeta {\n componentClass: new () => Object;\n componentName: string;\n}\n\nexport interface ControllerMeta {\n controllerClass: new () => Object;\n controllerName: string;\n}\n\ninterface BeanWrapper {\n bean: any;\n beanInstance: any;\n beanName: any;\n}\n\nexport class Context {\n\n private beanWrappers: { [key: string]: BeanWrapper; } = {};\n private contextParams: ContextParams;\n private logger: ILogger;\n\n private destroyed = false;\n\n public constructor(params: ContextParams, logger: ILogger) {\n if (!params || !params.beanClasses) {\n return;\n }\n\n this.contextParams = params;\n\n this.logger = logger;\n this.logger.log(\">> creating ag-Application Context\");\n\n this.createBeans();\n\n const beanInstances = this.getBeanInstances();\n\n this.wireBeans(beanInstances);\n\n this.logger.log(\">> ag-Application Context ready - component is alive\");\n }\n\n private getBeanInstances(): any[] {\n return values(this.beanWrappers).map(beanEntry => beanEntry.beanInstance);\n }\n\n public createBean(bean: T, afterPreCreateCallback?: (comp: Component) => void): T {\n if (!bean) {\n throw Error(`Can't wire to bean since it is null`);\n }\n this.wireBeans([bean], afterPreCreateCallback);\n return bean;\n }\n\n private wireBeans(beanInstances: any[], afterPreCreateCallback?: (comp: Component) => void): void {\n this.autoWireBeans(beanInstances);\n this.methodWireBeans(beanInstances);\n\n this.callLifeCycleMethods(beanInstances, 'preConstructMethods');\n\n // the callback sets the attributes, so the component has access to attributes\n // before postConstruct methods in the component are executed\n if (exists(afterPreCreateCallback)) {\n beanInstances.forEach(afterPreCreateCallback);\n }\n\n this.callLifeCycleMethods(beanInstances, 'postConstructMethods');\n }\n\n private createBeans(): void {\n // register all normal beans\n this.contextParams.beanClasses.forEach(this.createBeanWrapper.bind(this));\n // register override beans, these will overwrite beans above of same name\n\n // instantiate all beans - overridden beans will be left out\n iterateObject(this.beanWrappers, (key: string, beanEntry: BeanWrapper) => {\n let constructorParamsMeta: any;\n if (beanEntry.bean.__agBeanMetaData && beanEntry.bean.__agBeanMetaData.autowireMethods && beanEntry.bean.__agBeanMetaData.autowireMethods.agConstructor) {\n constructorParamsMeta = beanEntry.bean.__agBeanMetaData.autowireMethods.agConstructor;\n }\n const constructorParams = this.getBeansForParameters(constructorParamsMeta, beanEntry.bean.name);\n const newInstance = applyToConstructor(beanEntry.bean, constructorParams);\n beanEntry.beanInstance = newInstance;\n });\n\n const createdBeanNames = Object.keys(this.beanWrappers).join(', ');\n this.logger.log(`created beans: ${createdBeanNames}`);\n }\n\n // tslint:disable-next-line\n private createBeanWrapper(BeanClass: new () => Object): void {\n const metaData = (BeanClass as any).__agBeanMetaData;\n\n if (!metaData) {\n let beanName: string;\n if (BeanClass.prototype.constructor) {\n beanName = getFunctionName(BeanClass.prototype.constructor);\n } else {\n beanName = \"\" + BeanClass;\n }\n console.error(`Context item ${beanName} is not a bean`);\n return;\n }\n\n const beanEntry = {\n bean: BeanClass,\n beanInstance: null as any,\n beanName: metaData.beanName\n };\n\n this.beanWrappers[metaData.beanName] = beanEntry;\n }\n\n private autoWireBeans(beanInstances: any[]): void {\n beanInstances.forEach(beanInstance => {\n this.forEachMetaDataInHierarchy(beanInstance, (metaData: any, beanName: string) => {\n const attributes = metaData.agClassAttributes;\n if (!attributes) {\n return;\n }\n\n attributes.forEach((attribute: any) => {\n const otherBean = this.lookupBeanInstance(beanName, attribute.beanName, attribute.optional);\n beanInstance[attribute.attributeName] = otherBean;\n });\n });\n });\n }\n\n private methodWireBeans(beanInstances: any[]): void {\n beanInstances.forEach(beanInstance => {\n this.forEachMetaDataInHierarchy(beanInstance, (metaData: any, beanName: string) => {\n iterateObject(metaData.autowireMethods, (methodName: string, wireParams: any[]) => {\n // skip constructor, as this is dealt with elsewhere\n if (methodName === \"agConstructor\") {\n return;\n }\n const initParams = this.getBeansForParameters(wireParams, beanName);\n beanInstance[methodName].apply(beanInstance, initParams);\n });\n });\n });\n }\n\n private forEachMetaDataInHierarchy(beanInstance: any, callback: (metaData: any, beanName: string) => void): void {\n\n let prototype: any = Object.getPrototypeOf(beanInstance);\n while (prototype != null) {\n\n const constructor: any = prototype.constructor;\n\n if (constructor.hasOwnProperty('__agBeanMetaData')) {\n const metaData = constructor.__agBeanMetaData;\n const beanName = this.getBeanName(constructor);\n callback(metaData, beanName);\n }\n\n prototype = Object.getPrototypeOf(prototype);\n }\n }\n\n private getBeanName(constructor: any): string {\n if (constructor.__agBeanMetaData && constructor.__agBeanMetaData.beanName) {\n return constructor.__agBeanMetaData.beanName;\n }\n\n const constructorString = constructor.toString();\n const beanName = constructorString.substring(9, constructorString.indexOf(\"(\"));\n return beanName;\n }\n\n private getBeansForParameters(parameters: any, beanName: string): any[] {\n const beansList: any[] = [];\n if (parameters) {\n iterateObject(parameters, (paramIndex: string, otherBeanName: string) => {\n const otherBean = this.lookupBeanInstance(beanName, otherBeanName);\n beansList[Number(paramIndex)] = otherBean;\n });\n }\n return beansList;\n }\n\n private lookupBeanInstance(wiringBean: string, beanName: string, optional = false): any {\n if (beanName === \"context\") {\n return this;\n }\n\n if (this.contextParams.providedBeanInstances && this.contextParams.providedBeanInstances.hasOwnProperty(beanName)) {\n return this.contextParams.providedBeanInstances[beanName];\n }\n\n const beanEntry = this.beanWrappers[beanName];\n\n if (beanEntry) {\n return beanEntry.beanInstance;\n }\n\n if (!optional) {\n console.error(`AG Grid: unable to find bean reference ${beanName} while initialising ${wiringBean}`);\n }\n\n return null;\n }\n\n private callLifeCycleMethods(beanInstances: any[], lifeCycleMethod: string): void {\n beanInstances.forEach(beanInstance => this.callLifeCycleMethodsOnBean(beanInstance, lifeCycleMethod));\n }\n\n private callLifeCycleMethodsOnBean(beanInstance: any, lifeCycleMethod: string, methodToIgnore?: string): void {\n // putting all methods into a map removes duplicates\n const allMethods: { [methodName: string]: boolean; } = {};\n\n // dump methods from each level of the metadata hierarchy\n this.forEachMetaDataInHierarchy(beanInstance, (metaData: any) => {\n const methods = metaData[lifeCycleMethod] as string[];\n if (methods) {\n methods.forEach(methodName => {\n if (methodName != methodToIgnore) {\n allMethods[methodName] = true;\n }\n });\n }\n });\n\n const allMethodsList = Object.keys(allMethods);\n allMethodsList.forEach(methodName => beanInstance[methodName]());\n }\n\n public getBean(name: string): any {\n return this.lookupBeanInstance(\"getBean\", name, true);\n }\n\n public destroy(): void {\n if (this.destroyed) { return; }\n\n this.logger.log(\">> Shutting down ag-Application Context\");\n\n const beanInstances = this.getBeanInstances();\n this.destroyBeans(beanInstances);\n\n this.contextParams.providedBeanInstances = null;\n this.destroyed = true;\n\n this.logger.log(\">> ag-Application Context shut down - component is dead\");\n }\n\n public destroyBean(bean: T): undefined {\n if (!bean) { return; }\n\n this.destroyBeans([bean]);\n }\n\n public destroyBeans(beans: T[]): T[] {\n if (!beans) { return []; }\n\n beans.forEach(bean => {\n this.callLifeCycleMethodsOnBean(bean, 'preDestroyMethods', 'destroy');\n\n // call destroy() explicitly if it exists\n const beanAny = bean as any;\n\n if (typeof beanAny.destroy === 'function') {\n beanAny.destroy();\n }\n });\n\n return [];\n }\n}\n\n// taken from: http://stackoverflow.com/questions/3362471/how-can-i-call-a-javascript-constructor-using-call-or-apply\n// allows calling 'apply' on a constructor\nfunction applyToConstructor(constructor: Function, argArray: any[]) {\n const args = [null].concat(argArray);\n const factoryFunction = constructor.bind.apply(constructor, args);\n return new factoryFunction();\n}\n\nexport function PreConstruct(target: Object, methodName: string, descriptor: TypedPropertyDescriptor): void {\n const props = getOrCreateProps(target.constructor);\n if (!props.preConstructMethods) {\n props.preConstructMethods = [];\n }\n props.preConstructMethods.push(methodName);\n}\n\nexport function PostConstruct(target: Object, methodName: string, descriptor: TypedPropertyDescriptor): void {\n const props = getOrCreateProps(target.constructor);\n if (!props.postConstructMethods) {\n props.postConstructMethods = [];\n }\n props.postConstructMethods.push(methodName);\n}\n\nexport function PreDestroy(target: Object, methodName: string, descriptor: TypedPropertyDescriptor): void {\n const props = getOrCreateProps(target.constructor);\n if (!props.preDestroyMethods) {\n props.preDestroyMethods = [];\n }\n props.preDestroyMethods.push(methodName);\n}\n\nexport function Bean(beanName: string): Function {\n return (classConstructor: any) => {\n const props = getOrCreateProps(classConstructor);\n props.beanName = beanName;\n };\n}\n\nexport function Autowired(name?: string): Function {\n return (target: any, propertyKey: string, descriptor: PropertyDescriptor) => {\n autowiredFunc(target, name, false, target, propertyKey, null);\n };\n}\n\nexport function Optional(name?: string): Function {\n return (target: any, propertyKey: string, descriptor: PropertyDescriptor) => {\n autowiredFunc(target, name, true, target, propertyKey, null);\n };\n}\n\nfunction autowiredFunc(target: any, name: string | undefined, optional: boolean, classPrototype: any, methodOrAttributeName: string, index: number | null) {\n if (name === null) {\n console.error(\"AG Grid: Autowired name should not be null\");\n return;\n }\n if (typeof index === \"number\") {\n console.error(\"AG Grid: Autowired should be on an attribute\");\n return;\n }\n\n // it's an attribute on the class\n const props = getOrCreateProps(target.constructor);\n if (!props.agClassAttributes) {\n props.agClassAttributes = [];\n }\n props.agClassAttributes.push({\n attributeName: methodOrAttributeName,\n beanName: name,\n optional: optional\n });\n}\n\nexport function Qualifier(name: string): Function {\n return (classPrototype: any, methodOrAttributeName: string, index: number) => {\n const constructor: any = typeof classPrototype == \"function\" ? classPrototype : classPrototype.constructor;\n let props: any;\n\n if (typeof index === \"number\") {\n // it's a parameter on a method\n let methodName: string;\n if (methodOrAttributeName) {\n props = getOrCreateProps(constructor);\n methodName = methodOrAttributeName;\n } else {\n props = getOrCreateProps(constructor);\n methodName = \"agConstructor\";\n }\n if (!props.autowireMethods) {\n props.autowireMethods = {};\n }\n if (!props.autowireMethods[methodName]) {\n props.autowireMethods[methodName] = {};\n }\n props.autowireMethods[methodName][index] = name;\n }\n };\n}\n\nfunction getOrCreateProps(target: any): any {\n if (!target.hasOwnProperty(\"__agBeanMetaData\")) {\n target.__agBeanMetaData = {};\n }\n\n return target.__agBeanMetaData;\n}\n","export enum ModuleNames {\n\n // when using modules, user references this\n CommunityCoreModule = \"@ag-grid-community/core\", // should this be grid-community-core?\n // when not using modules, user references this\n CommunityAllModules = \"@ag-grid-community/all\", // should this be grid-community-all\n\n // community modules\n InfiniteRowModelModule = \"@ag-grid-community/infinite-row-model\",\n ClientSideRowModelModule = \"@ag-grid-community/client-side-row-model\",\n CsvExportModule = \"@ag-grid-community/csv-export\",\n\n // enterprise core - users never import on this, but other enterprise modules do\n EnterpriseCoreModule = \"@ag-grid-enterprise/core\", // should this be grid-enterprise-core?\n // when not using modules, user references this\n EnterpriseAllModules = \"@ag-grid-enterprise/all\", // should this be grid-enterprise-all\n\n // enterprise modules\n RowGroupingModule = \"@ag-grid-enterprise/row-grouping\",\n ColumnToolPanelModule = \"@ag-grid-enterprise/column-tool-panel\",\n FiltersToolPanelModule = \"@ag-grid-enterprise/filter-tool-panel\",\n MenuModule = \"@ag-grid-enterprise/menu\",\n SetFilterModule = \"@ag-grid-enterprise/set-filter\",\n MultiFilterModule = \"@ag-grid-enterprise/multi-filter\",\n StatusBarModule = \"@ag-grid-enterprise/status-bar\",\n SideBarModule = \"@ag-grid-enterprise/side-bar\",\n RangeSelectionModule = \"@ag-grid-enterprise/range-selection\",\n MasterDetailModule = \"@ag-grid-enterprise/master-detail\",\n RichSelectModule = \"@ag-grid-enterprise/rich-select\",\n GridChartsModule = \"@ag-grid-enterprise/charts\",\n ViewportRowModelModule = \"@ag-grid-enterprise/viewport-row-model\",\n ServerSideRowModelModule = \"@ag-grid-enterprise/server-side-row-model\", // or\n ExcelExportModule = \"@ag-grid-enterprise/excel-export\",\n ClipboardModule = \"@ag-grid-enterprise/clipboard\",\n SparklinesModule = \"@ag-grid-enterprise/sparklines\",\n\n // framework wrappers currently don't provide beans, comps etc, so no need to be modules,\n // however i argue they should be as in theory they 'could' provide beans etc\n AngularModule = \"@ag-grid-community/angular\",\n ReactModule = \"@ag-grid-community/react\",\n VueModule = \"@ag-grid-community/vue\",\n PolymerModule = \"@ag-grid-community/polymer\",\n\n // and then this, which is definitely not a grid module, as it should not have any dependency\n // on the grid (ie shouldn't even reference the Module interface)\n // ChartsModule = \"@ag-grid-community/charts-core\",\n}\n","import { Logger, LoggerFactory } from \"./logger\";\nimport { Bean, Qualifier } from \"./context/context\";\nimport { IEventEmitter } from \"./interfaces/iEventEmitter\";\nimport { GridOptionsWrapper } from \"./gridOptionsWrapper\";\nimport { AgEvent } from \"./events\";\nimport { IFrameworkOverrides } from \"./interfaces/iFrameworkOverrides\";\n\n@Bean('eventService')\nexport class EventService implements IEventEmitter {\n\n private allSyncListeners = new Map>();\n private allAsyncListeners = new Map>();\n\n private globalSyncListeners = new Set();\n private globalAsyncListeners = new Set();\n\n private frameworkOverrides: IFrameworkOverrides;\n\n private asyncFunctionsQueue: Function[] = [];\n private scheduled = false;\n\n // using an object performs better than a Set for the number of different events we have\n private firedEvents: { [key: string]: boolean; } = {};\n\n // because this class is used both inside the context and outside the context, we do not\n // use autowired attributes, as that would be confusing, as sometimes the attributes\n // would be wired, and sometimes not.\n //\n // the global event servers used by AG Grid is autowired by the context once, and this\n // setBeans method gets called once.\n //\n // the times when this class is used outside of the context (eg RowNode has an instance of this\n // class) then it is not a bean, and this setBeans method is not called.\n public setBeans(\n @Qualifier('loggerFactory') loggerFactory: LoggerFactory,\n @Qualifier('gridOptionsWrapper') gridOptionsWrapper: GridOptionsWrapper,\n @Qualifier('frameworkOverrides') frameworkOverrides: IFrameworkOverrides,\n @Qualifier('globalEventListener') globalEventListener: Function | null = null) {\n this.frameworkOverrides = frameworkOverrides;\n\n if (globalEventListener) {\n const async = gridOptionsWrapper.useAsyncEvents();\n this.addGlobalListener(globalEventListener, async);\n }\n }\n\n private getListeners(eventType: string, async: boolean, autoCreateListenerCollection: boolean): Set | undefined {\n const listenerMap = async ? this.allAsyncListeners : this.allSyncListeners;\n let listeners = listenerMap.get(eventType);\n\n // Note: 'autoCreateListenerCollection' should only be 'true' if a listener is about to be added. For instance\n // getListeners() is also called during event dispatch even though no listeners are added. This measure protects\n // against 'memory bloat' as empty collections will prevent the RowNode's event service from being removed after\n // the RowComp is destroyed, see noRegisteredListenersExist() below.\n if (!listeners && autoCreateListenerCollection) {\n listeners = new Set();\n listenerMap.set(eventType, listeners);\n }\n\n return listeners;\n }\n\n public noRegisteredListenersExist(): boolean {\n return this.allSyncListeners.size === 0 && this.allAsyncListeners.size === 0 &&\n this.globalSyncListeners.size === 0 && this.globalAsyncListeners.size === 0;\n }\n\n public addEventListener(eventType: string, listener: Function, async = false): void {\n this.getListeners(eventType, async, true)!.add(listener);\n }\n\n public removeEventListener(eventType: string, listener: Function, async = false): void {\n const listeners = this.getListeners(eventType, async, false);\n if (!listeners) { return; }\n\n listeners.delete(listener);\n\n if (listeners.size === 0) {\n const listenerMap = async ? this.allAsyncListeners : this.allSyncListeners;\n listenerMap.delete(eventType);\n }\n }\n\n public addGlobalListener(listener: Function, async = false): void {\n (async ? this.globalAsyncListeners : this.globalSyncListeners).add(listener);\n }\n\n public removeGlobalListener(listener: Function, async = false): void {\n (async ? this.globalAsyncListeners : this.globalSyncListeners).delete(listener);\n }\n\n public dispatchEvent(event: AgEvent): void {\n this.dispatchToListeners(event, true);\n this.dispatchToListeners(event, false);\n\n this.firedEvents[event.type] = true;\n }\n\n public dispatchEventOnce(event: AgEvent): void {\n if (!this.firedEvents[event.type]) {\n this.dispatchEvent(event);\n }\n }\n\n private dispatchToListeners(event: AgEvent, async: boolean) {\n const eventType = event.type;\n const processEventListeners = (listeners: Set) => listeners.forEach(listener => {\n if (async) {\n this.dispatchAsync(() => listener(event));\n } else {\n listener(event);\n }\n });\n\n const listeners = this.getListeners(eventType, async, false);\n if (listeners) {\n processEventListeners(listeners);\n }\n\n const globalListeners = async ? this.globalAsyncListeners : this.globalSyncListeners;\n\n globalListeners.forEach(listener => {\n if (async) {\n this.dispatchAsync(\n () => this.frameworkOverrides.dispatchEvent(eventType, () => listener(eventType, event), true)\n );\n } else {\n this.frameworkOverrides.dispatchEvent(eventType, () => listener(eventType, event), true);\n }\n });\n }\n\n // this gets called inside the grid's thread, for each event that it\n // wants to set async. the grid then batches the events into one setTimeout()\n // because setTimeout() is an expensive operation. ideally we would have\n // each event in it's own setTimeout(), but we batch for performance.\n private dispatchAsync(func: Function): void {\n // add to the queue for executing later in the next VM turn\n this.asyncFunctionsQueue.push(func);\n\n // check if timeout is already scheduled. the first time the grid calls\n // this within it's thread turn, this should be false, so it will schedule\n // the 'flush queue' method the first time it comes here. then the flag is\n // set to 'true' so it will know it's already scheduled for subsequent calls.\n if (!this.scheduled) {\n // if not scheduled, schedule one\n window.setTimeout(this.flushAsyncQueue.bind(this), 0);\n // mark that it is scheduled\n this.scheduled = true;\n }\n }\n\n // this happens in the next VM turn only, and empties the queue of events\n private flushAsyncQueue(): void {\n this.scheduled = false;\n\n // we take a copy, because the event listener could be using\n // the grid, which would cause more events, which would be potentially\n // added to the queue, so safe to take a copy, the new events will\n // get executed in a later VM turn rather than risk updating the\n // queue as we are flushing it.\n const queueCopy = this.asyncFunctionsQueue.slice();\n this.asyncFunctionsQueue = [];\n\n // execute the queue\n queueCopy.forEach(func => func());\n }\n}\n","export class Constants {\n\n static ROW_BUFFER_SIZE = 10;\n static LAYOUT_INTERVAL = 500;\n static BATCH_WAIT_MILLIS = 50;\n\n static EXPORT_TYPE_DRAG_COPY = 'dragCopy';\n static EXPORT_TYPE_CLIPBOARD = 'clipboard';\n static EXPORT_TYPE_EXCEL = 'excel';\n static EXPORT_TYPE_CSV = 'csv';\n\n static ROW_MODEL_TYPE_INFINITE = 'infinite';\n static ROW_MODEL_TYPE_VIEWPORT = 'viewport';\n static ROW_MODEL_TYPE_CLIENT_SIDE = 'clientSide';\n static ROW_MODEL_TYPE_SERVER_SIDE = 'serverSide';\n\n static ALWAYS = 'always';\n static ONLY_WHEN_GROUPING = 'onlyWhenGrouping';\n\n static PINNED_TOP = 'top';\n static PINNED_BOTTOM = 'bottom';\n\n static DOM_LAYOUT_NORMAL = 'normal';\n static DOM_LAYOUT_PRINT = 'print';\n static DOM_LAYOUT_AUTO_HEIGHT = 'autoHeight';\n\n static GROUP_AUTO_COLUMN_ID = 'ag-Grid-AutoColumn';\n\n static SOURCE_PASTE = 'paste';\n\n static PINNED_RIGHT: 'right' = 'right';\n static PINNED_LEFT: 'left' = 'left';\n\n static SORT_ASC: 'asc' = 'asc';\n static SORT_DESC: 'desc' = 'desc';\n\n static INPUT_SELECTOR = 'input, select, button, textarea';\n static FOCUSABLE_SELECTOR = '[tabindex], input, select, button, textarea';\n static FOCUSABLE_EXCLUDE = '.ag-hidden, .ag-hidden *, [disabled], .ag-disabled, .ag-disabled *';\n}\n","import { Module } from \"../interfaces/iModule\";\nimport { ModuleNames } from \"./moduleNames\";\nimport { doOnce } from \"../utils/function\";\nimport { values } from \"../utils/generic\";\n\nexport class ModuleRegistry {\n\n // having in a map a) removes duplicates and b) allows fast lookup\n private static modulesMap: { [name: string]: Module; } = {};\n private static moduleBased: boolean | undefined;\n\n public static register(module: Module, moduleBased = true): void {\n ModuleRegistry.modulesMap[module.moduleName] = module;\n\n if (ModuleRegistry.moduleBased === undefined) {\n ModuleRegistry.moduleBased = moduleBased;\n } else {\n if (ModuleRegistry.moduleBased !== moduleBased) {\n doOnce(() => {\n console.warn(`AG Grid: You are mixing modules (i.e. @ag-grid-community/core) and packages (ag-grid-community) - you can only use one or the other of these mechanisms.`);\n console.warn('Please see https://www.ag-grid.com/javascript-grid/packages-modules/ for more information.');\n\n },\n 'ModulePackageCheck');\n }\n }\n }\n\n // noinspection JSUnusedGlobalSymbols\n public static registerModules(modules: Module[], moduleBased = true): void {\n if (!modules) {\n return;\n }\n modules.forEach(module => ModuleRegistry.register(module, moduleBased));\n }\n\n public static assertRegistered(moduleName: ModuleNames, reason: string): boolean {\n if (this.isRegistered(moduleName)) {\n return true;\n }\n\n const warningKey = reason + moduleName;\n let warningMessage: string;\n if (ModuleRegistry.moduleBased) {\n warningMessage = `AG Grid: unable to use ${reason} as module ${moduleName} is not present. Please see: https://www.ag-grid.com/javascript-grid/modules/`;\n } else {\n warningMessage = `AG Grid: unable to use ${reason} as package 'ag-grid-enterprise' is not present. Please see: https://www.ag-grid.com/javascript-grid/packages/`;\n }\n\n doOnce(() => {\n console.warn(warningMessage);\n }, warningKey);\n\n return false;\n }\n\n public static isRegistered(moduleName: ModuleNames): boolean {\n return !!ModuleRegistry.modulesMap[moduleName];\n }\n\n public static getRegisteredModules(): Module[] {\n return values(ModuleRegistry.modulesMap);\n }\n\n public static isPackageBased(): boolean {\n return !ModuleRegistry.moduleBased;\n }\n}\n","import { IHeaderColumn } from \"./iHeaderColumn\";\nimport { IProvidedColumn } from \"./iProvidedColumn\";\nimport {\n AbstractColDef,\n BaseColDefParams,\n ColDef,\n ColSpanParams,\n IAggFunc,\n ColumnFunctionCallbackParams,\n RowSpanParams\n} from \"./colDef\";\nimport { EventService } from \"../eventService\";\nimport { Autowired, Context, PostConstruct } from \"../context/context\";\nimport { GridOptionsWrapper } from \"../gridOptionsWrapper\";\nimport { ColumnUtils } from \"../columns/columnUtils\";\nimport { RowNode } from \"./rowNode\";\nimport { IEventEmitter } from \"../interfaces/iEventEmitter\";\nimport { ColumnEvent, ColumnEventType } from \"../events\";\nimport { ColumnApi } from \"../columns/columnApi\";\nimport { GridApi } from \"../gridApi\";\nimport { ColumnGroup } from \"./columnGroup\";\nimport { ProvidedColumnGroup } from \"./providedColumnGroup\";\nimport { Constants } from \"../constants/constants\";\nimport { ModuleNames } from \"../modules/moduleNames\";\nimport { ModuleRegistry } from \"../modules/moduleRegistry\";\nimport { attrToNumber, attrToBoolean, exists, missing } from \"../utils/generic\";\nimport { doOnce } from \"../utils/function\";\nimport { mergeDeep } from \"../utils/object\";\n\nlet instanceIdSequence = 0;\n\n// Wrapper around a user provide column definition. The grid treats the column definition as ready only.\n// This class contains all the runtime information about a column, plus some logic (the definition has no logic).\n// This class implements both interfaces ColumnGroupChild and ProvidedColumnGroupChild as the class can\n// appear as a child of either the original tree or the displayed tree. However the relevant group classes\n// for each type only implements one, as each group can only appear in it's associated tree (eg ProvidedColumnGroup\n// can only appear in OriginalColumn tree).\nexport class Column implements IHeaderColumn, IProvidedColumn, IEventEmitter {\n\n // + renderedHeaderCell - for making header cell transparent when moving\n public static EVENT_MOVING_CHANGED = 'movingChanged';\n // + renderedCell - changing left position\n public static EVENT_LEFT_CHANGED = 'leftChanged';\n // + renderedCell - changing width\n public static EVENT_WIDTH_CHANGED = 'widthChanged';\n // + renderedCell - for changing pinned classes\n public static EVENT_LAST_LEFT_PINNED_CHANGED = 'lastLeftPinnedChanged';\n public static EVENT_FIRST_RIGHT_PINNED_CHANGED = 'firstRightPinnedChanged';\n // + renderedColumn - for changing visibility icon\n public static EVENT_VISIBLE_CHANGED = 'visibleChanged';\n // + every time the filter changes, used in the floating filters\n public static EVENT_FILTER_CHANGED = 'filterChanged';\n // + renderedHeaderCell - marks the header with filter icon\n public static EVENT_FILTER_ACTIVE_CHANGED = 'filterActiveChanged';\n // + renderedHeaderCell - marks the header with sort icon\n public static EVENT_SORT_CHANGED = 'sortChanged';\n\n public static EVENT_MENU_VISIBLE_CHANGED = 'menuVisibleChanged';\n\n // + toolpanel, for gui updates\n public static EVENT_ROW_GROUP_CHANGED = 'columnRowGroupChanged';\n // + toolpanel, for gui updates\n public static EVENT_PIVOT_CHANGED = 'columnPivotChanged';\n // + toolpanel, for gui updates\n public static EVENT_VALUE_CHANGED = 'columnValueChanged';\n\n @Autowired('gridOptionsWrapper') private gridOptionsWrapper: GridOptionsWrapper;\n @Autowired('columnUtils') private columnUtils: ColumnUtils;\n @Autowired('columnApi') private columnApi: ColumnApi;\n @Autowired('gridApi') private gridApi: GridApi;\n @Autowired('context') private context: Context;\n\n private readonly colId: any;\n private colDef: ColDef;\n\n // used by React (and possibly other frameworks) as key for rendering\n private instanceId = instanceIdSequence++;\n\n // We do NOT use this anywhere, we just keep a reference. this is to check object equivalence\n // when the user provides an updated list of columns - so we can check if we have a column already\n // existing for a col def. we cannot use the this.colDef as that is the result of a merge.\n // This is used in ColumnFactory\n private userProvidedColDef: ColDef | null;\n\n private actualWidth: any;\n\n private visible: any;\n private pinned: 'left' | 'right' | null;\n private left: number | null;\n private oldLeft: number | null;\n private aggFunc: string | IAggFunc | null | undefined;\n private sort: 'asc' | 'desc' | null | undefined;\n private sortIndex: number | null | undefined;\n private moving = false;\n private menuVisible = false;\n\n private lastLeftPinned: boolean;\n private firstRightPinned: boolean;\n\n private minWidth: number | null | undefined;\n private maxWidth: number | null | undefined;\n\n private filterActive = false;\n\n private eventService: EventService = new EventService();\n\n private fieldContainsDots: boolean;\n private tooltipFieldContainsDots: boolean;\n\n private rowGroupActive = false;\n private pivotActive = false;\n private aggregationActive = false;\n private flex: number | null | undefined;\n\n private readonly primary: boolean;\n\n private parent: ColumnGroup;\n private originalParent: ProvidedColumnGroup | null;\n\n constructor(colDef: ColDef, userProvidedColDef: ColDef | null, colId: string, primary: boolean) {\n this.colDef = colDef;\n this.userProvidedColDef = userProvidedColDef;\n this.colId = colId;\n this.primary = primary;\n\n this.setState(colDef);\n }\n\n public getInstanceId(): number {\n return this.instanceId;\n }\n\n private setState(colDef: ColDef): void {\n // sort\n if (colDef.sort !== undefined) {\n if (colDef.sort === Constants.SORT_ASC || colDef.sort === Constants.SORT_DESC) {\n this.sort = colDef.sort;\n }\n } else {\n if (colDef.initialSort === Constants.SORT_ASC || colDef.initialSort === Constants.SORT_DESC) {\n this.sort = colDef.initialSort;\n }\n }\n\n // sortIndex\n const sortIndex = attrToNumber(colDef.sortIndex);\n const initialSortIndex = attrToNumber(colDef.initialSortIndex);\n if (sortIndex !== undefined) {\n if (sortIndex !== null) {\n this.sortIndex = sortIndex;\n }\n } else {\n if (initialSortIndex !== null) {\n this.sortIndex = initialSortIndex;\n }\n }\n\n // hide\n const hide = attrToBoolean(colDef.hide);\n const initialHide = attrToBoolean(colDef.initialHide);\n\n if (hide !== undefined) {\n this.visible = !hide;\n } else {\n this.visible = !initialHide;\n }\n\n // pinned\n if (colDef.pinned !== undefined) {\n this.setPinned(colDef.pinned);\n } else {\n this.setPinned(colDef.initialPinned);\n }\n\n // flex\n const flex = attrToNumber(colDef.flex);\n const initialFlex = attrToNumber(colDef.initialFlex);\n if (flex !== undefined) {\n this.flex = flex;\n } else if (initialFlex !== undefined) {\n this.flex = initialFlex;\n }\n }\n\n // gets called when user provides an alternative colDef, eg\n public setColDef(colDef: ColDef, userProvidedColDef: ColDef | null): void {\n this.colDef = colDef;\n this.userProvidedColDef = userProvidedColDef;\n this.initMinAndMaxWidths();\n this.initDotNotation();\n }\n\n /**\n * Returns the column definition provided by the application.\n * This may not be correct, as items can be superseded by default column options.\n * However it's useful for comparison, eg to know which application column definition matches that column.\n */\n public getUserProvidedColDef(): ColDef | null {\n return this.userProvidedColDef;\n }\n\n public setParent(parent: ColumnGroup): void {\n this.parent = parent;\n }\n\n /** Returns the parent column group, if column grouping is active. */\n public getParent(): ColumnGroup {\n return this.parent;\n }\n\n public setOriginalParent(originalParent: ProvidedColumnGroup | null): void {\n this.originalParent = originalParent;\n }\n\n public getOriginalParent(): ProvidedColumnGroup | null {\n return this.originalParent;\n }\n\n // this is done after constructor as it uses gridOptionsWrapper\n @PostConstruct\n private initialise(): void {\n this.initMinAndMaxWidths();\n\n this.resetActualWidth('gridInitializing');\n\n this.initDotNotation();\n\n this.validate();\n }\n\n private initDotNotation(): void {\n const suppressDotNotation = this.gridOptionsWrapper.isSuppressFieldDotNotation();\n this.fieldContainsDots = exists(this.colDef.field) && this.colDef.field.indexOf('.') >= 0 && !suppressDotNotation;\n this.tooltipFieldContainsDots = exists(this.colDef.tooltipField) && this.colDef.tooltipField.indexOf('.') >= 0 && !suppressDotNotation;\n }\n\n private initMinAndMaxWidths(): void {\n const colDef = this.colDef;\n\n this.minWidth = this.columnUtils.calculateColMinWidth(colDef);\n this.maxWidth = this.columnUtils.calculateColMaxWidth(colDef);\n }\n\n public resetActualWidth(source: ColumnEventType = 'api'): void {\n const initialWidth = this.columnUtils.calculateColInitialWidth(this.colDef);\n this.setActualWidth(initialWidth, source, true);\n }\n\n public isEmptyGroup(): boolean {\n return false;\n }\n\n public isRowGroupDisplayed(colId: string): boolean {\n if (missing(this.colDef) || missing(this.colDef.showRowGroup)) {\n return false;\n }\n\n const showingAllGroups = this.colDef.showRowGroup === true;\n const showingThisGroup = this.colDef.showRowGroup === colId;\n\n return showingAllGroups || showingThisGroup;\n }\n\n /** Returns `true` if column is a primary column, `false` if secondary. Secondary columns are used for pivoting. */\n public isPrimary(): boolean {\n return this.primary;\n }\n\n /** Returns `true` if column filtering is allowed. */\n public isFilterAllowed(): boolean {\n // filter defined means it's a string, class or true.\n // if its false, null or undefined then it's false.\n const filterDefined = !!this.colDef.filter || !!this.colDef.filterFramework;\n return filterDefined;\n }\n\n public isFieldContainsDots(): boolean {\n return this.fieldContainsDots;\n }\n\n public isTooltipFieldContainsDots(): boolean {\n return this.tooltipFieldContainsDots;\n }\n\n private validate(): void {\n\n const colDefAny = this.colDef as any;\n\n function warnOnce(msg: string, key: string, obj?: any) {\n doOnce(() => {\n if (obj) {\n console.warn(msg, obj);\n } else {\n doOnce(() => console.warn(msg), key);\n }\n }, key);\n }\n\n const usingCSRM = this.gridOptionsWrapper.isRowModelDefault();\n if (usingCSRM && !ModuleRegistry.isRegistered(ModuleNames.RowGroupingModule)) {\n const rowGroupingItems =\n ['enableRowGroup', 'rowGroup', 'rowGroupIndex', 'enablePivot', 'enableValue', 'pivot', 'pivotIndex', 'aggFunc'];\n rowGroupingItems.forEach(item => {\n if (exists(colDefAny[item])) {\n if (ModuleRegistry.isPackageBased()) {\n warnOnce(`AG Grid: ${item} is only valid in ag-grid-enterprise, your column definition should not have ${item}`, 'ColumnRowGroupingMissing' + item);\n } else {\n warnOnce(`AG Grid: ${item} is only valid with AG Grid Enterprise Module ${ModuleNames.RowGroupingModule} - your column definition should not have ${item}`, 'ColumnRowGroupingMissing' + item);\n }\n }\n });\n }\n\n if (!ModuleRegistry.isRegistered(ModuleNames.RichSelectModule)) {\n if (this.colDef.cellEditor === 'agRichSelect') {\n if (ModuleRegistry.isPackageBased()) {\n warnOnce(`AG Grid: ${this.colDef.cellEditor} can only be used with ag-grid-enterprise`, 'ColumnRichSelectMissing');\n } else {\n warnOnce(`AG Grid: ${this.colDef.cellEditor} can only be used with AG Grid Enterprise Module ${ModuleNames.RichSelectModule}`, 'ColumnRichSelectMissing');\n }\n }\n }\n\n if (this.gridOptionsWrapper.isTreeData()) {\n const itemsNotAllowedWithTreeData = ['rowGroup', 'rowGroupIndex', 'pivot', 'pivotIndex'];\n itemsNotAllowedWithTreeData.forEach(item => {\n if (exists(colDefAny[item])) {\n warnOnce(`AG Grid: ${item} is not possible when doing tree data, your column definition should not have ${item}`, 'TreeDataCannotRowGroup');\n }\n });\n }\n\n if (exists(this.colDef.width) && typeof this.colDef.width !== 'number') {\n warnOnce('AG Grid: colDef.width should be a number, not ' + typeof this.colDef.width, 'ColumnCheck_asdfawef');\n }\n\n if (colDefAny.pinnedRowCellRenderer) {\n warnOnce('AG Grid: pinnedRowCellRenderer no longer exists, use cellRendererSelector if you want a different Cell Renderer for pinned rows. Check params.node.rowPinned. This was an unfortunate (but necessary) change we had to do to allow future plans we have of re-skinng the data grid in frameworks such as React, Angular and Vue. See https://www.ag-grid.com/javascript-grid/cell-rendering/#many-renderers-one-column', 'colDef.pinnedRowCellRenderer-deprecated');\n }\n if (colDefAny.pinnedRowCellRendererParams) {\n warnOnce('AG Grid: pinnedRowCellRenderer no longer exists, use cellRendererSelector if you want a different Cell Renderer for pinned rows. Check params.node.rowPinned. This was an unfortunate (but necessary) change we had to do to allow future plans we have of re-skinng the data grid in frameworks such as React, Angular and Vue. See https://www.ag-grid.com/javascript-grid/cell-rendering/#many-renderers-one-column', 'colDef.pinnedRowCellRenderer-deprecated');\n }\n if (colDefAny.pinnedRowCellRendererFramework) {\n warnOnce('AG Grid: pinnedRowCellRenderer no longer exists, use cellRendererSelector if you want a different Cell Renderer for pinned rows. Check params.node.rowPinned. This was an unfortunate (but necessary) change we had to do to allow future plans we have of re-skinng the data grid in frameworks such as React, Angular and Vue. See https://www.ag-grid.com/javascript-grid/cell-rendering/#many-renderers-one-column', 'colDef.pinnedRowCellRenderer-deprecated');\n }\n if (colDefAny.pinnedRowValueGetter) {\n warnOnce('AG Grid: pinnedRowCellRenderer is deprecated, use cellRendererSelector if you want a different Cell Renderer for pinned rows. Check params.node.rowPinned. This was an unfortunate (but necessary) change we had to do to allow future plans we have of re-skinng the data grid in frameworks such as React, Angular and Vue.', 'colDef.pinnedRowCellRenderer-deprecated');\n }\n }\n\n /** Add an event listener to the column. */\n public addEventListener(eventType: string, listener: Function): void {\n this.eventService.addEventListener(eventType, listener);\n }\n\n /** Remove event listener from the column. */\n public removeEventListener(eventType: string, listener: Function): void {\n this.eventService.removeEventListener(eventType, listener);\n }\n\n private createColumnFunctionCallbackParams(rowNode: RowNode): ColumnFunctionCallbackParams {\n return {\n node: rowNode,\n data: rowNode.data,\n column: this,\n colDef: this.colDef,\n context: this.gridOptionsWrapper.getContext(),\n api: this.gridOptionsWrapper.getApi()!,\n columnApi: this.gridOptionsWrapper.getColumnApi()!\n };\n }\n\n public isSuppressNavigable(rowNode: RowNode): boolean {\n // if boolean set, then just use it\n if (typeof this.colDef.suppressNavigable === 'boolean') {\n return this.colDef.suppressNavigable;\n }\n\n // if function, then call the function to find out\n if (typeof this.colDef.suppressNavigable === 'function') {\n const params = this.createColumnFunctionCallbackParams(rowNode);\n const userFunc = this.colDef.suppressNavigable;\n return userFunc(params);\n }\n\n return false;\n }\n\n public isCellEditable(rowNode: RowNode): boolean {\n\n // only allow editing of groups if the user has this option enabled\n if (rowNode.group && !this.gridOptionsWrapper.isEnableGroupEdit()) {\n return false;\n }\n\n return this.isColumnFunc(rowNode, this.colDef.editable);\n }\n\n public isSuppressFillHandle(): boolean {\n return !!attrToBoolean(this.colDef.suppressFillHandle);\n }\n\n public isAutoHeight(): boolean {\n return !!attrToBoolean(this.colDef.autoHeight);\n }\n\n public isRowDrag(rowNode: RowNode): boolean {\n return this.isColumnFunc(rowNode, this.colDef.rowDrag);\n }\n\n public isDndSource(rowNode: RowNode): boolean {\n return this.isColumnFunc(rowNode, this.colDef.dndSource);\n }\n\n public isCellCheckboxSelection(rowNode: RowNode): boolean {\n return this.isColumnFunc(rowNode, this.colDef.checkboxSelection);\n }\n\n public isSuppressPaste(rowNode: RowNode): boolean {\n return this.isColumnFunc(rowNode, this.colDef ? this.colDef.suppressPaste : null);\n }\n\n public isResizable(): boolean {\n return !!attrToBoolean(this.colDef.resizable);\n }\n\n private isColumnFunc(rowNode: RowNode, value?: boolean | ((params: ColumnFunctionCallbackParams) => boolean) | null): boolean {\n // if boolean set, then just use it\n if (typeof value === 'boolean') {\n return value;\n }\n\n // if function, then call the function to find out\n if (typeof value === 'function') {\n const params = this.createColumnFunctionCallbackParams(rowNode);\n const editableFunc = value;\n return editableFunc(params);\n }\n\n return false;\n }\n\n public setMoving(moving: boolean, source: ColumnEventType = \"api\"): void {\n this.moving = moving;\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_MOVING_CHANGED, source));\n }\n\n private createColumnEvent(type: string, source: ColumnEventType): ColumnEvent {\n return {\n api: this.gridApi,\n columnApi: this.columnApi,\n type: type,\n column: this,\n columns: [this],\n source: source\n };\n }\n\n public isMoving(): boolean {\n return this.moving;\n }\n\n /** If sorting is active, returns the sort direction e.g. `'asc'` or `'desc'`. */\n public getSort(): 'asc' | 'desc' | null | undefined {\n return this.sort;\n }\n\n public setSort(sort: 'asc' | 'desc' | null | undefined, source: ColumnEventType = \"api\"): void {\n if (this.sort !== sort) {\n this.sort = sort;\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_SORT_CHANGED, source));\n }\n }\n\n public setMenuVisible(visible: boolean, source: ColumnEventType = \"api\"): void {\n if (this.menuVisible !== visible) {\n this.menuVisible = visible;\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_MENU_VISIBLE_CHANGED, source));\n }\n }\n\n public isMenuVisible(): boolean {\n return this.menuVisible;\n }\n\n public isSortAscending(): boolean {\n return this.sort === Constants.SORT_ASC;\n }\n\n public isSortDescending(): boolean {\n return this.sort === Constants.SORT_DESC;\n }\n\n public isSortNone(): boolean {\n return missing(this.sort);\n }\n\n public isSorting(): boolean {\n return exists(this.sort);\n }\n\n public getSortIndex(): number | null | undefined {\n return this.sortIndex;\n }\n\n public setSortIndex(sortOrder?: number | null): void {\n this.sortIndex = sortOrder;\n }\n\n public setAggFunc(aggFunc: string | IAggFunc | null | undefined): void {\n this.aggFunc = aggFunc;\n }\n\n /** If aggregation is set for the column, returns the aggregation function. */\n public getAggFunc(): string | IAggFunc | null | undefined {\n return this.aggFunc;\n }\n\n public getLeft(): number | null {\n return this.left;\n }\n\n public getOldLeft(): number | null {\n return this.oldLeft;\n }\n\n public getRight(): number {\n return this.left + this.actualWidth;\n }\n\n public setLeft(left: number | null, source: ColumnEventType = \"api\") {\n this.oldLeft = this.left;\n if (this.left !== left) {\n this.left = left;\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_LEFT_CHANGED, source));\n }\n }\n\n /** Returns `true` if filter is active on the column. */\n public isFilterActive(): boolean {\n return this.filterActive;\n }\n\n // additionalEventAttributes is used by provided simple floating filter, so it can add 'floatingFilter=true' to the event\n public setFilterActive(active: boolean, source: ColumnEventType = \"api\", additionalEventAttributes?: any): void {\n if (this.filterActive !== active) {\n this.filterActive = active;\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_FILTER_ACTIVE_CHANGED, source));\n }\n const filterChangedEvent = this.createColumnEvent(Column.EVENT_FILTER_CHANGED, source);\n if (additionalEventAttributes) {\n mergeDeep(filterChangedEvent, additionalEventAttributes);\n }\n this.eventService.dispatchEvent(filterChangedEvent);\n }\n\n public setPinned(pinned: string | boolean | null | undefined): void {\n if (pinned === true || pinned === Constants.PINNED_LEFT) {\n this.pinned = Constants.PINNED_LEFT;\n } else if (pinned === Constants.PINNED_RIGHT) {\n this.pinned = Constants.PINNED_RIGHT;\n } else {\n this.pinned = null;\n }\n }\n\n public setFirstRightPinned(firstRightPinned: boolean, source: ColumnEventType = \"api\"): void {\n if (this.firstRightPinned !== firstRightPinned) {\n this.firstRightPinned = firstRightPinned;\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_FIRST_RIGHT_PINNED_CHANGED, source));\n }\n }\n\n public setLastLeftPinned(lastLeftPinned: boolean, source: ColumnEventType = \"api\"): void {\n if (this.lastLeftPinned !== lastLeftPinned) {\n this.lastLeftPinned = lastLeftPinned;\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_LAST_LEFT_PINNED_CHANGED, source));\n }\n }\n\n public isFirstRightPinned(): boolean {\n return this.firstRightPinned;\n }\n\n public isLastLeftPinned(): boolean {\n return this.lastLeftPinned;\n }\n\n public isPinned(): boolean {\n return this.pinned === Constants.PINNED_LEFT || this.pinned === Constants.PINNED_RIGHT;\n }\n\n public isPinnedLeft(): boolean {\n return this.pinned === Constants.PINNED_LEFT;\n }\n\n public isPinnedRight(): boolean {\n return this.pinned === Constants.PINNED_RIGHT;\n }\n\n public getPinned(): 'left' | 'right' | null | undefined {\n return this.pinned;\n }\n\n public setVisible(visible: boolean, source: ColumnEventType = \"api\"): void {\n const newValue = visible === true;\n if (this.visible !== newValue) {\n this.visible = newValue;\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_VISIBLE_CHANGED, source));\n }\n }\n\n public isVisible(): boolean {\n return this.visible;\n }\n\n /** Returns the column definition for this column.\n * The column definition will be the result of merging the application provided column definition with any provided defaults\n * (e.g. `defaultColDef` grid option, or column types.\n *\n * Equivalent: `getDefinition` */\n public getColDef(): ColDef {\n return this.colDef;\n }\n\n public getColumnGroupShow(): string | undefined {\n return this.colDef.columnGroupShow;\n }\n /**\n * Returns the unique ID for the column.\n *\n * Equivalent: `getId`, `getUniqueId` */\n public getColId(): string {\n return this.colId;\n }\n /**\n * Returns the unique ID for the column.\n *\n * Equivalent: `getColId`, `getUniqueId` */\n public getId(): string {\n return this.getColId();\n }\n /**\n * Returns the unique ID for the column.\n *\n * Equivalent: `getColId`, `getId` */\n public getUniqueId(): string {\n return this.getId();\n }\n\n public getDefinition(): AbstractColDef {\n return this.colDef;\n }\n\n /** Returns the current width of the column. If the column is resized, the actual width is the new size. */\n public getActualWidth(): number {\n return this.actualWidth;\n }\n\n private createBaseColDefParams(rowNode: RowNode): BaseColDefParams {\n const params: BaseColDefParams = {\n node: rowNode,\n data: rowNode.data,\n colDef: this.colDef,\n column: this,\n api: this.gridOptionsWrapper.getApi()!,\n columnApi: this.gridOptionsWrapper.getColumnApi()!,\n context: this.gridOptionsWrapper.getContext()\n };\n return params;\n }\n\n public getColSpan(rowNode: RowNode): number {\n if (missing(this.colDef.colSpan)) { return 1; }\n const params: ColSpanParams = this.createBaseColDefParams(rowNode);\n const colSpan = this.colDef.colSpan(params);\n // colSpan must be number equal to or greater than 1\n\n return Math.max(colSpan, 1);\n }\n\n public getRowSpan(rowNode: RowNode): number {\n if (missing(this.colDef.rowSpan)) { return 1; }\n const params: RowSpanParams = this.createBaseColDefParams(rowNode);\n const rowSpan = this.colDef.rowSpan(params);\n // rowSpan must be number equal to or greater than 1\n\n return Math.max(rowSpan, 1);\n }\n\n public setActualWidth(actualWidth: number, source: ColumnEventType = \"api\", silent: boolean = false): void {\n if (this.minWidth != null) {\n actualWidth = Math.max(actualWidth, this.minWidth);\n }\n if (this.maxWidth != null) {\n actualWidth = Math.min(actualWidth, this.maxWidth);\n }\n if (this.actualWidth !== actualWidth) {\n // disable flex for this column if it was manually resized.\n this.actualWidth = actualWidth;\n if (this.flex && source !== 'flex' && source !== 'gridInitializing') {\n this.flex = null;\n }\n\n if (!silent) {\n this.fireColumnWidthChangedEvent(source);\n }\n }\n }\n\n public fireColumnWidthChangedEvent(source: ColumnEventType): void {\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_WIDTH_CHANGED, source));\n }\n\n public isGreaterThanMax(width: number): boolean {\n if (this.maxWidth != null) {\n return width > this.maxWidth;\n }\n return false;\n }\n\n public getMinWidth(): number | null | undefined {\n return this.minWidth;\n }\n\n public getMaxWidth(): number | null | undefined {\n return this.maxWidth;\n }\n\n public getFlex(): number {\n return this.flex || 0;\n }\n\n // this method should only be used by the columnModel to\n // change flex when required by the setColumnState method.\n public setFlex(flex: number | null) {\n if (this.flex !== flex) { this.flex = flex; }\n }\n\n public setMinimum(source: ColumnEventType = \"api\"): void {\n if (exists(this.minWidth)) {\n this.setActualWidth(this.minWidth, source);\n }\n }\n\n public setRowGroupActive(rowGroup: boolean, source: ColumnEventType = \"api\"): void {\n if (this.rowGroupActive !== rowGroup) {\n this.rowGroupActive = rowGroup;\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_ROW_GROUP_CHANGED, source));\n }\n }\n\n /** Returns `true` if row group is currently active for this column. */\n public isRowGroupActive(): boolean {\n return this.rowGroupActive;\n }\n\n public setPivotActive(pivot: boolean, source: ColumnEventType = \"api\"): void {\n if (this.pivotActive !== pivot) {\n this.pivotActive = pivot;\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_PIVOT_CHANGED, source));\n }\n }\n\n /** Returns `true` if pivot is currently active for this column. */\n public isPivotActive(): boolean {\n return this.pivotActive;\n }\n\n public isAnyFunctionActive(): boolean {\n return this.isPivotActive() || this.isRowGroupActive() || this.isValueActive();\n }\n\n public isAnyFunctionAllowed(): boolean {\n return this.isAllowPivot() || this.isAllowRowGroup() || this.isAllowValue();\n }\n\n public setValueActive(value: boolean, source: ColumnEventType = \"api\"): void {\n if (this.aggregationActive !== value) {\n this.aggregationActive = value;\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_VALUE_CHANGED, source));\n }\n }\n\n /** Returns `true` if value (aggregation) is currently active for this column. */\n public isValueActive(): boolean {\n return this.aggregationActive;\n }\n\n public isAllowPivot(): boolean {\n return this.colDef.enablePivot === true;\n }\n\n public isAllowValue(): boolean {\n return this.colDef.enableValue === true;\n }\n\n public isAllowRowGroup(): boolean {\n return this.colDef.enableRowGroup === true;\n }\n\n public getMenuTabs(defaultValues: string[]): string[] {\n let menuTabs = this.getColDef().menuTabs;\n\n if (menuTabs == null) {\n menuTabs = defaultValues;\n }\n\n return menuTabs;\n }\n\n // this used to be needed, as previous version of ag-grid had lockPosition as column state,\n // so couldn't depend on colDef version.\n public isLockPosition(): boolean {\n console.warn('AG Grid: since v21, col.isLockPosition() should not be used, please use col.getColDef().lockPosition instead.');\n return this.colDef ? !!this.colDef.lockPosition : false;\n }\n\n // this used to be needed, as previous version of ag-grid had lockVisible as column state,\n // so couldn't depend on colDef version.\n public isLockVisible(): boolean {\n console.warn('AG Grid: since v21, col.isLockVisible() should not be used, please use col.getColDef().lockVisible instead.');\n return this.colDef ? !!this.colDef.lockVisible : false;\n }\n\n // this used to be needed, as previous version of ag-grid had lockPinned as column state,\n // so couldn't depend on colDef version.\n public isLockPinned(): boolean {\n console.warn('AG Grid: since v21, col.isLockPinned() should not be used, please use col.getColDef().lockPinned instead.');\n return this.colDef ? !!this.colDef.lockPinned : false;\n }\n\n}\n","import { exists, toStringOrNull } from './generic';\n\nexport function firstExistingValue(...values: A[]): A | null {\n for (let i = 0; i < values.length; i++) {\n const value = values[i];\n\n if (exists(value)) {\n return value;\n }\n }\n\n return null;\n}\n\nexport function existsAndNotEmpty(value?: T[]): boolean {\n return value != null && value.length > 0;\n}\n\nexport function last(arr: T[]): T;\nexport function last(arr: NodeListOf): T;\nexport function last(arr: any): any {\n if (!arr || !arr.length) { return; }\n\n return arr[arr.length - 1];\n}\n\nexport function areEqual(a?: T[] | null, b?: T[] | null, comparator?: (a: T, b: T) => boolean): boolean {\n if (a == null && b == null) {\n return true;\n }\n\n return a != null &&\n b != null &&\n a.length === b.length &&\n a.every((value, index) => comparator ? comparator(value, b[index]) : b[index] === value);\n}\n\n/** @deprecated */\nexport function compareArrays(array1?: any[], array2?: any[]): boolean {\n return areEqual(array1, array2);\n}\n\n/** @deprecated */\nexport function shallowCompare(arr1: any[], arr2: any[]): boolean {\n return areEqual(arr1, arr2);\n}\n\nexport function sortNumerically(array: number[]): number[] {\n return array.sort((a, b) => a - b);\n}\n\nexport function removeRepeatsFromArray(array: T[], object: T) {\n if (!array) { return; }\n\n for (let index = array.length - 2; index >= 0; index--) {\n const thisOneMatches = array[index] === object;\n const nextOneMatches = array[index + 1] === object;\n\n if (thisOneMatches && nextOneMatches) {\n array.splice(index + 1, 1);\n }\n }\n}\n\nexport function removeFromArray(array: T[], object: T) {\n const index = array.indexOf(object);\n\n if (index >= 0) {\n array.splice(index, 1);\n }\n}\n\nexport function removeAllFromArray(array: T[], toRemove: T[]) {\n toRemove.forEach(item => removeFromArray(array, item));\n}\n\nexport function insertIntoArray(array: T[], object: T, toIndex: number) {\n array.splice(toIndex, 0, object);\n}\n\nexport function insertArrayIntoArray(dest: T[], src: T[], toIndex: number) {\n if (dest == null || src == null) { return; }\n\n // put items in backwards, otherwise inserted items end up in reverse order\n for (let i = src.length - 1; i >= 0; i--) {\n const item = src[i];\n insertIntoArray(dest, item, toIndex);\n }\n}\n\nexport function moveInArray(array: T[], objectsToMove: T[], toIndex: number) {\n // first take out items from the array\n removeAllFromArray(array, objectsToMove);\n\n // now add the objects, in same order as provided to us, that means we start at the end\n // as the objects will be pushed to the right as they are inserted\n objectsToMove.slice().reverse().forEach(obj => insertIntoArray(array, obj, toIndex));\n}\n\nexport function includes(array: T[], value: T): boolean {\n return array.indexOf(value) > -1;\n}\n\nexport function flatten(arrayOfArrays: any[]): any[] {\n return [].concat.apply([], arrayOfArrays);\n}\n\nexport function pushAll(target: T[], source: T[]): void {\n if (source == null || target == null) { return; }\n\n source.forEach(value => target.push(value));\n}\n\nexport function toStrings(array: T[]): ((string | null)[]) | null {\n return array.map(toStringOrNull);\n}\n\nexport function forEachReverse(list: T[], action: (value: T, index: number) => void): void {\n if (list == null) {\n return;\n }\n\n for (let i = list.length - 1; i >= 0; i--) {\n action(list[i], i);\n }\n}\n","import { IHeaderColumn } from \"./iHeaderColumn\";\nimport { ColGroupDef } from \"./colDef\";\nimport { Column } from \"./column\";\nimport { AbstractColDef } from \"./colDef\";\nimport { ProvidedColumnGroup } from \"./providedColumnGroup\";\nimport { EventService } from \"../eventService\";\nimport { Autowired } from \"../context/context\";\nimport { GridOptionsWrapper } from \"../gridOptionsWrapper\";\nimport { AgEvent } from \"../events\";\nimport { last } from \"../utils/array\";\n\nexport class ColumnGroup implements IHeaderColumn {\n\n public static HEADER_GROUP_SHOW_OPEN = 'open';\n public static HEADER_GROUP_SHOW_CLOSED = 'closed';\n\n public static EVENT_LEFT_CHANGED = 'leftChanged';\n public static EVENT_DISPLAYED_CHILDREN_CHANGED = 'displayedChildrenChanged';\n\n // this is static, a it is used outside of this class\n public static createUniqueId(groupId: string, instanceId: number): string {\n return groupId + '_' + instanceId;\n }\n\n @Autowired('gridOptionsWrapper') gridOptionsWrapper: GridOptionsWrapper;\n\n // all the children of this group, regardless of whether they are opened or closed\n private children: IHeaderColumn[] | null;\n // depends on the open/closed state of the group, only displaying columns are stored here\n private displayedChildren: IHeaderColumn[] | null = [];\n\n private readonly groupId: string;\n private readonly instanceId: number;\n private readonly providedColumnGroup: ProvidedColumnGroup;\n private readonly pinned: 'left' | 'right' | null;\n\n // private moving = false\n private left: number | null;\n private oldLeft: number | null;\n private localEventService: EventService = new EventService();\n\n private parent: ColumnGroup | null;\n\n constructor(providedColumnGroup: ProvidedColumnGroup, groupId: string, instanceId: number, pinned: 'left' | 'right' | null) {\n this.groupId = groupId;\n this.instanceId = instanceId;\n this.providedColumnGroup = providedColumnGroup;\n this.pinned = pinned;\n }\n\n // as the user is adding and removing columns, the groups are recalculated.\n // this reset clears out all children, ready for children to be added again\n public reset(): void {\n this.parent = null;\n this.children = null;\n this.displayedChildren = null;\n }\n\n public getParent(): ColumnGroup {\n return this.parent!;\n }\n\n public setParent(parent: ColumnGroup): void {\n this.parent = parent;\n }\n\n public getUniqueId(): string {\n return ColumnGroup.createUniqueId(this.groupId, this.instanceId);\n }\n\n public isEmptyGroup(): boolean {\n return this.displayedChildren!.length === 0;\n }\n\n public isMoving(): boolean {\n const allLeafColumns = this.getProvidedColumnGroup().getLeafColumns();\n if (!allLeafColumns || allLeafColumns.length === 0) { return false; }\n\n return allLeafColumns.every(col => col.isMoving());\n }\n\n public checkLeft(): void {\n // first get all children to setLeft, as it impacts our decision below\n this.displayedChildren!.forEach((child: IHeaderColumn) => {\n if (child instanceof ColumnGroup) {\n child.checkLeft();\n }\n });\n\n // set our left based on first displayed column\n if (this.displayedChildren!.length > 0) {\n if (this.gridOptionsWrapper.isEnableRtl()) {\n const lastChild = last(this.displayedChildren!);\n const lastChildLeft = lastChild.getLeft();\n this.setLeft(lastChildLeft);\n } else {\n const firstChildLeft = this.displayedChildren![0].getLeft();\n this.setLeft(firstChildLeft);\n }\n } else {\n // this should never happen, as if we have no displayed columns, then\n // this groups should not even exist.\n this.setLeft(null);\n }\n }\n\n public getLeft(): number | null {\n return this.left;\n }\n\n public getOldLeft(): number | null {\n return this.oldLeft;\n }\n\n public setLeft(left: number | null) {\n this.oldLeft = left;\n if (this.left !== left) {\n this.left = left;\n this.localEventService.dispatchEvent(this.createAgEvent(ColumnGroup.EVENT_LEFT_CHANGED));\n }\n }\n\n public getPinned(): 'left' | 'right' | null {\n return this.pinned;\n }\n\n private createAgEvent(type: string): AgEvent {\n return { type };\n }\n\n public addEventListener(eventType: string, listener: Function): void {\n this.localEventService.addEventListener(eventType, listener);\n }\n\n public removeEventListener(eventType: string, listener: Function): void {\n this.localEventService.removeEventListener(eventType, listener);\n }\n\n public getGroupId(): string {\n return this.groupId;\n }\n\n public getInstanceId(): number {\n return this.instanceId;\n }\n\n public isChildInThisGroupDeepSearch(wantedChild: IHeaderColumn): boolean {\n let result = false;\n\n this.children!.forEach((foundChild: IHeaderColumn) => {\n if (wantedChild === foundChild) {\n result = true;\n }\n if (foundChild instanceof ColumnGroup) {\n if (foundChild.isChildInThisGroupDeepSearch(wantedChild)) {\n result = true;\n }\n }\n });\n\n return result;\n }\n\n public getActualWidth(): number {\n let groupActualWidth = 0;\n if (this.displayedChildren) {\n this.displayedChildren.forEach((child: IHeaderColumn) => {\n groupActualWidth += child.getActualWidth();\n });\n }\n return groupActualWidth;\n }\n\n public isResizable(): boolean {\n if (!this.displayedChildren) { return false; }\n\n // if at least one child is resizable, then the group is resizable\n let result = false;\n this.displayedChildren.forEach((child: IHeaderColumn) => {\n if (child.isResizable()) {\n result = true;\n }\n });\n\n return result;\n }\n\n public getMinWidth(): number {\n let result = 0;\n this.displayedChildren!.forEach((groupChild: IHeaderColumn) => {\n result += groupChild.getMinWidth() || 0;\n });\n return result;\n }\n\n public addChild(child: IHeaderColumn): void {\n if (!this.children) {\n this.children = [];\n }\n this.children.push(child);\n }\n\n public getDisplayedChildren(): IHeaderColumn[] | null {\n return this.displayedChildren;\n }\n\n public getLeafColumns(): Column[] {\n const result: Column[] = [];\n this.addLeafColumns(result);\n return result;\n }\n\n public getDisplayedLeafColumns(): Column[] {\n const result: Column[] = [];\n this.addDisplayedLeafColumns(result);\n return result;\n }\n\n // why two methods here doing the same thing?\n public getDefinition(): AbstractColDef | null {\n return this.providedColumnGroup.getColGroupDef();\n }\n\n public getColGroupDef(): ColGroupDef | null {\n return this.providedColumnGroup.getColGroupDef();\n }\n\n public isPadding(): boolean {\n return this.providedColumnGroup.isPadding();\n }\n\n public isExpandable(): boolean {\n return this.providedColumnGroup.isExpandable();\n }\n\n public isExpanded(): boolean {\n return this.providedColumnGroup.isExpanded();\n }\n\n public setExpanded(expanded: boolean): void {\n this.providedColumnGroup.setExpanded(expanded);\n }\n\n private addDisplayedLeafColumns(leafColumns: Column[]): void {\n this.displayedChildren!.forEach((child: IHeaderColumn) => {\n if (child instanceof Column) {\n leafColumns.push(child);\n } else if (child instanceof ColumnGroup) {\n child.addDisplayedLeafColumns(leafColumns);\n }\n });\n }\n\n private addLeafColumns(leafColumns: Column[]): void {\n this.children!.forEach((child: IHeaderColumn) => {\n if (child instanceof Column) {\n leafColumns.push(child);\n } else if (child instanceof ColumnGroup) {\n child.addLeafColumns(leafColumns);\n }\n });\n }\n\n public getChildren(): IHeaderColumn[] | null {\n return this.children;\n }\n\n public getColumnGroupShow(): string | undefined {\n return this.providedColumnGroup.getColumnGroupShow();\n }\n\n public getProvidedColumnGroup(): ProvidedColumnGroup {\n return this.providedColumnGroup;\n }\n\n /** @deprecated getOriginalColumnGroup is deprecated, use getOriginalColumnGroup. */\n public getOriginalColumnGroup(): ProvidedColumnGroup {\n console.warn('AG Grid: columnGroup.getOriginalColumnGroup() is deprecated due to a method rename, use columnGroup.getProvidedColumnGroup() instead');\n return this.getProvidedColumnGroup();\n }\n\n public getPaddingLevel(): number {\n const parent = this.getParent();\n\n if (!this.isPadding() || !parent || !parent.isPadding()) {\n return 0;\n }\n\n return 1 + parent.getPaddingLevel();\n }\n\n public calculateDisplayedColumns() {\n // clear out last time we calculated\n this.displayedChildren = [];\n\n // find the column group that is controlling expandable. this is relevant when we have padding (empty)\n // groups, where the expandable is actually the first parent that is not a padding group.\n let parentWithExpansion: ColumnGroup = this;\n while (parentWithExpansion != null && parentWithExpansion.isPadding()) {\n parentWithExpansion = parentWithExpansion.getParent();\n }\n\n const isExpandable = parentWithExpansion ? parentWithExpansion.providedColumnGroup.isExpandable() : false;\n // it not expandable, everything is visible\n if (!isExpandable) {\n this.displayedChildren = this.children;\n this.localEventService.dispatchEvent(this.createAgEvent(ColumnGroup.EVENT_DISPLAYED_CHILDREN_CHANGED));\n return;\n }\n\n // Add cols based on columnGroupShow\n // Note - the below also adds padding groups, these are always added because they never have\n // colDef.columnGroupShow set.\n this.children!.forEach(child => {\n // never add empty groups\n const emptyGroup = child instanceof ColumnGroup && (!child.displayedChildren || !child.displayedChildren.length);\n if (emptyGroup) { return; }\n\n const headerGroupShow = child.getColumnGroupShow();\n switch (headerGroupShow) {\n case ColumnGroup.HEADER_GROUP_SHOW_OPEN:\n // when set to open, only show col if group is open\n if (parentWithExpansion.providedColumnGroup.isExpanded()) {\n this.displayedChildren!.push(child);\n }\n break;\n case ColumnGroup.HEADER_GROUP_SHOW_CLOSED:\n // when set to open, only show col if group is open\n if (!parentWithExpansion.providedColumnGroup.isExpanded()) {\n this.displayedChildren!.push(child);\n }\n break;\n default:\n this.displayedChildren!.push(child);\n break;\n }\n });\n\n this.localEventService.dispatchEvent(this.createAgEvent(ColumnGroup.EVENT_DISPLAYED_CHILDREN_CHANGED));\n }\n}\n","import { IProvidedColumn } from \"./iProvidedColumn\";\nimport { ColGroupDef } from \"./colDef\";\nimport { ColumnGroup } from \"./columnGroup\";\nimport { Column } from \"./column\";\nimport { EventService } from \"../eventService\";\nimport { IEventEmitter } from \"../interfaces/iEventEmitter\";\nimport { AgEvent } from \"../events\";\n\nexport class ProvidedColumnGroup implements IProvidedColumn, IEventEmitter {\n\n public static EVENT_EXPANDED_CHANGED = 'expandedChanged';\n public static EVENT_EXPANDABLE_CHANGED = 'expandableChanged';\n\n private localEventService = new EventService();\n\n private colGroupDef: ColGroupDef | null;\n private originalParent: ProvidedColumnGroup | null;\n\n private children: IProvidedColumn[];\n private groupId: string;\n private expandable = false;\n\n private expanded: boolean;\n private padding: boolean;\n\n private level: number;\n\n constructor(colGroupDef: ColGroupDef | null, groupId: string, padding: boolean, level: number) {\n this.colGroupDef = colGroupDef;\n this.groupId = groupId;\n this.expanded = !!colGroupDef && !!colGroupDef.openByDefault;\n this.padding = padding;\n this.level = level;\n }\n\n public setOriginalParent(originalParent: ProvidedColumnGroup | null): void {\n this.originalParent = originalParent;\n }\n\n public getOriginalParent(): ProvidedColumnGroup | null {\n return this.originalParent;\n }\n\n public getLevel(): number {\n return this.level;\n }\n\n public isVisible(): boolean {\n // return true if at least one child is visible\n if (this.children) {\n return this.children.some(child => child.isVisible());\n }\n\n return false;\n }\n\n public isPadding(): boolean {\n return this.padding;\n }\n\n public setExpanded(expanded: boolean | undefined): void {\n this.expanded = expanded === undefined ? false : expanded;\n const event: AgEvent = {\n type: ProvidedColumnGroup.EVENT_EXPANDED_CHANGED\n };\n this.localEventService.dispatchEvent(event);\n }\n\n public isExpandable(): boolean {\n return this.expandable;\n }\n\n public isExpanded(): boolean {\n return this.expanded;\n }\n\n public getGroupId(): string {\n return this.groupId;\n }\n\n public getId(): string {\n return this.getGroupId();\n }\n\n public setChildren(children: IProvidedColumn[]): void {\n this.children = children;\n }\n\n public getChildren(): IProvidedColumn[] {\n return this.children;\n }\n\n public getColGroupDef(): ColGroupDef | null {\n return this.colGroupDef;\n }\n\n public getLeafColumns(): Column[] {\n const result: Column[] = [];\n this.addLeafColumns(result);\n return result;\n }\n\n private addLeafColumns(leafColumns: Column[]): void {\n if (!this.children) { return; }\n\n this.children.forEach((child: IProvidedColumn) => {\n if (child instanceof Column) {\n leafColumns.push(child);\n } else if (child instanceof ProvidedColumnGroup) {\n child.addLeafColumns(leafColumns);\n }\n });\n }\n\n public getColumnGroupShow(): string | undefined {\n const colGroupDef = this.colGroupDef;\n\n if (!colGroupDef) { return; }\n\n return colGroupDef.columnGroupShow;\n }\n\n // need to check that this group has at least one col showing when both expanded and contracted.\n // if not, then we don't allow expanding and contracting on this group\n\n public setupExpandable() {\n this.setExpandable();\n // note - we should be removing this event listener\n this.getLeafColumns().forEach(col => col.addEventListener(Column.EVENT_VISIBLE_CHANGED, this.onColumnVisibilityChanged.bind(this)));\n }\n\n public setExpandable() {\n if (this.isPadding()) { return; }\n // want to make sure the group doesn't disappear when it's open\n let atLeastOneShowingWhenOpen = false;\n // want to make sure the group doesn't disappear when it's closed\n let atLeastOneShowingWhenClosed = false;\n // want to make sure the group has something to show / hide\n let atLeastOneChangeable = false;\n\n const children = this.findChildrenRemovingPadding();\n\n for (let i = 0, j = children.length; i < j; i++) {\n const abstractColumn = children[i];\n if (!abstractColumn.isVisible()) {\n continue;\n }\n // if the abstractColumn is a grid generated group, there will be no colDef\n const headerGroupShow = abstractColumn.getColumnGroupShow();\n\n if (headerGroupShow === ColumnGroup.HEADER_GROUP_SHOW_OPEN) {\n atLeastOneShowingWhenOpen = true;\n atLeastOneChangeable = true;\n } else if (headerGroupShow === ColumnGroup.HEADER_GROUP_SHOW_CLOSED) {\n atLeastOneShowingWhenClosed = true;\n atLeastOneChangeable = true;\n } else {\n atLeastOneShowingWhenOpen = true;\n atLeastOneShowingWhenClosed = true;\n }\n }\n\n const expandable = atLeastOneShowingWhenOpen && atLeastOneShowingWhenClosed && atLeastOneChangeable;\n\n if (this.expandable !== expandable) {\n this.expandable = expandable;\n const event: AgEvent = {\n type: ProvidedColumnGroup.EVENT_EXPANDABLE_CHANGED\n };\n this.localEventService.dispatchEvent(event);\n }\n }\n\n private findChildrenRemovingPadding(): IProvidedColumn[] {\n const res: IProvidedColumn[] = [];\n\n const process = (items: IProvidedColumn[]) => {\n items.forEach(item => {\n // if padding, we add this children instead of the padding\n const skipBecausePadding = item instanceof ProvidedColumnGroup && item.isPadding();\n if (skipBecausePadding) {\n process((item as ProvidedColumnGroup).children);\n } else {\n res.push(item);\n }\n });\n };\n\n process(this.children);\n\n return res;\n }\n\n private onColumnVisibilityChanged(): void {\n this.setExpandable();\n }\n\n public addEventListener(eventType: string, listener: Function): void {\n this.localEventService.addEventListener(eventType, listener);\n }\n\n public removeEventListener(eventType: string, listener: Function): void {\n this.localEventService.removeEventListener(eventType, listener);\n }\n}\n","import { ColDef } from \"./colDef\";\n\nexport const DefaultColumnTypes: { [key: string]: ColDef } = {\n numericColumn: {\n headerClass: 'ag-right-aligned-header',\n cellClass: 'ag-right-aligned-cell'\n },\n rightAligned: {\n headerClass: 'ag-right-aligned-header',\n cellClass: 'ag-right-aligned-cell'\n }\n};\n","import { GridOptionsWrapper } from '../gridOptionsWrapper';\nimport { IFrameworkOverrides } from '../interfaces/iFrameworkOverrides';\nimport { includes } from './array';\n\nconst AG_GRID_STOP_PROPAGATION = '__ag_Grid_Stop_Propagation';\nconst PASSIVE_EVENTS = ['touchstart', 'touchend', 'touchmove', 'touchcancel'];\nconst supports: { [key: string]: boolean; } = {};\n\n/**\n * a user once raised an issue - they said that when you opened a popup (eg context menu)\n * and then clicked on a selection checkbox, the popup wasn't closed. this is because the\n * popup listens for clicks on the body, however ag-grid WAS stopping propagation on the\n * checkbox clicks (so the rows didn't pick them up as row selection selection clicks).\n * to get around this, we have a pattern to stop propagation for the purposes of AG Grid,\n * but we still let the event pass back to the body.\n * @param {Event} event\n */\nexport function stopPropagationForAgGrid(event: Event): void {\n (event as any)[AG_GRID_STOP_PROPAGATION] = true;\n}\n\nexport function isStopPropagationForAgGrid(event: Event): boolean {\n return (event as any)[AG_GRID_STOP_PROPAGATION] === true;\n}\n\nexport const isEventSupported = (() => {\n const tags = {\n select: 'input',\n change: 'input',\n submit: 'form',\n reset: 'form',\n error: 'img',\n load: 'img',\n abort: 'img'\n } as any;\n\n const eventChecker = (eventName: any) => {\n if (typeof supports[eventName] === 'boolean') {\n return supports[eventName];\n }\n\n const el = document.createElement(tags[eventName] || 'div');\n eventName = 'on' + eventName;\n\n return supports[eventName] = (eventName in el);\n };\n\n return eventChecker;\n})();\n\nexport function getCtrlForEvent(gridOptionsWrapper: GridOptionsWrapper, event: Event, type: string): T | null {\n let sourceElement = event.target as HTMLElement;\n\n while (sourceElement) {\n const renderedComp = gridOptionsWrapper.getDomData(sourceElement, type);\n\n if (renderedComp) {\n return renderedComp as T;\n }\n\n sourceElement = sourceElement.parentElement!;\n }\n\n return null;\n}\n\n/**\n * @deprecated\n * Adds all type of change listeners to an element, intended to be a text field\n * @param {HTMLElement} element\n * @param {EventListener} listener\n */\nexport function addChangeListener(element: HTMLElement, listener: EventListener) {\n element.addEventListener('changed', listener);\n element.addEventListener('paste', listener);\n element.addEventListener('input', listener);\n}\n\nexport function isElementInEventPath(element: HTMLElement, event: Event): boolean {\n if (!event || !element) {\n return false;\n }\n\n return getEventPath(event).indexOf(element) >= 0;\n}\n\nexport function createEventPath(event: Event): EventTarget[] {\n const res: EventTarget[] = [];\n let pointer: any = event.target;\n\n while (pointer) {\n res.push(pointer);\n pointer = pointer.parentElement;\n }\n\n return res;\n}\n\n/**\n * firefox doesn't have event.path set, or any alternative to it, so we hack\n * it in. this is needed as it's to late to work out the path when the item is\n * removed from the dom. used by MouseEventService, where it works out if a click\n * was from the current grid, or a detail grid (master / detail).\n * @param {Event} event\n */\nexport function addAgGridEventPath(event: Event): void {\n (event as any).__agGridEventPath = getEventPath(event);\n}\n\n/**\n * Gets the path for an Event.\n * https://stackoverflow.com/questions/39245488/event-path-undefined-with-firefox-and-vue-js\n * https://developer.mozilla.org/en-US/docs/Web/API/Event\n * @param {Event} event\n * @returns {EventTarget[]}\n */\nexport function getEventPath(event: Event): EventTarget[] {\n const eventNoType = event as any;\n\n if (eventNoType.path) {\n // Chrome supports path\n return eventNoType.path;\n }\n\n if (eventNoType.composedPath) {\n // Firefox supports composePath\n return eventNoType.composedPath();\n }\n\n if (eventNoType.__agGridEventPath) {\n // Firefox supports composePath\n return eventNoType.__agGridEventPath;\n }\n\n // and finally, if none of the above worked,\n // we create the path ourselves\n return createEventPath(event);\n}\n\nexport function addSafePassiveEventListener(\n frameworkOverrides: IFrameworkOverrides,\n eElement: HTMLElement,\n event: string, listener: (event?: any) => void\n) {\n const isPassive = includes(PASSIVE_EVENTS, event);\n const options = isPassive ? {passive: true} : undefined;\n\n // this check is here for certain scenarios where I believe the user must be destroying\n // the grid somehow but continuing for it to be used\n if (frameworkOverrides && frameworkOverrides.addEventListener) {\n frameworkOverrides.addEventListener(eElement, event, listener, options);\n }\n}\n","import { IEventEmitter } from \"../interfaces/iEventEmitter\";\nimport { EventService } from \"../eventService\";\nimport { GridOptionsWrapper } from \"../gridOptionsWrapper\";\nimport { AgEvent } from \"../events\";\nimport { Autowired, Context, PreDestroy } from \"./context\";\nimport { IFrameworkOverrides } from \"../interfaces/iFrameworkOverrides\";\nimport { Component } from \"../widgets/component\";\nimport { addSafePassiveEventListener } from \"../utils/event\";\n\nexport class BeanStub implements IEventEmitter {\n\n public static EVENT_DESTROYED = 'destroyed';\n\n protected localEventService: EventService;\n\n private destroyFunctions: (() => void)[] = [];\n private destroyed = false;\n\n // for vue 3 - prevents Vue from trying to make this (and obviously any sub classes) from being reactive\n // prevents vue from creating proxies for created objects and prevents identity related issues\n public __v_skip = true;\n\n @Autowired('frameworkOverrides') private readonly frameworkOverrides: IFrameworkOverrides;\n @Autowired('context') protected readonly context: Context;\n @Autowired('eventService') protected readonly eventService: EventService;\n @Autowired('gridOptionsWrapper') protected readonly gridOptionsWrapper: GridOptionsWrapper;\n\n // this was a test constructor niall built, when active, it prints after 5 seconds all beans/components that are\n // not destroyed. to use, create a new grid, then api.destroy() before 5 seconds. then anything that gets printed\n // points to a bean or component that was not properly disposed of.\n // constructor() {\n // setTimeout(()=> {\n // if (this.isAlive()) {\n // let prototype: any = Object.getPrototypeOf(this);\n // const constructor: any = prototype.constructor;\n // const constructorString = constructor.toString();\n // const beanName = constructorString.substring(9, constructorString.indexOf(\"(\"));\n // console.log('is alive ' + beanName);\n // }\n // }, 5000);\n // }\n\n // CellComp and GridComp and override this because they get the FrameworkOverrides from the Beans bean\n protected getFrameworkOverrides(): IFrameworkOverrides {\n return this.frameworkOverrides;\n }\n\n public getContext(): Context {\n return this.context;\n }\n\n @PreDestroy\n protected destroy(): void {\n\n // let prototype: any = Object.getPrototypeOf(this);\n // const constructor: any = prototype.constructor;\n // const constructorString = constructor.toString();\n // const beanName = constructorString.substring(9, constructorString.indexOf(\"(\"));\n\n this.destroyFunctions.forEach(func => func());\n this.destroyFunctions.length = 0;\n this.destroyed = true;\n\n this.dispatchEvent({ type: BeanStub.EVENT_DESTROYED });\n }\n\n public addEventListener(eventType: string, listener: Function): void {\n if (!this.localEventService) {\n this.localEventService = new EventService();\n }\n\n this.localEventService.addEventListener(eventType, listener);\n }\n\n public removeEventListener(eventType: string, listener: Function): void {\n if (this.localEventService) {\n this.localEventService.removeEventListener(eventType, listener);\n }\n }\n\n public dispatchEventAsync(event: AgEvent): void {\n window.setTimeout(() => this.dispatchEvent(event), 0);\n }\n\n public dispatchEvent(event: T): void {\n if (this.localEventService) {\n this.localEventService.dispatchEvent(event);\n }\n }\n\n public addManagedListener(\n object: Window | HTMLElement | GridOptionsWrapper | IEventEmitter,\n event: string,\n listener: (event?: any) => void\n ): (() => null) | undefined {\n if (this.destroyed) {\n return;\n }\n\n if (object instanceof HTMLElement) {\n addSafePassiveEventListener(this.getFrameworkOverrides(), object, event, listener);\n } else {\n object.addEventListener(event, listener);\n }\n\n const destroyFunc: () => null = () => {\n object.removeEventListener(event, listener);\n\n this.destroyFunctions = this.destroyFunctions.filter(fn => fn !== destroyFunc);\n\n return null;\n };\n\n this.destroyFunctions.push(destroyFunc);\n\n return destroyFunc;\n }\n\n public isAlive = (): boolean => !this.destroyed;\n\n public addDestroyFunc(func: () => void): void {\n // if we are already destroyed, we execute the func now\n if (this.isAlive()) {\n this.destroyFunctions.push(func);\n } else {\n func();\n }\n }\n\n public createManagedBean(bean: T, context?: Context): T {\n const res = this.createBean(bean, context);\n this.addDestroyFunc(this.destroyBean.bind(this, bean, context));\n return res;\n }\n\n protected createBean(bean: T, context?: Context | null, afterPreCreateCallback?: (comp: Component) => void): T {\n return (context || this.getContext()).createBean(bean, afterPreCreateCallback);\n }\n\n protected destroyBean(bean: T, context?: Context): T | undefined {\n return (context || this.getContext()).destroyBean(bean);\n }\n\n protected destroyBeans(beans: T[], context?: Context): T[] {\n if (beans) {\n beans.forEach(bean => this.destroyBean(bean, context));\n }\n\n return [];\n }\n}\n","import { Logger, LoggerFactory } from '../logger';\nimport { ColumnUtils } from './columnUtils';\nimport { AbstractColDef, ColDef, ColGroupDef } from \"../entities/colDef\";\nimport { ColumnKeyCreator } from \"./columnKeyCreator\";\nimport { IProvidedColumn } from \"../entities/iProvidedColumn\";\nimport { ProvidedColumnGroup } from \"../entities/providedColumnGroup\";\nimport { Column } from \"../entities/column\";\nimport { Autowired, Bean, Qualifier } from \"../context/context\";\nimport { DefaultColumnTypes } from \"../entities/defaultColumnTypes\";\nimport { BeanStub } from \"../context/beanStub\";\nimport { Constants } from \"../constants/constants\";\nimport { iterateObject, mergeDeep } from '../utils/object';\nimport { attrToNumber, attrToBoolean } from '../utils/generic';\nimport { removeFromArray } from '../utils/array';\n\n// takes ColDefs and ColGroupDefs and turns them into Columns and OriginalGroups\n@Bean('columnFactory')\nexport class ColumnFactory extends BeanStub {\n\n @Autowired('columnUtils') private columnUtils: ColumnUtils;\n\n private logger: Logger;\n\n private setBeans(@Qualifier('loggerFactory') loggerFactory: LoggerFactory) {\n this.logger = loggerFactory.create('ColumnFactory');\n }\n\n public createColumnTree(defs: (ColDef | ColGroupDef)[] | null, primaryColumns: boolean, existingTree?: IProvidedColumn[])\n : { columnTree: IProvidedColumn[], treeDept: number; } {\n\n // column key creator dishes out unique column id's in a deterministic way,\n // so if we have two grids (that could be master/slave) with same column definitions,\n // then this ensures the two grids use identical id's.\n const columnKeyCreator = new ColumnKeyCreator();\n\n const {existingCols, existingGroups, existingColKeys} = this.extractExistingTreeData(existingTree);\n columnKeyCreator.addExistingKeys(existingColKeys);\n\n // create am unbalanced tree that maps the provided definitions\n const unbalancedTree = this.recursivelyCreateColumns(defs, 0, primaryColumns,\n existingCols, columnKeyCreator, existingGroups);\n const treeDept = this.findMaxDept(unbalancedTree, 0);\n this.logger.log('Number of levels for grouped columns is ' + treeDept);\n const columnTree = this.balanceColumnTree(unbalancedTree, 0, treeDept, columnKeyCreator);\n\n const deptFirstCallback = (child: IProvidedColumn, parent: ProvidedColumnGroup) => {\n if (child instanceof ProvidedColumnGroup) {\n child.setupExpandable();\n }\n // we set the original parents at the end, rather than when we go along, as balancing the tree\n // adds extra levels into the tree. so we can only set parents when balancing is done.\n child.setOriginalParent(parent);\n };\n\n this.columnUtils.depthFirstOriginalTreeSearch(null, columnTree, deptFirstCallback);\n\n return {\n columnTree,\n treeDept\n };\n }\n\n private extractExistingTreeData(existingTree?: IProvidedColumn[]):\n {\n existingCols: Column[],\n existingGroups: ProvidedColumnGroup[],\n existingColKeys: string[]\n } {\n\n const existingCols: Column[] = [];\n const existingGroups: ProvidedColumnGroup[] = [];\n const existingColKeys: string[] = [];\n\n if (existingTree) {\n this.columnUtils.depthFirstOriginalTreeSearch(null, existingTree, (item: IProvidedColumn) => {\n if (item instanceof ProvidedColumnGroup) {\n const group = item;\n existingGroups.push(group);\n } else {\n const col = item as Column;\n existingColKeys.push(col.getId());\n existingCols.push(col);\n }\n });\n }\n\n return {existingCols, existingGroups, existingColKeys};\n }\n\n public createForAutoGroups(autoGroupCols: Column[], gridBalancedTree: IProvidedColumn[]): IProvidedColumn[] {\n return autoGroupCols.map((col) => this.createAutoGroupTreeItem(gridBalancedTree, col));\n }\n\n private createAutoGroupTreeItem(balancedColumnTree: IProvidedColumn[], column: Column): IProvidedColumn {\n const dept = this.findDepth(balancedColumnTree);\n\n // at the end, this will be the top of the tree item.\n let nextChild: IProvidedColumn = column;\n\n for (let i = dept - 1; i >= 0; i--) {\n const autoGroup = new ProvidedColumnGroup(\n null,\n `FAKE_PATH_${column.getId()}}_${i}`,\n true,\n i\n );\n this.context.createBean(autoGroup);\n autoGroup.setChildren([nextChild]);\n nextChild.setOriginalParent(autoGroup);\n nextChild = autoGroup;\n }\n\n // at this point, the nextChild is the top most item in the tree\n return nextChild;\n }\n\n private findDepth(balancedColumnTree: IProvidedColumn[]): number {\n let dept = 0;\n let pointer = balancedColumnTree;\n\n while (pointer && pointer[0] && pointer[0] instanceof ProvidedColumnGroup) {\n dept++;\n pointer = (pointer[0] as ProvidedColumnGroup).getChildren();\n }\n return dept;\n }\n\n private balanceColumnTree(\n unbalancedTree: IProvidedColumn[],\n currentDept: number,\n columnDept: number,\n columnKeyCreator: ColumnKeyCreator\n ): IProvidedColumn[] {\n\n const result: IProvidedColumn[] = [];\n\n // go through each child, for groups, recurse a level deeper,\n // for columns we need to pad\n for (let i = 0; i < unbalancedTree.length; i++) {\n const child = unbalancedTree[i];\n if (child instanceof ProvidedColumnGroup) {\n // child is a group, all we do is go to the next level of recursion\n const originalGroup = child;\n const newChildren = this.balanceColumnTree(originalGroup.getChildren(),\n currentDept + 1, columnDept, columnKeyCreator);\n originalGroup.setChildren(newChildren);\n result.push(originalGroup);\n } else {\n // child is a column - so here we add in the padded column groups if needed\n let firstPaddedGroup: ProvidedColumnGroup | undefined;\n let currentPaddedGroup: ProvidedColumnGroup | undefined;\n\n // this for loop will NOT run any loops if no padded column groups are needed\n for (let j = columnDept - 1; j >= currentDept; j--) {\n const newColId = columnKeyCreator.getUniqueKey(null, null);\n const colGroupDefMerged = this.createMergedColGroupDef(null);\n\n const paddedGroup = new ProvidedColumnGroup(colGroupDefMerged, newColId, true, currentDept);\n this.context.createBean(paddedGroup);\n\n if (currentPaddedGroup) {\n currentPaddedGroup.setChildren([paddedGroup]);\n }\n\n currentPaddedGroup = paddedGroup;\n\n if (!firstPaddedGroup) {\n firstPaddedGroup = currentPaddedGroup;\n }\n }\n\n // likewise this if statement will not run if no padded groups\n if (firstPaddedGroup && currentPaddedGroup) {\n result.push(firstPaddedGroup);\n const hasGroups = unbalancedTree.some(leaf => leaf instanceof ProvidedColumnGroup);\n\n if (hasGroups) {\n currentPaddedGroup.setChildren([child]);\n continue;\n } else {\n currentPaddedGroup.setChildren(unbalancedTree);\n break;\n }\n }\n\n result.push(child);\n }\n }\n\n return result;\n }\n\n private findMaxDept(treeChildren: IProvidedColumn[], dept: number): number {\n let maxDeptThisLevel = dept;\n\n for (let i = 0; i < treeChildren.length; i++) {\n const abstractColumn = treeChildren[i];\n if (abstractColumn instanceof ProvidedColumnGroup) {\n const originalGroup = abstractColumn;\n const newDept = this.findMaxDept(originalGroup.getChildren(), dept + 1);\n if (maxDeptThisLevel < newDept) {\n maxDeptThisLevel = newDept;\n }\n }\n }\n\n return maxDeptThisLevel;\n }\n\n private recursivelyCreateColumns(\n defs: (ColDef | ColGroupDef)[] | null,\n level: number,\n primaryColumns: boolean,\n existingColsCopy: Column[],\n columnKeyCreator: ColumnKeyCreator,\n existingGroups: ProvidedColumnGroup[]\n ): IProvidedColumn[] {\n return (defs || []).map((def) => {\n if (this.isColumnGroup(def)) {\n return this.createColumnGroup(primaryColumns, def as ColGroupDef, level, existingColsCopy,\n columnKeyCreator, existingGroups);\n } else {\n return this.createColumn(primaryColumns, def as ColDef, existingColsCopy, columnKeyCreator);\n }\n });\n }\n\n private createColumnGroup(\n primaryColumns: boolean,\n colGroupDef: ColGroupDef,\n level: number,\n existingColumns: Column[],\n columnKeyCreator: ColumnKeyCreator,\n existingGroups: ProvidedColumnGroup[]\n ): ProvidedColumnGroup {\n const colGroupDefMerged = this.createMergedColGroupDef(colGroupDef);\n const groupId = columnKeyCreator.getUniqueKey(colGroupDefMerged.groupId || null, null);\n const providedGroup = new ProvidedColumnGroup(colGroupDefMerged, groupId, false, level);\n\n this.context.createBean(providedGroup);\n\n const existingGroup = this.findExistingGroup(colGroupDef, existingGroups);\n // make sure we remove, so if user provided duplicate id, then we don't have more than\n // one column instance for colDef with common id\n if (existingGroup) {\n removeFromArray(existingGroups, existingGroup);\n }\n\n if (existingGroup && existingGroup.isExpanded()) {\n providedGroup.setExpanded(true);\n }\n\n const children = this.recursivelyCreateColumns(colGroupDefMerged.children,\n level + 1, primaryColumns, existingColumns, columnKeyCreator, existingGroups);\n\n providedGroup.setChildren(children);\n\n return providedGroup;\n }\n\n private createMergedColGroupDef(colGroupDef: ColGroupDef | null): ColGroupDef {\n const colGroupDefMerged: ColGroupDef = {} as ColGroupDef;\n Object.assign(colGroupDefMerged, this.gridOptionsWrapper.getDefaultColGroupDef());\n Object.assign(colGroupDefMerged, colGroupDef);\n this.checkForDeprecatedItems(colGroupDefMerged);\n\n return colGroupDefMerged;\n }\n\n private createColumn(\n primaryColumns: boolean,\n colDef: ColDef,\n existingColsCopy: Column[] | null,\n columnKeyCreator: ColumnKeyCreator\n ): Column {\n const colDefMerged = this.mergeColDefs(colDef);\n\n this.checkForDeprecatedItems(colDefMerged);\n\n // see if column already exists\n let column = this.findExistingColumn(colDef, existingColsCopy);\n\n // make sure we remove, so if user provided duplicate id, then we don't have more than\n // one column instance for colDef with common id\n if (existingColsCopy && column) {\n removeFromArray(existingColsCopy, column);\n }\n\n if (!column) {\n // no existing column, need to create one\n const colId = columnKeyCreator.getUniqueKey(colDefMerged.colId, colDefMerged.field);\n column = new Column(colDefMerged, colDef, colId, primaryColumns);\n this.context.createBean(column);\n } else {\n column.setColDef(colDefMerged, colDef);\n this.applyColumnState(column, colDefMerged);\n }\n\n return column;\n }\n\n public applyColumnState(column: Column, colDef: ColDef): void {\n // flex\n const flex = attrToNumber(colDef.flex);\n if (flex !== undefined) {\n column.setFlex(flex);\n }\n\n // width - we only set width if column is not flexing\n const noFlexThisCol = column.getFlex() <= 0;\n if (noFlexThisCol) {\n // both null and undefined means we skip, as it's not possible to 'clear' width (a column must have a width)\n const width = attrToNumber(colDef.width);\n if (width != null) {\n column.setActualWidth(width);\n } else {\n // otherwise set the width again, in case min or max width has changed,\n // and width needs to be adjusted.\n const widthBeforeUpdate = column.getActualWidth();\n column.setActualWidth(widthBeforeUpdate);\n }\n }\n\n // sort - anything but undefined will set sort, thus null or empty string will clear the sort\n if (colDef.sort !== undefined) {\n if (colDef.sort == Constants.SORT_ASC || colDef.sort == Constants.SORT_DESC) {\n column.setSort(colDef.sort);\n } else {\n column.setSort(undefined);\n }\n }\n\n // sorted at - anything but undefined, thus null will clear the sortIndex\n const sortIndex = attrToNumber(colDef.sortIndex);\n if (sortIndex !== undefined) {\n column.setSortIndex(sortIndex);\n }\n\n // hide - anything but undefined, thus null will clear the hide\n const hide = attrToBoolean(colDef.hide);\n if (hide !== undefined) {\n column.setVisible(!hide);\n }\n\n // pinned - anything but undefined, thus null or empty string will remove pinned\n if (colDef.pinned !== undefined) {\n column.setPinned(colDef.pinned);\n }\n }\n\n private findExistingColumn(newColDef: ColDef, existingColsCopy: Column[] | null): Column | undefined {\n return (existingColsCopy || []).find(existingCol => {\n\n const existingColDef = existingCol.getUserProvidedColDef();\n if (!existingColDef) { return false; }\n\n const newHasId = newColDef.colId != null;\n const newHasField = newColDef.field != null;\n\n if (newHasId) {\n return existingCol.getId() === newColDef.colId;\n }\n\n if (newHasField) {\n return existingColDef.field === newColDef.field;\n }\n\n // if no id or field present, then try object equivalence.\n if (existingColDef === newColDef) { return true; }\n\n return false;\n });\n }\n\n private findExistingGroup(newGroupDef: ColGroupDef, existingGroups: ProvidedColumnGroup[]): ProvidedColumnGroup | undefined {\n return existingGroups.find(existingGroup => {\n\n const existingDef = existingGroup.getColGroupDef();\n if (!existingDef) { return false; }\n\n const newHasId = newGroupDef.groupId != null;\n\n if (newHasId) {\n return existingGroup.getId() === newGroupDef.groupId;\n }\n\n return false;\n });\n }\n\n public mergeColDefs(colDef: ColDef): ColDef {\n // start with empty merged definition\n const colDefMerged: ColDef = {} as ColDef;\n\n // merge properties from default column definitions\n const defaultColDef = this.gridOptionsWrapper.getDefaultColDef();\n mergeDeep(colDefMerged, defaultColDef, false, true);\n\n // merge properties from column type properties\n let columnType = colDef.type;\n\n if (!columnType) {\n columnType = defaultColDef && defaultColDef.type;\n }\n\n // if type of both colDef and defaultColDef, then colDef gets preference\n if (columnType) {\n this.assignColumnTypes(columnType, colDefMerged);\n }\n\n // merge properties from column definitions\n mergeDeep(colDefMerged, colDef, false, true);\n\n return colDefMerged;\n }\n\n private assignColumnTypes(type: string | string[], colDefMerged: ColDef) {\n let typeKeys: string[] = [];\n\n if (type instanceof Array) {\n const invalidArray = type.some(a => typeof a !== 'string');\n if (invalidArray) {\n console.warn(\"AG Grid: if colDef.type is supplied an array it should be of type 'string[]'\");\n } else {\n typeKeys = type;\n }\n } else if (typeof type === 'string') {\n typeKeys = type.split(',');\n } else {\n console.warn(\"AG Grid: colDef.type should be of type 'string' | 'string[]'\");\n return;\n }\n\n // merge user defined with default column types\n const allColumnTypes = Object.assign({}, DefaultColumnTypes);\n const userTypes = this.gridOptionsWrapper.getColumnTypes() || {};\n\n iterateObject(userTypes, (key, value) => {\n if (key in allColumnTypes) {\n console.warn(`AG Grid: the column type '${key}' is a default column type and cannot be overridden.`);\n } else {\n allColumnTypes[key] = value;\n }\n });\n\n typeKeys.forEach((t) => {\n const typeColDef = allColumnTypes[t.trim()];\n if (typeColDef) {\n mergeDeep(colDefMerged, typeColDef, false, true);\n } else {\n console.warn(\"AG Grid: colDef.type '\" + t + \"' does not correspond to defined gridOptions.columnTypes\");\n }\n });\n }\n\n private checkForDeprecatedItems(colDef: AbstractColDef) {\n if (colDef) {\n const colDefNoType = colDef as any; // take out the type, so we can access attributes not defined in the type\n if (colDefNoType.group !== undefined) {\n console.warn('AG Grid: colDef.group is invalid, please check documentation on how to do grouping as it changed in version 3');\n }\n if (colDefNoType.headerGroup !== undefined) {\n console.warn('AG Grid: colDef.headerGroup is invalid, please check documentation on how to do grouping as it changed in version 3');\n }\n if (colDefNoType.headerGroupShow !== undefined) {\n console.warn('AG Grid: colDef.headerGroupShow is invalid, should be columnGroupShow, please check documentation on how to do grouping as it changed in version 3');\n }\n\n if (colDefNoType.suppressRowGroup !== undefined) {\n console.warn('AG Grid: colDef.suppressRowGroup is deprecated, please use colDef.type instead');\n }\n if (colDefNoType.suppressAggregation !== undefined) {\n console.warn('AG Grid: colDef.suppressAggregation is deprecated, please use colDef.type instead');\n }\n\n if (colDefNoType.suppressRowGroup || colDefNoType.suppressAggregation) {\n console.warn('AG Grid: colDef.suppressAggregation and colDef.suppressRowGroup are deprecated, use allowRowGroup, allowPivot and allowValue instead');\n }\n\n if (colDefNoType.displayName) {\n console.warn(\"AG Grid: Found displayName \" + colDefNoType.displayName + \", please use headerName instead, displayName is deprecated.\");\n colDefNoType.headerName = colDefNoType.displayName;\n }\n }\n }\n\n // if object has children, we assume it's a group\n private isColumnGroup(abstractColDef: ColDef | ColGroupDef): boolean {\n return (abstractColDef as ColGroupDef).children !== undefined;\n }\n}\n","export class Events {\n\n /** Everything has changed with the columns. Either complete new set of columns set, or user called setState() */\n /** @deprecated - grid no longer uses this, and setSate() also fires individual events */\n public static EVENT_COLUMN_EVERYTHING_CHANGED = 'columnEverythingChanged';\n\n /** User has set in new columns. */\n public static EVENT_NEW_COLUMNS_LOADED = 'newColumnsLoaded';\n\n /** The pivot mode flag was changed */\n public static EVENT_COLUMN_PIVOT_MODE_CHANGED = 'columnPivotModeChanged';\n\n /** A row group column was added, removed or order changed. */\n public static EVENT_COLUMN_ROW_GROUP_CHANGED = 'columnRowGroupChanged';\n\n /** expandAll / collapseAll was called from the api. */\n public static EVENT_EXPAND_COLLAPSE_ALL = 'expandOrCollapseAll';\n\n /** A pivot column was added, removed or order changed. */\n public static EVENT_COLUMN_PIVOT_CHANGED = 'columnPivotChanged';\n\n /** The list of grid columns has changed. */\n public static EVENT_GRID_COLUMNS_CHANGED = 'gridColumnsChanged';\n\n /** A value column was added, removed or agg function was changed. */\n public static EVENT_COLUMN_VALUE_CHANGED = 'columnValueChanged';\n\n /** A column was moved */\n public static EVENT_COLUMN_MOVED = 'columnMoved';\n\n /** One or more columns was shown / hidden */\n public static EVENT_COLUMN_VISIBLE = 'columnVisible';\n\n /** One or more columns was pinned / unpinned*/\n public static EVENT_COLUMN_PINNED = 'columnPinned';\n\n /** A column group was opened / closed */\n public static EVENT_COLUMN_GROUP_OPENED = 'columnGroupOpened';\n\n /** One or more columns was resized. If just one, the column in the event is set. */\n public static EVENT_COLUMN_RESIZED = 'columnResized';\n\n /** The list of displayed columns has changed, can result from columns open / close, column move, pivot, group, etc */\n public static EVENT_DISPLAYED_COLUMNS_CHANGED = 'displayedColumnsChanged';\n\n /** The list of virtual columns has changed, results from viewport changing */\n public static EVENT_VIRTUAL_COLUMNS_CHANGED = 'virtualColumnsChanged';\n\n /** Async Transactions Executed */\n public static EVENT_ASYNC_TRANSACTIONS_FLUSHED = 'asyncTransactionsFlushed';\n\n /** A row group was opened / closed */\n public static EVENT_ROW_GROUP_OPENED = 'rowGroupOpened';\n\n /** The client has set new data into the grid */\n public static EVENT_ROW_DATA_CHANGED = 'rowDataChanged';\n\n /** The client has updated data for the grid */\n public static EVENT_ROW_DATA_UPDATED = 'rowDataUpdated';\n\n /** The client has set new floating data into the grid */\n public static EVENT_PINNED_ROW_DATA_CHANGED = 'pinnedRowDataChanged';\n\n /** Range selection has changed */\n public static EVENT_RANGE_SELECTION_CHANGED = 'rangeSelectionChanged';\n\n /** Chart was created */\n public static EVENT_CHART_CREATED = 'chartCreated';\n\n /** Chart Range selection has changed */\n public static EVENT_CHART_RANGE_SELECTION_CHANGED = 'chartRangeSelectionChanged';\n\n /** Chart Options have changed */\n public static EVENT_CHART_OPTIONS_CHANGED = 'chartOptionsChanged';\n\n /** Chart was destroyed */\n public static EVENT_CHART_DESTROYED = 'chartDestroyed';\n\n /** For when the tool panel is shown / hidden */\n public static EVENT_TOOL_PANEL_VISIBLE_CHANGED = 'toolPanelVisibleChanged';\n\n public static EVENT_COLUMN_PANEL_ITEM_DRAG_START = 'columnPanelItemDragStart';\n public static EVENT_COLUMN_PANEL_ITEM_DRAG_END = 'columnPanelItemDragEnd';\n\n /** Model was updated - grid updates the drawn rows when this happens */\n public static EVENT_MODEL_UPDATED = 'modelUpdated';\n\n public static EVENT_PASTE_START = 'pasteStart';\n public static EVENT_PASTE_END = 'pasteEnd';\n\n public static EVENT_FILL_START = 'fillStart';\n public static EVENT_FILL_END = 'fillEnd';\n\n public static EVENT_CELL_CLICKED = 'cellClicked';\n public static EVENT_CELL_DOUBLE_CLICKED = 'cellDoubleClicked';\n public static EVENT_CELL_MOUSE_DOWN = 'cellMouseDown';\n public static EVENT_CELL_CONTEXT_MENU = 'cellContextMenu';\n public static EVENT_CELL_VALUE_CHANGED = 'cellValueChanged';\n public static EVENT_CELL_EDIT_REQUEST = 'cellEditRequest';\n public static EVENT_ROW_VALUE_CHANGED = 'rowValueChanged';\n public static EVENT_CELL_FOCUSED = 'cellFocused';\n public static EVENT_FULL_WIDTH_ROW_FOCUSED = 'fullWidthRowFocused';\n public static EVENT_ROW_SELECTED = 'rowSelected';\n public static EVENT_SELECTION_CHANGED = 'selectionChanged';\n\n public static EVENT_CELL_KEY_DOWN = 'cellKeyDown';\n public static EVENT_CELL_KEY_PRESS = 'cellKeyPress';\n\n public static EVENT_CELL_MOUSE_OVER = 'cellMouseOver';\n public static EVENT_CELL_MOUSE_OUT = 'cellMouseOut';\n\n /** 2 events for filtering. The grid LISTENS for filterChanged and afterFilterChanged */\n public static EVENT_FILTER_CHANGED = 'filterChanged';\n\n /** Filter was change but not applied. Only useful if apply buttons are used in filters. */\n public static EVENT_FILTER_MODIFIED = 'filterModified';\n public static EVENT_FILTER_OPENED = 'filterOpened';\n\n public static EVENT_SORT_CHANGED = 'sortChanged';\n\n /** A row was removed from the dom, for any reason. Use to clean up resources (if any) used by the row. */\n public static EVENT_VIRTUAL_ROW_REMOVED = 'virtualRowRemoved';\n\n public static EVENT_ROW_CLICKED = 'rowClicked';\n public static EVENT_ROW_DOUBLE_CLICKED = 'rowDoubleClicked';\n\n /** Gets called once after the grid has finished initialising. */\n public static EVENT_GRID_READY = 'gridReady';\n /** Width of height of the main grid div has changed. Grid listens for this and does layout of grid if it's\n * changed, so always filling the space it was given. */\n public static EVENT_GRID_SIZE_CHANGED = 'gridSizeChanged';\n /** The indexes of the rows rendered has changed, eg user has scrolled to a new vertical position. */\n public static EVENT_VIEWPORT_CHANGED = 'viewportChanged';\n /* The width of the scrollbar has been calculated */\n public static EVENT_SCROLLBAR_WIDTH_CHANGED = 'scrollbarWidthChanged';\n /** Rows were rendered for the first time (ie on async data load). */\n public static EVENT_FIRST_DATA_RENDERED = 'firstDataRendered';\n /** A column drag has started, either resizing a column or moving a column. */\n public static EVENT_DRAG_STARTED = 'dragStarted';\n /** A column drag has stopped */\n public static EVENT_DRAG_STOPPED = 'dragStopped';\n\n public static EVENT_CHECKBOX_CHANGED = 'checkboxChanged';\n\n public static EVENT_ROW_EDITING_STARTED = 'rowEditingStarted';\n public static EVENT_ROW_EDITING_STOPPED = 'rowEditingStopped';\n\n public static EVENT_CELL_EDITING_STARTED = 'cellEditingStarted';\n public static EVENT_CELL_EDITING_STOPPED = 'cellEditingStopped';\n\n /** Main body of grid has scrolled, either horizontally or vertically */\n public static EVENT_BODY_SCROLL = 'bodyScroll';\n\n /** Main body of the grid has stopped scrolling, either horizontally or vertically */\n public static EVENT_BODY_SCROLL_END = 'bodyScrollEnd';\n\n public static EVENT_HEIGHT_SCALE_CHANGED = 'heightScaleChanged';\n\n /** The displayed page for pagination has changed. For example the data was filtered or sorted,\n * or the user has moved to a different page. */\n public static EVENT_PAGINATION_CHANGED = 'paginationChanged';\n\n /** Only used by React, Angular, Web Components and VueJS AG Grid components\n * (not used if doing plain JavaScript). If the grid receives changes due\n * to bound properties, this event fires after the grid has finished processing the change. */\n public static EVENT_COMPONENT_STATE_CHANGED = 'componentStateChanged';\n\n /***************************** INTERNAL EVENTS: START ******************************************* */\n\n /** Please remember to add to ComponentUtil.EXCLUDED_INTERNAL_EVENTS to not have these events exposed to framework components. */\n\n /** All items from here down are used internally by the grid, not intended for external use. */\n // not documented, either experimental, or we just don't want users using an depending on them\n public static EVENT_BODY_HEIGHT_CHANGED = 'bodyHeightChanged';\n public static EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED = 'displayedColumnsWidthChanged';\n public static EVENT_SCROLL_VISIBILITY_CHANGED = 'scrollVisibilityChanged';\n public static EVENT_COLUMN_HOVER_CHANGED = 'columnHoverChanged';\n public static EVENT_FLASH_CELLS = 'flashCells';\n public static EVENT_PAGINATION_PIXEL_OFFSET_CHANGED = 'paginationPixelOffsetChanged';\n public static EVENT_DISPLAYED_ROWS_CHANGED = 'displayedRowsChanged';\n\n public static EVENT_LEFT_PINNED_WIDTH_CHANGED = 'leftPinnedWidthChanged';\n public static EVENT_RIGHT_PINNED_WIDTH_CHANGED = 'rightPinnedWidthChanged';\n\n public static EVENT_ROW_CONTAINER_HEIGHT_CHANGED = 'rowContainerHeightChanged';\n\n public static EVENT_ROW_DRAG_ENTER = 'rowDragEnter';\n public static EVENT_ROW_DRAG_MOVE = 'rowDragMove';\n public static EVENT_ROW_DRAG_LEAVE = 'rowDragLeave';\n public static EVENT_ROW_DRAG_END = 'rowDragEnd';\n\n // primarily for charts\n public static EVENT_POPUP_TO_FRONT = 'popupToFront';\n\n // these are used for server side group and agg - only used by CS with Viewport Row Model - intention is\n // to design these better around server side functions and then release to general public when fully working with\n // all the row models.\n public static EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST = 'columnRowGroupChangeRequest';\n public static EVENT_COLUMN_PIVOT_CHANGE_REQUEST = 'columnPivotChangeRequest';\n public static EVENT_COLUMN_VALUE_CHANGE_REQUEST = 'columnValueChangeRequest';\n public static EVENT_COLUMN_AGG_FUNC_CHANGE_REQUEST = 'columnAggFuncChangeRequest';\n\n public static EVENT_KEYBOARD_FOCUS = 'keyboardFocus';\n public static EVENT_MOUSE_FOCUS = 'mouseFocus';\n\n public static EVENT_STORE_UPDATED = 'storeUpdated';\n\n /***************************** INTERNAL EVENTS: END ******************************************* */\n}\n","// class returns unique instance id's for columns.\n// eg, the following calls (in this order) will result in:\n//\n// getInstanceIdForKey('country') => 0\n// getInstanceIdForKey('country') => 1\n// getInstanceIdForKey('country') => 2\n// getInstanceIdForKey('country') => 3\n// getInstanceIdForKey('age') => 0\n// getInstanceIdForKey('age') => 1\n// getInstanceIdForKey('country') => 4\nexport class GroupInstanceIdCreator {\n\n // this map contains keys to numbers, so we remember what the last call was\n private existingIds: any = {};\n\n public getInstanceIdForKey(key: string): number {\n const lastResult = this.existingIds[key];\n let result: number;\n if (typeof lastResult !== 'number') {\n // first time this key\n result = 0;\n } else {\n result = lastResult + 1;\n }\n\n this.existingIds[key] = result;\n\n return result;\n }\n\n}","const reUnescapedHtml = /[&<>\"']/g;\n\n/**\n * HTML Escapes.\n */\nconst HTML_ESCAPES: { [id: string]: string; } = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n};\n\n/**\n * It encodes any string in UTF-8 format\n * taken from https://github.com/mathiasbynens/utf8.js\n * @param {string} s\n * @returns {string}\n */\nexport function utf8_encode(s: string | null): string {\n const stringFromCharCode = String.fromCharCode;\n\n function ucs2decode(string: string | null): number[] {\n const output: number[] = [];\n\n if (!string) { return []; }\n\n const len = string.length;\n\n let counter = 0;\n let value;\n let extra;\n\n while (counter < len) {\n value = string.charCodeAt(counter++);\n if (value >= 0xD800 && value <= 0xDBFF && counter < len) {\n // high surrogate, and there is a next character\n extra = string.charCodeAt(counter++);\n if ((extra & 0xFC00) == 0xDC00) { // low surrogate\n output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n } else {\n // unmatched surrogate; only append this code unit, in case the next\n // code unit is the high surrogate of a surrogate pair\n output.push(value);\n counter--;\n }\n } else {\n output.push(value);\n }\n }\n return output;\n }\n\n function checkScalarValue(point: number) {\n if (point >= 0xD800 && point <= 0xDFFF) {\n throw Error(\n 'Lone surrogate U+' + point.toString(16).toUpperCase() +\n ' is not a scalar value'\n );\n }\n }\n\n function createByte(point: number, shift: number) {\n return stringFromCharCode(((point >> shift) & 0x3F) | 0x80);\n }\n\n function encodeCodePoint(point: number): string {\n if ((point >= 0 && point <= 31 && point !== 10)) {\n const convertedCode = point.toString(16).toUpperCase();\n const paddedCode = convertedCode.padStart(4, '0');\n\n return `_x${paddedCode}_`;\n }\n\n if ((point & 0xFFFFFF80) == 0) { // 1-byte sequence\n return stringFromCharCode(point);\n }\n\n let symbol = '';\n\n if ((point & 0xFFFFF800) == 0) { // 2-byte sequence\n symbol = stringFromCharCode(((point >> 6) & 0x1F) | 0xC0);\n } else if ((point & 0xFFFF0000) == 0) { // 3-byte sequence\n checkScalarValue(point);\n symbol = stringFromCharCode(((point >> 12) & 0x0F) | 0xE0);\n symbol += createByte(point, 6);\n } else if ((point & 0xFFE00000) == 0) { // 4-byte sequence\n symbol = stringFromCharCode(((point >> 18) & 0x07) | 0xF0);\n symbol += createByte(point, 12);\n symbol += createByte(point, 6);\n }\n symbol += stringFromCharCode((point & 0x3F) | 0x80);\n return symbol;\n }\n\n const codePoints = ucs2decode(s);\n const length = codePoints.length;\n let index = -1;\n let codePoint;\n let byteString = '';\n\n while (++index < length) {\n codePoint = codePoints[index];\n byteString += encodeCodePoint(codePoint);\n }\n\n return byteString;\n}\n\n/**\n * Converts a camelCase string into hyphenated string\n * from https://gist.github.com/youssman/745578062609e8acac9f\n * @param {string} str\n * @return {string}\n */\nexport function camelCaseToHyphen(str: string): string | null {\n if (str === null || str === undefined) { return null; }\n\n return str.replace(/([A-Z])/g, (g) => '-' + g[0].toLowerCase());\n}\n\n/**\n * Converts a hyphenated string into camelCase string\n * from https://stackoverflow.com/questions/6660977/convert-hyphens-to-camel-case-camelcase\n * @param {string} str\n * @return {string}\n */\nexport function hyphenToCamelCase(str: string): string | null {\n if (str === null || str === undefined) {\n return null;\n }\n return str.replace(/-([a-z])/g, (g) => g[1].toUpperCase());\n}\n\nexport function capitalise(str: string): string {\n return str[0].toUpperCase() + str.substr(1).toLowerCase();\n}\n\nexport function escapeString(toEscape?: string | null): string | null {\n // we call toString() twice, in case value is an object, where user provides\n // a toString() method, and first call to toString() returns back something other\n // than a string (eg a number to render)\n return toEscape == null ? null : toEscape.toString().toString().replace(reUnescapedHtml, chr => HTML_ESCAPES[chr]);\n}\n\n/**\n * Converts a camelCase string into regular text\n * from: https://stackoverflow.com/questions/15369566/putting-space-in-camel-case-string-using-regular-expression\n * @param {string} camelCase\n * @return {string}\n */\nexport function camelCaseToHumanText(camelCase: string | undefined): string | null {\n if (!camelCase || camelCase == null) { return null; }\n\n const rex = /([A-Z])([A-Z])([a-z])|([a-z])([A-Z])/g;\n const words: string[] = camelCase.replace(rex, '$1$4 $2$3$5').replace('.', ' ').split(' ');\n\n return words.map(word => word.substring(0, 1).toUpperCase() + ((word.length > 1) ? word.substring(1, word.length) : '')).join(' ');\n}","export function convertToMap(arr: [K, V][]): Map {\n const map = new Map();\n\n arr.forEach(pair => map.set(pair[0], pair[1]));\n\n return map;\n}\n\n// handy for organising a list into a map, where each item is mapped by an attribute, eg mapping Columns by ID\nexport function mapById(arr: V[], callback: (obj: V) => string): Map {\n const map = new Map();\n\n arr.forEach(item => map.set(callback(item), item));\n\n return map;\n}\n\nexport function keys(map: Map): T[] {\n const arr: T[] = [];\n\n map.forEach((_, key) => arr.push(key));\n\n return arr;\n}","import { ColumnGroup } from '../entities/columnGroup';\nimport { Column } from '../entities/column';\nimport { AbstractColDef, ColDef, ColGroupDef, IAggFunc, HeaderValueGetterParams } from '../entities/colDef';\nimport { IHeaderColumn } from '../entities/iHeaderColumn';\nimport { ExpressionService } from '../valueService/expressionService';\nimport { ColumnFactory } from './columnFactory';\nimport { DisplayedGroupCreator } from './displayedGroupCreator';\nimport { AutoWidthCalculator } from '../rendering/autoWidthCalculator';\nimport { IProvidedColumn } from '../entities/iProvidedColumn';\nimport { ColumnUtils } from './columnUtils';\nimport { Logger, LoggerFactory } from '../logger';\nimport {\n ColumnEvent,\n ColumnEventType,\n ColumnEverythingChangedEvent,\n ColumnGroupOpenedEvent,\n ColumnMovedEvent,\n ColumnPinnedEvent,\n ColumnPivotModeChangedEvent,\n ColumnResizedEvent,\n ColumnRowGroupChangedEvent,\n ColumnValueChangedEvent,\n ColumnVisibleEvent,\n DisplayedColumnsChangedEvent,\n DisplayedColumnsWidthChangedEvent,\n Events,\n GridColumnsChangedEvent,\n NewColumnsLoadedEvent,\n VirtualColumnsChangedEvent\n} from '../events';\nimport { BeanStub } from \"../context/beanStub\";\nimport { ProvidedColumnGroup } from '../entities/providedColumnGroup';\nimport { GroupInstanceIdCreator } from './groupInstanceIdCreator';\nimport { Autowired, Bean, Optional, PostConstruct, Qualifier } from '../context/context';\nimport { IAggFuncService } from '../interfaces/iAggFuncService';\nimport { ColumnAnimationService } from '../rendering/columnAnimationService';\nimport { AutoGroupColService } from './autoGroupColService';\nimport { RowNode } from '../entities/rowNode';\nimport { ValueCache } from '../valueService/valueCache';\nimport { GridApi } from '../gridApi';\nimport { ColumnApi } from './columnApi';\nimport { Constants } from '../constants/constants';\nimport { areEqual, last, removeFromArray, moveInArray, includes, insertIntoArray, removeAllFromArray } from '../utils/array';\nimport { AnimationFrameService } from \"../misc/animationFrameService\";\nimport { SortController } from \"../sortController\";\nimport { missingOrEmpty, exists, missing, attrToBoolean, attrToNumber } from '../utils/generic';\nimport { camelCaseToHumanText } from '../utils/string';\nimport { ColumnDefFactory } from \"./columnDefFactory\";\nimport { IRowModel } from \"../interfaces/iRowModel\";\nimport { IClientSideRowModel } from \"../interfaces/iClientSideRowModel\";\nimport { convertToMap } from '../utils/map';\nimport { doOnce } from '../utils/function';\nimport { CtrlsService } from '../ctrlsService';\nimport { HeaderGroupCellCtrl } from '../headerRendering/cells/columnGroup/headerGroupCellCtrl';\n\nexport interface ColumnResizeSet {\n columns: Column[];\n ratios: number[];\n width: number;\n}\n\nexport interface ColumnStateParams {\n /** True if the column is hidden */\n hide?: boolean | null;\n /** Width of the column in pixels */\n width?: number;\n /** Column's flex if flex is set */\n flex?: number | null;\n /** Sort applied to the column */\n sort?: 'asc' | 'desc' | null;\n /** The order of the sort, if sorting by many columns */\n sortIndex?: number | null;\n /** The aggregation function applied */\n aggFunc?: string | IAggFunc | null;\n /** True if pivot active */\n pivot?: boolean | null;\n /** The order of the pivot, if pivoting by many columns */\n pivotIndex?: number | null;\n /** Set if column is pinned */\n pinned?: boolean | string | 'left' | 'right' | null;\n /** True if row group active */\n rowGroup?: boolean | null;\n /** The order of the row group, if grouping by many columns */\n rowGroupIndex?: number | null;\n}\n\nexport interface ColumnState extends ColumnStateParams {\n /** ID of the column */\n colId: string;\n}\n\nexport interface ApplyColumnStateParams {\n /** The state from `getColumnState` */\n state?: ColumnState[];\n /** Whether column order should be applied */\n applyOrder?: boolean;\n /** State to apply to columns where state is missing for those columns */\n defaultState?: ColumnStateParams;\n}\n\n@Bean('columnModel')\nexport class ColumnModel extends BeanStub {\n\n @Autowired('expressionService') private expressionService: ExpressionService;\n @Autowired('columnFactory') private columnFactory: ColumnFactory;\n @Autowired('displayedGroupCreator') private displayedGroupCreator: DisplayedGroupCreator;\n @Autowired('ctrlsService') private ctrlsService: CtrlsService;\n @Autowired('autoWidthCalculator') private autoWidthCalculator: AutoWidthCalculator;\n @Autowired('columnUtils') private columnUtils: ColumnUtils;\n @Autowired('columnAnimationService') private columnAnimationService: ColumnAnimationService;\n @Autowired('autoGroupColService') private autoGroupColService: AutoGroupColService;\n @Optional('aggFuncService') private aggFuncService: IAggFuncService;\n @Optional('valueCache') private valueCache: ValueCache;\n @Optional('animationFrameService') private animationFrameService: AnimationFrameService;\n\n @Autowired('rowModel') private rowModel: IRowModel;\n @Autowired('columnApi') private columnApi: ColumnApi;\n @Autowired('gridApi') private gridApi: GridApi;\n @Autowired('sortController') private sortController: SortController;\n @Autowired('columnDefFactory') private columnDefFactory: ColumnDefFactory;\n\n // these are the columns provided by the client. this doesn't change, even if the\n // order or state of the columns and groups change. it will only change if the client\n // provides a new set of column definitions. otherwise this tree is used to build up\n // the groups for displaying.\n private primaryColumnTree: IProvidedColumn[];\n // header row count, based on user provided columns\n private primaryHeaderRowCount = 0;\n // all columns provided by the user. basically it's the leaf level nodes of the\n // tree above (originalBalancedTree)\n private primaryColumns: Column[] | undefined; // every column available\n private primaryColumnsMap: { [id: string]: Column };\n\n // if pivoting, these are the generated columns as a result of the pivot\n private secondaryBalancedTree: IProvidedColumn[] | null;\n private secondaryColumns: Column[] | null;\n private secondaryColumnsMap: { [id: string]: Column };\n private secondaryHeaderRowCount = 0;\n // Saved when pivot is disabled, available to re-use when pivot is restored\n private previousSecondaryColumns: IProvidedColumn[] | null;\n\n // the columns the quick filter should use. this will be all primary columns\n // plus the autoGroupColumns if any exist\n private columnsForQuickFilter: Column[];\n\n // these are all columns that are available to the grid for rendering after pivot\n private gridBalancedTree: IProvidedColumn[];\n private gridColumns: Column[];\n private gridColumnsMap: { [id: string]: Column };\n\n // header row count, either above, or based on pivoting if we are pivoting\n private gridHeaderRowCount = 0;\n\n private lastPrimaryOrder: Column[];\n private lastSecondaryOrder: Column[];\n private gridColsArePrimary: boolean;\n\n // primary columns -> what the user provides\n // secondary columns -> columns generated as a result of a pivot\n // displayed columns -> columns that are 1) visible and 2) parent groups are opened. thus can be rendered\n // viewport columns -> centre columns only, what columns are to be rendered due to column virtualisation\n\n // tree of columns to be displayed for each section\n private displayedTreeLeft: IHeaderColumn[];\n private displayedTreeRight: IHeaderColumn[];\n private displayedTreeCentre: IHeaderColumn[];\n\n // leave level columns of the displayed trees\n private displayedColumnsLeft: Column[] = [];\n private displayedColumnsRight: Column[] = [];\n private displayedColumnsCenter: Column[] = [];\n // all three lists above combined\n private displayedColumns: Column[] = [];\n\n // for fast lookup, to see if a column or group is still displayed\n private displayedColumnsAndGroupsMap: { [id: string]: IHeaderColumn } = {};\n\n // all columns to be rendered\n private viewportColumns: Column[] = [];\n // all columns to be rendered in the centre\n private viewportColumnsCenter: Column[] = [];\n\n // all columns & groups to be rendered, index by row. used by header rows to get all items\n // to render for that row.\n private viewportRowLeft: { [row: number]: IHeaderColumn[]; };\n private viewportRowRight: { [row: number]: IHeaderColumn[]; };\n private viewportRowCenter: { [row: number]: IHeaderColumn[]; };\n\n // true if we are doing column spanning\n private colSpanActive: boolean;\n\n // grid columns that have colDef.autoHeight set\n private displayedAutoHeightCols: Column[];\n private autoHeightActive: boolean;\n private autoHeightActiveAtLeastOnce = false;\n\n private suppressColumnVirtualisation: boolean;\n\n private rowGroupColumns: Column[] = [];\n private valueColumns: Column[] = [];\n private pivotColumns: Column[] = [];\n\n private groupAutoColumns: Column[] | null;\n\n private groupDisplayColumns: Column[];\n\n private ready = false;\n private logger: Logger;\n\n private autoGroupsNeedBuilding = false;\n private forceRecreateAutoGroups = false;\n\n private pivotMode = false;\n private usingTreeData: boolean;\n\n // for horizontal visualisation of columns\n private scrollWidth: number;\n private scrollPosition: number;\n\n private bodyWidth = 0;\n private leftWidth = 0;\n private rightWidth = 0;\n\n private bodyWidthDirty = true;\n\n private viewportLeft: number;\n private viewportRight: number;\n private flexViewportWidth: number;\n\n private columnDefs: (ColDef | ColGroupDef)[];\n\n private colDefVersion = 0;\n\n private flexColsCalculatedAtLestOnce = false;\n\n @PostConstruct\n public init(): void {\n this.suppressColumnVirtualisation = this.gridOptionsWrapper.isSuppressColumnVirtualisation();\n\n const pivotMode = this.gridOptionsWrapper.isPivotMode();\n\n if (this.isPivotSettingAllowed(pivotMode)) {\n this.pivotMode = pivotMode;\n }\n\n this.usingTreeData = this.gridOptionsWrapper.isTreeData();\n\n this.addManagedListener(this.gridOptionsWrapper, 'autoGroupColumnDef', () => this.onAutoGroupColumnDefChanged());\n this.addManagedListener(this.gridOptionsWrapper, 'defaultColDef', () => this.onDefaultColDefChanged());\n }\n\n public onAutoGroupColumnDefChanged() {\n this.autoGroupsNeedBuilding = true;\n this.forceRecreateAutoGroups = true;\n this.updateGridColumns();\n this.updateDisplayedColumns('gridOptionsChanged');\n }\n\n public onDefaultColDefChanged(): void {\n // col def's should get revisited, even if specific column hasn't changed,\n // as the defaultColDef impacts all columns, so each column should assume it's Col Def has changed.\n this.colDefVersion++;\n // likewise for autoGroupCol, the default col def impacts this\n this.forceRecreateAutoGroups = true;\n this.createColumnsFromColumnDefs(true);\n }\n\n public getColDefVersion(): number {\n return this.colDefVersion;\n }\n\n public setColumnDefs(columnDefs: (ColDef | ColGroupDef)[], source: ColumnEventType = 'api') {\n const colsPreviouslyExisted = !!this.columnDefs;\n this.colDefVersion++;\n this.columnDefs = columnDefs;\n this.createColumnsFromColumnDefs(colsPreviouslyExisted, source);\n }\n\n private createColumnsFromColumnDefs(colsPreviouslyExisted: boolean, source: ColumnEventType = 'api'): void {\n\n // only need to raise before/after events if updating columns, never if setting columns for first time\n const raiseEventsFunc = colsPreviouslyExisted ? this.compareColumnStatesAndRaiseEvents(source) : undefined;\n\n // always invalidate cache on changing columns, as the column id's for the new columns\n // could overlap with the old id's, so the cache would return old values for new columns.\n this.valueCache.expire();\n\n // NOTE ==================\n // we should be destroying the existing columns and groups if they exist, for example, the original column\n // group adds a listener to the columns, it should be also removing the listeners\n this.autoGroupsNeedBuilding = true;\n\n const oldPrimaryColumns = this.primaryColumns;\n const oldPrimaryTree = this.primaryColumnTree;\n const balancedTreeResult = this.columnFactory.createColumnTree(this.columnDefs, true, oldPrimaryTree);\n\n this.primaryColumnTree = balancedTreeResult.columnTree;\n this.primaryHeaderRowCount = balancedTreeResult.treeDept + 1;\n\n this.primaryColumns = this.getColumnsFromTree(this.primaryColumnTree);\n this.primaryColumnsMap = {};\n this.primaryColumns.forEach(col => this.primaryColumnsMap[col.getId()] = col);\n\n this.extractRowGroupColumns(source, oldPrimaryColumns);\n this.extractPivotColumns(source, oldPrimaryColumns);\n this.extractValueColumns(source, oldPrimaryColumns);\n\n this.ready = true;\n\n // if we are showing secondary columns, then no need to update grid columns\n // at this point, as it's the pivot service responsibility to change these\n // if we are no longer pivoting (ie and need to revert back to primary, otherwise\n // we shouldn't be touching the primary).\n const gridColsNotProcessed = this.gridColsArePrimary === undefined;\n const processGridCols = this.gridColsArePrimary || gridColsNotProcessed;\n\n if (processGridCols) {\n this.updateGridColumns();\n if (colsPreviouslyExisted && !this.gridOptionsWrapper.isMaintainColumnOrder()) {\n this.orderGridColumnsLikePrimary();\n }\n this.updateDisplayedColumns(source);\n this.checkViewportColumns();\n }\n\n // this event is not used by AG Grid, but left here for backwards compatibility,\n // in case applications use it\n this.dispatchEverythingChanged(source);\n\n raiseEventsFunc && raiseEventsFunc();\n\n this.dispatchNewColumnsLoaded();\n }\n\n private dispatchNewColumnsLoaded(): void {\n const newColumnsLoadedEvent: NewColumnsLoadedEvent = {\n type: Events.EVENT_NEW_COLUMNS_LOADED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n\n this.eventService.dispatchEvent(newColumnsLoadedEvent);\n }\n\n // this event is legacy, no grid code listens to it. instead the grid listens to New Columns Loaded\n private dispatchEverythingChanged(source: ColumnEventType = 'api'): void {\n const eventEverythingChanged: ColumnEverythingChangedEvent = {\n type: Events.EVENT_COLUMN_EVERYTHING_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi,\n source\n };\n this.eventService.dispatchEvent(eventEverythingChanged);\n }\n\n private orderGridColumnsLikePrimary(): void {\n const primaryColumns = this.primaryColumns;\n\n if (!primaryColumns) { return; }\n\n this.gridColumns.sort((colA: Column, colB: Column) => {\n const primaryIndexA = primaryColumns.indexOf(colA);\n const primaryIndexB = primaryColumns.indexOf(colB);\n // if both cols are present in primary, then we just return the position,\n // so position is maintained.\n const indexAPresent = primaryIndexA >= 0;\n const indexBPresent = primaryIndexB >= 0;\n\n if (indexAPresent && indexBPresent) {\n return primaryIndexA - primaryIndexB;\n }\n\n if (indexAPresent) {\n // B is auto group column, so put B first\n return 1;\n }\n\n if (indexBPresent) {\n // A is auto group column, so put A first\n return -1;\n }\n\n // otherwise both A and B are auto-group columns. so we just keep the order\n // as they were already in.\n const gridIndexA = this.gridColumns.indexOf(colA);\n const gridIndexB = this.gridColumns.indexOf(colB);\n return gridIndexA - gridIndexB;\n });\n }\n\n public getAllDisplayedAutoHeightCols(): Column[] {\n return this.displayedAutoHeightCols;\n }\n\n private setViewport(): void {\n if (this.gridOptionsWrapper.isEnableRtl()) {\n this.viewportLeft = this.bodyWidth - this.scrollPosition - this.scrollWidth;\n this.viewportRight = this.bodyWidth - this.scrollPosition;\n } else {\n this.viewportLeft = this.scrollPosition;\n this.viewportRight = this.scrollWidth + this.scrollPosition;\n }\n }\n\n // used by clipboard service, to know what columns to paste into\n public getDisplayedColumnsStartingAt(column: Column): Column[] {\n let currentColumn: Column | null = column;\n const columns: Column[] = [];\n\n while (currentColumn != null) {\n columns.push(currentColumn);\n currentColumn = this.getDisplayedColAfter(currentColumn);\n }\n\n return columns;\n }\n\n // checks what columns are currently displayed due to column virtualisation. fires an event\n // if the list of columns has changed.\n // + setColumnWidth(), setViewportPosition(), setColumnDefs(), sizeColumnsToFit()\n private checkViewportColumns(): void {\n // check displayCenterColumnTree exists first, as it won't exist when grid is initialising\n if (this.displayedColumnsCenter == null) { return; }\n\n const hashBefore = this.viewportColumns.map(column => column.getId()).join('#');\n\n this.extractViewport();\n\n const hashAfter = this.viewportColumns.map(column => column.getId()).join('#');\n\n if (hashBefore !== hashAfter) {\n const event: VirtualColumnsChangedEvent = {\n type: Events.EVENT_VIRTUAL_COLUMNS_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n\n this.eventService.dispatchEvent(event);\n }\n }\n\n public setViewportPosition(scrollWidth: number, scrollPosition: number): void {\n if (scrollWidth !== this.scrollWidth || scrollPosition !== this.scrollPosition || this.bodyWidthDirty) {\n this.scrollWidth = scrollWidth;\n this.scrollPosition = scrollPosition;\n // we need to call setVirtualViewportLeftAndRight() at least once after the body width changes,\n // as the viewport can stay the same, but in RTL, if body width changes, we need to work out the\n // virtual columns again\n this.bodyWidthDirty = true;\n this.setViewport();\n\n if (this.ready) {\n this.checkViewportColumns();\n }\n }\n }\n\n public isPivotMode(): boolean {\n return this.pivotMode;\n }\n\n private isPivotSettingAllowed(pivot: boolean): boolean {\n if (pivot && this.gridOptionsWrapper.isTreeData()) {\n console.warn(\"AG Grid: Pivot mode not available in conjunction Tree Data i.e. 'gridOptions.treeData: true'\");\n return false;\n }\n\n return true;\n }\n\n public setPivotMode(pivotMode: boolean, source: ColumnEventType = 'api'): void {\n if (pivotMode === this.pivotMode || !this.isPivotSettingAllowed(this.pivotMode)) { return; }\n\n this.pivotMode = pivotMode;\n\n // we need to update grid columns to cover the scenario where user has groupSuppressAutoColumn=true, as\n // this means we don't use auto group column UNLESS we are in pivot mode (it's mandatory in pivot mode),\n // so need to updateGridColumn() to check it autoGroupCol needs to be added / removed\n this.autoGroupsNeedBuilding = true;\n this.updateGridColumns();\n this.updateDisplayedColumns(source);\n\n const event: ColumnPivotModeChangedEvent = {\n type: Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n\n this.eventService.dispatchEvent(event);\n }\n\n public getSecondaryPivotColumn(pivotKeys: string[], valueColKey: Column | string): Column | null {\n if (missing(this.secondaryColumns)) { return null; }\n\n const valueColumnToFind = this.getPrimaryColumn(valueColKey);\n\n let foundColumn: Column | null = null;\n\n this.secondaryColumns.forEach(column => {\n const thisPivotKeys = column.getColDef().pivotKeys;\n const pivotValueColumn = column.getColDef().pivotValueColumn;\n\n const pivotKeyMatches = areEqual(thisPivotKeys, pivotKeys);\n const pivotValueMatches = pivotValueColumn === valueColumnToFind;\n\n if (pivotKeyMatches && pivotValueMatches) {\n foundColumn = column;\n }\n });\n\n return foundColumn;\n }\n\n private setBeans(@Qualifier('loggerFactory') loggerFactory: LoggerFactory) {\n this.logger = loggerFactory.create('columnModel');\n }\n\n private setFirstRightAndLastLeftPinned(source: ColumnEventType): void {\n let lastLeft: Column | null;\n let firstRight: Column | null;\n\n if (this.gridOptionsWrapper.isEnableRtl()) {\n lastLeft = this.displayedColumnsLeft ? this.displayedColumnsLeft[0] : null;\n firstRight = this.displayedColumnsRight ? last(this.displayedColumnsRight) : null;\n } else {\n lastLeft = this.displayedColumnsLeft ? last(this.displayedColumnsLeft) : null;\n firstRight = this.displayedColumnsRight ? this.displayedColumnsRight[0] : null;\n }\n\n this.gridColumns.forEach((column: Column) => {\n column.setLastLeftPinned(column === lastLeft, source);\n column.setFirstRightPinned(column === firstRight, source);\n });\n }\n\n public autoSizeColumns(params: {\n columns: (string | Column)[];\n skipHeader?: boolean;\n skipHeaderGroups?: boolean;\n stopAtGroup?: ColumnGroup;\n source?: ColumnEventType;\n }): void {\n const { columns, skipHeader, skipHeaderGroups, stopAtGroup, source = 'api' } = params;\n // because of column virtualisation, we can only do this function on columns that are\n // actually rendered, as non-rendered columns (outside the viewport and not rendered\n // due to column virtualisation) are not present. this can result in all rendered columns\n // getting narrowed, which in turn introduces more rendered columns on the RHS which\n // did not get autosized in the original run, leaving the visible grid with columns on\n // the LHS sized, but RHS no. so we keep looping through the visible columns until\n // no more cols are available (rendered) to be resized\n\n // we autosize after animation frames finish in case any cell renderers need to complete first. this can\n // happen eg if client code is calling api.autoSizeAllColumns() straight after grid is initialised, but grid\n // hasn't fully drawn out all the cells yet (due to cell renderers in animation frames).\n this.animationFrameService.flushAllFrames();\n\n // keep track of which cols we have resized in here\n const columnsAutosized: Column[] = [];\n // initialise with anything except 0 so that while loop executes at least once\n let changesThisTimeAround = -1;\n\n const shouldSkipHeader = skipHeader != null ? skipHeader : this.gridOptionsWrapper.isSkipHeaderOnAutoSize();\n const shouldSkipHeaderGroups = skipHeaderGroups != null ? skipHeaderGroups : shouldSkipHeader;\n\n while (changesThisTimeAround !== 0) {\n changesThisTimeAround = 0;\n this.actionOnGridColumns(columns, (column: Column): boolean => {\n // if already autosized, skip it\n if (columnsAutosized.indexOf(column) >= 0) {\n return false;\n }\n // get how wide this col should be\n const preferredWidth = this.autoWidthCalculator.getPreferredWidthForColumn(column, shouldSkipHeader);\n // preferredWidth = -1 if this col is not on the screen\n if (preferredWidth > 0) {\n const newWidth = this.normaliseColumnWidth(column, preferredWidth);\n column.setActualWidth(newWidth, source);\n columnsAutosized.push(column);\n changesThisTimeAround++;\n }\n return true;\n }, source);\n }\n\n if (!shouldSkipHeaderGroups) {\n this.autoSizeColumnGroupsByColumns(columns, stopAtGroup);\n }\n\n this.fireColumnResizedEvent(columnsAutosized, true, 'autosizeColumns');\n }\n\n public fireColumnResizedEvent(columns: Column[] | null, finished: boolean, source: ColumnEventType, flexColumns: Column[] | null = null): void {\n if (columns && columns.length) {\n const event: ColumnResizedEvent = {\n type: Events.EVENT_COLUMN_RESIZED,\n columns: columns,\n column: columns.length === 1 ? columns[0] : null,\n flexColumns: flexColumns,\n finished: finished,\n api: this.gridApi,\n columnApi: this.columnApi,\n source: source\n };\n this.eventService.dispatchEvent(event);\n }\n }\n\n public autoSizeColumn(key: string | Column | null, skipHeader?: boolean, source: ColumnEventType = \"api\"): void {\n if (key) {\n this.autoSizeColumns({ columns: [key], skipHeader, skipHeaderGroups: true, source });\n }\n }\n\n private autoSizeColumnGroupsByColumns(keys: (string | Column)[], stopAtGroup?: ColumnGroup): Column[] {\n const columnGroups: Set = new Set();\n const columns = this.getGridColumns(keys);\n\n columns.forEach(col => {\n let parent: ColumnGroup = col.getParent();\n while (parent && parent != stopAtGroup) {\n if (!parent.isPadding()) {\n columnGroups.add(parent);\n }\n parent = parent.getParent();\n }\n });\n\n let headerGroupCtrl: HeaderGroupCellCtrl | undefined;\n\n const resizedColumns: Column[] = [];\n\n for (const columnGroup of columnGroups) {\n for (const headerContainerCtrl of this.ctrlsService.getHeaderRowContainerCtrls()) {\n headerGroupCtrl = headerContainerCtrl.getHeaderCtrlForColumn(columnGroup);\n if (headerGroupCtrl) { break; }\n }\n if (headerGroupCtrl) {\n headerGroupCtrl.resizeLeafColumnsToFit();\n }\n }\n\n return resizedColumns;\n }\n\n public autoSizeAllColumns(skipHeader?: boolean, source: ColumnEventType = \"api\"): void {\n const allDisplayedColumns = this.getAllDisplayedColumns();\n this.autoSizeColumns({ columns: allDisplayedColumns, skipHeader, source });\n }\n\n // Possible candidate for reuse (alot of recursive traversal duplication)\n private getColumnsFromTree(rootColumns: IProvidedColumn[]): Column[] {\n const result: Column[] = [];\n\n const recursiveFindColumns = (childColumns: IProvidedColumn[]): void => {\n for (let i = 0; i < childColumns.length; i++) {\n const child = childColumns[i];\n if (child instanceof Column) {\n result.push(child);\n } else if (child instanceof ProvidedColumnGroup) {\n recursiveFindColumns(child.getChildren());\n }\n }\n };\n\n recursiveFindColumns(rootColumns);\n\n return result;\n }\n\n public getAllDisplayedTrees(): IHeaderColumn[] | null {\n if (this.displayedTreeLeft && this.displayedTreeRight && this.displayedTreeCentre) {\n return this.displayedTreeLeft\n .concat(this.displayedTreeCentre)\n .concat(this.displayedTreeRight);\n }\n\n return null;\n }\n\n // + columnSelectPanel\n public getPrimaryColumnTree(): IProvidedColumn[] {\n return this.primaryColumnTree;\n }\n\n // + gridPanel -> for resizing the body and setting top margin\n public getHeaderRowCount(): number {\n return this.gridHeaderRowCount;\n }\n\n // + headerRenderer -> setting pinned body width\n public getDisplayedTreeLeft(): IHeaderColumn[] {\n return this.displayedTreeLeft;\n }\n\n // + headerRenderer -> setting pinned body width\n public getDisplayedTreeRight(): IHeaderColumn[] {\n return this.displayedTreeRight;\n }\n\n // + headerRenderer -> setting pinned body width\n public getDisplayedTreeCentre(): IHeaderColumn[] {\n return this.displayedTreeCentre;\n }\n\n // gridPanel -> ensureColumnVisible\n public isColumnDisplayed(column: Column): boolean {\n return this.getAllDisplayedColumns().indexOf(column) >= 0;\n }\n\n // + csvCreator\n public getAllDisplayedColumns(): Column[] {\n return this.displayedColumns;\n }\n\n public getViewportColumns(): Column[] {\n return this.viewportColumns;\n }\n\n public getDisplayedLeftColumnsForRow(rowNode: RowNode): Column[] {\n if (!this.colSpanActive) {\n return this.displayedColumnsLeft;\n }\n\n return this.getDisplayedColumnsForRow(rowNode, this.displayedColumnsLeft);\n }\n\n public getDisplayedRightColumnsForRow(rowNode: RowNode): Column[] {\n if (!this.colSpanActive) {\n return this.displayedColumnsRight;\n }\n\n return this.getDisplayedColumnsForRow(rowNode, this.displayedColumnsRight);\n }\n\n private getDisplayedColumnsForRow(\n rowNode: RowNode, displayedColumns: Column[],\n filterCallback?: (column: Column) => boolean,\n emptySpaceBeforeColumn?: (column: Column) => boolean\n ): Column[] {\n const result: Column[] = [];\n let lastConsideredCol: Column | null = null;\n\n for (let i = 0; i < displayedColumns.length; i++) {\n const col = displayedColumns[i];\n const maxAllowedColSpan = displayedColumns.length - i;\n const colSpan = Math.min(col.getColSpan(rowNode), maxAllowedColSpan);\n const columnsToCheckFilter: Column[] = [col];\n\n if (colSpan > 1) {\n const colsToRemove = colSpan - 1;\n\n for (let j = 1; j <= colsToRemove; j++) {\n columnsToCheckFilter.push(displayedColumns[i + j]);\n }\n\n i += colsToRemove;\n }\n\n // see which cols we should take out for column virtualisation\n let filterPasses: boolean;\n\n if (filterCallback) {\n // if user provided a callback, means some columns may not be in the viewport.\n // the user will NOT provide a callback if we are talking about pinned areas,\n // as pinned areas have no horizontal scroll and do not virtualise the columns.\n // if lots of columns, that means column spanning, and we set filterPasses = true\n // if one or more of the columns spanned pass the filter.\n filterPasses = false;\n columnsToCheckFilter.forEach(colForFilter => {\n if (filterCallback(colForFilter)) { filterPasses = true; }\n });\n } else {\n filterPasses = true;\n }\n\n if (filterPasses) {\n if (result.length === 0 && lastConsideredCol) {\n const gapBeforeColumn = emptySpaceBeforeColumn ? emptySpaceBeforeColumn(col) : false;\n if (gapBeforeColumn) {\n result.push(lastConsideredCol);\n }\n }\n result.push(col);\n }\n\n lastConsideredCol = col;\n }\n\n return result;\n }\n\n // + rowRenderer\n // if we are not column spanning, this just returns back the virtual centre columns,\n // however if we are column spanning, then different rows can have different virtual\n // columns, so we have to work out the list for each individual row.\n public getViewportCenterColumnsForRow(rowNode: RowNode): Column[] {\n if (!this.colSpanActive) {\n return this.viewportColumnsCenter;\n }\n\n const emptySpaceBeforeColumn = (col: Column) => {\n const left = col.getLeft();\n\n return exists(left) && left > this.viewportLeft;\n };\n\n // if doing column virtualisation, then we filter based on the viewport.\n const filterCallback = this.suppressColumnVirtualisation ? null : this.isColumnInViewport.bind(this);\n\n return this.getDisplayedColumnsForRow(\n rowNode,\n this.displayedColumnsCenter,\n filterCallback,\n emptySpaceBeforeColumn\n );\n }\n\n public getAriaColumnIndex(col: Column): number {\n return this.getAllGridColumns().indexOf(col) + 1;\n }\n\n private isColumnInViewport(col: Column): boolean {\n // we never filter out autoHeight columns, as we need them in the DOM for calculating Auto Height\n if (col.isAutoHeight()) { return true; }\n\n const columnLeft = col.getLeft() || 0;\n const columnRight = columnLeft + col.getActualWidth();\n\n // adding 200 for buffer size, so some cols off viewport are rendered.\n // this helps horizontal scrolling so user rarely sees white space (unless\n // they scroll horizontally fast). however we are conservative, as the more\n // buffer the slower the vertical redraw speed\n const leftBounds = this.viewportLeft - 200;\n const rightBounds = this.viewportRight + 200;\n\n const columnToMuchLeft = columnLeft < leftBounds && columnRight < leftBounds;\n const columnToMuchRight = columnLeft > rightBounds && columnRight > rightBounds;\n\n return !columnToMuchLeft && !columnToMuchRight;\n }\n\n // used by:\n // + angularGrid -> setting pinned body width\n // note: this should be cached\n public getDisplayedColumnsLeftWidth() {\n return this.getWidthOfColsInList(this.displayedColumnsLeft);\n }\n\n // note: this should be cached\n public getDisplayedColumnsRightWidth() {\n return this.getWidthOfColsInList(this.displayedColumnsRight);\n }\n\n public updatePrimaryColumnList(\n keys: (string | Column)[] | null,\n masterList: Column[],\n actionIsAdd: boolean,\n columnCallback: (column: Column) => void,\n eventType: string,\n source: ColumnEventType = \"api\"\n ) {\n\n if (!keys || missingOrEmpty(keys)) { return; }\n\n let atLeastOne = false;\n\n keys.forEach(key => {\n const columnToAdd = this.getPrimaryColumn(key);\n if (!columnToAdd) { return; }\n\n if (actionIsAdd) {\n if (masterList.indexOf(columnToAdd) >= 0) { return; }\n masterList.push(columnToAdd);\n } else {\n if (masterList.indexOf(columnToAdd) < 0) { return; }\n removeFromArray(masterList, columnToAdd);\n }\n\n columnCallback(columnToAdd);\n atLeastOne = true;\n });\n\n if (!atLeastOne) { return; }\n\n if (this.autoGroupsNeedBuilding) {\n this.updateGridColumns();\n }\n\n this.updateDisplayedColumns(source);\n\n const event: ColumnEvent = {\n type: eventType,\n columns: masterList,\n column: masterList.length === 1 ? masterList[0] : null,\n api: this.gridApi,\n columnApi: this.columnApi,\n source: source\n };\n\n this.eventService.dispatchEvent(event);\n }\n\n public setRowGroupColumns(colKeys: (string | Column)[], source: ColumnEventType = \"api\"): void {\n this.autoGroupsNeedBuilding = true;\n this.setPrimaryColumnList(colKeys, this.rowGroupColumns,\n Events.EVENT_COLUMN_ROW_GROUP_CHANGED,\n this.setRowGroupActive.bind(this),\n source);\n }\n\n private setRowGroupActive(active: boolean, column: Column, source: ColumnEventType): void {\n if (active === column.isRowGroupActive()) { return; }\n\n column.setRowGroupActive(active, source);\n\n if (!active && !this.gridOptionsWrapper.isSuppressMakeColumnVisibleAfterUnGroup()) {\n column.setVisible(true, source);\n }\n }\n\n public addRowGroupColumn(key: string | Column | null, source: ColumnEventType = \"api\"): void {\n if (key) { this.addRowGroupColumns([key], source); }\n }\n\n public addRowGroupColumns(keys: (string | Column)[], source: ColumnEventType = \"api\"): void {\n this.autoGroupsNeedBuilding = true;\n this.updatePrimaryColumnList(keys, this.rowGroupColumns, true,\n this.setRowGroupActive.bind(this, true),\n Events.EVENT_COLUMN_ROW_GROUP_CHANGED,\n source\n );\n }\n\n public removeRowGroupColumns(keys: (string | Column)[] | null, source: ColumnEventType = \"api\"): void {\n this.autoGroupsNeedBuilding = true;\n this.updatePrimaryColumnList(keys, this.rowGroupColumns, false,\n this.setRowGroupActive.bind(this, false),\n Events.EVENT_COLUMN_ROW_GROUP_CHANGED,\n source);\n }\n\n public removeRowGroupColumn(key: string | Column | null, source: ColumnEventType = \"api\"): void {\n if (key) { this.removeRowGroupColumns([key], source); }\n }\n\n public addPivotColumns(keys: (string | Column)[], source: ColumnEventType = \"api\"): void {\n this.updatePrimaryColumnList(keys, this.pivotColumns, true,\n column => column.setPivotActive(true, source),\n Events.EVENT_COLUMN_PIVOT_CHANGED, source);\n }\n\n public setPivotColumns(colKeys: (string | Column)[], source: ColumnEventType = \"api\"): void {\n this.setPrimaryColumnList(colKeys, this.pivotColumns, Events.EVENT_COLUMN_PIVOT_CHANGED,\n (added: boolean, column: Column) => {\n column.setPivotActive(added, source);\n }, source\n );\n }\n\n public addPivotColumn(key: string | Column, source: ColumnEventType = \"api\"): void {\n this.addPivotColumns([key], source);\n }\n\n public removePivotColumns(keys: (string | Column)[], source: ColumnEventType = \"api\"): void {\n this.updatePrimaryColumnList(\n keys,\n this.pivotColumns,\n false,\n column => column.setPivotActive(false, source),\n Events.EVENT_COLUMN_PIVOT_CHANGED,\n source\n );\n }\n\n public removePivotColumn(key: string | Column, source: ColumnEventType = \"api\"): void {\n this.removePivotColumns([key], source);\n }\n\n private setPrimaryColumnList(\n colKeys: (string | Column)[],\n masterList: Column[],\n eventName: string,\n columnCallback: (added: boolean, column: Column) => void,\n source: ColumnEventType\n ): void {\n\n masterList.length = 0;\n\n if (exists(colKeys)) {\n colKeys.forEach(key => {\n const column = this.getPrimaryColumn(key);\n if (column) {\n masterList.push(column);\n }\n });\n }\n\n (this.primaryColumns || []).forEach(column => {\n const added = masterList.indexOf(column) >= 0;\n columnCallback(added, column);\n });\n\n if (this.autoGroupsNeedBuilding) {\n this.updateGridColumns();\n }\n\n this.updateDisplayedColumns(source);\n\n this.fireColumnEvent(eventName, masterList, source);\n }\n\n public setValueColumns(colKeys: (string | Column)[], source: ColumnEventType = \"api\"): void {\n this.setPrimaryColumnList(colKeys, this.valueColumns,\n Events.EVENT_COLUMN_VALUE_CHANGED,\n this.setValueActive.bind(this),\n source\n );\n }\n\n private setValueActive(active: boolean, column: Column, source: ColumnEventType): void {\n if (active === column.isValueActive()) { return; }\n\n column.setValueActive(active, source);\n\n if (active && !column.getAggFunc()) {\n const initialAggFunc = this.aggFuncService.getDefaultAggFunc(column);\n column.setAggFunc(initialAggFunc);\n }\n }\n\n public addValueColumns(keys: (string | Column)[], source: ColumnEventType = \"api\"): void {\n this.updatePrimaryColumnList(keys, this.valueColumns, true,\n this.setValueActive.bind(this, true),\n Events.EVENT_COLUMN_VALUE_CHANGED,\n source\n );\n }\n\n public addValueColumn(colKey: (string | Column) | null | undefined, source: ColumnEventType = \"api\"): void {\n if (colKey) { this.addValueColumns([colKey], source); }\n }\n\n public removeValueColumn(colKey: (string | Column), source: ColumnEventType = \"api\"): void {\n this.removeValueColumns([colKey], source);\n }\n\n public removeValueColumns(keys: (string | Column)[], source: ColumnEventType = \"api\"): void {\n this.updatePrimaryColumnList(keys, this.valueColumns, false,\n this.setValueActive.bind(this, false),\n Events.EVENT_COLUMN_VALUE_CHANGED,\n source\n );\n }\n\n // returns the width we can set to this col, taking into consideration min and max widths\n private normaliseColumnWidth(column: Column, newWidth: number): number {\n const minWidth = column.getMinWidth();\n\n if (exists(minWidth) && newWidth < minWidth) {\n newWidth = minWidth;\n }\n\n const maxWidth = column.getMaxWidth();\n if (exists(maxWidth) && column.isGreaterThanMax(newWidth)) {\n newWidth = maxWidth;\n }\n\n return newWidth;\n }\n\n private getPrimaryOrGridColumn(key: string | Column): Column | null {\n const column = this.getPrimaryColumn(key);\n\n return column || this.getGridColumn(key);\n }\n\n public setColumnWidths(\n columnWidths: {\n key: string | Column, // @key - the column who's size we want to change\n newWidth: number; // @newWidth - width in pixels\n }[],\n shiftKey: boolean, // @takeFromAdjacent - if user has 'shift' pressed, then pixels are taken from adjacent column\n finished: boolean, // @finished - ends up in the event, tells the user if more events are to come\n source: ColumnEventType = \"api\"\n ): void {\n const sets: ColumnResizeSet[] = [];\n\n columnWidths.forEach(columnWidth => {\n const col = this.getPrimaryOrGridColumn(columnWidth.key);\n\n if (!col) { return; }\n\n sets.push({\n width: columnWidth.newWidth,\n ratios: [1],\n columns: [col]\n });\n\n // if user wants to do shift resize by default, then we invert the shift operation\n const defaultIsShift = this.gridOptionsWrapper.getColResizeDefault() === 'shift';\n\n if (defaultIsShift) {\n shiftKey = !shiftKey;\n }\n\n if (shiftKey) {\n const otherCol = this.getDisplayedColAfter(col);\n if (!otherCol) { return; }\n\n const widthDiff = col.getActualWidth() - columnWidth.newWidth;\n const otherColWidth = otherCol.getActualWidth() + widthDiff;\n\n sets.push({\n width: otherColWidth,\n ratios: [1],\n columns: [otherCol]\n });\n }\n });\n\n if (sets.length === 0) { return; }\n\n this.resizeColumnSets({\n resizeSets: sets,\n finished,\n source\n });\n\n }\n\n private checkMinAndMaxWidthsForSet(columnResizeSet: ColumnResizeSet): boolean {\n const { columns, width } = columnResizeSet;\n\n // every col has a min width, so sum them all up and see if we have enough room\n // for all the min widths\n let minWidthAccumulated = 0;\n let maxWidthAccumulated = 0;\n let maxWidthActive = true;\n\n columns.forEach(col => {\n const minWidth = col.getMinWidth();\n minWidthAccumulated += minWidth || 0;\n\n const maxWidth = col.getMaxWidth();\n if (exists(maxWidth) && maxWidth > 0) {\n maxWidthAccumulated += maxWidth;\n } else {\n // if at least one columns has no max width, it means the group of columns\n // then has no max width, as at least one column can take as much width as possible\n maxWidthActive = false;\n }\n });\n\n const minWidthPasses = width >= minWidthAccumulated;\n const maxWidthPasses = !maxWidthActive || (width <= maxWidthAccumulated);\n\n return minWidthPasses && maxWidthPasses;\n }\n\n // method takes sets of columns and resizes them. either all sets will be resized, or nothing\n // be resized. this is used for example when user tries to resize a group and holds shift key,\n // then both the current group (grows), and the adjacent group (shrinks), will get resized,\n // so that's two sets for this method.\n public resizeColumnSets(params: {\n resizeSets: ColumnResizeSet[],\n finished: boolean,\n source: ColumnEventType\n }): void {\n const { resizeSets, finished, source } = params;\n const passMinMaxCheck = !resizeSets || resizeSets.every(columnResizeSet => this.checkMinAndMaxWidthsForSet(columnResizeSet));\n\n if (!passMinMaxCheck) {\n // even though we are not going to resize beyond min/max size, we still need to raise event when finished\n if (finished) {\n const columns = resizeSets && resizeSets.length > 0 ? resizeSets[0].columns : null;\n this.fireColumnResizedEvent(columns, finished, source);\n }\n\n return; // don't resize!\n }\n\n const changedCols: Column[] = [];\n const allResizedCols: Column[] = [];\n\n resizeSets.forEach(set => {\n const { width, columns, ratios } = set;\n\n // keep track of pixels used, and last column gets the remaining,\n // to cater for rounding errors, and min width adjustments\n const newWidths: { [colId: string]: number; } = {};\n const finishedCols: { [colId: string]: boolean; } = {};\n\n columns.forEach(col => allResizedCols.push(col));\n\n // the loop below goes through each col. if a col exceeds it's min/max width,\n // it then gets set to its min/max width and the column is removed marked as 'finished'\n // and the calculation is done again leaving this column out. take for example columns\n // {A, width: 50, maxWidth: 100}\n // {B, width: 50}\n // {C, width: 50}\n // and then the set is set to width 600 - on the first pass the grid tries to set each column\n // to 200. it checks A and sees 200 > 100 and so sets the width to 100. col A is then marked\n // as 'finished' and the calculation is done again with the remaining cols B and C, which end up\n // splitting the remaining 500 pixels.\n let finishedColsGrew = true;\n let loopCount = 0;\n\n while (finishedColsGrew) {\n loopCount++;\n if (loopCount > 1000) {\n // this should never happen, but in the future, someone might introduce a bug here,\n // so we stop the browser from hanging and report bug properly\n console.error('AG Grid: infinite loop in resizeColumnSets');\n break;\n }\n\n finishedColsGrew = false;\n\n const subsetCols: Column[] = [];\n let subsetRatioTotal = 0;\n let pixelsToDistribute = width;\n\n columns.forEach((col: Column, index: number) => {\n const thisColFinished = finishedCols[col.getId()];\n if (thisColFinished) {\n pixelsToDistribute -= newWidths[col.getId()];\n } else {\n subsetCols.push(col);\n const ratioThisCol = ratios[index];\n subsetRatioTotal += ratioThisCol;\n }\n });\n\n // because we are not using all of the ratios (cols can be missing),\n // we scale the ratio. if all columns are included, then subsetRatioTotal=1,\n // and so the ratioScale will be 1.\n const ratioScale = 1 / subsetRatioTotal;\n\n subsetCols.forEach((col: Column, index: number) => {\n const lastCol = index === (subsetCols.length - 1);\n let colNewWidth: number;\n\n if (lastCol) {\n colNewWidth = pixelsToDistribute;\n } else {\n colNewWidth = Math.round(ratios[index] * width * ratioScale);\n pixelsToDistribute -= colNewWidth;\n }\n\n const minWidth = col.getMinWidth();\n const maxWidth = col.getMaxWidth();\n\n if (exists(minWidth) && colNewWidth < minWidth) {\n colNewWidth = minWidth;\n finishedCols[col.getId()] = true;\n finishedColsGrew = true;\n } else if (exists(maxWidth) && maxWidth > 0 && colNewWidth > maxWidth) {\n colNewWidth = maxWidth;\n finishedCols[col.getId()] = true;\n finishedColsGrew = true;\n }\n\n newWidths[col.getId()] = colNewWidth;\n });\n }\n\n columns.forEach(col => {\n const newWidth = newWidths[col.getId()];\n const actualWidth = col.getActualWidth();\n\n if (actualWidth !== newWidth) {\n col.setActualWidth(newWidth, source);\n changedCols.push(col);\n }\n });\n });\n\n // if no cols changed, then no need to update more or send event.\n const atLeastOneColChanged = changedCols.length > 0;\n\n let flexedCols: Column[] = [];\n\n if (atLeastOneColChanged) {\n flexedCols = this.refreshFlexedColumns({ resizingCols: allResizedCols, skipSetLeft: true });\n this.setLeftValues(source);\n this.updateBodyWidths();\n this.checkViewportColumns();\n }\n\n // check for change first, to avoid unnecessary firing of events\n // however we always fire 'finished' events. this is important\n // when groups are resized, as if the group is changing slowly,\n // eg 1 pixel at a time, then each change will fire change events\n // in all the columns in the group, but only one with get the pixel.\n const colsForEvent = allResizedCols.concat(flexedCols);\n\n if (atLeastOneColChanged || finished) {\n this.fireColumnResizedEvent(colsForEvent, finished, source, flexedCols);\n }\n }\n\n public setColumnAggFunc(key: string | Column | null | undefined, aggFunc: string, source: ColumnEventType = \"api\"): void {\n if (!key) { return; }\n\n const column = this.getPrimaryColumn(key);\n if (!column) { return; }\n\n column.setAggFunc(aggFunc);\n\n this.fireColumnEvent(Events.EVENT_COLUMN_VALUE_CHANGED, [column], source);\n }\n\n private fireColumnEvent(type: string, columns: Column[], source: ColumnEventType): void {\n const event: ColumnValueChangedEvent = {\n type: type,\n columns: columns,\n column: (columns && columns.length == 1) ? columns[0] : null,\n api: this.gridApi,\n columnApi: this.columnApi,\n source: source\n };\n this.eventService.dispatchEvent(event);\n }\n\n public moveRowGroupColumn(fromIndex: number, toIndex: number, source: ColumnEventType = \"api\"): void {\n const column = this.rowGroupColumns[fromIndex];\n\n this.rowGroupColumns.splice(fromIndex, 1);\n this.rowGroupColumns.splice(toIndex, 0, column);\n\n const event: ColumnRowGroupChangedEvent = {\n type: Events.EVENT_COLUMN_ROW_GROUP_CHANGED,\n columns: this.rowGroupColumns,\n column: this.rowGroupColumns.length === 1 ? this.rowGroupColumns[0] : null,\n api: this.gridApi,\n columnApi: this.columnApi,\n source: source\n };\n\n this.eventService.dispatchEvent(event);\n }\n\n public moveColumns(columnsToMoveKeys: (string | Column)[], toIndex: number, source: ColumnEventType = \"api\"): void {\n this.columnAnimationService.start();\n\n if (toIndex > this.gridColumns.length - columnsToMoveKeys.length) {\n console.warn('AG Grid: tried to insert columns in invalid location, toIndex = ' + toIndex);\n console.warn('AG Grid: remember that you should not count the moving columns when calculating the new index');\n return;\n }\n\n // we want to pull all the columns out first and put them into an ordered list\n const columnsToMove = this.getGridColumns(columnsToMoveKeys);\n const failedRules = !this.doesMovePassRules(columnsToMove, toIndex);\n\n if (failedRules) { return; }\n\n moveInArray(this.gridColumns, columnsToMove, toIndex);\n this.updateDisplayedColumns(source);\n\n const event: ColumnMovedEvent = {\n type: Events.EVENT_COLUMN_MOVED,\n columns: columnsToMove,\n column: columnsToMove.length === 1 ? columnsToMove[0] : null,\n toIndex: toIndex,\n api: this.gridApi,\n columnApi: this.columnApi,\n source: source\n };\n\n this.eventService.dispatchEvent(event);\n this.columnAnimationService.finish();\n }\n\n public doesMovePassRules(columnsToMove: Column[], toIndex: number): boolean {\n // make a copy of what the grid columns would look like after the move\n const proposedColumnOrder = this.gridColumns.slice();\n moveInArray(proposedColumnOrder, columnsToMove, toIndex);\n\n // then check that the new proposed order of the columns passes all rules\n if (!this.doesMovePassMarryChildren(proposedColumnOrder)) {\n return false;\n }\n\n if (!this.doesMovePassLockedPositions(proposedColumnOrder)) {\n return false;\n }\n\n return true;\n }\n\n // returns the provided cols sorted in same order as they appear in grid columns. eg if grid columns\n // contains [a,b,c,d,e] and col passed is [e,a] then the passed cols are sorted into [a,e]\n public sortColumnsLikeGridColumns(cols: Column[]): void {\n if (!cols || cols.length <= 1) { return; }\n\n const notAllColsInGridColumns = cols.filter(c => this.gridColumns.indexOf(c) < 0).length > 0;\n if (notAllColsInGridColumns) { return; }\n\n cols.sort((a: Column, b: Column) => {\n const indexA = this.gridColumns.indexOf(a);\n const indexB = this.gridColumns.indexOf(b);\n return indexA - indexB;\n });\n }\n\n public doesMovePassLockedPositions(proposedColumnOrder: Column[]): boolean {\n // Placement is a number indicating 'left' 'center' or 'right' as 0 1 2\n let lastPlacement = 0;\n let rulePassed = true;\n const lockPositionToPlacement = (position: ColDef['lockPosition']) => {\n if (!position) { // false or undefined\n return 1;\n }\n if (position === true) {\n return 0;\n }\n return position === 'left' ? 0 : 2; // Otherwise 'right'\n };\n\n proposedColumnOrder.forEach(col => {\n const placement = lockPositionToPlacement(col.getColDef().lockPosition);\n if (placement < lastPlacement) { // If placement goes down, we're not in the correct order\n rulePassed = false;\n }\n lastPlacement = placement;\n });\n\n return rulePassed;\n }\n\n public doesMovePassMarryChildren(allColumnsCopy: Column[]): boolean {\n let rulePassed = true;\n\n this.columnUtils.depthFirstOriginalTreeSearch(null, this.gridBalancedTree, child => {\n if (!(child instanceof ProvidedColumnGroup)) { return; }\n\n const columnGroup = child;\n const colGroupDef = columnGroup.getColGroupDef();\n const marryChildren = colGroupDef && colGroupDef.marryChildren;\n\n if (!marryChildren) { return; }\n\n const newIndexes: number[] = [];\n columnGroup.getLeafColumns().forEach(col => {\n const newColIndex = allColumnsCopy.indexOf(col);\n newIndexes.push(newColIndex);\n });\n\n const maxIndex = Math.max.apply(Math, newIndexes);\n const minIndex = Math.min.apply(Math, newIndexes);\n\n // spread is how far the first column in this group is away from the last column\n const spread = maxIndex - minIndex;\n const maxSpread = columnGroup.getLeafColumns().length - 1;\n\n // if the columns\n if (spread > maxSpread) {\n rulePassed = false;\n }\n\n // console.log(`maxIndex = ${maxIndex}, minIndex = ${minIndex}, spread = ${spread}, maxSpread = ${maxSpread}, fail = ${spread > (count-1)}`)\n // console.log(allColumnsCopy.map( col => col.getColDef().field).join(','));\n });\n\n return rulePassed;\n }\n\n public moveColumn(key: string | Column, toIndex: number, source: ColumnEventType = \"api\") {\n this.moveColumns([key], toIndex, source);\n }\n\n public moveColumnByIndex(fromIndex: number, toIndex: number, source: ColumnEventType = \"api\"): void {\n const column = this.gridColumns[fromIndex];\n this.moveColumn(column, toIndex, source);\n }\n\n public getColumnDefs(): (ColDef | ColGroupDef)[] | undefined {\n if (!this.primaryColumns) { return; }\n\n const cols = this.primaryColumns.slice();\n\n if (this.gridColsArePrimary) {\n cols.sort((a: Column, b: Column) => this.gridColumns.indexOf(a) - this.gridColumns.indexOf(b));\n } else if (this.lastPrimaryOrder) {\n cols.sort((a: Column, b: Column) => this.lastPrimaryOrder.indexOf(a) - this.lastPrimaryOrder.indexOf(b));\n }\n\n return this.columnDefFactory.buildColumnDefs(cols, this.rowGroupColumns, this.pivotColumns);\n }\n\n // used by:\n // + angularGrid -> for setting body width\n // + rowController -> setting main row widths (when inserting and resizing)\n // need to cache this\n public getBodyContainerWidth(): number {\n return this.bodyWidth;\n }\n\n public getContainerWidth(pinned: string | null): number {\n switch (pinned) {\n case Constants.PINNED_LEFT:\n return this.leftWidth;\n case Constants.PINNED_RIGHT:\n return this.rightWidth;\n default:\n return this.bodyWidth;\n }\n }\n\n // after setColumnWidth or updateGroupsAndDisplayedColumns\n private updateBodyWidths(): void {\n const newBodyWidth = this.getWidthOfColsInList(this.displayedColumnsCenter);\n const newLeftWidth = this.getWidthOfColsInList(this.displayedColumnsLeft);\n const newRightWidth = this.getWidthOfColsInList(this.displayedColumnsRight);\n\n // this is used by virtual col calculation, for RTL only, as a change to body width can impact displayed\n // columns, due to RTL inverting the y coordinates\n this.bodyWidthDirty = this.bodyWidth !== newBodyWidth;\n\n const atLeastOneChanged = this.bodyWidth !== newBodyWidth || this.leftWidth !== newLeftWidth || this.rightWidth !== newRightWidth;\n\n if (atLeastOneChanged) {\n this.bodyWidth = newBodyWidth;\n this.leftWidth = newLeftWidth;\n this.rightWidth = newRightWidth;\n // when this fires, it is picked up by the gridPanel, which ends up in\n // gridPanel calling setWidthAndScrollPosition(), which in turn calls setViewportPosition()\n const event: DisplayedColumnsWidthChangedEvent = {\n type: Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event);\n }\n }\n\n // + rowController\n public getValueColumns(): Column[] {\n return this.valueColumns ? this.valueColumns : [];\n }\n\n // + rowController\n public getPivotColumns(): Column[] {\n return this.pivotColumns ? this.pivotColumns : [];\n }\n\n // + clientSideRowModel\n public isPivotActive(): boolean {\n return this.pivotColumns && this.pivotColumns.length > 0 && this.pivotMode;\n }\n\n // + toolPanel\n public getRowGroupColumns(): Column[] {\n return this.rowGroupColumns ? this.rowGroupColumns : [];\n }\n\n // + rowController -> while inserting rows\n public getDisplayedCenterColumns(): Column[] {\n return this.displayedColumnsCenter;\n }\n\n // + rowController -> while inserting rows\n public getDisplayedLeftColumns(): Column[] {\n return this.displayedColumnsLeft;\n }\n\n public getDisplayedRightColumns(): Column[] {\n return this.displayedColumnsRight;\n }\n\n public getDisplayedColumns(type: string | null): Column[] {\n switch (type) {\n case Constants.PINNED_LEFT:\n return this.getDisplayedLeftColumns();\n case Constants.PINNED_RIGHT:\n return this.getDisplayedRightColumns();\n default:\n return this.getDisplayedCenterColumns();\n }\n }\n\n // used by:\n // + clientSideRowController -> sorting, building quick filter text\n // + headerRenderer -> sorting (clearing icon)\n public getAllPrimaryColumns(): Column[] | null {\n return this.primaryColumns ? this.primaryColumns.slice() : null;\n }\n\n public getSecondaryColumns(): Column[] | null {\n return this.secondaryColumns ? this.secondaryColumns.slice() : null;\n }\n\n public getAllColumnsForQuickFilter(): Column[] {\n return this.columnsForQuickFilter;\n }\n\n // + moveColumnController\n public getAllGridColumns(): Column[] {\n return this.gridColumns;\n }\n\n public isEmpty(): boolean {\n return missingOrEmpty(this.gridColumns);\n }\n\n public isRowGroupEmpty(): boolean {\n return missingOrEmpty(this.rowGroupColumns);\n }\n\n public setColumnVisible(key: string | Column, visible: boolean, source: ColumnEventType = \"api\"): void {\n this.setColumnsVisible([key], visible, source);\n }\n\n public setColumnsVisible(keys: (string | Column)[], visible = false, source: ColumnEventType = \"api\"): void {\n this.columnAnimationService.start();\n\n this.actionOnGridColumns(keys, (column: Column): boolean => {\n if (column.isVisible() !== visible) {\n column.setVisible(visible, source);\n return true;\n }\n return false;\n }, source, () => {\n const event: ColumnVisibleEvent = {\n type: Events.EVENT_COLUMN_VISIBLE,\n visible: visible,\n column: null,\n columns: null,\n api: this.gridApi,\n columnApi: this.columnApi,\n source: source\n };\n return event;\n });\n this.columnAnimationService.finish();\n }\n\n public setColumnPinned(key: string | Column | null, pinned: string | boolean | null, source: ColumnEventType = \"api\"): void {\n if (key) {\n this.setColumnsPinned([key], pinned, source);\n }\n }\n\n public setColumnsPinned(keys: (string | Column)[], pinned: string | boolean | null, source: ColumnEventType = \"api\"): void {\n if (this.gridOptionsWrapper.getDomLayout() === 'print') {\n console.warn(`Changing the column pinning status is not allowed with domLayout='print'`);\n return;\n }\n this.columnAnimationService.start();\n\n let actualPinned: string | null;\n if (pinned === true || pinned === Constants.PINNED_LEFT) {\n actualPinned = Constants.PINNED_LEFT;\n } else if (pinned === Constants.PINNED_RIGHT) {\n actualPinned = Constants.PINNED_RIGHT;\n } else {\n actualPinned = null;\n }\n\n this.actionOnGridColumns(keys, (col: Column): boolean => {\n if (col.getPinned() !== actualPinned) {\n col.setPinned(actualPinned);\n return true;\n }\n return false;\n }, source, () => {\n const event: ColumnPinnedEvent = {\n type: Events.EVENT_COLUMN_PINNED,\n pinned: actualPinned,\n column: null,\n columns: null,\n api: this.gridApi,\n columnApi: this.columnApi,\n source: source\n };\n return event;\n });\n\n this.columnAnimationService.finish();\n }\n\n // does an action on a set of columns. provides common functionality for looking up the\n // columns based on key, getting a list of effected columns, and then updated the event\n // with either one column (if it was just one col) or a list of columns\n // used by: autoResize, setVisible, setPinned\n private actionOnGridColumns(// the column keys this action will be on\n keys: (string | Column)[],\n // the action to do - if this returns false, the column was skipped\n // and won't be included in the event\n action: (column: Column) => boolean,\n // should return back a column event of the right type\n source: ColumnEventType,\n createEvent?: () => ColumnEvent): void {\n\n if (missingOrEmpty(keys)) { return; }\n\n const updatedColumns: Column[] = [];\n\n keys.forEach((key: string | Column) => {\n const column = this.getGridColumn(key);\n if (!column) { return; }\n\n // need to check for false with type (ie !== instead of !=)\n // as not returning anything (undefined) would also be false\n const resultOfAction = action(column);\n if (resultOfAction !== false) {\n updatedColumns.push(column);\n }\n });\n\n if (!updatedColumns.length) { return; }\n\n this.updateDisplayedColumns(source);\n\n if (exists(createEvent) && createEvent) {\n const event = createEvent();\n\n event.columns = updatedColumns;\n event.column = updatedColumns.length === 1 ? updatedColumns[0] : null;\n\n this.eventService.dispatchEvent(event);\n }\n }\n\n public getDisplayedColBefore(col: Column): Column | null {\n const allDisplayedColumns = this.getAllDisplayedColumns();\n const oldIndex = allDisplayedColumns.indexOf(col);\n\n if (oldIndex > 0) {\n return allDisplayedColumns[oldIndex - 1];\n }\n\n return null;\n }\n\n // used by:\n // + rowRenderer -> for navigation\n public getDisplayedColAfter(col: Column): Column | null {\n const allDisplayedColumns = this.getAllDisplayedColumns();\n const oldIndex = allDisplayedColumns.indexOf(col);\n\n if (oldIndex < (allDisplayedColumns.length - 1)) {\n return allDisplayedColumns[oldIndex + 1];\n }\n\n return null;\n }\n\n public getDisplayedGroupAfter(columnGroup: ColumnGroup): ColumnGroup | null {\n return this.getDisplayedGroupAtDirection(columnGroup, 'After');\n }\n\n public getDisplayedGroupBefore(columnGroup: ColumnGroup): ColumnGroup | null {\n return this.getDisplayedGroupAtDirection(columnGroup, 'Before');\n }\n\n public getDisplayedGroupAtDirection(columnGroup: ColumnGroup, direction: 'After' | 'Before'): ColumnGroup | null {\n // pick the last displayed column in this group\n const requiredLevel = columnGroup.getProvidedColumnGroup().getLevel() + columnGroup.getPaddingLevel();\n const colGroupLeafColumns = columnGroup.getDisplayedLeafColumns();\n const col: Column | null = direction === 'After' ? last(colGroupLeafColumns) : colGroupLeafColumns[0];\n const getDisplayColMethod: 'getDisplayedColAfter' | 'getDisplayedColBefore' = `getDisplayedCol${direction}` as any;\n\n while (true) {\n // keep moving to the next col, until we get to another group\n const column = this[getDisplayColMethod](col);\n\n if (!column) { return null; }\n\n const groupPointer = this.getColumnGroupAtLevel(column, requiredLevel);\n\n if (groupPointer !== columnGroup) {\n return groupPointer;\n }\n }\n }\n\n public getColumnGroupAtLevel(column: Column, level: number): ColumnGroup | null {\n // get group at same level as the one we are looking for\n let groupPointer: ColumnGroup = column.getParent();\n let originalGroupLevel: number;\n let groupPointerLevel: number;\n\n while (true) {\n const groupPointerProvidedColumnGroup = groupPointer.getProvidedColumnGroup();\n originalGroupLevel = groupPointerProvidedColumnGroup.getLevel();\n groupPointerLevel = groupPointer.getPaddingLevel();\n\n if (originalGroupLevel + groupPointerLevel <= level) { break; }\n groupPointer = groupPointer.getParent();\n }\n\n return groupPointer;\n }\n\n public isPinningLeft(): boolean {\n return this.displayedColumnsLeft.length > 0;\n }\n\n public isPinningRight(): boolean {\n return this.displayedColumnsRight.length > 0;\n }\n\n public getPrimaryAndSecondaryAndAutoColumns(): Column[] {\n return ([] as Column[]).concat(...[\n this.primaryColumns || [],\n this.groupAutoColumns || [],\n this.secondaryColumns || [],\n ]);\n }\n\n private getPrimaryAndAutoGroupCols(): Column[] {\n return ([] as Column[]).concat(...[\n this.primaryColumns || [],\n this.groupAutoColumns || [],\n ]);\n }\n\n private getPrimaryAndSecondaryColumns(): Column[] {\n return ([] as Column[]).concat(...[\n this.primaryColumns || [],\n this.secondaryColumns || [],\n ]);\n }\n\n private createStateItemFromColumn(column: Column): ColumnState {\n const rowGroupIndex = column.isRowGroupActive() ? this.rowGroupColumns.indexOf(column) : null;\n const pivotIndex = column.isPivotActive() ? this.pivotColumns.indexOf(column) : null;\n const aggFunc = column.isValueActive() ? column.getAggFunc() : null;\n const sort = column.getSort() != null ? column.getSort() : null;\n const sortIndex = column.getSortIndex() != null ? column.getSortIndex() : null;\n const flex = column.getFlex() != null && column.getFlex() > 0 ? column.getFlex() : null;\n\n const res: ColumnState = {\n colId: column.getColId(),\n width: column.getActualWidth(),\n hide: !column.isVisible(),\n pinned: column.getPinned(),\n sort,\n sortIndex,\n aggFunc,\n rowGroup: column.isRowGroupActive(),\n rowGroupIndex,\n pivot: column.isPivotActive(),\n pivotIndex: pivotIndex,\n flex\n };\n\n return res;\n }\n\n public getColumnState(): ColumnState[] {\n if (missing(this.primaryColumns) || !this.isAlive()) { return []; }\n\n const colsForState = this.getPrimaryAndSecondaryAndAutoColumns();\n const res: ColumnState[] = colsForState.map(this.createStateItemFromColumn.bind(this));\n\n this.orderColumnStateList(res);\n\n return res;\n }\n\n private orderColumnStateList(columnStateList: any[]): void {\n // for fast looking, store the index of each column\n const colIdToGridIndexMap = convertToMap(this.gridColumns.map((col, index) => [col.getColId(), index]));\n\n columnStateList.sort((itemA: any, itemB: any) => {\n const posA = colIdToGridIndexMap.has(itemA.colId) ? colIdToGridIndexMap.get(itemA.colId) : -1;\n const posB = colIdToGridIndexMap.has(itemB.colId) ? colIdToGridIndexMap.get(itemB.colId) : -1;\n return posA! - posB!;\n });\n }\n\n public resetColumnState(source: ColumnEventType = \"api\"): void {\n // NOTE = there is one bug here that no customer has noticed - if a column has colDef.lockPosition,\n // this is ignored below when ordering the cols. to work, we should always put lockPosition cols first.\n // As a work around, developers should just put lockPosition columns first in their colDef list.\n\n // we can't use 'allColumns' as the order might of messed up, so get the primary ordered list\n const primaryColumns = this.getColumnsFromTree(this.primaryColumnTree);\n const columnStates: ColumnState[] = [];\n\n // we start at 1000, so if user has mix of rowGroup and group specified, it will work with both.\n // eg IF user has ColA.rowGroupIndex=0, ColB.rowGroupIndex=1, ColC.rowGroup=true,\n // THEN result will be ColA.rowGroupIndex=0, ColB.rowGroupIndex=1, ColC.rowGroup=1000\n let letRowGroupIndex = 1000;\n let letPivotIndex = 1000;\n\n let colsToProcess: Column[] = [];\n if (this.groupAutoColumns) {\n colsToProcess = colsToProcess.concat(this.groupAutoColumns);\n }\n\n if (primaryColumns) {\n colsToProcess = colsToProcess.concat(primaryColumns);\n }\n\n colsToProcess.forEach(column => {\n\n const getValueOrNull = (a: any, b: any) => a != null ? a : b != null ? b : null;\n\n const colDef = column.getColDef();\n const sort = getValueOrNull(colDef.sort, colDef.initialSort);\n const sortIndex = getValueOrNull(colDef.sortIndex, colDef.initialSortIndex);\n const hide = getValueOrNull(colDef.hide, colDef.initialHide);\n const pinned = getValueOrNull(colDef.pinned, colDef.initialPinned);\n\n const width = getValueOrNull(colDef.width, colDef.initialWidth);\n const flex = getValueOrNull(colDef.flex, colDef.initialFlex);\n\n let rowGroupIndex: number | null | undefined = getValueOrNull(colDef.rowGroupIndex, colDef.initialRowGroupIndex);\n let rowGroup: boolean | null | undefined = getValueOrNull(colDef.rowGroup, colDef.initialRowGroup);\n\n if (rowGroupIndex == null && (rowGroup == null || rowGroup == false)) {\n rowGroupIndex = null;\n rowGroup = null;\n }\n\n let pivotIndex: number | null | undefined = getValueOrNull(colDef.pivotIndex, colDef.initialPivotIndex);\n let pivot: boolean | null | undefined = getValueOrNull(colDef.pivot, colDef.initialPivot);\n\n if (pivotIndex == null && (pivot == null || pivot == false)) {\n pivotIndex = null;\n pivot = null;\n }\n\n const aggFunc = getValueOrNull(colDef.aggFunc, colDef.initialAggFunc);\n\n const stateItem = {\n colId: column.getColId(),\n sort,\n sortIndex,\n hide,\n pinned,\n\n width,\n flex,\n\n rowGroup,\n rowGroupIndex,\n pivot,\n pivotIndex,\n aggFunc,\n };\n\n if (missing(rowGroupIndex) && rowGroup) {\n stateItem.rowGroupIndex = letRowGroupIndex++;\n }\n\n if (missing(pivotIndex) && pivot) {\n stateItem.pivotIndex = letPivotIndex++;\n }\n\n columnStates.push(stateItem);\n });\n\n this.applyColumnState({ state: columnStates, applyOrder: true }, source);\n }\n\n public applyColumnState(params: ApplyColumnStateParams, source: ColumnEventType = \"api\"): boolean {\n if (missingOrEmpty(this.primaryColumns)) { return false; }\n\n if (params && params.state && !params.state.forEach) {\n console.warn('AG Grid: applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state.');\n return false;\n }\n\n const applyStates = (states: ColumnState[], existingColumns: Column[], getById: (id: string) => Column | null) => {\n const raiseEventsFunc = this.compareColumnStatesAndRaiseEvents(source);\n this.autoGroupsNeedBuilding = true;\n\n // at the end below, this list will have all columns we got no state for\n const columnsWithNoState = existingColumns.slice();\n\n const rowGroupIndexes: { [key: string]: number; } = {};\n const pivotIndexes: { [key: string]: number; } = {};\n const autoGroupColumnStates: ColumnState[] = [];\n // If pivoting is modified, these are the states we try to reapply after\n // the secondary columns are re-generated\n const unmatchedAndAutoStates: ColumnState[] = [];\n let unmatchedCount = 0;\n\n const previousRowGroupCols = this.rowGroupColumns.slice();\n const previousPivotCols = this.pivotColumns.slice();\n\n states.forEach((state: ColumnState) => {\n const colId = state.colId || '';\n\n // auto group columns are re-created so deferring syncing with ColumnState\n const isAutoGroupColumn = colId.startsWith(Constants.GROUP_AUTO_COLUMN_ID);\n if (isAutoGroupColumn) {\n autoGroupColumnStates.push(state);\n unmatchedAndAutoStates.push(state);\n return;\n }\n\n const column = getById(colId);\n\n if (!column) {\n unmatchedAndAutoStates.push(state);\n unmatchedCount += 1;\n } else {\n this.syncColumnWithStateItem(column, state, params.defaultState, rowGroupIndexes,\n pivotIndexes, false, source);\n removeFromArray(columnsWithNoState, column);\n }\n });\n\n // anything left over, we got no data for, so add in the column as non-value, non-rowGroup and hidden\n const applyDefaultsFunc = (col: Column) =>\n this.syncColumnWithStateItem(col, null, params.defaultState, rowGroupIndexes,\n pivotIndexes, false, source);\n\n columnsWithNoState.forEach(applyDefaultsFunc);\n\n // sort the lists according to the indexes that were provided\n const comparator = (indexes: { [key: string]: number; }, oldList: Column[], colA: Column, colB: Column) => {\n\n const indexA = indexes[colA.getId()];\n const indexB = indexes[colB.getId()];\n\n const aHasIndex = indexA != null;\n const bHasIndex = indexB != null;\n\n if (aHasIndex && bHasIndex) {\n // both a and b are new cols with index, so sort on index\n return indexA - indexB;\n }\n\n if (aHasIndex) {\n // a has an index, so it should be before a\n return -1;\n }\n\n if (bHasIndex) {\n // b has an index, so it should be before a\n return 1;\n }\n\n const oldIndexA = oldList.indexOf(colA);\n const oldIndexB = oldList.indexOf(colB);\n\n const aHasOldIndex = oldIndexA >= 0;\n const bHasOldIndex = oldIndexB >= 0;\n\n if (aHasOldIndex && bHasOldIndex) {\n // both a and b are old cols, so sort based on last order\n return oldIndexA - oldIndexB;\n }\n\n if (aHasOldIndex) {\n // a is old, b is new, so b is first\n return -1;\n }\n\n // this bit does matter, means both are new cols\n // but without index or that b is old and a is new\n return 1;\n };\n\n this.rowGroupColumns.sort(comparator.bind(this, rowGroupIndexes, previousRowGroupCols));\n this.pivotColumns.sort(comparator.bind(this, pivotIndexes, previousPivotCols));\n\n this.updateGridColumns();\n\n // sync newly created auto group columns with ColumnState\n const autoGroupColsCopy = this.groupAutoColumns ? this.groupAutoColumns.slice() : [];\n autoGroupColumnStates.forEach(stateItem => {\n const autoCol = this.getAutoColumn(stateItem.colId!);\n removeFromArray(autoGroupColsCopy, autoCol);\n this.syncColumnWithStateItem(autoCol, stateItem, params.defaultState, null, null, true, source);\n });\n // autogroup cols with nothing else, apply the default\n autoGroupColsCopy.forEach(applyDefaultsFunc);\n\n this.applyOrderAfterApplyState(params);\n this.updateDisplayedColumns(source);\n this.dispatchEverythingChanged(source);\n\n raiseEventsFunc(); // Will trigger secondary column changes if pivoting modified\n return { unmatchedAndAutoStates, unmatchedCount };\n }\n\n this.columnAnimationService.start();\n\n let {\n unmatchedAndAutoStates,\n unmatchedCount,\n } = applyStates(params.state || [], this.primaryColumns || [], (id) => this.getPrimaryColumn(id));\n\n // If there are still states left over, see if we can apply them to newly generated\n // secondary or auto columns. Also if defaults exist, ensure they are applied to secondary cols\n if (unmatchedAndAutoStates.length > 0 || exists(params.defaultState)) {\n unmatchedCount = applyStates(\n unmatchedAndAutoStates,\n this.secondaryColumns || [],\n (id) => this.getSecondaryColumn(id)\n ).unmatchedCount;\n }\n this.columnAnimationService.finish();\n\n return unmatchedCount === 0; // Successful if no states unaccounted for\n }\n\n private applyOrderAfterApplyState(params: ApplyColumnStateParams): void {\n if (!params.applyOrder || !params.state) { return; }\n\n let newOrder: Column[] = [];\n const processedColIds: { [id: string]: boolean } = {};\n\n params.state.forEach(item => {\n if (!item.colId || processedColIds[item.colId]) { return; }\n const col = this.gridColumnsMap[item.colId];\n if (col) {\n newOrder.push(col);\n processedColIds[item.colId] = true;\n }\n });\n\n // add in all other columns\n let autoGroupInsertIndex = 0;\n this.gridColumns.forEach(col => {\n const colId = col.getColId();\n const alreadyProcessed = processedColIds[colId] != null;\n if (alreadyProcessed) { return; }\n\n const isAutoGroupCol = colId.startsWith(Constants.GROUP_AUTO_COLUMN_ID);\n if (isAutoGroupCol) {\n // auto group columns, if missing from state list, are added to the start.\n // it's common to have autoGroup missing, as grouping could be on by default\n // on a column, but the user could of since removed the grouping via the UI.\n // if we don't inc the insert index, autoGroups will be inserted in reverse order\n insertIntoArray(newOrder, col, autoGroupInsertIndex++);\n } else {\n // normal columns, if missing from state list, are added at the end\n newOrder.push(col);\n }\n });\n\n // this is already done in updateGridColumns, however we changed the order above (to match the order of the state\n // columns) so we need to do it again. we could of put logic into the order above to take into account fixed\n // columns, however if we did then we would have logic for updating fixed columns twice. reusing the logic here\n // is less sexy for the code here, but it keeps consistency.\n newOrder = this.placeLockedColumns(newOrder);\n\n if (!this.doesMovePassMarryChildren(newOrder)) {\n console.warn('AG Grid: Applying column order broke a group where columns should be married together. Applying new order has been discarded.');\n return;\n }\n\n this.gridColumns = newOrder;\n }\n\n private compareColumnStatesAndRaiseEvents(source: ColumnEventType): () => void {\n\n const startState = {\n rowGroupColumns: this.rowGroupColumns.slice(),\n pivotColumns: this.pivotColumns.slice(),\n valueColumns: this.valueColumns.slice()\n };\n\n const columnStateBefore = this.getColumnState();\n const columnStateBeforeMap: { [colId: string]: ColumnState; } = {};\n\n columnStateBefore.forEach(col => {\n columnStateBeforeMap[col.colId!] = col;\n });\n\n return () => {\n if (this.gridOptionsWrapper.isSuppressColumnStateEvents()) { return; }\n\n const colsForState = this.getPrimaryAndSecondaryAndAutoColumns();\n\n // raises generic ColumnEvents where all columns are returned rather than what has changed\n const raiseWhenListsDifferent = (eventType: string, colsBefore: Column[], colsAfter: Column[], idMapper: (column: Column) => string) => {\n const beforeList = colsBefore.map(idMapper);\n const afterList = colsAfter.map(idMapper);\n const unchanged = areEqual(beforeList, afterList);\n\n if (unchanged) { return; }\n\n // returning all columns rather than what has changed!\n const event: ColumnEvent = {\n type: eventType,\n columns: colsAfter,\n column: colsAfter.length === 1 ? colsAfter[0] : null,\n api: this.gridApi,\n columnApi: this.columnApi,\n source: source\n };\n\n this.eventService.dispatchEvent(event);\n };\n\n // determines which columns have changed according to supplied predicate\n const getChangedColumns = (changedPredicate: (cs: ColumnState, c: Column) => boolean): Column[] => {\n const changedColumns: Column[] = [];\n\n colsForState.forEach(column => {\n const colStateBefore = columnStateBeforeMap[column.getColId()];\n if (colStateBefore && changedPredicate(colStateBefore, column)) {\n changedColumns.push(column);\n }\n });\n\n return changedColumns;\n };\n\n const columnIdMapper = (c: Column) => c.getColId();\n\n raiseWhenListsDifferent(Events.EVENT_COLUMN_ROW_GROUP_CHANGED,\n startState.rowGroupColumns,\n this.rowGroupColumns,\n columnIdMapper\n );\n\n raiseWhenListsDifferent(Events.EVENT_COLUMN_PIVOT_CHANGED,\n startState.pivotColumns,\n this.pivotColumns,\n columnIdMapper\n );\n\n const valueChangePredicate = (cs: ColumnState, c: Column) => {\n const oldActive = cs.aggFunc != null;\n\n const activeChanged = oldActive != c.isValueActive();\n // we only check aggFunc if the agg is active\n const aggFuncChanged = oldActive && cs.aggFunc != c.getAggFunc();\n\n return activeChanged || aggFuncChanged;\n };\n const changedValues = getChangedColumns(valueChangePredicate);\n if (changedValues.length > 0) {\n // we pass all value columns, now the ones that changed. this is the same\n // as pivot and rowGroup cols, but different to all other properties below.\n // this is more for backwards compatibility, as it's always been this way.\n // really it should be the other way, as the order of the cols makes no difference\n // for valueColumns (apart from displaying them in the tool panel).\n this.fireColumnEvent(Events.EVENT_COLUMN_VALUE_CHANGED, this.valueColumns, source);\n }\n\n const resizeChangePredicate = (cs: ColumnState, c: Column) => cs.width != c.getActualWidth();\n this.fireColumnResizedEvent(getChangedColumns(resizeChangePredicate), true, source);\n\n const pinnedChangePredicate = (cs: ColumnState, c: Column) => cs.pinned != c.getPinned();\n this.raiseColumnPinnedEvent(getChangedColumns(pinnedChangePredicate), source);\n\n const visibilityChangePredicate = (cs: ColumnState, c: Column) => cs.hide == c.isVisible();\n this.raiseColumnVisibleEvent(getChangedColumns(visibilityChangePredicate), source);\n\n const sortChangePredicate = (cs: ColumnState, c: Column) => cs.sort != c.getSort() || cs.sortIndex != c.getSortIndex();\n if (getChangedColumns(sortChangePredicate).length > 0) {\n this.sortController.dispatchSortChangedEvents(source);\n }\n\n // special handling for moved column events\n this.raiseColumnMovedEvent(columnStateBefore, source);\n };\n }\n\n private raiseColumnPinnedEvent(changedColumns: Column[], source: ColumnEventType) {\n if (!changedColumns.length) { return; }\n\n // if just one column, we use this, otherwise we don't include the col\n const column: Column | null = changedColumns.length === 1 ? changedColumns[0] : null;\n\n // only include visible if it's common in all columns\n const pinned = this.getCommonValue(changedColumns, col => col.getPinned());\n\n const event: ColumnPinnedEvent = {\n type: Events.EVENT_COLUMN_PINNED,\n // mistake in typing, 'undefined' should be allowed, as 'null' means 'not pinned'\n pinned: pinned != null ? pinned : null,\n columns: changedColumns,\n column,\n api: this.gridApi,\n columnApi: this.columnApi,\n source: source\n };\n\n this.eventService.dispatchEvent(event);\n }\n\n private getCommonValue(cols: Column[], valueGetter: ((col: Column) => T)): T | undefined {\n if (!cols || cols.length == 0) { return undefined; }\n\n // compare each value to the first value. if nothing differs, then value is common so return it.\n const firstValue = valueGetter(cols[0]);\n for (let i = 1; i < cols.length; i++) {\n if (firstValue !== valueGetter(cols[i])) {\n // values differ, no common value\n return undefined;\n }\n }\n\n return firstValue;\n }\n\n private raiseColumnVisibleEvent(changedColumns: Column[], source: ColumnEventType) {\n if (!changedColumns.length) { return; }\n\n // if just one column, we use this, otherwise we don't include the col\n const column: Column | null = changedColumns.length === 1 ? changedColumns[0] : null;\n\n // only include visible if it's common in all columns\n const visible = this.getCommonValue(changedColumns, col => col.isVisible());\n\n const event: ColumnVisibleEvent = {\n type: Events.EVENT_COLUMN_VISIBLE,\n visible,\n columns: changedColumns,\n column,\n api: this.gridApi,\n columnApi: this.columnApi,\n source: source\n };\n\n this.eventService.dispatchEvent(event);\n }\n\n private raiseColumnMovedEvent(colStateBefore: ColumnState[], source: ColumnEventType) {\n\n // we are only interested in columns that were both present and visible before and after\n\n const colStateAfter = this.getColumnState();\n\n const colStateAfterMapped: { [id: string]: ColumnState; } = {};\n colStateAfter.forEach(s => colStateAfterMapped[s.colId!] = s);\n\n // get id's of cols in both before and after lists\n const colsIntersectIds: { [id: string]: boolean; } = {};\n colStateBefore.forEach(s => {\n if (colStateAfterMapped[s.colId!]) {\n colsIntersectIds[s.colId!] = true;\n }\n });\n\n // filter state lists, so we only have cols that were present before and after\n const beforeFiltered = colStateBefore.filter(c => colsIntersectIds[c.colId!]);\n const afterFiltered = colStateAfter.filter(c => colsIntersectIds[c.colId!]);\n\n // see if any cols are in a different location\n const movedColumns: Column[] = [];\n\n afterFiltered!.forEach((csAfter: ColumnState, index: number) => {\n const csBefore = beforeFiltered && beforeFiltered[index];\n if (csBefore && csBefore.colId !== csAfter.colId) {\n const gridCol = this.getGridColumn(csBefore.colId!);\n if (gridCol) {\n movedColumns.push(gridCol);\n }\n }\n });\n\n if (!movedColumns.length) { return; }\n\n const event: ColumnMovedEvent = {\n type: Events.EVENT_COLUMN_MOVED,\n columns: movedColumns,\n column: null,\n api: this.gridApi,\n columnApi: this.columnApi,\n source: source\n };\n\n this.eventService.dispatchEvent(event);\n }\n\n private syncColumnWithStateItem(\n column: Column | null,\n stateItem: ColumnState | null,\n defaultState: ColumnStateParams | undefined,\n rowGroupIndexes: { [key: string]: number; } | null,\n pivotIndexes: { [key: string]: number; } | null,\n autoCol: boolean,\n source: ColumnEventType\n ): void {\n\n if (!column) { return; }\n\n const getValue = (key1: U, key2?: S): { value1: ColumnStateParams[U] | undefined, value2: ColumnStateParams[S] | undefined; } => {\n const obj: { value1: ColumnStateParams[U] | undefined, value2: ColumnStateParams[S] | undefined; } = { value1: undefined, value2: undefined };\n let calculated: boolean = false;\n\n if (stateItem) {\n if (stateItem[key1] !== undefined) {\n obj.value1 = stateItem[key1];\n calculated = true;\n }\n if (exists(key2) && stateItem[key2] !== undefined) {\n obj.value2 = stateItem[key2];\n calculated = true;\n }\n }\n\n if (!calculated && defaultState) {\n if (defaultState[key1] !== undefined) {\n obj.value1 = defaultState[key1];\n }\n if (exists(key2) && defaultState[key2] !== undefined) {\n obj.value2 = defaultState[key2];\n }\n }\n\n return obj;\n };\n\n // following ensures we are left with boolean true or false, eg converts (null, undefined, 0) all to true\n const hide = getValue('hide').value1;\n if (hide !== undefined) {\n column.setVisible(!hide, source);\n }\n\n // sets pinned to 'left' or 'right'\n const pinned = getValue('pinned').value1;\n if (pinned !== undefined) {\n column.setPinned(pinned);\n }\n\n // if width provided and valid, use it, otherwise stick with the old width\n const minColWidth = this.columnUtils.calculateColMinWidth(column.getColDef());\n\n // flex\n const flex = getValue('flex').value1;\n if (flex !== undefined) {\n column.setFlex(flex);\n }\n\n // width - we only set width if column is not flexing\n const noFlexThisCol = column.getFlex() <= 0;\n if (noFlexThisCol) {\n // both null and undefined means we skip, as it's not possible to 'clear' width (a column must have a width)\n const width = getValue('width').value1;\n if (width != null) {\n if (minColWidth != null && width >= minColWidth) {\n column.setActualWidth(width, source);\n }\n }\n }\n\n const sort = getValue('sort').value1;\n if (sort !== undefined) {\n if (sort === Constants.SORT_DESC || sort === Constants.SORT_ASC) {\n column.setSort(sort, source);\n } else {\n column.setSort(undefined, source);\n }\n }\n\n const sortIndex = getValue('sortIndex').value1;\n if (sortIndex !== undefined) {\n column.setSortIndex(sortIndex);\n }\n\n // we do not do aggFunc, rowGroup or pivot for auto cols or secondary cols\n if (autoCol || !column.isPrimary()) {\n return;\n }\n\n const aggFunc = getValue('aggFunc').value1;\n if (aggFunc !== undefined) {\n if (typeof aggFunc === 'string') {\n column.setAggFunc(aggFunc);\n if (!column.isValueActive()) {\n column.setValueActive(true, source);\n this.valueColumns.push(column);\n }\n } else {\n if (exists(aggFunc)) {\n console.warn('AG Grid: stateItem.aggFunc must be a string. if using your own aggregation ' +\n 'functions, register the functions first before using them in get/set state. This is because it is ' +\n 'intended for the column state to be stored and retrieved as simple JSON.');\n }\n // Note: we do not call column.setAggFunc(null), so that next time we aggregate\n // by this column (eg drag the column to the agg section int he toolpanel) it will\n // default to the last aggregation function.\n\n if (column.isValueActive()) {\n column.setValueActive(false, source);\n removeFromArray(this.valueColumns, column);\n }\n }\n }\n\n const { value1: rowGroup, value2: rowGroupIndex } = getValue('rowGroup', 'rowGroupIndex');\n if (rowGroup !== undefined || rowGroupIndex !== undefined) {\n if (typeof rowGroupIndex === 'number' || rowGroup) {\n if (!column.isRowGroupActive()) {\n column.setRowGroupActive(true, source);\n this.rowGroupColumns.push(column);\n }\n if (rowGroupIndexes && typeof rowGroupIndex === 'number') {\n rowGroupIndexes[column.getId()] = rowGroupIndex;\n }\n } else {\n if (column.isRowGroupActive()) {\n column.setRowGroupActive(false, source);\n removeFromArray(this.rowGroupColumns, column);\n }\n }\n }\n\n const { value1: pivot, value2: pivotIndex } = getValue('pivot', 'pivotIndex');\n if (pivot !== undefined || pivotIndex !== undefined) {\n if (typeof pivotIndex === 'number' || pivot) {\n if (!column.isPivotActive()) {\n column.setPivotActive(true, source);\n this.pivotColumns.push(column);\n }\n if (pivotIndexes && typeof pivotIndex === 'number') {\n pivotIndexes[column.getId()] = pivotIndex;\n }\n } else {\n if (column.isPivotActive()) {\n column.setPivotActive(false, source);\n removeFromArray(this.pivotColumns, column);\n }\n }\n }\n }\n\n public getGridColumns(keys: (string | Column)[]): Column[] {\n return this.getColumns(keys, this.getGridColumn.bind(this));\n }\n\n private getColumns(keys: (string | Column)[], columnLookupCallback: (key: string | Column) => Column): Column[] {\n const foundColumns: Column[] = [];\n\n if (keys) {\n keys.forEach((key: (string | Column)) => {\n const column = columnLookupCallback(key);\n if (column) {\n foundColumns.push(column);\n }\n });\n }\n\n return foundColumns;\n }\n\n // used by growGroupPanel\n public getColumnWithValidation(key: string | Column | undefined): Column | null {\n if (key == null) { return null; }\n\n const column = this.getGridColumn(key);\n\n if (!column) {\n console.warn('AG Grid: could not find column ' + key);\n }\n\n return column;\n }\n\n public getPrimaryColumn(key: string | Column): Column | null {\n if (!this.primaryColumns) { return null; }\n\n return this.getColumn(key, this.primaryColumns, this.primaryColumnsMap);\n }\n\n public getGridColumn(key: string | Column): Column | null {\n return this.getColumn(key, this.gridColumns, this.gridColumnsMap);\n }\n\n private getSecondaryColumn(key: string | Column): Column | null {\n if (!this.secondaryColumns) { return null; }\n return this.getColumn(key, this.secondaryColumns, this.secondaryColumnsMap);\n }\n\n private getColumn(key: string | Column, columnList: Column[], columnMap: { [id: string]: Column }): Column | null {\n if (!key) { return null; }\n\n // most of the time this method gets called the key is a string, so we put this shortcut in\n // for performance reasons, to see if we can match for ID (it doesn't do auto columns, that's done below)\n if (typeof key == 'string' && columnMap[key]) {\n return columnMap[key];\n }\n\n for (let i = 0; i < columnList.length; i++) {\n if (this.columnsMatch(columnList[i], key)) {\n return columnList[i];\n }\n }\n\n return this.getAutoColumn(key);\n }\n\n private getAutoColumn(key: string | Column): Column | null {\n if (\n !this.groupAutoColumns ||\n !exists(this.groupAutoColumns) ||\n missing(this.groupAutoColumns)\n ) { return null; }\n\n return this.groupAutoColumns.find(groupCol => this.columnsMatch(groupCol, key)) || null;\n }\n\n private columnsMatch(column: Column, key: string | Column): boolean {\n const columnMatches = column === key;\n const colDefMatches = column.getColDef() === key;\n const idMatches = column.getColId() == key;\n\n return columnMatches || colDefMatches || idMatches;\n }\n\n public getDisplayNameForColumn(column: Column | null, location: string | null, includeAggFunc = false): string | null {\n if (!column) { return null; }\n\n const headerName: string | null = this.getHeaderName(column.getColDef(), column, null, null, location);\n\n if (includeAggFunc) {\n return this.wrapHeaderNameWithAggFunc(column, headerName);\n }\n\n return headerName;\n }\n\n public getDisplayNameForProvidedColumnGroup(\n columnGroup: ColumnGroup | null,\n providedColumnGroup: ProvidedColumnGroup | null,\n location: string\n ): string | null {\n const colGroupDef = providedColumnGroup ? providedColumnGroup.getColGroupDef() : null;\n\n if (colGroupDef) {\n return this.getHeaderName(colGroupDef, null, columnGroup, providedColumnGroup, location);\n }\n\n return null;\n }\n\n public getDisplayNameForColumnGroup(columnGroup: ColumnGroup, location: string): string | null {\n return this.getDisplayNameForProvidedColumnGroup(columnGroup, columnGroup.getProvidedColumnGroup(), location);\n }\n\n // location is where the column is going to appear, ie who is calling us\n private getHeaderName(\n colDef: AbstractColDef,\n column: Column | null,\n columnGroup: ColumnGroup | null,\n providedColumnGroup: ProvidedColumnGroup | null,\n location: string | null\n ): string | null {\n const headerValueGetter = colDef.headerValueGetter;\n\n if (headerValueGetter) {\n const params: HeaderValueGetterParams = {\n colDef: colDef,\n column: column,\n columnGroup: columnGroup,\n providedColumnGroup: providedColumnGroup,\n location: location,\n api: this.gridOptionsWrapper.getApi()!,\n columnApi: this.gridOptionsWrapper.getColumnApi()!,\n context: this.gridOptionsWrapper.getContext()\n };\n\n if (typeof headerValueGetter === 'function') {\n // valueGetter is a function, so just call it\n return headerValueGetter(params);\n } else if (typeof headerValueGetter === 'string') {\n // valueGetter is an expression, so execute the expression\n return this.expressionService.evaluate(headerValueGetter, params);\n }\n console.warn('ag-grid: headerValueGetter must be a function or a string');\n return '';\n } else if (colDef.headerName != null) {\n return colDef.headerName;\n } else if ((colDef as ColDef).field) {\n return camelCaseToHumanText((colDef as ColDef).field);\n }\n\n return '';\n }\n\n private wrapHeaderNameWithAggFunc(column: Column, headerName: string | null): string | null {\n if (this.gridOptionsWrapper.isSuppressAggFuncInHeader()) { return headerName; }\n\n // only columns with aggregation active can have aggregations\n const pivotValueColumn = column.getColDef().pivotValueColumn;\n const pivotActiveOnThisColumn = exists(pivotValueColumn);\n let aggFunc: string | IAggFunc | null | undefined = null;\n let aggFuncFound: boolean;\n\n // otherwise we have a measure that is active, and we are doing aggregation on it\n if (pivotActiveOnThisColumn) {\n const isCollapsedHeaderEnabled = this.gridOptionsWrapper.isRemovePivotHeaderRowWhenSingleValueColumn() && this.valueColumns.length === 1;\n const isTotalColumn = column.getColDef().pivotTotalColumnIds !== undefined;\n if (isCollapsedHeaderEnabled && !isTotalColumn) {\n return headerName; // Skip decorating the header - in this case the label is the pivot key, not the value col\n }\n aggFunc = pivotValueColumn ? pivotValueColumn.getAggFunc() : null;\n aggFuncFound = true;\n } else {\n const measureActive = column.isValueActive();\n const aggregationPresent = this.pivotMode || !this.isRowGroupEmpty();\n\n if (measureActive && aggregationPresent) {\n aggFunc = column.getAggFunc();\n aggFuncFound = true;\n } else {\n aggFuncFound = false;\n }\n }\n\n if (aggFuncFound) {\n const aggFuncString = (typeof aggFunc === 'string') ? aggFunc : 'func';\n const localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n const aggFuncStringTranslated = localeTextFunc(aggFuncString, aggFuncString);\n return `${aggFuncStringTranslated}(${headerName})`;\n }\n\n return headerName;\n }\n\n // returns the group with matching colId and instanceId. If instanceId is missing,\n // matches only on the colId.\n public getColumnGroup(colId: string | ColumnGroup, instanceId?: number): ColumnGroup | null {\n if (!colId) { return null; }\n if (colId instanceof ColumnGroup) { return colId; }\n\n const allColumnGroups = this.getAllDisplayedTrees();\n const checkInstanceId = typeof instanceId === 'number';\n let result: ColumnGroup | null = null;\n\n this.columnUtils.depthFirstAllColumnTreeSearch(allColumnGroups, (child: IHeaderColumn) => {\n if (child instanceof ColumnGroup) {\n const columnGroup = child;\n let matched: boolean;\n\n if (checkInstanceId) {\n matched = colId === columnGroup.getGroupId() && instanceId === columnGroup.getInstanceId();\n } else {\n matched = colId === columnGroup.getGroupId();\n }\n\n if (matched) {\n result = columnGroup;\n }\n }\n });\n\n return result;\n }\n\n public isReady(): boolean {\n return this.ready;\n }\n\n private extractValueColumns(source: ColumnEventType, oldPrimaryColumns: Column[] | undefined): void {\n this.valueColumns = this.extractColumns(\n oldPrimaryColumns,\n this.valueColumns,\n (col: Column, flag: boolean) => col.setValueActive(flag, source),\n // aggFunc doesn't have index variant, cos order of value cols doesn't matter, so always return null\n () => undefined,\n () => undefined,\n // aggFunc is a string, so return it's existence\n (colDef: ColDef) => {\n const aggFunc = colDef.aggFunc;\n // null or empty string means clear\n if (aggFunc === null || aggFunc === '') {\n return null;\n }\n if (aggFunc === undefined) {\n return;\n }\n\n return !!aggFunc;\n },\n (colDef: ColDef) => {\n // return false if any of the following: null, undefined, empty string\n return colDef.initialAggFunc != null && colDef.initialAggFunc != '';\n }\n );\n\n // all new columns added will have aggFunc missing, so set it to what is in the colDef\n this.valueColumns.forEach(col => {\n const colDef = col.getColDef();\n // if aggFunc provided, we always override, as reactive property\n if (colDef.aggFunc != null && colDef.aggFunc != '') {\n col.setAggFunc(colDef.aggFunc);\n } else {\n // otherwise we use initialAggFunc only if no agg func set - which happens when new column only\n if (!col.getAggFunc()) {\n col.setAggFunc(colDef.initialAggFunc);\n }\n }\n });\n }\n\n private extractRowGroupColumns(source: ColumnEventType, oldPrimaryColumns: Column[] | undefined): void {\n this.rowGroupColumns = this.extractColumns(oldPrimaryColumns, this.rowGroupColumns,\n (col: Column, flag: boolean) => col.setRowGroupActive(flag, source),\n (colDef: ColDef) => colDef.rowGroupIndex,\n (colDef: ColDef) => colDef.initialRowGroupIndex,\n (colDef: ColDef) => colDef.rowGroup,\n (colDef: ColDef) => colDef.initialRowGroup,\n );\n }\n\n private extractColumns(\n oldPrimaryColumns: Column[] = [],\n previousCols: Column[] = [],\n setFlagFunc: (col: Column, flag: boolean) => void,\n getIndexFunc: (colDef: ColDef) => number | null | undefined,\n getInitialIndexFunc: (colDef: ColDef) => number | null | undefined,\n getValueFunc: (colDef: ColDef) => boolean | null | undefined,\n getInitialValueFunc: (colDef: ColDef) => boolean | undefined\n ): Column[] {\n\n const colsWithIndex: Column[] = [];\n const colsWithValue: Column[] = [];\n\n // go though all cols.\n // if value, change\n // if default only, change only if new\n (this.primaryColumns || []).forEach(col => {\n const colIsNew = oldPrimaryColumns.indexOf(col) < 0;\n const colDef = col.getColDef();\n\n const value = attrToBoolean(getValueFunc(colDef));\n const initialValue = attrToBoolean(getInitialValueFunc(colDef));\n const index = attrToNumber(getIndexFunc(colDef));\n const initialIndex = attrToNumber(getInitialIndexFunc(colDef));\n\n let include: boolean;\n\n const valuePresent = value !== undefined;\n const indexPresent = index !== undefined;\n const initialValuePresent = initialValue !== undefined;\n const initialIndexPresent = initialIndex !== undefined;\n\n if (valuePresent) {\n include = value!; // boolean value is guaranteed as attrToBoolean() is used above\n } else if (indexPresent) {\n if (index === null) {\n // if col is new we don't want to use the default / initial if index is set to null. Similarly,\n // we don't want to include the property for existing columns, i.e. we want to 'clear' it.\n include = false;\n } else {\n // note that 'null >= 0' evaluates to true which means 'rowGroupIndex = null' would enable row\n // grouping if the null check didn't exist above.\n include = index! >= 0;\n }\n } else {\n if (colIsNew) {\n // as no value or index is 'present' we use the default / initial when col is new\n if (initialValuePresent) {\n include = initialValue!;\n } else if (initialIndexPresent) {\n include = initialIndex != null && initialIndex >= 0;\n } else {\n include = false;\n }\n } else {\n // otherwise include it if included last time, e.g. if we are extracting row group cols and this col\n // is an existing row group col (i.e. it exists in 'previousCols') then we should include it.\n include = previousCols.indexOf(col) >= 0;\n }\n }\n\n if (include) {\n const useIndex = colIsNew ? (index != null || initialIndex != null) : index != null;\n useIndex ? colsWithIndex.push(col) : colsWithValue.push(col);\n }\n });\n\n const getIndexForCol = (col: Column): number => {\n const index = getIndexFunc(col.getColDef());\n const defaultIndex = getInitialIndexFunc(col.getColDef());\n\n return index != null ? index : defaultIndex!;\n };\n\n // sort cols with index, and add these first\n colsWithIndex.sort((colA, colB) => {\n const indexA = getIndexForCol(colA);\n const indexB = getIndexForCol(colB);\n\n if (indexA === indexB) { return 0; }\n if (indexA < indexB) { return -1; }\n\n return 1;\n });\n\n const res: Column[] = ([] as Column[]).concat(colsWithIndex);\n\n // second add columns that were there before and in the same order as they were before,\n // so we are preserving order of current grouping of columns that simply have rowGroup=true\n previousCols.forEach(col => {\n if (colsWithValue.indexOf(col) >= 0) {\n res.push(col);\n }\n });\n\n // lastly put in all remaining cols\n colsWithValue.forEach(col => {\n if (res.indexOf(col) < 0) {\n res.push(col);\n }\n });\n\n // set flag=false for removed cols\n previousCols.forEach(col => {\n if (res.indexOf(col) < 0) {\n setFlagFunc(col, false);\n }\n });\n // set flag=true for newly added cols\n res.forEach(col => {\n if (previousCols.indexOf(col) < 0) {\n setFlagFunc(col, true);\n }\n });\n\n return res;\n }\n\n private extractPivotColumns(source: ColumnEventType, oldPrimaryColumns: Column[] | undefined): void {\n this.pivotColumns = this.extractColumns(\n oldPrimaryColumns,\n this.pivotColumns,\n (col: Column, flag: boolean) => col.setPivotActive(flag, source),\n (colDef: ColDef) => colDef.pivotIndex,\n (colDef: ColDef) => colDef.initialPivotIndex,\n (colDef: ColDef) => colDef.pivot,\n (colDef: ColDef) => colDef.initialPivot,\n );\n }\n\n public resetColumnGroupState(source: ColumnEventType = \"api\"): void {\n const stateItems: { groupId: string, open: boolean | undefined; }[] = [];\n\n this.columnUtils.depthFirstOriginalTreeSearch(null, this.primaryColumnTree, child => {\n if (child instanceof ProvidedColumnGroup) {\n const colGroupDef = child.getColGroupDef();\n const groupState = {\n groupId: child.getGroupId(),\n open: !colGroupDef ? undefined : colGroupDef.openByDefault\n };\n stateItems.push(groupState);\n }\n });\n\n this.setColumnGroupState(stateItems, source);\n }\n\n public getColumnGroupState(): { groupId: string, open: boolean; }[] {\n const columnGroupState: { groupId: string, open: boolean; }[] = [];\n\n this.columnUtils.depthFirstOriginalTreeSearch(null, this.gridBalancedTree, node => {\n if (node instanceof ProvidedColumnGroup) {\n columnGroupState.push({\n groupId: node.getGroupId(),\n open: node.isExpanded()\n });\n }\n });\n\n return columnGroupState;\n }\n\n public setColumnGroupState(stateItems: { groupId: string, open: boolean | undefined; }[], source: ColumnEventType = \"api\"): void {\n this.columnAnimationService.start();\n\n const impactedGroups: ProvidedColumnGroup[] = [];\n\n stateItems.forEach(stateItem => {\n const groupKey = stateItem.groupId;\n const newValue = stateItem.open;\n const providedColumnGroup: ProvidedColumnGroup | null = this.getProvidedColumnGroup(groupKey);\n\n if (!providedColumnGroup) { return; }\n if (providedColumnGroup.isExpanded() === newValue) { return; }\n\n this.logger.log('columnGroupOpened(' + providedColumnGroup.getGroupId() + ',' + newValue + ')');\n providedColumnGroup.setExpanded(newValue);\n impactedGroups.push(providedColumnGroup);\n });\n\n this.updateGroupsAndDisplayedColumns(source);\n this.setFirstRightAndLastLeftPinned(source);\n\n impactedGroups.forEach(providedColumnGroup => {\n const event: ColumnGroupOpenedEvent = {\n type: Events.EVENT_COLUMN_GROUP_OPENED,\n columnGroup: providedColumnGroup,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event);\n });\n\n this.columnAnimationService.finish();\n }\n\n // called by headerRenderer - when a header is opened or closed\n public setColumnGroupOpened(key: ProvidedColumnGroup | string | null, newValue: boolean, source: ColumnEventType = \"api\"): void {\n let keyAsString: string;\n\n if (key instanceof ProvidedColumnGroup) {\n keyAsString = key.getId();\n } else {\n keyAsString = key || '';\n }\n this.setColumnGroupState([{ groupId: keyAsString, open: newValue }], source);\n }\n\n public getProvidedColumnGroup(key: string): ProvidedColumnGroup | null {\n // if (key instanceof ProvidedColumnGroup) { return key; }\n\n if (typeof key !== 'string') {\n console.error('AG Grid: group key must be a string');\n }\n\n // otherwise, search for the column group by id\n let res: ProvidedColumnGroup | null = null;\n\n this.columnUtils.depthFirstOriginalTreeSearch(null, this.gridBalancedTree, node => {\n if (node instanceof ProvidedColumnGroup) {\n if (node.getId() === key) {\n res = node;\n }\n }\n });\n\n return res;\n }\n\n private calculateColumnsForDisplay(): Column[] {\n let columnsForDisplay: Column[];\n\n if (this.pivotMode && missing(this.secondaryColumns)) {\n // pivot mode is on, but we are not pivoting, so we only\n // show columns we are aggregating on\n columnsForDisplay = this.gridColumns.filter(column => {\n const isAutoGroupCol = this.groupAutoColumns && includes(this.groupAutoColumns, column);\n const isValueCol = this.valueColumns && includes(this.valueColumns, column);\n return isAutoGroupCol || isValueCol;\n });\n\n } else {\n // otherwise continue as normal. this can be working on the primary\n // or secondary columns, whatever the gridColumns are set to\n columnsForDisplay = this.gridColumns.filter(column => {\n // keep col if a) it's auto-group or b) it's visible\n const isAutoGroupCol = this.groupAutoColumns && includes(this.groupAutoColumns, column);\n return isAutoGroupCol || column.isVisible();\n });\n }\n\n return columnsForDisplay;\n }\n\n private checkColSpanActiveInCols(columns: Column[]): boolean {\n let result = false;\n\n columns.forEach(col => {\n if (exists(col.getColDef().colSpan)) {\n result = true;\n }\n });\n\n return result;\n }\n\n private calculateColumnsForGroupDisplay(): void {\n this.groupDisplayColumns = [];\n\n const checkFunc = (col: Column) => {\n const colDef = col.getColDef();\n if (colDef && exists(colDef.showRowGroup)) {\n this.groupDisplayColumns.push(col);\n }\n };\n\n this.gridColumns.forEach(checkFunc);\n\n if (this.groupAutoColumns) {\n this.groupAutoColumns.forEach(checkFunc);\n }\n }\n\n public getGroupDisplayColumns(): Column[] {\n return this.groupDisplayColumns;\n }\n\n private updateDisplayedColumns(source: ColumnEventType): void {\n const columnsForDisplay = this.calculateColumnsForDisplay();\n\n this.buildDisplayedTrees(columnsForDisplay);\n this.calculateColumnsForGroupDisplay();\n\n // also called when group opened/closed\n this.updateGroupsAndDisplayedColumns(source);\n\n // also called when group opened/closed\n this.setFirstRightAndLastLeftPinned(source);\n }\n\n public isSecondaryColumnsPresent(): boolean {\n return exists(this.secondaryColumns);\n }\n\n public setSecondaryColumns(colDefs: (ColDef | ColGroupDef)[] | null, source: ColumnEventType = \"api\"): void {\n const newColsPresent = colDefs && colDefs.length > 0;\n\n // if not cols passed, and we had no cols anyway, then do nothing\n if (!newColsPresent && missing(this.secondaryColumns)) { return; }\n\n if (newColsPresent) {\n this.processSecondaryColumnDefinitions(colDefs);\n const balancedTreeResult = this.columnFactory.createColumnTree(\n colDefs,\n false,\n this.secondaryBalancedTree || this.previousSecondaryColumns || undefined,\n );\n this.secondaryBalancedTree = balancedTreeResult.columnTree;\n this.secondaryHeaderRowCount = balancedTreeResult.treeDept + 1;\n this.secondaryColumns = this.getColumnsFromTree(this.secondaryBalancedTree);\n\n this.secondaryColumnsMap = {};\n this.secondaryColumns.forEach(col => this.secondaryColumnsMap[col.getId()] = col);\n this.previousSecondaryColumns = null;\n } else {\n this.previousSecondaryColumns = this.secondaryBalancedTree;\n this.secondaryBalancedTree = null;\n this.secondaryHeaderRowCount = -1;\n this.secondaryColumns = null;\n this.secondaryColumnsMap = {};\n }\n\n this.updateGridColumns();\n this.updateDisplayedColumns(source);\n }\n\n private processSecondaryColumnDefinitions(colDefs: (ColDef | ColGroupDef)[] | null): (ColDef | ColGroupDef)[] | undefined {\n\n const columnCallback = this.gridOptionsWrapper.getProcessSecondaryColDefFunc();\n const groupCallback = this.gridOptionsWrapper.getProcessSecondaryColGroupDefFunc();\n\n if (!columnCallback && !groupCallback) { return undefined; }\n\n const searchForColDefs = (colDefs2: (ColDef | ColGroupDef)[]): void => {\n colDefs2.forEach((abstractColDef: AbstractColDef) => {\n const isGroup = exists((abstractColDef as any).children);\n if (isGroup) {\n const colGroupDef = abstractColDef as ColGroupDef;\n if (groupCallback) {\n groupCallback(colGroupDef);\n }\n searchForColDefs(colGroupDef.children);\n } else {\n const colDef = abstractColDef as ColDef;\n if (columnCallback) {\n columnCallback(colDef);\n }\n }\n });\n };\n\n if (colDefs) {\n searchForColDefs(colDefs);\n }\n }\n\n // called from: setColumnState, setColumnDefs, setSecondaryColumns\n private updateGridColumns(): void {\n if (this.gridColsArePrimary) {\n this.lastPrimaryOrder = this.gridColumns;\n } else {\n this.lastSecondaryOrder = this.gridColumns;\n }\n\n if (this.secondaryColumns && this.secondaryBalancedTree) {\n const hasSameColumns = this.secondaryColumns.every((col) => {\n return this.gridColumnsMap[col.getColId()] !== undefined;\n });\n this.gridBalancedTree = this.secondaryBalancedTree.slice();\n this.gridHeaderRowCount = this.secondaryHeaderRowCount;\n this.gridColumns = this.secondaryColumns.slice();\n this.gridColsArePrimary = false;\n // If the current columns are the same or a subset of the previous\n // we keep the previous order, otherwise we go back to the order the pivot\n // cols are generated in\n if (hasSameColumns) {\n this.orderGridColsLike(this.lastSecondaryOrder);\n }\n } else if (this.primaryColumns) {\n this.gridBalancedTree = this.primaryColumnTree.slice();\n this.gridHeaderRowCount = this.primaryHeaderRowCount;\n this.gridColumns = this.primaryColumns.slice();\n this.gridColsArePrimary = true;\n\n // updateGridColumns gets called after user adds a row group. we want to maintain the order of the columns\n // when this happens (eg if user moved a column) rather than revert back to the original column order.\n // likewise if changing in/out of pivot mode, we want to maintain the order of the cols\n this.orderGridColsLike(this.lastPrimaryOrder);\n }\n\n this.addAutoGroupToGridColumns();\n\n this.gridColumns = this.placeLockedColumns(this.gridColumns);\n this.setupQuickFilterColumns();\n this.clearDisplayedAndViewportColumns();\n\n this.colSpanActive = this.checkColSpanActiveInCols(this.gridColumns);\n\n this.gridColumnsMap = {};\n this.gridColumns.forEach(col => this.gridColumnsMap[col.getId()] = col);\n\n this.setAutoHeightActive();\n\n const event: GridColumnsChangedEvent = {\n type: Events.EVENT_GRID_COLUMNS_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n\n this.eventService.dispatchEvent(event);\n }\n\n private setAutoHeightActive(): void {\n this.autoHeightActive = this.gridColumns.filter(col => col.isAutoHeight()).length > 0;\n\n if (this.autoHeightActive) {\n this.autoHeightActiveAtLeastOnce = true;\n\n const rowModelType = this.rowModel.getType();\n const supportedRowModel = rowModelType === Constants.ROW_MODEL_TYPE_CLIENT_SIDE || rowModelType === Constants.ROW_MODEL_TYPE_SERVER_SIDE;\n if (!supportedRowModel) {\n const message = 'AG Grid - autoHeight columns only work with Client Side Row Model and Server Side Row Model.';\n doOnce(() => console.warn(message), 'autoHeightActive.wrongRowModel');\n }\n }\n }\n\n private orderGridColsLike(colsOrder: Column[] | undefined): void {\n if (missing(colsOrder)) { return; }\n\n const lastOrderMapped = convertToMap(colsOrder.map((col, index) => [col, index]));\n\n // only do the sort if at least one column is accounted for. columns will be not accounted for\n // if changing from secondary to primary columns\n let noColsFound = true;\n this.gridColumns.forEach(col => {\n if (lastOrderMapped.has(col)) {\n noColsFound = false;\n }\n });\n\n if (noColsFound) { return; }\n\n // order cols in the same order as before. we need to make sure that all\n // cols still exists, so filter out any that no longer exist.\n const gridColsMap = convertToMap(this.gridColumns.map(col => [col, true]));\n const oldColsOrdered = colsOrder.filter(col => gridColsMap.has(col));\n const oldColsMap = convertToMap(oldColsOrdered.map(col => [col, true]));\n const newColsOrdered = this.gridColumns.filter(col => !oldColsMap.has(col));\n\n // add in the new columns, at the end (if no group), or at the end of the group (if a group)\n const newGridColumns = oldColsOrdered.slice();\n\n newColsOrdered.forEach(newCol => {\n let parent = newCol.getOriginalParent();\n\n // if no parent, means we are not grouping, so just add the column to the end\n if (!parent) {\n newGridColumns.push(newCol);\n return;\n }\n\n // find the group the column belongs to. if no siblings at the current level (eg col in group on it's\n // own) then go up one level and look for siblings there.\n const siblings: Column[] = [];\n while (!siblings.length && parent) {\n const leafCols = parent.getLeafColumns();\n leafCols.forEach(leafCol => {\n const presentInNewGriColumns = newGridColumns.indexOf(leafCol) >= 0;\n const noYetInSiblings = siblings.indexOf(leafCol) < 0;\n if (presentInNewGriColumns && noYetInSiblings) {\n siblings.push(leafCol);\n }\n });\n parent = parent.getOriginalParent();\n }\n\n // if no siblings exist at any level, this means the col is in a group (or parent groups) on it's own\n if (!siblings.length) {\n newGridColumns.push(newCol);\n return;\n }\n\n // find index of last column in the group\n const indexes = siblings.map(col => newGridColumns.indexOf(col));\n const lastIndex = Math.max(...indexes);\n\n insertIntoArray(newGridColumns, newCol, lastIndex + 1);\n });\n\n this.gridColumns = newGridColumns;\n }\n\n public isPrimaryColumnGroupsPresent(): boolean {\n return this.primaryHeaderRowCount > 1;\n }\n\n // if we are using autoGroupCols, then they should be included for quick filter. this covers the\n // following scenarios:\n // a) user provides 'field' into autoGroupCol of normal grid, so now because a valid col to filter leafs on\n // b) using tree data and user depends on autoGroupCol for first col, and we also want to filter on this\n // (tree data is a bit different, as parent rows can be filtered on, unlike row grouping)\n private setupQuickFilterColumns(): void {\n if (this.groupAutoColumns) {\n this.columnsForQuickFilter = (this.primaryColumns || []).concat(this.groupAutoColumns);\n } else if (this.primaryColumns) {\n this.columnsForQuickFilter = this.primaryColumns;\n }\n }\n\n private placeLockedColumns(cols: Column[]): Column[] {\n const left: Column[] = [];\n const normal: Column[] = [];\n const right: Column[] = [];\n cols.forEach((col) => {\n const position = col.getColDef().lockPosition;\n if (position === 'right') {\n right.push(col);\n } else if (position === 'left' || position === true) {\n left.push(col);\n } else {\n normal.push(col);\n }\n });\n return [...left, ...normal, ...right];\n }\n\n private addAutoGroupToGridColumns(): void {\n // add in auto-group here\n this.createGroupAutoColumnsIfNeeded();\n\n if (missing(this.groupAutoColumns)) { return; }\n\n this.gridColumns = this.groupAutoColumns ? this.groupAutoColumns.concat(this.gridColumns) : this.gridColumns;\n\n const autoColBalancedTree = this.columnFactory.createForAutoGroups(this.groupAutoColumns, this.gridBalancedTree);\n\n this.gridBalancedTree = autoColBalancedTree.concat(this.gridBalancedTree);\n }\n\n // gets called after we copy down grid columns, to make sure any part of the gui\n // that tries to draw, eg the header, it will get empty lists of columns rather\n // than stale columns. for example, the header will received gridColumnsChanged\n // event, so will try and draw, but it will draw successfully when it acts on the\n // virtualColumnsChanged event\n private clearDisplayedAndViewportColumns(): void {\n this.displayedTreeLeft = [];\n this.displayedTreeRight = [];\n this.displayedTreeCentre = [];\n\n this.viewportRowLeft = {};\n this.viewportRowRight = {};\n this.viewportRowCenter = {};\n\n this.displayedColumnsLeft = [];\n this.displayedColumnsRight = [];\n this.displayedColumnsCenter = [];\n this.displayedColumns = [];\n this.viewportColumns = [];\n }\n\n private updateGroupsAndDisplayedColumns(source: ColumnEventType) {\n\n this.updateOpenClosedVisibilityInColumnGroups();\n this.deriveDisplayedColumns(source);\n this.refreshFlexedColumns();\n this.extractViewport();\n this.updateBodyWidths();\n // this event is picked up by the gui, headerRenderer and rowRenderer, to recalculate what columns to display\n\n const event: DisplayedColumnsChangedEvent = {\n type: Events.EVENT_DISPLAYED_COLUMNS_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event);\n }\n\n private deriveDisplayedColumns(source: ColumnEventType): void {\n this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeLeft, this.displayedColumnsLeft);\n this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeCentre, this.displayedColumnsCenter);\n this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeRight, this.displayedColumnsRight);\n this.joinDisplayedColumns();\n this.setLeftValues(source);\n this.displayedAutoHeightCols = this.displayedColumns.filter(col => col.isAutoHeight());\n }\n\n public isAutoRowHeightActive(): boolean {\n return this.autoHeightActive;\n }\n\n public wasAutoRowHeightEverActive(): boolean {\n return this.autoHeightActiveAtLeastOnce;\n }\n\n private joinDisplayedColumns(): void {\n if (this.gridOptionsWrapper.isEnableRtl()) {\n this.displayedColumns = this.displayedColumnsRight\n .concat(this.displayedColumnsCenter)\n .concat(this.displayedColumnsLeft);\n } else {\n this.displayedColumns = this.displayedColumnsLeft\n .concat(this.displayedColumnsCenter)\n .concat(this.displayedColumnsRight);\n }\n }\n\n // sets the left pixel position of each column\n private setLeftValues(source: ColumnEventType): void {\n this.setLeftValuesOfColumns(source);\n this.setLeftValuesOfGroups();\n }\n\n private setLeftValuesOfColumns(source: ColumnEventType): void {\n if (!this.primaryColumns) { return; }\n\n // go through each list of displayed columns\n const allColumns = this.primaryColumns.slice(0);\n\n // let totalColumnWidth = this.getWidthOfColsInList()\n const doingRtl = this.gridOptionsWrapper.isEnableRtl();\n\n [\n this.displayedColumnsLeft,\n this.displayedColumnsRight,\n this.displayedColumnsCenter\n ].forEach(columns => {\n if (doingRtl) {\n // when doing RTL, we start at the top most pixel (ie RHS) and work backwards\n let left = this.getWidthOfColsInList(columns);\n columns.forEach(column => {\n left -= column.getActualWidth();\n column.setLeft(left, source);\n });\n } else {\n // otherwise normal LTR, we start at zero\n let left = 0;\n columns.forEach(column => {\n column.setLeft(left, source);\n left += column.getActualWidth();\n });\n }\n removeAllFromArray(allColumns, columns);\n });\n\n // items left in allColumns are columns not displayed, so remove the left position. this is\n // important for the rows, as if a col is made visible, then taken out, then made visible again,\n // we don't want the animation of the cell floating in from the old position, whatever that was.\n allColumns.forEach((column: Column) => {\n column.setLeft(null, source);\n });\n }\n\n private setLeftValuesOfGroups(): void {\n // a groups left value is the lest left value of it's children\n [\n this.displayedTreeLeft,\n this.displayedTreeRight,\n this.displayedTreeCentre\n ].forEach(columns => {\n columns.forEach(column => {\n if (column instanceof ColumnGroup) {\n const columnGroup = column;\n columnGroup.checkLeft();\n }\n });\n });\n }\n\n private derivedDisplayedColumnsFromDisplayedTree(tree: IHeaderColumn[], columns: Column[]): void {\n columns.length = 0;\n this.columnUtils.depthFirstDisplayedColumnTreeSearch(tree, (child: IHeaderColumn) => {\n if (child instanceof Column) {\n columns.push(child);\n }\n });\n }\n\n private extractViewportColumns(): void {\n if (this.suppressColumnVirtualisation) {\n // no virtualisation, so don't filter\n this.viewportColumnsCenter = this.displayedColumnsCenter;\n } else {\n // filter out what should be visible\n this.viewportColumnsCenter = this.filterOutColumnsWithinViewport();\n }\n\n this.viewportColumns = this.viewportColumnsCenter\n .concat(this.displayedColumnsLeft)\n .concat(this.displayedColumnsRight);\n }\n\n public getVirtualHeaderGroupRow(type: string | null, dept: number): IHeaderColumn[] {\n let result: IHeaderColumn[];\n\n switch (type) {\n case Constants.PINNED_LEFT:\n result = this.viewportRowLeft[dept];\n break;\n case Constants.PINNED_RIGHT:\n result = this.viewportRowRight[dept];\n break;\n default:\n result = this.viewportRowCenter[dept];\n break;\n }\n\n if (missing(result)) {\n result = [];\n }\n\n return result;\n }\n\n private extractViewportRows(): void {\n\n // go through each group, see if any of it's cols are displayed, and if yes,\n // then this group is included\n this.viewportRowLeft = {};\n this.viewportRowRight = {};\n this.viewportRowCenter = {};\n\n // for easy lookup when building the groups.\n const virtualColIds: { [key: string]: boolean; } = {};\n this.viewportColumns.forEach(col => virtualColIds[col.getId()] = true);\n\n const testGroup = (\n children: IHeaderColumn[],\n result: { [row: number]: IHeaderColumn[]; },\n dept: number): boolean => {\n\n let returnValue = false;\n\n for (let i = 0; i < children.length; i++) {\n // see if this item is within viewport\n const child = children[i];\n let addThisItem = false;\n\n if (child instanceof Column) {\n // for column, test if column is included\n addThisItem = virtualColIds[child.getId()] === true;\n } else {\n // if group, base decision on children\n const columnGroup = child as ColumnGroup;\n const displayedChildren = columnGroup.getDisplayedChildren();\n\n if (displayedChildren) {\n addThisItem = testGroup(displayedChildren, result, dept + 1);\n }\n }\n\n if (addThisItem) {\n returnValue = true;\n if (!result[dept]) {\n result[dept] = [];\n }\n result[dept].push(child);\n }\n }\n return returnValue;\n };\n\n testGroup(this.displayedTreeLeft, this.viewportRowLeft, 0);\n testGroup(this.displayedTreeRight, this.viewportRowRight, 0);\n testGroup(this.displayedTreeCentre, this.viewportRowCenter, 0);\n }\n\n private extractViewport(): void {\n this.extractViewportColumns();\n this.extractViewportRows();\n }\n\n private filterOutColumnsWithinViewport(): Column[] {\n return this.displayedColumnsCenter.filter(this.isColumnInViewport.bind(this));\n }\n\n public refreshFlexedColumns(params: { resizingCols?: Column[], skipSetLeft?: boolean, viewportWidth?: number, source?: ColumnEventType, fireResizedEvent?: boolean, updateBodyWidths?: boolean; } = {}): Column[] {\n const source = params.source ? params.source : 'flex';\n\n if (params.viewportWidth != null) {\n this.flexViewportWidth = params.viewportWidth;\n }\n\n if (!this.flexViewportWidth) { return []; }\n\n // If the grid has left-over space, divide it between flexing columns in proportion to their flex value.\n // A \"flexing column\" is one that has a 'flex' value set and is not currently being constrained by its\n // minWidth or maxWidth rules.\n\n let flexAfterDisplayIndex = -1;\n if (params.resizingCols) {\n params.resizingCols.forEach(col => {\n const indexOfCol = this.displayedColumnsCenter.indexOf(col);\n if (flexAfterDisplayIndex < indexOfCol) {\n flexAfterDisplayIndex = indexOfCol;\n }\n });\n }\n\n const isColFlex = (col: Column) => {\n const afterResizingCols = this.displayedColumnsCenter.indexOf(col) > flexAfterDisplayIndex;\n return col.getFlex() && afterResizingCols;\n };\n const knownWidthColumns = this.displayedColumnsCenter.filter(col => !isColFlex(col));\n const flexingColumns = this.displayedColumnsCenter.filter(col => isColFlex(col));\n const changedColumns: Column[] = [];\n\n if (!flexingColumns.length) {\n return [];\n }\n\n const flexingColumnSizes: number[] = [];\n let spaceForFlexingColumns: number;\n\n outer: while (true) {\n const totalFlex = flexingColumns.reduce((count, col) => count + col.getFlex(), 0);\n spaceForFlexingColumns = this.flexViewportWidth - this.getWidthOfColsInList(knownWidthColumns);\n for (let i = 0; i < flexingColumns.length; i++) {\n const col = flexingColumns[i];\n const widthByFlexRule = spaceForFlexingColumns * col.getFlex() / totalFlex;\n let constrainedWidth = 0;\n\n const minWidth = col.getMinWidth();\n const maxWidth = col.getMaxWidth();\n\n if (exists(minWidth) && widthByFlexRule < minWidth) {\n constrainedWidth = minWidth;\n } else if (exists(maxWidth) && widthByFlexRule > maxWidth) {\n constrainedWidth = maxWidth;\n }\n\n if (constrainedWidth) {\n // This column is not in fact flexing as it is being constrained to a specific size\n // so remove it from the list of flexing columns and start again\n col.setActualWidth(constrainedWidth, source);\n removeFromArray(flexingColumns, col);\n changedColumns.push(col);\n knownWidthColumns.push(col);\n continue outer;\n }\n\n flexingColumnSizes[i] = Math.round(widthByFlexRule);\n }\n break;\n }\n\n let remainingSpace = spaceForFlexingColumns;\n flexingColumns.forEach((col, i) => {\n col.setActualWidth(Math.min(flexingColumnSizes[i], remainingSpace), source);\n changedColumns.push(col);\n remainingSpace -= flexingColumnSizes[i];\n });\n\n if (!params.skipSetLeft) {\n this.setLeftValues(source);\n }\n\n if (params.updateBodyWidths) {\n this.updateBodyWidths();\n }\n\n if (params.fireResizedEvent) {\n this.fireColumnResizedEvent(changedColumns, true, source, flexingColumns);\n }\n\n // if the user sets rowData directly into GridOptions, then the row data is set before\n // grid is attached to the DOM. this means the columns are not flexed, and then the rows\n // have the wrong height (as they depend on column widths). so once the columns have\n // been flexed for the first time (only happens once grid is attached to DOM, as dependency\n // on getting the grid width, which only happens after attached after ResizeObserver fires)\n // we get get rows to re-calc their heights.\n if (!this.flexColsCalculatedAtLestOnce) {\n if (this.gridOptionsWrapper.isRowModelDefault()) {\n (this.rowModel as IClientSideRowModel).resetRowHeights();\n }\n this.flexColsCalculatedAtLestOnce = true;\n }\n\n return flexingColumns;\n }\n\n // called from api\n public sizeColumnsToFit(gridWidth: any, source: ColumnEventType = \"sizeColumnsToFit\", silent?: boolean): void {\n // avoid divide by zero\n const allDisplayedColumns = this.getAllDisplayedColumns();\n\n if (gridWidth <= 0 || !allDisplayedColumns.length) { return; }\n\n const colsToSpread: Column[] = [];\n const colsToNotSpread: Column[] = [];\n\n allDisplayedColumns.forEach(column => {\n if (column.getColDef().suppressSizeToFit === true) {\n colsToNotSpread.push(column);\n } else {\n colsToSpread.push(column);\n }\n });\n\n // make a copy of the cols that are going to be resized\n const colsToFireEventFor = colsToSpread.slice(0);\n let finishedResizing = false;\n\n const moveToNotSpread = (column: Column) => {\n removeFromArray(colsToSpread, column);\n colsToNotSpread.push(column);\n };\n\n // resetting cols to their original width makes the sizeColumnsToFit more deterministic,\n // rather than depending on the current size of the columns. most users call sizeColumnsToFit\n // immediately after grid is created, so will make no difference. however if application is calling\n // sizeColumnsToFit repeatedly (eg after column group is opened / closed repeatedly) we don't want\n // the columns to start shrinking / growing over time.\n //\n // NOTE: the process below will assign values to `this.actualWidth` of each column without firing events\n // for this reason we need to manually fire resize events after the resize has been done for each column.\n colsToSpread.forEach(column => column.resetActualWidth(source));\n\n while (!finishedResizing) {\n finishedResizing = true;\n const availablePixels = gridWidth - this.getWidthOfColsInList(colsToNotSpread);\n if (availablePixels <= 0) {\n // no width, set everything to minimum\n colsToSpread.forEach((column: Column) => {\n column.setMinimum(source);\n });\n } else {\n const scale = availablePixels / this.getWidthOfColsInList(colsToSpread);\n // we set the pixels for the last col based on what's left, as otherwise\n // we could be a pixel or two short or extra because of rounding errors.\n let pixelsForLastCol = availablePixels;\n // backwards through loop, as we are removing items as we go\n for (let i = colsToSpread.length - 1; i >= 0; i--) {\n const column = colsToSpread[i];\n const minWidth = column.getMinWidth();\n const maxWidth = column.getMaxWidth();\n let newWidth = Math.round(column.getActualWidth() * scale);\n\n if (exists(minWidth) && newWidth < minWidth) {\n newWidth = minWidth;\n moveToNotSpread(column);\n finishedResizing = false;\n } else if (exists(maxWidth) && column.isGreaterThanMax(newWidth)) {\n newWidth = maxWidth;\n moveToNotSpread(column);\n finishedResizing = false;\n } else if (i === 0) { // if this is the last column\n newWidth = pixelsForLastCol;\n }\n\n column.setActualWidth(newWidth, source, true);\n pixelsForLastCol -= newWidth;\n }\n }\n }\n\n // see notes above\n colsToFireEventFor.forEach(col => {\n col.fireColumnWidthChangedEvent(source);\n });\n\n this.setLeftValues(source);\n this.updateBodyWidths();\n\n if (silent) { return; }\n\n this.fireColumnResizedEvent(colsToFireEventFor, true, source);\n }\n\n private buildDisplayedTrees(visibleColumns: Column[]) {\n const leftVisibleColumns: Column[] = [];\n const rightVisibleColumns: Column[] = [];\n const centerVisibleColumns: Column[] = [];\n\n visibleColumns.forEach(column => {\n switch (column.getPinned()) {\n case \"left\":\n leftVisibleColumns.push(column);\n break;\n case \"right\":\n rightVisibleColumns.push(column);\n break;\n default:\n centerVisibleColumns.push(column);\n break;\n }\n });\n\n const groupInstanceIdCreator = new GroupInstanceIdCreator();\n\n this.displayedTreeLeft = this.displayedGroupCreator.createDisplayedGroups(\n leftVisibleColumns, this.gridBalancedTree, groupInstanceIdCreator, Constants.PINNED_LEFT, this.displayedTreeLeft);\n this.displayedTreeRight = this.displayedGroupCreator.createDisplayedGroups(\n rightVisibleColumns, this.gridBalancedTree, groupInstanceIdCreator, Constants.PINNED_RIGHT, this.displayedTreeRight);\n this.displayedTreeCentre = this.displayedGroupCreator.createDisplayedGroups(\n centerVisibleColumns, this.gridBalancedTree, groupInstanceIdCreator, null, this.displayedTreeCentre);\n\n this.updateDisplayedMap();\n }\n\n private updateDisplayedMap(): void {\n this.displayedColumnsAndGroupsMap = {};\n\n const func = (child: IHeaderColumn) => {\n this.displayedColumnsAndGroupsMap[child.getUniqueId()] = child;\n };\n\n this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeCentre, func);\n this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeLeft, func);\n this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeRight, func);\n }\n\n public isDisplayed(item: IHeaderColumn): boolean {\n const fromMap = this.displayedColumnsAndGroupsMap[item.getUniqueId()];\n // check for reference, in case new column / group with same id is now present\n return fromMap === item;\n }\n\n private updateOpenClosedVisibilityInColumnGroups(): void {\n const allColumnGroups = this.getAllDisplayedTrees();\n\n this.columnUtils.depthFirstAllColumnTreeSearch(allColumnGroups, child => {\n if (child instanceof ColumnGroup) {\n const columnGroup = child;\n columnGroup.calculateDisplayedColumns();\n }\n });\n }\n\n public getGroupAutoColumns(): Column[] | null {\n return this.groupAutoColumns;\n }\n\n private createGroupAutoColumnsIfNeeded(): void {\n if (!this.autoGroupsNeedBuilding) { return; }\n\n this.autoGroupsNeedBuilding = false;\n\n const groupFullWidthRow = this.gridOptionsWrapper.isGroupUseEntireRow(this.pivotMode);\n // we need to allow suppressing auto-column separately for group and pivot as the normal situation\n // is CSRM and user provides group column themselves for normal view, but when they go into pivot the\n // columns are generated by the grid so no opportunity for user to provide group column. so need a way\n // to suppress auto-col for grouping only, and not pivot.\n // however if using Viewport RM or SSRM and user is providing the columns, the user may wish full control\n // of the group column in this instance.\n const suppressAutoColumn = this.pivotMode ?\n this.gridOptionsWrapper.isPivotSuppressAutoColumn() : this.gridOptionsWrapper.isGroupSuppressAutoColumn();\n\n const groupingActive = this.rowGroupColumns.length > 0 || this.usingTreeData;\n const needAutoColumns = groupingActive && !suppressAutoColumn && !groupFullWidthRow;\n\n if (needAutoColumns) {\n const existingCols = this.groupAutoColumns || [];\n const newAutoGroupCols = this.autoGroupColService.createAutoGroupColumns(existingCols, this.rowGroupColumns);\n const autoColsDifferent = !this.autoColsEqual(newAutoGroupCols, this.groupAutoColumns);\n // we force recreate when suppressColumnStateEvents changes, so new group cols pick up the new\n // definitions. otherwise we could ignore the new cols because they appear to be the same.\n if (autoColsDifferent || this.forceRecreateAutoGroups) {\n this.groupAutoColumns = newAutoGroupCols;\n }\n } else {\n this.groupAutoColumns = null;\n }\n }\n\n private autoColsEqual(colsA: Column[] | null, colsB: Column[] | null): boolean {\n return areEqual(colsA, colsB, (a, b) => a.getColId() === b.getColId());\n }\n\n private getWidthOfColsInList(columnList: Column[]) {\n return columnList.reduce((width, col) => width + col.getActualWidth(), 0);\n }\n\n public getGridBalancedTree(): IProvidedColumn[] {\n return this.gridBalancedTree;\n }\n\n public hasFloatingFilters(): boolean {\n if (!this.gridColumns) { return false; }\n const res = this.gridColumns.some(col => col.getColDef().floatingFilter);\n return res;\n }\n\n public getFirstDisplayedColumn(): Column | null {\n const isRtl = this.gridOptionsWrapper.isEnableRtl();\n const queryOrder: ('getDisplayedLeftColumns' | 'getDisplayedCenterColumns' | 'getDisplayedRightColumns')[] = [\n 'getDisplayedLeftColumns',\n 'getDisplayedCenterColumns',\n 'getDisplayedRightColumns'\n ];\n\n if (isRtl) {\n queryOrder.reverse();\n }\n\n for (let i = 0; i < queryOrder.length; i++) {\n const container = this[queryOrder[i]]();\n if (container.length) {\n return isRtl ? last(container) : container[0];\n }\n }\n\n return null;\n }\n}\n","import { IHeaderColumn } from \"../entities/iHeaderColumn\";\nimport { ColumnGroup } from \"../entities/columnGroup\";\nimport { IProvidedColumn } from \"../entities/iProvidedColumn\";\nimport { ProvidedColumnGroup } from \"../entities/providedColumnGroup\";\nimport { Column } from \"../entities/column\";\nimport { Bean } from \"../context/context\";\nimport { BeanStub } from \"../context/beanStub\";\nimport { attrToNumber } from \"../utils/generic\";\nimport { ColDef } from \"../entities/colDef\";\n\n// takes in a list of columns, as specified by the column definitions, and returns column groups\n@Bean('columnUtils')\nexport class ColumnUtils extends BeanStub {\n\n public calculateColMinWidth(colDef: ColDef): number {\n return colDef.minWidth != null ? colDef.minWidth : this.gridOptionsWrapper.getMinColWidth();\n }\n\n public calculateColMaxWidth(colDef: ColDef): number {\n return colDef.maxWidth != null ? colDef.maxWidth : (this.gridOptionsWrapper.getMaxColWidth() || Number.MAX_SAFE_INTEGER);\n }\n\n public calculateColInitialWidth(colDef: ColDef): number {\n const minColWidth = this.calculateColMinWidth(colDef);\n const maxColWidth = this.calculateColMaxWidth(colDef);\n\n let width : number;\n const colDefWidth = attrToNumber(colDef.width);\n const colDefInitialWidth = attrToNumber(colDef.initialWidth);\n\n if (colDefWidth != null) {\n width = colDefWidth;\n } else if (colDefInitialWidth != null) {\n width = colDefInitialWidth;\n } else {\n width = this.gridOptionsWrapper.getColWidth();\n }\n\n return Math.max(Math.min(width, maxColWidth), minColWidth);\n }\n\n public getOriginalPathForColumn(column: Column, originalBalancedTree: IProvidedColumn[]): ProvidedColumnGroup[] | null {\n const result: ProvidedColumnGroup[] = [];\n let found = false;\n\n const recursePath = (balancedColumnTree: IProvidedColumn[], dept: number): void => {\n for (let i = 0; i < balancedColumnTree.length; i++) {\n if (found) { return; }\n // quit the search, so 'result' is kept with the found result\n\n const node = balancedColumnTree[i];\n if (node instanceof ProvidedColumnGroup) {\n const nextNode = node;\n recursePath(nextNode.getChildren(), dept + 1);\n result[dept] = node;\n } else if (node === column) {\n found = true;\n }\n }\n };\n\n recursePath(originalBalancedTree, 0);\n\n // we should always find the path, but in case there is a bug somewhere, returning null\n // will make it fail rather than provide a 'hard to track down' bug\n return found ? result : null;\n }\n\n public depthFirstOriginalTreeSearch(parent: ProvidedColumnGroup | null, tree: IProvidedColumn[], callback: (treeNode: IProvidedColumn, parent: ProvidedColumnGroup | null) => void): void {\n if (!tree) { return; }\n\n tree.forEach((child: IProvidedColumn) => {\n if (child instanceof ProvidedColumnGroup) {\n this.depthFirstOriginalTreeSearch(child, child.getChildren(), callback);\n }\n callback(child, parent);\n });\n\n }\n\n public depthFirstAllColumnTreeSearch(tree: IHeaderColumn[] | null, callback: (treeNode: IHeaderColumn) => void): void {\n if (!tree) { return; }\n\n tree.forEach((child: IHeaderColumn) => {\n if (child instanceof ColumnGroup) {\n this.depthFirstAllColumnTreeSearch(child.getChildren(), callback);\n }\n callback(child);\n });\n\n }\n\n public depthFirstDisplayedColumnTreeSearch(tree: IHeaderColumn[] | null, callback: (treeNode: IHeaderColumn) => void): void {\n if (!tree) { return; }\n\n tree.forEach((child: IHeaderColumn) => {\n if (child instanceof ColumnGroup) {\n this.depthFirstDisplayedColumnTreeSearch(child.getDisplayedChildren(), callback);\n }\n callback(child);\n });\n }\n}\n","import { Column } from \"../entities/column\";\nimport { IProvidedColumn } from \"../entities/iProvidedColumn\";\nimport { GroupInstanceIdCreator } from \"./groupInstanceIdCreator\";\nimport { IHeaderColumn } from \"../entities/iHeaderColumn\";\nimport { ColumnGroup } from \"../entities/columnGroup\";\nimport { ProvidedColumnGroup } from \"../entities/providedColumnGroup\";\nimport { Bean } from \"../context/context\";\nimport { BeanStub } from \"../context/beanStub\";\nimport { last } from \"../utils/array\";\nimport { exists } from \"../utils/generic\";\n\n// takes in a list of columns, as specified by the column definitions, and returns column groups\n@Bean('displayedGroupCreator')\nexport class DisplayedGroupCreator extends BeanStub {\n\n public createDisplayedGroups(\n // all displayed columns sorted - this is the columns the grid should show\n sortedVisibleColumns: Column[],\n // the tree of columns, as provided by the users, used to know what groups columns roll up into\n balancedColumnTree: IProvidedColumn[],\n // creates unique id's for the group\n groupInstanceIdCreator: GroupInstanceIdCreator,\n // whether it's left, right or center col\n pinned: 'left' | 'right' | null,\n // we try to reuse old groups if we can, to allow gui to do animation\n oldDisplayedGroups?: IHeaderColumn[]): IHeaderColumn[] {\n\n const result: IHeaderColumn[] = [];\n\n let previousRealPath: ColumnGroup[];\n let previousOriginalPath: ProvidedColumnGroup[];\n\n const oldColumnsMapped = this.mapOldGroupsById(oldDisplayedGroups!);\n\n // go through each column, then do a bottom up comparison to the previous column, and start\n // to share groups if they converge at any point.\n sortedVisibleColumns.forEach((currentColumn: Column) => {\n\n const currentOriginalPath = this.getOriginalPathForColumn(balancedColumnTree, currentColumn)!;\n const currentRealPath: ColumnGroup[] = [];\n const firstColumn = !previousOriginalPath;\n\n for (let i = 0; i < currentOriginalPath.length; i++) {\n if (firstColumn || currentOriginalPath[i] !== previousOriginalPath[i]) {\n // new group needed\n const newGroup = this.createColumnGroup(\n currentOriginalPath[i],\n groupInstanceIdCreator,\n oldColumnsMapped,\n pinned);\n\n currentRealPath[i] = newGroup;\n // if top level, add to result, otherwise add to parent\n if (i == 0) {\n result.push(newGroup);\n } else {\n currentRealPath[i - 1].addChild(newGroup);\n }\n } else {\n // reuse old group\n currentRealPath[i] = previousRealPath[i];\n }\n }\n\n const noColumnGroups = currentRealPath.length === 0;\n if (noColumnGroups) {\n // if we are not grouping, then the result of the above is an empty\n // path (no groups), and we just add the column to the root list.\n result.push(currentColumn);\n } else {\n const leafGroup = last(currentRealPath);\n leafGroup.addChild(currentColumn);\n }\n\n previousRealPath = currentRealPath;\n previousOriginalPath = currentOriginalPath;\n });\n\n this.setupParentsIntoColumns(result, null);\n\n return result;\n }\n\n private createColumnGroup(\n providedGroup: ProvidedColumnGroup,\n groupInstanceIdCreator: GroupInstanceIdCreator,\n oldColumnsMapped: {[key: string]: ColumnGroup},\n pinned: 'left' | 'right' | null\n ): ColumnGroup {\n\n const groupId = providedGroup.getGroupId();\n const instanceId = groupInstanceIdCreator.getInstanceIdForKey(groupId);\n const uniqueId = ColumnGroup.createUniqueId(groupId, instanceId);\n\n let columnGroup: ColumnGroup | null = oldColumnsMapped[uniqueId];\n\n // if the user is setting new colDefs, it is possible that the id's overlap, and we\n // would have a false match from above. so we double check we are talking about the\n // same original column group.\n if (columnGroup && columnGroup.getProvidedColumnGroup() !== providedGroup) {\n columnGroup = null;\n }\n\n if (exists(columnGroup)) {\n // clean out the old column group here, as we will be adding children into it again\n columnGroup.reset();\n } else {\n columnGroup = new ColumnGroup(providedGroup, groupId, instanceId, pinned);\n this.context.createBean(columnGroup);\n }\n\n return columnGroup;\n }\n\n // returns back a 2d map of ColumnGroup as follows: groupId -> instanceId -> ColumnGroup\n private mapOldGroupsById(displayedGroups: IHeaderColumn[]): {[uniqueId: string]: ColumnGroup} {\n const result: {[uniqueId: string]: ColumnGroup} = {};\n\n const recursive = (columnsOrGroups: IHeaderColumn[] | null) => {\n columnsOrGroups!.forEach(columnOrGroup => {\n if (columnOrGroup instanceof ColumnGroup) {\n const columnGroup = columnOrGroup;\n result[columnOrGroup.getUniqueId()] = columnGroup;\n recursive(columnGroup.getChildren());\n }\n });\n };\n\n if (displayedGroups) {\n recursive(displayedGroups);\n }\n\n return result;\n }\n\n private setupParentsIntoColumns(columnsOrGroups: IHeaderColumn[] | null, parent: ColumnGroup | null): void {\n columnsOrGroups!.forEach(columnsOrGroup => {\n columnsOrGroup.setParent(parent);\n if (columnsOrGroup instanceof ColumnGroup) {\n const columnGroup = columnsOrGroup;\n this.setupParentsIntoColumns(columnGroup.getChildren(), columnGroup);\n }\n });\n }\n\n private getOriginalPathForColumn(balancedColumnTree: IProvidedColumn[], column: Column): ProvidedColumnGroup[] | null {\n const result: ProvidedColumnGroup[] = [];\n let found = false;\n\n const recursePath = (columnTree: IProvidedColumn[], dept: number): void => {\n for (let i = 0; i < columnTree.length; i++) {\n // quit the search, so 'result' is kept with the found result\n if (found) { return; }\n\n const node = columnTree[i];\n\n if (node instanceof ProvidedColumnGroup) {\n recursePath(node.getChildren(), dept + 1);\n result[dept] = node;\n } else if (node === column) {\n found = true;\n }\n }\n };\n\n recursePath(balancedColumnTree, 0);\n\n // it's possible we didn't find a path. this happens if the column is generated\n // by the grid (auto-group), in that the definition didn't come from the client. in this case,\n // we create a fake original path.\n if (found) { return result; }\n\n console.warn('AG Grid: could not get path');\n\n return null;\n }\n}\n","/**\n * These keys are used for validating properties supplied on a gridOptions object, and for code generation.\n * If you change the properties on the gridOptions interface, you *must* update this file as well to be consistent.\n */\nexport class PropertyKeys {\n public static STRING_PROPERTIES = [\n 'sortingOrder', 'rowClass', 'rowSelection', 'overlayLoadingTemplate', 'overlayNoRowsTemplate',\n 'quickFilterText', 'rowModelType', 'editType', 'domLayout', 'clipboardDelimiter', 'rowGroupPanelShow',\n 'multiSortKey', 'pivotColumnGroupTotals', 'pivotRowTotals', 'pivotPanelShow', 'fillHandleDirection',\n 'serverSideStoreType', 'groupDisplayType', 'treeDataDisplayType'\n ];\n\n public static OBJECT_PROPERTIES = [\n 'components', 'frameworkComponents', 'rowStyle', 'context', 'autoGroupColumnDef', 'localeText', 'icons',\n 'datasource', 'serverSideDatasource', 'viewportDatasource', 'groupRowRendererParams', 'aggFuncs', 'fullWidthCellRendererParams',\n 'defaultColGroupDef', 'defaultColDef', 'defaultExportParams', 'defaultCsvExportParams', 'defaultExcelExportParams', 'columnTypes',\n 'rowClassRules', 'detailCellRendererParams', 'loadingCellRendererParams', 'loadingOverlayComponentParams',\n 'noRowsOverlayComponentParams', 'popupParent', 'colResizeDefault', 'statusBar', 'sideBar', 'chartThemeOverrides',\n 'customChartThemes'\n ];\n\n public static ARRAY_PROPERTIES = [\n 'alignedGrids', 'rowData', 'columnDefs', 'excelStyles', 'pinnedTopRowData', 'pinnedBottomRowData', 'chartThemes'\n ];\n\n public static NUMBER_PROPERTIES = [\n 'rowHeight', 'detailRowHeight', 'rowBuffer', 'colWidth', 'headerHeight', 'groupHeaderHeight', 'floatingFiltersHeight',\n 'pivotHeaderHeight', 'pivotGroupHeaderHeight', 'groupDefaultExpanded', 'minColWidth', 'maxColWidth', 'viewportRowModelPageSize',\n 'viewportRowModelBufferSize', 'autoSizePadding', 'maxBlocksInCache', 'maxConcurrentDatasourceRequests', 'tooltipShowDelay',\n 'tooltipHideDelay', 'cacheOverflowSize', 'paginationPageSize', 'cacheBlockSize', 'infiniteInitialRowCount', 'scrollbarWidth',\n 'batchUpdateWaitMillis', 'asyncTransactionWaitMillis', 'blockLoadDebounceMillis', 'keepDetailRowsCount',\n 'undoRedoCellEditingLimit', 'cellFlashDelay', 'cellFadeDelay', 'tabIndex'\n ];\n\n public static BOOLEAN_PROPERTIES = [\n 'suppressMakeColumnVisibleAfterUnGroup', 'suppressRowClickSelection', 'suppressCellSelection', 'suppressCellFocus', 'suppressHorizontalScroll',\n 'alwaysShowHorizontalScroll', 'alwaysShowVerticalScroll', 'debug', 'enableBrowserTooltips', 'enableCellExpressions',\n 'angularCompileRows', 'angularCompileFilters', 'groupSuppressAutoColumn', 'groupSelectsChildren', 'groupIncludeFooter',\n 'groupIncludeTotalFooter', 'groupUseEntireRow', 'groupSuppressBlankHeader', 'suppressMenuHide', 'suppressRowDeselection',\n 'unSortIcon', 'suppressMultiSort', 'alwaysMultiSort', 'singleClickEdit', 'suppressLoadingOverlay', 'suppressNoRowsOverlay', 'suppressAutoSize',\n 'skipHeaderOnAutoSize', 'suppressParentsInRowNodes', 'suppressColumnMoveAnimation', 'suppressMovableColumns',\n 'suppressFieldDotNotation', 'enableRangeSelection', 'enableRangeHandle', 'enableFillHandle', 'suppressClearOnFillReduction',\n 'deltaSort', 'suppressTouch', 'suppressAsyncEvents', 'allowContextMenuWithControlKey', 'suppressContextMenu',\n 'rememberGroupStateWhenNewData', 'enableCellChangeFlash', 'suppressDragLeaveHidesColumns', 'suppressMiddleClickScrolls',\n 'suppressPreventDefaultOnMouseWheel', 'suppressCopyRowsToClipboard', 'copyHeadersToClipboard', 'copyGroupHeadersToClipboard',\n 'pivotMode', 'suppressAggFuncInHeader', 'suppressColumnVirtualisation', 'suppressAggAtRootLevel', 'suppressFocusAfterRefresh',\n 'functionsPassive', 'functionsReadOnly', 'animateRows', 'groupSelectsFiltered', 'groupRemoveSingleChildren',\n 'groupRemoveLowestSingleChildren', 'enableRtl', 'suppressClickEdit', 'rowDragEntireRow', 'rowDragManaged', 'suppressRowDrag',\n 'suppressMoveWhenRowDragging', 'rowDragMultiRow', 'enableGroupEdit', 'embedFullWidthRows', 'deprecatedEmbedFullWidthRows',\n 'suppressPaginationPanel', 'groupHideOpenParents', 'groupMultiAutoColumn', 'pagination',\n 'stopEditingWhenGridLosesFocus', 'paginationAutoPageSize', 'suppressScrollOnNewData', 'suppressScrollWhenPopupsAreOpen',\n 'purgeClosedRowNodes', 'cacheQuickFilter', 'deltaRowDataMode', 'ensureDomOrder', 'accentedSort', 'suppressChangeDetection',\n 'valueCache', 'valueCacheNeverExpires', 'aggregateOnlyChangedColumns', 'suppressAnimationFrame', 'suppressExcelExport',\n 'suppressCsvExport', 'treeData', 'masterDetail', 'suppressMultiRangeSelection', 'enterMovesDownAfterEdit', 'enterMovesDown',\n 'suppressPropertyNamesCheck', 'rowMultiSelectWithClick', 'suppressEnterpriseResetOnNewColumns',\n 'suppressRowHoverHighlight', 'suppressRowTransform', 'suppressClipboardPaste', 'suppressLastEmptyLineOnPaste',\n 'serverSideSortingAlwaysResets', 'suppressSetColumnStateEvents', 'suppressColumnStateEvents', 'enableCharts', 'deltaColumnMode',\n 'suppressMaintainUnsortedOrder', 'enableCellTextSelection', 'suppressBrowserResizeObserver', 'suppressMaxRenderedRowRestriction',\n 'excludeChildrenWhenTreeDataFiltering', 'tooltipMouseTrack', 'keepDetailRows', 'paginateChildRows', 'preventDefaultOnContextMenu',\n 'undoRedoCellEditing', 'allowDragFromColumnsToolPanel', 'immutableData', 'immutableColumns', 'pivotSuppressAutoColumn',\n 'suppressExpandablePivotGroups', 'applyColumnDefOrder', 'debounceVerticalScrollbar', 'detailRowAutoHeight',\n 'serverSideFilteringAlwaysResets', 'suppressAggFilteredOnly', 'showOpenedGroup', 'suppressClipboardApi',\n 'suppressModelUpdateAfterUpdateTransaction', 'stopEditingWhenCellsLoseFocus', 'maintainColumnOrder', 'groupMaintainOrder',\n 'columnHoverHighlight', 'reactUi', 'suppressReactUi', 'readOnlyEdit', 'suppressRowVirtualisation',\n 'resetRowDataOnUpdate', 'removePivotHeaderRowWhenSingleValueColumn', 'suppressCopySingleCellRanges'\n ];\n\n /** You do not need to include event callbacks in this list, as they are generated automatically. */\n public static FUNCTION_PROPERTIES = [\n 'localeTextFunc', 'getLocaleText', 'groupRowInnerRenderer', 'groupRowInnerRendererFramework',\n 'groupRowRenderer', 'groupRowRendererFramework', 'isExternalFilterPresent', 'getRowHeight', 'doesExternalFilterPass',\n 'getRowClass', 'getRowStyle', 'getContextMenuItems', 'getMainMenuItems', 'processRowPostCreate', 'processCellForClipboard',\n 'groupRowAggNodes', 'getGroupRowAgg', 'getRowNodeId', 'isFullWidthCell', 'isFullWidthRow', 'fullWidthCellRenderer', 'fullWidthCellRendererFramework',\n 'processSecondaryColDef', 'processSecondaryColGroupDef',\n 'getBusinessKeyForNode', 'sendToClipboard', 'navigateToNextHeader',\n 'tabToNextHeader', 'navigateToNextCell', 'tabToNextCell', 'processCellFromClipboard', 'getDocument', 'postProcessPopup',\n 'getChildCount', 'getDataPath', 'loadingCellRenderer', 'loadingCellRendererFramework', 'loadingOverlayComponent',\n 'loadingOverlayComponentFramework', 'noRowsOverlayComponent', 'noRowsOverlayComponentFramework', 'detailCellRenderer',\n 'detailCellRendererFramework', 'isRowMaster', 'isRowSelectable', 'postSort', 'postSortRows', 'processHeaderForClipboard', 'processGroupHeaderForClipboard',\n 'paginationNumberFormatter', 'processDataFromClipboard', 'getServerSideGroupKey', 'isServerSideGroup', 'suppressKeyboardEvent',\n 'createChartContainer', 'getChartToolbarItems', 'fillOperation', 'isApplyServerSideTransaction', 'getServerSideStoreParams',\n 'isServerSideGroupOpenByDefault', 'isGroupOpenByDefault', 'defaultGroupSortComparator', 'defaultGroupOrderComparator', 'initialGroupOrderComparator',\n 'loadingCellRendererSelector', 'getRowId', 'groupAggFiltering'\n ];\n\n public static ALL_PROPERTIES = [\n ...PropertyKeys.ARRAY_PROPERTIES,\n ...PropertyKeys.OBJECT_PROPERTIES,\n ...PropertyKeys.STRING_PROPERTIES,\n ...PropertyKeys.NUMBER_PROPERTIES,\n ...PropertyKeys.FUNCTION_PROPERTIES,\n ...PropertyKeys.BOOLEAN_PROPERTIES\n ];\n\n /**\n * Used when performing property checks. This avoids noise caused when using frameworks, which can add their own\n * framework-specific properties to colDefs, gridOptions etc.\n */\n public static FRAMEWORK_PROPERTIES = [\n '__ob__', '__v_skip', '__metadata__', 'mappedColumnProperties', 'hasChildColumns', 'toColDef', 'createColDefFromGridColumn'\n ];\n}\n","import { GridOptions } from '../entities/gridOptions';\nimport { GridApi } from '../gridApi';\nimport { ComponentStateChangedEvent, Events } from '../events';\nimport { PropertyKeys } from '../propertyKeys';\nimport { ColumnApi } from '../columns/columnApi';\nimport { iterateObject } from '../utils/object';\nimport { includes } from '../utils/array';\nimport { values } from '../utils/generic';\n\nexport class ComponentUtil {\n\n // all the events are populated in here AFTER this class (at the bottom of the file).\n public static EVENTS: string[] = [];\n\n // events that are available for use by users of AG Grid and so should be documented\n public static PUBLIC_EVENTS: string[] = [];\n\n // events that are internal to AG Grid and should not be exposed to users via documentation or generated framework components\n public static EXCLUDED_INTERNAL_EVENTS: string[] = [];\n\n // function below fills this with onXXX methods, based on the above events\n private static EVENT_CALLBACKS: string[];\n\n public static STRING_PROPERTIES = PropertyKeys.STRING_PROPERTIES;\n public static OBJECT_PROPERTIES = PropertyKeys.OBJECT_PROPERTIES;\n public static ARRAY_PROPERTIES = PropertyKeys.ARRAY_PROPERTIES;\n public static NUMBER_PROPERTIES = PropertyKeys.NUMBER_PROPERTIES;\n public static BOOLEAN_PROPERTIES = PropertyKeys.BOOLEAN_PROPERTIES;\n public static FUNCTION_PROPERTIES = PropertyKeys.FUNCTION_PROPERTIES;\n public static ALL_PROPERTIES = PropertyKeys.ALL_PROPERTIES;\n\n public static getEventCallbacks(): string[] {\n if (!ComponentUtil.EVENT_CALLBACKS) {\n ComponentUtil.EVENT_CALLBACKS = ComponentUtil.EVENTS.map(event => ComponentUtil.getCallbackForEvent(event));\n }\n\n return ComponentUtil.EVENT_CALLBACKS;\n }\n\n public static copyAttributesToGridOptions(gridOptions: GridOptions | undefined, component: any, skipEventDeprecationCheck: boolean = false): GridOptions {\n\n // create empty grid options if none were passed\n if (typeof gridOptions !== 'object') {\n gridOptions = {} as GridOptions;\n }\n\n // to allow array style lookup in TypeScript, take type away from 'this' and 'gridOptions'\n const pGridOptions = gridOptions as any;\n const keyExists = (key: string) => typeof component[key] !== 'undefined';\n\n // if groupAggFiltering exists and isn't a function, handle as a boolean.\n if (keyExists('groupAggFiltering') && typeof component.groupAggFiltering !== 'function') {\n pGridOptions.groupAggFiltering = ComponentUtil.toBoolean(component.groupAggFiltering);\n delete component.groupAggFiltering;\n }\n\n // add in all the simple properties\n [\n ...ComponentUtil.ARRAY_PROPERTIES,\n ...ComponentUtil.STRING_PROPERTIES,\n ...ComponentUtil.OBJECT_PROPERTIES,\n ...ComponentUtil.FUNCTION_PROPERTIES,\n ...ComponentUtil.getEventCallbacks(),\n ]\n .filter(keyExists)\n .forEach(key => pGridOptions[key] = component[key]);\n\n ComponentUtil.BOOLEAN_PROPERTIES\n .filter(keyExists)\n .forEach(key => pGridOptions[key] = ComponentUtil.toBoolean(component[key]));\n\n ComponentUtil.NUMBER_PROPERTIES\n .filter(keyExists)\n .forEach(key => pGridOptions[key] = ComponentUtil.toNumber(component[key]));\n\n return gridOptions;\n }\n\n public static getCallbackForEvent(eventName: string): string {\n if (!eventName || eventName.length < 2) {\n return eventName;\n }\n\n return 'on' + eventName[0].toUpperCase() + eventName.substr(1);\n }\n\n public static processOnChange(changes: any, gridOptions: GridOptions, api: GridApi, columnApi: ColumnApi): void {\n if (!changes) {\n return;\n }\n\n const changesToApply = { ...changes };\n\n // to allow array style lookup in TypeScript, take type away from 'this' and 'gridOptions'\n const pGridOptions = gridOptions as any;\n const keyExists = (key: string) => changesToApply[key];\n\n // if groupAggFiltering exists and isn't a function, handle as a boolean.\n if (keyExists('groupAggFiltering')) {\n if (typeof changesToApply.groupAggFiltering === 'function') {\n pGridOptions.groupAggFiltering = changesToApply.groupAggFiltering;\n } else {\n pGridOptions.groupAggFiltering = ComponentUtil.toBoolean(changesToApply.groupAggFiltering);\n }\n delete changesToApply.groupAggFiltering;\n }\n\n // we need to do this before the generic handling, otherwise value gets set before we\n // try to set it, and the grid then doesn't refresh the rows as it doesn't see any change.\n // also it's possible we use the generic code setXXX below and put it up there instead,\n // cover all cases.\n if (changesToApply.rowClass) {\n api.setRowClass(changesToApply.rowClass.currentValue);\n delete changesToApply.rowClass;\n }\n\n // check if any change for the simple types, and if so, then just copy in the new value\n [\n ...ComponentUtil.ARRAY_PROPERTIES,\n ...ComponentUtil.OBJECT_PROPERTIES,\n ...ComponentUtil.STRING_PROPERTIES,\n ...ComponentUtil.getEventCallbacks(),\n ]\n .filter(keyExists)\n .forEach(key => pGridOptions[key] = changesToApply[key].currentValue);\n\n ComponentUtil.BOOLEAN_PROPERTIES\n .filter(keyExists)\n .forEach(key => pGridOptions[key] = ComponentUtil.toBoolean(changesToApply[key].currentValue));\n\n ComponentUtil.NUMBER_PROPERTIES\n .filter(keyExists)\n .forEach(key => pGridOptions[key] = ComponentUtil.toNumber(changesToApply[key].currentValue));\n\n if (changesToApply.enableCellTextSelection) {\n api.setEnableCellTextSelection(ComponentUtil.toBoolean(changesToApply.enableCellTextSelection.currentValue));\n delete changesToApply.enableCellTextSelection;\n }\n\n if (changesToApply.quickFilterText) {\n api.setQuickFilter(changesToApply.quickFilterText.currentValue);\n delete changesToApply.quickFilterText;\n }\n\n if (changesToApply.autoGroupColumnDef) {\n api.setAutoGroupColumnDef(changesToApply.autoGroupColumnDef.currentValue, \"gridOptionsChanged\");\n delete changesToApply.autoGroupColumnDef;\n }\n\n if (changesToApply.columnDefs) {\n api.setColumnDefs(changesToApply.columnDefs.currentValue, \"gridOptionsChanged\");\n delete changesToApply.columnDefs;\n }\n\n if (changesToApply.defaultColDef) {\n api.setDefaultColDef(changesToApply.defaultColDef.currentValue, \"gridOptionsChanged\");\n delete changesToApply.defaultColDef;\n }\n\n if (changesToApply.paginationPageSize) {\n api.paginationSetPageSize(ComponentUtil.toNumber(changesToApply.paginationPageSize.currentValue));\n delete changesToApply.paginationPageSize;\n }\n\n if (changesToApply.pivotMode) {\n columnApi.setPivotMode(ComponentUtil.toBoolean(changesToApply.pivotMode.currentValue));\n delete changesToApply.pivotMode;\n }\n\n if (changesToApply.groupRemoveSingleChildren) {\n api.setGroupRemoveSingleChildren(ComponentUtil.toBoolean(changesToApply.groupRemoveSingleChildren.currentValue));\n delete changesToApply.groupRemoveSingleChildren;\n }\n\n if (changesToApply.suppressRowDrag) {\n api.setSuppressRowDrag(ComponentUtil.toBoolean(changesToApply.suppressRowDrag.currentValue));\n delete changesToApply.suppressRowDrag;\n }\n\n if (changesToApply.suppressMoveWhenRowDragging) {\n api.setSuppressMoveWhenRowDragging(ComponentUtil.toBoolean(changesToApply.suppressMoveWhenRowDragging.currentValue));\n delete changesToApply.suppressMoveWhenRowDragging;\n }\n\n if (changesToApply.suppressRowClickSelection) {\n api.setSuppressRowClickSelection(ComponentUtil.toBoolean(changesToApply.suppressRowClickSelection.currentValue));\n delete changesToApply.suppressRowClickSelection;\n }\n\n if (changesToApply.suppressClipboardPaste) {\n api.setSuppressClipboardPaste(ComponentUtil.toBoolean(changesToApply.suppressClipboardPaste.currentValue));\n delete changesToApply.suppressClipboardPaste;\n }\n\n if (changesToApply.headerHeight) {\n api.setHeaderHeight(ComponentUtil.toNumber(changesToApply.headerHeight.currentValue));\n delete changesToApply.headerHeight;\n }\n\n // any remaining properties can be set in a generic way\n // ie the setter takes the form of setXXX and the argument requires no formatting/translation first\n const dynamicApi = (api as any);\n Object.keys(changesToApply)\n .forEach(property => {\n const setterName = `set${property.charAt(0).toUpperCase()}${property.substring(1)}`;\n\n if (dynamicApi[setterName]) {\n dynamicApi[setterName](changes[property].currentValue);\n }\n });\n\n // copy changes into an event for dispatch\n const event: ComponentStateChangedEvent = {\n type: Events.EVENT_COMPONENT_STATE_CHANGED,\n api: gridOptions.api!,\n columnApi: gridOptions.columnApi!\n };\n\n iterateObject(changes, (key: string, value: any) => {\n (event as any)[key] = value;\n });\n\n api.dispatchEvent(event);\n }\n\n public static toBoolean(value: any): boolean {\n if (typeof value === 'boolean') {\n return value;\n }\n\n if (typeof value === 'string') {\n // for boolean, compare to empty String to allow attributes appearing with\n // no value to be treated as 'true'\n return value.toUpperCase() === 'TRUE' || value == '';\n }\n\n return false;\n }\n\n public static toNumber(value: any): number | undefined {\n if (typeof value === 'number') {\n return value;\n }\n\n if (typeof value === 'string') {\n return Number(value);\n }\n }\n}\n\nComponentUtil.EVENTS = values(Events);\n\n/** Exclude the following internal events from code generation to prevent exposing these events via framework components */\nComponentUtil.EXCLUDED_INTERNAL_EVENTS = [\n Events.EVENT_SCROLLBAR_WIDTH_CHANGED,\n Events.EVENT_CHECKBOX_CHANGED,\n Events.EVENT_HEIGHT_SCALE_CHANGED,\n Events.EVENT_BODY_HEIGHT_CHANGED,\n Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,\n Events.EVENT_SCROLL_VISIBILITY_CHANGED,\n Events.EVENT_COLUMN_HOVER_CHANGED,\n Events.EVENT_FLASH_CELLS,\n Events.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,\n Events.EVENT_DISPLAYED_ROWS_CHANGED,\n Events.EVENT_LEFT_PINNED_WIDTH_CHANGED,\n Events.EVENT_RIGHT_PINNED_WIDTH_CHANGED,\n Events.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,\n Events.EVENT_POPUP_TO_FRONT,\n Events.EVENT_KEYBOARD_FOCUS,\n Events.EVENT_MOUSE_FOCUS,\n Events.EVENT_STORE_UPDATED,\n Events.EVENT_COLUMN_PANEL_ITEM_DRAG_START,\n Events.EVENT_COLUMN_PANEL_ITEM_DRAG_END,\n Events.EVENT_FILL_START,\n Events.EVENT_FILL_END,\n Events.EVENT_FULL_WIDTH_ROW_FOCUSED\n];\n\n/** EVENTS that should be exposed via code generation for the framework components. */\nComponentUtil.PUBLIC_EVENTS = ComponentUtil.EVENTS.filter(e => !includes(ComponentUtil.EXCLUDED_INTERNAL_EVENTS, e));\n","import { Bean, ComponentMeta } from \"../context/context\";\nimport { BeanStub } from \"../context/beanStub\";\n\n@Bean('agStackComponentsRegistry')\nexport class AgStackComponentsRegistry extends BeanStub {\n\n private componentsMappedByName: { [key: string]: any } = {};\n\n public setupComponents(components: ComponentMeta[]): void {\n if (components) {\n components.forEach(componentMeta => this.addComponent(componentMeta));\n }\n }\n\n private addComponent(componentMeta: ComponentMeta): void {\n // get name of the class as a string\n // let className = getNameOfClass(ComponentClass);\n // insert a dash after every capital letter\n // let classEscaped = className.replace(/([A-Z])/g, \"-$1\").toLowerCase();\n const classEscaped = componentMeta.componentName.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase();\n // put all to upper case\n const classUpperCase = classEscaped.toUpperCase();\n // finally store\n this.componentsMappedByName[classUpperCase] = componentMeta.componentClass;\n }\n\n public getComponentClass(htmlTag: string): any {\n return this.componentsMappedByName[htmlTag];\n }\n\n}\n","export class ColDefUtil {\n public static STRING_PROPERTIES = [\n 'headerName',\n 'columnGroupShow',\n 'headerClass',\n 'toolPanelClass',\n 'headerValueGetter',\n 'pivotKeys',\n 'groupId',\n 'colId',\n 'sort',\n 'initialSort',\n 'field',\n 'type',\n 'tooltipComponent',\n 'tooltipField',\n 'headerTooltip',\n 'cellClass',\n 'showRowGroup',\n 'filter',\n 'initialAggFunc',\n 'defaultAggFunc',\n 'aggFunc',\n 'pinned',\n 'initialPinned',\n 'chartDataType',\n 'cellEditorPopupPosition'\n ];\n\n public static OBJECT_PROPERTIES = [\n 'headerGroupComponent',\n 'headerGroupComponentFramework',\n 'headerGroupComponentParams',\n 'cellStyle',\n 'cellRenderer',\n 'cellRendererParams',\n 'cellRendererFramework',\n 'cellEditor',\n 'cellEditorFramework',\n 'cellEditorParams',\n 'pinnedRowCellRendererFramework',\n 'pinnedRowCellRendererParams',\n 'filterFramework',\n 'filterParams',\n 'pivotValueColumn',\n 'headerComponent',\n 'headerComponentFramework',\n 'headerComponentParams',\n 'floatingFilterComponent',\n 'floatingFilterComponentParams',\n 'floatingFilterComponentFramework',\n 'floatingFilterFramework',\n 'tooltipComponent',\n 'tooltipComponentParams',\n 'tooltipComponentFramework',\n 'refData',\n 'columnsMenuParams'\n ];\n\n public static ARRAY_PROPERTIES = [\n 'children',\n 'sortingOrder',\n 'allowedAggFuncs',\n 'menuTabs',\n 'pivotTotalColumnIds',\n 'cellClassRules',\n 'icons'];\n\n public static NUMBER_PROPERTIES = [\n 'sortedAt',\n 'sortIndex',\n 'initialSortIndex',\n 'flex',\n 'initialFlex',\n 'width',\n 'initialWidth',\n 'minWidth',\n 'maxWidth',\n 'rowGroupIndex',\n 'initialRowGroupIndex',\n 'pivotIndex',\n 'initialPivotIndex'];\n\n public static BOOLEAN_PROPERTIES = [\n 'suppressCellFlash',\n 'suppressColumnsToolPanel',\n 'suppressFiltersToolPanel',\n 'openByDefault',\n 'marryChildren',\n 'hide',\n 'initialHide',\n 'rowGroup',\n 'initialRowGroup',\n 'pivot',\n 'initialPivot',\n 'checkboxSelection',\n 'headerCheckboxSelection',\n 'headerCheckboxSelectionFilteredOnly',\n 'suppressMenu',\n 'suppressMovable',\n 'lockPosition',\n 'lockVisible',\n 'lockPinned',\n 'unSortIcon',\n 'suppressSizeToFit',\n 'suppressAutoSize',\n 'enableRowGroup',\n 'enablePivot',\n 'enableValue',\n 'editable',\n 'suppressPaste',\n 'suppressNavigable',\n 'enableCellChangeFlash',\n 'rowDrag',\n 'dndSource',\n 'autoHeight',\n 'wrapText',\n 'sortable',\n 'resizable',\n 'singleClickEdit',\n 'floatingFilter',\n 'cellEditorPopup',\n 'suppressFillHandle'\n ];\n\n public static FUNCTION_PROPERTIES = [\n 'dndSourceOnRowDrag',\n 'valueGetter',\n 'valueSetter',\n 'filterValueGetter',\n 'keyCreator',\n 'pinnedRowCellRenderer',\n 'valueFormatter',\n 'pinnedRowValueFormatter',\n 'valueParser',\n 'comparator',\n 'equals',\n 'pivotComparator',\n 'suppressKeyboardEvent',\n 'suppressHeaderKeyboardEvent',\n 'colSpan',\n 'rowSpan',\n 'getQuickFilterText',\n 'newValueHandler',\n 'onCellValueChanged',\n 'onCellClicked',\n 'onCellDoubleClicked',\n 'onCellContextMenu',\n 'rowDragText',\n 'tooltipValueGetter',\n 'tooltipComponent',\n 'tooltipComponentFramework',\n 'cellRendererSelector',\n 'cellEditorSelector'\n ];\n\n public static ALL_PROPERTIES = [\n ...ColDefUtil.ARRAY_PROPERTIES,\n ...ColDefUtil.OBJECT_PROPERTIES,\n ...ColDefUtil.STRING_PROPERTIES,\n ...ColDefUtil.NUMBER_PROPERTIES,\n ...ColDefUtil.FUNCTION_PROPERTIES,\n ...ColDefUtil.BOOLEAN_PROPERTIES\n ];\n\n // used when doing property checks - this causes noise when using frameworks which can add their own fw specific\n // properties to colDefs, gridOptions etc\n public static FRAMEWORK_PROPERTIES = [\n '__ob__',\n '__v_skip',\n '__metadata__',\n 'mappedColumnProperties',\n 'hasChildColumns',\n 'toColDef',\n 'createColDefFromGridColumn'\n ];\n}\n","export class Color {\n\n readonly r: number;\n readonly g: number;\n readonly b: number;\n readonly a: number;\n\n /**\n * Every color component should be in the [0, 1] range.\n * Some easing functions (such as elastic easing) can overshoot the target value by some amount.\n * So, when animating colors, if the source or target color components are already near\n * or at the edge of the allowed [0, 1] range, it is possible for the intermediate color\n * component value to end up outside of that range mid-animation. For this reason the constructor\n * performs range checking/constraining.\n * @param r Red component.\n * @param g Green component.\n * @param b Blue component.\n * @param a Alpha (opacity) component.\n */\n constructor(r: number, g: number, b: number, a: number = 1) {\n // NaN is treated as 0.\n this.r = Math.min(1, Math.max(0, r || 0));\n this.g = Math.min(1, Math.max(0, g || 0));\n this.b = Math.min(1, Math.max(0, b || 0));\n this.a = Math.min(1, Math.max(0, a || 0));\n }\n\n /**\n * The given string can be in one of the following formats:\n * - #rgb\n * - #rrggbb\n * - rgb(r, g, b)\n * - rgba(r, g, b, a)\n * - CSS color name such as 'white', 'orange', 'cyan', etc.\n * @param str\n */\n static fromString(str: string): Color {\n // hexadecimal notation\n if (str.indexOf('#') >= 0) { // there can be some leading whitespace\n return Color.fromHexString(str);\n }\n\n // color name\n const hex = Color.nameToHex[str];\n if (hex) {\n return Color.fromHexString(hex);\n }\n\n // rgb(a) notation\n if (str.indexOf('rgb') >= 0) {\n return Color.fromRgbaString(str);\n }\n\n throw new Error(`Invalid color string: '${str}'`);\n }\n\n // See https://drafts.csswg.org/css-color/#hex-notation\n static parseHex(input: string): [number, number, number, number] | undefined {\n input = input.replace(/ /g, '').slice(1);\n let parts: any;\n\n switch (input.length) {\n case 6:\n case 8:\n parts = [];\n for (let i = 0; i < input.length; i += 2) {\n parts.push(parseInt(`${input[i]}${input[i + 1]}`, 16));\n }\n break;\n case 3:\n case 4:\n parts = input.split('').map(p => parseInt(p, 16)).map(p => p + p * 16);\n break;\n }\n\n if (parts.length >= 3) {\n if (parts.every((p: number) => p >= 0)) {\n if (parts.length === 3) {\n parts.push(255);\n }\n return parts;\n }\n }\n }\n\n static fromHexString(str: string): Color {\n const values = Color.parseHex(str);\n if (values) {\n const [r, g, b, a] = values;\n return new Color(r / 255, g / 255, b / 255, a / 255);\n }\n\n throw new Error(`Malformed hexadecimal color string: '${str}'`);\n }\n\n private static stringToRgba(str: string): number[] | undefined {\n // Find positions of opening and closing parentheses.\n let [po, pc] = [NaN, NaN];\n for (let i = 0; i < str.length; i++) {\n const c = str[i];\n if (!po && c === '(') {\n po = i;\n } else if (c === ')') {\n pc = i;\n break;\n }\n }\n\n const contents = po && pc && str.substring(po + 1, pc);\n if (!contents) {\n return;\n }\n\n const parts = contents.split(',');\n const rgba: number[] = [];\n\n for (let i = 0; i < parts.length; i++) {\n const part = parts[i];\n let value = parseFloat(part);\n if (isNaN(value)) {\n return;\n }\n if (part.indexOf('%') >= 0) { // percentage r, g, or b value\n value = Math.max(0, Math.min(100, value));\n value /= 100;\n } else {\n if (i === 3) { // alpha component\n value = Math.max(0, Math.min(1, value));\n } else { // absolute r, g, or b value\n value = Math.max(0, Math.min(255, value));\n value /= 255;\n }\n }\n rgba.push(value);\n }\n\n return rgba;\n }\n\n static fromRgbaString(str: string): Color {\n const rgba = Color.stringToRgba(str);\n\n if (rgba) {\n if (rgba.length === 3) {\n return new Color(rgba[0], rgba[1], rgba[2]);\n } else if (rgba.length === 4) {\n return new Color(rgba[0], rgba[1], rgba[2], rgba[3]);\n }\n }\n\n throw new Error(`Malformed rgb/rgba color string: '${str}'`);\n }\n\n static fromArray(arr: [number, number, number] | [number, number, number, number]): Color {\n if (arr.length === 4) {\n return new Color(arr[0], arr[1], arr[2], arr[3]);\n }\n if (arr.length === 3) {\n return new Color(arr[0], arr[1], arr[2]);\n }\n throw new Error('The given array should contain 3 or 4 color components (numbers).');\n }\n\n static fromHSB(h: number, s: number, b: number, alpha = 1): Color {\n const rgb = Color.HSBtoRGB(h, s, b);\n return new Color(rgb[0], rgb[1], rgb[2], alpha);\n }\n\n private static padHex(str: string): string {\n // Can't use `padStart(2, '0')` here because of IE.\n return str.length === 1 ? '0' + str : str;\n }\n\n toHexString(): string {\n let hex = '#'\n + Color.padHex(Math.round(this.r * 255).toString(16))\n + Color.padHex(Math.round(this.g * 255).toString(16))\n + Color.padHex(Math.round(this.b * 255).toString(16));\n\n if (this.a < 1) {\n hex += Color.padHex(Math.round(this.a * 255).toString(16));\n }\n\n return hex;\n }\n\n toRgbaString(fractionDigits = 3): string {\n const components: number[] = [\n Math.round(this.r * 255),\n Math.round(this.g * 255),\n Math.round(this.b * 255)\n ];\n\n const k = Math.pow(10, fractionDigits);\n\n if (this.a !== 1) {\n components.push(Math.round(this.a * k) / k);\n return `rgba(${components.join(', ')})`;\n }\n\n return `rgb(${components.join(', ')})`;\n }\n\n toString(): string {\n if (this.a === 1) {\n return this.toHexString();\n }\n return this.toRgbaString();\n }\n\n toHSB(): [number, number, number] {\n return Color.RGBtoHSB(this.r, this.g, this.b);\n }\n\n /**\n * Converts the given RGB triple to an array of HSB (HSV) components.\n * The hue component will be `NaN` for achromatic colors.\n */\n static RGBtoHSB(r: number, g: number, b: number): [number, number, number] {\n const min = Math.min(r, g, b);\n const max = Math.max(r, g, b);\n\n const S = max !== 0 ? (max - min) / max : 0;\n let H = NaN;\n\n // min == max, means all components are the same\n // and the color is a shade of gray with no hue (H is NaN)\n if (min !== max) {\n const delta = max - min;\n const rc = (max - r) / delta;\n const gc = (max - g) / delta;\n const bc = (max - b) / delta;\n if (r === max) {\n H = bc - gc;\n } else if (g === max) {\n H = 2.0 + rc - bc;\n } else {\n H = 4.0 + gc - rc;\n }\n H /= 6.0;\n if (H < 0) {\n H = H + 1.0;\n }\n }\n\n return [H * 360, S, max];\n }\n\n /**\n * Converts the given HSB (HSV) triple to an array of RGB components.\n */\n static HSBtoRGB(H: number, S: number, B: number): [number, number, number] {\n if (isNaN(H)) {\n H = 0;\n }\n H = (((H % 360) + 360) % 360) / 360; // normalize hue to [0, 360] interval, then scale to [0, 1]\n\n let r = 0;\n let g = 0;\n let b = 0;\n\n if (S === 0) {\n r = g = b = B;\n } else {\n const h = (H - Math.floor(H)) * 6;\n const f = h - Math.floor(h);\n const p = B * (1 - S);\n const q = B * (1 - S * f);\n const t = B * (1 - (S * (1 - f)));\n switch (h >> 0) { // discard the floating point part of the number\n case 0:\n r = B;\n g = t;\n b = p;\n break;\n case 1:\n r = q;\n g = B;\n b = p;\n break;\n case 2:\n r = p;\n g = B;\n b = t;\n break;\n case 3:\n r = p;\n g = q;\n b = B;\n break;\n case 4:\n r = t;\n g = p;\n b = B;\n break;\n case 5:\n r = B;\n g = p;\n b = q;\n break;\n }\n }\n return [r, g, b];\n }\n\n private derive(hueShift: number, saturationFactor: number, brightnessFactor: number, opacityFactor: number): Color {\n const hsb = Color.RGBtoHSB(this.r, this.g, this.b);\n\n let b = hsb[2];\n if (b == 0 && brightnessFactor > 1.0) {\n b = 0.05;\n }\n\n const h = (((hsb[0] + hueShift) % 360) + 360) % 360;\n const s = Math.max(Math.min(hsb[1] * saturationFactor, 1.0), 0.0);\n b = Math.max(Math.min(b * brightnessFactor, 1.0), 0.0);\n const a = Math.max(Math.min(this.a * opacityFactor, 1.0), 0.0);\n const rgba = Color.HSBtoRGB(h, s, b);\n rgba.push(a);\n return Color.fromArray(rgba);\n }\n\n brighter(): Color {\n return this.derive(0, 1.0, 1.0 / 0.7, 1.0);\n }\n\n darker(): Color {\n return this.derive(0, 1.0, 0.7, 1.0);\n }\n\n /**\n * CSS Color Module Level 4:\n * https://drafts.csswg.org/css-color/#named-colors\n */\n private static nameToHex: { [key: string]: string } = Object.freeze({\n aliceblue: '#F0F8FF',\n antiquewhite: '#FAEBD7',\n aqua: '#00FFFF',\n aquamarine: '#7FFFD4',\n azure: '#F0FFFF',\n beige: '#F5F5DC',\n bisque: '#FFE4C4',\n black: '#000000',\n blanchedalmond: '#FFEBCD',\n blue: '#0000FF',\n blueviolet: '#8A2BE2',\n brown: '#A52A2A',\n burlywood: '#DEB887',\n cadetblue: '#5F9EA0',\n chartreuse: '#7FFF00',\n chocolate: '#D2691E',\n coral: '#FF7F50',\n cornflowerblue: '#6495ED',\n cornsilk: '#FFF8DC',\n crimson: '#DC143C',\n cyan: '#00FFFF',\n darkblue: '#00008B',\n darkcyan: '#008B8B',\n darkgoldenrod: '#B8860B',\n darkgray: '#A9A9A9',\n darkgreen: '#006400',\n darkgrey: '#A9A9A9',\n darkkhaki: '#BDB76B',\n darkmagenta: '#8B008B',\n darkolivegreen: '#556B2F',\n darkorange: '#FF8C00',\n darkorchid: '#9932CC',\n darkred: '#8B0000',\n darksalmon: '#E9967A',\n darkseagreen: '#8FBC8F',\n darkslateblue: '#483D8B',\n darkslategray: '#2F4F4F',\n darkslategrey: '#2F4F4F',\n darkturquoise: '#00CED1',\n darkviolet: '#9400D3',\n deeppink: '#FF1493',\n deepskyblue: '#00BFFF',\n dimgray: '#696969',\n dimgrey: '#696969',\n dodgerblue: '#1E90FF',\n firebrick: '#B22222',\n floralwhite: '#FFFAF0',\n forestgreen: '#228B22',\n fuchsia: '#FF00FF',\n gainsboro: '#DCDCDC',\n ghostwhite: '#F8F8FF',\n gold: '#FFD700',\n goldenrod: '#DAA520',\n gray: '#808080',\n green: '#008000',\n greenyellow: '#ADFF2F',\n grey: '#808080',\n honeydew: '#F0FFF0',\n hotpink: '#FF69B4',\n indianred: '#CD5C5C',\n indigo: '#4B0082',\n ivory: '#FFFFF0',\n khaki: '#F0E68C',\n lavender: '#E6E6FA',\n lavenderblush: '#FFF0F5',\n lawngreen: '#7CFC00',\n lemonchiffon: '#FFFACD',\n lightblue: '#ADD8E6',\n lightcoral: '#F08080',\n lightcyan: '#E0FFFF',\n lightgoldenrodyellow: '#FAFAD2',\n lightgray: '#D3D3D3',\n lightgreen: '#90EE90',\n lightgrey: '#D3D3D3',\n lightpink: '#FFB6C1',\n lightsalmon: '#FFA07A',\n lightseagreen: '#20B2AA',\n lightskyblue: '#87CEFA',\n lightslategray: '#778899',\n lightslategrey: '#778899',\n lightsteelblue: '#B0C4DE',\n lightyellow: '#FFFFE0',\n lime: '#00FF00',\n limegreen: '#32CD32',\n linen: '#FAF0E6',\n magenta: '#FF00FF',\n maroon: '#800000',\n mediumaquamarine: '#66CDAA',\n mediumblue: '#0000CD',\n mediumorchid: '#BA55D3',\n mediumpurple: '#9370DB',\n mediumseagreen: '#3CB371',\n mediumslateblue: '#7B68EE',\n mediumspringgreen: '#00FA9A',\n mediumturquoise: '#48D1CC',\n mediumvioletred: '#C71585',\n midnightblue: '#191970',\n mintcream: '#F5FFFA',\n mistyrose: '#FFE4E1',\n moccasin: '#FFE4B5',\n navajowhite: '#FFDEAD',\n navy: '#000080',\n oldlace: '#FDF5E6',\n olive: '#808000',\n olivedrab: '#6B8E23',\n orange: '#FFA500',\n orangered: '#FF4500',\n orchid: '#DA70D6',\n palegoldenrod: '#EEE8AA',\n palegreen: '#98FB98',\n paleturquoise: '#AFEEEE',\n palevioletred: '#DB7093',\n papayawhip: '#FFEFD5',\n peachpuff: '#FFDAB9',\n peru: '#CD853F',\n pink: '#FFC0CB',\n plum: '#DDA0DD',\n powderblue: '#B0E0E6',\n purple: '#800080',\n rebeccapurple: '#663399',\n red: '#FF0000',\n rosybrown: '#BC8F8F',\n royalblue: '#4169E1',\n saddlebrown: '#8B4513',\n salmon: '#FA8072',\n sandybrown: '#F4A460',\n seagreen: '#2E8B57',\n seashell: '#FFF5EE',\n sienna: '#A0522D',\n silver: '#C0C0C0',\n skyblue: '#87CEEB',\n slateblue: '#6A5ACD',\n slategray: '#708090',\n slategrey: '#708090',\n snow: '#FFFAFA',\n springgreen: '#00FF7F',\n steelblue: '#4682B4',\n tan: '#D2B48C',\n teal: '#008080',\n thistle: '#D8BFD8',\n tomato: '#FF6347',\n turquoise: '#40E0D0',\n violet: '#EE82EE',\n wheat: '#F5DEB3',\n white: '#FFFFFF',\n whitesmoke: '#F5F5F5',\n yellow: '#FFFF00',\n yellowgreen: '#9ACD32'\n });\n}","// Based on https://stackoverflow.com/a/14991797\n// This will parse a delimited string into an array of arrays.\nexport function stringToArray(strData: string, delimiter = ','): string[][] {\n const data: any[][] = [];\n const isNewline = (char: string) => char === '\\r' || char === '\\n';\n\n let insideQuotedField = false;\n\n if (strData === '') { return [['']]; }\n\n // iterate over each character, keep track of current row and column (of the returned array)\n for (let row = 0, column = 0, position = 0; position < strData.length; position++) {\n const previousChar = strData[position - 1];\n const currentChar = strData[position];\n const nextChar = strData[position + 1];\n const ensureDataExists = () => {\n if (!data[row]) {\n // create row if it doesn't exist\n data[row] = [];\n }\n\n if (!data[row][column]) {\n // create column if it doesn't exist\n data[row][column] = '';\n }\n };\n\n ensureDataExists();\n\n if (currentChar === '\"') {\n if (insideQuotedField) {\n if (nextChar === '\"') {\n // unescape double quote\n data[row][column] += '\"';\n position++;\n } else {\n // exit quoted field\n insideQuotedField = false;\n }\n\n continue;\n } else if (previousChar === undefined || previousChar === delimiter || isNewline(previousChar)) {\n // enter quoted field\n insideQuotedField = true;\n continue;\n }\n }\n\n if (!insideQuotedField) {\n if (currentChar === delimiter) {\n // move to next column\n column++;\n ensureDataExists();\n\n continue;\n } else if (isNewline(currentChar)) {\n // move to next row\n column = 0;\n row++;\n ensureDataExists();\n\n if (currentChar === '\\r' && nextChar === '\\n') {\n // skip over second newline character if it exists\n position++;\n }\n\n continue;\n }\n }\n\n // add current character to current column\n data[row][column] += currentChar;\n }\n\n return data;\n}\n","/**\n * These variables are lazy loaded, as otherwise they try and get initialised when we are loading\n * unit tests and we don't have references to window or document in the unit tests\n * from http://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser\n */\nlet isSafari: boolean;\nlet isIE: boolean;\nlet isEdge: boolean;\nlet isChrome: boolean;\nlet isFirefox: boolean;\nlet isIOS: boolean;\nlet invisibleScrollbar: boolean;\nlet browserScrollbarWidth: number;\n\nfunction isBrowserIE(): boolean {\n if (isIE === undefined) {\n isIE = /*@cc_on!@*/false || !!(document as any).documentMode; // At least IE6\n }\n\n return isIE;\n}\n\nexport function isBrowserEdge(): boolean {\n if (isEdge === undefined) {\n isEdge = !isBrowserIE() && !!(window as any).StyleMedia;\n }\n\n return isEdge;\n}\n\nexport function isBrowserSafari(): boolean {\n if (isSafari === undefined) {\n // taken from https://stackoverflow.com/a/23522755/1388233\n isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n }\n\n return isSafari;\n}\n\nexport function isBrowserChrome(): boolean {\n if (isChrome === undefined) {\n const win = window as any;\n isChrome = (!!win.chrome && (!!win.chrome.webstore || !!win.chrome.runtime)) ||\n (/Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor));\n }\n\n return isChrome;\n}\n\nexport function isBrowserFirefox(): boolean {\n if (isFirefox === undefined) {\n const win = window as any;\n\n isFirefox = typeof win.InstallTrigger !== 'undefined';\n }\n\n return isFirefox;\n}\n\nexport function isIOSUserAgent(): boolean {\n if (isIOS === undefined) {\n // taken from https://stackoverflow.com/a/58064481/1388233\n isIOS = (/iPad|iPhone|iPod/.test(navigator.platform) ||\n // eslint-disable-next-line\n (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)) &&\n // @ts-ignore\n !window.MSStream;\n }\n\n return isIOS;\n}\n\nexport function getTabIndex(el: HTMLElement | null): string | null {\n if (!el) { return null; }\n\n const numberTabIndex = el.tabIndex;\n const tabIndex = el.getAttribute('tabIndex');\n\n if (numberTabIndex === -1 && (tabIndex === null || (tabIndex === '' && !isBrowserFirefox()))) {\n return null;\n }\n\n return numberTabIndex.toString();\n}\n\nexport function getMaxDivHeight(): number {\n if (!document.body) { return -1; }\n\n let res = 1000000;\n // FF reports the height back but still renders blank after ~6M px\n const testUpTo = navigator.userAgent.toLowerCase().match(/firefox/) ? 6000000 : 1000000000;\n const div = document.createElement('div');\n document.body.appendChild(div);\n\n while (true) {\n const test = res * 2;\n div.style.height = test + 'px';\n\n if (test > testUpTo || div.clientHeight !== test) {\n break;\n } else {\n res = test;\n }\n }\n\n document.body.removeChild(div);\n\n return res;\n}\n\nexport function getScrollbarWidth(): number | null {\n if (browserScrollbarWidth == null) {\n initScrollbarWidthAndVisibility();\n }\n return browserScrollbarWidth;\n}\n\nfunction initScrollbarWidthAndVisibility(): void {\n\n const body = document.body;\n const div = document.createElement('div');\n\n div.style.width = div.style.height = '100px';\n div.style.opacity = '0';\n div.style.overflow = 'scroll';\n (div.style as any).msOverflowStyle = 'scrollbar'; // needed for WinJS apps\n div.style.position = 'absolute';\n\n body.appendChild(div);\n\n let width: number | null = div.offsetWidth - div.clientWidth;\n\n // if width is 0 and client width is 0, means the DOM isn't ready\n if (width === 0 && div.clientWidth === 0) { width = null; }\n\n // remove div\n if (div.parentNode) {\n div.parentNode.removeChild(div);\n }\n\n if (width != null) {\n browserScrollbarWidth = width;\n invisibleScrollbar = width === 0;\n }\n}\n\nexport function isInvisibleScrollbar(): boolean {\n if (invisibleScrollbar == null) {\n initScrollbarWidthAndVisibility();\n }\n return invisibleScrollbar;\n}\n\n/** @deprecated */\nexport function hasOverflowScrolling(): boolean {\n const prefixes: string[] = ['webkit', 'moz', 'o', 'ms'];\n const div: HTMLElement = document.createElement('div');\n const body: HTMLBodyElement = document.getElementsByTagName('body')[0];\n let found: boolean = false;\n let p: string;\n\n body.appendChild(div);\n div.setAttribute('style', prefixes.map(prefix => `-${prefix}-overflow-scrolling: touch`).concat('overflow-scrolling: touch').join(';'));\n\n const computedStyle: CSSStyleDeclaration = window.getComputedStyle(div);\n\n if ((computedStyle as any).overflowScrolling === 'touch') {\n found = true;\n }\n\n if (!found) {\n for (p of prefixes) {\n if ((computedStyle as any)[`${p}OverflowScrolling`] === 'touch') {\n found = true;\n break;\n }\n }\n }\n\n if (div.parentNode) {\n div.parentNode.removeChild(div);\n }\n\n return found;\n}\n\n/**\n * Gets the document body width\n * from: http://stackoverflow.com/questions/1038727/how-to-get-browser-width-using-javascript-code\n * @returns {number}\n */\nexport function getBodyWidth(): number {\n if (document.body) {\n return document.body.clientWidth;\n }\n\n if (window.innerHeight) {\n return window.innerWidth;\n }\n\n if (document.documentElement && document.documentElement.clientWidth) {\n return document.documentElement.clientWidth;\n }\n\n return -1;\n}\n\n/**\n * Gets the body height\n * from: http://stackoverflow.com/questions/1038727/how-to-get-browser-width-using-javascript-code\n * @returns {number}\n */\nexport function getBodyHeight(): number {\n if (document.body) {\n return document.body.clientHeight;\n }\n\n if (window.innerHeight) {\n return window.innerHeight;\n }\n\n if (document.documentElement && document.documentElement.clientHeight) {\n return document.documentElement.clientHeight;\n }\n\n return -1;\n}\n","import { isBrowserChrome, isBrowserSafari } from './browser';\nimport { exists } from './generic';\nimport { isNonNullObject } from './object';\nimport { hyphenToCamelCase } from './string';\nimport { Constants } from '../constants/constants';\n\nlet rtlNegativeScroll: boolean;\n\n/**\n * This method adds a class to an element and remove that class from all siblings.\n * Useful for toggling state.\n * @param {HTMLElement} element The element to receive the class\n * @param {string} elementClass The class to be assigned to the element\n * @param {boolean} otherElementClass The class to be assigned to siblings of the element, but not the element itself\n */\nexport function radioCssClass(element: HTMLElement, elementClass: string | null, otherElementClass?: string | null) {\n const parent = element.parentElement;\n let sibling = parent && parent.firstChild as HTMLElement;\n\n while (sibling) {\n if (elementClass) {\n sibling.classList.toggle(elementClass, sibling === element);\n }\n if (otherElementClass) {\n sibling.classList.toggle(otherElementClass, sibling !== element);\n }\n sibling = sibling.nextSibling as HTMLElement;\n }\n}\n\nexport function isFocusableFormField(element: HTMLElement): boolean {\n const matches: (str: string) => boolean =\n Element.prototype.matches || (Element as any).prototype.msMatchesSelector;\n\n const isFocusable = matches.call(element, Constants.INPUT_SELECTOR);\n const isNotFocusable = matches.call(element, Constants.FOCUSABLE_EXCLUDE);\n const isElementVisible = isVisible(element);\n\n const focusable = isFocusable && !isNotFocusable && isElementVisible;\n\n return focusable;\n}\n\nexport function setDisplayed(element: HTMLElement, displayed: boolean) {\n element.classList.toggle('ag-hidden', !displayed);\n}\n\nexport function setVisible(element: HTMLElement, visible: boolean) {\n element.classList.toggle('ag-invisible', !visible);\n}\n\nexport function setDisabled(element: HTMLElement, disabled: boolean) {\n const attributeName = 'disabled';\n const addOrRemoveDisabledAttribute = disabled ?\n (e: HTMLElement) => e.setAttribute(attributeName, '') :\n (e: HTMLElement) => e.removeAttribute(attributeName);\n\n addOrRemoveDisabledAttribute(element);\n\n nodeListForEach(element.querySelectorAll('input'), input => addOrRemoveDisabledAttribute(input));\n}\n\nexport function isElementChildOfClass(element: HTMLElement | null, cls: string, maxNest?: number): boolean {\n let counter = 0;\n\n while (element) {\n if (element.classList.contains(cls)) {\n return true;\n }\n\n element = element.parentElement;\n\n if (maxNest && ++counter > maxNest) { break; }\n }\n\n return false;\n}\n\n// returns back sizes as doubles instead of strings. similar to\n// getBoundingClientRect, however getBoundingClientRect does not:\n// a) work with fractions (eg browser is zooming)\n// b) has CSS transitions applied (eg CSS scale, browser zoom), which we don't want, we want the un-transitioned values\nexport function getElementSize(el: HTMLElement): {\n height: number,\n width: number,\n paddingTop: number,\n paddingRight: number,\n paddingBottom: number,\n paddingLeft: number,\n marginTop: number,\n marginRight: number,\n marginBottom: number,\n marginLeft: number,\n boxSizing: string;\n} {\n const {\n height,\n width,\n paddingTop,\n paddingRight,\n paddingBottom,\n paddingLeft,\n marginTop,\n marginRight,\n marginBottom,\n marginLeft,\n boxSizing\n } = window.getComputedStyle(el);\n\n return {\n height: parseFloat(height!),\n width: parseFloat(width!),\n paddingTop: parseFloat(paddingTop!),\n paddingRight: parseFloat(paddingRight!),\n paddingBottom: parseFloat(paddingBottom!),\n paddingLeft: parseFloat(paddingLeft!),\n marginTop: parseFloat(marginTop!),\n marginRight: parseFloat(marginRight!),\n marginBottom: parseFloat(marginBottom!),\n marginLeft: parseFloat(marginLeft!),\n boxSizing\n };\n}\n\nexport function getInnerHeight(el: HTMLElement): number {\n const size = getElementSize(el);\n\n if (size.boxSizing === 'border-box') {\n return size.height - size.paddingTop - size.paddingBottom;\n }\n\n return size.height;\n}\n\nexport function getInnerWidth(el: HTMLElement): number {\n const size = getElementSize(el);\n\n if (size.boxSizing === 'border-box') {\n return size.width - size.paddingLeft - size.paddingRight;\n }\n\n return size.width;\n}\n\nexport function getAbsoluteHeight(el: HTMLElement): number {\n const size = getElementSize(el);\n const marginRight = size.marginBottom + size.marginTop;\n\n return Math.ceil(el.offsetHeight + marginRight);\n}\n\nexport function getAbsoluteWidth(el: HTMLElement): number {\n const size = getElementSize(el);\n const marginWidth = size.marginLeft + size.marginRight;\n\n return Math.ceil(el.offsetWidth + marginWidth);\n}\n\nexport function isRtlNegativeScroll(): boolean {\n if (typeof rtlNegativeScroll === \"boolean\") {\n return rtlNegativeScroll;\n }\n\n const template = document.createElement('div');\n template.style.direction = 'rtl';\n template.style.width = '1px';\n template.style.height = '1px';\n template.style.position = 'fixed';\n template.style.top = '0px';\n template.style.overflow = 'hidden';\n template.dir = 'rtl';\n template.innerHTML = /* html */\n `
\n \n \n
`;\n\n document.body.appendChild(template);\n\n template.scrollLeft = 1;\n rtlNegativeScroll = Math.floor(template.scrollLeft) === 0;\n document.body.removeChild(template);\n\n return rtlNegativeScroll;\n}\n\nexport function getScrollLeft(element: HTMLElement, rtl: boolean): number {\n let scrollLeft = element.scrollLeft;\n\n if (rtl) {\n // Absolute value - for FF that reports RTL scrolls in negative numbers\n scrollLeft = Math.abs(scrollLeft);\n\n if (isBrowserChrome() && !isRtlNegativeScroll()) {\n scrollLeft = element.scrollWidth - element.clientWidth - scrollLeft;\n }\n }\n\n return scrollLeft;\n}\n\nexport function setScrollLeft(element: HTMLElement, value: number, rtl: boolean): void {\n if (rtl) {\n // Chrome and Safari when doing RTL have the END position of the scroll as zero, not the start\n if (isRtlNegativeScroll()) {\n value *= -1;\n } else if (isBrowserSafari() || isBrowserChrome()) {\n value = element.scrollWidth - element.clientWidth - value;\n }\n }\n element.scrollLeft = value;\n}\n\nexport function clearElement(el: HTMLElement): void {\n while (el && el.firstChild) { el.removeChild(el.firstChild); }\n}\n\n/** @deprecated */\nexport function removeElement(parent: HTMLElement, cssSelector: string) {\n removeFromParent(parent.querySelector(cssSelector));\n}\n\nexport function removeFromParent(node: Element | null) {\n if (node && node.parentNode) {\n node.parentNode.removeChild(node);\n }\n}\n\nexport function isVisible(element: HTMLElement) {\n return element.offsetParent !== null;\n}\n\n/**\n * Loads the template and returns it as an element. makes up for no simple way in\n * the dom api to load html directly, eg we cannot do this: document.createElement(template)\n * @param {string} template\n * @returns {HTMLElement}\n */\nexport function loadTemplate(template: string): HTMLElement {\n // we try the DOMParser first, as SalesForce doesn't like using innerHTML on a div\n if (DOMParser !== null) {\n const parser = new DOMParser();\n const doc = parser.parseFromString(template, \"text/html\");\n return doc.body.firstChild as HTMLElement;\n }\n\n const tempDiv = document.createElement('div');\n tempDiv.innerHTML = (template || '').trim();\n return tempDiv.firstChild as HTMLElement;\n}\n\nexport function appendHtml(eContainer: HTMLElement, htmlTemplate: string) {\n if (eContainer.lastChild) {\n // https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentHTML\n // we put the items at the start, so new items appear underneath old items,\n // so when expanding/collapsing groups, the new rows don't go on top of the\n // rows below that are moving our of the way\n eContainer.insertAdjacentHTML('afterbegin', htmlTemplate);\n } else {\n eContainer.innerHTML = htmlTemplate;\n }\n}\n\n/** @deprecated */\nexport function getElementAttribute(element: any, attributeName: string): string | null {\n if (element.attributes && element.attributes[attributeName]) {\n const attribute = element.attributes[attributeName];\n\n return attribute.value;\n }\n\n return null;\n}\n\nexport function offsetHeight(element: HTMLElement) {\n return element && element.clientHeight ? element.clientHeight : 0;\n}\n\nexport function offsetWidth(element: HTMLElement) {\n return element && element.clientWidth ? element.clientWidth : 0;\n}\n\nexport function ensureDomOrder(eContainer: HTMLElement, eChild: HTMLElement, eChildBefore?: HTMLElement | null): void {\n // if already in right order, do nothing\n if (eChildBefore && eChildBefore.nextSibling === eChild) {\n return;\n }\n\n if (eChildBefore) {\n if (eChildBefore.nextSibling) {\n // insert between the eRowBefore and the row after it\n eContainer.insertBefore(eChild, eChildBefore.nextSibling);\n } else {\n // if nextSibling is missing, means other row is at end, so just append new row at the end\n eContainer.appendChild(eChild);\n }\n } else {\n // otherwise put at start\n if (eContainer.firstChild && eContainer.firstChild !== eChild) {\n // insert it at the first location\n eContainer.insertAdjacentElement('afterbegin', eChild);\n }\n }\n}\n\nexport function setDomChildOrder(eContainer: HTMLElement, orderedChildren: (HTMLElement | null)[]): void {\n for (let i = 0; i < orderedChildren.length; i++) {\n const correctCellAtIndex = orderedChildren[i];\n const actualCellAtIndex = eContainer.children[i];\n\n if (actualCellAtIndex !== correctCellAtIndex) {\n eContainer.insertBefore(correctCellAtIndex!, actualCellAtIndex);\n }\n }\n}\n\nexport function insertWithDomOrder(\n eContainer: HTMLElement,\n eToInsert: HTMLElement,\n eChildBefore: HTMLElement | null\n): void {\n if (eChildBefore) {\n // if previous element exists, just slot in after the previous element\n eChildBefore.insertAdjacentElement('afterend', eToInsert);\n } else {\n if (eContainer.firstChild) {\n // insert it at the first location\n eContainer.insertAdjacentElement('afterbegin', eToInsert);\n } else {\n // otherwise eContainer is empty, so just append it\n eContainer.appendChild(eToInsert);\n }\n }\n}\n\n/** @deprecated */\nexport function prependDC(parent: HTMLElement, documentFragment: DocumentFragment): void {\n if (exists(parent.firstChild)) {\n parent.insertBefore(documentFragment, parent.firstChild);\n } else {\n parent.appendChild(documentFragment);\n }\n}\n\nexport function addStylesToElement(eElement: any, styles: any) {\n if (!styles) { return; }\n\n Object.keys(styles).forEach((key) => {\n const keyCamelCase = hyphenToCamelCase(key);\n if (keyCamelCase) {\n eElement.style[keyCamelCase] = styles[key];\n }\n });\n}\n\nexport function isHorizontalScrollShowing(element: HTMLElement): boolean {\n return element.clientWidth < element.scrollWidth;\n}\n\nexport function isVerticalScrollShowing(element: HTMLElement): boolean {\n return element.clientHeight < element.scrollHeight;\n}\n\nexport function setElementWidth(element: HTMLElement, width: string | number) {\n if (width === 'flex') {\n element.style.removeProperty('width');\n element.style.removeProperty('minWidth');\n element.style.removeProperty('maxWidth');\n element.style.flex = '1 1 auto';\n } else {\n setFixedWidth(element, width);\n }\n}\n\nexport function setFixedWidth(element: HTMLElement, width: string | number) {\n width = formatSize(width);\n element.style.width = width.toString();\n element.style.maxWidth = width.toString();\n element.style.minWidth = width.toString();\n}\n\nexport function setElementHeight(element: HTMLElement, height: string | number) {\n if (height === 'flex') {\n element.style.removeProperty('height');\n element.style.removeProperty('minHeight');\n element.style.removeProperty('maxHeight');\n element.style.flex = '1 1 auto';\n } else {\n setFixedHeight(element, height);\n }\n}\n\nexport function setFixedHeight(element: HTMLElement, height: string | number) {\n height = formatSize(height);\n element.style.height = height.toString();\n element.style.maxHeight = height.toString();\n element.style.minHeight = height.toString();\n}\n\nexport function formatSize(size: number | string) {\n if (typeof size === 'number') {\n return `${size}px`;\n }\n\n return size;\n}\n\n/**\n * Returns true if it is a DOM node\n * taken from: http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object\n * @param {any} o\n * @return {boolean}\n */\nexport function isNode(o: any): boolean {\n return (\n typeof Node === 'function'\n ? o instanceof Node\n : o && typeof o === 'object' && typeof o.nodeType === 'number' && typeof o.nodeName === 'string'\n );\n}\n\n//\n/**\n * Returns true if it is a DOM element\n * taken from: http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object\n * @param {any} o\n * @returns {boolean}\n */\nexport function isElement(o: any): boolean {\n return (\n typeof HTMLElement === 'function'\n ? o instanceof HTMLElement //DOM2\n : o && isNonNullObject(o) && o.nodeType === 1 && typeof o.nodeName === 'string'\n );\n}\n\nexport function isNodeOrElement(o: any) {\n return isNode(o) || isElement(o);\n}\n\n/**\n * Makes a copy of a node list into a list\n * @param {NodeList} nodeList\n * @returns {Node[]}\n */\nexport function copyNodeList(nodeList: NodeListOf | null): Node[] {\n if (nodeList == null) { return []; }\n\n const result: Node[] = [];\n\n nodeListForEach(nodeList, node => result.push(node));\n\n return result;\n}\n\nexport function iterateNamedNodeMap(map: NamedNodeMap, callback: (key: string, value: string) => void): void {\n if (!map) { return; }\n\n for (let i = 0; i < map.length; i++) {\n const attr = map[i];\n callback(attr.name, attr.value);\n }\n}\n\n/** @deprecated */\nexport function setCheckboxState(eCheckbox: HTMLInputElement, state: any) {\n if (typeof state === 'boolean') {\n eCheckbox.checked = state;\n eCheckbox.indeterminate = false;\n } else {\n // isNodeSelected returns back undefined if it's a group and the children\n // are a mix of selected and unselected\n eCheckbox.indeterminate = true;\n }\n}\n\nexport function addOrRemoveAttribute(element: HTMLElement, name: string, value: any) {\n if (value == null) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value.toString());\n }\n}\n\nexport function nodeListForEach(nodeList: NodeListOf | null, action: (value: T) => void): void {\n if (nodeList == null) { return; }\n\n for (let i = 0; i < nodeList.length; i++) {\n action(nodeList[i]);\n }\n}","import { ICellRendererComp } from '../rendering/cellRenderers/iCellRenderer';\nimport { AgPromise } from './promise';\nimport { loadTemplate } from './dom';\nimport { camelCaseToHyphen } from './string';\nimport { iterateObject } from './object';\n\n/** @deprecated */\nexport function getNameOfClass(theClass: any) {\n const funcNameRegex = /function (.{1,})\\(/;\n const funcAsString = theClass.toString();\n const results = funcNameRegex.exec(funcAsString);\n\n return results && results.length > 1 ? results[1] : \"\";\n}\n\nexport function findLineByLeastSquares(values: number[]) {\n const len = values.length;\n let maxDecimals = 0;\n\n if (len <= 1) { return values; }\n\n for (let i = 0; i < values.length; i++) {\n const value = values[i];\n const splitExponent = value.toString().split('e-');\n\n if (splitExponent.length > 1) {\n maxDecimals = Math.max(maxDecimals, parseInt(splitExponent[1], 10));\n continue;\n }\n\n if (Math.floor(value) === value) { continue; }\n\n maxDecimals = Math.max(maxDecimals, value.toString().split('.')[1].length);\n }\n\n let sum_x = 0;\n let sum_y = 0;\n let sum_xy = 0;\n let sum_xx = 0;\n\n let y = 0;\n\n for (let x = 0; x < len; x++) {\n y = values[x];\n sum_x += x;\n sum_y += y;\n sum_xx += x * x;\n sum_xy += x * y;\n }\n\n const m = (len * sum_xy - sum_x * sum_y) / (len * sum_xx - sum_x * sum_x);\n const b = (sum_y / len) - (m * sum_x) / len;\n\n const result: number[] = [];\n\n for (let x = 0; x <= len; x++) {\n result.push(parseFloat((x * m + b).toFixed(maxDecimals)));\n }\n\n return result;\n}\n\n/**\n * Converts a CSS object into string\n * @param {Object} stylesToUse an object eg: {color: 'black', top: '25px'}\n * @return {string} A string like \"color: black; top: 25px;\" for html\n */\nexport function cssStyleObjectToMarkup(stylesToUse: any): string {\n if (!stylesToUse) { return ''; }\n\n const resParts: string[] = [];\n\n iterateObject(stylesToUse, (styleKey: string, styleValue: string) => {\n const styleKeyDashed = camelCaseToHyphen(styleKey);\n resParts.push(`${styleKeyDashed}: ${styleValue};`);\n });\n\n return resParts.join(' ');\n}\n\n/**\n * Displays a message to the browser. this is useful in iPad, where you can't easily see the console.\n * so the javascript code can use this to give feedback. this is NOT intended to be called in production.\n * it is intended the AG Grid developer calls this to troubleshoot, but then takes out the calls before\n * checking in.\n * @param {string} msg\n */\nexport function message(msg: string): void {\n const eMessage = document.createElement('div');\n let eBox = document.querySelector('#__ag__message');\n\n eMessage.innerHTML = msg;\n\n if (!eBox) {\n const template = `
`;\n\n eBox = loadTemplate(template);\n\n if (document.body) {\n document.body.appendChild(eBox);\n }\n }\n\n eBox.insertBefore(eMessage, eBox.children[0]);\n}\n\n/**\n * cell renderers are used in a few places. they bind to dom slightly differently to other cell renderes as they\n * can return back strings (instead of html elemnt) in the getGui() method. common code placed here to handle that.\n * @param {AgPromise} cellRendererPromise\n * @param {HTMLElement} eTarget\n */\nexport function bindCellRendererToHtmlElement(cellRendererPromise: AgPromise, eTarget: HTMLElement) {\n cellRendererPromise.then(cellRenderer => {\n const gui: HTMLElement | string = cellRenderer!.getGui();\n\n if (gui != null) {\n if (typeof gui === 'object') {\n eTarget.appendChild(gui);\n } else {\n eTarget.innerHTML = gui;\n }\n }\n });\n}\n","import { Column } from '../entities/column';\n\nexport type ColumnSortState = 'ascending' | 'descending' | 'none';\n\n// ARIA HELPER FUNCTIONS\nfunction setAriaAttribute(element: HTMLElement, attribute: string, value: number | boolean | string): void {\n element.setAttribute(ariaAttributeName(attribute), value.toString());\n}\n\nfunction removeAriaAttribute(element: HTMLElement, attribute: string): void {\n element.removeAttribute(ariaAttributeName(attribute));\n}\n\nfunction ariaAttributeName(attribute: string) {\n return `aria-${attribute}`;\n}\n\nexport function setAriaRole(element: HTMLElement, role?: string | null) {\n if (role) {\n element.setAttribute('role', role);\n } else {\n element.removeAttribute('role');\n }\n}\n\nexport function getAriaSortState(column: Column): ColumnSortState {\n let sort: ColumnSortState;\n\n if (column.isSortAscending()) {\n sort = 'ascending';\n } else if (column.isSortDescending()) {\n sort = 'descending';\n } else {\n sort = 'none';\n }\n\n return sort;\n}\n\n// ARIA ATTRIBUTE GETTERS\nexport function getAriaLevel(element: HTMLElement): number {\n return parseInt(element.getAttribute('aria-level')!, 10);\n}\n\nexport function getAriaPosInSet(element: HTMLElement): number {\n return parseInt(element.getAttribute('aria-posinset')!, 10);\n}\n\nexport function getAriaDescribedBy(element: HTMLElement): string {\n return element.getAttribute('aria-describedby') || '';\n}\n\n// ARIA ATTRIBUTE SETTERS\nexport function setAriaLabel(element: HTMLElement, label?: string): void {\n const key = 'label';\n if (label) {\n setAriaAttribute(element, key, label);\n } else {\n removeAriaAttribute(element, key);\n }\n}\n\nexport function setAriaLabelledBy(element: HTMLElement, labelledBy: string): void {\n const key = 'labelledby';\n if (labelledBy) {\n setAriaAttribute(element, key, labelledBy);\n } else {\n removeAriaAttribute(element, key);\n }\n}\n\nexport function setAriaDescription(element: HTMLElement, description?: string) {\n const key = 'description';\n\n if (description) {\n setAriaAttribute(element, key, description);\n } else {\n removeAriaAttribute(element, key);\n }\n}\n\nexport function setAriaDescribedBy(element: HTMLElement, describedby: string | undefined): void {\n const key = 'describedby';\n if (describedby) {\n setAriaAttribute(element, key, describedby);\n } else {\n removeAriaAttribute(element, key);\n }\n}\n\nexport function setAriaLevel(element: HTMLElement, level: number): void {\n setAriaAttribute(element, 'level', level);\n}\n\nexport function setAriaDisabled(element: HTMLElement, disabled: boolean): void {\n setAriaAttribute(element, 'disabled', disabled);\n}\n\nexport function setAriaExpanded(element: HTMLElement, expanded: boolean): void {\n setAriaAttribute(element, 'expanded', expanded);\n}\n\nexport function removeAriaExpanded(element: HTMLElement): void {\n removeAriaAttribute(element, 'expanded');\n}\n\nexport function setAriaSetSize(element: HTMLElement, setsize: number): void {\n setAriaAttribute(element, 'setsize', setsize);\n}\n\nexport function setAriaPosInSet(element: HTMLElement, position: number): void {\n setAriaAttribute(element, 'posinset', position);\n}\n\nexport function setAriaMultiSelectable(element: HTMLElement, multiSelectable: boolean): void {\n setAriaAttribute(element, 'multiselectable', multiSelectable);\n}\n\nexport function setAriaRowCount(element: HTMLElement, rowCount: number): void {\n setAriaAttribute(element, 'rowcount', rowCount);\n}\n\nexport function setAriaRowIndex(element: HTMLElement, rowIndex: number): void {\n setAriaAttribute(element, 'rowindex', rowIndex);\n}\n\nexport function setAriaColCount(element: HTMLElement, colCount: number): void {\n setAriaAttribute(element, 'colcount', colCount);\n}\n\nexport function setAriaColIndex(element: HTMLElement, colIndex: number): void {\n setAriaAttribute(element, 'colindex', colIndex);\n}\n\nexport function setAriaColSpan(element: HTMLElement, colSpan: number): void {\n setAriaAttribute(element, 'colspan', colSpan);\n}\n\nexport function setAriaSort(element: HTMLElement, sort: ColumnSortState): void {\n setAriaAttribute(element, 'sort', sort);\n}\n\nexport function removeAriaSort(element: HTMLElement): void {\n removeAriaAttribute(element, 'sort');\n}\n\nexport function setAriaSelected(element: HTMLElement, selected: boolean | undefined): void {\n const attributeName = 'selected';\n\n if (selected) {\n setAriaAttribute(element, attributeName, selected);\n } else {\n removeAriaAttribute(element, attributeName);\n }\n}\n\nexport function setAriaChecked(element: HTMLElement, checked?: boolean) {\n setAriaAttribute(element, 'checked', checked === undefined ? 'mixed' : checked);\n}","export function padStartWidthZeros(value: number, totalStringSize: number): string {\n return value.toString().padStart(totalStringSize, '0');\n}\n\nexport function createArrayOfNumbers(first: number, last: number): number[] {\n const result: number[] = [];\n\n for (let i = first; i <= last; i++) {\n result.push(i);\n }\n\n return result;\n}\n\n/**\n * Check if a value is numeric\n * from http://stackoverflow.com/questions/9716468/is-there-any-function-like-isnumeric-in-javascript-to-validate-numbers\n * @param {any} value\n * @return {boolean}\n */\nexport function isNumeric(value: any): boolean {\n return value !== '' && !isNaN(parseFloat(value)) && isFinite(value);\n}\n\nexport function cleanNumber(value: any): number | null {\n if (typeof value === 'string') {\n value = parseInt(value, 10);\n }\n\n if (typeof value === 'number') {\n return Math.floor(value);\n }\n\n return null;\n}\n\nexport function decToHex(number: number, bytes: number): string {\n let hex = '';\n\n for (let i = 0; i < bytes; i++) {\n hex += String.fromCharCode(number & 0xff);\n number >>>= 8;\n }\n\n return hex;\n}\n\nexport function formatNumberTwoDecimalPlacesAndCommas(value: number, thousandSeparator: string, decimalSeparator: string): string {\n if (typeof value !== 'number') { return ''; }\n\n return formatNumberCommas(Math.round(value * 100) / 100, thousandSeparator, decimalSeparator);\n}\n\n/**\n * the native method number.toLocaleString(undefined, {minimumFractionDigits: 0})\n * puts in decimal places in IE, so we use this method instead\n * from: http://blog.tompawlak.org/number-currency-formatting-javascript\n * @param {number} value\n * @returns {string}\n */\nexport function formatNumberCommas(value: number, thousandSeparator: string, decimalSeparator: string): string {\n if (typeof value !== 'number') { return ''; }\n\n return value.toString().replace('.', decimalSeparator).replace(/(\\d)(?=(\\d{3})+(?!\\d))/g, `$1${thousandSeparator}`);\n}\n\nexport function sum(values: number[] | null) {\n return values == null ? null : values.reduce((total, value) => total + value, 0);\n}\n","import { padStartWidthZeros } from './number';\n\n/**\n * Serialises a Date to a string of format `yyyy-MM-dd HH:mm:ss`.\n * An alternative separator can be provided to be used instead of hyphens.\n * @param date The date to serialise\n * @param includeTime Whether to include the time in the serialised string\n * @param separator The separator to use between date parts\n */\nexport function serialiseDate(date: Date | null, includeTime = true, separator = '-'): string | null {\n if (!date) { return null; }\n\n let serialised = [date.getFullYear(), date.getMonth() + 1, date.getDate()].map(part => padStartWidthZeros(part, 2)).join(separator);\n\n if (includeTime) {\n serialised += ' ' + [date.getHours(), date.getMinutes(), date.getSeconds()].map(part => padStartWidthZeros(part, 2)).join(':');\n }\n\n return serialised;\n}\n\n/**\n * Parses a date and time from a string in the format `yyyy-MM-dd HH:mm:ss`\n */\nexport function parseDateTimeFromString(value?: string | null): Date | null {\n if (!value) { return null; }\n\n const [dateStr, timeStr] = value.split(' ');\n\n if (!dateStr) { return null; }\n\n const fields = dateStr.split('-').map(f => parseInt(f, 10));\n\n if (fields.filter(f => !isNaN(f)).length !== 3) { return null; }\n\n const [year, month, day] = fields;\n const date = new Date(year, month - 1, day);\n\n if (date.getFullYear() !== year ||\n date.getMonth() !== month - 1 ||\n date.getDate() !== day) {\n // date was not parsed as expected so must have been invalid\n return null;\n }\n\n if (!timeStr || timeStr === '00:00:00') {\n return date;\n }\n\n const [hours, minutes, seconds] = timeStr.split(':').map(part => parseInt(part, 10));\n\n if (hours >= 0 && hours < 24) {\n date.setHours(hours);\n }\n\n if (minutes >= 0 && minutes < 60) {\n date.setMinutes(minutes);\n }\n\n if (seconds >= 0 && seconds < 60) {\n date.setSeconds(seconds);\n }\n\n return date;\n}\n","export function fuzzyCheckStrings(\n inputValues: string[],\n validValues: string[],\n allSuggestions: string[]\n): { [p: string]: string[]; } {\n const fuzzyMatches: { [p: string]: string[]; } = {};\n const invalidInputs: string[] = inputValues.filter(inputValue =>\n !validValues.some(\n (validValue) => validValue === inputValue\n )\n );\n\n if (invalidInputs.length > 0) {\n invalidInputs.forEach(invalidInput =>\n fuzzyMatches[invalidInput] = fuzzySuggestions(invalidInput, allSuggestions)\n );\n }\n\n return fuzzyMatches;\n}\n\n/**\n *\n * @param {String} inputValue The value to be compared against a list of strings\n * @param allSuggestions The list of strings to be compared against\n * @param hideIrrelevant By default, fuzzy suggestions will just sort the allSuggestions list, set this to true\n * to filter out the irrelevant values\n * @param weighted Set this to true, to make letters matched in the order they were typed have priority in the results.\n */\nexport function fuzzySuggestions(\n inputValue: string,\n allSuggestions: string[],\n hideIrrelevant?: boolean,\n weighted?: boolean\n): string[] {\n const search = weighted ? string_weighted_distances : string_distances;\n let thisSuggestions: { value: string, relevance: number; }[] = allSuggestions.map((text) => ({\n value: text,\n relevance: search(inputValue.toLowerCase(), text.toLocaleLowerCase())\n }));\n\n thisSuggestions.sort((a, b) => b.relevance - a.relevance);\n\n if (hideIrrelevant) {\n thisSuggestions = thisSuggestions.filter(suggestion => suggestion.relevance !== 0);\n }\n\n return thisSuggestions.map(suggestion => suggestion.value);\n}\n\n/**\n * Algorithm to do fuzzy search\n * from https://stackoverflow.com/questions/23305000/javascript-fuzzy-search-that-makes-sense\n * @param {string} from\n * @return {[]}\n */\nexport function get_bigrams(from: string) {\n const s = from.toLowerCase();\n const v = new Array(s.length - 1);\n let i;\n let j;\n let ref;\n\n for (i = j = 0, ref = v.length; j <= ref; i = j += 1) {\n v[i] = s.slice(i, i + 2);\n\n }\n\n return v;\n}\n\nexport function string_distances(str1: string, str2: string): number {\n if (str1.length === 0 && str2.length === 0) { return 0; }\n\n const pairs1 = get_bigrams(str1);\n const pairs2 = get_bigrams(str2);\n const union = pairs1.length + pairs2.length;\n let hit_count = 0;\n let j;\n let len;\n\n for (j = 0, len = pairs1.length; j < len; j++) {\n const x = pairs1[j];\n let k;\n let len1;\n\n for (k = 0, len1 = pairs2.length; k < len1; k++) {\n const y = pairs2[k];\n if (x === y) {\n hit_count++;\n }\n }\n }\n\n return hit_count > 0 ? (2 * hit_count) / union : 0;\n}\n\nexport function string_weighted_distances(str1: string, str2: string): number {\n const a = str1.replace(/\\s/g, '');\n const b = str2.replace(/\\s/g, '');\n\n let weight = 0;\n let lastIndex = 0;\n\n for (let i = 0; i < a.length; i++) {\n const idx = b.indexOf(a[i], lastIndex);\n if (idx === -1) { continue; }\n\n lastIndex = idx;\n weight += (100 - (lastIndex * 100 / 10000) * 100);\n }\n\n return weight;\n}","import { GridOptionsWrapper } from '../gridOptionsWrapper';\nimport { Column } from '../entities/column';\nimport { loadTemplate, isNodeOrElement } from './dom';\nimport { setAriaRole } from './aria';\n\n//\n// IMPORTANT NOTE!\n//\n// If you change the list below, copy/paste the new content into the docs page javascript-grid-icons\n//\nexport const iconNameClassMap: { [key: string]: string; } = {\n // header column group shown when expanded (click to contract)\n columnGroupOpened: 'expanded',\n // header column group shown when contracted (click to expand)\n columnGroupClosed: 'contracted',\n // tool panel column group contracted (click to expand)\n columnSelectClosed: 'tree-closed',\n // tool panel column group expanded (click to contract)\n columnSelectOpen: 'tree-open',\n // column tool panel header expand/collapse all button, shown when some children are expanded and\n // others are collapsed\n columnSelectIndeterminate: 'tree-indeterminate',\n // shown on ghost icon while dragging column to the side of the grid to pin\n columnMovePin: 'pin',\n // shown on ghost icon while dragging over part of the page that is not a drop zone\n columnMoveHide: 'eye-slash',\n // shown on ghost icon while dragging columns to reorder\n columnMoveMove: 'arrows',\n // animating icon shown when dragging a column to the right of the grid causes horizontal scrolling\n columnMoveLeft: 'left',\n // animating icon shown when dragging a column to the left of the grid causes horizontal scrolling\n columnMoveRight: 'right',\n // shown on ghost icon while dragging over Row Groups drop zone\n columnMoveGroup: 'group',\n // shown on ghost icon while dragging over Values drop zone\n columnMoveValue: 'aggregation',\n // shown on ghost icon while dragging over pivot drop zone\n columnMovePivot: 'pivot',\n // shown on ghost icon while dragging over drop zone that doesn't support it, e.g.\n // string column over aggregation drop zone\n dropNotAllowed: 'not-allowed',\n // shown on row group when contracted (click to expand)\n groupContracted: 'tree-closed',\n // shown on row group when expanded (click to contract)\n groupExpanded: 'tree-open',\n // context menu chart item\n chart: 'chart',\n // chart window title bar\n close: 'cross',\n // X (remove) on column 'pill' after adding it to a drop zone list\n cancel: 'cancel',\n // indicates the currently active pin state in the \"Pin column\" sub-menu of the column menu\n check: 'tick',\n // \"go to first\" button in pagination controls\n first: 'first',\n // \"go to previous\" button in pagination controls\n previous: 'previous',\n // \"go to next\" button in pagination controls\n next: 'next',\n // \"go to last\" button in pagination controls\n last: 'last',\n // shown on top right of chart when chart is linked to range data (click to unlink)\n linked: 'linked',\n // shown on top right of chart when chart is not linked to range data (click to link)\n unlinked: 'unlinked',\n // \"Choose colour\" button on chart settings tab\n colorPicker: 'color-picker',\n // rotating spinner shown by the loading cell renderer\n groupLoading: 'loading',\n // button to launch enterprise column menu\n menu: 'menu',\n // filter tool panel tab\n filter: 'filter',\n // column tool panel tab\n columns: 'columns',\n // button in chart regular size window title bar (click to maximise)\n maximize: 'maximize',\n // button in chart maximised window title bar (click to make regular size)\n minimize: 'minimize',\n // \"Pin column\" item in column header menu\n menuPin: 'pin',\n // \"Value aggregation\" column menu item (shown on numeric columns when grouping is active)\"\n menuValue: 'aggregation',\n // \"Group by {column-name}\" item in column header menu\n menuAddRowGroup: 'group',\n // \"Un-Group by {column-name}\" item in column header menu\n menuRemoveRowGroup: 'group',\n // context menu copy item\n clipboardCopy: 'copy',\n // context menu paste item\n clipboardPaste: 'paste',\n // identifies the pivot drop zone\n pivotPanel: 'pivot',\n // \"Row groups\" drop zone in column tool panel\n rowGroupPanel: 'group',\n // columns tool panel Values drop zone\n valuePanel: 'aggregation',\n // drag handle used to pick up draggable columns\n columnDrag: 'grip',\n // drag handle used to pick up draggable rows\n rowDrag: 'grip',\n // context menu export item\n save: 'save',\n // csv export\n csvExport: 'csv',\n // excel export,\n excelExport: 'excel',\n // icon on dropdown editors\n smallDown: 'small-down',\n // version of small-right used in RTL mode\n smallLeft: 'small-left',\n // separater between column 'pills' when you add multiple columns to the header drop zone\n smallRight: 'small-right',\n smallUp: 'small-up',\n // show on column header when column is sorted ascending\n sortAscending: 'asc',\n // show on column header when column is sorted descending\n sortDescending: 'desc',\n // show on column header when column has no sort, only when enabled with gridOptions.unSortIcon=true\n sortUnSort: 'none'\n};\n\n/**\n * If icon provided, use this (either a string, or a function callback).\n * if not, then use the default icon from the theme\n * @param {string} iconName\n * @param {GridOptionsWrapper} gridOptionsWrapper\n * @param {Column | null} [column]\n * @returns {HTMLElement}\n */\nexport function createIcon(iconName: string, gridOptionsWrapper: GridOptionsWrapper, column: Column | null): HTMLElement {\n const iconContents = createIconNoSpan(iconName, gridOptionsWrapper, column);\n\n if (iconContents && iconContents.className.indexOf('ag-icon') > -1) {\n return iconContents;\n }\n\n const eResult = document.createElement('span');\n eResult.appendChild(iconContents!);\n return eResult;\n}\n\nexport function createIconNoSpan(iconName: string, gridOptionsWrapper: GridOptionsWrapper, column?: Column | null, forceCreate?: boolean): HTMLElement | undefined {\n let userProvidedIcon: Function | string | null = null;\n\n // check col for icon first\n const icons: any = column && column.getColDef().icons;\n\n if (icons) {\n userProvidedIcon = icons[iconName];\n }\n\n // if not in col, try grid options\n if (gridOptionsWrapper && !userProvidedIcon) {\n const optionsIcons = gridOptionsWrapper.getIcons();\n if (optionsIcons) {\n userProvidedIcon = optionsIcons[iconName];\n }\n }\n\n // now if user provided, use it\n if (userProvidedIcon) {\n let rendererResult: any;\n\n if (typeof userProvidedIcon === 'function') {\n rendererResult = userProvidedIcon();\n } else if (typeof userProvidedIcon === 'string') {\n rendererResult = userProvidedIcon;\n } else {\n throw new Error('icon from grid options needs to be a string or a function');\n }\n\n if (typeof rendererResult === 'string') {\n return loadTemplate(rendererResult);\n }\n\n if (isNodeOrElement(rendererResult)) {\n return rendererResult as HTMLElement;\n }\n\n console.warn('AG Grid: iconRenderer should return back a string or a dom object');\n } else {\n const span = document.createElement('span');\n let cssClass = iconNameClassMap[iconName];\n\n if (!cssClass) {\n if (!forceCreate) {\n console.warn(`AG Grid: Did not find icon ${iconName}`);\n cssClass = '';\n } else {\n cssClass = iconName;\n }\n }\n\n span.setAttribute('class', `ag-icon ag-icon-${cssClass}`);\n span.setAttribute('unselectable', 'on');\n setAriaRole(span, 'presentation');\n\n return span;\n }\n}\n","import { GridOptionsWrapper } from '../gridOptionsWrapper';\nimport { RowNode } from '../entities/rowNode';\nimport { Column } from '../entities/column';\nimport { SuppressHeaderKeyboardEventParams, SuppressKeyboardEventParams } from '../entities/colDef';\nimport { isBrowserEdge } from './browser';\nimport { ColumnGroup } from '../entities/columnGroup';\nimport { exists } from './generic';\n\nconst NUMPAD_DEL_NUMLOCK_ON_KEY = 'Del';\nconst NUMPAD_DEL_NUMLOCK_ON_CHARCODE = 46;\n\nexport function isEventFromPrintableCharacter(event: KeyboardEvent): boolean {\n // no allowed printable chars have alt or ctrl key combinations\n if (event.altKey || event.ctrlKey || event.metaKey) { return false; }\n\n // if key is length 1, eg if it is 'a' for the a key, or '2' for the '2' key.\n // non-printable characters have names, eg 'Enter' or 'Backspace'.\n const printableCharacter = event.key.length === 1;\n\n // IE11 & Edge treat the numpad del key differently - with numlock on we get \"Del\" for key,\n // so this addition checks if its IE11/Edge and handles that specific case the same was as all other browsers\n const numpadDelWithNumlockOnForEdgeOrIe = isNumpadDelWithNumLockOnForEdge(event);\n\n return printableCharacter || numpadDelWithNumlockOnForEdgeOrIe;\n}\n\n/**\n * Allows user to tell the grid to skip specific keyboard events\n * @param {GridOptionsWrapper} gridOptionsWrapper\n * @param {KeyboardEvent} keyboardEvent\n * @param {RowNode} rowNode\n * @param {Column} column\n * @param {boolean} editing\n * @returns {boolean}\n */\nexport function isUserSuppressingKeyboardEvent(\n gridOptionsWrapper: GridOptionsWrapper,\n keyboardEvent: KeyboardEvent,\n rowNode: RowNode,\n column: Column,\n editing: boolean\n): boolean {\n const gridOptionsFunc = gridOptionsWrapper.getSuppressKeyboardEventFunc();\n const colDefFunc = column ? column.getColDef().suppressKeyboardEvent : undefined;\n\n // if no callbacks provided by user, then do nothing\n if (!gridOptionsFunc && !colDefFunc) { return false; }\n\n const params: SuppressKeyboardEventParams = {\n event: keyboardEvent,\n editing,\n column,\n api: gridOptionsWrapper.getApi()!,\n node: rowNode,\n data: rowNode.data,\n colDef: column.getColDef(),\n context: gridOptionsWrapper.getContext(),\n columnApi: gridOptionsWrapper.getColumnApi()!\n };\n\n // colDef get first preference on suppressing events\n if (colDefFunc) {\n const colDefFuncResult = colDefFunc(params);\n // if colDef func suppressed, then return now, no need to call gridOption func\n if (colDefFuncResult) { return true; }\n }\n\n if (gridOptionsFunc) {\n // if gridOption func, return the result\n return gridOptionsFunc(params);\n }\n\n // otherwise return false, don't suppress, as colDef didn't suppress and no func on gridOptions\n return false;\n}\n\nexport function isUserSuppressingHeaderKeyboardEvent(\n gridOptionsWrapper: GridOptionsWrapper,\n keyboardEvent: KeyboardEvent,\n headerRowIndex: number,\n column: Column | ColumnGroup\n): boolean {\n const colDef = column.getDefinition();\n const colDefFunc = colDef && colDef.suppressHeaderKeyboardEvent;\n\n if (!exists(colDefFunc)) { return false; }\n\n const params: SuppressHeaderKeyboardEventParams = {\n api: gridOptionsWrapper.getApi()!,\n columnApi: gridOptionsWrapper.getColumnApi()!,\n context: gridOptionsWrapper.getContext(),\n colDef: colDef,\n column,\n headerRowIndex,\n event: keyboardEvent\n };\n\n return !!colDefFunc(params);\n}\n\nfunction isNumpadDelWithNumLockOnForEdge(event: KeyboardEvent) {\n return (isBrowserEdge()) &&\n event.key === NUMPAD_DEL_NUMLOCK_ON_KEY &&\n event.charCode === NUMPAD_DEL_NUMLOCK_ON_CHARCODE;\n}\n","/**\n * `True` if the event is close to the original event by X pixels either vertically or horizontally.\n * we only start dragging after X pixels so this allows us to know if we should start dragging yet.\n * @param {MouseEvent | TouchEvent} e1\n * @param {MouseEvent | TouchEvent} e2\n * @param {number} pixelCount\n * @returns {boolean}\n */\nexport function areEventsNear(e1: MouseEvent | Touch, e2: MouseEvent | Touch, pixelCount: number): boolean {\n // by default, we wait 4 pixels before starting the drag\n if (pixelCount === 0) { return false; }\n\n const diffX = Math.abs(e1.clientX - e2.clientX);\n const diffY = Math.abs(e1.clientY - e2.clientY);\n\n return Math.max(diffX, diffY) <= pixelCount;\n}\n","import { RowNode } from '../entities/rowNode';\n\n/**\n * Gets called by: a) ClientSideNodeManager and b) GroupStage to do sorting.\n * when in ClientSideNodeManager we always have indexes (as this sorts the items the\n * user provided) but when in GroupStage, the nodes can contain filler nodes that\n * don't have order id's\n * @param {RowNode[]} rowNodes\n * @param {Object} rowNodeOrder\n */\nexport function sortRowNodesByOrder(rowNodes: RowNode[], rowNodeOrder: { [id: string]: number; }): void {\n if (!rowNodes) { return; }\n\n const comparator = (nodeA: RowNode, nodeB: RowNode) => {\n const positionA = rowNodeOrder[nodeA.id!];\n const positionB = rowNodeOrder[nodeB.id!];\n\n const aHasIndex = positionA !== undefined;\n const bHasIndex = positionB !== undefined;\n\n const bothNodesAreUserNodes = aHasIndex && bHasIndex;\n const bothNodesAreFillerNodes = !aHasIndex && !bHasIndex;\n\n if (bothNodesAreUserNodes) {\n // when comparing two nodes the user has provided, they always\n // have indexes\n return positionA - positionB;\n }\n\n if (bothNodesAreFillerNodes) {\n // when comparing two filler nodes, we have no index to compare them\n // against, however we want this sorting to be deterministic, so that\n // the rows don't jump around as the user does delta updates. so we\n // want the same sort result. so we use the __objectId - which doesn't make sense\n // from a sorting point of view, but does give consistent behaviour between\n // calls. otherwise groups jump around as delta updates are done.\n // note: previously here we used nodeId, however this gave a strange order\n // as string ordering of numbers is wrong, so using id based on creation order\n // as least gives better looking order.\n return nodeA.__objectId - nodeB.__objectId;\n }\n\n if (aHasIndex) {\n return 1;\n }\n\n return -1;\n };\n\n // check if the list first needs sorting\n let rowNodeA: RowNode;\n let rowNodeB: RowNode;\n let atLeastOneOutOfOrder = false;\n\n for (let i = 0; i < rowNodes.length - 1; i++) {\n rowNodeA = rowNodes[i];\n rowNodeB = rowNodes[i + 1];\n\n if (comparator(rowNodeA, rowNodeB) > 0) {\n atLeastOneOutOfOrder = true;\n break;\n }\n }\n\n if (atLeastOneOutOfOrder) {\n rowNodes.sort(comparator);\n }\n}\n\nexport function traverseNodesWithKey(nodes: RowNode[] | null, callback: (node: RowNode, key: string) => void): void {\n const keyParts: any[] = [];\n\n recursiveSearchNodes(nodes);\n\n function recursiveSearchNodes(currentNodes: RowNode[] | null): void {\n if (!currentNodes) { return; }\n\n currentNodes.forEach((node: RowNode) => {\n\n // also checking for children for tree data\n if (node.group || node.hasChildren()) {\n keyParts.push(node.key);\n const key = keyParts.join('|');\n callback(node, key);\n recursiveSearchNodes(node.childrenAfterGroup);\n keyParts.pop();\n }\n });\n }\n}\n","export function convertToSet(list: T[]): Set {\n const set = new Set();\n\n list.forEach(x => set.add(x));\n\n return set;\n}\n","export type ResolveAndRejectCallback = (resolve: (value: T | null) => void, reject: (params: any) => void) => void;\n\nexport enum AgPromiseStatus {\n IN_PROGRESS, RESOLVED\n}\n\nexport class AgPromise {\n private status: AgPromiseStatus = AgPromiseStatus.IN_PROGRESS;\n private resolution: T | null = null;\n private waiters: ((value: T | null) => void)[] = [];\n\n static all(promises: AgPromise[]): AgPromise<(T | null)[]> {\n return new AgPromise(resolve => {\n let remainingToResolve = promises.length;\n const combinedValues = new Array(remainingToResolve);\n\n promises.forEach((promise, index) => {\n promise.then(value => {\n combinedValues[index] = value;\n remainingToResolve--;\n\n if (remainingToResolve === 0) {\n resolve(combinedValues);\n }\n });\n });\n });\n }\n\n static resolve(value: T | null = null): AgPromise {\n return new AgPromise(resolve => resolve(value));\n }\n\n constructor(callback: ResolveAndRejectCallback) {\n callback(value => this.onDone(value), params => this.onReject(params));\n }\n\n public then(func: (result: T | null) => V): AgPromise {\n return new AgPromise(resolve => {\n if (this.status === AgPromiseStatus.RESOLVED) {\n resolve(func(this.resolution));\n } else {\n this.waiters.push(value => resolve(func(value)));\n }\n });\n }\n\n public resolveNow(ifNotResolvedValue: Z, ifResolved: (current: T | null) => Z): Z {\n return this.status === AgPromiseStatus.RESOLVED ? ifResolved(this.resolution) : ifNotResolvedValue;\n }\n\n private onDone(value: T | null): void {\n this.status = AgPromiseStatus.RESOLVED;\n this.resolution = value;\n\n this.waiters.forEach(waiter => waiter(value));\n }\n\n private onReject(params: any): void {\n console.warn('TBI');\n }\n}\n","import * as GeneralUtils from './general';\nimport * as AriaUtils from './aria';\nimport * as ArrayUtils from './array';\nimport * as BrowserUtils from './browser';\nimport * as CsvUtils from './csv';\nimport * as DateUtils from './date';\nimport * as DomUtils from './dom';\nimport * as EventUtils from './event';\nimport * as FunctionUtils from './function';\nimport * as FuzzyMatchUtils from './fuzzyMatch';\nimport * as GenericUtils from './generic';\nimport * as IconUtils from './icon';\nimport * as KeyboardUtils from './keyboard';\nimport * as MapUtils from './map';\nimport * as MouseUtils from './mouse';\nimport * as NumberUtils from './number';\nimport * as ObjectUtils from './object';\nimport * as RowNodeUtils from './rowNode';\nimport * as SetUtils from './set';\nimport * as StringUtils from './string';\n\nconst utils = {\n ...GeneralUtils,\n ...AriaUtils,\n ...ArrayUtils,\n ...BrowserUtils,\n ...CsvUtils,\n ...DateUtils,\n ...DomUtils,\n ...EventUtils,\n ...FunctionUtils,\n ...FuzzyMatchUtils,\n ...GenericUtils,\n ...IconUtils,\n ...KeyboardUtils,\n ...MapUtils,\n ...MouseUtils,\n ...NumberUtils,\n ...ObjectUtils,\n ...RowNodeUtils,\n ...SetUtils,\n ...StringUtils,\n};\n\nexport const _ = utils;","export class NumberSequence {\n private nextValue: number;\n private step: number;\n\n constructor(initValue = 0, step = 1) {\n this.nextValue = initValue;\n this.step = step;\n }\n\n public next(): number {\n const valToReturn = this.nextValue;\n this.nextValue += this.step;\n return valToReturn;\n }\n\n public peek(): number {\n return this.nextValue;\n }\n\n public skip(count: number): void {\n this.nextValue += count;\n }\n}\n","import { Autowired, PostConstruct } from \"../context/context\";\nimport { BeanStub } from \"../context/beanStub\";\nimport { ColumnApi } from \"../columns/columnApi\";\nimport { GridApi } from \"../gridApi\";\nimport { ITooltipComp, ITooltipParams } from \"../rendering/tooltipComponent\";\nimport { PopupService } from \"./popupService\";\nimport { UserComponentFactory } from \"../components/framework/userComponentFactory\";\nimport { exists } from \"../utils/generic\";\nimport { isIOSUserAgent } from \"../utils/browser\";\nimport { WithoutGridCommon } from \"../interfaces/iCommon\";\n\nexport interface TooltipParentComp {\n getTooltipParams(): WithoutGridCommon;\n getGui(): HTMLElement;\n}\n\nenum TooltipStates { NOTHING, WAITING_TO_SHOW, SHOWING }\n\nexport class CustomTooltipFeature extends BeanStub {\n\n private readonly DEFAULT_SHOW_TOOLTIP_DELAY = 2000;\n private readonly DEFAULT_HIDE_TOOLTIP_DELAY = 10000;\n private readonly SHOW_QUICK_TOOLTIP_DIFF = 1000;\n private readonly FADE_OUT_TOOLTIP_TIMEOUT = 1000;\n\n // different instances of tooltipFeature use this to see when the\n // last tooltip was hidden.\n private static lastTooltipHideTime: number;\n\n @Autowired('popupService') private popupService: PopupService;\n @Autowired('userComponentFactory') private userComponentFactory: UserComponentFactory;\n @Autowired('columnApi') private columnApi: ColumnApi;\n @Autowired('gridApi') private gridApi: GridApi;\n\n private tooltipShowDelay: number;\n private tooltipHideDelay: number;\n\n private parentComp: TooltipParentComp;\n\n private showTooltipTimeoutId: number | undefined;\n private hideTooltipTimeoutId: number | undefined;\n\n private state = TooltipStates.NOTHING;\n\n private lastMouseEvent: MouseEvent;\n\n private tooltipComp: ITooltipComp | undefined;\n private tooltipPopupDestroyFunc: (() => void) | undefined;\n // when showing the tooltip, we need to make sure it's the most recent instance we request, as due to\n // async we could request two tooltips before the first instance returns, in which case we should\n // disregard the second instance.\n private tooltipInstanceCount = 0;\n\n private tooltipMouseTrack: boolean = false;\n\n constructor(parentComp: TooltipParentComp) {\n super();\n this.parentComp = parentComp;\n }\n\n @PostConstruct\n private postConstruct(): void {\n this.tooltipShowDelay = this.gridOptionsWrapper.getTooltipDelay('show') || this.DEFAULT_SHOW_TOOLTIP_DELAY;\n this.tooltipHideDelay = this.gridOptionsWrapper.getTooltipDelay('hide') || this.DEFAULT_HIDE_TOOLTIP_DELAY;\n this.tooltipMouseTrack = this.gridOptionsWrapper.isTooltipMouseTrack();\n\n const el = this.parentComp.getGui();\n\n this.addManagedListener(el, 'mouseenter', this.onMouseEnter.bind(this));\n this.addManagedListener(el, 'mouseleave', this.onMouseLeave.bind(this));\n this.addManagedListener(el, 'mousemove', this.onMouseMove.bind(this));\n this.addManagedListener(el, 'mousedown', this.onMouseDown.bind(this));\n this.addManagedListener(el, 'keydown', this.onKeyDown.bind(this));\n }\n\n protected destroy(): void {\n // if this component gets destroyed while tooltip is showing, need to make sure\n // we don't end with no mouseLeave event resulting in zombie tooltip\n this.setToDoNothing();\n super.destroy();\n }\n\n public onMouseEnter(e: MouseEvent): void {\n if (isIOSUserAgent()) { return; }\n // every mouseenter should be following by a mouseleave, however for some unkonwn, it's possible for\n // mouseenter to be called twice in a row, which can happen if editing the cell. this was reported\n // in https://ag-grid.atlassian.net/browse/AG-4422. to get around this, we check the state, and if\n // state is !=nothing, then we know mouseenter was already received.\n if (this.state != TooltipStates.NOTHING) { return; }\n\n // if another tooltip was hidden very recently, we only wait 200ms to show, not the normal waiting time\n const delay = this.isLastTooltipHiddenRecently() ? 200 : this.tooltipShowDelay;\n\n this.showTooltipTimeoutId = window.setTimeout(this.showTooltip.bind(this), delay);\n this.lastMouseEvent = e;\n this.state = TooltipStates.WAITING_TO_SHOW;\n }\n\n public onMouseLeave(): void {\n this.setToDoNothing();\n }\n\n private onKeyDown(): void {\n this.setToDoNothing();\n }\n\n private setToDoNothing(): void {\n if (this.state === TooltipStates.SHOWING) {\n this.hideTooltip();\n }\n\n this.clearTimeouts();\n\n this.state = TooltipStates.NOTHING;\n }\n\n public onMouseMove(e: MouseEvent): void {\n // there is a delay from the time we mouseOver a component and the time the\n // tooltip is displayed, so we need to track mousemove to be able to correctly\n // position the tooltip when showTooltip is called.\n this.lastMouseEvent = e;\n\n if (\n this.tooltipMouseTrack &&\n this.state === TooltipStates.SHOWING &&\n this.tooltipComp\n ) {\n this.positionTooltipUnderLastMouseEvent();\n }\n }\n\n public onMouseDown(): void {\n this.setToDoNothing();\n }\n\n private hideTooltip(): void {\n // check if comp exists - due to async, although we asked for\n // one, the instance may not be back yet\n if (this.tooltipComp) {\n this.destroyTooltipComp();\n CustomTooltipFeature.lastTooltipHideTime = new Date().getTime();\n }\n\n this.state = TooltipStates.NOTHING;\n }\n\n private destroyTooltipComp(): void {\n // add class to fade out the tooltip\n this.tooltipComp!.getGui().classList.add('ag-tooltip-hiding');\n\n // make local copies of these variables, as we use them in the async function below,\n // and we clear then to 'undefined' later, so need to take a copy before they are undefined.\n const tooltipPopupDestroyFunc = this.tooltipPopupDestroyFunc;\n const tooltipComp = this.tooltipComp;\n\n window.setTimeout(() => {\n tooltipPopupDestroyFunc!();\n this.getContext().destroyBean(tooltipComp);\n }, this.FADE_OUT_TOOLTIP_TIMEOUT);\n\n this.tooltipPopupDestroyFunc = undefined;\n this.tooltipComp = undefined;\n }\n\n private isLastTooltipHiddenRecently(): boolean {\n // return true if <1000ms since last time we hid a tooltip\n const now = new Date().getTime();\n const then = CustomTooltipFeature.lastTooltipHideTime;\n\n return (now - then) < this.SHOW_QUICK_TOOLTIP_DIFF;\n }\n\n private showTooltip(): void {\n const params: WithoutGridCommon = {\n ...this.parentComp.getTooltipParams()\n };\n\n if (!exists(params.value)) {\n this.setToDoNothing();\n return;\n }\n\n this.state = TooltipStates.SHOWING;\n this.tooltipInstanceCount++;\n\n // we pass in tooltipInstanceCount so the callback knows what the count was when\n // we requested the tooltip, so if another tooltip was requested in the mean time\n // we disregard it\n const callback = this.newTooltipComponentCallback.bind(this, this.tooltipInstanceCount);\n\n const userDetails = this.userComponentFactory.getTooltipCompDetails(params);\n userDetails.newAgStackInstance()!.then(callback);\n }\n\n private newTooltipComponentCallback(tooltipInstanceCopy: number, tooltipComp: ITooltipComp): void {\n const compNoLongerNeeded = this.state !== TooltipStates.SHOWING || this.tooltipInstanceCount !== tooltipInstanceCopy;\n\n if (compNoLongerNeeded) {\n this.getContext().destroyBean(tooltipComp);\n return;\n }\n\n const eGui = tooltipComp.getGui();\n\n this.tooltipComp = tooltipComp;\n\n if (!eGui.classList.contains('ag-tooltip')) {\n eGui.classList.add('ag-tooltip-custom');\n }\n\n const translate = this.gridOptionsWrapper.getLocaleTextFunc();\n\n const addPopupRes = this.popupService.addPopup({\n eChild: eGui,\n ariaLabel: translate('ariaLabelTooltip', 'Tooltip')\n });\n if (addPopupRes) {\n this.tooltipPopupDestroyFunc = addPopupRes.hideFunc;\n }\n // this.tooltipPopupDestroyFunc = this.popupService.addPopup(false, eGui, false);\n\n this.positionTooltipUnderLastMouseEvent();\n this.hideTooltipTimeoutId = window.setTimeout(this.hideTooltip.bind(this), this.tooltipHideDelay);\n }\n\n private positionTooltipUnderLastMouseEvent(): void {\n this.popupService.positionPopupUnderMouseEvent({\n type: 'tooltip',\n mouseEvent: this.lastMouseEvent,\n ePopup: this.tooltipComp!.getGui(),\n nudgeY: 18\n });\n }\n\n private clearTimeouts(): void {\n if (this.showTooltipTimeoutId) {\n window.clearTimeout(this.showTooltipTimeoutId);\n this.showTooltipTimeoutId = undefined;\n }\n\n if (this.hideTooltipTimeoutId) {\n window.clearTimeout(this.hideTooltipTimeoutId);\n this.hideTooltipTimeoutId = undefined;\n }\n }\n}\n","/**\n * A Util Class only used when debugging for printing time to console\n */\nexport class Timer {\n private timestamp = new Date().getTime();\n\n public print(msg: string) {\n const duration = (new Date().getTime()) - this.timestamp;\n console.info(`${msg} = ${duration}`);\n this.timestamp = new Date().getTime();\n }\n}","import { AgEvent } from \"../events\";\nimport { Autowired, PostConstruct, PreConstruct } from \"../context/context\";\nimport { AgStackComponentsRegistry } from \"../components/agStackComponentsRegistry\";\nimport { BeanStub } from \"../context/beanStub\";\nimport { NumberSequence } from \"../utils\";\nimport {\n isNodeOrElement,\n copyNodeList,\n iterateNamedNodeMap,\n loadTemplate,\n setVisible,\n setDisplayed\n} from '../utils/dom';\nimport { getFunctionName } from '../utils/function';\nimport { CustomTooltipFeature } from \"./customTooltipFeature\";\nimport { ITooltipParams } from \"../rendering/tooltipComponent\";\nimport { WithoutGridCommon } from \"../interfaces/iCommon\";\n\nconst compIdSequence = new NumberSequence();\n\nexport interface VisibleChangedEvent extends AgEvent {\n visible: boolean;\n}\n\nexport class CssClassManager {\n\n private getGui: () => HTMLElement;\n\n // to minimise DOM hits, we only apply CSS classes if they have changed. as adding a CSS class that is already\n // there, or removing one that wasn't present, all takes CPU.\n private cssClassStates: { [cssClass: string]: boolean } = {};\n\n constructor(getGui: () => HTMLElement) {\n this.getGui = getGui;\n }\n\n public addCssClass(className: string): void {\n const list = (className || '').split(' ');\n\n if (list.length > 1) {\n list.forEach(cls => this.addCssClass(cls));\n return;\n }\n\n const updateNeeded = this.cssClassStates[className] !== true;\n if (updateNeeded && className.length) {\n this.getGui().classList.add(className);\n this.cssClassStates[className] = true;\n }\n }\n\n public removeCssClass(className: string): void {\n const list = (className || '').split(' ');\n\n if (list.length > 1) {\n list.forEach(cls => this.removeCssClass(cls));\n return;\n }\n\n const updateNeeded = this.cssClassStates[className] !== false;\n if (updateNeeded && className.length) {\n this.getGui().classList.remove(className);\n this.cssClassStates[className] = false;\n }\n }\n\n public containsCssClass(className: string): boolean {\n return this.getGui().classList.contains(className);\n }\n\n public addOrRemoveCssClass(className: string, addOrRemove: boolean): void {\n const list = (className || '').split(' ');\n\n if (list.length > 1) {\n list.forEach(cls => this.addOrRemoveCssClass(cls, addOrRemove));\n return;\n }\n\n const updateNeeded = this.cssClassStates[className] !== addOrRemove;\n if (updateNeeded && className.length) {\n this.getGui().classList.toggle(className, addOrRemove);\n this.cssClassStates[className] = addOrRemove;\n }\n }\n}\n\nexport class Component extends BeanStub {\n\n public static elementGettingCreated: any;\n\n public static EVENT_DISPLAYED_CHANGED = 'displayedChanged';\n private eGui: HTMLElement;\n\n @Autowired('agStackComponentsRegistry') protected readonly agStackComponentsRegistry: AgStackComponentsRegistry;\n\n // if false, then CSS class \"ag-hidden\" is applied, which sets \"display: none\"\n private displayed = true;\n\n // if false, then CSS class \"ag-invisible\" is applied, which sets \"visibility: hidden\"\n private visible = true;\n\n protected parentComponent: Component | undefined;\n\n // unique id for this row component. this is used for getting a reference to the HTML dom.\n // we cannot use the RowNode id as this is not unique (due to animation, old rows can be lying\n // around as we create a new rowComp instance for the same row node).\n private compId = compIdSequence.next();\n\n private cssClassManager: CssClassManager;\n\n protected usingBrowserTooltips: boolean;\n private tooltipText: string | undefined;\n private tooltipFeature: CustomTooltipFeature | undefined;\n\n constructor(template?: string) {\n super();\n\n this.cssClassManager = new CssClassManager(() => this.eGui);\n\n if (template) {\n this.setTemplate(template);\n }\n }\n\n @PreConstruct\n private preConstructOnComponent(): void {\n this.usingBrowserTooltips = this.gridOptionsWrapper.isEnableBrowserTooltips();\n }\n\n public getCompId(): number {\n return this.compId;\n }\n\n public getTooltipParams(): WithoutGridCommon {\n return {\n value: this.tooltipText,\n location: 'UNKNOWN'\n };\n }\n\n public setTooltip(newTooltipText?: string | null): void {\n\n const removeTooltip = () => {\n if (this.usingBrowserTooltips) {\n this.getGui().removeAttribute('title');\n } else {\n this.tooltipFeature = this.destroyBean(this.tooltipFeature);\n }\n };\n\n const addTooltip = () => {\n if (this.usingBrowserTooltips) {\n this.getGui().setAttribute('title', this.tooltipText!);\n } else {\n this.tooltipFeature = this.createBean(new CustomTooltipFeature(this));\n }\n };\n\n if (this.tooltipText != newTooltipText) {\n if (this.tooltipText) {\n removeTooltip();\n }\n\n if (newTooltipText != null) {\n this.tooltipText = newTooltipText;\n\n if (this.tooltipText) {\n addTooltip();\n }\n }\n }\n }\n\n // for registered components only, eg creates AgCheckbox instance from ag-checkbox HTML tag\n private createChildComponentsFromTags(parentNode: Element, paramsMap?: { [key: string]: any; }): void {\n // we MUST take a copy of the list first, as the 'swapComponentForNode' adds comments into the DOM\n // which messes up the traversal order of the children.\n const childNodeList: Node[] = copyNodeList(parentNode.childNodes);\n\n childNodeList.forEach(childNode => {\n if (!(childNode instanceof HTMLElement)) {\n return;\n }\n\n const childComp = this.createComponentFromElement(childNode, childComp => {\n // copy over all attributes, including css classes, so any attributes user put on the tag\n // wll be carried across\n const childGui = childComp.getGui();\n if (childGui) {\n this.copyAttributesFromNode(childNode, childComp.getGui());\n }\n }, paramsMap);\n\n if (childComp) {\n if ((childComp as any).addItems && childNode.children.length) {\n this.createChildComponentsFromTags(childNode, paramsMap);\n\n // converting from HTMLCollection to Array\n const items = Array.prototype.slice.call(childNode.children);\n\n (childComp as any).addItems(items);\n }\n // replace the tag (eg ag-checkbox) with the proper HTMLElement (eg 'div') in the dom\n this.swapComponentForNode(childComp, parentNode, childNode);\n } else if (childNode.childNodes) {\n this.createChildComponentsFromTags(childNode, paramsMap);\n }\n });\n }\n\n public createComponentFromElement(\n element: HTMLElement,\n afterPreCreateCallback?: (comp: Component) => void,\n paramsMap?: { [key: string]: any; }\n ): Component | null {\n const key = element.nodeName;\n const componentParams = paramsMap ? paramsMap[element.getAttribute('ref')!] : undefined;\n const ComponentClass = this.agStackComponentsRegistry.getComponentClass(key);\n\n if (ComponentClass) {\n Component.elementGettingCreated = element;\n const newComponent = new ComponentClass(componentParams) as Component;\n newComponent.setParentComponent(this);\n\n this.createBean(newComponent, null, afterPreCreateCallback);\n return newComponent;\n }\n return null;\n }\n\n private copyAttributesFromNode(source: Element, dest: Element): void {\n iterateNamedNodeMap(source.attributes, (name, value) => dest.setAttribute(name, value));\n }\n\n private swapComponentForNode(newComponent: Component, parentNode: Element, childNode: Node): void {\n const eComponent = newComponent.getGui();\n parentNode.replaceChild(eComponent, childNode);\n parentNode.insertBefore(document.createComment(childNode.nodeName), eComponent);\n this.addDestroyFunc(this.destroyBean.bind(this, newComponent));\n this.swapInComponentForQuerySelectors(newComponent, childNode);\n }\n\n private swapInComponentForQuerySelectors(newComponent: Component, childNode: Node): void {\n const thisNoType = this as any;\n\n this.iterateOverQuerySelectors((querySelector: any) => {\n if (thisNoType[querySelector.attributeName] === childNode) {\n thisNoType[querySelector.attributeName] = newComponent;\n }\n });\n }\n\n private iterateOverQuerySelectors(action: (querySelector: any) => void): void {\n let thisPrototype: any = Object.getPrototypeOf(this);\n\n while (thisPrototype != null) {\n const metaData = thisPrototype.__agComponentMetaData;\n const currentProtoName = getFunctionName(thisPrototype.constructor);\n\n if (metaData && metaData[currentProtoName] && metaData[currentProtoName].querySelectors) {\n metaData[currentProtoName].querySelectors.forEach((querySelector: any) => action(querySelector));\n }\n\n thisPrototype = Object.getPrototypeOf(thisPrototype);\n }\n }\n\n public setTemplate(template: string | null | undefined, paramsMap?: { [key: string]: any; }): void {\n const eGui = loadTemplate(template as string);\n this.setTemplateFromElement(eGui, paramsMap);\n }\n\n public setTemplateFromElement(element: HTMLElement, paramsMap?: { [key: string]: any; }): void {\n this.eGui = element;\n (this.eGui as any).__agComponent = this;\n this.wireQuerySelectors();\n\n // context will not be available when user sets template in constructor\n if (!!this.getContext()) {\n this.createChildComponentsFromTags(this.getGui(), paramsMap);\n }\n }\n\n @PreConstruct\n private createChildComponentsPreConstruct(): void {\n // ui exists if user sets template in constructor. when this happens, we have to wait for the context\n // to be autoWired first before we can create child components.\n if (!!this.getGui()) {\n this.createChildComponentsFromTags(this.getGui());\n }\n }\n\n protected wireQuerySelectors(): void {\n if (!this.eGui) {\n return;\n }\n\n const thisNoType = this as any;\n\n this.iterateOverQuerySelectors((querySelector: any) => {\n const setResult = (result: any) => thisNoType[querySelector.attributeName] = result;\n\n // if it's a ref selector, and match is on top level component, we return\n // the element. otherwise no way of components putting ref=xxx on the top\n // level element as querySelector only looks at children.\n const topLevelRefMatch = querySelector.refSelector\n && this.eGui.getAttribute('ref') === querySelector.refSelector;\n if (topLevelRefMatch) {\n setResult(this.eGui);\n } else {\n // otherwise use querySelector, which looks at children\n const resultOfQuery = this.eGui.querySelector(querySelector.querySelector);\n if (resultOfQuery) {\n setResult(resultOfQuery.__agComponent || resultOfQuery);\n }\n }\n\n });\n }\n\n public getGui(): HTMLElement {\n return this.eGui;\n }\n\n public getFocusableElement(): HTMLElement {\n return this.eGui;\n }\n\n public setParentComponent(component: Component) {\n this.parentComponent = component;\n }\n\n public getParentComponent(): Component | undefined {\n return this.parentComponent;\n }\n\n // this method is for older code, that wants to provide the gui element,\n // it is not intended for this to be in ag-Stack\n protected setGui(eGui: HTMLElement): void {\n this.eGui = eGui;\n }\n\n protected queryForHtmlElement(cssSelector: string): HTMLElement {\n return this.eGui.querySelector(cssSelector) as HTMLElement;\n }\n\n protected queryForHtmlInputElement(cssSelector: string): HTMLInputElement {\n return this.eGui.querySelector(cssSelector) as HTMLInputElement;\n }\n\n public appendChild(newChild: HTMLElement | Component, container?: HTMLElement): void {\n if (!container) {\n container = this.eGui;\n }\n\n if (newChild == null) { return; }\n\n if (isNodeOrElement(newChild)) {\n container.appendChild(newChild as HTMLElement);\n } else {\n const childComponent = newChild as Component;\n container.appendChild(childComponent.getGui());\n this.addDestroyFunc(this.destroyBean.bind(this, childComponent));\n }\n }\n\n public isDisplayed(): boolean {\n return this.displayed;\n }\n\n public setVisible(visible: boolean): void {\n if (visible !== this.visible) {\n this.visible = visible;\n\n setVisible(this.eGui, visible);\n }\n }\n\n public setDisplayed(displayed: boolean): void {\n if (displayed !== this.displayed) {\n this.displayed = displayed;\n\n setDisplayed(this.eGui, displayed);\n\n const event: VisibleChangedEvent = {\n type: Component.EVENT_DISPLAYED_CHANGED,\n visible: this.displayed\n };\n\n this.dispatchEvent(event);\n }\n }\n\n protected destroy(): void {\n if (this.tooltipFeature) {\n this.tooltipFeature = this.destroyBean(this.tooltipFeature);\n }\n super.destroy();\n }\n\n public addGuiEventListener(event: string, listener: (event: any) => void): void {\n this.eGui.addEventListener(event, listener);\n this.addDestroyFunc(() => this.eGui.removeEventListener(event, listener));\n }\n\n public addCssClass(className: string): void {\n this.cssClassManager.addCssClass(className);\n }\n\n public removeCssClass(className: string): void {\n this.cssClassManager.removeCssClass(className);\n }\n\n public containsCssClass(className: string): boolean {\n return this.cssClassManager.containsCssClass(className);\n }\n\n public addOrRemoveCssClass(className: string, addOrRemove: boolean): void {\n this.cssClassManager.addOrRemoveCssClass(className, addOrRemove);\n }\n\n public getAttribute(key: string): string | null {\n const { eGui } = this;\n return eGui ? eGui.getAttribute(key) : null;\n }\n\n public getRefElement(refName: string): HTMLElement {\n return this.queryForHtmlElement(`[ref=\"${refName}\"]`);\n }\n}\n","import { getFunctionName } from '../utils/function';\n\nexport function QuerySelector(selector?: string): Function {\n return querySelectorFunc.bind(this, selector, undefined);\n}\n\nexport function RefSelector(ref: string): Function {\n return querySelectorFunc.bind(this, `[ref=${ref}]`, ref);\n}\n\nfunction querySelectorFunc(selector: string, refSelector: string, classPrototype: any, methodOrAttributeName: string, index: number) {\n if (selector === null) {\n console.error('AG Grid: QuerySelector selector should not be null');\n return;\n }\n\n if (typeof index === 'number') {\n console.error('AG Grid: QuerySelector should be on an attribute');\n return;\n }\n\n addToObjectProps(classPrototype, 'querySelectors', {\n attributeName: methodOrAttributeName,\n querySelector: selector,\n refSelector: refSelector\n });\n}\n\n// // think we should take this out, put property bindings on the\n// export function Method(eventName?: string): Function {\n// return methodFunc.bind(this, eventName);\n// }\n//\n// function methodFunc(alias: string, target: Object, methodName: string) {\n// if (alias === null) {\n// console.error(\"AG Grid: EventListener eventName should not be null\");\n// return;\n// }\n//\n// addToObjectProps(target, 'methods', {\n// methodName: methodName,\n// alias: alias\n// });\n// }\n\nfunction addToObjectProps(target: Object, key: string, value: any): void {\n // it's an attribute on the class\n const props = getOrCreateProps(target, getFunctionName(target.constructor));\n\n if (!props[key]) {\n props[key] = [];\n }\n\n props[key].push(value);\n}\n\nfunction getOrCreateProps(target: any, instanceName: string): any {\n if (!target.__agComponentMetaData) {\n target.__agComponentMetaData = {};\n }\n\n if (!target.__agComponentMetaData[instanceName]) {\n target.__agComponentMetaData[instanceName] = {};\n }\n\n return target.__agComponentMetaData[instanceName];\n}\n","import { IDoesFilterPassParams, IFilterOptionDef, ProvidedFilterModel } from '../../interfaces/iFilter';\nimport { RefSelector } from '../../widgets/componentAnnotations';\nimport { OptionsFactory } from './optionsFactory';\nimport { IProvidedFilter, IProvidedFilterParams, ProvidedFilter } from './providedFilter';\nimport { AgPromise, _ } from '../../utils';\nimport { AgSelect } from '../../widgets/agSelect';\nimport { AgRadioButton } from '../../widgets/agRadioButton';\nimport { includes } from '../../utils/array';\nimport { setDisplayed, setDisabled } from '../../utils/dom';\nimport { IFilterLocaleText } from '../filterLocaleText';\nimport { AgInputTextField } from '../../widgets/agInputTextField';\nimport { Component } from '../../widgets/component';\nimport { AgAbstractInputField } from '../../widgets/agAbstractInputField';\nimport { IAfterGuiAttachedParams } from '../../interfaces/iAfterGuiAttachedParams';\nimport { ListOption } from '../../widgets/agList';\nimport { IFloatingFilterParent } from '../floating/floatingFilter';\n\nexport type JoinOperator = 'AND' | 'OR';\n\n/** Interface contract for the public aspects of the SimpleFilter implementation(s). */\nexport interface ISimpleFilter extends IProvidedFilter, IFloatingFilterParent {\n}\n\nexport interface ISimpleFilterParams extends IProvidedFilterParams {\n /**\n * Array of filter options to present to the user.\n */\n filterOptions?: (IFilterOptionDef | ISimpleFilterModelType)[];\n /** The default filter option to be selected. */\n defaultOption?: string;\n /**\n * By default, the two conditions are combined using `AND`.\n * You can change this default by setting this property.\n * Options: `AND`, `OR`\n */\n defaultJoinOperator?: JoinOperator;\n /**\n * If `true`, the filter will only allow one condition.\n * Default: `false`\n */\n suppressAndOrCondition?: boolean;\n /**\n * By default, only one condition is shown, and a second is made visible once a first condition has been entered.\n * Set this to `true` to always show both conditions.\n * In this case the second condition will be disabled until a first condition has been entered.\n * Default: `false`\n */\n alwaysShowBothConditions?: boolean;\n}\n\nexport type ISimpleFilterModelType =\n 'empty'\n | 'equals'\n | 'notEqual'\n | 'lessThan'\n | 'lessThanOrEqual'\n | 'greaterThan'\n | 'greaterThanOrEqual'\n | 'inRange'\n | 'contains'\n | 'notContains'\n | 'startsWith'\n | 'endsWith'\n | 'blank'\n | 'notBlank';\nexport interface ISimpleFilterModel extends ProvidedFilterModel {\n /** One of the filter options, e.g. `'equals'` */\n type?: ISimpleFilterModelType | null;\n}\n\nexport interface ICombinedSimpleModel extends ProvidedFilterModel {\n operator: JoinOperator;\n condition1: M;\n condition2: M;\n}\n\nexport enum ConditionPosition { One, Two }\n\nexport type Tuple = (T | null)[];\n\n/**\n * Every filter with a dropdown where the user can specify a comparing type against the filter values.\n *\n * @param M type of filter-model managed by the concrete sub-class that extends this type\n * @param V type of value managed by the concrete sub-class that extends this type\n * @param E type of UI element used for collecting user-input\n */\nexport abstract class SimpleFilter extends ProvidedFilter, V> implements ISimpleFilter {\n\n public static EMPTY: ISimpleFilterModelType = 'empty';\n public static BLANK: ISimpleFilterModelType = 'blank';\n public static NOT_BLANK: ISimpleFilterModelType = 'notBlank';\n public static EQUALS: ISimpleFilterModelType = 'equals';\n public static NOT_EQUAL: ISimpleFilterModelType = 'notEqual';\n public static LESS_THAN: ISimpleFilterModelType = 'lessThan';\n public static LESS_THAN_OR_EQUAL: ISimpleFilterModelType = 'lessThanOrEqual';\n public static GREATER_THAN: ISimpleFilterModelType = 'greaterThan';\n public static GREATER_THAN_OR_EQUAL: ISimpleFilterModelType = 'greaterThanOrEqual';\n public static IN_RANGE: ISimpleFilterModelType = 'inRange';\n public static CONTAINS: ISimpleFilterModelType = 'contains';\n public static NOT_CONTAINS: ISimpleFilterModelType = 'notContains';\n public static STARTS_WITH: ISimpleFilterModelType = 'startsWith';\n public static ENDS_WITH: ISimpleFilterModelType = 'endsWith';\n\n @RefSelector('eOptions1') protected readonly eType1: AgSelect;\n @RefSelector('eOptions2') protected readonly eType2: AgSelect;\n @RefSelector('eJoinOperatorPanel') protected readonly eJoinOperatorPanel: HTMLElement;\n @RefSelector('eJoinOperatorAnd') protected readonly eJoinOperatorAnd: AgRadioButton;\n @RefSelector('eJoinOperatorOr') protected readonly eJoinOperatorOr: AgRadioButton;\n @RefSelector('eCondition1Body') protected readonly eCondition1Body: HTMLElement;\n @RefSelector('eCondition2Body') protected readonly eCondition2Body: HTMLElement;\n\n private allowTwoConditions: boolean;\n private alwaysShowBothConditions: boolean;\n private defaultJoinOperator: JoinOperator | undefined;\n\n protected optionsFactory: OptionsFactory;\n protected abstract getDefaultFilterOptions(): string[];\n\n // gets called once during initialisation, to build up the html template\n protected abstract createValueTemplate(position: ConditionPosition): string;\n\n // filter uses this to know if new model is different from previous model, ie if filter has changed\n protected abstract areSimpleModelsEqual(a: ISimpleFilterModel, b: ISimpleFilterModel): boolean;\n\n // getModel() calls this to create the two conditions. if only one condition,\n // the result is returned by getModel(), otherwise is called twice and both results\n // returned in a CombinedFilter object.\n protected abstract createCondition(position: ConditionPosition): M;\n\n // because the sub-class filter models have different attribute names, we have to map\n protected abstract mapValuesFromModel(filterModel: ISimpleFilterModel | null): Tuple;\n\n // allow value-type specific handling of null cell values.\n protected abstract evaluateNullValue(filterType?: ISimpleFilterModelType | null): boolean;\n\n // allow value-type specific handling of non-null cell values.\n protected abstract evaluateNonNullValue(range: Tuple, cellValue: V, filterModel: M, params: IDoesFilterPassParams): boolean;\n\n // allow iteration of all condition inputs managed by sub-classes.\n protected abstract getInputs(): Tuple[];\n\n // allow retrieval of all condition input values.\n protected abstract getValues(position: ConditionPosition): Tuple;\n\n protected getNumberOfInputs(type?: ISimpleFilterModelType | null): number {\n const customOpts = this.optionsFactory.getCustomOption(type);\n if (customOpts) {\n const { numberOfInputs } = customOpts;\n return numberOfInputs != null ? numberOfInputs : 1;\n }\n\n const zeroInputTypes = [\n SimpleFilter.EMPTY, SimpleFilter.NOT_BLANK, SimpleFilter.BLANK,\n ];\n\n if (type && zeroInputTypes.indexOf(type) >= 0) {\n return 0;\n } else if (type === SimpleFilter.IN_RANGE) {\n return 2;\n }\n\n return 1;\n }\n\n // floating filter calls this when user applies filter from floating filter\n public onFloatingFilterChanged(type: string | null | undefined, value: V | null): void {\n this.setTypeFromFloatingFilter(type);\n this.setValueFromFloatingFilter(value);\n this.onUiChanged(true);\n }\n\n protected setTypeFromFloatingFilter(type?: string | null): void {\n this.eType1.setValue(type);\n this.eType2.setValue(this.optionsFactory.getDefaultOption());\n (this.isDefaultOperator('AND') ? this.eJoinOperatorAnd : this.eJoinOperatorOr).setValue(true);\n }\n\n public getModelFromUi(): M | ICombinedSimpleModel | null {\n if (!this.isConditionUiComplete(ConditionPosition.One)) {\n return null;\n }\n\n if (this.isAllowTwoConditions() && this.isConditionUiComplete(ConditionPosition.Two)) {\n return {\n filterType: this.getFilterType(),\n operator: this.getJoinOperator(),\n condition1: this.createCondition(ConditionPosition.One),\n condition2: this.createCondition(ConditionPosition.Two)\n };\n }\n\n return this.createCondition(ConditionPosition.One);\n }\n\n protected getConditionTypes(): Tuple {\n return [\n this.eType1.getValue() as ISimpleFilterModelType,\n this.eType2.getValue() as ISimpleFilterModelType,\n ];\n }\n\n protected getJoinOperator(): JoinOperator {\n return this.eJoinOperatorOr.getValue() === true ? 'OR' : 'AND';\n }\n\n protected areModelsEqual(a: M | ICombinedSimpleModel, b: M | ICombinedSimpleModel): boolean {\n // both are missing\n if (!a && !b) { return true; }\n\n // one is missing, other present\n if ((!a && b) || (a && !b)) { return false; }\n\n // one is combined, the other is not\n const aIsSimple = !(a as any).operator;\n const bIsSimple = !(b as any).operator;\n const oneSimpleOneCombined = (!aIsSimple && bIsSimple) || (aIsSimple && !bIsSimple);\n if (oneSimpleOneCombined) { return false; }\n\n let res: boolean;\n\n // otherwise both present, so compare\n if (aIsSimple) {\n const aSimple = a as M;\n const bSimple = b as M;\n\n res = this.areSimpleModelsEqual(aSimple, bSimple);\n } else {\n const aCombined = a as ICombinedSimpleModel;\n const bCombined = b as ICombinedSimpleModel;\n\n res = aCombined.operator === bCombined.operator\n && this.areSimpleModelsEqual(aCombined.condition1, bCombined.condition1)\n && this.areSimpleModelsEqual(aCombined.condition2, bCombined.condition2);\n }\n\n return res;\n }\n\n protected setModelIntoUi(model: ISimpleFilterModel | ICombinedSimpleModel): AgPromise {\n const isCombined = (model as any).operator;\n\n if (isCombined) {\n const combinedModel = model as ICombinedSimpleModel;\n\n const orChecked = combinedModel.operator === 'OR';\n this.eJoinOperatorAnd.setValue(!orChecked);\n this.eJoinOperatorOr.setValue(orChecked);\n\n this.eType1.setValue(combinedModel.condition1.type);\n this.eType2.setValue(combinedModel.condition2.type);\n\n this.setConditionIntoUi(combinedModel.condition1, ConditionPosition.One);\n this.setConditionIntoUi(combinedModel.condition2, ConditionPosition.Two);\n } else {\n const simpleModel = model as ISimpleFilterModel;\n\n this.eJoinOperatorAnd.setValue(this.isDefaultOperator('AND'));\n this.eJoinOperatorOr.setValue(this.isDefaultOperator('OR'));\n\n this.eType1.setValue(simpleModel.type);\n this.eType2.setValue(this.optionsFactory.getDefaultOption());\n\n this.setConditionIntoUi(simpleModel as M, ConditionPosition.One);\n this.setConditionIntoUi(null, ConditionPosition.Two);\n }\n\n return AgPromise.resolve();\n }\n\n public doesFilterPass(params: IDoesFilterPassParams): boolean {\n const model = this.getModel();\n\n if (model == null) { return true; }\n\n const { operator } = model as ICombinedSimpleModel;\n const models: M[] = [];\n\n if (operator) {\n const combinedModel = model as ICombinedSimpleModel;\n\n models.push(combinedModel.condition1, combinedModel.condition2);\n } else {\n models.push(model as M);\n }\n\n const combineFunction = operator && operator === 'OR' ? 'some' : 'every';\n\n return models[combineFunction](m => this.individualConditionPasses(params, m));\n }\n\n protected setParams(params: ISimpleFilterParams): void {\n super.setParams(params);\n\n this.optionsFactory = new OptionsFactory();\n this.optionsFactory.init(params, this.getDefaultFilterOptions());\n\n this.allowTwoConditions = !params.suppressAndOrCondition;\n this.alwaysShowBothConditions = !!params.alwaysShowBothConditions;\n this.defaultJoinOperator = this.getDefaultJoinOperator(params.defaultJoinOperator);\n\n this.putOptionsIntoDropdown();\n this.addChangedListeners();\n }\n\n private getDefaultJoinOperator(defaultJoinOperator?: JoinOperator): JoinOperator | undefined {\n return includes(['AND', 'OR'], defaultJoinOperator) ? defaultJoinOperator : 'AND';\n }\n\n private putOptionsIntoDropdown(): void {\n const filterOptions = this.optionsFactory.getFilterOptions();\n const eTypes = [this.eType1, this.eType2];\n\n // Add specified options to all condition drop-downs.\n filterOptions.forEach(option => {\n const listOption = typeof option === 'string' ?\n this.createBoilerplateListOption(option) :\n this.createCustomListOption(option);\n\n eTypes.forEach(eType => eType.addOption(listOption));\n });\n\n // Make drop-downs read-only if there is only one option.\n eTypes.forEach(eType => eType.setDisabled(filterOptions.length <= 1));\n }\n\n private createBoilerplateListOption(option: string): ListOption {\n return { value: option, text: this.translate(option as keyof IFilterLocaleText) };\n }\n\n private createCustomListOption(option: IFilterOptionDef): ListOption {\n const { displayKey } = option;\n const customOption = this.optionsFactory.getCustomOption(option.displayKey);\n return {\n value: displayKey,\n text: customOption ?\n this.gridOptionsWrapper.getLocaleTextFunc()(customOption.displayKey, customOption.displayName) :\n this.translate(displayKey as keyof IFilterLocaleText),\n };\n }\n\n public isAllowTwoConditions(): boolean {\n return this.allowTwoConditions;\n }\n\n protected createBodyTemplate(): string {\n return /* html */`\n \n ${this.createValueTemplate(ConditionPosition.One)}\n
\n \n \n
\n \n ${this.createValueTemplate(ConditionPosition.Two)}`;\n }\n\n protected getCssIdentifier() {\n return 'simple-filter';\n }\n\n protected updateUiVisibility(): void {\n const elementConditionGroups = [\n [this.eType1],\n [this.eType2, this.eJoinOperatorPanel, this.eJoinOperatorAnd, this.eJoinOperatorOr],\n ];\n const elementBodies = [this.eCondition1Body, this.eCondition2Body];\n\n elementConditionGroups.forEach((group, position) => {\n const visible = this.isConditionVisible(position);\n const disabled = this.isConditionDisabled(position);\n\n group.forEach(element => {\n if (element instanceof AgAbstractInputField || element instanceof AgSelect) {\n element.setDisabled(disabled);\n element.setDisplayed(visible);\n } else {\n setDisabled(element, disabled);\n setDisplayed(element, visible);\n }\n });\n });\n\n elementBodies.forEach((element, index) => {\n setDisplayed(element, this.isConditionBodyVisible(index));\n });\n\n this.forEachInput((element, index, position, numberOfInputs) => {\n this.setElementDisplayed(element, index < numberOfInputs);\n this.setElementDisabled(element, this.isConditionDisabled(position));\n });\n\n this.resetPlaceholder();\n }\n\n public afterGuiAttached(params?: IAfterGuiAttachedParams) {\n super.afterGuiAttached(params);\n\n this.resetPlaceholder();\n\n if (!params || (!params.suppressFocus && !this.isReadOnly())) {\n const firstInput = this.getInputs()[0][0];\n if (!firstInput) { return; }\n\n if (firstInput instanceof AgAbstractInputField) {\n firstInput.getInputElement().focus();\n }\n }\n }\n\n // allow sub-classes to reset HTML placeholders after UI update.\n protected resetPlaceholder(): void {\n const globalTranslate = this.gridOptionsWrapper.getLocaleTextFunc();\n\n this.forEachInput((element, index, _, numberOfInputs) => {\n if (!(element instanceof AgAbstractInputField)) {\n return;\n }\n\n const placeholder =\n index === 0 && numberOfInputs > 1 ? 'inRangeStart' :\n index === 0 ? 'filterOoo' :\n 'inRangeEnd';\n const ariaLabel =\n index === 0 && numberOfInputs > 1 ? globalTranslate('ariaFilterFromValue', 'Filter from value') :\n index === 0 ? globalTranslate('ariaFilterValue', 'Filter Value') :\n globalTranslate('ariaFilterToValue', 'Filter to Value');\n\n element.setInputPlaceholder(this.translate(placeholder));\n element.setInputAriaLabel(ariaLabel);\n });\n }\n\n protected setElementValue(element: E, value: V | null, silent?: boolean): void {\n if (element instanceof AgAbstractInputField) {\n element.setValue(value != null ? String(value) : null, silent);\n }\n }\n\n protected setElementDisplayed(element: E, displayed: boolean): void {\n if (element instanceof Component) {\n setDisplayed(element.getGui(), displayed);\n }\n }\n\n protected setElementDisabled(element: E, disabled: boolean): void {\n if (element instanceof Component) {\n setDisabled(element.getGui(), disabled);\n }\n }\n\n protected attachElementOnChange(element: E, listener: () => void): void {\n if (element instanceof AgAbstractInputField) {\n element.onValueChange(listener);\n }\n }\n\n protected forEachInput(cb: (element: E, index: number, position: number, numberOfInputs: number) => void): void {\n const inputs = this.getInputs();\n this.getConditionTypes().forEach((type, position) => {\n const numberOfInputs = this.getNumberOfInputs(type);\n for (let index = 0; index < inputs[position].length; index++) {\n const input = inputs[position][index];\n if (input != null) {\n cb(input, index, position, numberOfInputs);\n }\n }\n });\n }\n\n protected isConditionVisible(position: ConditionPosition): boolean {\n if (position === 0) { return true; } // Position 0 should always be visible.\n if (!this.allowTwoConditions) { return false; } // Short-circuit if no tail conditions.\n\n if (this.isReadOnly()) {\n // Only display a condition when read-only if the condition is complete.\n return this.isConditionUiComplete(position);\n }\n\n if (this.alwaysShowBothConditions) { return true; }\n\n // Only display a 2nd or later condition when the previous condition is complete.\n return this.isConditionUiComplete(position - 1);\n }\n\n protected isConditionDisabled(position: ConditionPosition): boolean {\n if (this.isReadOnly()) { return true; } // Read-only mode trumps everything.\n if (!this.isConditionVisible(position)) { return true; } // Invisible implies disabled.\n if (position === 0) { return false; } // Position 0 should typically be editable.\n\n // Only allow editing of a 2nd or later condition if the previous condition is complete.\n return !this.isConditionUiComplete(position - 1);\n }\n\n protected isConditionBodyVisible(position: ConditionPosition): boolean {\n if (!this.isConditionVisible(position)) { return false; }\n\n // Check that the condition needs inputs.\n const type = this.getConditionTypes()[position];\n const numberOfInputs = this.getNumberOfInputs(type);\n return numberOfInputs > 0;\n }\n\n // returns true if the UI represents a working filter, eg all parts are filled out.\n // eg if text filter and textfield blank then returns false.\n protected isConditionUiComplete(position: ConditionPosition): boolean {\n const type = this.getConditionTypes()[position];\n\n if (type === SimpleFilter.EMPTY) { return false; }\n\n if (this.getValues(position).some(v => v == null)) {\n return false;\n }\n\n return true;\n }\n\n protected resetUiToDefaults(silent?: boolean): AgPromise {\n const translate = this.gridOptionsWrapper.getLocaleTextFunc();\n const filteringLabel = translate('ariaFilteringOperator', 'Filtering operator');\n const uniqueGroupId = 'ag-simple-filter-and-or-' + this.getCompId();\n const defaultOption = this.optionsFactory.getDefaultOption();\n\n this.eType1\n .setValue(defaultOption, silent)\n .setAriaLabel(filteringLabel)\n .setDisabled(this.isReadOnly());\n this.eType2\n .setValue(this.optionsFactory.getDefaultOption(), silent)\n .setAriaLabel(filteringLabel)\n .setDisabled(this.isReadOnly());\n\n this.eJoinOperatorAnd\n .setValue(this.isDefaultOperator('AND'), silent)\n .setName(uniqueGroupId)\n .setLabel(this.translate('andCondition'))\n .setDisabled(this.isReadOnly());\n\n this.eJoinOperatorOr\n .setValue(this.isDefaultOperator('OR'), silent)\n .setName(uniqueGroupId)\n .setLabel(this.translate('orCondition'))\n .setDisabled(this.isReadOnly());\n\n this.forEachInput((element) => {\n this.setElementValue(element, null, silent);\n this.setElementDisabled(element, this.isReadOnly());\n });\n\n this.resetPlaceholder();\n\n return AgPromise.resolve();\n }\n\n // puts model values into the UI\n protected setConditionIntoUi(model: M | null, position: ConditionPosition): void {\n const values = this.mapValuesFromModel(model);\n this.forEachInput((element, index, elPosition, _) => {\n if (elPosition !== position) { return; }\n\n this.setElementValue(element, values[index] != null ? values[index] : null);\n });\n }\n\n // after floating filter changes, this sets the 'value' section. this is implemented by the base class\n // (as that's where value is controlled), the 'type' part from the floating filter is dealt with in this class.\n protected setValueFromFloatingFilter(value: V | null): void {\n this.forEachInput((element, index, position, _) => {\n this.setElementValue(element, index === 0 && position === 0 ? value : null);\n });\n }\n\n private isDefaultOperator(operator: JoinOperator): boolean {\n return operator === this.defaultJoinOperator;\n }\n\n private addChangedListeners() {\n if (this.isReadOnly()) {\n return;\n }\n\n const listener = () => this.onUiChanged();\n this.eType1.onValueChange(listener);\n this.eType2.onValueChange(listener);\n this.eJoinOperatorOr.onValueChange(listener);\n this.eJoinOperatorAnd.onValueChange(listener);\n\n this.forEachInput((element) => {\n this.attachElementOnChange(element, listener);\n });\n }\n\n /** returns true if the row passes the said condition */\n protected individualConditionPasses(params: IDoesFilterPassParams, filterModel: M) {\n const cellValue = this.getCellValue(params.node);\n const values = this.mapValuesFromModel(filterModel);\n const customFilterOption = this.optionsFactory.getCustomOption(filterModel.type);\n\n const customFilterResult = this.evaluateCustomFilter(customFilterOption, values, cellValue);\n if (customFilterResult != null) {\n return customFilterResult;\n }\n\n if (cellValue == null) {\n return this.evaluateNullValue(filterModel.type);\n }\n\n return this.evaluateNonNullValue(values, cellValue, filterModel, params);\n }\n\n protected evaluateCustomFilter(\n customFilterOption: IFilterOptionDef | undefined,\n values: Tuple,\n cellValue: V,\n ): boolean | undefined {\n if (customFilterOption == null) {\n return;\n }\n\n const { predicate } = customFilterOption;\n // only execute the custom filter if a value exists or a value isn't required, i.e. input is hidden\n if (predicate != null && !values.some(v => v == null)) {\n return predicate(values, cellValue);\n }\n\n // No custom filter invocation, indicate that to the caller.\n return;\n }\n\n protected isBlank(cellValue: V) {\n return cellValue == null ||\n (typeof cellValue === 'string' && cellValue.trim().length === 0);\n }\n}\n","import { IFloatingFilterComp, IFloatingFilterParams, IFloatingFilterParent } from '../floatingFilter';\nimport { Component } from '../../../widgets/component';\nimport { RefSelector } from '../../../widgets/componentAnnotations';\nimport { AgInputTextField } from '../../../widgets/agInputTextField';\nimport { Autowired } from '../../../context/context';\nimport { ColumnModel } from '../../../columns/columnModel';\nimport { IFilter } from '../../../interfaces/iFilter';\n\n// optional floating filter for user provided filters - instead of providing a floating filter,\n// they can provide a getModelAsString() method on the filter instead. this class just displays\n// the string returned from getModelAsString()\nexport class ReadOnlyFloatingFilter extends Component implements IFloatingFilterComp {\n\n @RefSelector('eFloatingFilterText') private eFloatingFilterText: AgInputTextField;\n @Autowired('columnModel') private columnModel: ColumnModel;\n\n private params: IFloatingFilterParams;\n\n constructor() {\n super(/* html */`\n
\n \n
`);\n }\n\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n public destroy(): void {\n super.destroy();\n }\n\n public init(params: IFloatingFilterParams): void {\n this.params = params;\n const displayName = this.columnModel.getDisplayNameForColumn(params.column, 'header', true);\n const translate = this.gridOptionsWrapper.getLocaleTextFunc();\n this.eFloatingFilterText\n .setDisabled(true)\n .setInputAriaLabel(`${displayName} ${translate('ariaFilterInput', 'Filter Input')}`);\n }\n\n public onParentModelChanged(parentModel: any): void {\n if (!parentModel) {\n this.eFloatingFilterText.setValue('');\n return;\n }\n\n this.params.parentFilterInstance(filterInstance => {\n // it would be nice to check if getModelAsString was present before creating this component,\n // however that is not possible, as React Hooks and VueJS don't attached the methods to the Filter until\n // AFTER the filter is created, not allowing inspection before this (we create floating filters as columns\n // are drawn, but the parent filters are only created when needed).\n if (filterInstance.getModelAsString) {\n const modelAsString = filterInstance.getModelAsString(parentModel);\n this.eFloatingFilterText.setValue(modelAsString);\n }\n });\n }\n}\n","import { IDateComp, IDateParams } from '../../../rendering/dateComponent';\nimport { UserComponentFactory } from '../../../components/framework/userComponentFactory';\nimport { Context } from '../../../context/context';\nimport { IAfterGuiAttachedParams } from '../../../interfaces/iAfterGuiAttachedParams';\nimport { setDisplayed } from '../../../utils/dom';\nimport { WithoutGridCommon } from '../../../interfaces/iCommon';\n\n/** Provides sync access to async component. Date component can be lazy created - this class encapsulates\n * this by keeping value locally until DateComp has loaded, then passing DateComp the value. */\nexport class DateCompWrapper {\n private dateComp: IDateComp | null | undefined;\n private tempValue: Date | null;\n private disabled: boolean | null;\n private displayed: boolean | null;\n private alive = true;\n private context: Context;\n private eParent: HTMLElement;\n\n constructor(context: Context, userComponentFactory: UserComponentFactory, dateComponentParams: WithoutGridCommon, eParent: HTMLElement) {\n this.context = context;\n this.eParent = eParent;\n\n const compDetails = userComponentFactory.getDateCompDetails(dateComponentParams);\n const promise = compDetails.newAgStackInstance();\n\n promise!.then(dateComp => {\n // because async, check the filter still exists after component comes back\n if (!this.alive) {\n context.destroyBean(dateComp);\n return;\n }\n\n this.dateComp = dateComp;\n\n if (!dateComp) { return; }\n\n eParent.appendChild(dateComp.getGui());\n\n if (dateComp.afterGuiAttached) {\n dateComp.afterGuiAttached();\n }\n\n if (this.tempValue) {\n dateComp.setDate(this.tempValue);\n }\n if (this.disabled != null) {\n this.setDateCompDisabled(this.disabled);\n }\n });\n }\n\n public destroy(): void {\n this.alive = false;\n this.dateComp = this.context.destroyBean(this.dateComp);\n }\n\n public getDate(): Date | null {\n return this.dateComp ? this.dateComp.getDate() : this.tempValue;\n }\n\n public setDate(value: Date | null): void {\n if (this.dateComp) {\n this.dateComp.setDate(value);\n } else {\n this.tempValue = value;\n }\n }\n\n public setDisabled(disabled: boolean): void {\n if (this.dateComp) {\n this.setDateCompDisabled(disabled);\n } else {\n this.disabled = disabled;\n }\n }\n\n public setDisplayed(displayed: boolean) {\n setDisplayed(this.eParent, displayed);\n }\n\n public setInputPlaceholder(placeholder: string): void {\n if (this.dateComp && this.dateComp.setInputPlaceholder) {\n this.dateComp.setInputPlaceholder(placeholder);\n }\n }\n\n public setInputAriaLabel(label: string): void {\n if (this.dateComp && this.dateComp.setInputAriaLabel) {\n this.dateComp.setInputAriaLabel(label);\n }\n }\n\n public afterGuiAttached(params?: IAfterGuiAttachedParams): void {\n if (this.dateComp && typeof this.dateComp.afterGuiAttached === 'function') {\n this.dateComp.afterGuiAttached(params);\n }\n }\n\n private setDateCompDisabled(disabled: boolean): void {\n if (this.dateComp == null) { return; }\n if (this.dateComp.setDisabled == null) { return; }\n\n this.dateComp.setDisabled(disabled);\n }\n\n}\n","import { IFilterOptionDef } from '../../interfaces/iFilter';\nimport { IScalarFilterParams } from './scalarFilter';\nimport { ISimpleFilterParams } from './simpleFilter';\nimport { _ } from '../../utils';\n\n/* Common logic for options, used by both filters and floating filters. */\nexport class OptionsFactory {\n protected customFilterOptions: { [name: string]: IFilterOptionDef; } = {};\n protected filterOptions: (IFilterOptionDef | string)[];\n protected defaultOption: string;\n\n public init(params: IScalarFilterParams, defaultOptions: string[]): void {\n this.filterOptions = params.filterOptions || defaultOptions;\n this.mapCustomOptions();\n this.selectDefaultItem(params);\n\n this.checkForDeprecatedParams();\n }\n\n private checkForDeprecatedParams(): void {\n if (this.filterOptions.some(opt => typeof opt != 'string' && opt.test != null)) {\n console.warn(`AG Grid: [IFilterOptionDef] since v26.2.0, test() has been replaced with predicate().`);\n }\n if (this.filterOptions.some(opt => typeof opt != 'string' && opt.hideFilterInput != null)) {\n console.warn(`AG Grid: [IFilterOptionDef] since v26.2.0, useOfHideFilterInput has been replaced with numberOfInputs.`);\n }\n }\n\n public getFilterOptions(): (IFilterOptionDef | string)[] {\n return this.filterOptions;\n }\n\n private mapCustomOptions(): void {\n if (!this.filterOptions) { return; }\n\n this.filterOptions.forEach(filterOption => {\n if (typeof filterOption === 'string') { return; }\n\n const requiredProperties = [['displayKey'], ['displayName'], ['predicate', 'test']];\n const propertyCheck = (keys: [keyof IFilterOptionDef]) => {\n if (!keys.some(key => filterOption[key] != null)) {\n console.warn(`AG Grid: ignoring FilterOptionDef as it doesn't contain one of '${keys}'`);\n return false;\n }\n\n return true;\n };\n\n if (!requiredProperties.every(propertyCheck)) {\n this.filterOptions = this.filterOptions.filter(v => v === filterOption) || [];\n return;\n }\n\n const { test } = filterOption;\n const mutatedFilterOptions = { ...filterOption };\n if (test != null && filterOption.predicate == null) {\n mutatedFilterOptions.predicate = (v: any[], cv: any) => test(v[0], cv);\n delete mutatedFilterOptions.test;\n }\n if (mutatedFilterOptions.hideFilterInput && mutatedFilterOptions.numberOfInputs == null) {\n mutatedFilterOptions.numberOfInputs = 0;\n delete mutatedFilterOptions.hideFilterInput;\n }\n\n this.customFilterOptions[filterOption.displayKey] = mutatedFilterOptions;\n });\n }\n\n private selectDefaultItem(params: ISimpleFilterParams): void {\n if (params.defaultOption) {\n this.defaultOption = params.defaultOption;\n } else if (this.filterOptions.length >= 1) {\n const firstFilterOption = this.filterOptions[0];\n\n if (typeof firstFilterOption === 'string') {\n this.defaultOption = firstFilterOption;\n } else if (firstFilterOption.displayKey) {\n this.defaultOption = firstFilterOption.displayKey;\n } else {\n console.warn(`AG Grid: invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'`);\n }\n } else {\n console.warn('AG Grid: no filter options for filter');\n }\n }\n\n public getDefaultOption(): string {\n return this.defaultOption;\n }\n\n public getCustomOption(name?: string | null): IFilterOptionDef | undefined {\n return this.customFilterOptions[name!];\n }\n}\n","export interface IFilterLocaleText {\n applyFilter: string;\n clearFilter: string;\n resetFilter: string;\n cancelFilter: string;\n filterOoo: string;\n empty: string;\n equals: string;\n notEqual: string;\n lessThan: string;\n greaterThan: string;\n inRange: string;\n inRangeStart: string;\n inRangeEnd: string;\n lessThanOrEqual: string;\n greaterThanOrEqual: string;\n contains: string;\n notContains: string;\n startsWith: string;\n endsWith: string;\n blank: string;\n notBlank: string;\n andCondition: string;\n orCondition: string;\n dateFormatOoo: string;\n}\n\nexport interface IFilterTitleLocaleText {\n textFilter: string;\n numberFilter: string;\n dateFilter: string;\n setFilter: string;\n}\n\nexport const DEFAULT_FILTER_LOCALE_TEXT: IFilterLocaleText & IFilterTitleLocaleText = {\n applyFilter: 'Apply',\n clearFilter: 'Clear',\n resetFilter: 'Reset',\n cancelFilter: 'Cancel',\n textFilter: 'Text Filter',\n numberFilter: 'Number Filter',\n dateFilter: 'Date Filter',\n setFilter: 'Set Filter',\n filterOoo: 'Filter...',\n empty: 'Choose One',\n equals: 'Equals',\n notEqual: 'Not equal',\n lessThan: 'Less than',\n greaterThan: 'Greater than',\n inRange: 'In range',\n inRangeStart: 'From',\n inRangeEnd: 'To',\n lessThanOrEqual: 'Less than or equals',\n greaterThanOrEqual: 'Greater than or equals',\n contains: 'Contains',\n notContains: 'Not contains',\n startsWith: 'Starts with',\n endsWith: 'Ends with',\n blank: 'Blank',\n notBlank: 'Not blank',\n andCondition: 'AND',\n orCondition: 'OR',\n dateFormatOoo: 'yyyy-mm-dd',\n};","export class KeyCode {\n static BACKSPACE = 'Backspace';\n static TAB = 'Tab';\n static ENTER = 'Enter';\n static ESCAPE = 'Escape';\n static SPACE = ' ';\n static LEFT = 'ArrowLeft';\n static UP = 'ArrowUp';\n static RIGHT = 'ArrowRight';\n static DOWN = 'ArrowDown';\n static DELETE = 'Delete';\n\n static F2 = 'F2';\n\n static PAGE_UP = 'PageUp';\n static PAGE_DOWN = 'PageDown';\n static PAGE_HOME = 'Home';\n static PAGE_END = 'End';\n\n // these should be used with `event.code` instead of `event.key`\n // as `event.key` changes when non-latin keyboards are used\n static A = 'KeyA';\n static C = 'KeyC';\n static V = 'KeyV';\n static D = 'KeyD';\n static Z = 'KeyZ';\n static Y = 'KeyY';\n}\n","import { PostConstruct, Autowired } from '../context/context';\nimport { FocusService } from '../focusService';\nimport { KeyCode } from '../constants/keyCode';\nimport { isStopPropagationForAgGrid, stopPropagationForAgGrid } from '../utils/event';\nimport { BeanStub } from '../context/beanStub';\n\nexport interface ManagedFocusCallbacks {\n shouldStopEventPropagation?: (e: KeyboardEvent) => boolean;\n onTabKeyDown?: (e: KeyboardEvent) => void;\n handleKeyDown?: (e: KeyboardEvent) => void;\n onFocusIn?: (e: FocusEvent) => void;\n onFocusOut?: (e: FocusEvent) => void;\n}\n\nexport class ManagedFocusFeature extends BeanStub {\n\n public static FOCUS_MANAGED_CLASS = 'ag-focus-managed';\n\n @Autowired('focusService') private readonly focusService: FocusService;\n\n constructor(\n private readonly eFocusableElement: HTMLElement,\n private callbacks: ManagedFocusCallbacks = {}\n ) {\n super();\n this.callbacks = {\n shouldStopEventPropagation: () => false,\n onTabKeyDown: (e: KeyboardEvent) => {\n if (e.defaultPrevented) { return; }\n\n const nextRoot = this.focusService.findNextFocusableElement(this.eFocusableElement, false, e.shiftKey);\n\n if (!nextRoot) { return; }\n\n nextRoot.focus();\n e.preventDefault();\n },\n ...callbacks\n };\n }\n\n @PostConstruct\n protected postConstruct(): void {\n this.eFocusableElement.classList.add(ManagedFocusFeature.FOCUS_MANAGED_CLASS);\n\n this.addKeyDownListeners(this.eFocusableElement);\n\n if (this.callbacks.onFocusIn) {\n this.addManagedListener(this.eFocusableElement, 'focusin', this.callbacks.onFocusIn);\n }\n\n if (this.callbacks.onFocusOut) {\n this.addManagedListener(this.eFocusableElement, 'focusout', this.callbacks.onFocusOut);\n }\n }\n\n private addKeyDownListeners(eGui: HTMLElement): void {\n this.addManagedListener(eGui, 'keydown', (e: KeyboardEvent) => {\n if (e.defaultPrevented || isStopPropagationForAgGrid(e)) { return; }\n\n if (this.callbacks.shouldStopEventPropagation!(e)) {\n stopPropagationForAgGrid(e);\n return;\n }\n\n if (e.key === KeyCode.TAB) {\n this.callbacks.onTabKeyDown!(e);\n } else if (this.callbacks.handleKeyDown) {\n this.callbacks.handleKeyDown(e);\n }\n });\n }\n}\n","import { IDoesFilterPassParams, IFilter, IFilterComp, IFilterParams } from '../../interfaces/iFilter';\nimport { Autowired, PostConstruct } from '../../context/context';\nimport { IRowModel } from '../../interfaces/iRowModel';\nimport { IAfterGuiAttachedParams } from '../../interfaces/iAfterGuiAttachedParams';\nimport { loadTemplate, setDisabled } from '../../utils/dom';\nimport { debounce } from '../../utils/function';\nimport { AgPromise } from '../../utils/promise';\nimport { PopupEventParams } from '../../widgets/popupService';\nimport { IFilterLocaleText, IFilterTitleLocaleText, DEFAULT_FILTER_LOCALE_TEXT } from '../filterLocaleText';\nimport { ManagedFocusFeature } from '../../widgets/managedFocusFeature';\nimport { convertToSet } from '../../utils/set';\nimport { Component } from '../../widgets/component';\nimport { RowNode } from '../../entities/rowNode';\nimport { ValueService } from '../../valueService/valueService';\nimport { _ } from '../../utils';\n\ntype FilterButtonType = 'apply' | 'clear' | 'reset' | 'cancel';\n\nexport interface IProvidedFilterParams extends IFilterParams {\n /**\n * Specifies the buttons to be shown in the filter, in the order they should be displayed in.\n * The options are:\n * \n * - `'apply'`: If the Apply button is present, the filter is only applied after the user hits the Apply button.\n * - `'clear'`: The Clear button will clear the (form) details of the filter without removing any active filters on the column.\n * - `'reset'`: The Reset button will clear the details of the filter and any active filters on that column.\n * - `'cancel'`: The Cancel button will discard any changes that have been made to the filter in the UI, restoring the applied model.\n */\n buttons?: FilterButtonType[];\n /**\n * If the Apply button is present, the filter popup will be closed immediately when the Apply\n * or Reset button is clicked if this is set to `true`.\n * \n * Default: `false`\n */\n closeOnApply?: boolean;\n /**\n * Overrides the default debounce time in milliseconds for the filter. Defaults are:\n * - `TextFilter` and `NumberFilter`: 500ms. (These filters have text field inputs, so a short delay before the input is formatted and the filtering applied is usually appropriate).\n * - `DateFilter` and `SetFilter`: 0ms\n */\n debounceMs?: number;\n /**\n * If set to `true`, disables controls in the filter to mutate its state. Normally this would\n * be used in conjunction with the Filter API.\n * \n * Default: `false`\n */\n readOnly?: boolean;\n}\n\n/** Interface contract for the public aspects of the ProvidedFilter implementation(s). */\nexport interface IProvidedFilter extends IFilter {\n /**\n * Applies the model shown in the UI (so that `getModel()` will now return what was in the UI\n * when `applyModel()` was called).\n */\n applyModel(): boolean;\n /**\n * Returns the filter model from the UI. If changes have been made to the UI but not yet\n * applied, this model will reflect those changes.\n */\n getModelFromUi(): any;\n}\n\n/**\n * Contains common logic to all provided filters (apply button, clear button, etc).\n * All the filters that come with AG Grid extend this class. User filters do not\n * extend this class.\n *\n * @param M type of filter-model managed by the concrete sub-class that extends this type\n * @param V type of value managed by the concrete sub-class that extends this type\n */\nexport abstract class ProvidedFilter extends Component implements IProvidedFilter, IFilterComp {\n // each level in the hierarchy will save params with the appropriate type for that level.\n private providedFilterParams: IProvidedFilterParams;\n\n private applyActive = false;\n private hidePopup: ((params: PopupEventParams) => void) | null | undefined = null;\n // a debounce of the onBtApply method\n private onBtApplyDebounce: () => void;\n\n // after the user hits 'apply' the model gets copied to here. this is then the model that we use for\n // all filtering. so if user changes UI but doesn't hit apply, then the UI will be out of sync with this model.\n // this is what we want, as the UI should only become the 'active' filter once it's applied. when apply is\n // inactive, this model will be in sync (following the debounce ms). if the UI is not a valid filter\n // (eg the value is missing so nothing to filter on, or for set filter all checkboxes are checked so filter\n // not active) then this appliedModel will be null/undefined.\n private appliedModel: M | null = null;\n\n @Autowired('rowModel') protected readonly rowModel: IRowModel;\n @Autowired('valueService') private valueService: ValueService;\n\n constructor(private readonly filterNameKey: keyof IFilterTitleLocaleText) {\n super();\n }\n\n public abstract doesFilterPass(params: IDoesFilterPassParams): boolean;\n\n protected abstract updateUiVisibility(): void;\n\n protected abstract createBodyTemplate(): string;\n protected abstract getCssIdentifier(): string;\n protected abstract resetUiToDefaults(silent?: boolean): AgPromise;\n\n protected abstract setModelIntoUi(model: M): AgPromise;\n protected abstract areModelsEqual(a: M, b: M): boolean;\n\n /** Used to get the filter type for filter models. */\n protected abstract getFilterType(): string;\n\n @PostConstruct\n protected postConstruct(): void {\n this.resetTemplate(); // do this first to create the DOM\n this.createManagedBean(new ManagedFocusFeature(\n this.getFocusableElement(),\n {\n handleKeyDown: this.handleKeyDown.bind(this)\n }\n ));\n }\n\n // override\n protected handleKeyDown(e: KeyboardEvent): void { }\n\n public abstract getModelFromUi(): M | null;\n\n public getFilterTitle(): string {\n return this.translate(this.filterNameKey);\n }\n\n public isFilterActive(): boolean {\n // filter is active if we have a valid applied model\n return !!this.appliedModel;\n }\n\n protected resetTemplate(paramsMap?: any) {\n const templateString = /* html */`\n
\n
\n ${this.createBodyTemplate()}\n
\n
`;\n\n this.setTemplate(templateString, paramsMap);\n }\n\n protected isReadOnly(): boolean {\n return !!this.providedFilterParams.readOnly;\n }\n\n public init(params: IProvidedFilterParams): void {\n this.setParams(params);\n\n this.resetUiToDefaults(true).then(() => {\n this.updateUiVisibility();\n this.setupOnBtApplyDebounce();\n });\n }\n\n protected setParams(params: IProvidedFilterParams): void {\n this.providedFilterParams = params;\n\n this.applyActive = ProvidedFilter.isUseApplyButton(params);\n\n this.createButtonPanel();\n }\n\n private createButtonPanel(): void {\n const { buttons } = this.providedFilterParams;\n\n if (!buttons || buttons.length < 1 || this.isReadOnly()) {\n return;\n }\n\n const eButtonsPanel = document.createElement('div');\n\n eButtonsPanel.classList.add('ag-filter-apply-panel');\n\n const addButton = (type: FilterButtonType): void => {\n let text;\n let clickListener: (e?: Event) => void;\n\n switch (type) {\n case 'apply':\n text = this.translate('applyFilter');\n clickListener = (e) => this.onBtApply(false, false, e);\n break;\n case 'clear':\n text = this.translate('clearFilter');\n clickListener = () => this.onBtClear();\n break;\n case 'reset':\n text = this.translate('resetFilter');\n clickListener = () => this.onBtReset();\n break;\n case 'cancel':\n text = this.translate('cancelFilter');\n clickListener = (e) => { this.onBtCancel(e!); };\n break;\n default:\n console.warn('AG Grid: Unknown button type specified');\n return;\n }\n\n const button = loadTemplate(\n /* html */\n `${text}\n `\n );\n\n eButtonsPanel.appendChild(button);\n this.addManagedListener(button, 'click', clickListener);\n };\n\n convertToSet(buttons).forEach(type => addButton(type));\n\n this.getGui().appendChild(eButtonsPanel);\n }\n\n // subclasses can override this to provide alternative debounce defaults\n protected getDefaultDebounceMs(): number {\n return 0;\n }\n\n private setupOnBtApplyDebounce(): void {\n const debounceMs = ProvidedFilter.getDebounceMs(this.providedFilterParams, this.getDefaultDebounceMs());\n this.onBtApplyDebounce = debounce(this.onBtApply.bind(this), debounceMs);\n }\n\n public getModel(): M | null {\n return this.appliedModel ? this.appliedModel : null;\n }\n\n public setModel(model: M | null): AgPromise {\n const promise = model != null ? this.setModelIntoUi(model) : this.resetUiToDefaults();\n\n return promise.then(() => {\n this.updateUiVisibility();\n\n // we set the model from the GUI, rather than the provided model,\n // so the model is consistent, e.g. handling of null/undefined will be the same,\n // or if model is case insensitive, then casing is removed.\n this.applyModel();\n });\n }\n\n private onBtCancel(e: Event): void {\n const currentModel = this.getModel();\n\n const afterAppliedFunc = () => {\n this.onUiChanged(false, 'prevent');\n\n if (this.providedFilterParams.closeOnApply) {\n this.close(e);\n }\n };\n\n if (currentModel != null) {\n this.setModelIntoUi(currentModel).then(afterAppliedFunc);\n } else {\n this.resetUiToDefaults().then(afterAppliedFunc);\n }\n }\n\n private onBtClear(): void {\n this.resetUiToDefaults().then(() => this.onUiChanged());\n }\n\n private onBtReset(): void {\n this.onBtClear();\n this.onBtApply();\n }\n\n /**\n * Applies changes made in the UI to the filter, and returns true if the model has changed.\n */\n public applyModel(): boolean {\n const newModel = this.getModelFromUi();\n\n if (!this.isModelValid(newModel!)) { return false; }\n\n const previousModel = this.appliedModel;\n\n this.appliedModel = newModel;\n\n // models can be same if user pasted same content into text field, or maybe just changed the case\n // and it's a case insensitive filter\n return !this.areModelsEqual(previousModel!, newModel!);\n }\n\n protected isModelValid(model: M): boolean {\n return true;\n }\n\n protected onBtApply(afterFloatingFilter = false, afterDataChange = false, e?: Event): void {\n if (this.applyModel()) {\n // the floating filter uses 'afterFloatingFilter' info, so it doesn't refresh after filter changed if change\n // came from floating filter\n this.providedFilterParams.filterChangedCallback({ afterFloatingFilter, afterDataChange });\n }\n\n const { closeOnApply } = this.providedFilterParams;\n\n // only close if an apply button is visible, otherwise we'd be closing every time a change was made!\n if (closeOnApply && this.applyActive && !afterFloatingFilter && !afterDataChange) {\n this.close(e);\n }\n }\n\n public onNewRowsLoaded(): void {\n }\n\n public close(e?: Event): void {\n if (!this.hidePopup) { return; }\n\n const keyboardEvent = e as KeyboardEvent;\n const key = keyboardEvent && keyboardEvent.key;\n let params: PopupEventParams;\n\n if (key === 'Enter' || key === 'Space') {\n params = { keyboardEvent };\n }\n\n this.hidePopup(params!);\n this.hidePopup = null;\n }\n\n /**\n * By default, if the change came from a floating filter it will be applied immediately, otherwise if there is no\n * apply button it will be applied after a debounce, otherwise it will not be applied at all. This behaviour can\n * be adjusted by using the apply parameter.\n */\n protected onUiChanged(fromFloatingFilter = false, apply?: 'immediately' | 'debounce' | 'prevent'): void {\n this.updateUiVisibility();\n this.providedFilterParams.filterModifiedCallback();\n\n if (this.applyActive && !this.isReadOnly) {\n const isValid = this.isModelValid(this.getModelFromUi()!);\n\n setDisabled(this.getRefElement('applyFilterButton'), !isValid);\n }\n\n if ((fromFloatingFilter && !apply) || apply === 'immediately') {\n this.onBtApply(fromFloatingFilter);\n } else if ((!this.applyActive && !apply) || apply === 'debounce') {\n this.onBtApplyDebounce();\n }\n }\n\n public afterGuiAttached(params?: IAfterGuiAttachedParams): void {\n if (params == null) { return; }\n\n this.hidePopup = params.hidePopup;\n }\n\n // static, as used by floating filter also\n public static getDebounceMs(params: IProvidedFilterParams, debounceDefault: number): number {\n if (ProvidedFilter.isUseApplyButton(params)) {\n if (params.debounceMs != null) {\n console.warn('AG Grid: debounceMs is ignored when apply button is present');\n }\n\n return 0;\n }\n\n return params.debounceMs != null ? params.debounceMs : debounceDefault;\n }\n\n // static, as used by floating filter also\n public static isUseApplyButton(params: IProvidedFilterParams): boolean {\n return !!params.buttons && params.buttons.indexOf('apply') >= 0;\n }\n\n public destroy(): void {\n this.hidePopup = null;\n\n super.destroy();\n }\n\n protected translate(key: keyof IFilterLocaleText | keyof IFilterTitleLocaleText): string {\n const translate = this.gridOptionsWrapper.getLocaleTextFunc();\n\n return translate(key, DEFAULT_FILTER_LOCALE_TEXT[key]);\n }\n\n protected getCellValue(rowNode: RowNode): V {\n const { api, colDef, column, columnApi, context } = this.providedFilterParams;\n return this.providedFilterParams.valueGetter({\n api,\n colDef,\n column,\n columnApi,\n context,\n data: rowNode.data,\n getValue: (field) => rowNode.data[field],\n node: rowNode,\n });\n }\n}\n","import { Component } from \"./component\";\nimport { PostConstruct } from \"../context/context\";\nimport { clearElement, setElementWidth } from \"../utils/dom\";\nimport { setAriaRole } from \"../utils/aria\";\n\nexport type LabelAlignment = 'left' | 'right' | 'top';\n\nexport interface IAgLabel {\n label?: HTMLElement | string;\n labelWidth?: number | 'flex';\n labelSeparator?: string;\n labelAlignment?: LabelAlignment;\n}\n\nexport abstract class AgAbstractLabel extends Component {\n protected abstract eLabel: HTMLElement;\n\n protected readonly config: TConfig;\n protected labelSeparator: string = '';\n protected labelAlignment: LabelAlignment = 'left';\n private label: HTMLElement | string = '';\n\n constructor(config?: TConfig, template?: string) {\n super(template);\n\n this.config = config || {} as any;\n }\n\n @PostConstruct\n protected postConstruct() {\n this.addCssClass('ag-labeled');\n this.eLabel.classList.add('ag-label');\n\n const { labelSeparator, label, labelWidth, labelAlignment } = this.config;\n\n if (labelSeparator != null) {\n this.setLabelSeparator(labelSeparator);\n }\n\n if (label != null) {\n this.setLabel(label);\n }\n\n if (labelWidth != null) {\n this.setLabelWidth(labelWidth);\n }\n\n this.setLabelAlignment(labelAlignment || this.labelAlignment);\n this.refreshLabel();\n }\n\n protected refreshLabel() {\n clearElement(this.eLabel);\n\n if (typeof this.label === 'string') {\n this.eLabel.innerText = this.label + this.labelSeparator;\n } else if (this.label) {\n this.eLabel.appendChild(this.label);\n }\n\n if (this.label === '') {\n this.eLabel.classList.add('ag-hidden');\n setAriaRole(this.eLabel, 'presentation');\n } else {\n this.eLabel.classList.remove('ag-hidden');\n setAriaRole(this.eLabel, null);\n }\n }\n\n public setLabelSeparator(labelSeparator: string): this {\n if (this.labelSeparator === labelSeparator) {\n return this;\n }\n\n this.labelSeparator = labelSeparator;\n\n if (this.label != null) {\n this.refreshLabel();\n }\n\n return this;\n }\n\n public getLabelId(): string {\n this.eLabel.id = this.eLabel.id || `ag-${this.getCompId()}-label`;\n\n return this.eLabel.id;\n }\n\n public getLabel(): HTMLElement | string {\n return this.label;\n }\n\n public setLabel(label: HTMLElement | string): this {\n if (this.label === label) {\n return this;\n }\n\n this.label = label;\n\n this.refreshLabel();\n\n return this;\n }\n\n public setLabelAlignment(alignment: LabelAlignment): this {\n const eGui = this.getGui();\n const eGuiClassList = eGui.classList;\n\n eGuiClassList.toggle('ag-label-align-left', alignment === 'left');\n eGuiClassList.toggle('ag-label-align-right', alignment === 'right');\n eGuiClassList.toggle('ag-label-align-top', alignment === 'top');\n\n return this;\n }\n\n public setLabelWidth(width: number | 'flex'): this {\n if (this.label == null) {\n return this;\n }\n\n setElementWidth(this.eLabel, width);\n\n return this;\n }\n}","import { AgAbstractLabel, IAgLabel } from './agAbstractLabel';\nimport { setDisabled, setFixedWidth } from '../utils/dom';\n\nexport type FieldElement = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;\nexport abstract class AgAbstractField extends AgAbstractLabel {\n public static EVENT_CHANGED = 'valueChange';\n\n protected previousValue: TValue | null | undefined;\n protected value: TValue | null | undefined;\n protected disabled: boolean = false;\n\n constructor(config?: TConfig, template?: string, protected readonly className?: string) {\n super(config, template);\n }\n\n protected postConstruct(): void {\n super.postConstruct();\n\n if (this.className) {\n this.addCssClass(this.className);\n }\n }\n\n public onValueChange(callbackFn: (newValue?: TValue | null) => void) {\n this.addManagedListener(this, AgAbstractField.EVENT_CHANGED, () => callbackFn(this.getValue()));\n\n return this;\n }\n\n public getWidth(): number {\n return this.getGui().clientWidth;\n }\n\n public setWidth(width: number): this {\n setFixedWidth(this.getGui(), width);\n\n return this;\n }\n\n public getPreviousValue(): TValue | null | undefined {\n return this.previousValue;\n }\n\n public getValue(): TValue | null | undefined {\n return this.value;\n }\n\n public setValue(value?: TValue | null, silent?: boolean): this {\n if (this.value === value) {\n return this;\n }\n\n this.previousValue = this.value;\n this.value = value;\n\n if (!silent) {\n this.dispatchEvent({ type: AgAbstractField.EVENT_CHANGED });\n }\n\n return this;\n }\n\n public setDisabled(disabled: boolean): this {\n disabled = !!disabled;\n\n const element = this.getGui();\n\n setDisabled(element, disabled);\n element.classList.toggle('ag-disabled', disabled);\n\n this.disabled = disabled;\n\n return this;\n }\n\n public isDisabled(): boolean {\n return !!this.disabled;\n }\n}\n","import { AgAbstractField } from \"./agAbstractField\";\nimport { Component } from \"./component\";\nimport { RefSelector } from \"./componentAnnotations\";\nimport { setAriaLabelledBy, setAriaLabel, setAriaDescribedBy } from \"../utils/aria\";\nimport { createIconNoSpan } from \"../utils/icon\";\nimport { exists } from \"../utils/generic\";\nimport { setElementWidth, isVisible } from \"../utils/dom\";\nimport { KeyCode } from '../constants/keyCode';\nimport { IAgLabel } from './agAbstractLabel';\n\nexport abstract class AgPickerField extends AgAbstractField {\n public abstract showPicker(): Component;\n protected value: TValue;\n protected isPickerDisplayed: boolean = false;\n protected isDestroyingPicker: boolean = false;\n private skipClick: boolean = false;\n private pickerComponent: Component;\n\n @RefSelector('eLabel') protected readonly eLabel: HTMLElement;\n @RefSelector('eWrapper') protected readonly eWrapper: HTMLElement;\n @RefSelector('eDisplayField') protected readonly eDisplayField: TElement;\n @RefSelector('eIcon') private readonly eIcon: HTMLButtonElement;\n\n constructor(config?: IAgLabel, className?: string, private readonly pickerIcon?: string, ariaRole?: string) {\n super(config,\n /* html */ `
\n
\n
\n
\n
\n
\n
`, className);\n }\n\n protected postConstruct() {\n super.postConstruct();\n\n const displayId = `${this.getCompId()}-display`;\n\n this.eDisplayField.setAttribute('id', displayId);\n setAriaDescribedBy(this.eWrapper, displayId);\n\n const clickHandler = () => {\n if (this.skipClick) {\n this.skipClick = false;\n return;\n }\n\n if (this.isDisabled()) { return; }\n\n this.pickerComponent = this.showPicker();\n };\n\n const eGui = this.getGui();\n\n this.addManagedListener(eGui, 'mousedown', (e: MouseEvent) => {\n if (\n !this.skipClick &&\n this.pickerComponent &&\n this.pickerComponent.isAlive() &&\n isVisible(this.pickerComponent.getGui()) &&\n eGui.contains(e.target as HTMLElement)\n ) {\n this.skipClick = true;\n }\n });\n\n this.addManagedListener(eGui, 'keydown', (e: KeyboardEvent) => {\n switch (e.key) {\n case KeyCode.UP:\n case KeyCode.DOWN:\n case KeyCode.ENTER:\n case KeyCode.SPACE:\n clickHandler();\n case KeyCode.ESCAPE:\n if (this.isPickerDisplayed) {\n e.preventDefault();\n }\n break;\n }\n });\n\n this.addManagedListener(this.eWrapper, 'click', clickHandler);\n this.addManagedListener(this.eLabel, 'click', clickHandler);\n\n if (this.pickerIcon) {\n const icon = createIconNoSpan(this.pickerIcon, this.gridOptionsWrapper);\n if (icon) {\n this.eIcon.appendChild(icon);\n }\n }\n }\n\n protected refreshLabel() {\n if (exists(this.getLabel())) {\n setAriaLabelledBy(this.eWrapper, this.getLabelId());\n } else {\n this.eWrapper.removeAttribute('aria-labelledby');\n }\n\n super.refreshLabel();\n }\n\n public setAriaLabel(label: string): this {\n setAriaLabel(this.eWrapper, label);\n\n return this;\n }\n\n public setInputWidth(width: number | 'flex'): this {\n setElementWidth(this.eWrapper, width);\n return this;\n }\n\n public getFocusableElement(): HTMLElement {\n return this.eWrapper;\n }\n}\n","import { AgAbstractField } from \"./agAbstractField\";\nimport { Component } from \"./component\";\nimport { PostConstruct } from \"../context/context\";\nimport { escapeString } from \"../utils/string\";\nimport { KeyCode } from '../constants/keyCode';\nimport { setAriaPosInSet, setAriaRole, setAriaSelected, setAriaSetSize } from '../utils/aria';\n\nexport interface ListOption {\n value: string;\n text?: string;\n}\n\nexport class AgList extends Component {\n public static EVENT_ITEM_SELECTED = 'selectedItem';\n private static ACTIVE_CLASS = 'ag-active-item';\n\n private options: ListOption[] = [];\n private itemEls: HTMLElement[] = [];\n private highlightedEl: HTMLElement | null;\n private value: string | null;\n private displayValue: string | null;\n\n constructor(private readonly cssIdentifier = 'default') {\n super(/* html */`
`);\n }\n\n @PostConstruct\n private init(): void {\n this.addManagedListener(this.getGui(), 'keydown', this.handleKeyDown.bind(this));\n }\n\n private handleKeyDown(e: KeyboardEvent): void {\n const key = e.key;\n switch (key) {\n case KeyCode.ENTER:\n if (!this.highlightedEl) {\n this.setValue(this.getValue());\n } else {\n const pos = this.itemEls.indexOf(this.highlightedEl);\n this.setValueByIndex(pos);\n }\n break;\n case KeyCode.DOWN:\n case KeyCode.UP:\n const isDown = key === KeyCode.DOWN;\n let itemToHighlight: HTMLElement;\n\n e.preventDefault();\n\n if (!this.highlightedEl) {\n itemToHighlight = this.itemEls[isDown ? 0 : this.itemEls.length - 1];\n } else {\n const currentIdx = this.itemEls.indexOf(this.highlightedEl);\n let nextPos = currentIdx + (isDown ? 1 : -1);\n nextPos = Math.min(Math.max(nextPos, 0), this.itemEls.length - 1);\n itemToHighlight = this.itemEls[nextPos];\n }\n this.highlightItem(itemToHighlight);\n break;\n }\n }\n\n public addOptions(listOptions: ListOption[]): this {\n listOptions.forEach(listOption => this.addOption(listOption));\n return this;\n }\n\n public addOption(listOption: ListOption): this {\n const { value, text } = listOption;\n const sanitisedText = escapeString(text || value);\n\n this.options.push({ value, text: sanitisedText! });\n this.renderOption(value, sanitisedText!);\n\n this.updateIndices();\n\n return this;\n }\n\n private updateIndices(): void {\n const options = this.getGui().querySelectorAll('.ag-list-item');\n options.forEach((option: HTMLElement, idx) => {\n setAriaPosInSet(option, idx + 1);\n setAriaSetSize(option, options.length);\n });\n }\n\n private renderOption(value: string, text: string): void {\n const itemEl = document.createElement('div');\n\n setAriaRole(itemEl, 'option');\n itemEl.classList.add('ag-list-item', `ag-${this.cssIdentifier}-list-item`);\n itemEl.innerHTML = `${text}`;\n itemEl.tabIndex = -1;\n\n this.itemEls.push(itemEl);\n\n this.addManagedListener(itemEl, 'mouseover', () => this.highlightItem(itemEl));\n this.addManagedListener(itemEl, 'mouseleave', () => this.clearHighlighted());\n this.addManagedListener(itemEl, 'click', () => this.setValue(value));\n\n this.getGui().appendChild(itemEl);\n }\n\n public setValue(value?: string | null, silent?: boolean): this {\n if (this.value === value) {\n this.fireItemSelected();\n return this;\n }\n\n if (value == null) {\n this.reset();\n return this;\n }\n\n const idx = this.options.findIndex(option => option.value === value);\n\n if (idx !== -1) {\n const option = this.options[idx];\n\n this.value = option.value;\n this.displayValue = option.text != null ? option.text : option.value;\n this.highlightItem(this.itemEls[idx]);\n\n if (!silent) {\n this.fireChangeEvent();\n }\n }\n\n return this;\n }\n\n public setValueByIndex(idx: number): this {\n return this.setValue(this.options[idx].value);\n }\n\n public getValue(): string | null {\n return this.value;\n }\n\n public getDisplayValue(): string | null {\n return this.displayValue;\n }\n\n public refreshHighlighted(): void {\n this.clearHighlighted();\n const idx = this.options.findIndex(option => option.value === this.value);\n\n if (idx !== -1) {\n this.highlightItem(this.itemEls[idx]);\n }\n }\n\n private reset(): void {\n this.value = null;\n this.displayValue = null;\n this.clearHighlighted();\n this.fireChangeEvent();\n }\n\n private highlightItem(el: HTMLElement): void {\n if (!el.offsetParent) { return; }\n\n this.clearHighlighted();\n this.highlightedEl = el;\n\n this.highlightedEl.classList.add(AgList.ACTIVE_CLASS);\n setAriaSelected(this.highlightedEl, true);\n\n this.highlightedEl.focus();\n }\n\n private clearHighlighted(): void {\n if (!this.highlightedEl || !this.highlightedEl.offsetParent) { return; }\n\n this.highlightedEl.classList.remove(AgList.ACTIVE_CLASS);\n setAriaSelected(this.highlightedEl, false);\n\n this.highlightedEl = null;\n }\n\n private fireChangeEvent(): void {\n this.dispatchEvent({ type: AgAbstractField.EVENT_CHANGED });\n this.fireItemSelected();\n }\n\n private fireItemSelected(): void {\n this.dispatchEvent({ type: AgList.EVENT_ITEM_SELECTED });\n }\n}\n","import { AgAbstractField } from \"./agAbstractField\";\nimport { AgPickerField } from \"./agPickerField\";\nimport { ListOption, AgList } from \"./agList\";\nimport { Autowired, PostConstruct } from \"../context/context\";\nimport { PopupService } from \"./popupService\";\nimport { setElementWidth, getAbsoluteWidth, getInnerHeight } from \"../utils/dom\";\nimport { IAgLabel } from './agAbstractLabel';\nimport { setAriaExpanded } from \"../utils/aria\";\n\nexport class AgSelect extends AgPickerField {\n protected listComponent: AgList;\n private hideList: ((event?: any) => void) | null;\n\n @Autowired('popupService') private popupService: PopupService;\n\n constructor(config?: IAgLabel) {\n super(config, 'ag-select', 'smallDown', 'listbox');\n }\n\n @PostConstruct\n public init(): void {\n this.listComponent = this.createBean(new AgList('select'));\n this.listComponent.setParentComponent(this);\n this.eWrapper.tabIndex = 0;\n\n this.listComponent.addManagedListener(\n this.listComponent,\n AgList.EVENT_ITEM_SELECTED,\n () => { if (this.hideList) { this.hideList(); } }\n );\n\n this.listComponent.addManagedListener(\n this.listComponent,\n AgAbstractField.EVENT_CHANGED,\n () => {\n this.setValue(this.listComponent.getValue(), false, true);\n\n if (this.hideList) { this.hideList(); }\n }\n );\n }\n\n public showPicker() {\n const listGui = this.listComponent.getGui();\n const eDocument = this.gridOptionsWrapper.getDocument();\n\n const destroyMouseWheelFunc = this.addManagedListener(eDocument.body, 'wheel', (e: MouseEvent) => {\n if (!listGui.contains(e.target as HTMLElement) && this.hideList) {\n this.hideList();\n }\n });\n\n const destroyFocusOutFunc = this.addManagedListener(listGui, 'focusout', (e: FocusEvent) => {\n if (!listGui.contains(e.relatedTarget as HTMLElement) && this.hideList) {\n this.hideList();\n }\n });\n\n const translate = this.gridOptionsWrapper.getLocaleTextFunc();\n\n const addPopupRes = this.popupService.addPopup({\n modal: true,\n eChild: listGui,\n closeOnEsc: true,\n closedCallback: () => {\n this.hideList = null;\n this.isPickerDisplayed = false;\n destroyFocusOutFunc!();\n destroyMouseWheelFunc!();\n\n if (this.isAlive()) {\n setAriaExpanded(this.eWrapper, false);\n this.getFocusableElement().focus();\n }\n },\n ariaLabel: translate('ariaLabelSelectField', 'Select Field')\n });\n\n if (addPopupRes) {\n this.hideList = addPopupRes.hideFunc;\n }\n this.isPickerDisplayed = true;\n\n setElementWidth(listGui, getAbsoluteWidth(this.eWrapper));\n setAriaExpanded(this.eWrapper, true);\n\n listGui.style.maxHeight = getInnerHeight(this.popupService.getPopupParent()) + 'px';\n listGui.style.position = 'absolute';\n\n this.popupService.positionPopupUnderComponent({\n type: 'ag-list',\n eventSource: this.eWrapper,\n ePopup: listGui,\n keepWithinBounds: true\n });\n\n this.listComponent.refreshHighlighted();\n\n return this.listComponent;\n }\n\n public addOptions(options: ListOption[]): this {\n options.forEach(option => this.addOption(option));\n\n return this;\n }\n\n public addOption(option: ListOption): this {\n this.listComponent.addOption(option);\n\n return this;\n }\n\n public setValue(value?: string | null, silent?: boolean, fromPicker?: boolean): this {\n if (this.value === value) { return this; }\n\n if (!fromPicker) {\n this.listComponent.setValue(value, true);\n }\n\n const newValue = this.listComponent.getValue();\n\n if (newValue === this.getValue()) { return this; }\n\n this.eDisplayField.innerHTML = this.listComponent.getDisplayValue()!;\n\n return super.setValue(value, silent);\n }\n\n protected destroy(): void {\n if (this.hideList) {\n this.hideList();\n }\n\n this.destroyBean(this.listComponent);\n super.destroy();\n }\n}\n","import { IAgLabel } from './agAbstractLabel';\nimport { RefSelector } from './componentAnnotations';\nimport { AgAbstractField, FieldElement } from './agAbstractField';\nimport { setDisabled, setElementWidth, addOrRemoveAttribute } from '../utils/dom';\nimport { setAriaLabelledBy, setAriaLabel } from '../utils/aria';\nimport { exists } from '../utils/generic';\n\nexport interface IInputField extends IAgLabel {\n value?: any;\n width?: number;\n}\n\nexport abstract class AgAbstractInputField\n extends AgAbstractField {\n @RefSelector('eLabel') protected readonly eLabel: HTMLElement;\n @RefSelector('eWrapper') protected readonly eWrapper: HTMLElement;\n @RefSelector('eInput') protected readonly eInput: TElement;\n\n constructor(config?: TConfig, className?: string, private readonly inputType: string | null = 'text', private readonly displayFieldTag = 'input') {\n super(config, /* html */`\n
\n
\n
\n <${displayFieldTag} ref=\"eInput\" class=\"ag-input-field-input\">\n
\n
`, className);\n }\n\n protected postConstruct() {\n super.postConstruct();\n this.setInputType();\n\n this.eLabel.classList.add(`${this.className}-label`);\n this.eWrapper.classList.add(`${this.className}-input-wrapper`);\n this.eInput.classList.add(`${this.className}-input`);\n this.addCssClass('ag-input-field');\n\n this.eInput.id = this.eInput.id || `ag-${this.getCompId()}-input`;\n\n const { width, value } = this.config;\n\n if (width != null) {\n this.setWidth(width);\n }\n\n if (value != null) {\n this.setValue(value);\n }\n\n this.addInputListeners();\n }\n\n protected refreshLabel() {\n if (exists(this.getLabel())) {\n setAriaLabelledBy(this.eInput, this.getLabelId());\n } else {\n this.eInput.removeAttribute('aria-labelledby');\n }\n\n super.refreshLabel();\n }\n\n protected addInputListeners() {\n this.addManagedListener(this.eInput, 'input', e => this.setValue(e.target.value));\n }\n\n private setInputType() {\n if (this.displayFieldTag === 'input') {\n this.eInput.setAttribute('type', this.inputType!);\n }\n }\n\n public getInputElement(): TElement {\n return this.eInput;\n }\n\n public setInputWidth(width: number | 'flex'): this {\n setElementWidth(this.eWrapper, width);\n\n return this;\n }\n\n public setInputName(name: string): this {\n this.getInputElement().setAttribute('name', name);\n\n return this;\n }\n\n public getFocusableElement(): HTMLElement {\n return this.eInput;\n }\n\n public setMaxLength(length: number): this {\n const eInput = this.eInput as HTMLInputElement | HTMLTextAreaElement;\n eInput.maxLength = length;\n\n return this;\n }\n\n public setInputPlaceholder(placeholder: string): this {\n addOrRemoveAttribute(this.eInput, 'placeholder', placeholder);\n\n return this;\n }\n\n public setInputAriaLabel(label: string): this {\n setAriaLabel(this.eInput, label);\n\n return this;\n }\n\n public setDisabled(disabled: boolean): this {\n setDisabled(this.eInput, disabled);\n\n return super.setDisabled(disabled);\n }\n}\n","import { EventService } from \"../eventService\";\nimport { AgEvent, Events, RowEvent, RowSelectedEvent, SelectionChangedEvent } from \"../events\";\nimport { Column } from \"./column\";\nimport { Constants } from \"../constants/constants\";\nimport { IEventEmitter } from \"../interfaces/iEventEmitter\";\nimport { DetailGridInfo } from \"../gridApi\";\nimport { exists, missing, missingOrEmpty } from \"../utils/generic\";\nimport { getAllKeysInObjects } from \"../utils/object\";\nimport { IServerSideStore } from \"../interfaces/IServerSideStore\";\nimport { IClientSideRowModel } from \"../interfaces/iClientSideRowModel\";\nimport { IServerSideRowModel } from \"../interfaces/iServerSideRowModel\";\nimport { debounce } from \"../utils/function\";\nimport { Beans } from \"../rendering/beans\";\n\nexport interface SetSelectedParams {\n // true or false, whatever you want to set selection to\n newValue: boolean;\n // whether to remove other selections after this selection is done\n clearSelection?: boolean;\n // true when action is NOT on this node, ie user clicked a group and this is the child of a group\n suppressFinishActions?: boolean;\n // gets used when user shift-selects a range\n rangeSelect?: boolean;\n // used in group selection, if true, filtered out children will not be selected\n groupSelectsFiltered?: boolean;\n}\n\nexport interface RowNodeEvent extends AgEvent {\n node: RowNode;\n}\n\nexport interface DataChangedEvent extends RowNodeEvent {\n oldData: any;\n newData: any;\n update: boolean;\n}\n\nexport interface CellChangedEvent extends RowNodeEvent {\n column: Column;\n newValue: any;\n oldValue: any;\n}\n\nexport enum RowHighlightPosition { Above, Below }\n\nexport class RowNode implements IEventEmitter {\n\n public static ID_PREFIX_ROW_GROUP = 'row-group-';\n public static ID_PREFIX_TOP_PINNED = 't-';\n public static ID_PREFIX_BOTTOM_PINNED = 'b-';\n\n private static OBJECT_ID_SEQUENCE = 0;\n\n public static EVENT_ROW_SELECTED = 'rowSelected';\n public static EVENT_DATA_CHANGED = 'dataChanged';\n public static EVENT_CELL_CHANGED = 'cellChanged';\n public static EVENT_ALL_CHILDREN_COUNT_CHANGED = 'allChildrenCountChanged';\n public static EVENT_MASTER_CHANGED = 'masterChanged';\n public static EVENT_GROUP_CHANGED = 'groupChanged';\n public static EVENT_MOUSE_ENTER = 'mouseEnter';\n public static EVENT_MOUSE_LEAVE = 'mouseLeave';\n public static EVENT_HEIGHT_CHANGED = 'heightChanged';\n public static EVENT_TOP_CHANGED = 'topChanged';\n public static EVENT_DISPLAYED_CHANGED = 'displayedChanged';\n public static EVENT_FIRST_CHILD_CHANGED = 'firstChildChanged';\n public static EVENT_LAST_CHILD_CHANGED = 'lastChildChanged';\n public static EVENT_CHILD_INDEX_CHANGED = 'childIndexChanged';\n public static EVENT_ROW_INDEX_CHANGED = 'rowIndexChanged';\n public static EVENT_EXPANDED_CHANGED = 'expandedChanged';\n public static EVENT_HAS_CHILDREN_CHANGED = 'hasChildrenChanged';\n public static EVENT_SELECTABLE_CHANGED = 'selectableChanged';\n public static EVENT_UI_LEVEL_CHANGED = 'uiLevelChanged';\n public static EVENT_HIGHLIGHT_CHANGED = 'rowHighlightChanged';\n public static EVENT_DRAGGING_CHANGED = 'draggingChanged';\n\n /** Unique ID for the node. Either provided by the application, or generated by the grid if not. */\n public id: string | undefined;\n\n /** If using row grouping, contains the group values for this group. */\n public groupData: { [key: string]: any | null; } | null;\n\n /** If using row grouping and aggregation, contains the aggregation data. */\n public aggData: any;\n\n /** The data as provided by the application. */\n public data: any;\n\n /** The parent node to this node, or empty if top level */\n public parent: RowNode | null;\n\n /** How many levels this node is from the top when grouping. */\n public level: number;\n\n /** How many levels this node is from the top when grouping in the UI (only different to `parent` when `groupRemoveSingleChildren=true`)*/\n public uiLevel: number;\n\n /**\n * If doing in-memory (client-side) grouping, this is the index of the group column this cell is for.\n * This will always be the same as the level, unless we are collapsing groups, i.e. `groupRemoveSingleChildren=true`.\n */\n public rowGroupIndex: number | null;\n\n /** `true` if this node is a group node (ie has children) */\n public group: boolean | undefined;\n\n /** `true` if this row is getting dragged */\n public dragging: boolean;\n\n /** `true` if this row is a master row, part of master / detail (ie row can be expanded to show detail) */\n public master: boolean;\n\n /** `true` if this row is a detail row, part of master / detail (ie child row of an expanded master row)*/\n public detail: boolean;\n\n /** If this row is a master row that was expanded, this points to the associated detail row. */\n public detailNode: RowNode;\n\n /** If master detail, this contains details about the detail grid */\n public detailGridInfo: DetailGridInfo | null;\n\n /** `true` if this node is a group and the group is the bottom level in the tree. */\n public leafGroup: boolean;\n\n /** `true` if this is the first child in this group. Changes when data is sorted. */\n public firstChild: boolean;\n\n /** `true` if this is the last child in this group. Changes when data is sorted. */\n public lastChild: boolean;\n\n /** Index of this row with respect to its parent when grouping. Changes when data is sorted. */\n public childIndex: number;\n\n /** The current row index. If the row is filtered out or in a collapsed group, this value will be `null`. */\n public rowIndex: number | null = null;\n\n /** Either 'top' or 'bottom' if row pinned, otherwise `undefined` or `null`. */\n public rowPinned: string;\n\n /** If using quick filter, stores a string representation of the row for searching against. */\n public quickFilterAggregateText: string | null;\n\n /** `true` if row is a footer. Footers have `group = true` and `footer = true`. */\n public footer: boolean;\n\n /** The field we are grouping on eg 'country'. */\n public field: string | null;\n\n /** The row group column used for this group, e.g. the Country column instance. */\n public rowGroupColumn: Column | null;\n\n /** The key for the group eg Ireland, UK, USA */\n public key: string | null = null;\n\n /** Used by server-side row model. `true` if this row node is a stub. A stub is a placeholder row with loading icon while waiting from row to be loaded. */\n public stub: boolean;\n\n /** Used by server side row model, true if this row node failed a load */\n public failedLoad: boolean;\n\n /** All lowest level nodes beneath this node, no groups. */\n public allLeafChildren: RowNode[];\n\n /** Children of this group. If multi levels of grouping, shows only immediate children. */\n public childrenAfterGroup: RowNode[] | null;\n\n /** Filtered children of this group. */\n public childrenAfterFilter: RowNode[] | null;\n\n /** Aggregated and re-filtered children of this group. */\n public childrenAfterAggFilter: RowNode[] | null;\n\n /** Sorted children of this group. */\n public childrenAfterSort: RowNode[] | null;\n\n /** Number of children and grand children. */\n public allChildrenCount: number | null;\n\n /** Children mapped by the pivot columns. */\n public childrenMapped: { [key: string]: any; } | null = {};\n\n /** Server Side Row Model Only - the children are in an infinite cache. */\n public childStore: IServerSideStore | null;\n\n /** `true` if group is expanded, otherwise `false`. */\n public expanded: boolean;\n\n /** If using footers, reference to the footer node for this group. */\n public sibling: RowNode;\n\n /** The height, in pixels, of this row */\n public rowHeight: number | null | undefined;\n\n /** Dynamic row heights are done on demand, only when row is visible. However for row virtualisation\n * we need a row height to do the 'what rows are in viewport' maths. So we assign a row height to each\n * row based on defaults and rowHeightEstimated=true, then when the row is needed for drawing we do\n * the row height calculation and set rowHeightEstimated=false.*/\n public rowHeightEstimated: boolean;\n\n /**\n * This will be `true` if it has a rowIndex assigned, otherwise `false`.\n */\n public displayed: boolean = false;\n\n /** The row top position in pixels. */\n public rowTop: number | null = null;\n\n /** The top pixel for this row last time, makes sense if data set was ordered or filtered,\n * it is used so new rows can animate in from their old position. */\n public oldRowTop: number | null = null;\n\n /** `true` if this node is a daemon. This means row is not part of the model. Can happen when then\n * the row is selected and then the user sets a different ID onto the node. The nodes is then\n * representing a different entity, so the selection controller, if the node is selected, takes\n * a copy where daemon=true. */\n public daemon: boolean;\n\n /** `true` by default - can be overridden via gridOptions.isRowSelectable(rowNode) */\n public selectable = true;\n\n /** Used by the value service, stores values for a particular change detection turn. */\n public __cacheData: { [colId: string]: any; };\n public __cacheVersion: number;\n\n /** Used by sorting service - to give deterministic sort to groups. Previously we\n * just id for this, however id is a string and had slower sorting compared to numbers. */\n public __objectId: number = RowNode.OBJECT_ID_SEQUENCE++;\n\n /** We cache the result of hasChildren() so that we can be aware of when it has changed, and hence\n * fire the event. Really we should just have hasChildren as an attribute and do away with hasChildren()\n * method, however that would be a breaking change. */\n private __hasChildren: boolean;\n\n /** When one or more Columns are using autoHeight, this keeps track of height of each autoHeight Cell,\n * indexed by the Column ID. */\n private __autoHeights?: { [id: string]: number | undefined } = {};\n\n /** `true` when nodes with the same id are being removed and added as part of the same batch transaction */\n public alreadyRendered = false;\n\n public highlighted: RowHighlightPosition | null = null;\n\n private selected: boolean | undefined = false;\n private eventService: EventService | null;\n\n private beans: Beans;\n\n private checkAutoHeightsDebounced: () => void;\n\n private onRowHeightChangedDebounced = debounce(this.onRowHeightChanged.bind(this), 100);\n\n constructor(beans: Beans) {\n this.beans = beans;\n }\n\n /** Replaces the data on the `rowNode`. When complete, the grid will refresh the the entire rendered row if it is showing. */\n public setData(data: any): void {\n this.setDataCommon(data, false);\n }\n\n // similar to setRowData, however it is expected that the data is the same data item. this\n // is intended to be used with Redux type stores, where the whole data can be changed. we are\n // guaranteed that the data is the same entity (so grid doesn't need to worry about the id of the\n // underlying data changing, hence doesn't need to worry about selection). the grid, upon receiving\n // dataChanged event, will refresh the cells rather than rip them all out (so user can show transitions).\n public updateData(data: any): void {\n this.setDataCommon(data, true);\n }\n\n private setDataCommon(data: any, update: boolean): void {\n const oldData = this.data;\n\n this.data = data;\n this.beans.valueCache.onDataChanged();\n this.updateDataOnDetailNode();\n this.checkRowSelectable();\n\n const event: DataChangedEvent = this.createDataChangedEvent(data, oldData, update);\n\n this.dispatchLocalEvent(event);\n }\n\n // when we are doing master / detail, the detail node is lazy created, but then kept around.\n // so if we show / hide the detail, the same detail rowNode is used. so we need to keep the data\n // in sync, otherwise expand/collapse of the detail would still show the old values.\n private updateDataOnDetailNode(): void {\n if (this.detailNode) {\n this.detailNode.data = this.data;\n }\n }\n\n private createDataChangedEvent(newData: any, oldData: any, update: boolean): DataChangedEvent {\n return {\n type: RowNode.EVENT_DATA_CHANGED,\n node: this,\n oldData: oldData,\n newData: newData,\n update: update\n };\n }\n\n private createLocalRowEvent(type: string): RowNodeEvent {\n return {\n type: type,\n node: this\n };\n }\n\n public getRowIndexString(): string {\n if (this.rowPinned === Constants.PINNED_TOP) {\n return 't-' + this.rowIndex;\n }\n\n if (this.rowPinned === Constants.PINNED_BOTTOM) {\n return 'b-' + this.rowIndex;\n }\n\n return this.rowIndex!.toString();\n }\n\n private createDaemonNode(): RowNode {\n const oldNode = new RowNode(this.beans);\n\n // just copy the id and data, this is enough for the node to be used\n // in the selection controller (the selection controller is the only\n // place where daemon nodes can live).\n oldNode.id = this.id;\n oldNode.data = this.data;\n oldNode.daemon = true;\n oldNode.selected = this.selected;\n oldNode.level = this.level;\n\n return oldNode;\n }\n\n public setDataAndId(data: any, id: string | undefined): void {\n const oldNode = exists(this.id) ? this.createDaemonNode() : null;\n const oldData = this.data;\n\n this.data = data;\n this.updateDataOnDetailNode();\n this.setId(id);\n this.beans.selectionService.syncInRowNode(this, oldNode);\n this.checkRowSelectable();\n\n const event: DataChangedEvent = this.createDataChangedEvent(data, oldData, false);\n\n this.dispatchLocalEvent(event);\n }\n\n private checkRowSelectable() {\n const isRowSelectableFunc = this.beans.gridOptionsWrapper.getIsRowSelectableFunc();\n this.setRowSelectable(isRowSelectableFunc ? isRowSelectableFunc!(this) : true);\n }\n\n public setRowSelectable(newVal: boolean) {\n if (this.selectable !== newVal) {\n this.selectable = newVal;\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_SELECTABLE_CHANGED));\n }\n }\n }\n\n public setId(id?: string): void {\n // see if user is providing the id's\n const getRowIdFunc = this.beans.gridOptionsWrapper.getRowIdFunc();\n\n if (getRowIdFunc) {\n // if user is providing the id's, then we set the id only after the data has been set.\n // this is important for virtual pagination and viewport, where empty rows exist.\n if (this.data) {\n // we pass 'true' as we skip this level when generating keys,\n // as we don't always have the key for this level (eg when updating\n // data via transaction on SSRM, we are getting key to look up the\n // RowNode, don't have the RowNode yet, thus no way to get the current key)\n const parentKeys = this.getGroupKeys(true);\n this.id = getRowIdFunc({\n data: this.data,\n parentKeys: parentKeys.length > 0 ? parentKeys : undefined,\n level: this.level\n });\n // make sure id provided doesn't start with 'row-group-' as this is reserved. also check that\n // it has 'startsWith' in case the user provided a number.\n if (this.id !== null && typeof this.id === 'string' && this.id.startsWith(RowNode.ID_PREFIX_ROW_GROUP)) {\n console.error(`AG Grid: Row IDs cannot start with ${RowNode.ID_PREFIX_ROW_GROUP}, this is a reserved prefix for AG Grid's row grouping feature.`);\n }\n // force id to be a string\n if (this.id !== null && typeof this.id !== 'string') {\n this.id = '' + this.id;\n }\n } else {\n // this can happen if user has set blank into the rowNode after the row previously\n // having data. this happens in virtual page row model, when data is delete and\n // the page is refreshed.\n this.id = undefined;\n }\n } else {\n this.id = id;\n }\n }\n\n public getGroupKeys(excludeSelf = false): string[] {\n const keys: string[] = [];\n\n let pointer: RowNode | null = this;\n if (excludeSelf) {\n pointer = pointer.parent;\n }\n while (pointer && pointer.level >= 0) {\n keys.push(pointer.key!);\n pointer = pointer.parent;\n }\n keys.reverse();\n\n return keys;\n }\n\n public isPixelInRange(pixel: number): boolean {\n if (!exists(this.rowTop) || !exists(this.rowHeight)) { return false; }\n return pixel >= this.rowTop && pixel < (this.rowTop + this.rowHeight);\n }\n\n public setFirstChild(firstChild: boolean): void {\n if (this.firstChild === firstChild) { return; }\n\n this.firstChild = firstChild;\n\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_FIRST_CHILD_CHANGED));\n }\n }\n\n public setLastChild(lastChild: boolean): void {\n if (this.lastChild === lastChild) { return; }\n\n this.lastChild = lastChild;\n\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_LAST_CHILD_CHANGED));\n }\n }\n\n public setChildIndex(childIndex: number): void {\n if (this.childIndex === childIndex) { return; }\n\n this.childIndex = childIndex;\n\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_CHILD_INDEX_CHANGED));\n }\n }\n\n public setRowTop(rowTop: number | null): void {\n this.oldRowTop = this.rowTop;\n\n if (this.rowTop === rowTop) { return; }\n\n this.rowTop = rowTop;\n\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_TOP_CHANGED));\n }\n\n this.setDisplayed(rowTop !== null);\n }\n\n public clearRowTopAndRowIndex(): void {\n this.oldRowTop = null;\n this.setRowTop(null);\n this.setRowIndex(null);\n }\n\n private setDisplayed(displayed: boolean): void {\n if (this.displayed === displayed) { return; }\n\n this.displayed = displayed;\n\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_DISPLAYED_CHANGED));\n }\n }\n\n public setDragging(dragging: boolean): void {\n if (this.dragging === dragging) { return; }\n\n this.dragging = dragging;\n\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_DRAGGING_CHANGED));\n }\n }\n\n public setHighlighted(highlighted: RowHighlightPosition | null): void {\n if (highlighted === this.highlighted) { return; }\n\n this.highlighted = highlighted;\n\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_HIGHLIGHT_CHANGED));\n }\n }\n\n public setAllChildrenCount(allChildrenCount: number | null): void {\n if (this.allChildrenCount === allChildrenCount) { return; }\n\n this.allChildrenCount = allChildrenCount;\n\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_ALL_CHILDREN_COUNT_CHANGED));\n }\n }\n\n public setMaster(master: boolean): void {\n if (this.master === master) { return; }\n\n // if changing AWAY from master, then unexpand, otherwise\n // next time it's shown it is expanded again\n if (this.master && !master) {\n this.expanded = false;\n }\n\n this.master = master;\n\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_MASTER_CHANGED));\n }\n }\n\n public setGroup(group: boolean): void {\n if (this.group === group) { return; }\n\n // if we used to be a group, and no longer, then close the node\n if (this.group && !group) {\n this.expanded = false;\n }\n\n this.group = group;\n this.updateHasChildren();\n\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_GROUP_CHANGED));\n }\n }\n\n /**\n * Sets the row height.\n * Call if you want to change the height initially assigned to the row.\n * After calling, you must call `api.onRowHeightChanged()` so the grid knows it needs to work out the placement of the rows. */\n public setRowHeight(rowHeight: number | undefined | null, estimated = false): void {\n this.rowHeight = rowHeight;\n this.rowHeightEstimated = estimated;\n\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_HEIGHT_CHANGED));\n }\n }\n\n public setRowAutoHeight(cellHeight: number | undefined, column: Column): void {\n if (!this.__autoHeights) {\n this.__autoHeights = {};\n }\n const autoHeights = this.__autoHeights!;\n\n autoHeights[column.getId()] = cellHeight;\n\n if (cellHeight != null) {\n if (this.checkAutoHeightsDebounced == null) {\n this.checkAutoHeightsDebounced = debounce(this.checkAutoHeights.bind(this), 1);\n }\n this.checkAutoHeightsDebounced();\n }\n }\n\n public checkAutoHeights(): void {\n let notAllPresent = false;\n let nonePresent = true;\n let newRowHeight = 0;\n\n const autoHeights = this.__autoHeights!;\n if (autoHeights == null) { return; }\n\n const displayedAutoHeightCols = this.beans.columnModel.getAllDisplayedAutoHeightCols();\n displayedAutoHeightCols.forEach(col => {\n const cellHeight = autoHeights[col.getId()];\n if (cellHeight == null) {\n notAllPresent = true;\n return;\n }\n nonePresent = false;\n if (cellHeight > newRowHeight) {\n newRowHeight = cellHeight;\n }\n });\n\n if (notAllPresent) { return; }\n\n // we take min of 10, so we don't adjust for empty rows. if <10, we put to default.\n // this prevents the row starting very small when waiting for async components,\n // which would then mean the grid squashes in far to many rows (as small heights\n // means more rows fit in) which looks crap. so best ignore small values and assume\n // we are still waiting for values to render.\n if (nonePresent || newRowHeight < 10) {\n newRowHeight = this.beans.gridOptionsWrapper.getRowHeightForNode(this).height;\n }\n\n if (newRowHeight == this.rowHeight) { return; }\n\n this.setRowHeight(newRowHeight);\n\n this.onRowHeightChangedDebounced();\n }\n\n /** This method is debounced. It is used for row auto-height. If we don't debounce, \n * then the Row Models will end up recalculating each row position\n * for each row height change and result in the Row Renderer laying out rows.\n * This is particularly bad if using print layout, and showing eg 1,000 rows,\n * each row will change it's height, causing Row Model to update 1,000 times.\n */\n private onRowHeightChanged(): void {\n const rowModel = this.beans.rowModel as (IClientSideRowModel | IServerSideRowModel);\n if (rowModel.onRowHeightChanged) {\n rowModel.onRowHeightChanged();\n }\n }\n\n public setRowIndex(rowIndex: number | null): void {\n if (this.rowIndex === rowIndex) { return; }\n\n this.rowIndex = rowIndex;\n\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_ROW_INDEX_CHANGED));\n }\n }\n\n public setUiLevel(uiLevel: number): void {\n if (this.uiLevel === uiLevel) { return; }\n\n this.uiLevel = uiLevel;\n\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_UI_LEVEL_CHANGED));\n }\n }\n\n public setExpanded(expanded: boolean, e?: MouseEvent | KeyboardEvent): void {\n if (this.expanded === expanded) { return; }\n\n this.expanded = expanded;\n\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_EXPANDED_CHANGED));\n }\n\n const event = Object.assign({}, this.createGlobalRowEvent(Events.EVENT_ROW_GROUP_OPENED), {\n expanded,\n event: e || null\n });\n\n this.beans.rowNodeEventThrottle.dispatchExpanded(event);\n\n // when using footers we need to refresh the group row, as the aggregation\n // values jump between group and footer\n if (this.beans.gridOptionsWrapper.isGroupIncludeFooter()) {\n this.beans.rowRenderer.refreshCells({ rowNodes: [this] });\n }\n }\n\n private createGlobalRowEvent(type: string): RowEvent {\n return {\n type: type,\n node: this,\n data: this.data,\n rowIndex: this.rowIndex,\n rowPinned: this.rowPinned,\n context: this.beans.gridOptionsWrapper.getContext(),\n api: this.beans.gridOptionsWrapper.getApi()!,\n columnApi: this.beans.gridOptionsWrapper.getColumnApi()!\n };\n }\n\n private dispatchLocalEvent(event: AgEvent): void {\n if (this.eventService) {\n this.eventService.dispatchEvent(event);\n }\n }\n\n /**\n * Replaces the value on the `rowNode` for the specified column. When complete,\n * the grid will refresh the rendered cell on the required row only.\n *\n * @param colKey The column where the value should be updated\n * @param newValue The new value\n * @param eventSource The source of the event\n * @returns `True` if the value was changed, otherwise `False`.\n */\n public setDataValue(colKey: string | Column, newValue: any, eventSource?: string): boolean {\n // When it is done via the editors, no 'cell changed' event gets fired, as it's assumed that\n // the cell knows about the change given it's in charge of the editing.\n // this method is for the client to call, so the cell listens for the change\n // event, and also flashes the cell when the change occurs.\n const column = this.beans.columnModel.getPrimaryColumn(colKey)!;\n const oldValue = this.beans.valueService.getValue(column, this);\n\n const valueChanged = this.beans.valueService.setValue(this, column, newValue, eventSource);\n this.dispatchCellChangedEvent(column, newValue, oldValue);\n\n return valueChanged;\n }\n\n public setGroupValue(colKey: string | Column, newValue: any): void {\n const column = this.beans.columnModel.getGridColumn(colKey)!;\n\n if (missing(this.groupData)) { this.groupData = {}; }\n\n const columnId = column.getColId();\n const oldValue = this.groupData[columnId];\n\n if (oldValue === newValue) { return; }\n\n this.groupData[columnId] = newValue;\n this.dispatchCellChangedEvent(column, newValue, oldValue);\n }\n\n // sets the data for an aggregation\n public setAggData(newAggData: any): void {\n // find out all keys that could potentially change\n const colIds = getAllKeysInObjects([this.aggData, newAggData]);\n const oldAggData = this.aggData;\n\n this.aggData = newAggData;\n\n // if no event service, nobody has registered for events, so no need fire event\n if (this.eventService) {\n colIds.forEach(colId => {\n const column = this.beans.columnModel.getGridColumn(colId)!;\n const value = this.aggData ? this.aggData[colId] : undefined;\n const oldValue = oldAggData ? oldAggData[colId] : undefined;\n this.dispatchCellChangedEvent(column, value, oldValue);\n });\n }\n }\n\n public updateHasChildren(): void {\n // we need to return true when this.group=true, as this is used by server side row model\n // (as children are lazy loaded and stored in a cache anyway). otherwise we return true\n // if children exist.\n const newValue = (this.group && !this.footer) || (this.childrenAfterGroup && this.childrenAfterGroup.length > 0);\n\n if (newValue !== this.__hasChildren) {\n this.__hasChildren = !!newValue;\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_HAS_CHILDREN_CHANGED));\n }\n }\n }\n\n public hasChildren(): boolean {\n if (this.__hasChildren == null) {\n this.updateHasChildren();\n }\n return this.__hasChildren;\n }\n\n public isEmptyRowGroupNode(): boolean | undefined {\n return this.group && missingOrEmpty(this.childrenAfterGroup);\n }\n\n private dispatchCellChangedEvent(column: Column, newValue: any, oldValue: any): void {\n const cellChangedEvent: CellChangedEvent = {\n type: RowNode.EVENT_CELL_CHANGED,\n node: this,\n column: column,\n newValue: newValue,\n oldValue: oldValue\n };\n this.dispatchLocalEvent(cellChangedEvent);\n }\n\n /**\n * The first time `quickFilter` runs, the grid creates a one-off string representation of the row.\n * This string is then used for the quick filter instead of hitting each column separately.\n * When you edit, using grid editing, this string gets cleared down.\n * However if you edit without using grid editing, you will need to clear this string down for the row to be updated with the new values.\n * Otherwise new values will not work with the `quickFilter`. */\n public resetQuickFilterAggregateText(): void {\n this.quickFilterAggregateText = null;\n }\n\n public isExpandable(): boolean {\n return (this.hasChildren() && !this.footer) || this.master ? true : false;\n }\n\n /** Returns:\n * - `true` if node is selected,\n * - `false` if the node isn't selected\n * - `undefined` if it's partially selected (group where not all children are selected). */\n public isSelected(): boolean | undefined {\n // for footers, we just return what our sibling selected state is, as cannot select a footer\n if (this.footer) { return this.sibling.isSelected(); }\n\n return this.selected;\n }\n\n /** Perform a depth-first search of this node and its children. */\n public depthFirstSearch(callback: (rowNode: RowNode) => void): void {\n if (this.childrenAfterGroup) {\n this.childrenAfterGroup.forEach(child => child.depthFirstSearch(callback));\n }\n callback(this);\n }\n\n // + rowController.updateGroupsInSelection()\n // + selectionController.calculatedSelectedForAllGroupNodes()\n public calculateSelectedFromChildren(): void {\n let atLeastOneSelected = false;\n let atLeastOneDeSelected = false;\n let atLeastOneMixed = false;\n let newSelectedValue: boolean | undefined;\n\n if (!this.childrenAfterGroup?.length) {\n return;\n }\n\n for (let i = 0; i < this.childrenAfterGroup.length; i++) {\n const child = this.childrenAfterGroup[i];\n\n // skip non-selectable nodes to prevent inconsistent selection values\n if (!child.selectable) { continue; }\n\n const childState = child.isSelected();\n\n switch (childState) {\n case true:\n atLeastOneSelected = true;\n break;\n case false:\n atLeastOneDeSelected = true;\n break;\n default:\n atLeastOneMixed = true;\n break;\n }\n }\n\n if (atLeastOneMixed) {\n newSelectedValue = undefined;\n } else if (atLeastOneSelected && !atLeastOneDeSelected) {\n newSelectedValue = true;\n } else if (!atLeastOneSelected && atLeastOneDeSelected) {\n newSelectedValue = false;\n } else {\n newSelectedValue = undefined;\n }\n\n this.selectThisNode(newSelectedValue);\n }\n\n public setSelectedInitialValue(selected: boolean): void {\n this.selected = selected;\n }\n\n /**\n * Select (or deselect) the node.\n * @param newValue -`true` for selection, `false` for deselection.\n * @param clearSelection - If selecting, then passing `true` will select the node exclusively (i.e. NOT do multi select). If doing deselection, `clearSelection` has no impact.\n * @param suppressFinishActions - Pass `true` to prevent the `selectionChanged` from being fired. Note that the `rowSelected` event will still be fired.\n */\n public setSelected(newValue: boolean, clearSelection: boolean = false, suppressFinishActions: boolean = false) {\n this.setSelectedParams({\n newValue,\n clearSelection,\n suppressFinishActions,\n rangeSelect: false\n });\n }\n\n public isRowPinned(): boolean {\n return this.rowPinned === Constants.PINNED_TOP || this.rowPinned === Constants.PINNED_BOTTOM;\n }\n\n // to make calling code more readable, this is the same method as setSelected except it takes names parameters\n public setSelectedParams(params: SetSelectedParams): number {\n const groupSelectsChildren = this.beans.gridOptionsWrapper.isGroupSelectsChildren();\n const newValue = params.newValue === true;\n const clearSelection = params.clearSelection === true;\n const suppressFinishActions = params.suppressFinishActions === true;\n const rangeSelect = params.rangeSelect === true;\n // groupSelectsFiltered only makes sense when group selects children\n const groupSelectsFiltered = groupSelectsChildren && (params.groupSelectsFiltered === true);\n\n if (this.id === undefined) {\n console.warn('AG Grid: cannot select node until id for node is known');\n return 0;\n }\n\n if (this.rowPinned) {\n console.warn('AG Grid: cannot select pinned rows');\n return 0;\n }\n\n // if we are a footer, we don't do selection, just pass the info\n // to the sibling (the parent of the group)\n if (this.footer) {\n return this.sibling.setSelectedParams(params);\n }\n\n if (rangeSelect && this.beans.selectionService.getLastSelectedNode()) {\n const newRowClicked = this.beans.selectionService.getLastSelectedNode() !== this;\n const allowMultiSelect = this.beans.gridOptionsWrapper.isRowSelectionMulti();\n if (newRowClicked && allowMultiSelect) {\n const nodesChanged = this.doRowRangeSelection(params.newValue);\n this.beans.selectionService.setLastSelectedNode(this);\n return nodesChanged;\n }\n }\n\n let updatedCount = 0;\n\n // when groupSelectsFiltered, then this node may end up intermediate despite\n // trying to set it to true / false. this group will be calculated further on\n // down when we call calculatedSelectedForAllGroupNodes(). we need to skip it\n // here, otherwise the updatedCount would include it.\n const skipThisNode = groupSelectsFiltered && this.group;\n\n if (!skipThisNode) {\n const thisNodeWasSelected = this.selectThisNode(newValue);\n if (thisNodeWasSelected) {\n updatedCount++;\n }\n }\n\n if (groupSelectsChildren && this.childrenAfterGroup?.length) {\n updatedCount += this.selectChildNodes(newValue, groupSelectsFiltered);\n }\n\n // clear other nodes if not doing multi select\n if (!suppressFinishActions) {\n const clearOtherNodes = newValue && (clearSelection || !this.beans.gridOptionsWrapper.isRowSelectionMulti());\n if (clearOtherNodes) {\n updatedCount += this.beans.selectionService.clearOtherNodes(this);\n }\n\n // only if we selected something, then update groups and fire events\n if (updatedCount > 0) {\n this.beans.selectionService.updateGroupsFromChildrenSelections();\n\n // this is the very end of the 'action node', so we are finished all the updates,\n // include any parent / child changes that this method caused\n const event: SelectionChangedEvent = {\n type: Events.EVENT_SELECTION_CHANGED,\n api: this.beans.gridApi,\n columnApi: this.beans.columnApi\n };\n this.beans.eventService.dispatchEvent(event);\n }\n\n // so if user next does shift-select, we know where to start the selection from\n if (newValue) {\n this.beans.selectionService.setLastSelectedNode(this);\n }\n }\n\n return updatedCount;\n }\n\n // selects all rows between this node and the last selected node (or the top if this is the first selection).\n // not to be mixed up with 'cell range selection' where you drag the mouse, this is row range selection, by\n // holding down 'shift'.\n private doRowRangeSelection(value: boolean = true): number {\n const groupsSelectChildren = this.beans.gridOptionsWrapper.isGroupSelectsChildren();\n const lastSelectedNode = this.beans.selectionService.getLastSelectedNode();\n const nodesToSelect = this.beans.rowModel.getNodesInRangeForSelection(this, lastSelectedNode);\n\n let updatedCount = 0;\n\n nodesToSelect.forEach(rowNode => {\n if (rowNode.group && groupsSelectChildren || (value === false && this === rowNode)) { return; }\n\n const nodeWasSelected = rowNode.selectThisNode(value);\n if (nodeWasSelected) {\n updatedCount++;\n }\n });\n\n this.beans.selectionService.updateGroupsFromChildrenSelections();\n\n const event: SelectionChangedEvent = {\n type: Events.EVENT_SELECTION_CHANGED,\n api: this.beans.gridApi,\n columnApi: this.beans.columnApi\n };\n\n this.beans.eventService.dispatchEvent(event);\n\n return updatedCount;\n }\n\n public isParentOfNode(potentialParent: RowNode): boolean {\n let parentNode = this.parent;\n\n while (parentNode) {\n if (parentNode === potentialParent) {\n return true;\n }\n parentNode = parentNode.parent;\n }\n\n return false;\n }\n\n public selectThisNode(newValue?: boolean): boolean {\n\n // we only check selectable when newValue=true (ie selecting) to allow unselecting values,\n // as selectable is dynamic, need a way to unselect rows when selectable becomes false.\n const selectionNotAllowed = !this.selectable && newValue;\n const selectionNotChanged = this.selected === newValue;\n\n if (selectionNotAllowed || selectionNotChanged) { return false; }\n\n this.selected = newValue;\n\n if (this.eventService) {\n this.dispatchLocalEvent(this.createLocalRowEvent(RowNode.EVENT_ROW_SELECTED));\n }\n\n const event: RowSelectedEvent = this.createGlobalRowEvent(Events.EVENT_ROW_SELECTED);\n\n this.beans.eventService.dispatchEvent(event);\n\n return true;\n }\n\n private selectChildNodes(newValue: boolean, groupSelectsFiltered: boolean): number {\n const children = groupSelectsFiltered ? this.childrenAfterAggFilter : this.childrenAfterGroup;\n\n if (missing(children)) { return 0; }\n\n let updatedCount = 0;\n\n for (let i = 0; i < children.length; i++) {\n updatedCount += children[i].setSelectedParams({\n newValue: newValue,\n clearSelection: false,\n suppressFinishActions: true,\n groupSelectsFiltered\n });\n }\n\n return updatedCount;\n }\n\n /** Add an event listener. */\n public addEventListener(eventType: string, listener: Function): void {\n if (!this.eventService) {\n this.eventService = new EventService();\n }\n this.eventService.addEventListener(eventType, listener);\n }\n\n /** Remove event listener. */\n public removeEventListener(eventType: string, listener: Function): void {\n if (!this.eventService) { return; }\n\n this.eventService.removeEventListener(eventType, listener);\n if (this.eventService.noRegisteredListenersExist()) {\n this.eventService = null;\n }\n }\n\n public onMouseEnter(): void {\n this.dispatchLocalEvent(this.createLocalRowEvent(RowNode.EVENT_MOUSE_ENTER));\n }\n\n public onMouseLeave(): void {\n this.dispatchLocalEvent(this.createLocalRowEvent(RowNode.EVENT_MOUSE_LEAVE));\n }\n\n public getFirstChildOfFirstChild(rowGroupColumn: Column | null): RowNode | null {\n let currentRowNode: RowNode = this;\n let isCandidate = true;\n let foundFirstChildPath = false;\n let nodeToSwapIn: RowNode | null = null;\n\n // if we are hiding groups, then if we are the first child, of the first child,\n // all the way up to the column we are interested in, then we show the group cell.\n while (isCandidate && !foundFirstChildPath) {\n const parentRowNode = currentRowNode.parent!;\n const firstChild = exists(parentRowNode) && currentRowNode.firstChild;\n\n if (firstChild) {\n if (parentRowNode.rowGroupColumn === rowGroupColumn) {\n foundFirstChildPath = true;\n nodeToSwapIn = parentRowNode;\n }\n } else {\n isCandidate = false;\n }\n\n currentRowNode = parentRowNode;\n }\n\n return foundFirstChildPath ? nodeToSwapIn : null;\n }\n\n public isFullWidthCell(): boolean {\n const isFullWidthCellFunc = this.beans.gridOptionsWrapper.getIsFullWidthCellFunc();\n return isFullWidthCellFunc ? isFullWidthCellFunc({ rowNode: this }) : false;\n }\n\n /**\n * Returns the route of the row node. If the Row Node is a group, it returns the route to that Row Node.\n * If the Row Node is not a group, it returns `undefined`.\n */\n public getRoute(): string[] | undefined {\n if (this.key == null) { return; }\n\n const res: string[] = [];\n\n let pointer: RowNode = this;\n\n while (pointer.key != null) {\n res.push(pointer.key);\n pointer = pointer.parent!;\n }\n\n return res.reverse();\n }\n}\n","import { _ } from \"src/ts/utils\";\nimport { AgInputTextField } from \"../../widgets/agInputTextField\";\nimport { SimpleFilter, ISimpleFilterParams, ISimpleFilterModel, ISimpleFilterModelType, Tuple } from \"./simpleFilter\";\n\nexport interface IScalarFilterParams extends ISimpleFilterParams {\n /** If `true`, the `'inRange'` filter option will include values equal to the start and end of the range. */\n inRangeInclusive?: boolean;\n /** If `true`, blank (`null` or `undefined`) values will pass the `'equals'` filter option. */\n includeBlanksInEquals?: boolean;\n /** If `true`, blank (`null` or `undefined`) values will pass the `'lessThan'` and `'lessThanOrEqual'` filter options. */\n includeBlanksInLessThan?: boolean;\n /** If `true`, blank (`null` or `undefined`) values will pass the `'greaterThan'` and `'greaterThanOrEqual'` filter options. */\n includeBlanksInGreaterThan?: boolean;\n /** If `true`, blank (`null` or `undefined`) values will pass the `'inRange'` filter option. */\n includeBlanksInRange?: boolean;\n}\n\nexport interface Comparator {\n (left: T, right: T): number;\n}\n\nexport abstract class ScalarFilter extends SimpleFilter {\n private scalarFilterParams: IScalarFilterParams;\n\n protected abstract comparator(): Comparator;\n\n protected setParams(params: IScalarFilterParams): void {\n super.setParams(params);\n this.scalarFilterParams = params;\n }\n\n protected evaluateNullValue(filterType?: ISimpleFilterModelType | null) {\n switch (filterType) {\n case ScalarFilter.EQUALS:\n case ScalarFilter.NOT_EQUAL:\n if (this.scalarFilterParams.includeBlanksInEquals) {\n return true;\n }\n break;\n\n case ScalarFilter.GREATER_THAN:\n case ScalarFilter.GREATER_THAN_OR_EQUAL:\n if (this.scalarFilterParams.includeBlanksInGreaterThan) {\n return true;\n }\n break;\n\n case ScalarFilter.LESS_THAN:\n case ScalarFilter.LESS_THAN_OR_EQUAL:\n if (this.scalarFilterParams.includeBlanksInLessThan) {\n return true;\n }\n break;\n case ScalarFilter.IN_RANGE:\n if (this.scalarFilterParams.includeBlanksInRange) {\n return true;\n }\n break;\n case ScalarFilter.BLANK:\n return true;\n case ScalarFilter.NOT_BLANK:\n return false;\n }\n\n return false;\n }\n\n protected evaluateNonNullValue(values: Tuple, cellValue: V, filterModel: M): boolean {\n const comparator = this.comparator();\n const compareResult = values[0] != null ? comparator(values[0]!, cellValue) : 0;\n\n switch (filterModel.type) {\n case ScalarFilter.EQUALS:\n return compareResult === 0;\n\n case ScalarFilter.NOT_EQUAL:\n return compareResult !== 0;\n\n case ScalarFilter.GREATER_THAN:\n return compareResult > 0;\n\n case ScalarFilter.GREATER_THAN_OR_EQUAL:\n return compareResult >= 0;\n\n case ScalarFilter.LESS_THAN:\n return compareResult < 0;\n\n case ScalarFilter.LESS_THAN_OR_EQUAL:\n return compareResult <= 0;\n\n case ScalarFilter.IN_RANGE: {\n const compareToResult = comparator(values[1]!, cellValue);\n\n return this.scalarFilterParams.inRangeInclusive ?\n compareResult >= 0 && compareToResult <= 0 :\n compareResult > 0 && compareToResult < 0;\n }\n\n case ScalarFilter.BLANK:\n return this.isBlank(cellValue);\n\n case ScalarFilter.NOT_BLANK:\n return !this.isBlank(cellValue);\n\n default:\n console.warn('AG Grid: Unexpected type of filter \"' + filterModel.type + '\", it looks like the filter was configured with incorrect Filter Options');\n return true;\n }\n }\n}","import { RefSelector } from '../../../widgets/componentAnnotations';\nimport { Autowired } from '../../../context/context';\nimport { UserComponentFactory } from '../../../components/framework/userComponentFactory';\nimport { DateCompWrapper } from './dateCompWrapper';\nimport { ConditionPosition, ISimpleFilterModel, Tuple } from '../simpleFilter';\nimport { Comparator, IScalarFilterParams, ScalarFilter } from '../scalarFilter';\nimport { serialiseDate, parseDateTimeFromString } from '../../../utils/date';\nimport { IAfterGuiAttachedParams } from '../../../interfaces/iAfterGuiAttachedParams';\n\n// The date filter model takes strings, although the filter actually works with dates. This is because a Date object\n// won't convert easily to JSON. When the model is used for doing the filtering, it's converted to a Date object.\nexport interface DateFilterModel extends ISimpleFilterModel {\n /** Filter type is always `'date'` */\n filterType?: 'date';\n /**\n * The date value(s) associated with the filter. The type is `string` and format is always\n * `YYYY-MM-DD hh:mm:ss` e.g. 2019-05-24 00:00:00. Custom filters can have no values (hence both\n * are optional). Range filter has two values (from and to).\n */\n dateFrom: string | null;\n /**\n * Range filter `to` date value.\n */\n dateTo: string | null;\n}\n\nexport interface IDateFilterParams extends IScalarFilterParams {\n /** Required if the data for the column are not native JS `Date` objects. */\n comparator?: IDateComparatorFunc;\n /**\n * This is only used if a date component is not provided.\n * By default the grid will use the browser date picker in Chrome and Firefox and a plain text box for all other browsers\n * (This is because Chrome and Firefox are the only current browsers providing a decent out-of-the-box date picker).\n * If this property is set to `true`, the browser date picker will be used regardless of the browser type.\n * If set to `false`, a plain text box will be used for all browsers.\n */\n browserDatePicker?: boolean;\n /** This is the minimum year that may be entered in a date field for the value to be considered valid. Default: `1000` */\n minValidYear?: number;\n /** This is the maximum year that may be entered in a date field for the value to be considered valid. Default is no restriction. */\n maxValidYear?: number;\n}\n\nexport interface IDateComparatorFunc {\n (filterLocalDateAtMidnight: Date, cellValue: any): number;\n}\n\nconst DEFAULT_MIN_YEAR = 1000;\nconst DEFAULT_MAX_YEAR = Infinity;\n\nexport class DateFilter extends ScalarFilter {\n public static DEFAULT_FILTER_OPTIONS = [\n ScalarFilter.EQUALS,\n ScalarFilter.GREATER_THAN,\n ScalarFilter.LESS_THAN,\n ScalarFilter.NOT_EQUAL,\n ScalarFilter.IN_RANGE,\n ScalarFilter.BLANK,\n ScalarFilter.NOT_BLANK,\n ];\n\n @RefSelector('eCondition1PanelFrom') private readonly eCondition1PanelFrom: HTMLElement;\n @RefSelector('eCondition1PanelTo') private readonly eCondition1PanelTo: HTMLElement;\n @RefSelector('eCondition2PanelFrom') private readonly eCondition2PanelFrom: HTMLElement;\n @RefSelector('eCondition2PanelTo') private readonly eCondition2PanelTo: HTMLElement;\n\n private dateCondition1FromComp: DateCompWrapper;\n private dateCondition1ToComp: DateCompWrapper;\n private dateCondition2FromComp: DateCompWrapper;\n private dateCondition2ToComp: DateCompWrapper;\n\n @Autowired('userComponentFactory') private readonly userComponentFactory: UserComponentFactory;\n\n private dateFilterParams: IDateFilterParams;\n private minValidYear: number = DEFAULT_MIN_YEAR;\n private maxValidYear: number = DEFAULT_MAX_YEAR;\n\n constructor() {\n super('dateFilter');\n }\n\n public afterGuiAttached(params?: IAfterGuiAttachedParams): void {\n super.afterGuiAttached(params);\n\n this.dateCondition1FromComp.afterGuiAttached(params);\n }\n\n protected mapValuesFromModel(filterModel: DateFilterModel | null): Tuple {\n // unlike the other filters, we do two things here:\n // 1) allow for different attribute names (same as done for other filters) (eg the 'from' and 'to'\n // are in different locations in Date and Number filter models)\n // 2) convert the type (because Date filter uses Dates, however model is 'string')\n //\n // NOTE: The conversion of string to date also removes the timezone - i.e. when user picks\n // a date from the UI, it will have timezone info in it. This is lost when creating\n // the model. When we recreate the date again here, it's without a timezone.\n const { dateFrom, dateTo, type } = filterModel || {};\n return [\n dateFrom && parseDateTimeFromString(dateFrom) || null,\n dateTo && parseDateTimeFromString(dateTo) || null,\n ].slice(0, this.getNumberOfInputs(type));\n }\n\n protected comparator(): Comparator {\n return this.dateFilterParams.comparator ? this.dateFilterParams.comparator : this.defaultComparator.bind(this);\n }\n\n private defaultComparator(filterDate: Date, cellValue: any): number {\n // The default comparator assumes that the cellValue is a date\n const cellAsDate = cellValue as Date;\n\n if (cellValue == null || cellAsDate < filterDate) { return -1; }\n if (cellAsDate > filterDate) { return 1; }\n\n return 0;\n }\n\n protected setParams(params: IDateFilterParams): void {\n super.setParams(params);\n\n this.dateFilterParams = params;\n\n const yearParser = (param: keyof IDateFilterParams, fallback: number) => {\n if (params[param] != null) {\n if (!isNaN(params[param])) {\n return params[param] == null ? fallback : Number(params[param]);\n } else {\n console.warn(`AG Grid: DateFilter ${param} is not a number`);\n }\n }\n\n return fallback;\n };\n this.minValidYear = yearParser('minValidYear', DEFAULT_MIN_YEAR);\n this.maxValidYear = yearParser('maxValidYear', DEFAULT_MAX_YEAR);\n\n if (this.minValidYear > this.maxValidYear) {\n console.warn(`AG Grid: DateFilter minValidYear should be <= maxValidYear`);\n }\n\n this.createDateComponents();\n }\n\n private createDateComponents(): void {\n const createDateCompWrapper = (element: HTMLElement) =>\n new DateCompWrapper(\n this.getContext(),\n this.userComponentFactory,\n {\n onDateChanged: () => this.onUiChanged(),\n filterParams: this.dateFilterParams\n },\n element);\n\n this.dateCondition1FromComp = createDateCompWrapper(this.eCondition1PanelFrom);\n this.dateCondition1ToComp = createDateCompWrapper(this.eCondition1PanelTo);\n this.dateCondition2FromComp = createDateCompWrapper(this.eCondition2PanelFrom);\n this.dateCondition2ToComp = createDateCompWrapper(this.eCondition2PanelTo);\n\n this.addDestroyFunc(() => {\n this.forEachInput((element) => element.destroy());\n });\n }\n\n protected setElementValue(element: DateCompWrapper, value: Date | null, silent?: boolean): void {\n element.setDate(value);\n }\n\n protected setElementDisplayed(element: DateCompWrapper, displayed: boolean): void {\n element.setDisplayed(displayed);\n }\n\n protected setElementDisabled(element: DateCompWrapper, disabled: boolean): void {\n element.setDisabled(disabled);\n }\n\n protected getDefaultFilterOptions(): string[] {\n return DateFilter.DEFAULT_FILTER_OPTIONS;\n }\n\n protected createValueTemplate(position: ConditionPosition): string {\n const pos = position === ConditionPosition.One ? '1' : '2';\n\n return /* html */`\n
\n
\n
\n
`;\n }\n\n protected isConditionUiComplete(position: ConditionPosition): boolean {\n if (!super.isConditionUiComplete(position)) {\n return false;\n }\n\n const isValidDate = (value: Date | null) => value != null\n && value.getUTCFullYear() >= this.minValidYear\n && value.getUTCFullYear() <= this.maxValidYear;\n\n let valid = true;\n this.forEachInput((element, index, elPosition, numberOfInputs) => {\n if (elPosition !== position || !valid || index >= numberOfInputs) {\n return;\n }\n valid = valid && isValidDate(element.getDate());\n });\n\n return valid;\n }\n\n protected areSimpleModelsEqual(aSimple: DateFilterModel, bSimple: DateFilterModel): boolean {\n return aSimple.dateFrom === bSimple.dateFrom\n && aSimple.dateTo === bSimple.dateTo\n && aSimple.type === bSimple.type;\n }\n\n protected getFilterType(): 'date' {\n return 'date';\n }\n\n protected createCondition(position: ConditionPosition): DateFilterModel {\n const type = this.getConditionTypes()[position];\n const model: Partial = {};\n\n const values = this.getValues(position);\n if (values.length > 0) {\n model.dateFrom = serialiseDate(values[0]);\n }\n if (values.length > 1) {\n model.dateTo = serialiseDate(values[1]);\n }\n\n return {\n dateFrom: null,\n dateTo: null,\n filterType: this.getFilterType(),\n type,\n ...model,\n };\n }\n\n protected resetPlaceholder(): void {\n const globalTranslate = this.gridOptionsWrapper.getLocaleTextFunc();\n const placeholder = this.translate('dateFormatOoo');\n const ariaLabel = globalTranslate('ariaFilterValue', 'Filter Value');\n\n this.forEachInput((element) => {\n element.setInputPlaceholder(placeholder);\n element.setInputAriaLabel(ariaLabel);\n });\n }\n\n protected getInputs(): Tuple[] {\n return [\n [this.dateCondition1FromComp, this.dateCondition1ToComp],\n [this.dateCondition2FromComp, this.dateCondition2ToComp],\n ];\n }\n\n protected getValues(position: ConditionPosition): Tuple {\n const result: Tuple = [];\n this.forEachInput((element, index, elPosition, numberOfInputs) => {\n if (position === elPosition && index < numberOfInputs) {\n result.push(element.getDate());\n }\n });\n\n return result;\n }\n}\n","import { Component } from '../../../widgets/component';\nimport { IFloatingFilterComp, IFloatingFilterParams } from '../floatingFilter';\nimport { IFilterOptionDef, ProvidedFilterModel } from '../../../interfaces/iFilter';\nimport { ICombinedSimpleModel, ISimpleFilter, ISimpleFilterModel, SimpleFilter } from '../../provided/simpleFilter';\nimport { OptionsFactory } from '../../provided/optionsFactory';\nimport { IScalarFilterParams } from '../../provided/scalarFilter';\nimport { FilterChangedEvent } from '../../../events';\nimport { IProvidedFilterParams } from '../../provided/providedFilter';\n\nexport abstract class SimpleFloatingFilter extends Component implements IFloatingFilterComp {\n\n // this method is on IFloatingFilterComp. because it's not implemented at this level, we have to\n // define it as an abstract method. it gets implemented in sub classes.\n public abstract onParentModelChanged(model: ProvidedFilterModel, event: FilterChangedEvent): void;\n\n // creates text equivalent of FilterModel. if it's a combined model, this takes just one condition.\n protected abstract conditionToString(condition: ProvidedFilterModel, opts?: IFilterOptionDef): string;\n protected abstract getDefaultFilterOptions(): string[];\n protected abstract setEditable(editable: boolean): void;\n\n private lastType: string | null | undefined;\n\n private optionsFactory: OptionsFactory;\n\n private readOnly: boolean;\n\n protected getDefaultDebounceMs(): number {\n return 0;\n }\n\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n public destroy(): void {\n super.destroy();\n }\n\n // used by:\n // 1) NumberFloatingFilter & TextFloatingFilter: Always, for both when editable and read only.\n // 2) DateFloatingFilter: Only when read only (as we show text rather than a date picker when read only)\n protected getTextFromModel(model: ProvidedFilterModel): string | null {\n if (!model) { return null; }\n\n const isCombined = (model as any).operator != null;\n if (isCombined) {\n const combinedModel = model as ICombinedSimpleModel;\n const { condition1, condition2 } = combinedModel || {};\n const customOption1 = this.optionsFactory.getCustomOption(condition1.type);\n const customOption2 = this.optionsFactory.getCustomOption(condition2.type);\n\n return [\n this.conditionToString(condition1, customOption1),\n combinedModel.operator,\n this.conditionToString(condition2, customOption2),\n ].join(' ');\n } else {\n const condition = model as ISimpleFilterModel;\n const customOption = this.optionsFactory.getCustomOption(condition.type);\n\n // For custom filter options we display the Name of the filter instead\n // of displaying the `from` value, as it wouldn't be relevant\n const { displayKey, displayName, numberOfInputs } = customOption || {};\n if (displayKey && displayName && numberOfInputs === 0) {\n this.gridOptionsWrapper.getLocaleTextFunc()(displayKey, displayName);\n return displayName;\n }\n return this.conditionToString(condition, customOption);\n }\n }\n\n protected isEventFromFloatingFilter(event: FilterChangedEvent): boolean | undefined {\n return event && event.afterFloatingFilter;\n }\n\n protected getLastType(): string | null | undefined {\n return this.lastType;\n }\n\n protected isReadOnly(): boolean {\n return this.readOnly;\n }\n\n protected setLastTypeFromModel(model: ProvidedFilterModel): void {\n // if no model provided by the parent filter use default\n if (!model) {\n this.lastType = this.optionsFactory.getDefaultOption();\n return;\n }\n\n const isCombined = (model as any).operator;\n\n let condition: ISimpleFilterModel;\n\n if (isCombined) {\n const combinedModel = model as ICombinedSimpleModel;\n condition = combinedModel.condition1;\n } else {\n condition = model as ISimpleFilterModel;\n }\n\n this.lastType = condition.type;\n }\n\n protected canWeEditAfterModelFromParentFilter(model: ProvidedFilterModel): boolean {\n if (!model) {\n // if no model, then we can edit as long as the lastType is something we can edit, as this\n // is the type we will provide to the parent filter if the user decides to use the floating filter.\n return this.isTypeEditable(this.lastType);\n }\n\n // never allow editing if the filter is combined (ie has two parts)\n const isCombined = (model as any).operator;\n\n if (isCombined) {\n return false;\n }\n\n const simpleModel = model as ISimpleFilterModel;\n\n return this.isTypeEditable(simpleModel.type);\n }\n\n public init(params: IFloatingFilterParams): void {\n this.optionsFactory = new OptionsFactory();\n this.optionsFactory.init(params.filterParams as IScalarFilterParams, this.getDefaultFilterOptions());\n this.lastType = this.optionsFactory.getDefaultOption();\n\n // readOnly is a property of IProvidedFilterParams - we need to find a better (type-safe)\n // way to support reading this in the future.\n this.readOnly = !!(params.filterParams as IProvidedFilterParams).readOnly;\n\n // we are editable if:\n // 1) there is a type (user has configured filter wrong if not type)\n // AND\n // 2) the default type is not 'in range'\n const editable = this.isTypeEditable(this.lastType);\n this.setEditable(editable);\n }\n\n private doesFilterHaveSingleInput(filterType: string) {\n const customFilterOption = this.optionsFactory.getCustomOption(filterType);\n const { numberOfInputs } = customFilterOption || {};\n return numberOfInputs == null || numberOfInputs == 1;\n }\n\n private isTypeEditable(type?: string | null): boolean {\n const uneditableTypes: string[] = [\n SimpleFilter.IN_RANGE, SimpleFilter.EMPTY, SimpleFilter.BLANK, SimpleFilter.NOT_BLANK,\n ];\n return !!type &&\n !this.isReadOnly() &&\n this.doesFilterHaveSingleInput(type) &&\n uneditableTypes.indexOf(type) < 0;\n }\n}\n","import { DateFilter, DateFilterModel } from './dateFilter';\nimport { Autowired } from '../../../context/context';\nimport { UserComponentFactory } from '../../../components/framework/userComponentFactory';\nimport { IDateParams } from '../../../rendering/dateComponent';\nimport { IFloatingFilterParams } from '../../floating/floatingFilter';\nimport { DateCompWrapper } from './dateCompWrapper';\nimport { RefSelector } from '../../../widgets/componentAnnotations';\nimport { SimpleFilter, ISimpleFilterModel } from '../simpleFilter';\nimport { SimpleFloatingFilter } from '../../floating/provided/simpleFloatingFilter';\nimport { FilterChangedEvent } from '../../../events';\nimport { ProvidedFilter } from '../providedFilter';\nimport { AgInputTextField } from '../../../widgets/agInputTextField';\nimport { setDisplayed } from '../../../utils/dom';\nimport { parseDateTimeFromString, serialiseDate } from '../../../utils/date';\nimport { debounce } from '../../../utils/function';\nimport { IFilterOptionDef } from '../../../interfaces/iFilter';\nimport { WithoutGridCommon } from '../../../interfaces/iCommon';\n\nexport class DateFloatingFilter extends SimpleFloatingFilter {\n @Autowired('userComponentFactory') private readonly userComponentFactory: UserComponentFactory;\n\n @RefSelector('eReadOnlyText') private readonly eReadOnlyText: AgInputTextField;\n @RefSelector('eDateWrapper') private readonly eDateWrapper: HTMLInputElement;\n\n private dateComp: DateCompWrapper;\n private params: IFloatingFilterParams;\n\n constructor() {\n super(/* html */`\n
\n \n
\n
`);\n }\n\n protected getDefaultFilterOptions(): string[] {\n return DateFilter.DEFAULT_FILTER_OPTIONS;\n }\n\n protected conditionToString(condition: DateFilterModel, options?: IFilterOptionDef): string {\n const { type } = condition;\n const { numberOfInputs } = options || {};\n const isRange = type == SimpleFilter.IN_RANGE || numberOfInputs === 2;\n\n const dateFrom = parseDateTimeFromString(condition.dateFrom);\n const dateTo = parseDateTimeFromString(condition.dateTo);\n\n if (isRange) {\n return `${serialiseDate(dateFrom, false)}-${serialiseDate(dateTo, false)}`;\n }\n\n if (dateFrom != null) {\n return `${serialiseDate(dateFrom, false)}`;\n }\n\n // cater for when the type doesn't need a value\n return `${type}`;\n }\n\n public init(params: IFloatingFilterParams): void {\n super.init(params);\n this.params = params;\n this.createDateComponent();\n const translate = this.gridOptionsWrapper.getLocaleTextFunc();\n this.eReadOnlyText\n .setDisabled(true)\n .setInputAriaLabel(translate('ariaDateFilterInput', 'Date Filter Input'));\n }\n\n protected setEditable(editable: boolean): void {\n setDisplayed(this.eDateWrapper, editable);\n setDisplayed(this.eReadOnlyText.getGui(), !editable);\n }\n\n public onParentModelChanged(model: ISimpleFilterModel, event: FilterChangedEvent): void {\n // We don't want to update the floating filter if the floating filter caused the change,\n // because the UI is already in sync. if we didn't do this, the UI would behave strangely\n // as it would be updating as the user is typing\n if (this.isEventFromFloatingFilter(event)) { return; }\n\n super.setLastTypeFromModel(model);\n\n const allowEditing = !this.isReadOnly() &&\n this.canWeEditAfterModelFromParentFilter(model);\n\n this.setEditable(allowEditing);\n\n if (allowEditing) {\n if (model) {\n const dateModel = model as DateFilterModel;\n\n this.dateComp.setDate(parseDateTimeFromString(dateModel.dateFrom));\n } else {\n this.dateComp.setDate(null);\n }\n\n this.eReadOnlyText.setValue('');\n } else {\n this.eReadOnlyText.setValue(this.getTextFromModel(model));\n this.dateComp.setDate(null);\n }\n }\n\n private onDateChanged(): void {\n const filterValueDate = this.dateComp.getDate();\n const filterValueText = serialiseDate(filterValueDate);\n\n this.params.parentFilterInstance(filterInstance => {\n if (filterInstance) {\n const date = parseDateTimeFromString(filterValueText);\n filterInstance.onFloatingFilterChanged(this.getLastType() || null, date);\n }\n });\n }\n\n private createDateComponent(): void {\n const debounceMs = ProvidedFilter.getDebounceMs(this.params.filterParams, this.getDefaultDebounceMs());\n const dateComponentParams: WithoutGridCommon = {\n onDateChanged: debounce(this.onDateChanged.bind(this), debounceMs),\n filterParams: this.params.column.getColDef().filterParams\n };\n\n this.dateComp = new DateCompWrapper(this.getContext(), this.userComponentFactory, dateComponentParams, this.eDateWrapper);\n\n this.addDestroyFunc(() => this.dateComp.destroy());\n }\n}\n","import { AgInputTextField } from '../../../widgets/agInputTextField';\nimport { Component } from '../../../widgets/component';\nimport { IDateComp, IDateParams } from '../../../rendering/dateComponent';\nimport { RefSelector } from '../../../widgets/componentAnnotations';\nimport { serialiseDate, parseDateTimeFromString } from '../../../utils/date';\nimport { isBrowserChrome, isBrowserFirefox } from '../../../utils/browser';\nimport { IAfterGuiAttachedParams } from '../../../interfaces/iAfterGuiAttachedParams';\n\nexport class DefaultDateComponent extends Component implements IDateComp {\n @RefSelector('eDateInput') private readonly eDateInput: AgInputTextField;\n\n constructor() {\n super(/* html */`\n
\n \n
`\n );\n }\n\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n public destroy(): void {\n super.destroy();\n }\n\n public init(params: IDateParams): void {\n const eDocument = this.gridOptionsWrapper.getDocument();\n const inputElement = this.eDateInput.getInputElement();\n\n if (this.shouldUseBrowserDatePicker(params)) {\n inputElement.type = 'date';\n }\n\n // ensures that the input element is focussed when a clear button is clicked\n this.addManagedListener(inputElement, 'mousedown', () => {\n if (this.eDateInput.isDisabled()) { return; }\n inputElement.focus();\n });\n\n this.addManagedListener(inputElement, 'input', e => {\n if (e.target !== eDocument.activeElement) { return; }\n if (this.eDateInput.isDisabled()) { return; }\n\n params.onDateChanged();\n });\n\n const { minValidYear, maxValidYear } = params.filterParams || {};\n if (minValidYear) {\n inputElement.min = `${minValidYear}-01-01`;\n }\n if (maxValidYear) {\n inputElement.max = `${maxValidYear}-12-31`;\n }\n }\n\n public getDate(): Date | null {\n return parseDateTimeFromString(this.eDateInput.getValue());\n }\n\n public setDate(date: Date): void {\n this.eDateInput.setValue(serialiseDate(date, false));\n }\n\n public setInputPlaceholder(placeholder: string): void {\n this.eDateInput.setInputPlaceholder(placeholder);\n }\n\n public setDisabled(disabled: boolean): void {\n this.eDateInput.setDisabled(disabled);\n }\n\n public afterGuiAttached(params?: IAfterGuiAttachedParams): void {\n if (!params || !params.suppressFocus) {\n this.eDateInput.getInputElement().focus();\n }\n }\n\n private shouldUseBrowserDatePicker(params: IDateParams): boolean {\n if (params.filterParams && params.filterParams.browserDatePicker != null) {\n return params.filterParams.browserDatePicker;\n }\n\n return isBrowserChrome() || isBrowserFirefox();\n }\n}\n","import { RefSelector } from '../../../widgets/componentAnnotations';\nimport { _ } from '../../../utils';\nimport { ConditionPosition, ISimpleFilterModel, Tuple } from '../simpleFilter';\nimport { ScalarFilter, Comparator, IScalarFilterParams } from '../scalarFilter';\nimport { IAfterGuiAttachedParams } from '../../../interfaces/iAfterGuiAttachedParams';\nimport { makeNull } from '../../../utils/generic';\nimport { AgInputTextField } from '../../../widgets/agInputTextField';\nimport { isBrowserChrome, isBrowserEdge } from '../../../utils/browser';\n\nexport interface NumberFilterModel extends ISimpleFilterModel {\n /** Filter type is always `'number'` */\n filterType?: 'number';\n /**\n * The number value(s) associated with the filter.\n * Custom filters can have no values (hence both are optional).\n * Range filter has two values (from and to).\n */\n filter?: number | null;\n /**\n * Range filter `to` value.\n */\n filterTo?: number | null;\n}\n\nexport interface INumberFilterParams extends IScalarFilterParams {\n /**\n * When specified, the input field will be of type `text` instead of `number`, and this will be used as a regex of all the characters that are allowed to be typed.\n * This will be compared against any typed character and prevent the character from appearing in the input if it does not match, in supported browsers (all except Safari).\n */\n allowedCharPattern?: string;\n /**\n * Typically used alongside `allowedCharPattern`, this provides a custom parser to convert the value entered in the filter inputs into a number that can be used for comparisons.\n */\n numberParser?: (text: string | null) => number;\n}\n\nexport class NumberFilter extends ScalarFilter {\n public static DEFAULT_FILTER_OPTIONS = [\n ScalarFilter.EQUALS,\n ScalarFilter.NOT_EQUAL,\n ScalarFilter.LESS_THAN,\n ScalarFilter.LESS_THAN_OR_EQUAL,\n ScalarFilter.GREATER_THAN,\n ScalarFilter.GREATER_THAN_OR_EQUAL,\n ScalarFilter.IN_RANGE,\n ScalarFilter.BLANK,\n ScalarFilter.NOT_BLANK,\n ];\n\n @RefSelector('eValue-index0-1') private readonly eValueFrom1: AgInputTextField;\n @RefSelector('eValue-index1-1') private readonly eValueTo1: AgInputTextField;\n\n @RefSelector('eValue-index0-2') private readonly eValueFrom2: AgInputTextField;\n @RefSelector('eValue-index1-2') private readonly eValueTo2: AgInputTextField;\n\n private numberFilterParams: INumberFilterParams;\n\n constructor() {\n super('numberFilter');\n }\n\n protected mapValuesFromModel(filterModel: NumberFilterModel | null): Tuple {\n const { filter, filterTo, type } = filterModel || {};\n return [\n filter == null ? null : filter,\n filterTo == null ? null : filterTo,\n ].slice(0, this.getNumberOfInputs(type));\n }\n\n protected getDefaultDebounceMs(): number {\n return 500;\n }\n\n protected comparator(): Comparator {\n return (left: number, right: number): number => {\n if (left === right) { return 0; }\n\n return left < right ? 1 : -1;\n };\n }\n\n protected setParams(params: INumberFilterParams): void {\n this.numberFilterParams = params;\n\n const allowedCharPattern = this.getAllowedCharPattern();\n\n if (allowedCharPattern) {\n const config = { allowedCharPattern };\n\n this.resetTemplate({\n 'eValue-index0-1': config,\n 'eValue-index1-1': config,\n 'eValue-index0-2': config,\n 'eValue-index1-2': config,\n });\n }\n\n super.setParams(params);\n }\n\n protected getDefaultFilterOptions(): string[] {\n return NumberFilter.DEFAULT_FILTER_OPTIONS;\n }\n\n protected createValueTemplate(position: ConditionPosition): string {\n const pos = position === ConditionPosition.One ? '1' : '2';\n const allowedCharPattern = this.getAllowedCharPattern();\n const agElementTag = allowedCharPattern ? 'ag-input-text-field' : 'ag-input-number-field';\n\n return /* html */`\n
\n <${agElementTag} class=\"ag-filter-from ag-filter-filter\" ref=\"eValue-index0-${pos}\">\n <${agElementTag} class=\"ag-filter-to ag-filter-filter\" ref=\"eValue-index1-${pos}\">\n
`;\n }\n\n protected getValues(position: ConditionPosition): Tuple {\n const result: Tuple = [];\n this.forEachInput((element, index, elPosition, numberOfInputs) => {\n if (position === elPosition && index < numberOfInputs) {\n result.push(this.stringToFloat(element.getValue()));\n }\n });\n\n return result;\n }\n\n protected areSimpleModelsEqual(aSimple: NumberFilterModel, bSimple: NumberFilterModel): boolean {\n return aSimple.filter === bSimple.filter\n && aSimple.filterTo === bSimple.filterTo\n && aSimple.type === bSimple.type;\n }\n\n protected getFilterType(): 'number' {\n return 'number';\n }\n\n private stringToFloat(value?: string | number | null): number | null {\n if (typeof value === 'number') {\n return value;\n }\n\n let filterText = makeNull(value);\n\n if (filterText != null && filterText.trim() === '') {\n filterText = null;\n }\n\n if (this.numberFilterParams.numberParser) {\n return this.numberFilterParams.numberParser(filterText);\n }\n\n return filterText == null || filterText.trim() === '-' ? null : parseFloat(filterText);\n }\n\n protected createCondition(position: ConditionPosition): NumberFilterModel {\n const type = this.getConditionTypes()[position];\n const model: NumberFilterModel = {\n filterType: this.getFilterType(),\n type\n };\n\n const values = this.getValues(position);\n if (values.length > 0) {\n model.filter = values[0];\n }\n if (values.length > 1) {\n model.filterTo = values[1];\n }\n\n return model;\n }\n\n protected getInputs(): Tuple[] {\n return [\n [this.eValueFrom1, this.eValueTo1],\n [this.eValueFrom2, this.eValueTo2],\n ];\n }\n\n private getAllowedCharPattern(): string | null {\n const { allowedCharPattern } = this.numberFilterParams || {};\n\n if (allowedCharPattern) {\n return allowedCharPattern;\n }\n\n if (!isBrowserChrome() && !isBrowserEdge()) {\n // only Chrome and Edge support the HTML5 number field, so for other browsers we provide an equivalent\n // constraint instead\n return '\\\\d\\\\-\\\\.';\n }\n\n return null;\n }\n}\n","import { RefSelector } from '../../../widgets/componentAnnotations';\nimport {\n SimpleFilter,\n ConditionPosition,\n ISimpleFilterParams,\n ISimpleFilterModel,\n ISimpleFilterModelType,\n Tuple\n} from '../simpleFilter';\nimport { AgInputTextField } from '../../../widgets/agInputTextField';\nimport { makeNull } from '../../../utils/generic';\nimport { _ } from '../../../utils';\nimport { BaseColDefParams } from '../../../entities/colDef';\nimport { IDoesFilterPassParams } from '../../../interfaces/iFilter';\n\nexport interface TextFilterModel extends ISimpleFilterModel {\n /** Filter type is always `'text'` */\n filterType?: 'text';\n /**\n * The text value associated with the filter.\n * It's optional as custom filters may not have a text value.\n * */\n filter?: string | null;\n /**\n * The 2nd text value associated with the filter, if supported.\n * */\n filterTo?: string | null;\n }\n\nexport interface TextMatcherParams extends BaseColDefParams {\n filterOption: string | null | undefined;\n value: any;\n filterText: string | null;\n textFormatter?: TextFormatter;\n}\n\nexport interface TextMatcher {\n (params: TextMatcherParams): boolean;\n}\n\nexport interface TextFormatter {\n (from?: string | null): string | null;\n}\n\nexport interface ITextFilterParams extends ISimpleFilterParams {\n /**\n * Used to override how to filter based on the user input.\n */\n textMatcher?: TextMatcher;\n /**\n * By default, text filtering is case-insensitive. Set this to `true` to make text filtering case-sensitive.\n * Default: `false`\n */\n caseSensitive?: boolean;\n /**\n * Formats the text before applying the filter compare logic.\n * Useful if you want to substitute accented characters, for example.\n */\n textFormatter?: (from: string) => string;\n\n /**\n * If `true`, the input that the user enters will be trimmed when the filter is applied, so any leading or trailing whitespace will be removed.\n * If only whitespace is entered, it will be left as-is.\n * If you enable `trimInput`, it is best to also increase the `debounceMs` to give users more time to enter text.\n * Default: `false`\n */\n trimInput?: boolean;\n}\n\nexport class TextFilter extends SimpleFilter {\n public static DEFAULT_FILTER_OPTIONS = [\n SimpleFilter.CONTAINS,\n SimpleFilter.NOT_CONTAINS,\n SimpleFilter.EQUALS,\n SimpleFilter.NOT_EQUAL,\n SimpleFilter.STARTS_WITH,\n SimpleFilter.ENDS_WITH,\n SimpleFilter.BLANK,\n SimpleFilter.NOT_BLANK,\n ];\n\n static DEFAULT_FORMATTER: TextFormatter = (from: string) => from;\n\n static DEFAULT_LOWERCASE_FORMATTER: TextFormatter = (from: string) => from == null ? null : from.toString().toLowerCase();\n\n static DEFAULT_MATCHER: TextMatcher = ({filterOption, value, filterText}) => {\n if (filterText == null) { return false; }\n\n switch (filterOption) {\n case TextFilter.CONTAINS:\n return value.indexOf(filterText) >= 0;\n case TextFilter.NOT_CONTAINS:\n return value.indexOf(filterText) < 0;\n case TextFilter.EQUALS:\n return value === filterText;\n case TextFilter.NOT_EQUAL:\n return value != filterText;\n case TextFilter.STARTS_WITH:\n return value.indexOf(filterText) === 0;\n case TextFilter.ENDS_WITH:\n const index = value.lastIndexOf(filterText);\n return index >= 0 && index === (value.length - filterText.length);\n default:\n return false;\n }\n }\n\n @RefSelector('eValue-index0-1') private readonly eValueFrom1: AgInputTextField;\n @RefSelector('eValue-index1-1') private readonly eValueTo1: AgInputTextField;\n\n @RefSelector('eValue-index0-2') private readonly eValueFrom2: AgInputTextField;\n @RefSelector('eValue-index1-2') private readonly eValueTo2: AgInputTextField;\n\n private matcher: TextMatcher;\n private formatter: TextFormatter;\n\n private textFilterParams: ITextFilterParams;\n\n constructor() {\n super('textFilter');\n }\n\n public static trimInput(value?: string | null): string | null | undefined {\n const trimmedInput = value && value.trim();\n\n // trim the input, unless it is all whitespace (this is consistent with Excel behaviour)\n return trimmedInput === '' ? value : trimmedInput;\n }\n\n protected getDefaultDebounceMs(): number {\n return 500;\n }\n\n protected setParams(params: ITextFilterParams): void {\n super.setParams(params);\n\n this.textFilterParams = params;\n this.matcher = this.getTextMatcher();\n this.formatter = this.textFilterParams.textFormatter ||\n (this.textFilterParams.caseSensitive ? TextFilter.DEFAULT_FORMATTER : TextFilter.DEFAULT_LOWERCASE_FORMATTER);\n }\n\n private getTextMatcher(): TextMatcher {\n const legacyComparator = (this.textFilterParams as any).textCustomComparator;\n if (legacyComparator) {\n _.doOnce(() => console.warn('AG Grid - textCustomComparator is deprecated, use textMatcher instead.'), 'textCustomComparator.deprecated');\n return ({ filterOption, value, filterText }) => legacyComparator(filterOption, value, filterText);\n }\n return this.textFilterParams.textMatcher || TextFilter.DEFAULT_MATCHER\n }\n\n protected createCondition(position: ConditionPosition): TextFilterModel {\n const type = this.getConditionTypes()[position];\n\n const model: TextFilterModel = {\n filterType: this.getFilterType(),\n type,\n };\n\n const values = this.getValues(position);\n if (values.length > 0) {\n model.filter = values[0];\n }\n if (values.length > 1) {\n model.filterTo = values[1];\n }\n\n return model;\n }\n\n protected getFilterType(): 'text' {\n return 'text';\n }\n\n protected areSimpleModelsEqual(aSimple: TextFilterModel, bSimple: TextFilterModel): boolean {\n return aSimple.filter === bSimple.filter &&\n aSimple.filterTo === bSimple.filterTo &&\n aSimple.type === bSimple.type;\n }\n\n protected getInputs(): Tuple[] {\n return [\n [this.eValueFrom1, this.eValueTo1],\n [this.eValueFrom2, this.eValueTo2],\n ];\n }\n\n protected getValues(position: ConditionPosition): Tuple {\n const result: Tuple = [];\n this.forEachInput((element, index, elPosition, numberOfInputs) => {\n if (position === elPosition && index < numberOfInputs) {\n const value = makeNull(element.getValue());\n const cleanValue = (this.textFilterParams.trimInput ? TextFilter.trimInput(value) : value) || null;\n result.push(cleanValue);\n element.setValue(cleanValue, true); // ensure clean value is visible\n }\n });\n\n return result;\n }\n\n protected getDefaultFilterOptions(): string[] {\n return TextFilter.DEFAULT_FILTER_OPTIONS;\n }\n\n protected createValueTemplate(position: ConditionPosition): string {\n const pos = position === ConditionPosition.One ? '1' : '2';\n\n return /* html */`\n
\n \n \n
`;\n }\n\n protected mapValuesFromModel(filterModel: TextFilterModel | null): Tuple {\n const { filter, filterTo, type } = filterModel || {};\n return [\n filter || null,\n filterTo || null,\n ].slice(0, this.getNumberOfInputs(type));\n }\n\n protected evaluateNullValue(filterType: ISimpleFilterModelType | null) {\n const filterTypesAllowNulls = [\n SimpleFilter.NOT_EQUAL, SimpleFilter.NOT_CONTAINS, SimpleFilter.BLANK,\n ];\n\n return filterType ? filterTypesAllowNulls.indexOf(filterType) >= 0 : false;\n }\n\n protected evaluateNonNullValue(values: Tuple, cellValue: string, filterModel: TextFilterModel, params: IDoesFilterPassParams): boolean {\n const formattedValues = values.map(v => this.formatter(v)) || [];\n const cellValueFormatted = this.formatter(cellValue);\n const {api, colDef, column, columnApi, context, textFormatter} = this.textFilterParams;\n\n if (filterModel.type === SimpleFilter.BLANK) {\n return this.isBlank(cellValue);\n } else if (filterModel.type === SimpleFilter.NOT_BLANK) {\n return !this.isBlank(cellValue);\n }\n\n const matcherParams = {\n api,\n colDef,\n column,\n columnApi,\n context,\n node: params.node,\n data: params.data,\n filterOption: filterModel.type,\n value: cellValueFormatted,\n textFormatter,\n };\n\n return formattedValues.some(v => this.matcher({ ...matcherParams, filterText: v }));\n }\n}\n","import { IFloatingFilterParams } from '../floatingFilter';\nimport { RefSelector } from '../../../widgets/componentAnnotations';\nimport { IFilterOptionDef, ProvidedFilterModel } from '../../../interfaces/iFilter';\nimport { debounce } from '../../../utils/function';\nimport { ProvidedFilter } from '../../provided/providedFilter';\nimport { PostConstruct, Autowired } from '../../../context/context';\nimport { SimpleFloatingFilter } from './simpleFloatingFilter';\nimport { SimpleFilter } from '../../provided/simpleFilter';\nimport { FilterChangedEvent } from '../../../events';\nimport { AgInputTextField } from '../../../widgets/agInputTextField';\nimport { ColumnModel } from '../../../columns/columnModel';\nimport { KeyCode } from '../../../constants/keyCode';\nimport { ITextFilterParams, TextFilter, TextFilterModel } from '../../provided/text/textFilter';\nimport { NumberFilterModel, INumberFilterParams } from '../../provided/number/numberFilter';\n\ntype ModelUnion = TextFilterModel | NumberFilterModel;\nexport abstract class TextInputFloatingFilter extends SimpleFloatingFilter {\n @Autowired('columnModel') private readonly columnModel: ColumnModel;\n @RefSelector('eFloatingFilterInput') private readonly eFloatingFilterInput: AgInputTextField;\n\n protected params: IFloatingFilterParams;\n\n private applyActive: boolean;\n\n @PostConstruct\n private postConstruct(): void {\n this.resetTemplate();\n }\n\n private resetTemplate(paramsMap?: any) {\n this.setTemplate(/* html */`\n
\n \n
\n `, paramsMap);\n }\n\n protected getDefaultDebounceMs(): number {\n return 500;\n }\n\n public onParentModelChanged(model: ProvidedFilterModel, event: FilterChangedEvent): void {\n if (this.isEventFromFloatingFilter(event)) {\n // if the floating filter triggered the change, it is already in sync\n return;\n }\n\n this.setLastTypeFromModel(model);\n this.eFloatingFilterInput.setValue(this.getTextFromModel(model));\n this.setEditable(this.canWeEditAfterModelFromParentFilter(model));\n }\n\n public init(params: IFloatingFilterParams): void {\n super.init(params);\n\n this.params = params;\n this.applyActive = ProvidedFilter.isUseApplyButton(this.params.filterParams);\n\n const { allowedCharPattern } = this.params.filterParams as INumberFilterParams;\n if (allowedCharPattern != null) {\n this.resetTemplate({ eFloatingFilterInput: { allowedCharPattern } });\n }\n\n if (!this.isReadOnly()) {\n const debounceMs = ProvidedFilter.getDebounceMs(this.params.filterParams, this.getDefaultDebounceMs());\n const toDebounce: () => void = debounce(this.syncUpWithParentFilter.bind(this), debounceMs);\n const filterGui = this.eFloatingFilterInput.getGui();\n\n this.addManagedListener(filterGui, 'input', toDebounce);\n this.addManagedListener(filterGui, 'keypress', toDebounce);\n this.addManagedListener(filterGui, 'keydown', toDebounce);\n }\n\n const columnDef = (params.column.getDefinition() as any);\n\n if (this.isReadOnly() || (\n columnDef.filterParams &&\n columnDef.filterParams.filterOptions &&\n columnDef.filterParams.filterOptions.length === 1 &&\n columnDef.filterParams.filterOptions[0] === 'inRange')) {\n this.eFloatingFilterInput.setDisabled(true);\n }\n\n const displayName = this.columnModel.getDisplayNameForColumn(params.column, 'header', true);\n const translate = this.gridOptionsWrapper.getLocaleTextFunc();\n this.eFloatingFilterInput.setInputAriaLabel(`${displayName} ${translate('ariaFilterInput', 'Filter Input')}`);\n }\n\n private syncUpWithParentFilter(e: KeyboardEvent): void {\n const enterKeyPressed = e.key === KeyCode.ENTER;\n\n if (this.applyActive && !enterKeyPressed) { return; }\n\n let value = this.eFloatingFilterInput.getValue();\n\n if ((this.params.filterParams as ITextFilterParams).trimInput) {\n value = TextFilter.trimInput(value);\n this.eFloatingFilterInput.setValue(value, true); // ensure visible value is trimmed\n }\n\n this.params.parentFilterInstance(filterInstance => {\n if (filterInstance) {\n filterInstance.onFloatingFilterChanged(this.getLastType() || null, value || null);\n }\n });\n }\n\n protected conditionToString(condition: M, options?: IFilterOptionDef): string {\n const { numberOfInputs } = options || {};\n const isRange = condition.type == SimpleFilter.IN_RANGE || numberOfInputs === 2;\n\n if (isRange) {\n return `${condition.filter}-${condition.filterTo}`;\n }\n\n // cater for when the type doesn't need a value\n if (condition.filter != null) {\n return `${condition.filter}`;\n }\n\n return `${condition.type}`;\n }\n\n protected setEditable(editable: boolean): void {\n this.eFloatingFilterInput.setDisabled(!editable);\n }\n}\n","import { NumberFilter, NumberFilterModel } from './numberFilter';\nimport { TextInputFloatingFilter } from '../../floating/provided/textInputFloatingFilter';\n\nexport class NumberFloatingFilter extends TextInputFloatingFilter {\n protected getDefaultFilterOptions(): string[] {\n return NumberFilter.DEFAULT_FILTER_OPTIONS;\n }\n}\n","import { TextFilter, TextFilterModel } from './textFilter';\nimport { TextInputFloatingFilter } from '../../floating/provided/textInputFloatingFilter';\n\nexport class TextFloatingFilter extends TextInputFloatingFilter {\n protected getDefaultFilterOptions(): string[] {\n return TextFilter.DEFAULT_FILTER_OPTIONS;\n }\n}\n","import { AgEvent } from \"../events\";\nimport { EventService } from \"../eventService\";\nimport { IEventEmitter } from \"../interfaces/iEventEmitter\";\nimport { areEventsNear } from \"../utils/mouse\";\n\nexport interface TapEvent extends AgEvent {\n touchStart: Touch;\n}\n\nexport interface LongTapEvent extends AgEvent {\n touchStart: Touch;\n touchEvent: TouchEvent;\n}\n\nexport class TouchListener implements IEventEmitter {\n\n public static EVENT_TAP = \"tap\";\n public static EVENT_DOUBLE_TAP = \"doubleTap\";\n public static EVENT_LONG_TAP = \"longTap\";\n\n private static DOUBLE_TAP_MILLIS = 500;\n\n private eElement: HTMLElement;\n\n private destroyFuncs: Function[] = [];\n\n private moved: boolean;\n\n private touching = false;\n private touchStart: Touch;\n\n private lastTapTime: number | null;\n\n private eventService: EventService = new EventService();\n\n // private mostRecentTouch: Touch;\n\n private preventMouseClick: boolean;\n\n constructor(eElement: HTMLElement, preventMouseClick = false) {\n this.eElement = eElement;\n this.preventMouseClick = preventMouseClick;\n\n const startListener = this.onTouchStart.bind(this);\n const moveListener = this.onTouchMove.bind(this);\n const endListener = this.onTouchEnd.bind(this);\n\n this.eElement.addEventListener(\"touchstart\", startListener, { passive: true } as any);\n this.eElement.addEventListener(\"touchmove\", moveListener, { passive: true } as any);\n // we set passive=false, as we want to prevent default on this event\n this.eElement.addEventListener(\"touchend\", endListener, { passive: false } as any);\n\n this.destroyFuncs.push(() => {\n this.eElement.removeEventListener(\"touchstart\", startListener, { passive: true } as any);\n this.eElement.removeEventListener(\"touchmove\", moveListener, { passive: true } as any);\n this.eElement.removeEventListener(\"touchend\", endListener, { passive: false } as any);\n });\n }\n\n private getActiveTouch(touchList: TouchList): Touch | null {\n for (let i = 0; i < touchList.length; i++) {\n const matches = touchList[i].identifier === this.touchStart.identifier;\n if (matches) {\n return touchList[i];\n }\n }\n\n return null;\n }\n\n public addEventListener(eventType: string, listener: Function): void {\n this.eventService.addEventListener(eventType, listener);\n }\n\n public removeEventListener(eventType: string, listener: Function): void {\n this.eventService.removeEventListener(eventType, listener);\n }\n\n private onTouchStart(touchEvent: TouchEvent): void {\n // only looking at one touch point at any time\n if (this.touching) {\n return;\n }\n\n this.touchStart = touchEvent.touches[0];\n this.touching = true;\n\n this.moved = false;\n\n const touchStartCopy = this.touchStart;\n\n window.setTimeout(() => {\n const touchesMatch = this.touchStart === touchStartCopy;\n\n if (this.touching && touchesMatch && !this.moved) {\n this.moved = true;\n const event: LongTapEvent = {\n type: TouchListener.EVENT_LONG_TAP,\n touchStart: this.touchStart,\n touchEvent: touchEvent\n };\n this.eventService.dispatchEvent(event);\n }\n }, 500);\n }\n\n private onTouchMove(touchEvent: TouchEvent): void {\n if (!this.touching) {\n return;\n }\n\n const touch = this.getActiveTouch(touchEvent.touches);\n if (!touch) {\n return;\n }\n\n const eventIsFarAway = !areEventsNear(touch, this.touchStart, 4);\n if (eventIsFarAway) {\n this.moved = true;\n }\n }\n\n private onTouchEnd(touchEvent: TouchEvent): void {\n if (!this.touching) {\n return;\n }\n\n if (!this.moved) {\n const event: TapEvent = {\n type: TouchListener.EVENT_TAP,\n touchStart: this.touchStart\n };\n this.eventService.dispatchEvent(event);\n this.checkForDoubleTap();\n }\n\n // stops the tap from also been processed as a mouse click\n if (this.preventMouseClick) {\n touchEvent.preventDefault();\n }\n\n this.touching = false;\n }\n\n private checkForDoubleTap(): void {\n const now = new Date().getTime();\n\n if (this.lastTapTime && this.lastTapTime > 0) {\n // if previous tap, see if duration is short enough to be considered double tap\n const interval = now - this.lastTapTime;\n if (interval > TouchListener.DOUBLE_TAP_MILLIS) {\n // dispatch double tap event\n const event: TapEvent = {\n type: TouchListener.EVENT_DOUBLE_TAP,\n touchStart: this.touchStart\n };\n this.eventService.dispatchEvent(event);\n\n // this stops a tripple tap ending up as two double taps\n this.lastTapTime = null;\n } else {\n this.lastTapTime = now;\n }\n } else {\n this.lastTapTime = now;\n }\n }\n\n public destroy(): void {\n this.destroyFuncs.forEach(func => func());\n }\n}","import { Autowired } from \"../../../context/context\";\nimport { Column } from \"../../../entities/column\";\nimport { Events } from \"../../../events\";\nimport { IComponent } from \"../../../interfaces/iComponent\";\nimport { IMenuFactory } from \"../../../interfaces/iMenuFactory\";\nimport { AgGridCommon } from \"../../../interfaces/iCommon\";\nimport { SortController } from \"../../../sortController\";\nimport { firstExistingValue } from \"../../../utils/array\";\nimport { isIOSUserAgent } from \"../../../utils/browser\";\nimport { clearElement, removeFromParent, setDisplayed } from \"../../../utils/dom\";\nimport { exists } from \"../../../utils/generic\";\nimport { createIconNoSpan } from \"../../../utils/icon\";\nimport { escapeString } from \"../../../utils/string\";\nimport { Component } from \"../../../widgets/component\";\nimport { RefSelector } from \"../../../widgets/componentAnnotations\";\nimport { LongTapEvent, TapEvent, TouchListener } from \"../../../widgets/touchListener\";\n\nexport interface IHeaderParams extends AgGridCommon {\n /** The column the header is for. */\n column: Column;\n /**\n * The name to display for the column.\n * If the column is using a headerValueGetter, the displayName will take this into account.\n */\n displayName: string;\n /**\n * Whether sorting is enabled for the column.\n * Only put sort logic into your header if this is true.\n */\n enableSorting: boolean | undefined;\n /**\n * Whether menu is enabled for the column.\n * Only display a menu button in your header if this is true.\n */\n enableMenu: boolean;\n /**\n * Callback to request the grid to show the column menu.\n * Pass in the html element of the column menu to have the\n * grid position the menu over the button.\n */\n showColumnMenu: (source: HTMLElement) => void;\n /**\n * Callback to progress the sort for this column.\n * The grid will decide the next sort direction eg ascending, descending or 'no sort'.\n * Pass `multiSort=true` if you want to do a multi sort (eg user has Shift held down when they click).\n */\n progressSort: (multiSort?: boolean) => void;\n /**\n * Callback to set the sort for this column.\n * Pass the sort direction to use ignoring the current sort eg one of 'asc', 'desc' or null (for no sort).\n * Pass `multiSort=true` if you want to do a multi sort (eg user has Shift held down when they click)\n */\n setSort: (sort: 'asc' | 'desc' | null, multiSort?: boolean) => void;\n\n /** Custom header template if provided to `headerComponentParams`, otherwise will be `undefined`. See [Header Templates](https://ag-grid.com/javascript-data-grid/column-headers/#header-templates) */\n template?: string;\n /**\n * The header the grid provides.\n * The custom header component is a child of the grid provided header.\n * The grid's header component is what contains the grid managed functionality such as resizing, keyboard navigation etc.\n * This is provided should you want to make changes to this cell,\n * eg add ARIA tags, or add keyboard event listener (as focus goes here when navigating to the header).\n */\n eGridHeader: HTMLElement;\n}\n\nexport interface IHeader {\n /** Get the header to refresh. Gets called whenever Column Defs are updated. */\n refresh(params: IHeaderParams): boolean;\n}\n\nexport interface IHeaderComp extends IHeader, IComponent { }\n\nexport class HeaderComp extends Component implements IHeaderComp {\n\n private static TEMPLATE = /* html */\n `
\n \n
\n \n \n \n \n \n \n
\n
`;\n\n @Autowired('sortController') private sortController: SortController;\n @Autowired('menuFactory') private menuFactory: IMenuFactory;\n\n @RefSelector('eFilter') private eFilter: HTMLElement;\n @RefSelector('eSortAsc') private eSortAsc: HTMLElement;\n\n @RefSelector('eSortDesc') private eSortDesc: HTMLElement;\n @RefSelector('eSortNone') private eSortNone: HTMLElement;\n @RefSelector('eSortOrder') private eSortOrder: HTMLElement;\n @RefSelector('eMenu') private eMenu: HTMLElement;\n @RefSelector('eLabel') private eLabel: HTMLElement;\n @RefSelector('eText') private eText: HTMLElement;\n\n private params: IHeaderParams;\n\n private lastMovingChanged = 0;\n\n private currentDisplayName: string;\n private currentTemplate: string | null | undefined;\n private currentShowMenu: boolean;\n private currentSort: boolean | undefined;\n\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n public destroy(): void {\n super.destroy();\n }\n\n public refresh(params: IHeaderParams): boolean {\n\n this.params = params;\n\n // if template changed, then recreate the whole comp, the code required to manage\n // a changing template is to difficult for what it's worth.\n if (this.workOutTemplate() != this.currentTemplate) { return false; }\n if (this.workOutShowMenu() != this.currentShowMenu) { return false; }\n if (this.workOutSort() != this.currentSort) { return false; }\n\n this.setDisplayName(params);\n\n return true;\n }\n\n private workOutTemplate(): string | null | undefined {\n let template: string | null | undefined = firstExistingValue(\n this.params.template,\n HeaderComp.TEMPLATE\n );\n\n // take account of any newlines & whitespace before/after the actual template\n template = template && template.trim ? template.trim() : template;\n return template;\n }\n\n public init(params: IHeaderParams): void {\n this.params = params;\n\n this.currentTemplate = this.workOutTemplate();\n this.setTemplate(this.currentTemplate);\n this.setupTap();\n this.setupIcons(params.column);\n this.setMenu();\n this.setupSort();\n this.setupFilterIcon();\n this.setDisplayName(params);\n }\n\n private setDisplayName(params: IHeaderParams): void {\n if (this.currentDisplayName != params.displayName) {\n this.currentDisplayName = params.displayName;\n const displayNameSanitised = escapeString(this.currentDisplayName);\n if (this.eText) {\n this.eText.innerHTML = displayNameSanitised!;\n }\n }\n }\n\n private setupIcons(column: Column): void {\n this.addInIcon('sortAscending', this.eSortAsc, column);\n this.addInIcon('sortDescending', this.eSortDesc, column);\n this.addInIcon('sortUnSort', this.eSortNone, column);\n this.addInIcon('menu', this.eMenu, column);\n this.addInIcon('filter', this.eFilter, column);\n }\n\n private addInIcon(iconName: string, eParent: HTMLElement, column: Column): void {\n if (eParent == null) { return; }\n\n const eIcon = createIconNoSpan(iconName, this.gridOptionsWrapper, column);\n if (eIcon) {\n eParent.appendChild(eIcon);\n }\n }\n\n private setupTap(): void {\n const { gridOptionsWrapper: options } = this;\n\n if (options.isSuppressTouch()) { return; }\n\n const touchListener = new TouchListener(this.getGui(), true);\n const suppressMenuHide = options.isSuppressMenuHide();\n const tapMenuButton = suppressMenuHide && exists(this.eMenu);\n const menuTouchListener = tapMenuButton ? new TouchListener(this.eMenu, true) : touchListener;\n\n if (this.params.enableMenu) {\n const eventType = tapMenuButton ? 'EVENT_TAP' : 'EVENT_LONG_TAP';\n const showMenuFn = (event: TapEvent | LongTapEvent) => {\n options.getApi()!.showColumnMenuAfterMouseClick(this.params.column, event.touchStart);\n };\n this.addManagedListener(menuTouchListener, TouchListener[eventType], showMenuFn);\n }\n\n if (this.params.enableSorting) {\n const tapListener = (event: TapEvent) => {\n const target = event.touchStart.target as HTMLElement;\n // When suppressMenuHide is true, a tap on the menu icon will bubble up\n // to the header container, in that case we should not sort\n if (suppressMenuHide && this.eMenu.contains(target)) { return; }\n\n this.sortController.progressSort(this.params.column, false, \"uiColumnSorted\");\n };\n\n this.addManagedListener(touchListener, TouchListener.EVENT_TAP, tapListener);\n }\n\n // if tapMenuButton is true `touchListener` and `menuTouchListener` are different\n // so we need to make sure to destroy both listeners here\n this.addDestroyFunc(() => touchListener.destroy());\n\n if (tapMenuButton) {\n this.addDestroyFunc(() => menuTouchListener.destroy());\n }\n }\n\n private workOutShowMenu(): boolean {\n // we don't show the menu if on an iPad/iPhone, as the user cannot have a pointer device/\n // However if suppressMenuHide is set to true the menu will be displayed alwasys, so it's ok\n // to show it on iPad in this case (as hover isn't needed). If suppressMenuHide\n // is false (default) user will need to use longpress to display the menu.\n const menuHides = !this.gridOptionsWrapper.isSuppressMenuHide();\n\n const onIpadAndMenuHides = isIOSUserAgent() && menuHides;\n const showMenu = this.params.enableMenu && !onIpadAndMenuHides;\n\n return showMenu;\n }\n\n private setMenu(): void {\n // if no menu provided in template, do nothing\n if (!this.eMenu) {\n return;\n }\n\n this.currentShowMenu = this.workOutShowMenu();\n if (!this.currentShowMenu) {\n removeFromParent(this.eMenu);\n return;\n }\n\n const suppressMenuHide = this.gridOptionsWrapper.isSuppressMenuHide();\n this.addManagedListener(this.eMenu, 'click', () => this.showMenu(this.eMenu));\n this.eMenu.classList.toggle('ag-header-menu-always-show', suppressMenuHide);\n }\n\n public showMenu(eventSource?: HTMLElement) {\n if (!eventSource) {\n eventSource = this.eMenu;\n }\n\n this.menuFactory.showMenuAfterButtonClick(this.params.column, eventSource, 'columnMenu');\n }\n\n private removeSortIcons(): void {\n removeFromParent(this.eSortAsc);\n removeFromParent(this.eSortDesc);\n removeFromParent(this.eSortNone);\n removeFromParent(this.eSortOrder);\n }\n\n private workOutSort(): boolean | undefined {\n return this.params.enableSorting;\n }\n\n public setupSort(): void {\n this.currentSort = this.params.enableSorting;\n\n if (!this.currentSort) {\n this.removeSortIcons();\n return;\n }\n\n const sortUsingCtrl = this.gridOptionsWrapper.isMultiSortKeyCtrl();\n\n // keep track of last time the moving changed flag was set\n this.addManagedListener(this.params.column, Column.EVENT_MOVING_CHANGED, () => {\n this.lastMovingChanged = new Date().getTime();\n });\n\n // add the event on the header, so when clicked, we do sorting\n if (this.eLabel) {\n this.addManagedListener(this.eLabel, 'click', (event: MouseEvent) => {\n\n // sometimes when moving a column via dragging, this was also firing a clicked event.\n // here is issue raised by user: https://ag-grid.zendesk.com/agent/tickets/1076\n // this check stops sort if a) column is moving or b) column moved less than 200ms ago (so caters for race condition)\n const moving = this.params.column.isMoving();\n const nowTime = new Date().getTime();\n // typically there is <2ms if moving flag was set recently, as it would be done in same VM turn\n const movedRecently = (nowTime - this.lastMovingChanged) < 50;\n const columnMoving = moving || movedRecently;\n\n if (!columnMoving) {\n const multiSort = sortUsingCtrl ? (event.ctrlKey || event.metaKey) : event.shiftKey;\n this.params.progressSort(multiSort);\n }\n });\n }\n\n this.addManagedListener(this.params.column, Column.EVENT_SORT_CHANGED, this.onSortChanged.bind(this));\n this.onSortChanged();\n\n this.addManagedListener(this.eventService, Events.EVENT_SORT_CHANGED, this.setMultiSortOrder.bind(this));\n this.setMultiSortOrder();\n }\n\n private onSortChanged(): void {\n this.addOrRemoveCssClass('ag-header-cell-sorted-asc', this.params.column.isSortAscending());\n this.addOrRemoveCssClass('ag-header-cell-sorted-desc', this.params.column.isSortDescending());\n this.addOrRemoveCssClass('ag-header-cell-sorted-none', this.params.column.isSortNone());\n\n if (this.eSortAsc) {\n this.eSortAsc.classList.toggle('ag-hidden', !this.params.column.isSortAscending());\n }\n\n if (this.eSortDesc) {\n this.eSortDesc.classList.toggle('ag-hidden', !this.params.column.isSortDescending());\n }\n\n if (this.eSortNone) {\n const alwaysHideNoSort = !this.params.column.getColDef().unSortIcon && !this.gridOptionsWrapper.isUnSortIcon();\n this.eSortNone.classList.toggle('ag-hidden', alwaysHideNoSort || !this.params.column.isSortNone());\n }\n }\n\n // we listen here for global sort events, NOT column sort events, as we want to do this\n // when sorting has been set on all column (if we listened just for our col (where we\n // set the asc / desc icons) then it's possible other cols are yet to get their sorting state.\n private setMultiSortOrder(): void {\n\n if (!this.eSortOrder) { return; }\n\n const col = this.params.column;\n const allColumnsWithSorting = this.sortController.getColumnsWithSortingOrdered();\n const indexThisCol = allColumnsWithSorting.indexOf(col);\n const moreThanOneColSorting = allColumnsWithSorting.length > 1;\n const showIndex = col.isSorting() && moreThanOneColSorting;\n\n setDisplayed(this.eSortOrder, showIndex);\n\n if (indexThisCol >= 0) {\n this.eSortOrder.innerHTML = (indexThisCol + 1).toString();\n } else {\n clearElement(this.eSortOrder);\n }\n }\n\n private setupFilterIcon(): void {\n\n if (!this.eFilter) { return; }\n\n this.addManagedListener(this.params.column, Column.EVENT_FILTER_CHANGED, this.onFilterChanged.bind(this));\n this.onFilterChanged();\n }\n\n private onFilterChanged(): void {\n const filterPresent = this.params.column.isFilterActive();\n this.eFilter.classList.toggle('ag-hidden', !filterPresent);\n }\n}\n","import { ColumnModel } from \"../../../columns/columnModel\";\nimport { Autowired } from \"../../../context/context\";\nimport { ColumnGroup } from \"../../../entities/columnGroup\";\nimport { ProvidedColumnGroup } from \"../../../entities/providedColumnGroup\";\nimport { IComponent } from \"../../../interfaces/iComponent\";\nimport { AgGridCommon } from \"../../../interfaces/iCommon\";\nimport { setDisplayed } from \"../../../utils/dom\";\nimport { isStopPropagationForAgGrid, stopPropagationForAgGrid } from \"../../../utils/event\";\nimport { doOnce } from \"../../../utils/function\";\nimport { exists } from \"../../../utils/generic\";\nimport { createIconNoSpan } from \"../../../utils/icon\";\nimport { escapeString } from \"../../../utils/string\";\nimport { Component } from \"../../../widgets/component\";\nimport { RefSelector } from \"../../../widgets/componentAnnotations\";\nimport { TouchListener } from \"../../../widgets/touchListener\";\n\nexport interface IHeaderGroupParams extends AgGridCommon {\n /** The column group the header is for. */\n columnGroup: ColumnGroup;\n /**\n * The text label to render.\n * If the column is using a headerValueGetter, the displayName will take this into account.\n */\n displayName: string;\n /** Opens / closes the column group */\n setExpanded: (expanded: boolean) => void;\n}\n\nexport interface IHeaderGroup { }\n\nexport interface IHeaderGroupComp extends IHeaderGroup, IComponent { }\n\nexport class HeaderGroupComp extends Component implements IHeaderGroupComp {\n\n @Autowired(\"columnModel\") private columnModel: ColumnModel;\n\n static TEMPLATE = /* html */\n `
\n \n \n \n
`;\n\n private params: IHeaderGroupParams;\n\n @RefSelector(\"agOpened\") private eOpenIcon: HTMLElement;\n @RefSelector(\"agClosed\") private eCloseIcon: HTMLElement;\n\n constructor() {\n super(HeaderGroupComp.TEMPLATE);\n }\n\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n public destroy(): void {\n super.destroy();\n }\n\n public init(params: IHeaderGroupParams): void {\n this.params = params;\n\n this.checkWarnings();\n\n this.setupLabel();\n this.addGroupExpandIcon();\n this.setupExpandIcons();\n }\n\n private checkWarnings(): void {\n const paramsAny = this.params as any;\n\n if (paramsAny.template) {\n const message = `AG Grid: A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)`;\n doOnce(() => console.warn(message), 'HeaderGroupComp.templateNotSupported');\n }\n }\n\n private setupExpandIcons(): void {\n this.addInIcon(\"columnGroupOpened\", \"agOpened\");\n this.addInIcon(\"columnGroupClosed\", \"agClosed\");\n\n const expandAction = (event: MouseEvent) => {\n if (isStopPropagationForAgGrid(event)) {\n return;\n }\n\n const newExpandedValue = !this.params.columnGroup.isExpanded();\n this.columnModel.setColumnGroupOpened(this.params.columnGroup.getProvidedColumnGroup(), newExpandedValue, \"uiColumnExpanded\");\n };\n\n this.addTouchAndClickListeners(this.eCloseIcon, expandAction);\n this.addTouchAndClickListeners(this.eOpenIcon, expandAction);\n\n const stopPropagationAction = (event: MouseEvent) => {\n stopPropagationForAgGrid(event);\n };\n\n // adding stopPropagation to the double click for the icons prevents double click action happening\n // when the icons are clicked. if the icons are double clicked, then the groups should open and\n // then close again straight away. if we also listened to double click, then the group would open,\n // close, then open, which is not what we want. double click should only action if the user double\n // clicks outside of the icons.\n this.addManagedListener(this.eCloseIcon, \"dblclick\", stopPropagationAction);\n this.addManagedListener(this.eOpenIcon, \"dblclick\", stopPropagationAction);\n\n this.addManagedListener(this.getGui(), \"dblclick\", expandAction);\n\n this.updateIconVisibility();\n\n const providedColumnGroup = this.params.columnGroup.getProvidedColumnGroup();\n this.addManagedListener(providedColumnGroup, ProvidedColumnGroup.EVENT_EXPANDED_CHANGED, this.updateIconVisibility.bind(this));\n this.addManagedListener(providedColumnGroup, ProvidedColumnGroup.EVENT_EXPANDABLE_CHANGED, this.updateIconVisibility.bind(this));\n }\n\n private addTouchAndClickListeners(eElement: HTMLElement, action: (event: MouseEvent) => void): void {\n const touchListener = new TouchListener(eElement, true);\n\n this.addManagedListener(touchListener, TouchListener.EVENT_TAP, action);\n this.addDestroyFunc(() => touchListener.destroy());\n this.addManagedListener(eElement, \"click\", action);\n }\n\n private updateIconVisibility(): void {\n const columnGroup = this.params.columnGroup;\n if (columnGroup.isExpandable()) {\n const expanded = this.params.columnGroup.isExpanded();\n setDisplayed(this.eOpenIcon, expanded);\n setDisplayed(this.eCloseIcon, !expanded);\n } else {\n setDisplayed(this.eOpenIcon, false);\n setDisplayed(this.eCloseIcon, false);\n }\n }\n\n private addInIcon(iconName: string, refName: string): void {\n const eIcon = createIconNoSpan(iconName, this.gridOptionsWrapper, null);\n if (eIcon) {\n this.getRefElement(refName).appendChild(eIcon);\n }\n }\n\n private addGroupExpandIcon() {\n if (!this.params.columnGroup.isExpandable()) {\n setDisplayed(this.eOpenIcon, false);\n setDisplayed(this.eCloseIcon, false);\n return;\n }\n }\n\n private setupLabel(): void {\n // no renderer, default text render\n const displayName = this.params.displayName;\n\n if (exists(displayName)) {\n const displayNameSanitised = escapeString(displayName);\n this.getRefElement('agLabel').innerHTML = displayNameSanitised!;\n }\n }\n}\n","import { Component } from \"./component\";\nimport { IPopupComponent } from \"../interfaces/iPopupComponent\";\n\nexport class PopupComponent extends Component implements IPopupComponent {\n\n public isPopup(): boolean {\n return true;\n }\n\n setParentComponent(container: Component) {\n container.addCssClass('ag-has-popup');\n super.setParentComponent(container);\n }\n\n public destroy(): void {\n const parentComp = this.parentComponent;\n const hasParent = parentComp && parentComp.isAlive();\n\n if (hasParent) {\n parentComp!.getGui().classList.remove('ag-has-popup');\n }\n\n super.destroy();\n }\n}\n","import { AgInputTextArea } from \"../../widgets/agInputTextArea\";\nimport { ICellEditorComp, ICellEditorParams } from \"../../interfaces/iCellEditor\";\nimport { PopupComponent } from \"../../widgets/popupComponent\";\nimport { RefSelector } from \"../../widgets/componentAnnotations\";\nimport { exists } from \"../../utils/generic\";\nimport { KeyCode } from '../../constants/keyCode';\n\nexport interface ILargeTextEditorParams extends ICellEditorParams {\n maxLength: number;\n rows: number;\n cols: number;\n}\n\nexport class LargeTextCellEditor extends PopupComponent implements ICellEditorComp {\n private static TEMPLATE = /* html */\n `
\n \n
`;\n\n private params: ILargeTextEditorParams;\n @RefSelector(\"eTextArea\") private eTextArea: AgInputTextArea;\n private focusAfterAttached: boolean;\n\n constructor() {\n super(LargeTextCellEditor.TEMPLATE);\n }\n\n public init(params: ILargeTextEditorParams): void {\n this.params = params;\n\n this.focusAfterAttached = params.cellStartedEdit;\n\n this.eTextArea\n .setMaxLength(params.maxLength || 200)\n .setCols(params.cols || 60)\n .setRows(params.rows || 10);\n\n if (exists(params.value)) {\n this.eTextArea.setValue(params.value.toString(), true);\n }\n\n this.addGuiEventListener('keydown', this.onKeyDown.bind(this));\n }\n\n private onKeyDown(event: KeyboardEvent): void {\n const key = event.key;\n\n if (key === KeyCode.LEFT ||\n key === KeyCode.UP ||\n key === KeyCode.RIGHT ||\n key === KeyCode.DOWN ||\n (event.shiftKey && key === KeyCode.ENTER)) { // shift+enter allows for newlines\n event.stopPropagation();\n }\n }\n\n public afterGuiAttached(): void {\n const translate = this.gridOptionsWrapper.getLocaleTextFunc();\n\n this.eTextArea.setInputAriaLabel(translate('ariaInputEditor', 'Input Editor'));\n\n if (this.focusAfterAttached) {\n this.eTextArea.getFocusableElement().focus();\n }\n }\n\n public getValue(): any {\n return this.params.parseValue(this.eTextArea.getValue());\n }\n}\n","import { AgSelect } from \"../../widgets/agSelect\";\nimport { Autowired } from \"../../context/context\";\nimport { ICellEditorComp, ICellEditorParams } from \"../../interfaces/iCellEditor\";\nimport { ValueFormatterService } from \"../valueFormatterService\";\nimport { PopupComponent } from \"../../widgets/popupComponent\";\nimport { RefSelector } from \"../../widgets/componentAnnotations\";\nimport { ListOption } from \"../../widgets/agList\";\nimport { missing } from \"../../utils/generic\";\nimport { KeyCode } from '../../constants/keyCode';\n\nexport interface ISelectCellEditorParams extends ICellEditorParams {\n values: any[];\n}\n\nexport class SelectCellEditor extends PopupComponent implements ICellEditorComp {\n\n private focusAfterAttached: boolean;\n\n @Autowired('valueFormatterService') private valueFormatterService: ValueFormatterService;\n @RefSelector('eSelect') private eSelect: AgSelect;\n\n private startedByEnter: boolean = false;\n\n constructor() {\n super('
');\n }\n\n public init(params: ISelectCellEditorParams): void {\n this.focusAfterAttached = params.cellStartedEdit;\n\n if (missing(params.values)) {\n console.warn('AG Grid: no values found for select cellEditor');\n return;\n }\n\n this.startedByEnter = params.eventKey != null ? params.eventKey === KeyCode.ENTER : false;\n\n let hasValue = false;\n params.values.forEach((value: any) => {\n const option: ListOption = { value };\n const valueFormatted = this.valueFormatterService.formatValue(params.column, null, null, value);\n const valueFormattedExits = valueFormatted !== null && valueFormatted !== undefined;\n option.text = valueFormattedExits ? valueFormatted : value;\n\n this.eSelect.addOption(option);\n hasValue = hasValue || params.value === value;\n });\n\n if (hasValue) {\n this.eSelect.setValue(params.value, true);\n } else if (params.values.length) {\n this.eSelect.setValue(params.values[0], true);\n }\n\n // we don't want to add this if full row editing, otherwise selecting will stop the\n // full row editing.\n if (!this.gridOptionsWrapper.isFullRowEdit()) {\n this.eSelect.onValueChange(() => params.stopEditing());\n }\n }\n\n public afterGuiAttached() {\n if (this.focusAfterAttached) {\n this.eSelect.getFocusableElement().focus();\n }\n\n if (this.startedByEnter) {\n this.eSelect.showPicker();\n }\n }\n\n public focusIn(): void {\n this.eSelect.getFocusableElement().focus();\n }\n\n public getValue(): any {\n return this.eSelect.getValue();\n }\n\n public isPopup() {\n return false;\n }\n}","import { doOnce } from \"../../utils/function\";\nimport { SelectCellEditor } from \"./selectCellEditor\";\n\nexport class PopupSelectCellEditor extends SelectCellEditor {\n\n constructor() {\n super();\n doOnce( ()=> console.warn('AG Grid: The PopupSelectCellEditor (agPopupSelectCellEditor) is deprecated. Instead use {cellEditor: \"agSelectCellEditor\", cellEditorPopup: true} '), 'PopupSelectCellEditor.deprecated');\n }\n\n public isPopup(): boolean {\n return true;\n }\n\n}\n","import { PopupComponent } from \"../../widgets/popupComponent\";\nimport { ICellEditorComp, ICellEditorParams } from \"../../interfaces/iCellEditor\";\nimport { AgInputTextField } from \"../../widgets/agInputTextField\";\nimport { RefSelector } from \"../../widgets/componentAnnotations\";\nimport { exists } from \"../../utils/generic\";\nimport { isBrowserSafari } from \"../../utils/browser\";\nimport { KeyCode } from '../../constants/keyCode';\n\n/**\n * useFormatter: used when the cell value needs formatting prior to editing, such as when using reference data and you\n * want to display text rather than code.\n*/\nexport interface ITextCellEditorParams extends ICellEditorParams {\n useFormatter: boolean;\n}\n\nexport class TextCellEditor extends PopupComponent implements ICellEditorComp {\n\n private static TEMPLATE = '
';\n\n private highlightAllOnFocus: boolean;\n private focusAfterAttached: boolean;\n protected params: ICellEditorParams;\n @RefSelector('eInput') protected eInput: AgInputTextField;\n\n constructor() {\n super(TextCellEditor.TEMPLATE);\n }\n\n public init(params: ITextCellEditorParams): void {\n this.params = params;\n\n const eInput = this.eInput;\n let startValue: string;\n\n // cellStartedEdit is only false if we are doing fullRow editing\n if (params.cellStartedEdit) {\n this.focusAfterAttached = true;\n\n if (params.eventKey === KeyCode.BACKSPACE || params.eventKey === KeyCode.DELETE) {\n startValue = '';\n } else if (params.charPress) {\n startValue = params.charPress;\n } else {\n startValue = this.getStartValue(params);\n\n if (params.eventKey !== KeyCode.F2) {\n this.highlightAllOnFocus = true;\n }\n }\n\n } else {\n this.focusAfterAttached = false;\n startValue = this.getStartValue(params);\n }\n\n if (startValue != null) {\n eInput.setValue(startValue, true);\n }\n\n this.addManagedListener(eInput.getGui(), 'keydown', (event: KeyboardEvent) => {\n const { key } = event;\n\n if (key === KeyCode.PAGE_UP || key === KeyCode.PAGE_DOWN) {\n event.preventDefault();\n }\n });\n }\n\n public afterGuiAttached(): void {\n const translate = this.gridOptionsWrapper.getLocaleTextFunc();\n const eInput = this.eInput;\n\n eInput.setInputAriaLabel(translate('ariaInputEditor', 'Input Editor'));\n\n if (!this.focusAfterAttached) { return; }\n // Added for AG-3238. We can't remove this explicit focus() because Chrome requires an input\n // to be focused before setSelectionRange will work. But it triggers a bug in Safari where\n // explicitly focusing then blurring an empty field will cause the parent container to scroll.\n if (!isBrowserSafari()) {\n eInput.getFocusableElement().focus();\n }\n\n const inputEl = eInput.getInputElement();\n\n if (this.highlightAllOnFocus) {\n inputEl.select();\n } else {\n // when we started editing, we want the caret at the end, not the start.\n // this comes into play in two scenarios:\n // a) when user hits F2\n // b) when user hits a printable character\n const value = eInput.getValue();\n const len = (exists(value) && value.length) || 0;\n\n if (len) {\n inputEl.setSelectionRange(len, len);\n }\n }\n }\n\n // gets called when tabbing trough cells and in full row edit mode\n public focusIn(): void {\n const eInput = this.eInput;\n const focusEl = eInput.getFocusableElement();\n const inputEl = eInput.getInputElement();\n\n focusEl.focus();\n inputEl.select();\n }\n\n public getValue(): any {\n const eInput = this.eInput;\n return this.params.parseValue(eInput.getValue());\n }\n\n private getStartValue(params: ITextCellEditorParams) {\n const formatValue = params.useFormatter || params.column.getColDef().refData;\n return formatValue ? params.formatValue(params.value) : params.value;\n }\n public isPopup() {\n return false;\n }\n}\n","import { doOnce } from \"../../utils/function\";\nimport { TextCellEditor } from \"./textCellEditor\";\n\nexport class PopupTextCellEditor extends TextCellEditor {\n\n constructor() {\n super();\n doOnce( ()=> console.warn('AG Grid: The PopupTextCellEditor (agPopupTextCellEditor) is deprecated. Instead use {cellEditor: \"agTextCellEditor\", cellEditorPopup: true} '), 'PopupTextCellEditor.deprecated');\n }\n\n public isPopup(): boolean {\n return true;\n }\n\n}\n","import { Autowired } from \"../../context/context\";\nimport { ICellRenderer } from \"./iCellRenderer\";\nimport { Component } from \"../../widgets/component\";\nimport { FilterManager } from \"../../filter/filterManager\";\nimport { exists } from \"../../utils/generic\";\nimport { clearElement } from \"../../utils/dom\";\n\nconst ARROW_UP = '\\u2191';\nconst ARROW_DOWN = '\\u2193';\n\nexport class AnimateShowChangeCellRenderer extends Component implements ICellRenderer {\n\n private static TEMPLATE =\n '' +\n '' +\n '' +\n '';\n\n // private params: any;\n private lastValue: number;\n\n private eValue: HTMLElement;\n private eDelta: HTMLElement;\n\n private refreshCount = 0;\n\n @Autowired('filterManager') private filterManager: FilterManager;\n\n constructor() {\n super(AnimateShowChangeCellRenderer.TEMPLATE);\n }\n\n public init(params: any): void {\n // this.params = params;\n\n this.eValue = this.queryForHtmlElement('.ag-value-change-value');\n this.eDelta = this.queryForHtmlElement('.ag-value-change-delta');\n\n this.refresh(params);\n }\n\n private showDelta(params: any, delta: number): void {\n\n const absDelta = Math.abs(delta);\n const valueFormatted = params.formatValue(absDelta);\n\n const valueToUse = exists(valueFormatted) ? valueFormatted : absDelta;\n\n const deltaUp = (delta >= 0);\n\n if (deltaUp) {\n this.eDelta.innerHTML = ARROW_UP + valueToUse;\n } else {\n // because negative, use ABS to remove sign\n this.eDelta.innerHTML = ARROW_DOWN + valueToUse;\n }\n\n this.eDelta.classList.toggle('ag-value-change-delta-up', deltaUp);\n this.eDelta.classList.toggle('ag-value-change-delta-down', !deltaUp);\n }\n\n private setTimerToRemoveDelta(): void {\n // the refreshCount makes sure that if the value updates again while\n // the below timer is waiting, then the below timer will realise it\n // is not the most recent and will not try to remove the delta value.\n this.refreshCount++;\n const refreshCountCopy = this.refreshCount;\n window.setTimeout(() => {\n if (refreshCountCopy === this.refreshCount) {\n this.hideDeltaValue();\n }\n }, 2000);\n }\n\n private hideDeltaValue(): void {\n this.eValue.classList.remove('ag-value-change-value-highlight');\n clearElement(this.eDelta);\n }\n\n public refresh(params: any): boolean {\n const value = params.value;\n\n if (value === this.lastValue) {\n return false;\n }\n\n if (exists(params.valueFormatted)) {\n this.eValue.innerHTML = params.valueFormatted;\n } else if (exists(params.value)) {\n this.eValue.innerHTML = value;\n } else {\n clearElement(this.eValue);\n }\n\n // we don't show the delta if we are in the middle of a filter. see comment on FilterManager\n // with regards processingFilterChange\n if (this.filterManager.isSuppressFlashingCellsBecauseFiltering()) {\n return false;\n }\n\n if (typeof value === 'number' && typeof this.lastValue === 'number') {\n const delta = value - this.lastValue;\n this.showDelta(params, delta);\n }\n\n // highlight the current value, but only if it's not new, otherwise it\n // would get highlighted first time the value is shown\n if (this.lastValue) {\n this.eValue.classList.add('ag-value-change-value-highlight');\n }\n\n this.setTimerToRemoveDelta();\n\n this.lastValue = value;\n\n return true;\n }\n}\n","import { Autowired } from \"../../context/context\";\nimport { ICellRenderer } from \"./iCellRenderer\";\nimport { Component } from \"../../widgets/component\";\nimport { FilterManager } from \"../../filter/filterManager\";\nimport { loadTemplate, clearElement } from \"../../utils/dom\";\nimport { missing, exists } from \"../../utils/generic\";\n\nexport class AnimateSlideCellRenderer extends Component implements ICellRenderer {\n\n private static TEMPLATE = /* html */\n `\n \n `;\n\n private eCurrent: HTMLElement;\n private ePrevious: HTMLElement | null;\n\n private lastValue: any;\n\n private refreshCount = 0;\n\n @Autowired('filterManager') private filterManager: FilterManager;\n\n constructor() {\n super(AnimateSlideCellRenderer.TEMPLATE);\n this.eCurrent = this.queryForHtmlElement('.ag-value-slide-current');\n }\n\n public init(params: any): void {\n this.refresh(params);\n }\n\n public addSlideAnimation(): void {\n this.refreshCount++;\n\n // below we keep checking this, and stop working on the animation\n // if it no longer matches - this means another animation has started\n // and this one is stale.\n const refreshCountCopy = this.refreshCount;\n\n // if old animation, remove it\n if (this.ePrevious) {\n this.getGui().removeChild(this.ePrevious);\n }\n\n this.ePrevious = loadTemplate('');\n this.ePrevious.innerHTML = this.eCurrent.innerHTML;\n this.getGui().insertBefore(this.ePrevious, this.eCurrent);\n\n // having timeout of 0 allows use to skip to the next css turn,\n // so we know the previous css classes have been applied. so the\n // complex set of setTimeout below creates the animation\n window.setTimeout(() => {\n if (refreshCountCopy !== this.refreshCount) { return; }\n this.ePrevious!.classList.add('ag-value-slide-out-end');\n }, 50);\n\n window.setTimeout(() => {\n if (refreshCountCopy !== this.refreshCount) { return; }\n this.getGui().removeChild(this.ePrevious!);\n this.ePrevious = null;\n }, 3000);\n }\n\n public refresh(params: any): boolean {\n let value = params.value;\n\n if (missing(value)) {\n value = '';\n }\n\n if (value === this.lastValue) {\n return false;\n }\n\n // we don't show the delta if we are in the middle of a filter. see comment on FilterManager\n // with regards processingFilterChange\n if (this.filterManager.isSuppressFlashingCellsBecauseFiltering()) {\n return false;\n }\n\n this.addSlideAnimation();\n\n this.lastValue = value;\n\n if (exists(params.valueFormatted)) {\n this.eCurrent.innerHTML = params.valueFormatted;\n } else if (exists(params.value)) {\n this.eCurrent.innerHTML = value;\n } else {\n clearElement(this.eCurrent);\n }\n\n return true;\n }\n}\n","import { BeanStub } from \"../context/beanStub\";\nimport { PostConstruct, Bean, Autowired, PreDestroy } from \"../context/context\";\nimport { Column } from \"../entities/column\";\nimport { ColumnApi } from \"../columns/columnApi\";\nimport { GridApi } from \"../gridApi\";\nimport { DragService, DragListenerParams } from \"./dragService\";\nimport { Environment } from \"../environment\";\nimport { RowDropZoneParams } from \"../gridBodyComp/rowDragFeature\";\nimport { RowNode } from \"../entities/rowNode\";\nimport { escapeString } from \"../utils/string\";\nimport { createIcon } from \"../utils/icon\";\nimport { removeFromArray } from \"../utils/array\";\nimport { getBodyHeight, getBodyWidth } from \"../utils/browser\";\nimport { loadTemplate, clearElement } from \"../utils/dom\";\nimport { isFunction } from \"../utils/function\";\n\nexport interface DragItem {\n /**\n * When dragging a row, this contains the row node being dragged\n * When dragging multiple rows, this contains the row that started the drag.\n */\n rowNode?: RowNode;\n\n /** When dragging multiple rows, this contains all rows being dragged */\n rowNodes?: RowNode[];\n\n /** When dragging columns, this contains the columns being dragged */\n columns?: Column[];\n\n /** When dragging columns, this contains the visible state of the columns */\n visibleState?: { [key: string]: boolean };\n}\n\nexport enum DragSourceType { ToolPanel, HeaderCell, RowDrag, ChartPanel }\n\nexport interface DragSource {\n /**\n * The type of the drag source, used by the drop target to know where the\n * drag originated from.\n */\n type: DragSourceType;\n /**\n * Element which, when dragged, will kick off the DnD process\n */\n eElement: HTMLElement;\n /**\n * If eElement is dragged, then the dragItem is the object that gets passed around.\n */\n getDragItem: () => DragItem;\n /**\n * This name appears in the ghost icon when dragging.\n */\n dragItemName: string | (() => string) | null;\n /**\n * Icon to show when not over a drop zone\n */\n defaultIconName?: string;\n /**\n * The drop target associated with this dragSource. When dragging starts, this\n * target does not get an onDragEnter event.\n */\n dragSourceDropTarget?: DropTarget;\n /**\n * The drag source DOM Data Key, this is useful to detect if the origin grid is the same\n * as the target grid.\n */\n dragSourceDomDataKey?: string;\n /**\n * After how many pixels of dragging should the drag operation start. Default is 4.\n */\n dragStartPixels?: number;\n /**\n * Callback for drag started\n */\n onDragStarted?: () => void;\n /**\n * Callback for drag stopped\n */\n onDragStopped?: () => void;\n}\n\nexport interface DropTarget {\n /** The main container that will get the drop. */\n getContainer(): HTMLElement;\n /** If any secondary containers. For example when moving columns in AG Grid, we listen for drops\n * in the header as well as the body (main rows and pinned rows) of the grid. */\n getSecondaryContainers?(): HTMLElement[][];\n /** Icon to show when drag is over */\n getIconName?(): string | null;\n\n isInterestedIn(type: DragSourceType, el: HTMLElement): boolean;\n\n /**\n * If `true`, the DragSources will only be allowed to be dragged within the DragTarget that contains them.\n * This is useful for changing order of items within a container, and not moving items across containers.\n * Default: `false`\n */\n targetContainsSource?: boolean;\n\n /** Callback for when drag enters */\n onDragEnter?(params: DraggingEvent): void;\n /** Callback for when drag leaves */\n onDragLeave?(params: DraggingEvent): void;\n /** Callback for when dragging */\n onDragging?(params: DraggingEvent): void;\n /** Callback for when drag stops */\n onDragStop?(params: DraggingEvent): void;\n external?: boolean;\n}\n\nexport enum VerticalDirection { Up, Down }\nexport enum HorizontalDirection { Left, Right }\n\nexport interface DraggingEvent {\n event: MouseEvent;\n x: number;\n y: number;\n vDirection: VerticalDirection | null;\n hDirection: HorizontalDirection | null;\n dragSource: DragSource;\n dragItem: DragItem;\n fromNudge: boolean;\n api: GridApi;\n columnApi: ColumnApi;\n dropZoneTarget: HTMLElement;\n}\n\n@Bean('dragAndDropService')\nexport class DragAndDropService extends BeanStub {\n\n @Autowired('dragService') private dragService: DragService;\n @Autowired('environment') private environment: Environment;\n @Autowired('columnApi') private columnApi: ColumnApi;\n @Autowired('gridApi') private gridApi: GridApi;\n\n public static ICON_PINNED = 'pinned';\n public static ICON_MOVE = 'move';\n public static ICON_LEFT = 'left';\n public static ICON_RIGHT = 'right';\n public static ICON_GROUP = 'group';\n public static ICON_AGGREGATE = 'aggregate';\n public static ICON_PIVOT = 'pivot';\n public static ICON_NOT_ALLOWED = 'notAllowed';\n public static ICON_HIDE = 'hide';\n\n public static GHOST_TEMPLATE = /* html */\n `
\n \n
\n
`;\n\n private dragSourceAndParamsList: { params: DragListenerParams, dragSource: DragSource }[] = [];\n\n private dragItem: DragItem | null;\n private eventLastTime: MouseEvent | null;\n private dragSource: DragSource;\n private dragging: boolean;\n\n private eGhost: HTMLElement | null;\n private eGhostParent: HTMLElement;\n private eGhostIcon: HTMLElement;\n\n private dropTargets: DropTarget[] = [];\n private lastDropTarget: DropTarget | null | undefined;\n\n private ePinnedIcon: HTMLElement;\n private eHideIcon: HTMLElement;\n private eMoveIcon: HTMLElement;\n private eLeftIcon: HTMLElement;\n private eRightIcon: HTMLElement;\n private eGroupIcon: HTMLElement;\n private eAggregateIcon: HTMLElement;\n private ePivotIcon: HTMLElement;\n private eDropNotAllowedIcon: HTMLElement;\n\n @PostConstruct\n private init(): void {\n this.ePinnedIcon = createIcon('columnMovePin', this.gridOptionsWrapper, null);\n this.eHideIcon = createIcon('columnMoveHide', this.gridOptionsWrapper, null);\n this.eMoveIcon = createIcon('columnMoveMove', this.gridOptionsWrapper, null);\n this.eLeftIcon = createIcon('columnMoveLeft', this.gridOptionsWrapper, null);\n this.eRightIcon = createIcon('columnMoveRight', this.gridOptionsWrapper, null);\n this.eGroupIcon = createIcon('columnMoveGroup', this.gridOptionsWrapper, null);\n this.eAggregateIcon = createIcon('columnMoveValue', this.gridOptionsWrapper, null);\n this.ePivotIcon = createIcon('columnMovePivot', this.gridOptionsWrapper, null);\n this.eDropNotAllowedIcon = createIcon('dropNotAllowed', this.gridOptionsWrapper, null);\n }\n\n public addDragSource(dragSource: DragSource, allowTouch = false): void {\n const params: DragListenerParams = {\n eElement: dragSource.eElement,\n dragStartPixels: dragSource.dragStartPixels,\n onDragStart: this.onDragStart.bind(this, dragSource),\n onDragStop: this.onDragStop.bind(this),\n onDragging: this.onDragging.bind(this)\n };\n\n this.dragSourceAndParamsList.push({ params: params, dragSource: dragSource });\n\n this.dragService.addDragSource(params, allowTouch);\n }\n\n public removeDragSource(dragSource: DragSource): void {\n const sourceAndParams = this.dragSourceAndParamsList.find(item => item.dragSource === dragSource);\n\n if (sourceAndParams) {\n this.dragService.removeDragSource(sourceAndParams.params);\n removeFromArray(this.dragSourceAndParamsList, sourceAndParams);\n }\n }\n\n @PreDestroy\n private clearDragSourceParamsList(): void {\n this.dragSourceAndParamsList.forEach(sourceAndParams => this.dragService.removeDragSource(sourceAndParams.params));\n this.dragSourceAndParamsList.length = 0;\n }\n\n public nudge(): void {\n if (this.dragging) {\n this.onDragging(this.eventLastTime!, true);\n }\n }\n\n private onDragStart(dragSource: DragSource, mouseEvent: MouseEvent): void {\n this.dragging = true;\n this.dragSource = dragSource;\n this.eventLastTime = mouseEvent;\n this.dragItem = this.dragSource.getDragItem();\n this.lastDropTarget = this.dragSource.dragSourceDropTarget;\n\n if (this.dragSource.onDragStarted) {\n this.dragSource.onDragStarted();\n }\n\n this.createGhost();\n }\n\n private onDragStop(mouseEvent: MouseEvent): void {\n this.eventLastTime = null;\n this.dragging = false;\n\n if (this.dragSource.onDragStopped) {\n this.dragSource.onDragStopped();\n }\n\n if (this.lastDropTarget && this.lastDropTarget.onDragStop) {\n const draggingEvent = this.createDropTargetEvent(this.lastDropTarget, mouseEvent, null, null, false);\n this.lastDropTarget.onDragStop(draggingEvent);\n }\n\n this.lastDropTarget = null;\n this.dragItem = null;\n this.removeGhost();\n }\n\n private onDragging(mouseEvent: MouseEvent, fromNudge: boolean): void {\n const hDirection = this.getHorizontalDirection(mouseEvent);\n const vDirection = this.getVerticalDirection(mouseEvent);\n\n this.eventLastTime = mouseEvent;\n\n this.positionGhost(mouseEvent);\n\n // check if mouseEvent intersects with any of the drop targets\n const validDropTargets = this.dropTargets.filter(target => this.isMouseOnDropTarget(mouseEvent, target));\n const len = validDropTargets.length;\n\n let dropTarget: DropTarget | null = null;\n\n if (len > 0) {\n dropTarget = len === 1\n ? validDropTargets[0]\n // the current mouse position could intersect with more than 1 element\n // if they are nested. In that case we need to get the most specific\n // container, which is the one that does not contain any other targets.\n : validDropTargets.reduce((prevTarget, currTarget) => {\n if (!prevTarget) { return currTarget; }\n const prevContainer = prevTarget.getContainer();\n const currContainer = currTarget.getContainer();\n\n if (prevContainer.contains(currContainer)) { return currTarget; }\n\n return prevTarget;\n });\n }\n\n if (dropTarget !== this.lastDropTarget) {\n this.leaveLastTargetIfExists(mouseEvent, hDirection, vDirection, fromNudge);\n this.enterDragTargetIfExists(dropTarget, mouseEvent, hDirection, vDirection, fromNudge);\n this.lastDropTarget = dropTarget;\n } else if (dropTarget && dropTarget.onDragging) {\n const draggingEvent = this.createDropTargetEvent(dropTarget, mouseEvent, hDirection, vDirection, fromNudge);\n dropTarget.onDragging(draggingEvent);\n }\n }\n\n private enterDragTargetIfExists(dropTarget: DropTarget | null, mouseEvent: MouseEvent, hDirection: HorizontalDirection | null, vDirection: VerticalDirection | null, fromNudge: boolean): void {\n if (!dropTarget) { return; }\n\n if (dropTarget.onDragEnter) {\n const dragEnterEvent = this.createDropTargetEvent(dropTarget, mouseEvent, hDirection, vDirection, fromNudge);\n\n dropTarget.onDragEnter(dragEnterEvent);\n }\n\n this.setGhostIcon(dropTarget.getIconName ? dropTarget.getIconName() : null);\n }\n\n private leaveLastTargetIfExists(mouseEvent: MouseEvent, hDirection: HorizontalDirection | null, vDirection: VerticalDirection | null, fromNudge: boolean): void {\n if (!this.lastDropTarget) { return; }\n\n if (this.lastDropTarget.onDragLeave) {\n const dragLeaveEvent = this.createDropTargetEvent(this.lastDropTarget, mouseEvent, hDirection, vDirection, fromNudge);\n\n this.lastDropTarget.onDragLeave(dragLeaveEvent);\n }\n\n this.setGhostIcon(null);\n }\n\n private getAllContainersFromDropTarget(dropTarget: DropTarget): HTMLElement[][] {\n const secondaryContainers = dropTarget.getSecondaryContainers ? dropTarget.getSecondaryContainers() : null;\n const containers: HTMLElement[][] = [[dropTarget.getContainer()]];\n\n return secondaryContainers ? containers.concat(secondaryContainers) : containers;\n }\n\n private allContainersIntersect(mouseEvent: MouseEvent, containers: HTMLElement[]) {\n for (const container of containers) {\n const rect = container.getBoundingClientRect();\n\n // if element is not visible, then width and height are zero\n if (rect.width === 0 || rect.height === 0) { return false; }\n\n const horizontalFit = mouseEvent.clientX >= rect.left && mouseEvent.clientX < rect.right;\n const verticalFit = mouseEvent.clientY >= rect.top && mouseEvent.clientY < rect.bottom;\n\n if (!horizontalFit || !verticalFit) { return false; }\n }\n return true;\n }\n\n // checks if the mouse is on the drop target. it checks eContainer and eSecondaryContainers\n private isMouseOnDropTarget(mouseEvent: MouseEvent, dropTarget: DropTarget): boolean {\n const allContainersFromDropTarget = this.getAllContainersFromDropTarget(dropTarget);\n let mouseOverTarget = false;\n\n for (const currentContainers of allContainersFromDropTarget) {\n if (this.allContainersIntersect(mouseEvent, currentContainers)) {\n mouseOverTarget = true;\n break;\n }\n }\n\n if (dropTarget.targetContainsSource && !dropTarget.getContainer().contains(this.dragSource.eElement)) { return false; }\n\n return mouseOverTarget && dropTarget.isInterestedIn(this.dragSource.type, this.dragSource.eElement);\n }\n\n public addDropTarget(dropTarget: DropTarget) {\n this.dropTargets.push(dropTarget);\n }\n\n public removeDropTarget(dropTarget: DropTarget) {\n this.dropTargets = this.dropTargets.filter(target => target.getContainer() !== dropTarget.getContainer());\n }\n\n public hasExternalDropZones(): boolean {\n return this.dropTargets.some(zones => zones.external);\n }\n\n public findExternalZone(params: RowDropZoneParams): DropTarget | null {\n const externalTargets = this.dropTargets.filter(target => target.external);\n\n return externalTargets.find(zone => zone.getContainer() === params.getContainer()) || null;\n }\n\n public getHorizontalDirection(event: MouseEvent): HorizontalDirection | null {\n const clientX = this.eventLastTime && this.eventLastTime.clientX;\n const eClientX = event.clientX;\n\n if (clientX === eClientX) { return null; }\n\n return clientX! > eClientX ? HorizontalDirection.Left : HorizontalDirection.Right;\n }\n\n public getVerticalDirection(event: MouseEvent): VerticalDirection | null {\n const clientY = this.eventLastTime && this.eventLastTime.clientY;\n const eClientY = event.clientY;\n\n if (clientY === eClientY) { return null; }\n\n return clientY! > eClientY ? VerticalDirection.Up : VerticalDirection.Down;\n }\n\n public createDropTargetEvent(\n dropTarget: DropTarget,\n event: MouseEvent,\n hDirection: HorizontalDirection | null,\n vDirection: VerticalDirection | null,\n fromNudge: boolean\n ): DraggingEvent {\n // localise x and y to the target\n const dropZoneTarget = dropTarget.getContainer();\n const rect = dropZoneTarget.getBoundingClientRect();\n const { gridApi: api, columnApi, dragItem, dragSource } = this;\n const x = event.clientX - rect.left;\n const y = event.clientY - rect.top;\n\n return { event, x, y, vDirection, hDirection, dragSource, fromNudge, dragItem: dragItem as DragItem, api, columnApi, dropZoneTarget };\n }\n\n private positionGhost(event: MouseEvent): void {\n const ghost = this.eGhost;\n\n if (!ghost) { return; }\n\n const ghostRect = ghost.getBoundingClientRect();\n const ghostHeight = ghostRect.height;\n\n // for some reason, without the '-2', it still overlapped by 1 or 2 pixels, which\n // then brought in scrollbars to the browser. no idea why, but putting in -2 here\n // works around it which is good enough for me.\n const browserWidth = getBodyWidth() - 2;\n const browserHeight = getBodyHeight() - 2;\n\n let top = event.pageY - (ghostHeight / 2);\n let left = event.pageX - 10;\n\n const eDocument = this.gridOptionsWrapper.getDocument();\n const win = (eDocument.defaultView || window);\n const windowScrollY = win.pageYOffset || eDocument.documentElement.scrollTop;\n const windowScrollX = win.pageXOffset || eDocument.documentElement.scrollLeft;\n\n // check ghost is not positioned outside of the browser\n if (browserWidth > 0 && ((left + ghost.clientWidth) > (browserWidth + windowScrollX))) {\n left = browserWidth + windowScrollX - ghost.clientWidth;\n }\n\n if (left < 0) {\n left = 0;\n }\n\n if (browserHeight > 0 && ((top + ghost.clientHeight) > (browserHeight + windowScrollY))) {\n top = browserHeight + windowScrollY - ghost.clientHeight;\n }\n\n if (top < 0) {\n top = 0;\n }\n\n ghost.style.left = `${left}px`;\n ghost.style.top = `${top}px`;\n }\n\n private removeGhost(): void {\n if (this.eGhost && this.eGhostParent) {\n this.eGhostParent.removeChild(this.eGhost);\n }\n\n this.eGhost = null;\n }\n\n private createGhost(): void {\n this.eGhost = loadTemplate(DragAndDropService.GHOST_TEMPLATE);\n const { theme } = this.environment.getTheme();\n\n if (theme) {\n this.eGhost.classList.add(theme);\n }\n\n this.eGhostIcon = this.eGhost.querySelector('.ag-dnd-ghost-icon') as HTMLElement;\n\n this.setGhostIcon(null);\n\n const eText = this.eGhost.querySelector('.ag-dnd-ghost-label') as HTMLElement;\n let dragItemName = this.dragSource.dragItemName;\n\n if (isFunction(dragItemName)) {\n dragItemName = (dragItemName as () => string)();\n }\n\n eText.innerHTML = escapeString(dragItemName as string) || '';\n\n this.eGhost.style.height = '25px';\n this.eGhost.style.top = '20px';\n this.eGhost.style.left = '20px';\n\n const eDocument = this.gridOptionsWrapper.getDocument();\n let targetEl: HTMLElement | null = null;\n\n try {\n targetEl = eDocument.fullscreenElement as HTMLElement | null;\n } catch (e) {\n // some environments like SalesForce will throw errors\n // simply by trying to read the fullscreenElement property\n } finally {\n if (!targetEl) {\n targetEl = eDocument.querySelector('body');\n }\n }\n\n this.eGhostParent = targetEl as HTMLElement;\n\n if (!this.eGhostParent) {\n console.warn('AG Grid: could not find document body, it is needed for dragging columns');\n } else {\n this.eGhostParent.appendChild(this.eGhost);\n }\n }\n\n public setGhostIcon(iconName: string | null, shake = false): void {\n clearElement(this.eGhostIcon);\n\n let eIcon: HTMLElement | null = null;\n\n if (!iconName) {\n iconName = this.dragSource.defaultIconName || DragAndDropService.ICON_NOT_ALLOWED;\n }\n\n switch (iconName) {\n case DragAndDropService.ICON_PINNED: eIcon = this.ePinnedIcon; break;\n case DragAndDropService.ICON_MOVE: eIcon = this.eMoveIcon; break;\n case DragAndDropService.ICON_LEFT: eIcon = this.eLeftIcon; break;\n case DragAndDropService.ICON_RIGHT: eIcon = this.eRightIcon; break;\n case DragAndDropService.ICON_GROUP: eIcon = this.eGroupIcon; break;\n case DragAndDropService.ICON_AGGREGATE: eIcon = this.eAggregateIcon; break;\n case DragAndDropService.ICON_PIVOT: eIcon = this.ePivotIcon; break;\n case DragAndDropService.ICON_NOT_ALLOWED: eIcon = this.eDropNotAllowedIcon; break;\n case DragAndDropService.ICON_HIDE: eIcon = this.eHideIcon; break;\n }\n\n this.eGhostIcon.classList.toggle('ag-shake-left-to-right', shake);\n\n if (eIcon === this.eHideIcon && this.gridOptionsWrapper.isSuppressDragLeaveHidesColumns()) {\n return;\n }\n\n if (eIcon) {\n this.eGhostIcon.appendChild(eIcon);\n }\n }\n}\n","import { AgCheckbox } from '../widgets/agCheckbox';\nimport { PostConstruct } from '../context/context';\nimport { Column } from '../entities/column';\nimport { Component } from '../widgets/component';\nimport { Events } from '../events';\nimport { RefSelector } from '../widgets/componentAnnotations';\nimport { RowNode } from '../entities/rowNode';\nimport { stopPropagationForAgGrid } from '../utils/event';\n\nexport class CheckboxSelectionComponent extends Component {\n\n @RefSelector('eCheckbox') private eCheckbox: AgCheckbox;\n\n private rowNode: RowNode;\n private column: Column | undefined;\n\n constructor() {\n super(/* html*/`\n
\n \n
`\n );\n }\n\n @PostConstruct\n private postConstruct(): void {\n this.eCheckbox.setPassive(true);\n }\n\n public getCheckboxId(): string {\n return this.eCheckbox.getInputElement().id;\n }\n\n private onDataChanged(): void {\n // when rows are loaded for the second time, this can impact the selection, as a row\n // could be loaded as already selected (if user scrolls down, and then up again).\n this.onSelectionChanged();\n }\n\n private onSelectableChanged(): void {\n this.showOrHideSelect();\n }\n\n private onSelectionChanged(): void {\n const translate = this.gridOptionsWrapper.getLocaleTextFunc();\n const state = this.rowNode.isSelected();\n const stateName = state === undefined\n ? translate('ariaIndeterminate', 'indeterminate')\n : (state === true\n ? translate('ariaChecked', 'checked')\n : translate('ariaUnchecked', 'unchecked')\n );\n const ariaLabel = translate('ariaRowToggleSelection', 'Press Space to toggle row selection');\n\n this.eCheckbox.setValue(state, true);\n this.eCheckbox.setInputAriaLabel(`${ariaLabel} (${stateName})`);\n }\n\n private onCheckedClicked(event: MouseEvent): number {\n const groupSelectsFiltered = this.gridOptionsWrapper.isGroupSelectsFiltered();\n const updatedCount = this.rowNode.setSelectedParams({ newValue: false, rangeSelect: event.shiftKey, groupSelectsFiltered: groupSelectsFiltered });\n return updatedCount;\n }\n\n private onUncheckedClicked(event: MouseEvent): number {\n const groupSelectsFiltered = this.gridOptionsWrapper.isGroupSelectsFiltered();\n const updatedCount = this.rowNode.setSelectedParams({ newValue: true, rangeSelect: event.shiftKey, groupSelectsFiltered: groupSelectsFiltered });\n return updatedCount;\n }\n\n public init(params: {rowNode: RowNode, column?: Column}): void {\n this.rowNode = params.rowNode;\n this.column = params.column;\n\n this.onSelectionChanged();\n\n // we don't want the row clicked event to fire when selecting the checkbox, otherwise the row\n // would possibly get selected twice\n this.addGuiEventListener('click', event => stopPropagationForAgGrid(event));\n // likewise we don't want double click on this icon to open a group\n this.addGuiEventListener('dblclick', event => stopPropagationForAgGrid(event));\n\n this.addManagedListener(this.eCheckbox.getInputElement(), 'click', (event) => {\n const isSelected = this.eCheckbox.getValue();\n const previousValue = this.eCheckbox.getPreviousValue();\n\n if (previousValue === undefined || isSelected === undefined) {\n // Indeterminate state - try toggling children to determine action.\n const result = this.onUncheckedClicked(event || {});\n if (result === 0) {\n this.onCheckedClicked(event);\n }\n } else if (isSelected) {\n this.onCheckedClicked(event);\n } else {\n this.onUncheckedClicked(event || {});\n }\n });\n\n this.addManagedListener(this.rowNode, RowNode.EVENT_ROW_SELECTED, this.onSelectionChanged.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_DATA_CHANGED, this.onDataChanged.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_SELECTABLE_CHANGED, this.onSelectableChanged.bind(this));\n\n const isRowSelectableFunc = this.gridOptionsWrapper.getIsRowSelectableFunc();\n const checkboxVisibleIsDynamic = isRowSelectableFunc || this.checkboxCallbackExists();\n\n if (checkboxVisibleIsDynamic) {\n const showOrHideSelectListener = this.showOrHideSelect.bind(this);\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, showOrHideSelectListener);\n this.addManagedListener(this.rowNode, RowNode.EVENT_DATA_CHANGED, showOrHideSelectListener);\n this.addManagedListener(this.rowNode, RowNode.EVENT_CELL_CHANGED, showOrHideSelectListener);\n this.showOrHideSelect();\n }\n\n this.eCheckbox.getInputElement().setAttribute('tabindex', '-1');\n }\n\n private showOrHideSelect(): void {\n // if the isRowSelectable() is not provided the row node is selectable by default\n let selectable = this.rowNode.selectable;\n\n // checkboxSelection callback is deemed a legacy solution however we will still consider it's result.\n // If selectable, then also check the colDef callback. if not selectable, this it short circuits - no need\n // to call the colDef callback.\n if (selectable && this.checkboxCallbackExists()) {\n selectable = this.column!.isCellCheckboxSelection(this.rowNode);\n }\n\n // show checkbox if both conditions are true\n this.setVisible(selectable);\n }\n\n private checkboxCallbackExists(): boolean {\n // column will be missing if groupUseEntireRow=true\n const colDef = this.column ? this.column.getColDef() : null;\n return !!colDef && typeof colDef.checkboxSelection === 'function';\n }\n}\n","import { Column } from \"../entities/column\";\nimport { ExportParams } from \"./exportParams\";\nimport { XmlElement } from \"./iXmlFactory\";\n\n// Excel Styles\nexport interface ExcelStyle {\n id: string;\n alignment?: ExcelAlignment;\n borders?: ExcelBorders;\n dataType?: ExcelDataType;\n font?: ExcelFont;\n interior?: ExcelInterior;\n numberFormat?: ExcelNumberFormat;\n protection?: ExcelProtection;\n /**\n * @deprecated Legacy property\n */\n name?: string;\n}\n\nexport interface ExcelAlignment {\n horizontal?: 'Automatic' | 'Left' | 'Center' | 'Right' | 'Fill' | 'Justify' | 'CenterAcrossSelection' | 'Distributed' | 'JustifyDistributed';\n indent?: number;\n readingOrder?: 'RightToLeft' | 'LeftToRight' | 'Context';\n rotate?: number;\n shrinkToFit?: boolean;\n vertical?: 'Automatic' | 'Top' | 'Bottom' | 'Center' | 'Justify' | 'Distributed' | 'JustifyDistributed';\n wrapText?: boolean;\n /**\n * @deprecated Legacy property\n */\n verticalText?: boolean;\n}\n\nexport interface ExcelBorders {\n borderBottom?: ExcelBorder;\n borderLeft?: ExcelBorder;\n borderRight?: ExcelBorder;\n borderTop?: ExcelBorder;\n}\n\nexport interface ExcelBorder {\n color?: string;\n lineStyle?: 'None' | 'Continuous' | 'Dash' | 'Dot' | 'DashDot' | 'DashDotDot' | 'SlantDashDot' | 'Double';\n weight?: 0 | 1 | 2 | 3;\n}\n\nexport interface ExcelFont {\n bold?: boolean;\n color?: string;\n family?: string;\n fontName?: string;\n italic?: boolean;\n outline?: boolean;\n shadow?: boolean;\n size?: number;\n strikeThrough?: boolean;\n underline?: 'Single' | 'Double';\n verticalAlign?: 'Superscript' | 'Subscript';\n /**\n * @deprecated Legacy property\n */\n charSet?: number;\n}\n\nexport interface ExcelInterior {\n pattern: 'None' | 'Solid' | 'Gray75' | 'Gray50' | 'Gray25' | 'Gray125' | 'Gray0625' | 'HorzStripe' | 'VertStripe' | 'ReverseDiagStripe' | 'DiagStripe' | 'DiagCross' | 'ThickDiagCross' | 'ThinHorzStripe' | 'ThinVertStripe' | 'ThinReverseDiagStripe' | 'ThinDiagStripe' | 'ThinHorzCross' | 'ThinDiagCross';\n color?: string;\n patternColor?: string;\n}\n\nexport interface ExcelNumberFormat {\n format: string;\n}\n\nexport interface ExcelProtection {\n protected: boolean;\n hideFormula: boolean;\n}\n\n// Excel Structure\nexport interface ExcelWorksheet {\n name: string;\n table: ExcelTable;\n}\n\nexport interface ExcelTable {\n columns: ExcelColumn[];\n rows: ExcelRow[];\n}\n\nexport interface ExcelColumn {\n min?: number;\n max?: number;\n outlineLevel?: number;\n width?: number;\n s?: number;\n hidden?: boolean;\n bestFit?: boolean;\n}\n\nexport interface ExcelRow {\n index?: number;\n collapsed?: boolean;\n hidden?: boolean;\n height?: number;\n outlineLevel?: number;\n s?: number;\n cells: ExcelCell[];\n}\n\nexport interface ExcelCell {\n ref?: string;\n styleId?: string;\n data: ExcelData;\n mergeAcross?: number;\n collapsibleRanges?: number[][];\n}\n\nexport interface ExcelImage {\n id: string;\n base64: string;\n imageType: 'jpg' | 'png' | 'gif';\n altText?: string;\n fitCell?: boolean;\n transparency?: number;\n rotation?: number;\n recolor?: 'Grayscale' | 'Sepia' | 'Washout';\n width?: number;\n height?: number;\n position?: {\n row?: number;\n rowSpan?: number;\n column?: number;\n colSpan?: number;\n offsetX?: number;\n offsetY?: number;\n };\n}\n\n/*\n * OOXML Data Types\n * (str): String\n * (s): Shared String\n * (f): Formula\n * (inlineStr): Inline string\n * Note: Inline strings are placed in a `is` element instead of `v`\n * (n) Number\n * (b) Boolean\n * (d) DateTime\n * (e) Error\n*/\nexport type ExcelDataType = 'String' | 'Formula' | 'Number' | 'Boolean' | 'DateTime' | 'Error';\nexport type ExcelOOXMLDataType = 'str' | 's' | 'f' | 'inlineStr' | 'n' | 'b' | 'd' | 'e' | 'empty';\n\nexport interface ExcelData {\n type: ExcelDataType | ExcelOOXMLDataType;\n value: string | null;\n}\n\nexport interface ExcelRelationship {\n Id: string;\n Type: string;\n Target: string;\n}\n\nexport interface ExcelContentType {\n name: 'Default' | 'Override';\n ContentType: string;\n Extension?: string;\n PartName?: string;\n}\n\nexport interface ExcelXMLTemplate {\n getTemplate(styleProperties?: ExcelStyle | ExcelWorksheet | ExcelColumn | ExcelRow | ExcelCell): XmlElement;\n}\n\nexport interface ExcelOOXMLTemplate {\n getTemplate(config?: any, idx?: number, currentSheet?: number): XmlElement;\n convertType?(type: string): string;\n}\n\n// Excel Export\nexport enum ExcelFactoryMode { SINGLE_SHEET, MULTI_SHEET }\n\nexport interface ColumnWidthCallbackParams {\n column: Column | null;\n index: number;\n}\n\nexport interface RowHeightCallbackParams {\n rowIndex: number;\n}\n\nexport interface ExcelExportParams extends ExportParams {\n author?: string;\n autoConvertFormulas?: boolean;\n columnWidth?: number | ((params: ColumnWidthCallbackParams) => number);\n exportMode?: 'xlsx' | 'xml';\n fontSize?: number;\n headerRowHeight?: number | ((params: RowHeightCallbackParams) => number);\n rowHeight?: number | ((params: RowHeightCallbackParams) => number);\n sheetName?: string;\n margins?: ExcelSheetMargin;\n pageSetup?: ExcelSheetPageSetup;\n headerFooterConfig?: ExcelHeaderFooterConfig;\n suppressTextAsCDATA?: boolean;\n mimeType?: string;\n /** Use to export an image for the gridCell in question. */\n addImageToCell?: (rowIndex: number, column: Column, value: string) => { image: ExcelImage, value?: string } | undefined;\n}\n\nexport interface ExcelExportMultipleSheetParams {\n author?: string;\n data: string[];\n fileName?: string;\n fontSize?: number;\n mimeType?: string;\n}\n\nexport interface ExcelHeaderFooterConfig {\n all?: ExcelHeaderFooter;\n first?: ExcelHeaderFooter;\n even?: ExcelHeaderFooter;\n}\nexport interface ExcelHeaderFooter {\n header?: ExcelHeaderFooterContent[];\n footer?: ExcelHeaderFooterContent[];\n}\n\nexport interface ExcelHeaderFooterContent {\n value: string;\n position?: 'Left' | 'Center' | 'Right';\n font?: ExcelFont;\n}\n\nexport interface IExcelCreator {\n exportDataAsExcel(params?: ExcelExportParams): void;\n getDataAsExcel(params?: ExcelExportParams): Blob | string | undefined;\n getSheetDataForExcel(params?: ExcelExportParams): string;\n\n getMultipleSheetsAsExcel(params: ExcelExportMultipleSheetParams): Blob | undefined;\n exportMultipleSheetsAsExcel(params: ExcelExportMultipleSheetParams): void;\n\n /** private methods */\n setFactoryMode(factoryMode: ExcelFactoryMode, exportMode: 'xml' | 'xlsx'): void;\n getFactoryMode(exportMode: 'xml' | 'xlsx'): ExcelFactoryMode;\n}\n\nexport interface ExcelSheetMargin {\n top?: number;\n right?: number;\n bottom?: number;\n left?: number;\n header?: number;\n footer?: number;\n}\n\nexport interface ExcelSheetPageSetup {\n orientation?: 'Portrait' | 'Landscape';\n pageSize?: 'Letter' | 'Letter Small' | 'Tabloid' | 'Ledger' | 'Legal' | 'Statement' | 'Executive' | 'A3' | 'A4' | 'A4 Small' | 'A5' | 'A6' | 'B4' | 'B5' | 'Folio' | 'Envelope' | 'Envelope DL' | 'Envelope C5' | 'Envelope B5' | 'Envelope C3' | 'Envelope C4' | 'Envelope C6' | 'Envelope Monarch' | 'Japanese Postcard' | 'Japanese Double Postcard';\n}\n","import { Component } from \"../../widgets/component\";\nimport { Autowired, PostConstruct, PreDestroy } from \"../../context/context\";\nimport { RowNode } from \"../../entities/rowNode\";\nimport { DragItem, DragSource, DragSourceType } from \"../../dragAndDrop/dragAndDropService\";\nimport { Events } from \"../../eventKeys\";\nimport { Beans } from \"../beans\";\nimport { BeanStub } from \"../../context/beanStub\";\nimport { Column } from \"../../entities/column\";\nimport { createIconNoSpan } from \"../../utils/icon\";\nimport { doOnce, isFunction } from \"../../utils/function\";\n\nexport interface IRowDragItem extends DragItem {\n /** The default text that would be applied to this Drag Element */\n defaultTextValue: string;\n}\n\nexport class RowDragComp extends Component {\n\n private dragSource: DragSource | null = null;\n\n @Autowired('beans') private readonly beans: Beans;\n\n constructor(\n private readonly cellValueFn: () => string,\n private readonly rowNode: RowNode,\n private readonly column?: Column,\n private readonly customGui?: HTMLElement,\n private readonly dragStartPixels?: number,\n private readonly suppressVisibilityChange?: boolean\n ) { super(); }\n\n public isCustomGui(): boolean {\n return this.customGui != null;\n }\n\n @PostConstruct\n private postConstruct(): void {\n if (!this.customGui) {\n this.setTemplate(/* html */ `
`);\n this.getGui().appendChild(createIconNoSpan('rowDrag', this.beans.gridOptionsWrapper, null)!);\n this.addDragSource();\n } else {\n this.setDragElement(this.customGui, this.dragStartPixels);\n }\n\n this.checkCompatibility();\n\n if (!this.suppressVisibilityChange) {\n const strategy = this.beans.gridOptionsWrapper.isRowDragManaged() ?\n new ManagedVisibilityStrategy(this, this.beans, this.rowNode, this.column) :\n new NonManagedVisibilityStrategy(this, this.beans, this.rowNode, this.column);\n\n this.createManagedBean(strategy, this.beans.context);\n }\n }\n\n public setDragElement(dragElement: HTMLElement, dragStartPixels?: number) {\n this.setTemplateFromElement(dragElement);\n this.addDragSource(dragStartPixels);\n }\n\n private getSelectedCount(): number {\n const isRowDragMultiRow = this.beans.gridOptionsWrapper.isRowDragMultiRow();\n if (!isRowDragMultiRow) { return 1; }\n\n const selection = this.beans.selectionService.getSelectedNodes();\n\n return selection.indexOf(this.rowNode) !== -1 ? selection.length : 1;\n }\n\n // returns true if all compatibility items work out\n private checkCompatibility(): void {\n const managed = this.beans.gridOptionsWrapper.isRowDragManaged();\n const treeData = this.beans.gridOptionsWrapper.isTreeData();\n\n if (treeData && managed) {\n doOnce(() =>\n console.warn('AG Grid: If using row drag with tree data, you cannot have rowDragManaged=true'),\n 'RowDragComp.managedAndTreeData'\n );\n }\n }\n\n private addDragSource(dragStartPixels: number = 4): void {\n // if this is changing the drag element, delete the previous dragSource\n if (this.dragSource) { this.removeDragSource(); }\n\n const dragItem: IRowDragItem = {\n rowNode: this.rowNode,\n columns: this.column ? [this.column] : undefined,\n defaultTextValue: this.cellValueFn(),\n };\n\n const rowDragText = this.column && this.column.getColDef().rowDragText;\n const translate = this.gridOptionsWrapper.getLocaleTextFunc();\n\n this.dragSource = {\n type: DragSourceType.RowDrag,\n eElement: this.getGui(),\n dragItemName: () => {\n const dragItemCount = this.getSelectedCount();\n if (rowDragText) {\n return rowDragText(dragItem, dragItemCount);\n }\n\n return dragItemCount === 1 ? this.cellValueFn() : `${dragItemCount} ${translate('rowDragRows', 'rows')}`;\n },\n getDragItem: () => dragItem,\n dragStartPixels,\n dragSourceDomDataKey: this.beans.gridOptionsWrapper.getDomDataKey()\n };\n\n this.beans.dragAndDropService.addDragSource(this.dragSource, true);\n }\n\n @PreDestroy\n private removeDragSource() {\n if (this.dragSource) {\n this.beans.dragAndDropService.removeDragSource(this.dragSource);\n }\n this.dragSource = null;\n }\n}\n\nclass VisibilityStrategy extends BeanStub {\n private readonly parent: RowDragComp;\n private readonly column: Column | undefined;\n protected readonly rowNode: RowNode;\n\n constructor(parent: RowDragComp, rowNode: RowNode, column?: Column) {\n super();\n this.parent = parent;\n this.rowNode = rowNode;\n this.column = column;\n }\n\n protected setDisplayedOrVisible(neverDisplayed: boolean): void {\n if (neverDisplayed) {\n this.parent.setDisplayed(false);\n } else {\n let shown: boolean = true;\n let isShownSometimes: boolean = false;\n\n if (this.column) {\n shown = this.column.isRowDrag(this.rowNode) || this.parent.isCustomGui();\n isShownSometimes = isFunction(this.column.getColDef().rowDrag);\n }\n\n // if shown sometimes, them some rows can have drag handle while other don't,\n // so we use setVisible to keep the handles horizontally aligned (as setVisible\n // keeps the empty space, whereas setDisplayed looses the space)\n if (isShownSometimes) {\n this.parent.setDisplayed(true);\n this.parent.setVisible(shown);\n } else {\n this.parent.setDisplayed(shown);\n this.parent.setVisible(true);\n }\n }\n }\n}\n\n// when non managed, the visibility depends on suppressRowDrag property only\nclass NonManagedVisibilityStrategy extends VisibilityStrategy {\n private readonly beans: Beans;\n\n constructor(parent: RowDragComp, beans: Beans, rowNode: RowNode, column?: Column) {\n super(parent, rowNode, column);\n this.beans = beans;\n }\n\n @PostConstruct\n private postConstruct(): void {\n this.addManagedListener(this.beans.gridOptionsWrapper, 'suppressRowDrag', this.onSuppressRowDrag.bind(this));\n\n // in case data changes, then we need to update visibility of drag item\n this.addManagedListener(this.rowNode, RowNode.EVENT_DATA_CHANGED, this.workOutVisibility.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_CELL_CHANGED, this.workOutVisibility.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_CELL_CHANGED, this.workOutVisibility.bind(this));\n this.addManagedListener(this.beans.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.workOutVisibility.bind(this));\n\n this.workOutVisibility();\n }\n\n private onSuppressRowDrag(): void {\n this.workOutVisibility();\n }\n\n private workOutVisibility(): void {\n // only show the drag if both sort and filter are not present\n const neverDisplayed = this.beans.gridOptionsWrapper.isSuppressRowDrag();\n this.setDisplayedOrVisible(neverDisplayed);\n }\n}\n\n// when managed, the visibility depends on sort, filter and row group, as well as suppressRowDrag property\nclass ManagedVisibilityStrategy extends VisibilityStrategy {\n\n private readonly beans: Beans;\n\n constructor(parent: RowDragComp, beans: Beans, rowNode: RowNode, column?: Column) {\n super(parent, rowNode, column);\n this.beans = beans;\n }\n\n @PostConstruct\n private postConstruct(): void {\n // we do not show the component if sort, filter or grouping is active\n\n this.addManagedListener(this.beans.eventService, Events.EVENT_SORT_CHANGED, this.workOutVisibility.bind(this));\n this.addManagedListener(this.beans.eventService, Events.EVENT_FILTER_CHANGED, this.workOutVisibility.bind(this));\n this.addManagedListener(this.beans.eventService, Events.EVENT_COLUMN_ROW_GROUP_CHANGED, this.workOutVisibility.bind(this));\n this.addManagedListener(this.beans.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.workOutVisibility.bind(this));\n\n // in case data changes, then we need to update visibility of drag item\n this.addManagedListener(this.rowNode, RowNode.EVENT_DATA_CHANGED, this.workOutVisibility.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_CELL_CHANGED, this.workOutVisibility.bind(this));\n\n this.addManagedListener(this.beans.gridOptionsWrapper, 'suppressRowDrag', this.onSuppressRowDrag.bind(this));\n\n this.workOutVisibility();\n }\n\n private onSuppressRowDrag(): void {\n this.workOutVisibility();\n }\n\n private workOutVisibility(): void {\n // only show the drag if both sort and filter are not present\n const gridBodyCon = this.beans.ctrlsService.getGridBodyCtrl();\n const rowDragFeature = gridBodyCon.getRowDragFeature();\n const shouldPreventRowMove = rowDragFeature && rowDragFeature.shouldPreventRowMove();\n const suppressRowDrag = this.beans.gridOptionsWrapper.isSuppressRowDrag();\n const hasExternalDropZones = this.beans.dragAndDropService.hasExternalDropZones();\n const neverDisplayed = (shouldPreventRowMove && !hasExternalDropZones) || suppressRowDrag;\n\n this.setDisplayedOrVisible(neverDisplayed);\n }\n}\n","import { ColumnModel } from \"../../columns/columnModel\";\nimport { UserCompDetails, UserComponentFactory } from \"../../components/framework/userComponentFactory\";\nimport { Constants } from \"../../constants/constants\";\nimport { KeyCode } from \"../../constants/keyCode\";\nimport { BeanStub } from \"../../context/beanStub\";\nimport { Autowired } from \"../../context/context\";\nimport { CellRendererSelectorFunc } from \"../../entities/colDef\";\nimport { Column } from \"../../entities/column\";\nimport { GridOptions } from \"../../entities/gridOptions\";\nimport { RowNode } from \"../../entities/rowNode\";\nimport { isElementInEventPath, isStopPropagationForAgGrid, stopPropagationForAgGrid } from \"../../utils/event\";\nimport { removeAriaExpanded, setAriaExpanded } from \"../../utils/aria\";\nimport { doOnce } from \"../../utils/function\";\nimport { missing } from \"../../utils/generic\";\nimport { createIconNoSpan } from \"../../utils/icon\";\nimport { cloneObject } from \"../../utils/object\";\nimport { ExpressionService } from \"../../valueService/expressionService\";\nimport { CheckboxSelectionComponent } from \"../checkboxSelectionComponent\";\nimport { RowDragComp } from \"../row/rowDragComp\";\nimport { ValueFormatterService } from \"../valueFormatterService\";\nimport { ICellRendererComp, ICellRendererFunc, ICellRendererParams } from \"./iCellRenderer\";\n\nexport interface IGroupCellRenderer {\n setInnerRenderer(compDetails: UserCompDetails | undefined, valueToDisplay: any): void;\n setChildCount(count: string): void;\n setCheckboxVisible(value: boolean): void;\n setExpandedDisplayed(value: boolean): void;\n setContractedDisplayed(value: boolean): void;\n addOrRemoveCssClass(cssClassName: string, on: boolean): void;\n}\n\nexport interface FooterValueGetterFunc {\n (params: GroupCellRendererParams): any;\n}\n\nexport interface GroupCellRendererParams extends ICellRendererParams {\n\n /**\n * Only when in fullWidth, this gives whether the comp is pinned or not.\n * If not doing fullWidth, then this is not provided, as pinned can be got from the column.\n */\n pinned: string;\n /** 'true' if comp is showing full width. */\n fullWidth: boolean;\n\n /** Set to `true` to not include any padding (indentation) in the child rows. */\n suppressPadding: boolean;\n /** Set to `true` to suppress expand on double click. */\n suppressDoubleClickExpand: boolean;\n /** Set to `true` to suppress expand on Enter */\n suppressEnterExpand: boolean;\n /** The value getter for the footer text. Can be a function or expression. */\n footerValueGetter: string | FooterValueGetterFunc;\n /** If `true`, count is not displayed beside the name. */\n suppressCount: boolean;\n /** If `true`, a selection checkbox is included. */\n checkbox: any;\n rowDrag?: boolean;\n\n /** The renderer to use for inside the cell (after grouping functions are added) */\n innerRenderer?: { new(): ICellRendererComp; } | ICellRendererFunc | string;\n /**\n * @deprecated as of v27, use innerRenderer for Framework components\n * Same as `innerRenderer` but for a framework component. */\n innerRendererFramework?: any;\n /** Additional params to customise to the `innerRenderer`. */\n innerRendererParams?: any;\n /** Callback to enable different innerRenderers to be used based of value of params. */\n innerRendererSelector?: CellRendererSelectorFunc;\n\n /** @deprecated */\n padding: number;\n}\n\nexport class GroupCellRendererCtrl extends BeanStub {\n\n @Autowired('expressionService') private expressionService: ExpressionService;\n @Autowired('valueFormatterService') private valueFormatterService: ValueFormatterService;\n @Autowired('columnModel') private columnModel: ColumnModel;\n @Autowired('userComponentFactory') private userComponentFactory: UserComponentFactory;\n @Autowired('gridOptions') private readonly gridOptions: GridOptions;\n\n private params: GroupCellRendererParams;\n\n // will be true if the node was pulled down\n private showingValueForOpenedParent: boolean;\n\n // this is normally the rowNode of this row, however when doing hideOpenParents, it will\n // be the parent who's details we are actually showing if the data was pulled down.\n private displayedGroupNode: RowNode;\n\n private cellIsBlank: boolean;\n\n private eGui: HTMLElement;\n private eExpanded: HTMLElement;\n private eContracted: HTMLElement;\n private eCheckbox: HTMLElement;\n private expandListener: (() => null) | null;\n\n // keep reference to this, so we can remove again when indent changes\n private indentClass: string;\n\n private comp: IGroupCellRenderer;\n private compClass: any;\n\n public init(comp: IGroupCellRenderer, eGui: HTMLElement, eCheckbox: HTMLElement, eExpanded: HTMLElement, eContracted: HTMLElement, compClass: any, params: GroupCellRendererParams): void {\n this.params = params;\n this.eGui = eGui;\n this.eCheckbox = eCheckbox;\n this.eExpanded = eExpanded;\n this.eContracted = eContracted;\n this.comp = comp;\n this.compClass = compClass;\n\n const topLevelFooter = this.isTopLevelFooter();\n\n const embeddedRowMismatch = this.isEmbeddedRowMismatch();\n // This allows for empty strings to appear as groups since\n // it will only return for null or undefined.\n const nullValue = params.value == null;\n let skipCell = false;\n\n // if the groupCellRenderer is inside of a footer and groupHideOpenParents is true\n // we should only display the groupCellRenderer if the current column is the rowGroupedColumn\n if (this.gridOptionsWrapper.isGroupIncludeFooter() && this.gridOptionsWrapper.isGroupHideOpenParents()) {\n const node = params.node;\n\n if (node.footer) {\n const showRowGroup = params.colDef && params.colDef.showRowGroup;\n const rowGroupColumnId = node.rowGroupColumn && node.rowGroupColumn.getColId();\n\n skipCell = showRowGroup !== rowGroupColumnId;\n }\n }\n\n this.cellIsBlank = topLevelFooter ? false : (embeddedRowMismatch || nullValue || skipCell);\n\n if (this.cellIsBlank) { return; }\n\n this.setupShowingValueForOpenedParent();\n this.findDisplayedGroupNode();\n this.addFullWidthRowDraggerIfNeeded();\n this.addExpandAndContract();\n this.addCheckboxIfNeeded();\n this.addValueElement();\n this.setupIndent();\n this.refreshAriaExpanded();\n }\n\n protected destroy(): void {\n super.destroy();\n // property cleanup to avoid memory leaks\n this.expandListener = null;\n }\n\n private refreshAriaExpanded(): void {\n const { node, eParentOfValue } = this.params;\n\n if (this.expandListener) {\n this.expandListener = this.expandListener();\n }\n\n if (!this.isExpandable()) {\n removeAriaExpanded(eParentOfValue);\n return;\n }\n\n const listener = () => {\n // for react, we don't use JSX, as setting attributes via jsx is slower\n setAriaExpanded(eParentOfValue, !!node.expanded);\n };\n\n this.expandListener = this.addManagedListener(node, RowNode.EVENT_EXPANDED_CHANGED, listener) || null;\n listener();\n }\n\n private isTopLevelFooter(): boolean {\n if (!this.gridOptionsWrapper.isGroupIncludeTotalFooter()) { return false; }\n\n if (this.params.value != null || this.params.node.level != -1) { return false; }\n\n // at this point, we know it's the root node and there is no value present, so it's a footer cell.\n // the only thing to work out is if we are displaying groups across multiple\n // columns (groupMultiAutoColumn=true), we only want 'total' to appear in the first column.\n\n const colDef = this.params.colDef;\n const doingFullWidth = colDef == null;\n if (doingFullWidth) { return true; }\n\n if (colDef!.showRowGroup === true) { return true; }\n\n const rowGroupCols = this.columnModel.getRowGroupColumns();\n // this is a sanity check, rowGroupCols should always be present\n if (!rowGroupCols || rowGroupCols.length === 0) { return true; }\n\n const firstRowGroupCol = rowGroupCols[0];\n\n return firstRowGroupCol.getId() === colDef!.showRowGroup;\n }\n\n // if we are doing embedded full width rows, we only show the renderer when\n // in the body, or if pinning in the pinned section, or if pinning and RTL,\n // in the right section. otherwise we would have the cell repeated in each section.\n private isEmbeddedRowMismatch(): boolean {\n if (!this.params.fullWidth || !this.gridOptionsWrapper.isEmbedFullWidthRows()) { return false; }\n\n const pinnedLeftCell = this.params.pinned === Constants.PINNED_LEFT;\n const pinnedRightCell = this.params.pinned === Constants.PINNED_RIGHT;\n const bodyCell = !pinnedLeftCell && !pinnedRightCell;\n\n if (this.gridOptionsWrapper.isEnableRtl()) {\n if (this.columnModel.isPinningLeft()) {\n return !pinnedRightCell;\n }\n return !bodyCell;\n }\n\n if (this.columnModel.isPinningLeft()) {\n return !pinnedLeftCell;\n }\n\n return !bodyCell;\n }\n\n private findDisplayedGroupNode(): void {\n const column = this.params.column;\n const rowNode: RowNode = this.params.node;\n\n if (this.showingValueForOpenedParent) {\n let pointer = rowNode.parent;\n\n while (pointer != null) {\n if (pointer.rowGroupColumn && column!.isRowGroupDisplayed(pointer.rowGroupColumn.getId())) {\n this.displayedGroupNode = pointer;\n break;\n }\n pointer = pointer.parent;\n }\n }\n\n // if we didn't find a displayed group, set it to the row node\n if (missing(this.displayedGroupNode)) {\n this.displayedGroupNode = rowNode;\n }\n }\n\n private setupShowingValueForOpenedParent(): void {\n // note - this code depends on sortService.updateGroupDataForHiddenOpenParents, where group data\n // is updated to reflect the dragged down parents\n const rowNode: RowNode = this.params.node;\n const column = this.params.column as Column;\n\n if (!this.gridOptionsWrapper.isGroupHideOpenParents()) {\n this.showingValueForOpenedParent = false;\n return;\n }\n\n // hideOpenParents means rowNode.groupData can have data for the group this column is displaying, even though\n // this rowNode isn't grouping by the column we are displaying\n\n // if no groupData at all, we are not showing a parent value\n if (!rowNode.groupData) {\n this.showingValueForOpenedParent = false;\n return;\n }\n\n // this is the normal case, in that we are showing a group for which this column is configured. note that\n // this means the Row Group is closed (if it was open, we would not be displaying it)\n const showingGroupNode = rowNode.rowGroupColumn != null;\n if (showingGroupNode) {\n const keyOfGroupingColumn = rowNode.rowGroupColumn!.getId();\n const configuredToShowThisGroupLevel = column.isRowGroupDisplayed(keyOfGroupingColumn);\n // if showing group as normal, we didn't take group info from parent\n if (configuredToShowThisGroupLevel) {\n this.showingValueForOpenedParent = false;\n return;\n }\n }\n\n // see if we are showing a Group Value for the Displayed Group. if we are showing a group value, and this Row Node\n // is not grouping by this Displayed Group, we must of gotten the value from a parent node\n const valPresent = rowNode.groupData[column.getId()] != null;\n\n this.showingValueForOpenedParent = valPresent;\n }\n\n private addValueElement(): void {\n if (this.displayedGroupNode.footer) {\n this.addFooterValue();\n } else {\n this.addGroupValue();\n this.addChildCount();\n }\n }\n\n private addGroupValue(): void {\n\n // we try and use the cellRenderer of the column used for the grouping if we can\n const paramsAdjusted = this.adjustParamsWithDetailsFromRelatedColumn();\n const innerCompDetails = this.getInnerCompDetails(paramsAdjusted);\n\n const { valueFormatted, value } = paramsAdjusted;\n const valueWhenNoRenderer = valueFormatted != null ? valueFormatted : value;\n\n this.comp.setInnerRenderer(innerCompDetails, valueWhenNoRenderer);\n }\n\n private adjustParamsWithDetailsFromRelatedColumn(): GroupCellRendererParams {\n\n const relatedColumn = this.displayedGroupNode.rowGroupColumn;\n const column = this.params.column;\n\n if (!relatedColumn) { return this.params; }\n\n const notFullWidth = column != null;\n if (notFullWidth) {\n const showingThisRowGroup = column!.isRowGroupDisplayed(relatedColumn.getId());\n if (!showingThisRowGroup) { return this.params; }\n }\n\n const params = this.params;\n\n const { value, node } = this.params;\n const valueFormatted = this.valueFormatterService.formatValue(relatedColumn, node, value);\n\n // we don't update the original params, as they could of come through React,\n // as react has RowGroupCellRenderer, which means the params could be props which\n // would be read only\n const paramsAdjusted = {\n ...params,\n valueFormatted: valueFormatted\n };\n\n return paramsAdjusted;\n }\n\n private addFooterValue(): void {\n const footerValueGetter = this.params.footerValueGetter;\n let footerValue = '';\n\n if (footerValueGetter) {\n // params is same as we were given, except we set the value as the item to display\n const paramsClone = cloneObject(this.params);\n paramsClone.value = this.params.value;\n\n if (typeof footerValueGetter === 'function') {\n footerValue = footerValueGetter(paramsClone);\n } else if (typeof footerValueGetter === 'string') {\n footerValue = this.expressionService.evaluate(footerValueGetter, paramsClone);\n } else {\n console.warn('AG Grid: footerValueGetter should be either a function or a string (expression)');\n }\n } else {\n footerValue = 'Total ' + (this.params.value != null ? this.params.value : '');\n }\n\n const innerCompDetails = this.getInnerCompDetails(this.params);\n\n this.comp.setInnerRenderer(innerCompDetails, footerValue);\n }\n\n private getInnerCompDetails(params: GroupCellRendererParams): UserCompDetails | undefined {\n\n // for full width rows, we don't do any of the below\n if (params.fullWidth) {\n return this.userComponentFactory.getFullWidthGroupRowInnerCellRenderer(\n this.gridOptions.groupRowRendererParams, params);\n }\n\n // when grouping, the normal case is we use the cell renderer of the grouped column. eg if grouping by country\n // and then rating, we will use the country cell renderer for each country group row and likewise the rating\n // cell renderer for each rating group row.\n //\n // however if the user has innerCellRenderer defined, this gets preference and we don't use cell renderers\n // of the grouped columns.\n //\n // so we check and use in the following order:\n //\n // 1) thisColDef.cellRendererParams.innerRenderer of the column showing the groups (eg auto group column)\n // 2) groupedColDef.cellRenderer of the grouped column\n // 3) groupedColDef.cellRendererParams.innerRenderer\n\n // we check if cell renderer provided for the group cell renderer, eg colDef.cellRendererParams.innerRenderer\n const innerCompDetails = this.userComponentFactory\n .getInnerRendererDetails(params, params);\n\n // avoid using GroupCellRenderer again, otherwise stack overflow, as we insert same renderer again and again.\n // this covers off chance user is grouping by a column that is also configured with GroupCellRenderer\n const isGroupRowRenderer = (details: UserCompDetails | undefined) => details && details.componentClass == this.compClass;\n\n if (innerCompDetails && !isGroupRowRenderer(innerCompDetails)) {\n // use the renderer defined in cellRendererParams.innerRenderer\n return innerCompDetails;\n }\n\n const relatedColumn = this.displayedGroupNode.rowGroupColumn;\n const relatedColDef = relatedColumn ? relatedColumn.getColDef() : undefined;\n\n if (!relatedColDef) {\n return;\n }\n\n // otherwise see if we can use the cellRenderer of the column we are grouping by\n const relatedCompDetails = this.userComponentFactory\n .getCellRendererDetails(relatedColDef, params);\n\n if (relatedCompDetails && !isGroupRowRenderer(relatedCompDetails)) {\n // Only if the original column is using a specific renderer, it it is a using a DEFAULT one ignore it\n return relatedCompDetails;\n }\n\n if (isGroupRowRenderer(relatedCompDetails) &&\n relatedColDef.cellRendererParams &&\n relatedColDef.cellRendererParams.innerRenderer) {\n // edge case - this comes from a column which has been grouped dynamically, that has a renderer 'group'\n // and has an inner cell renderer\n const res = this.userComponentFactory.getInnerRendererDetails(relatedColDef.cellRendererParams, params);\n return res;\n }\n }\n\n private addChildCount(): void {\n // only include the child count if it's included, eg if user doing custom aggregation,\n // then this could be left out, or set to -1, ie no child count\n if (this.params.suppressCount) { return; }\n\n this.addManagedListener(this.displayedGroupNode, RowNode.EVENT_ALL_CHILDREN_COUNT_CHANGED, this.updateChildCount.bind(this));\n\n // filtering changes the child count, so need to cater for it\n this.updateChildCount();\n }\n\n private updateChildCount(): void {\n const allChildrenCount = this.displayedGroupNode.allChildrenCount;\n const showingGroupForThisNode = this.isShowRowGroupForThisRow();\n const showCount = showingGroupForThisNode && allChildrenCount != null && allChildrenCount >= 0;\n const countString = showCount ? `(${allChildrenCount})` : ``;\n this.comp.setChildCount(countString);\n }\n\n private isShowRowGroupForThisRow(): boolean {\n if (this.gridOptionsWrapper.isTreeData()) { return true; }\n\n const rowGroupColumn = this.displayedGroupNode.rowGroupColumn;\n\n if (!rowGroupColumn) { return false; }\n\n // column is null for fullWidthRows\n const column = this.params.column;\n const thisColumnIsInterested = column == null || column.isRowGroupDisplayed(rowGroupColumn.getId());\n\n return thisColumnIsInterested;\n }\n\n private addExpandAndContract(): void {\n const params = this.params;\n const eExpandedIcon = createIconNoSpan('groupExpanded', this.gridOptionsWrapper, null);\n const eContractedIcon = createIconNoSpan('groupContracted', this.gridOptionsWrapper, null);\n\n if (eExpandedIcon) {\n this.eExpanded.appendChild(eExpandedIcon);\n }\n\n if (eContractedIcon) {\n this.eContracted.appendChild(eContractedIcon);\n }\n\n const eGroupCell = params.eGridCell;\n\n // if editing groups, then double click is to start editing\n if (!this.gridOptionsWrapper.isEnableGroupEdit() && this.isExpandable() && !params.suppressDoubleClickExpand) {\n this.addManagedListener(eGroupCell, 'dblclick', this.onCellDblClicked.bind(this));\n }\n\n this.addManagedListener(this.eExpanded, 'click', this.onExpandClicked.bind(this));\n this.addManagedListener(this.eContracted, 'click', this.onExpandClicked.bind(this));\n\n // expand / contract as the user hits enter\n this.addManagedListener(eGroupCell, 'keydown', this.onKeyDown.bind(this));\n this.addManagedListener(params.node, RowNode.EVENT_EXPANDED_CHANGED, this.showExpandAndContractIcons.bind(this));\n\n this.showExpandAndContractIcons();\n\n // because we don't show the expand / contract when there are no children, we need to check every time\n // the number of children change.\n const expandableChangedListener = this.onRowNodeIsExpandableChanged.bind(this);\n this.addManagedListener(this.displayedGroupNode, RowNode.EVENT_ALL_CHILDREN_COUNT_CHANGED, expandableChangedListener);\n this.addManagedListener(this.displayedGroupNode, RowNode.EVENT_MASTER_CHANGED, expandableChangedListener);\n this.addManagedListener(this.displayedGroupNode, RowNode.EVENT_GROUP_CHANGED, expandableChangedListener);\n this.addManagedListener(this.displayedGroupNode, RowNode.EVENT_HAS_CHILDREN_CHANGED, expandableChangedListener);\n }\n\n private onExpandClicked(mouseEvent: MouseEvent): void {\n if (isStopPropagationForAgGrid(mouseEvent)) { return; }\n\n // so if we expand a node, it does not also get selected.\n stopPropagationForAgGrid(mouseEvent);\n\n this.onExpandOrContract(mouseEvent);\n }\n\n private onExpandOrContract(e: MouseEvent | KeyboardEvent): void {\n // must use the displayedGroup, so if data was dragged down, we expand the parent, not this row\n const rowNode: RowNode = this.displayedGroupNode;\n const nextExpandState = !rowNode.expanded;\n rowNode.setExpanded(nextExpandState, e);\n }\n\n private isExpandable(): boolean {\n if (this.showingValueForOpenedParent) { return true; }\n\n const rowNode = this.displayedGroupNode;\n const reducedLeafNode = this.columnModel.isPivotMode() && rowNode.leafGroup;\n const expandableGroup = rowNode.isExpandable() && !rowNode.footer && !reducedLeafNode;\n\n if (!expandableGroup) { return false; }\n\n // column is null for fullWidthRows\n const column = this.params.column;\n const displayingForOneColumnOnly = column != null && typeof column.getColDef().showRowGroup === 'string';\n\n if (displayingForOneColumnOnly) {\n const showing = this.isShowRowGroupForThisRow();\n return showing;\n }\n\n return true;\n }\n\n private showExpandAndContractIcons(): void {\n const { params, displayedGroupNode: displayedGroup, columnModel } = this;\n const { node } = params;\n\n const isExpandable = this.isExpandable();\n\n if (isExpandable) {\n // if expandable, show one based on expand state.\n // if we were dragged down, means our parent is always expanded\n const expanded = this.showingValueForOpenedParent ? true : node.expanded;\n this.comp.setExpandedDisplayed(expanded);\n this.comp.setContractedDisplayed(!expanded);\n } else {\n // it not expandable, show neither\n this.comp.setExpandedDisplayed(false);\n this.comp.setContractedDisplayed(false);\n }\n\n // compensation padding for leaf nodes, so there is blank space instead of the expand icon\n const pivotMode = columnModel.isPivotMode();\n const pivotModeAndLeafGroup = pivotMode && displayedGroup.leafGroup;\n const addExpandableCss = isExpandable && !pivotModeAndLeafGroup;\n const isTotalFooterNode = node.footer && node.level === -1;\n\n this.comp.addOrRemoveCssClass('ag-cell-expandable', addExpandableCss);\n this.comp.addOrRemoveCssClass('ag-row-group', addExpandableCss);\n\n if (pivotMode) {\n this.comp.addOrRemoveCssClass('ag-pivot-leaf-group', pivotModeAndLeafGroup);\n } else if (!isTotalFooterNode) {\n this.comp.addOrRemoveCssClass('ag-row-group-leaf-indent', !addExpandableCss);\n }\n }\n\n private onRowNodeIsExpandableChanged(): void {\n // maybe if no children now, we should hide the expand / contract icons\n this.showExpandAndContractIcons();\n\n // if we have no children, this impacts the indent\n this.setIndent();\n\n this.refreshAriaExpanded();\n }\n\n private setupIndent(): void {\n // only do this if an indent - as this overwrites the padding that\n // the theme set, which will make things look 'not aligned' for the\n // first group level.\n const node: RowNode = this.params.node;\n const suppressPadding = this.params.suppressPadding;\n\n if (!suppressPadding) {\n this.addManagedListener(node, RowNode.EVENT_UI_LEVEL_CHANGED, this.setIndent.bind(this));\n this.setIndent();\n }\n }\n\n private setIndent(): void {\n if (this.gridOptionsWrapper.isGroupHideOpenParents()) { return; }\n\n const params = this.params;\n const rowNode: RowNode = params.node;\n // if we are only showing one group column, we don't want to be indenting based on level\n const fullWithRow = !!params.colDef;\n const treeData = this.gridOptionsWrapper.isTreeData();\n const manyDimensionThisColumn = !fullWithRow || treeData || params.colDef!.showRowGroup === true;\n const paddingCount = manyDimensionThisColumn ? rowNode.uiLevel : 0;\n const userProvidedPaddingPixelsTheDeprecatedWay = params.padding >= 0;\n\n if (userProvidedPaddingPixelsTheDeprecatedWay) {\n doOnce(() => console.warn('AG Grid: cellRendererParams.padding no longer works, it was deprecated in since v14.2 and removed in v26, configuring padding for groupCellRenderer should be done with Sass variables and themes. Please see the AG Grid documentation page for Themes, in particular the property $row-group-indent-size.'), 'groupCellRenderer->doDeprecatedWay');\n }\n\n if (this.indentClass) {\n this.comp.addOrRemoveCssClass(this.indentClass, false);\n }\n\n this.indentClass = 'ag-row-group-indent-' + paddingCount;\n this.comp.addOrRemoveCssClass(this.indentClass, true);\n }\n\n private addFullWidthRowDraggerIfNeeded(): void {\n if (!this.params.fullWidth || !this.params.rowDrag) { return; }\n\n const rowDragComp = new RowDragComp(() => this.params.value, this.params.node);\n this.createManagedBean(rowDragComp, this.context);\n\n this.eGui.insertAdjacentElement('afterbegin', rowDragComp.getGui());\n }\n\n private isUserWantsSelected(): boolean {\n const paramsCheckbox = this.params.checkbox;\n\n if (typeof paramsCheckbox === 'function') { return paramsCheckbox(this.params); }\n\n return paramsCheckbox === true;\n }\n\n private addCheckboxIfNeeded(): void {\n const rowNode = this.displayedGroupNode;\n const checkboxNeeded = this.isUserWantsSelected() &&\n // footers cannot be selected\n !rowNode.footer &&\n // pinned rows cannot be selected\n !rowNode.rowPinned &&\n // details cannot be selected\n !rowNode.detail;\n\n if (checkboxNeeded) {\n const cbSelectionComponent = new CheckboxSelectionComponent();\n this.getContext().createBean(cbSelectionComponent);\n\n cbSelectionComponent.init({ rowNode: rowNode, column: this.params.column });\n this.eCheckbox.appendChild(cbSelectionComponent.getGui());\n this.addDestroyFunc(() => this.getContext().destroyBean(cbSelectionComponent));\n }\n\n this.comp.setCheckboxVisible(checkboxNeeded);\n }\n\n private onKeyDown(event: KeyboardEvent): void {\n const enterKeyPressed = event.key === KeyCode.ENTER;\n\n if (!enterKeyPressed || this.params.suppressEnterExpand) { return; }\n\n const cellEditable = this.params.column && this.params.column.isCellEditable(this.params.node);\n\n if (cellEditable) { return; }\n\n this.onExpandOrContract(event);\n }\n\n private onCellDblClicked(mouseEvent: MouseEvent): void {\n if (isStopPropagationForAgGrid(mouseEvent)) { return; }\n\n // we want to avoid acting on double click events on the expand / contract icon,\n // as that icons already has expand / collapse functionality on it. otherwise if\n // the icon was double clicked, we would get 'click', 'click', 'dblclick' which\n // is open->close->open, however double click should be open->close only.\n const targetIsExpandIcon\n = isElementInEventPath(this.eExpanded, mouseEvent)\n || isElementInEventPath(this.eContracted, mouseEvent);\n\n if (!targetIsExpandIcon) {\n this.onExpandOrContract(mouseEvent);\n }\n }\n}\n","import { UserCompDetails } from \"../../components/framework/userComponentFactory\";\nimport { setAriaRole } from \"../../utils/aria\";\nimport { setDisplayed } from \"../../utils/dom\";\nimport { Component } from \"../../widgets/component\";\nimport { RefSelector } from \"../../widgets/componentAnnotations\";\nimport { GroupCellRendererCtrl, GroupCellRendererParams, IGroupCellRenderer } from \"./groupCellRendererCtrl\";\nimport { ICellRendererComp } from \"./iCellRenderer\";\n\nexport class GroupCellRenderer extends Component implements ICellRendererComp {\n\n private static TEMPLATE = /* html */\n `\n \n \n \n \n \n `;\n\n @RefSelector('eExpanded') private eExpanded: HTMLElement;\n @RefSelector('eContracted') private eContracted: HTMLElement;\n @RefSelector('eCheckbox') private eCheckbox: HTMLElement;\n @RefSelector('eValue') private eValue: HTMLElement;\n @RefSelector('eChildCount') private eChildCount: HTMLElement;\n\n // this cell renderer\n private innerCellRenderer: ICellRendererComp;\n\n constructor() {\n super(GroupCellRenderer.TEMPLATE);\n }\n\n public init(params: GroupCellRendererParams): void {\n\n const compProxy: IGroupCellRenderer = {\n setInnerRenderer: (compDetails, valueToDisplay) => this.setRenderDetails(compDetails, valueToDisplay),\n setChildCount: count => this.eChildCount.innerHTML = count,\n addOrRemoveCssClass: (cssClass, value) => this.addOrRemoveCssClass(cssClass, value),\n setContractedDisplayed: expanded => setDisplayed(this.eContracted, expanded),\n setExpandedDisplayed: expanded => setDisplayed(this.eExpanded, expanded),\n setCheckboxVisible: visible => this.eCheckbox.classList.toggle('ag-invisible', !visible)\n };\n\n const ctrl = this.createManagedBean(new GroupCellRendererCtrl());\n const fullWidth = !params.colDef;\n const eGui = this.getGui();\n ctrl.init(compProxy, eGui, this.eCheckbox, this.eExpanded, this.eContracted, this.constructor, params);\n\n if (fullWidth) {\n setAriaRole(eGui, 'gridcell');\n }\n }\n\n private setRenderDetails(compDetails: UserCompDetails | undefined, valueToDisplay: any): void {\n\n if (compDetails) {\n const componentPromise = compDetails.newAgStackInstance();\n if (!componentPromise) { return; }\n componentPromise.then(comp => {\n if (!comp) { return; }\n const destroyComp = () => this.context.destroyBean(comp);\n if (this.isAlive()) {\n this.eValue.appendChild(comp.getGui());\n this.addDestroyFunc(destroyComp);\n } else {\n destroyComp();\n }\n });\n } else {\n this.eValue.innerText = valueToDisplay;\n }\n }\n\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to have public here instead of private or protected\n public destroy(): void {\n this.getContext().destroyBean(this.innerCellRenderer);\n super.destroy();\n }\n\n public refresh(): boolean {\n return false;\n }\n}\n","import { Component } from \"../../widgets/component\";\nimport { ICellRendererParams } from \"./iCellRenderer\";\nimport { RefSelector } from \"../../widgets/componentAnnotations\";\nimport { createIconNoSpan } from \"../../utils/icon\";\nimport { IComponent } from \"../../interfaces/iComponent\";\n\nexport interface ILoadingCellRendererParams extends ICellRendererParams { }\nexport interface ILoadingCellRenderer { }\nexport interface ILoadingCellRendererComp extends ILoadingCellRenderer, IComponent { }\n\nexport class LoadingCellRenderer extends Component implements ILoadingCellRendererComp {\n\n private static TEMPLATE =\n `
\n \n \n
`;\n\n @RefSelector('eLoadingIcon') private eLoadingIcon: HTMLElement;\n @RefSelector('eLoadingText') private eLoadingText: HTMLElement;\n\n constructor() {\n super(LoadingCellRenderer.TEMPLATE);\n }\n\n public init(params: ILoadingCellRendererParams): void {\n params.node.failedLoad ? this.setupFailed() : this.setupLoading();\n }\n\n private setupFailed(): void {\n this.eLoadingText.innerText = 'ERR';\n }\n\n private setupLoading(): void {\n const eLoadingIcon = createIconNoSpan('groupLoading', this.gridOptionsWrapper, null);\n if (eLoadingIcon) {\n this.eLoadingIcon.appendChild(eLoadingIcon);\n }\n\n const localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n this.eLoadingText.innerText = localeTextFunc('loadingOoo', 'Loading');\n }\n\n public refresh(params: ILoadingCellRendererParams): boolean {\n return false;\n }\n\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n public destroy(): void {\n super.destroy();\n }\n}","import { IComponent } from \"../../interfaces/iComponent\";\nimport { AgGridCommon } from \"../../interfaces/iCommon\";\nimport { Component } from \"../../widgets/component\";\n\nexport interface ILoadingOverlayParams extends AgGridCommon { }\n\nexport interface ILoadingOverlayComp extends IComponent { }\n\nexport class LoadingOverlayComponent extends Component implements ILoadingOverlayComp {\n\n private static DEFAULT_LOADING_OVERLAY_TEMPLATE = '[LOADING...]';\n\n constructor() {\n super();\n }\n\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n public destroy(): void {\n super.destroy();\n }\n\n public init(params: ILoadingOverlayParams): void {\n const template =\n this.gridOptionsWrapper.getOverlayLoadingTemplate() ?\n this.gridOptionsWrapper.getOverlayLoadingTemplate() : LoadingOverlayComponent.DEFAULT_LOADING_OVERLAY_TEMPLATE;\n\n const localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n const localisedTemplate = template!.replace('[LOADING...]', localeTextFunc('loadingOoo', 'Loading...'));\n\n this.setTemplate(localisedTemplate);\n }\n}\n","import { AgGridCommon } from \"../../interfaces/iCommon\";\nimport { IComponent } from \"../../interfaces/iComponent\";\nimport { Component } from \"../../widgets/component\";\n\nexport interface INoRowsOverlayParams extends AgGridCommon { }\n\nexport interface INoRowsOverlayComp extends IComponent { }\n\nexport class NoRowsOverlayComponent extends Component implements INoRowsOverlayComp {\n private static DEFAULT_NO_ROWS_TEMPLATE = '[NO_ROWS_TO_SHOW]';\n\n constructor() {\n super();\n }\n\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n public destroy(): void {\n super.destroy();\n }\n\n public init(params: INoRowsOverlayParams): void {\n const template =\n this.gridOptionsWrapper.getOverlayNoRowsTemplate() ?\n this.gridOptionsWrapper.getOverlayNoRowsTemplate() : NoRowsOverlayComponent.DEFAULT_NO_ROWS_TEMPLATE;\n\n const localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n const localisedTemplate = template!.replace('[NO_ROWS_TO_SHOW]', localeTextFunc('noRowsToShow', 'No Rows To Show'));\n this.setTemplate(localisedTemplate);\n }\n}\n","import { PopupComponent } from '../widgets/popupComponent';\nimport { IComponent } from '../interfaces/iComponent';\nimport { escapeString } from '../utils/string';\nimport { RowNode } from '../entities/rowNode';\nimport { Column } from '../entities/column';\nimport { ColumnGroup } from '../entities/columnGroup';\nimport { ColGroupDef, ColDef } from '../entities/colDef';\nimport { AgGridCommon } from '../interfaces/iCommon';\n\nexport interface ITooltipParams extends AgGridCommon {\n /** What part of the application is showing the tooltip, e.g. 'cell', 'header', 'menuItem' etc */\n location: string;\n /** The value to be rendered by the tooltip. */\n value?: any;\n /** The formatted value to be rendered by the tooltip. */\n valueFormatted?: any;\n /** Column / ColumnGroup definition. */\n colDef?: ColDef | ColGroupDef | null;\n /** Column / ColumnGroup */\n column?: Column | ColumnGroup;\n /** The index of the row containing the cell rendering the tooltip. */\n rowIndex?: number;\n /** The row node. */\n node?: RowNode;\n /** Data for the row node in question. */\n data?: any;\n}\n\nexport interface ITooltipComp extends IComponent { }\n\nexport class TooltipComponent extends PopupComponent implements ITooltipComp {\n constructor() {\n super(/* html */`
`);\n }\n\n // will need to type params\n public init(params: ITooltipParams): void {\n const { value } = params;\n this.getGui().innerHTML = escapeString(value) as string;\n }\n}\n","import { BeanStub } from \"../../context/beanStub\";\nimport { Autowired, Bean, PostConstruct } from \"../../context/context\";\nimport { GridOptions } from \"../../entities/gridOptions\";\nimport { ReadOnlyFloatingFilter } from \"../../filter/floating/provided/readOnlyFloatingFilter\";\nimport { DateFilter } from \"../../filter/provided/date/dateFilter\";\nimport { DateFloatingFilter } from \"../../filter/provided/date/dateFloatingFilter\";\nimport { DefaultDateComponent } from \"../../filter/provided/date/defaultDateComponent\";\nimport { NumberFilter } from \"../../filter/provided/number/numberFilter\";\nimport { NumberFloatingFilter } from \"../../filter/provided/number/numberFloatingFilter\";\nimport { TextFilter } from \"../../filter/provided/text/textFilter\";\nimport { TextFloatingFilter } from \"../../filter/provided/text/textFloatingFilter\";\nimport { HeaderComp } from \"../../headerRendering/cells/column/headerComp\";\nimport { HeaderGroupComp } from \"../../headerRendering/cells/columnGroup/headerGroupComp\";\nimport { IComponent } from \"../../interfaces/iComponent\";\nimport { LargeTextCellEditor } from \"../../rendering/cellEditors/largeTextCellEditor\";\nimport { PopupSelectCellEditor } from \"../../rendering/cellEditors/popupSelectCellEditor\";\nimport { PopupTextCellEditor } from \"../../rendering/cellEditors/popupTextCellEditor\";\nimport { SelectCellEditor } from \"../../rendering/cellEditors/selectCellEditor\";\nimport { TextCellEditor } from \"../../rendering/cellEditors/textCellEditor\";\nimport { AnimateShowChangeCellRenderer } from \"../../rendering/cellRenderers/animateShowChangeCellRenderer\";\nimport { AnimateSlideCellRenderer } from \"../../rendering/cellRenderers/animateSlideCellRenderer\";\nimport { GroupCellRenderer } from \"../../rendering/cellRenderers/groupCellRenderer\";\nimport { LoadingCellRenderer } from \"../../rendering/cellRenderers/loadingCellRenderer\";\nimport { LoadingOverlayComponent } from \"../../rendering/overlays/loadingOverlayComponent\";\nimport { NoRowsOverlayComponent } from \"../../rendering/overlays/noRowsOverlayComponent\";\nimport { TooltipComponent } from \"../../rendering/tooltipComponent\";\nimport { doOnce } from \"../../utils/function\";\nimport { iterateObject } from '../../utils/object';\nimport { AgComponentUtils } from \"./agComponentUtils\";\n\n/**\n * B the business interface (ie IHeader)\n * A the agGridComponent interface (ie IHeaderComp). The final object acceptable by ag-grid\n */\nexport interface RegisteredComponent {\n component: any;\n componentFromFramework: boolean;\n}\n\nexport interface DeprecatedComponentName {\n propertyHolder: string;\n newComponentName: string;\n}\n\n@Bean('userComponentRegistry')\nexport class UserComponentRegistry extends BeanStub {\n\n @Autowired('gridOptions') private gridOptions: GridOptions;\n @Autowired('agComponentUtils') private readonly agComponentUtils: AgComponentUtils;\n\n private agGridDefaults: { [key: string]: any } = {\n //date\n agDateInput: DefaultDateComponent,\n\n //header\n agColumnHeader: HeaderComp,\n agColumnGroupHeader: HeaderGroupComp,\n\n //floating filters\n agTextColumnFloatingFilter: TextFloatingFilter,\n agNumberColumnFloatingFilter: NumberFloatingFilter,\n agDateColumnFloatingFilter: DateFloatingFilter,\n agReadOnlyFloatingFilter: ReadOnlyFloatingFilter,\n\n // renderers\n agAnimateShowChangeCellRenderer: AnimateShowChangeCellRenderer,\n agAnimateSlideCellRenderer: AnimateSlideCellRenderer,\n agGroupCellRenderer: GroupCellRenderer,\n agGroupRowRenderer: GroupCellRenderer,\n agLoadingCellRenderer: LoadingCellRenderer,\n\n //editors\n agCellEditor: TextCellEditor,\n agTextCellEditor: TextCellEditor,\n agSelectCellEditor: SelectCellEditor,\n agPopupTextCellEditor: PopupTextCellEditor,\n agPopupSelectCellEditor: PopupSelectCellEditor,\n agLargeTextCellEditor: LargeTextCellEditor,\n\n //filter\n agTextColumnFilter: TextFilter,\n agNumberColumnFilter: NumberFilter,\n agDateColumnFilter: DateFilter,\n\n //overlays\n agLoadingOverlay: LoadingOverlayComponent,\n agNoRowsOverlay: NoRowsOverlayComponent,\n\n // tooltips\n agTooltipComponent: TooltipComponent\n };\n\n private agDeprecatedNames: { [key: string]: DeprecatedComponentName; } = {\n set: {\n newComponentName: 'agSetColumnFilter',\n propertyHolder: 'filter'\n },\n text: {\n newComponentName: 'agTextColumnFilter',\n propertyHolder: 'filter'\n },\n number: {\n newComponentName: 'agNumberColumnFilter',\n propertyHolder: 'filter'\n },\n date: {\n newComponentName: 'agDateColumnFilter',\n propertyHolder: 'filter'\n },\n\n group: {\n newComponentName: 'agGroupCellRenderer',\n propertyHolder: 'cellRenderer'\n },\n animateShowChange: {\n newComponentName: 'agAnimateShowChangeCellRenderer',\n propertyHolder: 'cellRenderer'\n },\n animateSlide: {\n newComponentName: 'agAnimateSlideCellRenderer',\n propertyHolder: 'cellRenderer'\n },\n\n select: {\n newComponentName: 'agSelectCellEditor',\n propertyHolder: 'cellEditor'\n },\n largeText: {\n newComponentName: 'agLargeTextCellEditor',\n propertyHolder: 'cellEditor'\n },\n popupSelect: {\n newComponentName: 'agPopupSelectCellEditor',\n propertyHolder: 'cellEditor'\n },\n popupText: {\n newComponentName: 'agPopupTextCellEditor',\n propertyHolder: 'cellEditor'\n },\n richSelect: {\n newComponentName: 'agRichSelectCellEditor',\n propertyHolder: 'cellEditor'\n },\n headerComponent: {\n newComponentName: 'agColumnHeader',\n propertyHolder: 'headerComponent'\n }\n };\n\n private jsComps: { [key: string]: any } = {};\n private fwComps: { [key: string]: any } = {};\n\n @PostConstruct\n private init(): void {\n if (this.gridOptions.components != null) {\n iterateObject(this.gridOptions.components, (key, component) => this.registerJsComponent(key, component));\n }\n\n if (this.gridOptions.frameworkComponents != null) {\n iterateObject(this.gridOptions.frameworkComponents,\n (key, component) => this.registerFwComponent(key, component as any));\n }\n }\n\n public registerDefaultComponent(rawName: string, component: any) {\n const name = this.translateIfDeprecated(rawName);\n\n if (this.agGridDefaults[name]) {\n console.error(`Trying to overwrite a default component. You should call registerComponent`);\n return;\n }\n\n this.agGridDefaults[name] = component;\n }\n\n private registerJsComponent(rawName: string, component: any) {\n const name = this.translateIfDeprecated(rawName);\n\n if (this.fwComps[name]) {\n console.error(`Trying to register a component that you have already registered for frameworks: ${name}`);\n return;\n }\n\n this.jsComps[name] = component;\n }\n\n /**\n * B the business interface (ie IHeader)\n * A the agGridComponent interface (ie IHeaderComp). The final object acceptable by ag-grid\n */\n private registerFwComponent
& B, B>(rawName: string, component: { new(): IComponent; }) {\n const warningMessage = `AG Grid: As of v27, registering components via grid property frameworkComponents is deprecated. Instead register both JavaScript AND Framework Components via the components property.`;\n doOnce( ()=> console.warn(warningMessage), `UserComponentRegistry.frameworkComponentsDeprecated`);\n\n const name = this.translateIfDeprecated(rawName);\n this.fwComps[name] = component;\n }\n\n public retrieve(rawName: string): {componentFromFramework: boolean, component: any} | null {\n const name = this.translateIfDeprecated(rawName);\n\n const createResult = (component: any, componentFromFramework: boolean) => ({componentFromFramework, component});\n\n // FrameworkOverrides.frameworkComponent() is used in two locations:\n // 1) for Vue, user provided components get registered via a framework specific way.\n // 2) for React, it's how the React UI provides alternative default components (eg GroupCellRenderer and DetailCellRenderer)\n const registeredViaFrameworkComp = this.getFrameworkOverrides().frameworkComponent(name);\n if (registeredViaFrameworkComp!=null) {\n return createResult(registeredViaFrameworkComp, true);\n }\n\n const frameworkComponent = this.fwComps[name];\n if (frameworkComponent) {\n return createResult(frameworkComponent, true);\n }\n\n const jsComponent = this.jsComps[name];\n if (jsComponent) {\n const isFwkComp = this.getFrameworkOverrides().isFrameworkComponent(jsComponent);\n return createResult(jsComponent, isFwkComp);\n }\n\n const defaultComponent = this.agGridDefaults[name];\n if (defaultComponent) {\n return createResult(defaultComponent, false);\n }\n\n if (Object.keys(this.agGridDefaults).indexOf(name) < 0) {\n console.warn(`AG Grid: Looking for component [${name}] but it wasn't found.`);\n }\n\n return null;\n }\n\n private translateIfDeprecated(raw: string): string {\n const deprecatedInfo = this.agDeprecatedNames[raw];\n\n if (deprecatedInfo != null) {\n doOnce(() => {\n console.warn(`ag-grid. Since v15.0 component names have been renamed to be namespaced. You should rename ${deprecatedInfo.propertyHolder}:${raw} to ${deprecatedInfo.propertyHolder}:${deprecatedInfo.newComponentName}`);\n }, 'DEPRECATE_COMPONENT_' + raw);\n\n return deprecatedInfo.newComponentName;\n }\n\n return raw;\n }\n}\n","export interface ComponentType {\n propertyName: string;\n cellRenderer: boolean;\n}\n\nexport const DateComponent: ComponentType = {\n propertyName: 'dateComponent',\n cellRenderer: false\n};\n\nexport const HeaderComponent: ComponentType = {\n propertyName: 'headerComponent',\n cellRenderer: false\n};\n\nexport const HeaderGroupComponent: ComponentType = {\n propertyName: 'headerGroupComponent',\n cellRenderer: false\n};\n\nexport const CellRendererComponent: ComponentType = {\n propertyName: 'cellRenderer',\n cellRenderer: true\n};\n\nexport const CellEditorComponent: ComponentType = {\n propertyName: 'cellEditor',\n cellRenderer: false\n};\n\nexport const InnerRendererComponent: ComponentType = {\n propertyName: 'innerRenderer',\n cellRenderer: true\n};\n\nexport const LoadingOverlayComponent: ComponentType = {\n propertyName: 'loadingOverlayComponent',\n cellRenderer: false\n};\n\nexport const NoRowsOverlayComponent: ComponentType = {\n propertyName: 'noRowsOverlayComponent',\n cellRenderer: false\n};\n\nexport const TooltipComponent: ComponentType = {\n propertyName: 'tooltipComponent',\n cellRenderer: false\n};\n\nexport const FilterComponent: ComponentType = {\n propertyName: 'filter',\n cellRenderer: false\n};\n\nexport const FloatingFilterComponent: ComponentType = {\n propertyName: 'floatingFilterComponent',\n cellRenderer: false\n};\n\nexport const ToolPanelComponent: ComponentType = {\n propertyName: 'toolPanel',\n cellRenderer: false\n};\n\nexport const StatusPanelComponent: ComponentType = {\n propertyName: 'statusPanel',\n cellRenderer: false\n};\n\nexport const FullWidth: ComponentType = {\n propertyName: 'fullWidthCellRenderer',\n cellRenderer: true\n};\n\nexport const FullWidthLoading: ComponentType = {\n propertyName: 'loadingCellRenderer',\n cellRenderer: true\n};\n\nexport const FullWidthGroup: ComponentType = {\n propertyName: 'groupRowRenderer',\n cellRenderer: true\n};\n\nexport const FullWidthDetail: ComponentType = {\n propertyName: 'detailCellRenderer',\n cellRenderer: true\n};\n","export class FloatingFilterMapper {\n private static filterToFloatingFilterMapping: { [p: string]: string; } = {\n set: 'agSetColumnFloatingFilter',\n agSetColumnFilter: 'agSetColumnFloatingFilter',\n\n multi: 'agMultiColumnFloatingFilter',\n agMultiColumnFilter: 'agMultiColumnFloatingFilter',\n\n number: 'agNumberColumnFloatingFilter',\n agNumberColumnFilter: 'agNumberColumnFloatingFilter',\n\n date: 'agDateColumnFloatingFilter',\n agDateColumnFilter: 'agDateColumnFloatingFilter',\n\n text: 'agTextColumnFloatingFilter',\n agTextColumnFilter: 'agTextColumnFloatingFilter'\n };\n\n public static getFloatingFilterType(filterType: string): string {\n return this.filterToFloatingFilterMapping[filterType];\n }\n}\n","import { BeanStub } from \"../../context/beanStub\";\nimport { Autowired, Bean, Optional } from \"../../context/context\";\nimport { CellEditorSelectorFunc, CellEditorSelectorResult, CellRendererSelectorFunc, ColDef, ColGroupDef } from \"../../entities/colDef\";\nimport { GridOptions } from \"../../entities/gridOptions\";\nimport { ToolPanelDef } from \"../../entities/sideBar\";\nimport { IFloatingFilterParams } from \"../../filter/floating/floatingFilter\";\nimport { IHeaderParams } from \"../../headerRendering/cells/column/headerComp\";\nimport { IHeaderGroupParams } from \"../../headerRendering/cells/columnGroup/headerGroupComp\";\nimport { ICellEditorParams } from \"../../interfaces/iCellEditor\";\nimport { IFilterDef, IFilterParams } from \"../../interfaces/iFilter\";\nimport { IRichCellEditorParams } from \"../../interfaces/iRichCellEditorParams\";\nimport { ISetFilterParams } from \"../../interfaces/iSetFilter\";\nimport { IStatusPanelParams, StatusPanelDef } from \"../../interfaces/iStatusPanel\";\nimport { IToolPanelParams } from \"../../interfaces/iToolPanel\";\nimport { GroupCellRendererParams } from \"../../rendering/cellRenderers/groupCellRendererCtrl\";\nimport { ICellRendererParams, ISetFilterCellRendererParams } from \"../../rendering/cellRenderers/iCellRenderer\";\nimport { IDateParams } from \"../../rendering/dateComponent\";\nimport { ILoadingOverlayParams } from \"../../rendering/overlays/loadingOverlayComponent\";\nimport { INoRowsOverlayParams } from \"../../rendering/overlays/noRowsOverlayComponent\";\nimport { ITooltipParams } from \"../../rendering/tooltipComponent\";\nimport { AgPromise } from \"../../utils\";\nimport { mergeDeep } from '../../utils/object';\nimport { AgComponentUtils } from \"./agComponentUtils\";\nimport { ComponentMetadata, ComponentMetadataProvider } from \"./componentMetadataProvider\";\nimport {\n CellEditorComponent,\n CellRendererComponent,\n ComponentType,\n DateComponent,\n FilterComponent,\n FloatingFilterComponent,\n FullWidth,\n FullWidthDetail,\n FullWidthGroup,\n FullWidthLoading,\n HeaderComponent,\n HeaderGroupComponent,\n InnerRendererComponent,\n LoadingOverlayComponent,\n NoRowsOverlayComponent,\n StatusPanelComponent,\n ToolPanelComponent,\n TooltipComponent\n} from \"./componentTypes\";\nimport { FrameworkComponentWrapper } from \"./frameworkComponentWrapper\";\nimport { UserComponentRegistry } from \"./userComponentRegistry\";\nimport { FloatingFilterMapper } from '../../filter/floating/floatingFilterMapper';\nimport { ModuleNames } from '../../modules/moduleNames';\nimport { ModuleRegistry } from '../../modules/moduleRegistry';\nimport { doOnce } from \"../../utils/function\";\nimport { AgGridCommon, WithoutGridCommon } from \"../../interfaces/iCommon\";\n\nexport type DefinitionObject =\n GridOptions\n | ColDef\n | ColGroupDef\n | IFilterDef\n | ISetFilterParams\n | IRichCellEditorParams\n | ToolPanelDef\n | StatusPanelDef;\n\nexport interface UserCompDetails {\n componentClass: any;\n componentFromFramework: boolean;\n params: any;\n type: ComponentType;\n popupFromSelector?: boolean,\n popupPositionFromSelector?: string,\n newAgStackInstance: () => AgPromise;\n}\n\nconst ANNOTATIONS = '__annotations__';\n\n@Bean('userComponentFactory')\nexport class UserComponentFactory extends BeanStub {\n\n @Autowired('gridOptions') private readonly gridOptions: GridOptions;\n @Autowired('agComponentUtils') private readonly agComponentUtils: AgComponentUtils;\n @Autowired('componentMetadataProvider') private readonly componentMetadataProvider: ComponentMetadataProvider;\n @Autowired('userComponentRegistry') private readonly userComponentRegistry: UserComponentRegistry;\n @Optional('frameworkComponentWrapper') private readonly frameworkComponentWrapper: FrameworkComponentWrapper;\n\n public getHeaderCompDetails(colDef: ColDef, params: WithoutGridCommon): UserCompDetails | undefined {\n return this.getCompDetails(colDef, HeaderComponent, 'agColumnHeader', params);\n }\n\n public getHeaderGroupCompDetails(params: WithoutGridCommon): UserCompDetails | undefined {\n const colGroupDef = params.columnGroup.getColGroupDef()!;\n return this.getCompDetails(colGroupDef, HeaderGroupComponent, 'agColumnGroupHeader', params);\n }\n\n // this one is unusual, as it can be LoadingCellRenderer, DetailCellRenderer, FullWidthCellRenderer or GroupRowRenderer.\n // so we have to pass the type in.\n public getFullWidthCellRendererDetails(params: WithoutGridCommon): UserCompDetails {\n return this.getCompDetails(this.gridOptions, FullWidth, null, params, true)!;\n }\n\n public getFullWidthLoadingCellRendererDetails(params: WithoutGridCommon): UserCompDetails {\n return this.getCompDetails(this.gridOptions, FullWidthLoading, 'agLoadingCellRenderer', params, true)!;\n }\n\n public getFullWidthGroupCellRendererDetails(params: WithoutGridCommon): UserCompDetails {\n return this.getCompDetails(this.gridOptions, FullWidthGroup, 'agGroupRowRenderer', params, true)!;\n }\n\n public getFullWidthDetailCellRendererDetails(params: WithoutGridCommon): UserCompDetails {\n return this.getCompDetails(this.gridOptions, FullWidthDetail, 'agDetailCellRenderer', params, true)!;\n }\n\n // CELL RENDERER\n public getInnerRendererDetails(def: GroupCellRendererParams, params: WithoutGridCommon): UserCompDetails | undefined {\n return this.getCompDetails(def, InnerRendererComponent, null, params);\n }\n public getFullWidthGroupRowInnerCellRenderer(def: any, params: WithoutGridCommon): UserCompDetails | undefined {\n return this.getCompDetails(def, InnerRendererComponent, null, params);\n }\n public getCellRendererDetails(def: ColDef | IRichCellEditorParams, params: WithoutGridCommon): UserCompDetails | undefined {\n return this.getCompDetails(def, CellRendererComponent, null, params);\n }\n\n // CELL EDITOR\n public getCellEditorDetails(def: ColDef, params: WithoutGridCommon): UserCompDetails | undefined {\n return this.getCompDetails(def, CellEditorComponent, 'agCellEditor', params, true);\n }\n\n // FILTER\n public getFilterDetails(def: IFilterDef, params: WithoutGridCommon, defaultFilter: string): UserCompDetails | undefined {\n return this.getCompDetails(def, FilterComponent, defaultFilter, params, true);\n }\n\n public getDateCompDetails(params: WithoutGridCommon): UserCompDetails {\n return this.getCompDetails(this.gridOptions, DateComponent, 'agDateInput', params, true)!;\n }\n\n public getLoadingOverlayCompDetails(params: WithoutGridCommon): UserCompDetails {\n return this.getCompDetails(this.gridOptions, LoadingOverlayComponent, 'agLoadingOverlay', params, true)!;\n }\n\n public getNoRowsOverlayCompDetails(params: WithoutGridCommon): UserCompDetails {\n return this.getCompDetails(this.gridOptions, NoRowsOverlayComponent, 'agNoRowsOverlay', params, true)!;\n }\n\n public getTooltipCompDetails(params: WithoutGridCommon): UserCompDetails {\n return this.getCompDetails(params.colDef!, TooltipComponent, 'agTooltipComponent', params, true)!;\n }\n\n public getSetFilterCellRendererDetails(def: ISetFilterParams, params: WithoutGridCommon): UserCompDetails | undefined {\n return this.getCompDetails(def, CellRendererComponent, null, params);\n }\n\n public getFloatingFilterCompDetails(def: IFilterDef, params: WithoutGridCommon>, defaultFloatingFilter: string | null): UserCompDetails | undefined {\n return this.getCompDetails(def, FloatingFilterComponent, defaultFloatingFilter, params);\n }\n\n public getToolPanelCompDetails(toolPanelDef: ToolPanelDef, params: WithoutGridCommon): UserCompDetails {\n return this.getCompDetails(toolPanelDef, ToolPanelComponent, null, params, true)!;\n }\n\n public getStatusPanelCompDetails(def: StatusPanelDef, params: WithoutGridCommon): UserCompDetails {\n return this.getCompDetails(def, StatusPanelComponent, null, params, true)!;\n }\n\n private getCompDetails(defObject: DefinitionObject, type: ComponentType, defaultName: string | null | undefined, params: any, mandatory = false): UserCompDetails | undefined {\n\n const { propertyName, cellRenderer } = type;\n\n let { compName, jsComp, fwComp, paramsFromSelector, popupFromSelector, popupPositionFromSelector } = this.getCompKeys(defObject, type, params);\n\n const lookupFromRegistry = (key: string) => {\n const item = this.userComponentRegistry.retrieve(key);\n if (item) {\n jsComp = !item.componentFromFramework ? item.component : undefined;\n fwComp = item.componentFromFramework ? item.component : undefined;\n }\n };\n\n // if compOption is a string, means we need to look the item up\n if (compName != null) {\n lookupFromRegistry(compName);\n }\n\n // if lookup brought nothing back, and we have a default, lookup the default\n if (jsComp == null && fwComp == null && defaultName != null) {\n lookupFromRegistry(defaultName);\n }\n\n // if we have a comp option, and it's a function, replace it with an object equivalent adaptor\n if (jsComp && cellRenderer && !this.agComponentUtils.doesImplementIComponent(jsComp)) {\n jsComp = this.agComponentUtils.adaptFunction(propertyName, jsComp);\n }\n\n if (!jsComp && !fwComp) {\n if (mandatory) {\n console.error(`Could not find component ${compName}, did you forget to configure this component?`);\n }\n return;\n }\n\n const paramsMerged = this.mergeParamsWithApplicationProvidedParams(defObject, type, params, paramsFromSelector);\n\n const componentFromFramework = jsComp == null;\n const componentClass = jsComp ? jsComp : fwComp;\n\n return {\n componentFromFramework,\n componentClass,\n params: paramsMerged,\n type: type,\n popupFromSelector,\n popupPositionFromSelector,\n newAgStackInstance: () => this.newAgStackInstance(componentClass, componentFromFramework, paramsMerged, type)\n };\n }\n\n private getCompKeys(defObject: DefinitionObject, type: ComponentType, params?: any): {\n compName?: string,\n jsComp: any,\n fwComp: any,\n paramsFromSelector: any,\n popupFromSelector?: boolean,\n popupPositionFromSelector?: string\n } {\n\n const { propertyName } = type;\n\n let compName: string | undefined;\n let jsComp: any;\n let fwComp: any;\n\n let paramsFromSelector: any;\n let popupFromSelector: boolean | undefined;\n let popupPositionFromSelector: string | undefined;\n\n // there are two types of js comps, class based and func based. we can only check for\n // class based, by checking if getGui() exists. no way to differentiate js func based vs eg react func based\n // const isJsClassComp = (comp: any) => this.agComponentUtils.doesImplementIComponent(comp);\n // const fwActive = this.frameworkComponentWrapper != null;\n\n // pull from defObject if available\n if (defObject) {\n const defObjectAny = defObject as any;\n\n // if selector, use this\n const selectorFunc: CellEditorSelectorFunc | CellRendererSelectorFunc = defObjectAny[propertyName + 'Selector'];\n const selectorRes = selectorFunc ? selectorFunc(params) : null;\n\n const assignComp = (providedJsComp: any, providedFwComp: any) => {\n\n const xxxFrameworkDeprecatedWarn = () => {\n const warningMessage = `AG Grid: As of v27, the property ${propertyName}Framework is deprecated. The property ${propertyName} can now be used for JavaScript AND Framework Components.`;\n doOnce(() => console.warn(warningMessage), `UserComponentFactory.${propertyName}FrameworkDeprecated`);\n };\n\n if (typeof providedJsComp === 'string') {\n compName = providedJsComp as string;\n } else if (typeof providedFwComp === 'string') {\n xxxFrameworkDeprecatedWarn();\n compName = providedFwComp as string;\n // comp===true for filters, which means use the default comp\n } else if (providedJsComp != null && providedJsComp !== true) {\n const isFwkComp = this.getFrameworkOverrides().isFrameworkComponent(providedJsComp);\n if (isFwkComp) {\n fwComp = providedJsComp;\n } else {\n jsComp = providedJsComp;\n }\n } else if (providedFwComp != null) {\n xxxFrameworkDeprecatedWarn();\n fwComp = providedFwComp;\n }\n };\n\n if (selectorRes) {\n if (selectorRes.frameworkComponent != null) {\n const warningMessage = `AG Grid: As of v27, the return for ${propertyName}Selector has attributes [component, params] only. The attribute frameworkComponent is deprecated. You should now return back Framework Components using the 'component' attribute and the grid works out if it's a framework component or not.`;\n doOnce(() => console.warn(warningMessage), `UserComponentFactory.${propertyName}FrameworkSelectorDeprecated`);\n assignComp(selectorRes.frameworkComponent, undefined);\n } else {\n assignComp(selectorRes.component, undefined);\n }\n paramsFromSelector = selectorRes.params;\n popupFromSelector = (selectorRes as CellEditorSelectorResult).popup;\n popupPositionFromSelector = (selectorRes as CellEditorSelectorResult).popupPosition;\n } else {\n // if no selector, or result of selector is empty, take from defObject\n assignComp(defObjectAny[propertyName], defObjectAny[propertyName + 'Framework']);\n }\n }\n\n return { compName, jsComp, fwComp, paramsFromSelector, popupFromSelector, popupPositionFromSelector };\n }\n\n private newAgStackInstance(\n ComponentClass: any,\n componentFromFramework: boolean,\n params: any,\n type: ComponentType\n ): AgPromise {\n const propertyName = type.propertyName;\n const jsComponent = !componentFromFramework;\n // using javascript component\n let instance: any;\n\n if (jsComponent) {\n instance = new ComponentClass();\n } else {\n // Using framework component\n const thisComponentConfig: ComponentMetadata = this.componentMetadataProvider.retrieve(propertyName);\n instance = this.frameworkComponentWrapper.wrap(\n ComponentClass,\n thisComponentConfig.mandatoryMethodList,\n thisComponentConfig.optionalMethodList,\n type\n );\n }\n\n const deferredInit = this.initComponent(instance, params);\n\n if (deferredInit == null) {\n return AgPromise.resolve(instance);\n }\n return (deferredInit as AgPromise).then(() => instance);\n }\n\n // used by Floating Filter\n public mergeParamsWithApplicationProvidedParams(\n defObject: DefinitionObject,\n type: ComponentType,\n paramsFromGrid: any,\n paramsFromSelector: any = null\n ): any {\n const params: AgGridCommon = {\n context: this.gridOptionsWrapper.getContext(),\n columnApi: this.gridOptionsWrapper.getColumnApi()!,\n api: this.gridOptionsWrapper.getApi()!\n };\n\n mergeDeep(params, paramsFromGrid);\n\n // pull user params from either the old prop name and new prop name\n // eg either cellRendererParams and cellCompParams\n const defObjectAny = defObject as any;\n const userParams = defObjectAny && defObjectAny[type.propertyName + 'Params'];\n\n if (typeof userParams === 'function') {\n const userParamsFromFunc = userParams(paramsFromGrid);\n mergeDeep(params, userParamsFromFunc);\n } else if (typeof userParams === 'object') {\n mergeDeep(params, userParams);\n }\n\n mergeDeep(params, paramsFromSelector);\n\n return params;\n }\n\n private initComponent(component: any, params: any): AgPromise | void {\n this.context.createBean(component);\n if (component.init == null) { return; }\n return component.init(params);\n }\n\n public getDefaultFloatingFilterType(def: IFilterDef): string | null {\n if (def == null) { return null; }\n\n let defaultFloatingFilterType: string | null = null;\n\n let { compName, jsComp, fwComp }\n = this.getCompKeys(def, FilterComponent);\n\n if (compName) {\n // will be undefined if not in the map\n defaultFloatingFilterType = FloatingFilterMapper.getFloatingFilterType(compName);\n } else {\n const usingDefaultFilter = (jsComp == null && fwComp == null) && (def.filter === true);\n if (usingDefaultFilter) {\n const setFilterModuleLoaded = ModuleRegistry.isRegistered(ModuleNames.SetFilterModule);\n defaultFloatingFilterType = setFilterModuleLoaded ? 'agSetColumnFloatingFilter' : 'agTextColumnFloatingFilter';\n }\n }\n\n return defaultFloatingFilterType;\n }\n}\n","import { Bean, PreDestroy, Autowired, PostConstruct } from \"../context/context\";\nimport { LoggerFactory, Logger } from \"../logger\";\nimport { DragStartedEvent, DragStoppedEvent, Events } from \"../events\";\nimport { ColumnApi } from \"../columns/columnApi\";\nimport { GridApi } from \"../gridApi\";\nimport { BeanStub } from \"../context/beanStub\";\nimport { exists } from \"../utils/generic\";\nimport { removeFromArray } from \"../utils/array\";\nimport { areEventsNear } from \"../utils/mouse\";\nimport { MouseEventService } from \"../gridBodyComp/mouseEventService\";\nimport { isBrowserSafari } from \"../utils/browser\";\n\n/** Adds drag listening onto an element. In AG Grid this is used twice, first is resizing columns,\n * second is moving the columns and column groups around (ie the 'drag' part of Drag and Drop. */\n@Bean('dragService')\nexport class DragService extends BeanStub {\n\n @Autowired('loggerFactory') private loggerFactory: LoggerFactory;\n @Autowired('columnApi') private columnApi: ColumnApi;\n @Autowired('gridApi') private gridApi: GridApi;\n @Autowired('mouseEventService') private mouseEventService: MouseEventService;\n\n private currentDragParams: DragListenerParams | null;\n private dragging: boolean;\n private mouseStartEvent: MouseEvent | null;\n private touchLastTime: Touch | null;\n private touchStart: Touch | null;\n\n private logger: Logger;\n\n private dragEndFunctions: Function[] = [];\n\n private dragSources: DragSourceAndListener[] = [];\n\n @PostConstruct\n private init(): void {\n this.logger = this.loggerFactory.create('DragService');\n }\n\n @PreDestroy\n private removeAllListeners(): void {\n this.dragSources.forEach(this.removeListener.bind(this));\n this.dragSources.length = 0;\n }\n\n private removeListener(dragSourceAndListener: DragSourceAndListener): void {\n const element = dragSourceAndListener.dragSource.eElement;\n const mouseDownListener = dragSourceAndListener.mouseDownListener;\n element.removeEventListener('mousedown', mouseDownListener);\n\n // remove touch listener only if it exists\n if (dragSourceAndListener.touchEnabled) {\n const touchStartListener = dragSourceAndListener.touchStartListener;\n element.removeEventListener('touchstart', touchStartListener!, {passive:true} as any);\n }\n }\n\n public removeDragSource(params: DragListenerParams): void {\n const dragSourceAndListener = this.dragSources.find(item => item.dragSource === params);\n\n if (!dragSourceAndListener) { return; }\n\n this.removeListener(dragSourceAndListener);\n removeFromArray(this.dragSources, dragSourceAndListener);\n }\n\n public isDragging(): boolean {\n return this.dragging;\n }\n\n public addDragSource(params: DragListenerParams, includeTouch: boolean = false): void {\n const mouseListener = this.onMouseDown.bind(this, params);\n params.eElement.addEventListener('mousedown', mouseListener);\n\n let touchListener: ((touchEvent: TouchEvent) => void) | null = null;\n\n const suppressTouch = this.gridOptionsWrapper.isSuppressTouch();\n\n if (includeTouch && !suppressTouch) {\n touchListener = (touchEvent: TouchEvent) => {\n if (touchEvent.cancelable) { touchEvent.preventDefault(); }\n this.onTouchStart(params, touchEvent);\n };\n params.eElement.addEventListener('touchstart', touchListener, { passive: true });\n }\n\n this.dragSources.push({\n dragSource: params,\n mouseDownListener: mouseListener,\n touchStartListener: touchListener,\n touchEnabled: includeTouch\n });\n }\n\n // gets called whenever mouse down on any drag source\n private onTouchStart(params: DragListenerParams, touchEvent: TouchEvent): void {\n this.currentDragParams = params;\n this.dragging = false;\n\n const touch = touchEvent.touches[0];\n\n this.touchLastTime = touch;\n this.touchStart = touch;\n\n const touchMoveEvent = (e: TouchEvent) => this.onTouchMove(e, params.eElement);\n const touchEndEvent = (e: TouchEvent) => this.onTouchUp(e, params.eElement);\n const documentTouchMove = (e: TouchEvent) => { if (e.cancelable) { e.preventDefault(); } };\n const target = params.eElement;\n\n const events = [\n // Prevents the page document from moving while we are dragging items around.\n // preventDefault needs to be called in the touchmove listener and never inside the\n // touchstart, because using touchstart causes the click event to be cancelled on touch devices.\n { target: document, type: 'touchmove', listener: documentTouchMove, options: { passive: false } },\n { target, type: 'touchmove', listener: touchMoveEvent, options: { passive: true } },\n { target, type: 'touchend', listener: touchEndEvent, options: { passive: true} },\n { target, type: 'touchcancel', listener: touchEndEvent, options: { passive: true} }\n ];\n // temporally add these listeners, for the duration of the drag\n this.addTemporaryEvents(events);\n\n // see if we want to start dragging straight away\n if (params.dragStartPixels === 0) {\n this.onCommonMove(touch, this.touchStart, params.eElement);\n }\n }\n\n // gets called whenever mouse down on any drag source\n private onMouseDown(params: DragListenerParams, mouseEvent: MouseEvent): void {\n const e = mouseEvent as any;\n\n if (params.skipMouseEvent && params.skipMouseEvent(mouseEvent)) {\n return;\n }\n\n // if there are two elements with parent / child relationship, and both are draggable,\n // when we drag the child, we should NOT drag the parent. an example of this is row moving\n // and range selection - row moving should get preference when use drags the rowDrag component.\n if (e._alreadyProcessedByDragService) { return; }\n\n e._alreadyProcessedByDragService = true;\n\n // only interested in left button clicks\n if (mouseEvent.button !== 0) { return; }\n\n this.currentDragParams = params;\n this.dragging = false;\n\n this.mouseStartEvent = mouseEvent;\n\n const eDocument = this.gridOptionsWrapper.getDocument();\n\n const mouseMoveEvent = (event: MouseEvent) => this.onMouseMove(event, params.eElement);\n const mouseUpEvent = (event: MouseEvent) => this.onMouseUp(event, params.eElement);\n const contextEvent = (event: MouseEvent) => event.preventDefault();\n const target = eDocument;\n const events = [\n { target, type: 'mousemove', listener: mouseMoveEvent },\n { target, type: 'mouseup', listener: mouseUpEvent },\n { target, type: 'contextmenu', listener: contextEvent }\n ];\n // temporally add these listeners, for the duration of the drag\n this.addTemporaryEvents(events);\n\n //see if we want to start dragging straight away\n if (params.dragStartPixels === 0) {\n this.onMouseMove(mouseEvent, params.eElement);\n }\n }\n\n private addTemporaryEvents(\n events: {\n target: HTMLElement | Document,\n type: string,\n listener: (e: MouseEvent | TouchEvent, el: HTMLElement) => void,\n options?: any\n }[]\n ): void {\n events.forEach((currentEvent) => {\n const { target, type, listener, options } = currentEvent;\n target.addEventListener(type, listener as any, options);\n });\n\n this.dragEndFunctions.push(() => {\n events.forEach((currentEvent) => {\n const { target, type, listener, options } = currentEvent;\n target.removeEventListener(type, listener as any, options);\n });\n });\n }\n\n // returns true if the event is close to the original event by X pixels either vertically or horizontally.\n // we only start dragging after X pixels so this allows us to know if we should start dragging yet.\n private isEventNearStartEvent(currentEvent: MouseEvent | Touch, startEvent: MouseEvent | Touch): boolean {\n // by default, we wait 4 pixels before starting the drag\n const { dragStartPixels } = this.currentDragParams!;\n const requiredPixelDiff = exists(dragStartPixels) ? dragStartPixels : 4;\n return areEventsNear(currentEvent, startEvent, requiredPixelDiff);\n }\n\n private getFirstActiveTouch(touchList: TouchList): Touch | null {\n for (let i = 0; i < touchList.length; i++) {\n if (touchList[i].identifier === this.touchStart!.identifier) {\n return touchList[i];\n }\n }\n return null;\n }\n\n private onCommonMove(currentEvent: MouseEvent | Touch, startEvent: MouseEvent | Touch, el: HTMLElement): void {\n if (!this.dragging) {\n // if mouse hasn't travelled from the start position enough, do nothing\n if (!this.dragging && this.isEventNearStartEvent(currentEvent, startEvent)) { return; }\n\n this.dragging = true;\n const event: DragStartedEvent = {\n type: Events.EVENT_DRAG_STARTED,\n api: this.gridApi,\n columnApi: this.columnApi,\n target: el\n };\n this.eventService.dispatchEvent(event);\n\n this.currentDragParams!.onDragStart(startEvent);\n // we need ONE drag action at the startEvent, so that we are guaranteed the drop target\n // at the start gets notified. this is because the drag can start outside of the element\n // that started it, as the mouse is allowed drag away from the mouse down before it's\n // considered a drag (the isEventNearStartEvent() above). if we didn't do this, then\n // it would be possible to click a column by the edge, then drag outside of the drop zone\n // in less than 4 pixels and the drag officially starts outside of the header but the header\n // wouldn't be notified of the dragging.\n this.currentDragParams!.onDragging(startEvent);\n }\n\n this.currentDragParams!.onDragging(currentEvent);\n }\n\n private onTouchMove(touchEvent: TouchEvent, el: HTMLElement): void {\n const touch = this.getFirstActiveTouch(touchEvent.touches);\n if (!touch) { return; }\n\n // this.___statusPanel.setInfoText(Math.random() + ' onTouchMove preventDefault stopPropagation');\n this.onCommonMove(touch, this.touchStart!, el);\n }\n\n // only gets called after a mouse down - as this is only added after mouseDown\n // and is removed when mouseUp happens\n private onMouseMove(mouseEvent: MouseEvent, el: HTMLElement): void {\n // The event type can be `mousedown` when `dragStartPixels=0`\n // we should only preventDefault on `mousemove`.\n if (\n isBrowserSafari() &&\n mouseEvent.type === 'mousemove' &&\n mouseEvent.cancelable &&\n this.mouseEventService.isEventFromThisGrid(mouseEvent) &&\n !this.isOverFormFieldElement(mouseEvent)\n ) {\n mouseEvent.preventDefault();\n }\n this.onCommonMove(mouseEvent, this.mouseStartEvent!, el);\n }\n\n private isOverFormFieldElement(mouseEvent: MouseEvent): boolean {\n const el = mouseEvent.target as HTMLElement | null;\n const tagName = el?.tagName.toLocaleLowerCase();\n\n return !!tagName?.match('^a$|textarea|input|select|button');\n }\n\n public onTouchUp(touchEvent: TouchEvent, el: HTMLElement): void {\n let touch = this.getFirstActiveTouch(touchEvent.changedTouches);\n\n // i haven't worked this out yet, but there is no matching touch\n // when we get the touch up event. to get around this, we swap in\n // the last touch. this is a hack to 'get it working' while we\n // figure out what's going on, why we are not getting a touch in\n // current event.\n if (!touch) {\n touch = this.touchLastTime;\n }\n\n // if mouse was left up before we started to move, then this is a tap.\n // we check this before onUpCommon as onUpCommon resets the dragging\n // let tap = !this.dragging;\n // let tapTarget = this.currentDragParams.eElement;\n\n this.onUpCommon(touch!, el);\n\n // if tap, tell user\n // console.log(`${Math.random()} tap = ${tap}`);\n // if (tap) {\n // tapTarget.click();\n // }\n }\n\n public onMouseUp(mouseEvent: MouseEvent, el: HTMLElement): void {\n this.onUpCommon(mouseEvent, el);\n }\n\n public onUpCommon(eventOrTouch: MouseEvent | Touch, el: HTMLElement): void {\n if (this.dragging) {\n this.dragging = false;\n this.currentDragParams!.onDragStop(eventOrTouch);\n const event: DragStoppedEvent = {\n type: Events.EVENT_DRAG_STOPPED,\n api: this.gridApi,\n columnApi: this.columnApi,\n target: el\n };\n this.eventService.dispatchEvent(event);\n }\n\n this.mouseStartEvent = null;\n this.touchStart = null;\n this.touchLastTime = null;\n this.currentDragParams = null;\n\n this.dragEndFunctions.forEach(func => func());\n this.dragEndFunctions.length = 0;\n }\n}\n\ninterface DragSourceAndListener {\n dragSource: DragListenerParams;\n mouseDownListener: (mouseEvent: MouseEvent) => void;\n touchEnabled: boolean;\n touchStartListener: ((touchEvent: TouchEvent) => void) | null;\n}\n\nexport interface DragListenerParams {\n /** After how many pixels of dragging should the drag operation start. Default is 4px. */\n dragStartPixels?: number;\n /** Dom element to add the drag handling to */\n eElement: HTMLElement;\n /** Some places may wish to ignore certain events, eg range selection ignores shift clicks */\n skipMouseEvent?: (mouseEvent: MouseEvent) => boolean;\n /** Callback for drag starting */\n onDragStart: (mouseEvent: MouseEvent | Touch) => void;\n /** Callback for drag stopping */\n onDragStop: (mouseEvent: MouseEvent | Touch) => void;\n /** Callback for mouse move while dragging */\n onDragging: (mouseEvent: MouseEvent | Touch) => void;\n}\n","import { AgPromise, _ } from '../utils';\nimport { ValueService } from '../valueService/valueService';\nimport { ColumnModel } from '../columns/columnModel';\nimport { ColumnApi } from '../columns/columnApi';\nimport { RowNode } from '../entities/rowNode';\nimport { Column } from '../entities/column';\nimport { Autowired, Bean, PostConstruct, PreDestroy } from '../context/context';\nimport { IRowModel } from '../interfaces/iRowModel';\nimport { ColumnEventType, Events, FilterChangedEvent, FilterModifiedEvent, FilterOpenedEvent } from '../events';\nimport { IFilterComp, IFilter, IFilterParams } from '../interfaces/iFilter';\nimport { ColDef, GetQuickFilterTextParams } from '../entities/colDef';\nimport { GridApi } from '../gridApi';\nimport { UserComponentFactory } from '../components/framework/userComponentFactory';\nimport { ModuleNames } from '../modules/moduleNames';\nimport { ModuleRegistry } from '../modules/moduleRegistry';\nimport { BeanStub } from '../context/beanStub';\nimport { convertToSet } from '../utils/set';\nimport { exists } from '../utils/generic';\nimport { mergeDeep, cloneObject } from '../utils/object';\nimport { loadTemplate } from '../utils/dom';\nimport { RowRenderer } from '../rendering/rowRenderer';\n\nexport type FilterRequestSource = 'COLUMN_MENU' | 'TOOLBAR' | 'NO_UI';\n\n@Bean('filterManager')\nexport class FilterManager extends BeanStub {\n\n @Autowired('valueService') private valueService: ValueService;\n @Autowired('columnModel') private columnModel: ColumnModel;\n @Autowired('rowModel') private rowModel: IRowModel;\n @Autowired('columnApi') private columnApi: ColumnApi;\n @Autowired('gridApi') private gridApi: GridApi;\n @Autowired('userComponentFactory') private userComponentFactory: UserComponentFactory;\n @Autowired('rowRenderer') private rowRenderer: RowRenderer;\n\n public static QUICK_FILTER_SEPARATOR = '\\n';\n\n private allColumnFilters = new Map();\n private activeAggregateFilters: IFilterComp[] = [];\n private activeColumnFilters: IFilterComp[] = [];\n\n private quickFilter: string | null = null;\n private quickFilterParts: string[] | null = null;\n\n // this is true when the grid is processing the filter change. this is used by the cell comps, so that they\n // don't flash when data changes due to filter changes. there is no need to flash when filter changes as the\n // user is in control, so doesn't make sense to show flashing changes. for example, go to main demo where\n // this feature is turned off (hack code to always return false for isSuppressFlashingCellsBecauseFiltering(), put in)\n // 100,000 rows and group by country. then do some filtering. all the cells flash, which is silly.\n private processingFilterChange = false;\n private allowShowChangeAfterFilter: boolean;\n\n @PostConstruct\n public init(): void {\n this.addManagedListener(this.eventService, Events.EVENT_GRID_COLUMNS_CHANGED, () => this.onColumnsChanged());\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_VALUE_CHANGED, () => this.refreshFiltersForAggregations());\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PIVOT_CHANGED, () => this.refreshFiltersForAggregations());\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, () => this.refreshFiltersForAggregations());\n\n this.quickFilter = this.parseQuickFilter(this.gridOptionsWrapper.getQuickFilterText());\n this.setQuickFilterParts();\n\n this.allowShowChangeAfterFilter = this.gridOptionsWrapper.isAllowShowChangeAfterFilter();\n }\n\n private setQuickFilterParts(): void {\n this.quickFilterParts = this.quickFilter ? this.quickFilter.split(' ') : null;\n }\n\n public setFilterModel(model: { [key: string]: any; }): void {\n const allPromises: AgPromise[] = [];\n const previousModel = this.getFilterModel();\n\n if (model) {\n // mark the filters as we set them, so any active filters left over we stop\n const modelKeys = convertToSet(Object.keys(model));\n\n this.allColumnFilters.forEach((filterWrapper, colId) => {\n const newModel = model[colId];\n\n allPromises.push(this.setModelOnFilterWrapper(filterWrapper.filterPromise!, newModel));\n modelKeys.delete(colId);\n });\n\n // at this point, processedFields contains data for which we don't have a filter working yet\n modelKeys.forEach(colId => {\n const column = this.columnModel.getPrimaryColumn(colId) || this.columnModel.getGridColumn(colId);\n\n if (!column) {\n console.warn('AG Grid: setFilterModel() - no column found for colId: ' + colId);\n return;\n }\n\n if (!column.isFilterAllowed()) {\n console.warn('AG Grid: setFilterModel() - unable to fully apply model, filtering disabled for colId: ' + colId);\n return;\n }\n\n const filterWrapper = this.getOrCreateFilterWrapper(column, 'NO_UI');\n if (!filterWrapper) {\n console.warn('AG-Grid: setFilterModel() - unable to fully apply model, unable to create filter for colId: ' + colId);\n return;\n }\n allPromises.push(this.setModelOnFilterWrapper(filterWrapper.filterPromise!, model[colId]));\n });\n } else {\n this.allColumnFilters.forEach(filterWrapper => {\n allPromises.push(this.setModelOnFilterWrapper(filterWrapper.filterPromise!, null));\n });\n }\n\n AgPromise.all(allPromises).then(() => {\n const currentModel = this.getFilterModel();\n\n const columns: Column[] = [];\n this.allColumnFilters.forEach((filterWrapper, colId) => {\n const before = previousModel ? previousModel[colId] : null;\n const after = currentModel ? currentModel[colId] : null;\n\n if (!_.jsonEquals(before, after)) {\n columns.push(filterWrapper.column);\n }\n });\n\n if (columns.length > 0) {\n this.onFilterChanged({ columns });\n }\n });\n }\n\n private setModelOnFilterWrapper(filterPromise: AgPromise, newModel: any): AgPromise {\n return new AgPromise(resolve => {\n filterPromise.then(filter => {\n if (typeof filter!.setModel !== 'function') {\n console.warn('AG Grid: filter missing setModel method, which is needed for setFilterModel');\n resolve();\n }\n\n (filter!.setModel(newModel) || AgPromise.resolve()).then(() => resolve());\n });\n });\n }\n\n public getFilterModel(): { [key: string]: any; } {\n const result: { [key: string]: any; } = {};\n\n this.allColumnFilters.forEach((filterWrapper, key) => {\n // because user can provide filters, we provide useful error checking and messages\n const filterPromise = filterWrapper.filterPromise;\n const filter = filterPromise!.resolveNow(null, promiseFilter => promiseFilter);\n\n if (filter == null) { return null; }\n\n if (typeof filter.getModel !== 'function') {\n console.warn('AG Grid: filter API missing getModel method, which is needed for getFilterModel');\n return;\n }\n\n const model = filter.getModel();\n\n if (exists(model)) {\n result[key] = model;\n }\n });\n\n return result;\n }\n\n public isColumnFilterPresent(): boolean {\n return this.activeColumnFilters.length > 0;\n }\n\n public isAggregateFilterPresent(): boolean {\n return !!this.activeAggregateFilters.length;\n }\n\n private doAggregateFiltersPass(node: RowNode, filterToSkip?: IFilterComp) {\n return this.doColumnFiltersPass(node, filterToSkip, true);\n }\n\n // called by:\n // 1) onFilterChanged()\n // 2) onNewRowsLoaded()\n private updateActiveFilters(): void {\n this.activeColumnFilters.length = 0;\n this.activeAggregateFilters.length = 0;\n\n const isFilterActive = (filter: IFilter | null) => {\n if (!filter) { return false; } // this never happens, including to avoid compile error\n if (!filter.isFilterActive) {\n console.warn('AG Grid: Filter is missing isFilterActive() method');\n return false;\n }\n return filter.isFilterActive();\n };\n\n const groupFilterEnabled = !!this.gridOptionsWrapper.getGroupAggFiltering();\n\n const isAggFilter = (column: Column) => {\n\n const isSecondary = !column.isPrimary();\n // the only filters that can appear on secondary columns are groupAgg filters\n if (isSecondary) { return true; }\n\n const isShowingPrimaryColumns = !this.columnModel.isPivotActive();\n const isValueActive = column.isValueActive();\n\n // primary columns are only ever groupAgg filters if a) value is active and b) showing primary columns\n if (!isValueActive || !isShowingPrimaryColumns) { return false; }\n \n // from here on we know: isPrimary=true, isValueActive=true, isShowingPrimaryColumns=true\n if (this.columnModel.isPivotMode()) { \n // primary column is pretending to be a pivot column, ie pivotMode=true, but we are\n // still showing primary columns\n return true; \n } else {\n // we are not pivoting, so we groupFilter when it's an agg column\n return groupFilterEnabled;\n }\n };\n\n this.allColumnFilters.forEach(filterWrapper => {\n if (filterWrapper.filterPromise!.resolveNow(false, isFilterActive)) {\n const filterComp = filterWrapper.filterPromise!.resolveNow(null, filter => filter);\n if (isAggFilter(filterWrapper.column)) {\n this.activeAggregateFilters.push(filterComp!);\n } else {\n this.activeColumnFilters.push(filterComp!);\n }\n }\n });\n }\n\n private updateFilterFlagInColumns(source: ColumnEventType, additionalEventAttributes?: any): void {\n this.allColumnFilters.forEach(filterWrapper => {\n const isFilterActive = filterWrapper.filterPromise!.resolveNow(false, filter => filter!.isFilterActive());\n\n filterWrapper.column.setFilterActive(isFilterActive, source, additionalEventAttributes);\n });\n }\n\n public isAnyFilterPresent(): boolean {\n return this.isQuickFilterPresent() || this.isColumnFilterPresent() || this.isAggregateFilterPresent() || this.gridOptionsWrapper.isExternalFilterPresent();\n }\n\n private doColumnFiltersPass(node: RowNode, filterToSkip?: IFilterComp, targetAggregates?: boolean): boolean {\n const { data, aggData } = node;\n\n const targetedFilters = targetAggregates ? this.activeAggregateFilters : this.activeColumnFilters;\n const targetedData = targetAggregates ? aggData : data;\n for (let i = 0; i < targetedFilters.length; i++) {\n const filter = targetedFilters[i];\n\n if (filter == null || filter === filterToSkip) { continue; }\n\n if (typeof filter.doesFilterPass !== 'function') {\n // because users can do custom filters, give nice error message\n throw new Error('Filter is missing method doesFilterPass');\n }\n\n if (!filter.doesFilterPass({ node, data: targetedData })) {\n return false;\n }\n }\n\n return true;\n }\n\n private parseQuickFilter(newFilter?: string): string | null {\n if (!exists(newFilter)) {\n return null;\n }\n\n if (!this.gridOptionsWrapper.isRowModelDefault()) {\n console.warn('AG Grid - Quick filtering only works with the Client-Side Row Model');\n return null;\n }\n\n return newFilter.toUpperCase();\n }\n\n public setQuickFilter(newFilter: string): void {\n if (newFilter != null && typeof newFilter !== 'string') {\n console.warn(`AG Grid - setQuickFilter() only supports string inputs, received: ${typeof newFilter}`);\n return;\n }\n\n const parsedFilter = this.parseQuickFilter(newFilter);\n\n if (this.quickFilter !== parsedFilter) {\n this.quickFilter = parsedFilter;\n this.setQuickFilterParts();\n this.onFilterChanged();\n }\n }\n\n public refreshFiltersForAggregations() {\n const isAggFiltering = this.gridOptionsWrapper.getGroupAggFiltering();\n if (isAggFiltering) {\n this.onFilterChanged();\n }\n }\n\n // sometimes (especially in React) the filter can call onFilterChanged when we are in the middle\n // of a render cycle. this would be bad, so we wait for render cycle to complete when this happens.\n // this happens in react when we change React State in the grid (eg setting RowCtrl's in RowContainer)\n // which results in React State getting applied in the main application, triggering a useEffect() to\n // be kicked off adn then the application calling the grid's API. in AG-6554, the custom filter was\n // getting it's useEffect() triggered in this way.\n public callOnFilterChangedOutsideRenderCycle(params: { filterInstance?: IFilterComp, additionalEventAttributes?: any, columns?: Column[] } = {}): void {\n const action = () => this.onFilterChanged(params);\n if (this.rowRenderer.isRefreshInProgress()) {\n setTimeout(action, 0);\n } else {\n action();\n }\n }\n\n public onFilterChanged(params: { filterInstance?: IFilterComp, additionalEventAttributes?: any, columns?: Column[] } = {}): void {\n const { filterInstance, additionalEventAttributes, columns } = params;\n\n this.updateActiveFilters();\n this.updateFilterFlagInColumns('filterChanged', additionalEventAttributes);\n\n this.allColumnFilters.forEach(filterWrapper => {\n if (!filterWrapper.filterPromise) { return; }\n filterWrapper.filterPromise.then(filter => {\n if (filter && filter !== filterInstance && filter.onAnyFilterChanged) {\n filter!.onAnyFilterChanged();\n }\n });\n });\n\n const filterChangedEvent: FilterChangedEvent = {\n type: Events.EVENT_FILTER_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi,\n columns: columns || [],\n };\n\n if (additionalEventAttributes) {\n mergeDeep(filterChangedEvent, additionalEventAttributes);\n }\n\n // because internal events are not async in ag-grid, when the dispatchEvent\n // method comes back, we know all listeners have finished executing.\n this.processingFilterChange = true;\n\n this.eventService.dispatchEvent(filterChangedEvent);\n\n this.processingFilterChange = false;\n }\n\n public isSuppressFlashingCellsBecauseFiltering(): boolean {\n // if user has elected to always flash cell changes, then always return false, otherwise we suppress flashing\n // changes when filtering\n return !this.allowShowChangeAfterFilter && this.processingFilterChange;\n }\n\n public isQuickFilterPresent(): boolean {\n return this.quickFilter !== null;\n }\n\n public doesRowPassOtherFilters(filterToSkip: IFilterComp, node: any): boolean {\n return this.doesRowPassFilter({ rowNode: node, filterInstanceToSkip: filterToSkip });\n }\n\n private doesRowPassQuickFilterNoCache(node: RowNode, filterPart: string): boolean {\n const columns = this.columnModel.getAllColumnsForQuickFilter();\n\n return columns.some(column => {\n const part = this.getQuickFilterTextForColumn(column, node);\n\n return exists(part) && part.indexOf(filterPart) >= 0;\n });\n }\n\n private doesRowPassQuickFilterCache(node: RowNode, filterPart: string): boolean {\n if (!node.quickFilterAggregateText) {\n this.aggregateRowForQuickFilter(node);\n }\n\n return node.quickFilterAggregateText!.indexOf(filterPart) >= 0;\n }\n\n private doesRowPassQuickFilter(node: RowNode): boolean {\n const usingCache = this.gridOptionsWrapper.isCacheQuickFilter();\n\n // each part must pass, if any fails, then the whole filter fails\n return this.quickFilterParts!.every(part =>\n usingCache ? this.doesRowPassQuickFilterCache(node, part) : this.doesRowPassQuickFilterNoCache(node, part)\n );\n }\n\n public doesRowPassAggregateFilters(params: {\n rowNode: RowNode;\n filterInstanceToSkip?: IFilterComp;\n }): boolean {\n if (this.isAggregateFilterPresent() && !this.doAggregateFiltersPass(params.rowNode, params.filterInstanceToSkip)) {\n return false;\n }\n\n // got this far, all filters pass\n return true;\n }\n\n public doesRowPassFilter(params: {\n rowNode: RowNode,\n filterInstanceToSkip?: IFilterComp;\n }): boolean {\n // the row must pass ALL of the filters, so if any of them fail,\n // we return true. that means if a row passes the quick filter,\n // but fails the column filter, it fails overall\n\n // first up, check quick filter\n if (this.isQuickFilterPresent() && !this.doesRowPassQuickFilter(params.rowNode)) {\n return false;\n }\n\n // secondly, give the client a chance to reject this row\n if (this.gridOptionsWrapper.isExternalFilterPresent() && !this.gridOptionsWrapper.doesExternalFilterPass(params.rowNode)) {\n return false;\n }\n\n // lastly, check column filter\n if (this.isColumnFilterPresent() && !this.doColumnFiltersPass(params.rowNode, params.filterInstanceToSkip)) {\n return false;\n }\n\n // got this far, all filters pass\n return true;\n }\n\n private getQuickFilterTextForColumn(column: Column, node: RowNode): string {\n let value = this.valueService.getValue(column, node, true);\n const colDef = column.getColDef();\n\n if (colDef.getQuickFilterText) {\n const params: GetQuickFilterTextParams = {\n value,\n node,\n data: node.data,\n column,\n colDef,\n api: this.gridOptionsWrapper.getApi()!,\n columnApi: this.gridOptionsWrapper.getColumnApi()!,\n context: this.gridOptionsWrapper.getContext()\n };\n\n value = colDef.getQuickFilterText(params);\n }\n\n return exists(value) ? value.toString().toUpperCase() : null;\n }\n\n private aggregateRowForQuickFilter(node: RowNode): void {\n const stringParts: string[] = [];\n const columns = this.columnModel.getAllColumnsForQuickFilter();\n\n columns.forEach(column => {\n const part = this.getQuickFilterTextForColumn(column, node);\n\n if (exists(part)) {\n stringParts.push(part);\n }\n });\n\n node.quickFilterAggregateText = stringParts.join(FilterManager.QUICK_FILTER_SEPARATOR);\n }\n\n public onNewRowsLoaded(source: ColumnEventType): void {\n this.allColumnFilters.forEach(filterWrapper => {\n filterWrapper.filterPromise!.then(filter => {\n if (filter!.onNewRowsLoaded) {\n filter!.onNewRowsLoaded();\n }\n });\n });\n\n this.updateFilterFlagInColumns(source);\n this.updateActiveFilters();\n }\n\n private createValueGetter(column: Column): IFilterParams['valueGetter'] {\n return ({ node }) => this.valueService.getValue(column, node, true);\n }\n\n public getFilterComponent(column: Column, source: FilterRequestSource, createIfDoesNotExist = true): AgPromise | null {\n if (createIfDoesNotExist) {\n return this.getOrCreateFilterWrapper(column, source)?.filterPromise || null;\n }\n\n const filterWrapper = this.cachedFilter(column);\n\n return filterWrapper ? filterWrapper.filterPromise : null;\n }\n\n public isFilterActive(column: Column): boolean {\n const filterWrapper = this.cachedFilter(column);\n\n return !!filterWrapper && filterWrapper.filterPromise!.resolveNow(false, filter => filter!.isFilterActive());\n }\n\n public getOrCreateFilterWrapper(column: Column, source: FilterRequestSource): FilterWrapper | null {\n if (!column.isFilterAllowed()) {\n return null;\n }\n\n let filterWrapper = this.cachedFilter(column);\n\n if (!filterWrapper) {\n filterWrapper = this.createFilterWrapper(column, source);\n this.allColumnFilters.set(column.getColId(), filterWrapper);\n } else if (source !== 'NO_UI') {\n this.putIntoGui(filterWrapper, source);\n }\n\n return filterWrapper;\n }\n\n public cachedFilter(column: Column): FilterWrapper | undefined {\n return this.allColumnFilters.get(column.getColId());\n }\n\n private createFilterInstance(column: Column): AgPromise | null {\n const defaultFilter =\n ModuleRegistry.isRegistered(ModuleNames.SetFilterModule) ? 'agSetColumnFilter' : 'agTextColumnFilter';\n\n const colDef = column.getColDef();\n\n let filterInstance: IFilterComp;\n\n const params: IFilterParams = {\n ...this.createFilterParams(column, colDef),\n filterModifiedCallback: () => {\n const event: FilterModifiedEvent = {\n type: Events.EVENT_FILTER_MODIFIED,\n api: this.gridApi,\n columnApi: this.columnApi,\n column,\n filterInstance\n };\n\n this.eventService.dispatchEvent(event);\n },\n filterChangedCallback: (additionalEventAttributes?: any) => {\n const params = { filterInstance, additionalEventAttributes, columns: [column] };\n this.callOnFilterChangedOutsideRenderCycle(params);\n },\n doesRowPassOtherFilter: node => this.doesRowPassOtherFilters(filterInstance, node),\n };\n\n const compDetails = this.userComponentFactory.getFilterDetails(colDef, params, defaultFilter);\n if (!compDetails) { return null; }\n const componentPromise = compDetails.newAgStackInstance();\n\n if (componentPromise) {\n componentPromise.then(r => filterInstance = r!);\n }\n\n return componentPromise;\n }\n\n public createFilterParams(column: Column, colDef: ColDef): IFilterParams {\n const params: IFilterParams = {\n api: this.gridOptionsWrapper.getApi()!,\n columnApi: this.gridOptionsWrapper.getColumnApi()!,\n column,\n colDef: cloneObject(colDef),\n rowModel: this.rowModel,\n filterChangedCallback: () => { },\n filterModifiedCallback: () => { },\n valueGetter: this.createValueGetter(column),\n context: this.gridOptionsWrapper.getContext(),\n doesRowPassOtherFilter: () => true,\n };\n\n return params;\n }\n\n private createFilterWrapper(column: Column, source: FilterRequestSource): FilterWrapper {\n const filterWrapper: FilterWrapper = {\n column: column,\n filterPromise: null,\n compiledElement: null,\n guiPromise: AgPromise.resolve(null)\n };\n\n filterWrapper.filterPromise = this.createFilterInstance(column);\n\n if (filterWrapper.filterPromise) {\n this.putIntoGui(filterWrapper, source);\n }\n\n return filterWrapper;\n }\n\n private putIntoGui(filterWrapper: FilterWrapper, source: FilterRequestSource): void {\n const eFilterGui = document.createElement('div');\n\n eFilterGui.className = 'ag-filter';\n\n filterWrapper.guiPromise = new AgPromise(resolve => {\n filterWrapper.filterPromise!.then(filter => {\n let guiFromFilter = filter!.getGui();\n\n if (!exists(guiFromFilter)) {\n console.warn(`AG Grid: getGui method from filter returned ${guiFromFilter}, it should be a DOM element or an HTML template string.`);\n }\n\n // for backwards compatibility with Angular 1 - we\n // used to allow providing back HTML from getGui().\n // once we move away from supporting Angular 1\n // directly, we can change this.\n if (typeof guiFromFilter === 'string') {\n guiFromFilter = loadTemplate(guiFromFilter as string);\n }\n\n eFilterGui.appendChild(guiFromFilter);\n resolve(eFilterGui);\n\n this.eventService.dispatchEvent({\n type: Events.EVENT_FILTER_OPENED,\n column: filterWrapper.column,\n source,\n eGui: eFilterGui,\n api: this.gridApi,\n columnApi: this.columnApi\n } as FilterOpenedEvent);\n });\n });\n }\n\n private onColumnsChanged(): void {\n const columns: Column[] = [];\n\n this.allColumnFilters.forEach((wrapper, colId) => {\n let currentColumn: Column | null;\n if (wrapper.column.isPrimary()) {\n currentColumn = this.columnModel.getPrimaryColumn(colId);\n } else {\n currentColumn = this.columnModel.getGridColumn(colId);\n }\n if (currentColumn) { return; }\n\n columns.push(wrapper.column);\n this.disposeFilterWrapper(wrapper, 'filterDestroyed');\n });\n\n if (columns.length > 0) {\n this.onFilterChanged({ columns });\n }\n }\n\n // destroys the filter, so it not longer takes part\n public destroyFilter(column: Column, source: ColumnEventType = 'api'): void {\n const filterWrapper = this.allColumnFilters.get(column.getColId());\n\n if (filterWrapper) {\n this.disposeFilterWrapper(filterWrapper, source);\n this.onFilterChanged({ columns: [column] });\n }\n }\n\n private disposeFilterWrapper(filterWrapper: FilterWrapper, source: ColumnEventType): void {\n filterWrapper.filterPromise!.then(filter => {\n (filter!.setModel(null) || AgPromise.resolve()).then(() => {\n this.getContext().destroyBean(filter);\n\n filterWrapper.column.setFilterActive(false, source);\n\n this.allColumnFilters.delete(filterWrapper.column.getColId());\n });\n });\n }\n\n @PreDestroy\n protected destroy() {\n super.destroy();\n this.allColumnFilters.forEach(filterWrapper => this.disposeFilterWrapper(filterWrapper, 'filterDestroyed'));\n }\n}\n\nexport interface FilterWrapper {\n compiledElement: any;\n column: Column;\n filterPromise: AgPromise | null;\n guiPromise: AgPromise;\n}\n","import { ColumnGroup } from \"../../../entities/columnGroup\";\nimport { Column } from \"../../../entities/column\";\nimport { isUserSuppressingHeaderKeyboardEvent } from \"../../../utils/keyboard\";\nimport { Component } from \"../../../widgets/component\";\nimport { Autowired } from \"../../../context/context\";\nimport { FocusService } from \"../../../focusService\";\nimport { AbstractHeaderCellCtrl } from \"./abstractHeaderCellCtrl\";\n\nexport abstract class AbstractHeaderCellComp extends Component {\n\n protected ctrl: T;\n\n constructor(template: string, ctrl: T) {\n super(template);\n this.ctrl = ctrl;\n }\n\n public getCtrl(): T {\n return this.ctrl;\n }\n}","import { UserCompDetails } from \"../../../components/framework/userComponentFactory\";\nimport { PostConstruct } from '../../../context/context';\nimport { IFloatingFilterComp } from '../../../filter/floating/floatingFilter';\nimport { AgPromise } from '../../../utils';\nimport { RefSelector } from '../../../widgets/componentAnnotations';\nimport { AbstractHeaderCellComp } from '../abstractCell/abstractHeaderCellComp';\nimport { HeaderFilterCellCtrl, IHeaderFilterCellComp } from './headerFilterCellCtrl';\n\nexport class HeaderFilterCellComp extends AbstractHeaderCellComp {\n\n private static TEMPLATE = /* html */\n `
\n
\n
\n \n
\n
`;\n\n @RefSelector('eFloatingFilterBody') private readonly eFloatingFilterBody: HTMLElement;\n @RefSelector('eButtonWrapper') private readonly eButtonWrapper: HTMLElement;\n @RefSelector('eButtonShowMainFilter') private readonly eButtonShowMainFilter: HTMLElement;\n\n private compPromise: AgPromise | null;\n\n constructor(ctrl: HeaderFilterCellCtrl) {\n super(HeaderFilterCellComp.TEMPLATE, ctrl);\n }\n\n @PostConstruct\n private postConstruct(): void {\n\n const eGui = this.getGui();\n\n const compProxy: IHeaderFilterCellComp = {\n addOrRemoveCssClass: (cssClassName, on) => this.addOrRemoveCssClass(cssClassName, on),\n addOrRemoveBodyCssClass: (cssClassName, on) => this.eFloatingFilterBody.classList.toggle(cssClassName, on),\n addOrRemoveButtonWrapperCssClass: (cssClassName, on) => this.eButtonWrapper.classList.toggle(cssClassName, on),\n setCompDetails: compDetails => this.setCompDetails(compDetails),\n getFloatingFilterComp: () => this.compPromise,\n setWidth: width => eGui.style.width = width,\n setMenuIcon: eIcon => this.eButtonShowMainFilter.appendChild(eIcon)\n };\n\n this.ctrl.setComp(compProxy, eGui, this.eButtonShowMainFilter, this.eFloatingFilterBody);\n }\n\n private setCompDetails(compDetails: UserCompDetails): void {\n // because we are providing defaultFloatingFilterType, we know it will never be undefined;\n this.compPromise = compDetails.newAgStackInstance();\n this.compPromise.then(comp => this.afterCompCreated(comp));\n }\n\n private afterCompCreated(comp: IFloatingFilterComp | null): void {\n if (!comp) { return; }\n\n this.addDestroyFunc(() => this.context.destroyBean(comp));\n if (!this.isAlive()) { return; }\n\n this.eFloatingFilterBody.appendChild(comp.getGui());\n\n if (comp.afterGuiAttached) {\n comp.afterGuiAttached();\n }\n }\n}\n","export interface ToolPanelDef {\n /** The unique ID for this panel. Used in the API and elsewhere to refer to the panel. */\n id: string;\n /** The key used for localisation for displaying the label. The label is displayed in the tab button. */\n labelKey: string;\n /** The default label if `labelKey` is missing or does not map to valid text through localisation. */\n labelDefault: string;\n /** The min width of the tool panel. Default: `100` */\n minWidth?: number;\n /** The max width of the tool panel. Default: `undefined` */\n maxWidth?: number;\n /** The initial width of the tool panel. Default: `$side-bar-panel-width (theme variable)` */\n width?: number;\n /** The key of the icon to be used as a graphical aid beside the label in the side bar. */\n iconKey: string;\n\n /**\n * The tool panel component to use as the panel.\n * The provided panels use components `agColumnsToolPanel` and `agFiltersToolPanel`.\n * To provide your own custom panel component, you reference it here.\n */\n toolPanel?: any;\n /** @deprecated Same as `toolPanel` but for framework specific components. As of v27, use toolPanel instead for Framework components */\n toolPanelFramework?: any;\n /** Customise the parameters provided to the `toolPanel` component. */\n toolPanelParams?: any;\n}\n\nexport interface SideBarDef {\n /**\n * A list of all the panels to place in the side bar. The panels will be displayed in the provided order from top to bottom.\n */\n toolPanels?: (ToolPanelDef | string)[];\n /** The panel (identified by ID) to open by default. If none specified, the side bar is initially displayed closed. */\n defaultToolPanel?: string;\n /** To hide the side bar by default, set this to `true`. If left undefined the side bar will be shown. */\n hiddenByDefault?: boolean;\n /** Sets the side bar position relative to the grid. */\n position?: 'left' | 'right';\n}\n\nexport class SideBarDefParser {\n static readonly DEFAULT_COLUMN_COMP: ToolPanelDef = {\n id: 'columns',\n labelDefault: 'Columns',\n labelKey: 'columns',\n iconKey: 'columns',\n toolPanel: 'agColumnsToolPanel',\n };\n\n static readonly DEFAULT_FILTER_COMP: ToolPanelDef = {\n id: 'filters',\n labelDefault: 'Filters',\n labelKey: 'filters',\n iconKey: 'filter',\n toolPanel: 'agFiltersToolPanel',\n };\n\n static readonly DEFAULT_BY_KEY: { [p: string]: ToolPanelDef } = {\n columns: SideBarDefParser.DEFAULT_COLUMN_COMP,\n filters: SideBarDefParser.DEFAULT_FILTER_COMP\n };\n\n static parse(toParse: SideBarDef | string | string[] | boolean): SideBarDef | null {\n if (!toParse) { return null; }\n if (toParse === true) {\n return {\n toolPanels: [\n SideBarDefParser.DEFAULT_COLUMN_COMP,\n SideBarDefParser.DEFAULT_FILTER_COMP,\n ],\n defaultToolPanel: 'columns'\n };\n }\n\n if (typeof toParse === 'string') { return SideBarDefParser.parse([toParse]); }\n\n if (Array.isArray(toParse)) {\n const comps: ToolPanelDef[] = [];\n toParse.forEach(key => {\n const lookupResult = SideBarDefParser.DEFAULT_BY_KEY[key];\n if (!lookupResult) {\n console.warn(`AG Grid: the key ${key} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(SideBarDefParser.DEFAULT_BY_KEY).join(',')}`);\n return;\n }\n\n comps.push(lookupResult);\n });\n\n if (comps.length === 0) {\n return null;\n }\n\n return {\n toolPanels: comps,\n defaultToolPanel: comps[0].id\n };\n }\n\n const result: SideBarDef = {\n toolPanels: SideBarDefParser.parseComponents(toParse.toolPanels),\n defaultToolPanel: toParse.defaultToolPanel,\n hiddenByDefault: toParse.hiddenByDefault,\n position: toParse.position\n };\n\n return result;\n }\n\n static parseComponents(from?: (ToolPanelDef | string)[]): ToolPanelDef[] {\n const result: ToolPanelDef[] = [];\n\n if (!from) { return result; }\n\n from.forEach((it: ToolPanelDef | string) => {\n let toAdd: ToolPanelDef | null = null;\n if (typeof it === 'string') {\n const lookupResult = SideBarDefParser.DEFAULT_BY_KEY[it];\n if (!lookupResult) {\n console.warn(`AG Grid: the key ${it} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(SideBarDefParser.DEFAULT_BY_KEY).join(',')}`);\n return;\n }\n\n toAdd = lookupResult;\n } else {\n toAdd = it;\n }\n\n result.push(toAdd);\n });\n\n return result;\n }\n}","import { ColumnApi } from './columns/columnApi';\nimport { ColDefUtil } from './components/colDefUtil';\nimport { ComponentUtil } from './components/componentUtil';\nimport { Constants } from './constants/constants';\nimport { Autowired, Bean, PostConstruct, PreDestroy, Qualifier } from './context/context';\nimport { ColDef, ColGroupDef, IAggFunc, SuppressKeyboardEventParams } from './entities/colDef';\nimport { GridOptions, RowGroupingDisplayType, TreeDataDisplayType } from './entities/gridOptions';\nimport { GetGroupAggFilteringParams, GetGroupRowAggParams, GetLocaleTextParams, GetRowIdParams, InitialGroupOrderComparatorParams, IsFullWidthRowParams, PostSortRowsParams, RowHeightParams } from './entities/iCallbackParams';\nimport { RowNode } from './entities/rowNode';\nimport { SideBarDef, SideBarDefParser } from './entities/sideBar';\nimport { Environment, SASS_PROPERTIES } from './environment';\nimport { Events } from './eventKeys';\nimport { AgEvent } from './events';\nimport { EventService } from './eventService';\nimport { GridApi } from './gridApi';\nimport { CsvExportParams } from './interfaces/exportParams';\nimport { AgChartTheme, AgChartThemeOverrides } from \"./interfaces/iAgChartOptions\";\nimport { AgGridCommon, WithoutGridCommon } from './interfaces/iCommon';\nimport { IDatasource } from './interfaces/iDatasource';\nimport { ExcelExportParams } from './interfaces/iExcelCreator';\nimport { IServerSideDatasource } from './interfaces/iServerSideDatasource';\nimport { IViewportDatasource } from './interfaces/iViewportDatasource';\nimport { ModuleNames } from './modules/moduleNames';\nimport { ModuleRegistry } from './modules/moduleRegistry';\nimport { PropertyKeys } from './propertyKeys';\nimport { getScrollbarWidth } from './utils/browser';\nimport { doOnce } from './utils/function';\nimport { fuzzyCheckStrings } from './utils/fuzzyMatch';\nimport { exists, missing, values } from './utils/generic';\nimport { isNumeric } from './utils/number';\nimport { iterateObject } from './utils/object';\nimport { capitalise } from './utils/string';\n\nconst DEFAULT_ROW_HEIGHT = 25;\nconst DEFAULT_DETAIL_ROW_HEIGHT = 300;\nconst DEFAULT_VIEWPORT_ROW_MODEL_PAGE_SIZE = 5;\nconst DEFAULT_VIEWPORT_ROW_MODEL_BUFFER_SIZE = 5;\nconst DEFAULT_KEEP_DETAIL_ROW_COUNT = 10;\n\nfunction isTrue(value: any): boolean {\n return value === true || value === 'true';\n}\n\nfunction toNumber(value: any): number | undefined {\n if (typeof value == 'number') {\n return value;\n }\n\n if (typeof value == 'string') {\n return parseInt(value, 10);\n }\n}\n\nfunction zeroOrGreater(value: any, defaultValue: number): number {\n if (value >= 0) { return value; }\n\n // zero gets returned if number is missing or the wrong type\n return defaultValue;\n}\n\nfunction oneOrGreater(value: any, defaultValue?: number): number | undefined {\n const valueNumber = parseInt(value, 10);\n\n if (isNumeric(valueNumber) && valueNumber > 0) {\n return valueNumber;\n }\n\n return defaultValue;\n}\n\nexport interface PropertyChangedEvent extends AgEvent {\n currentValue: any;\n previousValue: any;\n}\n\n@Bean('gridOptionsWrapper')\nexport class GridOptionsWrapper {\n private static MIN_COL_WIDTH = 10;\n\n public static PROP_HEADER_HEIGHT = 'headerHeight';\n public static PROP_GROUP_REMOVE_SINGLE_CHILDREN = 'groupRemoveSingleChildren';\n public static PROP_GROUP_REMOVE_LOWEST_SINGLE_CHILDREN = 'groupRemoveLowestSingleChildren';\n public static PROP_PIVOT_HEADER_HEIGHT = 'pivotHeaderHeight';\n public static PROP_SUPPRESS_CLIPBOARD_PASTE = 'suppressClipboardPaste';\n\n public static PROP_GROUP_HEADER_HEIGHT = 'groupHeaderHeight';\n public static PROP_PIVOT_GROUP_HEADER_HEIGHT = 'pivotGroupHeaderHeight';\n\n public static PROP_NAVIGATE_TO_NEXT_CELL = 'navigateToNextCell';\n public static PROP_TAB_TO_NEXT_CELL = 'tabToNextCell';\n public static PROP_NAVIGATE_TO_NEXT_HEADER = 'navigateToNextHeader';\n public static PROP_TAB_TO_NEXT_HEADER = 'tabToNextHeader';\n\n public static PROP_IS_EXTERNAL_FILTER_PRESENT = 'isExternalFilterPresent';\n public static PROP_DOES_EXTERNAL_FILTER_PASS = 'doesExternalFilterPass';\n\n public static PROP_FLOATING_FILTERS_HEIGHT = 'floatingFiltersHeight';\n\n public static PROP_SUPPRESS_ROW_CLICK_SELECTION = 'suppressRowClickSelection';\n public static PROP_SUPPRESS_ROW_DRAG = 'suppressRowDrag';\n public static PROP_SUPPRESS_MOVE_WHEN_ROW_DRAG = 'suppressMoveWhenRowDragging';\n\n public static PROP_GET_ROW_CLASS = 'getRowClass';\n public static PROP_GET_ROW_STYLE = 'getRowStyle';\n\n public static PROP_GET_ROW_HEIGHT = 'getRowHeight';\n\n public static PROP_POPUP_PARENT = 'popupParent';\n\n public static PROP_DOM_LAYOUT = 'domLayout';\n public static PROP_ROW_CLASS = 'rowClass';\n\n public static PROP_FILL_HANDLE_DIRECTION = 'fillHandleDirection';\n\n public static PROP_GROUP_ROW_AGG_NODES = 'groupRowAggNodes';\n public static PROP_GET_GROUP_ROW_AGG = 'getGroupRowAgg';\n public static PROP_GET_BUSINESS_KEY_FOR_NODE = 'getBusinessKeyForNode';\n public static PROP_GET_CHILD_COUNT = 'getChildCount';\n public static PROP_PROCESS_ROW_POST_CREATE = 'processRowPostCreate';\n public static PROP_GET_ROW_NODE_ID = 'getRowNodeId';\n public static PROP_GET_ROW_ID = 'getRowId';\n public static PROP_IS_FULL_WIDTH_CELL = 'isFullWidthCell';\n public static PROP_IS_FULL_WIDTH_ROW = 'isFullWidthRow';\n public static PROP_IS_ROW_SELECTABLE = 'isRowSelectable';\n public static PROP_IS_ROW_MASTER = 'isRowMaster';\n public static PROP_POST_SORT = 'postSort';\n public static PROP_POST_SORT_ROWS = 'postSortRows';\n public static PROP_GET_DOCUMENT = 'getDocument';\n public static PROP_POST_PROCESS_POPUP = 'postProcessPopup';\n public static PROP_DEFAULT_GROUP_ORDER_COMPARATOR = 'defaultGroupOrderComparator';\n public static PROP_INITIAL_GROUP_ORDER_COMPARATOR = 'initialGroupOrderComparator';\n public static PROP_PAGINATION_NUMBER_FORMATTER = 'paginationNumberFormatter';\n\n public static PROP_GET_CONTEXT_MENU_ITEMS = 'getContextMenuItems';\n public static PROP_GET_MAIN_MENU_ITEMS = 'getMainMenuItems';\n\n public static PROP_PROCESS_CELL_FOR_CLIPBOARD = 'processCellForClipboard';\n public static PROP_PROCESS_CELL_FROM_CLIPBOARD = 'processCellFromClipboard';\n public static PROP_SEND_TO_CLIPBOARD = 'sendToClipboard';\n\n public static PROP_PROCESS_TO_SECONDARY_COLDEF = 'processSecondaryColDef';\n public static PROP_PROCESS_SECONDARY_COL_GROUP_DEF = 'processSecondaryColGroupDef';\n\n public static PROP_GET_CHART_TOOLBAR_ITEMS = 'getChartToolbarItems';\n\n public static PROP_GET_SERVER_SIDE_STORE_PARAMS = 'getServerSideStoreParams';\n public static PROP_IS_SERVER_SIDE_GROUPS_OPEN_BY_DEFAULT = 'isServerSideGroupOpenByDefault';\n public static PROP_IS_APPLY_SERVER_SIDE_TRANSACTION = 'isApplyServerSideTransaction';\n public static PROP_IS_SERVER_SIDE_GROUP = 'isServerSideGroup';\n public static PROP_GET_SERVER_SIDE_GROUP_KEY = 'getServerSideGroupKey';\n\n @Autowired('gridOptions') private readonly gridOptions: GridOptions;\n @Autowired('eventService') private readonly eventService: EventService;\n @Autowired('environment') private readonly environment: Environment;\n @Autowired('eGridDiv') private eGridDiv: HTMLElement;\n\n private propertyEventService: EventService = new EventService();\n\n private domDataKey = '__AG_' + Math.random().toString();\n\n // we store this locally, so we are not calling getScrollWidth() multiple times as it's an expensive operation\n private scrollbarWidth: number;\n\n private destroyed = false;\n\n private agWire(@Qualifier('gridApi') gridApi: GridApi, @Qualifier('columnApi') columnApi: ColumnApi): void {\n this.gridOptions.api = gridApi;\n this.gridOptions.columnApi = columnApi;\n this.checkForDeprecated();\n this.checkForViolations();\n }\n\n @PreDestroy\n private destroy(): void {\n // need to remove these, as we don't own the lifecycle of the gridOptions, we need to\n // remove the references in case the user keeps the grid options, we want the rest\n // of the grid to be picked up by the garbage collector\n this.gridOptions.api = null;\n this.gridOptions.columnApi = null;\n\n this.destroyed = true;\n }\n\n @PostConstruct\n public init(): void {\n if (this.gridOptions.suppressPropertyNamesCheck !== true) {\n this.checkGridOptionsProperties();\n this.checkColumnDefProperties();\n }\n\n // parse side bar options into correct format\n if (this.gridOptions.sideBar != null) {\n this.gridOptions.sideBar = SideBarDefParser.parse(this.gridOptions.sideBar);\n }\n\n const async = this.useAsyncEvents();\n this.eventService.addGlobalListener(this.globalEventHandler.bind(this), async);\n\n if (this.isGroupSelectsChildren() && this.isSuppressParentsInRowNodes()) {\n console.warn(\"AG Grid: 'groupSelectsChildren' does not work with 'suppressParentsInRowNodes', this selection method needs the part in rowNode to work\");\n }\n\n if (this.isGroupSelectsChildren()) {\n if (!this.isRowSelectionMulti()) {\n console.warn(\"AG Grid: rowSelection must be 'multiple' for groupSelectsChildren to make sense\");\n }\n if (this.isRowModelServerSide()) {\n console.warn(\n 'AG Grid: group selects children is NOT support for Server Side Row Model. ' +\n 'This is because the rows are lazy loaded, so selecting a group is not possible as' +\n 'the grid has no way of knowing what the children are.'\n );\n }\n }\n\n if (this.isGroupRemoveSingleChildren() && this.isGroupHideOpenParents()) {\n console.warn(\n \"AG Grid: groupRemoveSingleChildren and groupHideOpenParents do not work with each other, you need to pick one. And don't ask us how to us these together on our support forum either you will get the same answer!\"\n );\n }\n\n if (this.isRowModelServerSide()) {\n const msg = (prop: string) => `AG Grid: '${prop}' is not supported on the Server-Side Row Model`;\n if (exists(this.gridOptions.groupDefaultExpanded)) {\n console.warn(msg('groupDefaultExpanded'));\n }\n if (exists(this.gridOptions.groupDefaultExpanded)) {\n console.warn(msg('groupIncludeFooter'));\n }\n if (exists(this.gridOptions.groupDefaultExpanded)) {\n console.warn(msg('groupIncludeTotalFooter'));\n }\n }\n\n if (this.isEnableRangeSelection()) {\n ModuleRegistry.assertRegistered(ModuleNames.RangeSelectionModule, 'enableRangeSelection');\n }\n\n if (!this.isEnableRangeSelection() && (this.isEnableRangeHandle() || this.isEnableFillHandle())) {\n console.warn(\"AG Grid: 'enableRangeHandle' and 'enableFillHandle' will not work unless 'enableRangeSelection' is set to true\");\n }\n\n const warnOfDeprecaredIcon = (name: string) => {\n if (this.gridOptions.icons && this.gridOptions.icons[name]) {\n console.warn(`gridOptions.icons.${name} is no longer supported. For information on how to style checkboxes and radio buttons, see https://www.ag-grid.com/javascript-grid-icons/`);\n }\n };\n warnOfDeprecaredIcon('radioButtonOff');\n warnOfDeprecaredIcon('radioButtonOn');\n warnOfDeprecaredIcon('checkboxChecked');\n warnOfDeprecaredIcon('checkboxUnchecked');\n warnOfDeprecaredIcon('checkboxIndeterminate');\n\n // sets an initial calculation for the scrollbar width\n this.getScrollbarWidth();\n }\n\n private checkColumnDefProperties() {\n if (this.gridOptions.columnDefs == null) { return; }\n\n this.gridOptions.columnDefs.forEach(colDef => {\n const userProperties: string[] = Object.getOwnPropertyNames(colDef);\n const validProperties: string[] = [...ColDefUtil.ALL_PROPERTIES, ...ColDefUtil.FRAMEWORK_PROPERTIES];\n\n this.checkProperties(\n userProperties,\n validProperties,\n validProperties,\n 'colDef',\n 'https://www.ag-grid.com/javascript-grid-column-properties/'\n );\n });\n }\n\n private checkGridOptionsProperties() {\n const userProperties: string[] = Object.getOwnPropertyNames(this.gridOptions);\n const validProperties: string[] = [\n ...PropertyKeys.ALL_PROPERTIES,\n ...PropertyKeys.FRAMEWORK_PROPERTIES,\n ...values(Events).map(event => ComponentUtil.getCallbackForEvent(event))\n ];\n\n const validPropertiesAndExceptions: string[] = [...validProperties, 'api', 'columnApi'];\n\n this.checkProperties(\n userProperties,\n validPropertiesAndExceptions,\n validProperties,\n 'gridOptions',\n 'https://www.ag-grid.com/javascript-data-grid/grid-options/'\n );\n }\n\n private checkProperties(\n userProperties: string[],\n validPropertiesAndExceptions: string[],\n validProperties: string[],\n containerName: string,\n docsUrl: string\n ) {\n const invalidProperties: { [p: string]: string[]; } = fuzzyCheckStrings(\n userProperties,\n validPropertiesAndExceptions,\n validProperties\n );\n\n iterateObject(invalidProperties, (key, value) => {\n console.warn(`ag-grid: invalid ${containerName} property '${key}' did you mean any of these: ${value.slice(0, 8).join(\", \")}`);\n });\n\n if (Object.keys(invalidProperties).length > 0) {\n console.warn(`ag-grid: to see all the valid ${containerName} properties please check: ${docsUrl}`);\n }\n }\n\n /**\n * Wrap the user callback and attach the api, columnApi and context to the params object on the way through.\n * @param callback User provided callback\n * @returns Wrapped callback where the params object not require api, columnApi and context\n */\n private mergeGridCommonParams

(callback: ((params: P) => T) | undefined):\n ((params: WithoutGridCommon

) => T) | undefined {\n if (callback) {\n const wrapped = (callbackParams: WithoutGridCommon

): T => {\n const mergedParams = { ...callbackParams, api: this.getApi()!, columnApi: this.getColumnApi()!, context: this.getContext() } as P;\n return callback(mergedParams);\n }\n return wrapped;\n }\n return callback;\n }\n\n public getDomDataKey(): string {\n return this.domDataKey;\n }\n\n // returns the dom data, or undefined if not found\n public getDomData(element: Node | null, key: string): any {\n const domData = (element as any)[this.getDomDataKey()];\n\n return domData ? domData[key] : undefined;\n }\n\n public setDomData(element: Element, key: string, value: any): any {\n const domDataKey = this.getDomDataKey();\n let domData = (element as any)[domDataKey];\n\n if (missing(domData)) {\n domData = {};\n (element as any)[domDataKey] = domData;\n }\n domData[key] = value;\n }\n\n public isRowSelection() {\n return this.gridOptions.rowSelection === 'single' || this.gridOptions.rowSelection === 'multiple';\n }\n\n public isSuppressRowDeselection() {\n return isTrue(this.gridOptions.suppressRowDeselection);\n }\n\n public isRowSelectionMulti() {\n return this.gridOptions.rowSelection === 'multiple';\n }\n\n public isRowMultiSelectWithClick() {\n return isTrue(this.gridOptions.rowMultiSelectWithClick);\n }\n\n public getContext() {\n return this.gridOptions.context;\n }\n\n public isPivotMode() {\n return isTrue(this.gridOptions.pivotMode);\n }\n\n public isSuppressExpandablePivotGroups() {\n return isTrue(this.gridOptions.suppressExpandablePivotGroups);\n }\n\n public getPivotColumnGroupTotals() {\n return this.gridOptions.pivotColumnGroupTotals;\n }\n\n public getPivotRowTotals() {\n return this.gridOptions.pivotRowTotals;\n }\n\n public isRowModelInfinite() {\n return this.gridOptions.rowModelType === Constants.ROW_MODEL_TYPE_INFINITE;\n }\n\n public isRowModelViewport() {\n return this.gridOptions.rowModelType === Constants.ROW_MODEL_TYPE_VIEWPORT;\n }\n\n public isRowModelServerSide() {\n return this.gridOptions.rowModelType === Constants.ROW_MODEL_TYPE_SERVER_SIDE;\n }\n\n public isRowModelDefault() {\n return (missing(this.gridOptions.rowModelType) ||\n this.gridOptions.rowModelType === Constants.ROW_MODEL_TYPE_CLIENT_SIDE);\n }\n\n public isFullRowEdit() {\n return this.gridOptions.editType === 'fullRow';\n }\n\n public isSuppressFocusAfterRefresh() {\n return isTrue(this.gridOptions.suppressFocusAfterRefresh);\n }\n\n public isSuppressBrowserResizeObserver() {\n return isTrue(this.gridOptions.suppressBrowserResizeObserver);\n }\n\n public isSuppressMaintainUnsortedOrder() {\n return isTrue(this.gridOptions.suppressMaintainUnsortedOrder);\n }\n\n public isSuppressClearOnFillReduction() {\n return isTrue(this.gridOptions.suppressClearOnFillReduction);\n }\n\n public isShowToolPanel() {\n return isTrue(this.gridOptions.sideBar && Array.isArray(this.getSideBar().toolPanels));\n }\n\n public getSideBar(): SideBarDef {\n return this.gridOptions.sideBar as SideBarDef;\n }\n\n public isSuppressTouch() {\n return isTrue(this.gridOptions.suppressTouch);\n }\n\n public isMaintainColumnOrder() {\n return isTrue(this.gridOptions.maintainColumnOrder);\n }\n\n public isSuppressRowTransform() {\n return isTrue(this.gridOptions.suppressRowTransform);\n }\n\n public isSuppressColumnStateEvents() {\n return isTrue(this.gridOptions.suppressColumnStateEvents);\n }\n\n public isAllowDragFromColumnsToolPanel() {\n return isTrue(this.gridOptions.allowDragFromColumnsToolPanel);\n }\n\n public useAsyncEvents() {\n return !isTrue(this.gridOptions.suppressAsyncEvents);\n }\n\n public isEnableCellChangeFlash() {\n return isTrue(this.gridOptions.enableCellChangeFlash);\n }\n\n public getCellFlashDelay(): number {\n return this.gridOptions.cellFlashDelay || 500;\n }\n\n public getCellFadeDelay(): number {\n return this.gridOptions.cellFadeDelay || 1000;\n }\n\n public isGroupSelectsChildren() {\n return isTrue(this.gridOptions.groupSelectsChildren);\n }\n\n public isSuppressRowHoverHighlight() {\n return isTrue(this.gridOptions.suppressRowHoverHighlight);\n }\n\n public isColumnHoverHighlight() {\n return isTrue(this.gridOptions.columnHoverHighlight);\n }\n\n public isGroupSelectsFiltered() {\n return isTrue(this.gridOptions.groupSelectsFiltered);\n }\n\n public isGroupHideOpenParents() {\n return isTrue(this.gridOptions.groupHideOpenParents);\n }\n\n public isGroupMaintainOrder() {\n return isTrue(this.gridOptions.groupMaintainOrder);\n }\n\n public getAutoGroupColumnDef(): ColDef | undefined {\n return this.gridOptions.autoGroupColumnDef;\n }\n\n public isGroupMultiAutoColumn() {\n if (this.gridOptions.groupDisplayType) {\n return this.matchesGroupDisplayType('multipleColumns', this.gridOptions.groupDisplayType);\n }\n // if we are doing hideOpenParents we also show multiple columns, otherwise hideOpenParents would not work\n return isTrue(this.gridOptions.groupHideOpenParents);\n }\n\n public isGroupUseEntireRow(pivotMode: boolean): boolean {\n // we never allow groupUseEntireRow if in pivot mode, otherwise we won't see the pivot values.\n if (pivotMode) { return false; }\n\n return this.gridOptions.groupDisplayType ?\n this.matchesGroupDisplayType('groupRows', this.gridOptions.groupDisplayType) : false;\n }\n\n public isGroupSuppressAutoColumn() {\n const isCustomRowGroups = this.gridOptions.groupDisplayType ?\n this.matchesGroupDisplayType('custom', this.gridOptions.groupDisplayType) : false;\n\n if (isCustomRowGroups) { return true; }\n\n return this.gridOptions.treeDataDisplayType ?\n this.matchesTreeDataDisplayType('custom', this.gridOptions.treeDataDisplayType) : false;\n }\n\n public isGroupRemoveSingleChildren() {\n return isTrue(this.gridOptions.groupRemoveSingleChildren);\n }\n\n public isGroupRemoveLowestSingleChildren() {\n return isTrue(this.gridOptions.groupRemoveLowestSingleChildren);\n }\n\n public isGroupIncludeFooter() {\n return isTrue(this.gridOptions.groupIncludeFooter);\n }\n\n public isGroupIncludeTotalFooter() {\n return isTrue(this.gridOptions.groupIncludeTotalFooter);\n }\n\n public isGroupSuppressBlankHeader() {\n return isTrue(this.gridOptions.groupSuppressBlankHeader);\n }\n\n public isSuppressRowClickSelection() {\n return isTrue(this.gridOptions.suppressRowClickSelection);\n }\n\n public isSuppressCellFocus() {\n return isTrue(this.gridOptions.suppressCellFocus);\n }\n\n public isSuppressMultiSort() {\n return isTrue(this.gridOptions.suppressMultiSort);\n }\n\n public isAlwaysMultiSort() {\n return isTrue(this.gridOptions.alwaysMultiSort);\n }\n\n public isMultiSortKeyCtrl() {\n return this.gridOptions.multiSortKey === 'ctrl';\n }\n\n public isPivotSuppressAutoColumn() {\n return isTrue(this.gridOptions.pivotSuppressAutoColumn);\n }\n\n public isSuppressDragLeaveHidesColumns() {\n return isTrue(this.gridOptions.suppressDragLeaveHidesColumns);\n }\n\n public isSuppressScrollOnNewData() {\n return isTrue(this.gridOptions.suppressScrollOnNewData);\n }\n\n public isSuppressScrollWhenPopupsAreOpen() {\n return isTrue(this.gridOptions.suppressScrollWhenPopupsAreOpen);\n }\n\n public isRowDragEntireRow() {\n return isTrue(this.gridOptions.rowDragEntireRow);\n }\n\n public isSuppressRowDrag() {\n return isTrue(this.gridOptions.suppressRowDrag);\n }\n\n public isRowDragManaged() {\n return isTrue(this.gridOptions.rowDragManaged);\n }\n\n public isSuppressMoveWhenRowDragging() {\n return isTrue(this.gridOptions.suppressMoveWhenRowDragging);\n }\n\n public isRowDragMultiRow() {\n return isTrue(this.gridOptions.rowDragMultiRow);\n }\n\n // returns either 'print', 'autoHeight' or 'normal' (normal is the default)\n public getDomLayout(): string {\n const domLayout = this.gridOptions.domLayout || Constants.DOM_LAYOUT_NORMAL;\n const validLayouts = [\n Constants.DOM_LAYOUT_PRINT,\n Constants.DOM_LAYOUT_AUTO_HEIGHT,\n Constants.DOM_LAYOUT_NORMAL\n ];\n\n if (validLayouts.indexOf(domLayout) === -1) {\n doOnce(\n () =>\n console.warn(\n `AG Grid: ${domLayout} is not valid for DOM Layout, valid values are ${Constants.DOM_LAYOUT_NORMAL}, ${Constants.DOM_LAYOUT_AUTO_HEIGHT} and ${Constants.DOM_LAYOUT_PRINT}`\n ),\n 'warn about dom layout values'\n );\n return Constants.DOM_LAYOUT_NORMAL;\n }\n\n return domLayout;\n }\n\n public isSuppressHorizontalScroll() {\n return isTrue(this.gridOptions.suppressHorizontalScroll);\n }\n\n public isSuppressMaxRenderedRowRestriction() {\n return isTrue(this.gridOptions.suppressMaxRenderedRowRestriction);\n }\n\n public isExcludeChildrenWhenTreeDataFiltering() {\n return isTrue(this.gridOptions.excludeChildrenWhenTreeDataFiltering);\n }\n\n public isAlwaysShowHorizontalScroll() {\n return isTrue(this.gridOptions.alwaysShowHorizontalScroll);\n }\n\n public isAlwaysShowVerticalScroll() {\n return isTrue(this.gridOptions.alwaysShowVerticalScroll);\n }\n\n public isDebounceVerticalScrollbar() {\n return isTrue(this.gridOptions.debounceVerticalScrollbar);\n }\n\n public isSuppressLoadingOverlay() {\n return isTrue(this.gridOptions.suppressLoadingOverlay);\n }\n\n public isSuppressNoRowsOverlay() {\n return isTrue(this.gridOptions.suppressNoRowsOverlay);\n }\n\n public isSuppressFieldDotNotation() {\n return isTrue(this.gridOptions.suppressFieldDotNotation);\n }\n\n public getPinnedTopRowData(): any[] | undefined {\n return this.gridOptions.pinnedTopRowData;\n }\n\n public getPinnedBottomRowData(): any[] | undefined {\n return this.gridOptions.pinnedBottomRowData;\n }\n\n public isFunctionsPassive() {\n return isTrue(this.gridOptions.functionsPassive);\n }\n\n public isSuppressChangeDetection() {\n return isTrue(this.gridOptions.suppressChangeDetection);\n }\n\n public isSuppressAnimationFrame() {\n return isTrue(this.gridOptions.suppressAnimationFrame);\n }\n\n public getQuickFilterText(): string | undefined {\n return this.gridOptions.quickFilterText;\n }\n\n public isCacheQuickFilter() {\n return isTrue(this.gridOptions.cacheQuickFilter);\n }\n\n public isUnSortIcon() {\n return isTrue(this.gridOptions.unSortIcon);\n }\n\n public isSuppressMenuHide() {\n return isTrue(this.gridOptions.suppressMenuHide);\n }\n\n public isEnterMovesDownAfterEdit() {\n return isTrue(this.gridOptions.enterMovesDownAfterEdit);\n }\n\n public isEnterMovesDown() {\n return isTrue(this.gridOptions.enterMovesDown);\n }\n\n public isUndoRedoCellEditing() {\n return isTrue(this.gridOptions.undoRedoCellEditing);\n }\n\n public getUndoRedoCellEditingLimit(): number | undefined {\n return toNumber(this.gridOptions.undoRedoCellEditingLimit);\n }\n\n public getRowStyle() {\n return this.gridOptions.rowStyle;\n }\n\n public getRowClass() {\n return this.gridOptions.rowClass;\n }\n\n public getRowStyleFunc() {\n return this.mergeGridCommonParams(this.gridOptions.getRowStyle);\n }\n\n public getRowClassFunc() {\n return this.mergeGridCommonParams(this.gridOptions.getRowClass);\n }\n\n public rowClassRules() {\n return this.gridOptions.rowClassRules;\n }\n\n public getServerSideStoreType(): string | undefined {\n return this.gridOptions.serverSideStoreType;\n }\n\n public getServerSideStoreParamsFunc() {\n return this.mergeGridCommonParams(this.gridOptions.getServerSideStoreParams);\n }\n\n public getCreateChartContainerFunc() {\n return this.mergeGridCommonParams(this.gridOptions.createChartContainer);\n }\n\n public getPopupParent() {\n return this.gridOptions.popupParent;\n }\n\n public getBlockLoadDebounceMillis() {\n return this.gridOptions.blockLoadDebounceMillis;\n }\n\n public getPostProcessPopupFunc() {\n return this.mergeGridCommonParams(this.gridOptions.postProcessPopup);\n }\n\n public getPaginationNumberFormatterFunc() {\n return this.mergeGridCommonParams(this.gridOptions.paginationNumberFormatter);\n }\n\n public getChildCountFunc() {\n return this.gridOptions.getChildCount;\n }\n\n public getIsApplyServerSideTransactionFunc() {\n return this.mergeGridCommonParams(this.gridOptions.isApplyServerSideTransaction);\n }\n\n public getInitialGroupOrderComparator() {\n const { initialGroupOrderComparator, defaultGroupOrderComparator } = this.gridOptions;\n if (initialGroupOrderComparator) {\n return this.mergeGridCommonParams(initialGroupOrderComparator);\n }\n // this is the deprecated way, so provide a proxy to make it compatible\n if (defaultGroupOrderComparator) {\n return (params: WithoutGridCommon) => defaultGroupOrderComparator(params.nodeA, params.nodeB);\n }\n }\n\n public getIsFullWidthCellFunc() {\n const { isFullWidthRow, isFullWidthCell } = this.gridOptions;\n if (isFullWidthRow) {\n return this.mergeGridCommonParams(isFullWidthRow);\n }\n // this is the deprecated way, so provide a proxy to make it compatible\n if (isFullWidthCell) {\n return (params: WithoutGridCommon) => isFullWidthCell(params.rowNode);\n }\n }\n\n public getFullWidthCellRendererParams() {\n return this.gridOptions.fullWidthCellRendererParams;\n }\n\n public isEmbedFullWidthRows() {\n return isTrue(this.gridOptions.embedFullWidthRows) || isTrue(this.gridOptions.deprecatedEmbedFullWidthRows);\n }\n\n public isDetailRowAutoHeight() {\n return isTrue(this.gridOptions.detailRowAutoHeight);\n }\n\n public getSuppressKeyboardEventFunc(): ((params: SuppressKeyboardEventParams) => boolean) | undefined {\n return this.gridOptions.suppressKeyboardEvent;\n }\n\n public getBusinessKeyForNodeFunc() {\n return this.gridOptions.getBusinessKeyForNode;\n }\n\n public getApi(): GridApi | undefined | null {\n return this.gridOptions.api;\n }\n\n public getColumnApi(): ColumnApi | undefined | null {\n return this.gridOptions.columnApi;\n }\n\n public isReadOnlyEdit(): boolean {\n return isTrue(this.gridOptions.readOnlyEdit);;\n }\n\n public isImmutableData() {\n // we used to have a property immutableData for this. however this was deprecated\n // in favour of having Immutable Data on by default when getRowId is provided\n const getRowIdProvided = this.gridOptions.getRowId != null;\n const immutableData = isTrue(this.gridOptions.immutableData);\n // this property is a backwards compatibility property, for those who want\n // the old behaviour of Row ID's but NOT Immutable Data.\n const resetRowDataOnUpdate = isTrue(this.gridOptions.resetRowDataOnUpdate);\n\n if (resetRowDataOnUpdate) { return false; }\n return getRowIdProvided || immutableData;\n }\n\n public isEnsureDomOrder() {\n return isTrue(this.gridOptions.ensureDomOrder);\n }\n\n public isEnableCharts() {\n if (isTrue(this.gridOptions.enableCharts)) {\n return ModuleRegistry.assertRegistered(ModuleNames.GridChartsModule, 'enableCharts');\n }\n return false;\n }\n\n public getColResizeDefault() {\n return this.gridOptions.colResizeDefault;\n }\n\n public isSingleClickEdit() {\n return isTrue(this.gridOptions.singleClickEdit);\n }\n\n public isSuppressClickEdit() {\n return isTrue(this.gridOptions.suppressClickEdit);\n }\n\n public isStopEditingWhenCellsLoseFocus() {\n return isTrue(this.gridOptions.stopEditingWhenCellsLoseFocus);\n }\n\n public getGroupDefaultExpanded(): number | undefined {\n return this.gridOptions.groupDefaultExpanded;\n }\n\n public getMaxConcurrentDatasourceRequests(): number | undefined {\n const res = toNumber(this.gridOptions.maxConcurrentDatasourceRequests);\n if (res == null) { return 2; } // 2 is the default\n if (res <= 0) { return; } // negative number, eg -1, means no max restriction\n return res;\n }\n\n public getMaxBlocksInCache(): number | undefined {\n return this.gridOptions.maxBlocksInCache;\n }\n\n public getCacheOverflowSize(): number | undefined {\n return this.gridOptions.cacheOverflowSize;\n }\n\n public getPaginationPageSize(): number | undefined {\n return toNumber(this.gridOptions.paginationPageSize);\n }\n\n public isPaginateChildRows(): boolean {\n const shouldPaginate = this.isGroupRemoveSingleChildren() || this.isGroupRemoveLowestSingleChildren();\n if (shouldPaginate) { return true; }\n return isTrue(this.gridOptions.paginateChildRows);\n }\n\n public getCacheBlockSize(): number | undefined {\n return oneOrGreater(this.gridOptions.cacheBlockSize);\n }\n\n public getInfiniteInitialRowCount(): number | undefined {\n return this.gridOptions.infiniteInitialRowCount;\n }\n\n public isPurgeClosedRowNodes() {\n return isTrue(this.gridOptions.purgeClosedRowNodes);\n }\n\n public isSuppressPaginationPanel() {\n return isTrue(this.gridOptions.suppressPaginationPanel);\n }\n\n public getRowData(): any[] | undefined | null {\n return this.gridOptions.rowData;\n }\n\n public isEnableRtl() {\n return isTrue(this.gridOptions.enableRtl);\n }\n\n public getRowGroupPanelShow() {\n return this.gridOptions.rowGroupPanelShow;\n }\n\n public getPivotPanelShow() {\n return this.gridOptions.pivotPanelShow;\n }\n\n public isAngularCompileRows() {\n return isTrue(this.gridOptions.angularCompileRows);\n }\n\n public isAngularCompileFilters() {\n return isTrue(this.gridOptions.angularCompileFilters);\n }\n\n public isDebug() {\n return isTrue(this.gridOptions.debug);\n }\n\n public getColumnDefs() {\n return this.gridOptions.columnDefs;\n }\n\n public getColumnTypes(): { [key: string]: ColDef; } | undefined {\n return this.gridOptions.columnTypes;\n }\n\n public getDatasource(): IDatasource | undefined {\n return this.gridOptions.datasource;\n }\n\n public getViewportDatasource(): IViewportDatasource | undefined {\n return this.gridOptions.viewportDatasource;\n }\n\n public getServerSideDatasource(): IServerSideDatasource | undefined {\n return this.gridOptions.serverSideDatasource;\n }\n\n public isAccentedSort() {\n return isTrue(this.gridOptions.accentedSort);\n }\n\n public isEnableBrowserTooltips() {\n return isTrue(this.gridOptions.enableBrowserTooltips);\n }\n\n public isEnableCellExpressions() {\n return isTrue(this.gridOptions.enableCellExpressions);\n }\n\n public isEnableGroupEdit() {\n return isTrue(this.gridOptions.enableGroupEdit);\n }\n\n public isSuppressMiddleClickScrolls() {\n return isTrue(this.gridOptions.suppressMiddleClickScrolls);\n }\n\n public isPreventDefaultOnContextMenu() {\n return isTrue(this.gridOptions.preventDefaultOnContextMenu);\n }\n\n public isSuppressPreventDefaultOnMouseWheel() {\n return isTrue(this.gridOptions.suppressPreventDefaultOnMouseWheel);\n }\n\n public isSuppressColumnVirtualisation() {\n return isTrue(this.gridOptions.suppressColumnVirtualisation);\n }\n\n public isSuppressRowVirtualisation() {\n return isTrue(this.gridOptions.suppressRowVirtualisation);\n }\n\n public isSuppressContextMenu() {\n return isTrue(this.gridOptions.suppressContextMenu);\n }\n\n public isAllowContextMenuWithControlKey() {\n return isTrue(this.gridOptions.allowContextMenuWithControlKey);\n }\n\n public isSuppressCopyRowsToClipboard() {\n return isTrue(this.gridOptions.suppressCopyRowsToClipboard);\n }\n\n public isSuppressCopySingleCellRanges() {\n return isTrue(this.gridOptions.suppressCopySingleCellRanges);\n }\n\n public isCopyHeadersToClipboard() {\n return isTrue(this.gridOptions.copyHeadersToClipboard);\n }\n\n public isCopyGroupHeadersToClipboard() {\n return isTrue(this.gridOptions.copyGroupHeadersToClipboard);\n }\n\n public isSuppressClipboardPaste() {\n return isTrue(this.gridOptions.suppressClipboardPaste);\n }\n\n public isSuppressLastEmptyLineOnPaste() {\n return isTrue(this.gridOptions.suppressLastEmptyLineOnPaste);\n }\n\n public isPagination() {\n return isTrue(this.gridOptions.pagination);\n }\n\n public isSuppressEnterpriseResetOnNewColumns() {\n return isTrue(this.gridOptions.suppressEnterpriseResetOnNewColumns);\n }\n\n public getProcessDataFromClipboardFunc() {\n return this.mergeGridCommonParams(this.gridOptions.processDataFromClipboard);\n }\n\n public getAsyncTransactionWaitMillis(): number | undefined {\n return exists(this.gridOptions.asyncTransactionWaitMillis) ? this.gridOptions.asyncTransactionWaitMillis : Constants.BATCH_WAIT_MILLIS;\n }\n\n public isSuppressMovableColumns() {\n return isTrue(this.gridOptions.suppressMovableColumns);\n }\n\n public isAnimateRows() {\n // never allow animating if enforcing the row order\n if (this.isEnsureDomOrder()) { return false; }\n\n return isTrue(this.gridOptions.animateRows);\n }\n\n public isSuppressColumnMoveAnimation() {\n return isTrue(this.gridOptions.suppressColumnMoveAnimation);\n }\n\n public isSuppressAggFuncInHeader() {\n return isTrue(this.gridOptions.suppressAggFuncInHeader);\n }\n\n public isSuppressAggAtRootLevel() {\n return isTrue(this.gridOptions.suppressAggAtRootLevel);\n }\n\n public isSuppressAggFilteredOnly() {\n const isGroupAggFiltering = this.getGroupAggFiltering() !== undefined;\n return isGroupAggFiltering || isTrue(this.gridOptions.suppressAggFilteredOnly);\n }\n\n public isRemovePivotHeaderRowWhenSingleValueColumn() {\n return isTrue(this.gridOptions.removePivotHeaderRowWhenSingleValueColumn);\n }\n\n public isShowOpenedGroup() {\n return isTrue(this.gridOptions.showOpenedGroup);\n }\n\n public isReactUi() {\n return isTrue(this.gridOptions.reactUi);\n }\n\n public isSuppressReactUi() {\n return isTrue(this.gridOptions.suppressReactUi);\n }\n\n public isEnableRangeSelection(): boolean {\n return ModuleRegistry.isRegistered(ModuleNames.RangeSelectionModule) && isTrue(this.gridOptions.enableRangeSelection);\n }\n\n public isEnableRangeHandle(): boolean {\n return isTrue(this.gridOptions.enableRangeHandle);\n }\n\n public isEnableFillHandle(): boolean {\n return isTrue(this.gridOptions.enableFillHandle);\n }\n\n public getFillHandleDirection(): 'x' | 'y' | 'xy' {\n const direction = this.gridOptions.fillHandleDirection;\n\n if (!direction) { return 'xy'; }\n\n if (direction !== 'x' && direction !== 'y' && direction !== 'xy') {\n doOnce(() => console.warn(`AG Grid: valid values for fillHandleDirection are 'x', 'y' and 'xy'. Default to 'xy'.`), 'warn invalid fill direction');\n return 'xy';\n }\n\n return direction;\n }\n\n public getFillOperation() {\n return this.mergeGridCommonParams(this.gridOptions.fillOperation);\n }\n\n public isSuppressMultiRangeSelection(): boolean {\n return isTrue(this.gridOptions.suppressMultiRangeSelection);\n }\n\n public isPaginationAutoPageSize(): boolean {\n return isTrue(this.gridOptions.paginationAutoPageSize);\n }\n\n public isRememberGroupStateWhenNewData(): boolean {\n return isTrue(this.gridOptions.rememberGroupStateWhenNewData);\n }\n\n public getIcons() {\n return this.gridOptions.icons;\n }\n\n public getGroupAggFiltering(): ((params: WithoutGridCommon) => boolean) | undefined {\n const userValue = this.gridOptions.groupAggFiltering;\n\n if (typeof userValue === 'function') {\n return this.mergeGridCommonParams(userValue);\n }\n\n if (isTrue(userValue)) {\n return () => true;\n }\n\n return undefined;\n }\n\n public getAggFuncs(): { [key: string]: IAggFunc; } | undefined {\n return this.gridOptions.aggFuncs;\n }\n\n public getSortingOrder(): ('asc' | 'desc' | null)[] | undefined {\n return this.gridOptions.sortingOrder;\n }\n\n public getAlignedGrids(): GridOptions[] | undefined {\n return this.gridOptions.alignedGrids;\n }\n\n public isMasterDetail() {\n const masterDetail = isTrue(this.gridOptions.masterDetail);\n\n if (masterDetail) {\n return ModuleRegistry.assertRegistered(ModuleNames.MasterDetailModule, 'masterDetail');\n } else {\n return false;\n }\n }\n\n public isKeepDetailRows(): boolean {\n return isTrue(this.gridOptions.keepDetailRows);\n }\n\n public getKeepDetailRowsCount(): number | undefined {\n const keepDetailRowsCount = this.gridOptions.keepDetailRowsCount;\n if (exists(keepDetailRowsCount) && keepDetailRowsCount > 0) {\n return this.gridOptions.keepDetailRowsCount;\n }\n\n return DEFAULT_KEEP_DETAIL_ROW_COUNT;\n }\n\n public getIsRowMasterFunc() {\n return this.gridOptions.isRowMaster;\n }\n\n public getIsRowSelectableFunc() {\n return this.gridOptions.isRowSelectable;\n }\n\n public getGroupRowRendererParams() {\n return this.gridOptions.groupRowRendererParams;\n }\n\n public getOverlayLoadingTemplate() {\n return this.gridOptions.overlayLoadingTemplate;\n }\n\n public getOverlayNoRowsTemplate() {\n return this.gridOptions.overlayNoRowsTemplate;\n }\n\n public isSuppressAutoSize() {\n return isTrue(this.gridOptions.suppressAutoSize);\n }\n\n public isEnableCellTextSelection() {\n return isTrue(this.gridOptions.enableCellTextSelection);\n }\n\n public isSuppressParentsInRowNodes() {\n return isTrue(this.gridOptions.suppressParentsInRowNodes);\n }\n\n public isSuppressClipboardApi() {\n return isTrue(this.gridOptions.suppressClipboardApi);\n }\n\n public isFunctionsReadOnly() {\n return isTrue(this.gridOptions.functionsReadOnly);\n }\n\n public isEnableCellTextSelect(): boolean {\n return isTrue(this.gridOptions.enableCellTextSelection);\n }\n\n public getDefaultColDef(): ColDef | undefined {\n return this.gridOptions.defaultColDef;\n }\n\n public getDefaultColGroupDef(): Partial | undefined {\n return this.gridOptions.defaultColGroupDef;\n }\n\n public getDefaultExportParams(type: 'csv'): CsvExportParams | undefined;\n public getDefaultExportParams(type: 'excel'): ExcelExportParams | undefined;\n public getDefaultExportParams(type: 'csv' | 'excel'): CsvExportParams | ExcelExportParams | undefined {\n if (this.gridOptions.defaultExportParams) {\n console.warn(`AG Grid: Since v25.2 \\`defaultExportParams\\` has been replaced by \\`default${capitalise(type)}ExportParams\\`'`);\n if (type === 'csv') {\n return this.gridOptions.defaultExportParams as CsvExportParams;\n }\n return this.gridOptions.defaultExportParams as ExcelExportParams;\n }\n\n if (type === 'csv' && this.gridOptions.defaultCsvExportParams) {\n return this.gridOptions.defaultCsvExportParams;\n }\n\n if (type === 'excel' && this.gridOptions.defaultExcelExportParams) {\n return this.gridOptions.defaultExcelExportParams;\n }\n }\n\n public isSuppressCsvExport() {\n return isTrue(this.gridOptions.suppressCsvExport);\n }\n\n public isAllowShowChangeAfterFilter() {\n return isTrue(this.gridOptions.allowShowChangeAfterFilter);\n }\n\n public isSuppressExcelExport() {\n return isTrue(this.gridOptions.suppressExcelExport);\n }\n\n public isSuppressMakeColumnVisibleAfterUnGroup() {\n return isTrue(this.gridOptions.suppressMakeColumnVisibleAfterUnGroup);\n }\n\n public getDataPathFunc(): ((dataItem: any) => string[]) | undefined {\n return this.gridOptions.getDataPath;\n }\n\n public getIsServerSideGroupFunc(): ((dataItem: any) => boolean) | undefined {\n return this.gridOptions.isServerSideGroup;\n }\n\n public getIsServerSideGroupOpenByDefaultFunc() {\n return this.mergeGridCommonParams(this.gridOptions.isServerSideGroupOpenByDefault);\n }\n\n public getIsGroupOpenByDefaultFunc() {\n return this.mergeGridCommonParams(this.gridOptions.isGroupOpenByDefault);\n }\n\n public getServerSideGroupKeyFunc(): ((dataItem: any) => string) | undefined {\n return this.gridOptions.getServerSideGroupKey;\n }\n\n public getGroupRowAggFunc() {\n\n const { getGroupRowAgg, groupRowAggNodes } = this.gridOptions;\n if (getGroupRowAgg) {\n return this.mergeGridCommonParams(getGroupRowAgg);\n }\n // this is the deprecated way, so provide a proxy to make it compatible\n if (groupRowAggNodes) {\n return (params: WithoutGridCommon) => groupRowAggNodes(params.nodes)\n }\n }\n\n public getContextMenuItemsFunc() {\n return this.mergeGridCommonParams(this.gridOptions.getContextMenuItems);\n }\n\n public getMainMenuItemsFunc() {\n return this.mergeGridCommonParams(this.gridOptions.getMainMenuItems);\n }\n\n public getRowIdFunc() {\n const { getRowId, getRowNodeId } = this.gridOptions;\n if (getRowId) {\n return this.mergeGridCommonParams(getRowId);\n }\n // this is the deprecated way, so provide a proxy to make it compatible\n if (getRowNodeId) {\n return (params: WithoutGridCommon) => getRowNodeId(params.data)\n }\n }\n\n public getNavigateToNextHeaderFunc() {\n return this.mergeGridCommonParams(this.gridOptions.navigateToNextHeader);\n }\n\n public getTabToNextHeaderFunc() {\n return this.mergeGridCommonParams(this.gridOptions.tabToNextHeader);\n }\n\n public getNavigateToNextCellFunc() {\n return this.mergeGridCommonParams(this.gridOptions.navigateToNextCell);\n }\n\n public getTabToNextCellFunc() {\n return this.mergeGridCommonParams(this.gridOptions.tabToNextCell)\n }\n\n public getGridTabIndex(): string {\n return (this.gridOptions.tabIndex || 0).toString();\n }\n\n public isTreeData(): boolean {\n const usingTreeData = isTrue(this.gridOptions.treeData);\n\n if (usingTreeData) {\n return ModuleRegistry.assertRegistered(ModuleNames.RowGroupingModule, 'Tree Data');\n }\n\n return false;\n }\n\n public isValueCache(): boolean {\n return isTrue(this.gridOptions.valueCache);\n }\n\n public isValueCacheNeverExpires(): boolean {\n return isTrue(this.gridOptions.valueCacheNeverExpires);\n }\n\n public isDeltaSort(): boolean {\n return isTrue(this.gridOptions.deltaSort);\n }\n\n public isAggregateOnlyChangedColumns(): boolean {\n return isTrue(this.gridOptions.aggregateOnlyChangedColumns);\n }\n\n public getProcessSecondaryColDefFunc() {\n return this.gridOptions.processSecondaryColDef;\n }\n public getProcessSecondaryColGroupDefFunc() {\n return this.gridOptions.processSecondaryColGroupDef;\n }\n\n public getSendToClipboardFunc() {\n return this.mergeGridCommonParams(this.gridOptions.sendToClipboard);\n }\n\n public getProcessRowPostCreateFunc() {\n return this.mergeGridCommonParams(this.gridOptions.processRowPostCreate);\n }\n\n public getProcessCellForClipboardFunc() {\n return this.mergeGridCommonParams(this.gridOptions.processCellForClipboard);\n }\n\n public getProcessHeaderForClipboardFunc() {\n return this.mergeGridCommonParams(this.gridOptions.processHeaderForClipboard);\n }\n\n public getProcessGroupHeaderForClipboardFunc() {\n return this.mergeGridCommonParams(this.gridOptions.processGroupHeaderForClipboard);\n }\n\n public getProcessCellFromClipboardFunc() {\n return this.mergeGridCommonParams(this.gridOptions.processCellFromClipboard);\n }\n\n public getViewportRowModelPageSize(): number | undefined {\n return oneOrGreater(this.gridOptions.viewportRowModelPageSize, DEFAULT_VIEWPORT_ROW_MODEL_PAGE_SIZE);\n }\n\n public getViewportRowModelBufferSize(): number {\n return zeroOrGreater(this.gridOptions.viewportRowModelBufferSize, DEFAULT_VIEWPORT_ROW_MODEL_BUFFER_SIZE);\n }\n\n public isServerSideSortingAlwaysResets() {\n return isTrue(this.gridOptions.serverSideSortingAlwaysResets);\n }\n\n public isServerSideFilteringAlwaysResets() {\n return isTrue(this.gridOptions.serverSideFilteringAlwaysResets);\n }\n\n public getPostSortFunc() {\n const { postSortRows, postSort } = this.gridOptions;\n if (postSortRows) {\n return this.mergeGridCommonParams(postSortRows);\n }\n // this is the deprecated way, so provide a proxy to make it compatible\n if (postSort) {\n return (params: WithoutGridCommon) => postSort(params.nodes);\n }\n }\n\n public getChartToolbarItemsFunc() {\n return this.mergeGridCommonParams(this.gridOptions.getChartToolbarItems);\n }\n\n public getChartThemeOverrides(): AgChartThemeOverrides | undefined {\n return this.gridOptions.chartThemeOverrides;\n }\n\n public getCustomChartThemes(): { [name: string]: AgChartTheme; } | undefined {\n return this.gridOptions.customChartThemes;\n }\n\n public getChartThemes(): string[] {\n // return default themes if user hasn't supplied any\n return this.gridOptions.chartThemes || ['ag-default', 'ag-material', 'ag-pastel', 'ag-vivid', 'ag-solar'];\n }\n\n public getClipboardDelimiter() {\n return exists(this.gridOptions.clipboardDelimiter) ? this.gridOptions.clipboardDelimiter : '\\t';\n }\n\n public setProperty(key: string, value: any, force = false): void {\n const gridOptionsNoType = this.gridOptions as any;\n const previousValue = gridOptionsNoType[key];\n\n if (force || previousValue !== value) {\n gridOptionsNoType[key] = value;\n const event: PropertyChangedEvent = {\n type: key,\n currentValue: value,\n previousValue: previousValue\n };\n this.propertyEventService.dispatchEvent(event);\n }\n }\n\n public addEventListener(key: string, listener: Function): void {\n this.propertyEventService.addEventListener(key, listener);\n }\n\n public removeEventListener(key: string, listener: Function): void {\n this.propertyEventService.removeEventListener(key, listener);\n }\n\n public isSkipHeaderOnAutoSize(): boolean {\n return !!this.gridOptions.skipHeaderOnAutoSize;\n }\n\n public getAutoSizePadding(): number {\n const value = this.gridOptions.autoSizePadding;\n return value != null && value >= 0 ? value : 20;\n }\n\n // properties\n public getHeaderHeight(): number | null | undefined {\n if (typeof this.gridOptions.headerHeight === 'number') {\n return this.gridOptions.headerHeight;\n }\n\n return this.getFromTheme(25, 'headerHeight');\n }\n\n public getFloatingFiltersHeight(): number | null | undefined {\n if (typeof this.gridOptions.floatingFiltersHeight === 'number') {\n return this.gridOptions.floatingFiltersHeight;\n }\n\n return this.getFromTheme(25, 'headerHeight');\n }\n\n public getGroupHeaderHeight(): number | null | undefined {\n if (typeof this.gridOptions.groupHeaderHeight === 'number') {\n return this.gridOptions.groupHeaderHeight;\n }\n\n return this.getHeaderHeight();\n }\n\n public getPivotHeaderHeight(): number | null | undefined {\n if (typeof this.gridOptions.pivotHeaderHeight === 'number') {\n return this.gridOptions.pivotHeaderHeight;\n }\n\n return this.getHeaderHeight();\n }\n\n public getPivotGroupHeaderHeight(): number | null | undefined {\n if (typeof this.gridOptions.pivotGroupHeaderHeight === 'number') {\n return this.gridOptions.pivotGroupHeaderHeight;\n }\n\n return this.getGroupHeaderHeight();\n }\n\n public isExternalFilterPresent() {\n if (typeof this.gridOptions.isExternalFilterPresent === 'function') {\n return this.gridOptions.isExternalFilterPresent({ api: this.getApi()!, columnApi: this.getColumnApi()!, context: this.getContext() });\n }\n\n return false;\n }\n\n public doesExternalFilterPass(node: RowNode) {\n if (typeof this.gridOptions.doesExternalFilterPass === 'function') {\n return this.gridOptions.doesExternalFilterPass(node);\n }\n\n return false;\n }\n\n public getTooltipDelay(type: 'show' | 'hide'): number | null {\n const { tooltipShowDelay, tooltipHideDelay } = this.gridOptions;\n const delay = type === 'show' ? tooltipShowDelay : tooltipHideDelay;\n const capitalisedType = capitalise(type);\n\n if (exists(delay)) {\n if (delay < 0) {\n doOnce(() => console.warn(`ag-grid: tooltip${capitalisedType}Delay should not be lower than 0`), `tooltip${capitalisedType}DelayWarn`);\n }\n\n return Math.max(200, delay);\n }\n\n return null;\n }\n\n public isTooltipMouseTrack() {\n return isTrue(this.gridOptions.tooltipMouseTrack);\n }\n\n public isSuppressModelUpdateAfterUpdateTransaction(): boolean {\n return isTrue(this.gridOptions.suppressModelUpdateAfterUpdateTransaction);\n }\n\n public getDocument(): Document {\n // if user is providing document, we use the users one,\n // otherwise we use the document on the global namespace.\n let result: Document | null = null;\n if (this.gridOptions.getDocument && exists(this.gridOptions.getDocument)) {\n result = this.gridOptions.getDocument();\n } else if (this.eGridDiv) {\n result = this.eGridDiv.ownerDocument;\n }\n\n if (result && exists(result)) {\n return result;\n }\n\n return document;\n }\n\n public getMinColWidth(): number {\n const minColWidth = this.gridOptions.minColWidth;\n\n if (exists(minColWidth) && minColWidth > GridOptionsWrapper.MIN_COL_WIDTH) {\n return this.gridOptions.minColWidth!;\n }\n\n const measuredMin = this.getFromTheme(null, 'headerCellMinWidth');\n return exists(measuredMin) ? Math.max(measuredMin, GridOptionsWrapper.MIN_COL_WIDTH) : GridOptionsWrapper.MIN_COL_WIDTH;\n }\n\n public getMaxColWidth() {\n if (this.gridOptions.maxColWidth && this.gridOptions.maxColWidth > GridOptionsWrapper.MIN_COL_WIDTH) {\n return this.gridOptions.maxColWidth;\n }\n\n return null;\n }\n\n public getColWidth() {\n if (typeof this.gridOptions.colWidth !== 'number' || this.gridOptions.colWidth < GridOptionsWrapper.MIN_COL_WIDTH) {\n return 200;\n }\n\n return this.gridOptions.colWidth;\n }\n\n public getRowBuffer(): number {\n let rowBuffer = this.gridOptions.rowBuffer;\n\n if (typeof rowBuffer === 'number') {\n if (rowBuffer < 0) {\n doOnce(() => console.warn(`AG Grid: rowBuffer should not be negative`), 'warn rowBuffer negative');\n this.gridOptions.rowBuffer = rowBuffer = 0;\n }\n } else {\n rowBuffer = Constants.ROW_BUFFER_SIZE;\n }\n\n return rowBuffer;\n }\n\n public getRowBufferInPixels() {\n const rowsToBuffer = this.getRowBuffer();\n const defaultRowHeight = this.getRowHeightAsNumber();\n\n return rowsToBuffer * defaultRowHeight;\n }\n\n // the user might be using some non-standard scrollbar, eg a scrollbar that has zero\n // width and overlays (like the Safari scrollbar, but presented in Chrome). so we\n // allow the user to provide the scroll width before we work it out.\n public getScrollbarWidth() {\n if (this.scrollbarWidth == null) {\n const useGridOptions = typeof this.gridOptions.scrollbarWidth === 'number' && this.gridOptions.scrollbarWidth >= 0;\n const scrollbarWidth = useGridOptions ? this.gridOptions.scrollbarWidth : getScrollbarWidth();\n\n if (scrollbarWidth != null) {\n this.scrollbarWidth = scrollbarWidth;\n\n this.eventService.dispatchEvent({\n type: Events.EVENT_SCROLLBAR_WIDTH_CHANGED\n });\n }\n }\n\n return this.scrollbarWidth;\n }\n\n private checkForDeprecated() {\n // casting to generic object, so typescript compiles even though\n // we are looking for attributes that don't exist\n const options: any = this.gridOptions;\n\n if (options.deprecatedEmbedFullWidthRows) {\n console.warn(`AG Grid: since v21.2, deprecatedEmbedFullWidthRows has been replaced with embedFullWidthRows.`);\n }\n\n if (options.rowDeselection) {\n console.warn(\n 'AG Grid: since v24.x, rowDeselection is deprecated and the behaviour is true by default. Please use `suppressRowDeselection` to prevent rows from being deselected.'\n );\n }\n\n if (options.enableMultiRowDragging) {\n options.rowDragMultiRow = true;\n delete options.enableMultiRowDragging;\n console.warn(\n 'AG Grid: since v26.1, `enableMultiRowDragging` is deprecated. Please use `rowDragMultiRow`.'\n );\n }\n\n const checkRenamedProperty = (oldProp: string, newProp: string, version: string) => {\n if (options[oldProp] != null) {\n console.warn(`AG Grid: since version ${version}, '${oldProp}' is deprecated / renamed, please use the new property name '${newProp}' instead.`);\n if (options[newProp] == null) {\n options[newProp] = options[oldProp];\n }\n }\n };\n\n checkRenamedProperty('batchUpdateWaitMillis', 'asyncTransactionWaitMillis', '23.1.x');\n checkRenamedProperty('deltaRowDataMode', 'immutableData', '23.1.x');\n\n if (options.immutableColumns || options.deltaColumnMode) {\n console.warn(\n 'AG Grid: since v24.0, immutableColumns and deltaColumnMode properties are gone. The grid now works like this as default. To keep column order maintained, set grid property applyColumnDefOrder=true'\n );\n }\n\n checkRenamedProperty('suppressSetColumnStateEvents', 'suppressColumnStateEvents', '24.0.x');\n\n if (options.groupRowInnerRenderer || options.groupRowInnerRendererParams || options.groupRowInnerRendererFramework) {\n console.warn('AG Grid: since v24.0, grid properties groupRowInnerRenderer, groupRowInnerRendererFramework and groupRowInnerRendererParams are no longer used.');\n console.warn(' Instead use the grid properties groupRowRendererParams.innerRenderer, groupRowRendererParams.innerRendererFramework and groupRowRendererParams.innerRendererParams.');\n console.warn(' For example instead of this:');\n console.warn(' groupRowInnerRenderer: \"myRenderer\"');\n console.warn(' groupRowInnerRendererParams: {x: a}');\n console.warn(' Replace with this:');\n console.warn(' groupRowRendererParams: {');\n console.warn(' innerRenderer: \"myRenderer\",');\n console.warn(' innerRendererParams: {x: a}');\n console.warn(' }');\n console.warn(' We have copied the properties over for you. However to stop this error message, please change your application code.');\n if (!options.groupRowRendererParams) {\n options.groupRowRendererParams = {};\n }\n const params = options.groupRowRendererParams;\n if (options.groupRowInnerRenderer) {\n params.innerRenderer = options.groupRowInnerRenderer;\n }\n if (options.groupRowInnerRendererParams) {\n params.innerRendererParams = options.groupRowInnerRendererParams;\n }\n if (options.groupRowInnerRendererFramework) {\n params.innerRendererFramework = options.groupRowInnerRendererFramework;\n }\n }\n\n if (options.rememberGroupStateWhenNewData) {\n console.warn('AG Grid: since v24.0, grid property rememberGroupStateWhenNewData is deprecated. This feature was provided before Transaction Updates worked (which keep group state). Now that transaction updates are possible and they keep group state, this feature is no longer needed.');\n }\n\n if (options.detailCellRendererParams && options.detailCellRendererParams.autoHeight) {\n console.warn('AG Grid: since v24.1, grid property detailCellRendererParams.autoHeight is replaced with grid property detailRowAutoHeight. This allows this feature to work when you provide a custom DetailCellRenderer');\n options.detailRowAutoHeight = true;\n }\n\n if (options.suppressKeyboardEvent) {\n console.warn(\n `AG Grid: since v24.1 suppressKeyboardEvent in the gridOptions has been deprecated and will be removed in\n future versions of AG Grid. If you need this to be set for every column use the defaultColDef property.`\n );\n }\n\n if (options.suppressEnterpriseResetOnNewColumns) {\n console.warn('AG Grid: since v25, grid property suppressEnterpriseResetOnNewColumns is deprecated. This was a temporary property to allow changing columns in Server Side Row Model without triggering a reload. Now that it is possible to dynamically change columns in the grid, this is no longer needed.');\n }\n\n if (options.suppressColumnStateEvents) {\n console.warn('AG Grid: since v25, grid property suppressColumnStateEvents no longer works due to a refactor that we did. It should be possible to achieve similar using event.source, which would be \"api\" if the event was due to setting column state via the API');\n }\n\n if (options.defaultExportParams) {\n console.warn('AG Grid: since v25.2, the grid property `defaultExportParams` has been replaced by `defaultCsvExportParams` and `defaultExcelExportParams`.');\n }\n\n if (options.stopEditingWhenGridLosesFocus) {\n console.warn('AG Grid: since v25.2.2, the grid property `stopEditingWhenGridLosesFocus` has been replaced by `stopEditingWhenCellsLoseFocus`.');\n options.stopEditingWhenCellsLoseFocus = true;\n }\n\n if (options.applyColumnDefOrder) {\n console.warn('AG Grid: since v26.0, the grid property `applyColumnDefOrder` is no longer needed, as this is the default behaviour. To turn this behaviour off, set maintainColumnOrder=true');\n }\n\n if (options.groupMultiAutoColumn) {\n console.warn(\"AG Grid: since v26.0, the grid property `groupMultiAutoColumn` has been replaced by `groupDisplayType = 'multipleColumns'`\");\n options.groupDisplayType = 'multipleColumns';\n }\n\n if (options.groupUseEntireRow) {\n console.warn(\"AG Grid: since v26.0, the grid property `groupUseEntireRow` has been replaced by `groupDisplayType = 'groupRows'`\");\n options.groupDisplayType = 'groupRows';\n }\n\n if (options.groupSuppressAutoColumn) {\n const propName = options.treeData ? 'treeDataDisplayType' : 'groupDisplayType';\n console.warn(`AG Grid: since v26.0, the grid property \\`groupSuppressAutoColumn\\` has been replaced by \\`${propName} = 'custom'\\``);\n options.groupDisplayType = 'custom';\n }\n\n if (options.defaultGroupOrderComparator) {\n console.warn(\"AG Grid: since v27.2, the grid property `defaultGroupOrderComparator` is deprecated and has been replaced by `initialGroupOrderComparator` and now receives a single params object.\");\n }\n if (options.defaultGroupSortComparator) {\n console.warn(\"AG Grid: since v26.0, the grid property `defaultGroupSortComparator` has been replaced by `initialGroupOrderComparator`\");\n options.defaultGroupOrderComparator = options.defaultGroupSortComparator;\n }\n\n if (options.groupRowAggNodes) {\n console.warn(\"AG Grid: since v27.2, the grid property `groupRowAggNodes` is deprecated and has been replaced by `getGroupRowAgg` and now receives a single params object.\");\n }\n if (options.postSort) {\n console.warn(\"AG Grid: since v27.2, the grid property `postSort` is deprecated and has been replaced by `postSortRows` and now receives a single params object.\");\n }\n if (options.isFullWidthCell) {\n console.warn(\"AG Grid: since v27.2, the grid property `isFullWidthCell` is deprecated and has been replaced by `isFullWidthRow` and now receives a single params object.\");\n }\n if (options.localeTextFunc) {\n console.warn(\"AG Grid: since v27.2, the grid property `localeTextFunc` is deprecated and has been replaced by `getLocaleText` and now receives a single params object.\");\n }\n\n if (options.colWidth) {\n console.warn('AG Grid: since v26.1, the grid property `colWidth` is deprecated and should be set via `defaultColDef.width`.');\n }\n if (options.minColWidth) {\n console.warn('AG Grid: since v26.1, the grid property `minColWidth` is deprecated and should be set via `defaultColDef.minWidth`.');\n }\n if (options.maxColWidth) {\n console.warn('AG Grid: since v26.1, the grid property `maxColWidth` is deprecated and should be set via `defaultColDef.maxWidth`.');\n }\n if (options.reactUi) {\n console.warn('AG Grid: since v27.0, React UI is on by default, so no need for reactUi=true. To turn it off, set suppressReactUi=true.');\n }\n if (options.suppressReactUi) {\n console.warn('AG Grid: The legacy React rendering engine is deprecated and will be removed in the next major version of the grid.');\n }\n if (options.suppressCellSelection) {\n console.warn('AG Grid: since v27.0, `suppressCellSelection` has been replaced by `suppressCellFocus`.');\n options.suppressCellFocus = options.suppressCellSelection;\n }\n\n if (options.getRowNodeId) {\n console.warn('AG Grid: since v27.1, `getRowNodeId` is deprecated and has been replaced by `getRowId`. The difference: if getRowId() is implemented then immutable data is enabled by default.');\n }\n if (options.immutableData) {\n if (options.getRowId) {\n console.warn('AG Grid: since v27.1, `immutableData` is deprecated. With the `getRowId` callback implemented, immutable data is enabled by default so you can remove `immutableData=true`.');\n } else {\n console.warn('AG Grid: since v27.1, `immutableData` is deprecated. To enable immutable data you must implement the `getRowId()` callback.');\n }\n }\n if (options.clipboardDeliminator) {\n console.warn('AG Grid: since v27.1, `clipboardDeliminator` has been replaced by `clipboardDelimiter`.');\n options.clipboardDelimiter = options.clipboardDeliminator;\n }\n }\n\n private checkForViolations() {\n if (this.isTreeData()) { this.treeDataViolations(); }\n }\n\n private treeDataViolations() {\n if (this.isRowModelDefault()) {\n if (missing(this.getDataPathFunc())) {\n console.warn(\n 'AG Grid: property usingTreeData=true with rowModel=clientSide, but you did not ' +\n 'provide getDataPath function, please provide getDataPath function if using tree data.'\n );\n }\n }\n if (this.isRowModelServerSide()) {\n if (missing(this.getIsServerSideGroupFunc())) {\n console.warn(\n 'AG Grid: property usingTreeData=true with rowModel=serverSide, but you did not ' +\n 'provide isServerSideGroup function, please provide isServerSideGroup function if using tree data.'\n );\n }\n if (missing(this.getServerSideGroupKeyFunc())) {\n console.warn(\n 'AG Grid: property usingTreeData=true with rowModel=serverSide, but you did not ' +\n 'provide getServerSideGroupKey function, please provide getServerSideGroupKey function if using tree data.'\n );\n }\n }\n }\n\n public getLocaleTextFunc(): (key: string, defaultValue: string, variableValues?: string[]) => string {\n const { localeText, getLocaleText, localeTextFunc } = this.gridOptions;\n if (getLocaleText) {\n //key: string, defaultValue: string, variableValues?: string[]\n return (key: string, defaultValue: string, variableValues?: string[]) => {\n const params: GetLocaleTextParams = {\n key,\n defaultValue,\n variableValues,\n api: this.getApi()!,\n columnApi: this.getColumnApi()!,\n context: this.getContext()\n }\n return getLocaleText(params);\n }\n }\n\n if (localeTextFunc) {\n return localeTextFunc;\n }\n\n return (key: string, defaultValue: string, variableValues?: string[]) => {\n let localisedText = localeText && localeText[key];\n\n\n if (localisedText && variableValues && variableValues.length) {\n let found = 0;\n while (true) {\n if (found >= variableValues.length) { break; }\n const idx = localisedText.indexOf('${variable}');\n if (idx === -1) { break; }\n\n localisedText = localisedText.replace('${variable}', variableValues[found++]);\n }\n }\n\n return localisedText ?? defaultValue;\n };\n }\n\n // responsible for calling the onXXX functions on gridOptions\n public globalEventHandler(eventName: string, event?: any): void {\n // prevent events from being fired _after_ the grid has been destroyed\n if (this.destroyed) {\n return;\n }\n\n const callbackMethodName = ComponentUtil.getCallbackForEvent(eventName);\n if (typeof (this.gridOptions as any)[callbackMethodName] === 'function') {\n (this.gridOptions as any)[callbackMethodName](event);\n }\n }\n\n private setRowHeightVariable(height: number): void {\n const oldRowHeight = this.eGridDiv.style.getPropertyValue('--ag-line-height').trim();\n const newRowHeight = `${height}px`;\n\n if (oldRowHeight != newRowHeight) {\n this.eGridDiv.style.setProperty('--ag-line-height', newRowHeight);\n }\n }\n\n // we don't allow dynamic row height for virtual paging\n public getRowHeightAsNumber(): number {\n if (!this.gridOptions.rowHeight || missing(this.gridOptions.rowHeight)) {\n return this.getDefaultRowHeight();\n }\n\n const rowHeight = this.gridOptions.rowHeight;\n\n if (rowHeight && this.isNumeric(rowHeight)) {\n this.setRowHeightVariable(rowHeight);\n return rowHeight;\n }\n\n console.warn('AG Grid row height must be a number if not using standard row model');\n return this.getDefaultRowHeight();\n }\n\n public isGetRowHeightFunction(): boolean {\n return typeof this.gridOptions.getRowHeight === 'function';\n }\n\n public getRowHeightForNode(rowNode: RowNode, allowEstimate = false, defaultRowHeight?: number): { height: number; estimated: boolean; } {\n if (defaultRowHeight == null) {\n defaultRowHeight = this.getDefaultRowHeight();\n }\n\n // check the function first, in case use set both function and\n // number, when using virtual pagination then function can be\n // used for pinned rows and the number for the body rows.\n\n if (this.isGetRowHeightFunction()) {\n if (allowEstimate) {\n return { height: defaultRowHeight, estimated: true };\n }\n\n const params: WithoutGridCommon = {\n node: rowNode,\n data: rowNode.data\n };\n\n const height = this.mergeGridCommonParams(this.gridOptions.getRowHeight)!(params);\n\n if (this.isNumeric(height)) {\n if (height === 0) {\n doOnce(() => console.warn('AG Grid: The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead.'), 'invalidRowHeight');\n }\n return { height: Math.max(1, height), estimated: false };\n }\n }\n\n if (rowNode.detail && this.isMasterDetail()) {\n // if autoHeight, we want the height to grow to the new height starting at 1, as otherwise a flicker would happen,\n // as the detail goes to the default (eg 200px) and then immediately shrink up/down to the new measured height\n // (due to auto height) which looks bad, especially if doing row animation.\n if (this.isDetailRowAutoHeight()) {\n return { height: 1, estimated: false };\n }\n\n if (this.isNumeric(this.gridOptions.detailRowHeight)) {\n return { height: this.gridOptions.detailRowHeight, estimated: false };\n }\n\n return { height: DEFAULT_DETAIL_ROW_HEIGHT, estimated: false };\n }\n\n const rowHeight = this.gridOptions.rowHeight && this.isNumeric(this.gridOptions.rowHeight) ? this.gridOptions.rowHeight : defaultRowHeight;\n\n return { height: rowHeight, estimated: false };\n }\n\n public isDynamicRowHeight(): boolean {\n return typeof this.gridOptions.getRowHeight === 'function';\n }\n\n public getListItemHeight() {\n return this.getFromTheme(20, 'listItemHeight');\n\n }\n\n public chartMenuPanelWidth() {\n return this.environment.chartMenuPanelWidth();\n }\n\n private isNumeric(value: any): value is number {\n return !isNaN(value) && typeof value === 'number' && isFinite(value);\n }\n\n // Material data table has strict guidelines about whitespace, and these values are different than the ones\n // ag-grid uses by default. We override the default ones for the sake of making it better out of the box\n private getFromTheme(defaultValue: number, sassVariableName: SASS_PROPERTIES): number;\n private getFromTheme(defaultValue: null, sassVariableName: SASS_PROPERTIES): number | null | undefined;\n private getFromTheme(defaultValue: any, sassVariableName: SASS_PROPERTIES): any {\n const { theme } = this.environment.getTheme();\n if (theme && theme.indexOf('ag-theme') === 0) {\n return this.environment.getSassVariable(theme, sassVariableName);\n }\n return defaultValue;\n }\n\n public getDefaultRowHeight(): number {\n return this.getFromTheme(DEFAULT_ROW_HEIGHT, 'rowHeight');\n }\n\n private matchesGroupDisplayType(toMatch: RowGroupingDisplayType, supplied?: string): boolean {\n const groupDisplayTypeValues: RowGroupingDisplayType[] = ['groupRows', 'multipleColumns', 'custom', 'singleColumn'];\n if ((groupDisplayTypeValues as (string | undefined)[]).indexOf(supplied) < 0) {\n console.warn(`AG Grid: '${supplied}' is not a valid groupDisplayType value - possible values are: '${groupDisplayTypeValues.join(\"', '\")}'`);\n return false;\n }\n return supplied === toMatch;\n }\n\n private matchesTreeDataDisplayType(toMatch: TreeDataDisplayType, supplied?: string): boolean {\n const treeDataDisplayTypeValues: TreeDataDisplayType[] = ['auto', 'custom'];\n if ((treeDataDisplayTypeValues as (string | undefined)[]).indexOf(supplied) < 0) {\n console.warn(`AG Grid: '${supplied}' is not a valid treeDataDisplayType value - possible values are: '${treeDataDisplayTypeValues.join(\"', '\")}'`);\n return false;\n }\n return supplied === toMatch;\n }\n}\n","import { Constants } from \"../constants/constants\";\nimport { Autowired, PostConstruct } from \"../context/context\";\nimport { GridOptionsWrapper } from \"../gridOptionsWrapper\";\nimport { BeanStub } from \"../context/beanStub\";\n\nexport interface LayoutView {\n updateLayoutClasses(layoutClass: string, params: UpdateLayoutClassesParams): void;\n}\n\nexport enum LayoutCssClasses {\n AUTO_HEIGHT = 'ag-layout-auto-height',\n NORMAL = 'ag-layout-normal',\n PRINT = 'ag-layout-print'\n}\n\nexport interface UpdateLayoutClassesParams {\n autoHeight: boolean;\n normal: boolean;\n print: boolean;\n}\n\nexport class LayoutFeature extends BeanStub {\n\n @Autowired('gridOptionsWrapper') protected readonly gridOptionsWrapper: GridOptionsWrapper;\n\n private view: LayoutView;\n\n constructor(view: LayoutView) {\n super();\n this.view = view;\n }\n\n @PostConstruct\n private postConstruct(): void {\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_DOM_LAYOUT, this.updateLayoutClasses.bind(this));\n this.updateLayoutClasses();\n }\n\n private updateLayoutClasses(): void {\n const domLayout = this.gridOptionsWrapper.getDomLayout();\n const params = {\n autoHeight: domLayout === Constants.DOM_LAYOUT_AUTO_HEIGHT,\n normal: domLayout === Constants.DOM_LAYOUT_NORMAL,\n print: domLayout === Constants.DOM_LAYOUT_PRINT\n };\n const cssClass = params.autoHeight ? LayoutCssClasses.AUTO_HEIGHT :\n params.print ? LayoutCssClasses.PRINT : LayoutCssClasses.NORMAL;\n this.view.updateLayoutClasses(cssClass, params);\n }\n\n}","import { BeanStub } from \"../context/beanStub\";\nimport { Autowired, Optional } from \"../context/context\";\nimport { LayoutFeature, LayoutView } from \"../styling/layoutFeature\";\nimport { Constants } from \"../constants/constants\";\nimport { Events } from \"../eventKeys\";\nimport { RowContainerHeightService } from \"../rendering/rowContainerHeightService\";\nimport { CtrlsService } from \"../ctrlsService\";\nimport { ColumnModel } from \"../columns/columnModel\";\nimport { ScrollVisibleService } from \"./scrollVisibleService\";\nimport { IContextMenuFactory } from \"../interfaces/iContextMenuFactory\";\nimport { GridBodyScrollFeature } from \"./gridBodyScrollFeature\";\nimport { getInnerWidth, isVerticalScrollShowing } from \"../utils/dom\";\nimport { HeaderNavigationService } from \"../headerRendering/common/headerNavigationService\";\nimport { PaginationProxy } from \"../pagination/paginationProxy\";\nimport { RowDragFeature } from \"./rowDragFeature\";\nimport { DragAndDropService } from \"../dragAndDrop/dragAndDropService\";\nimport { PinnedRowModel } from \"../pinnedRowModel/pinnedRowModel\";\nimport { getTabIndex } from \"../utils/browser\";\nimport { RowRenderer } from \"../rendering/rowRenderer\";\nimport { PopupService } from \"../widgets/popupService\";\nimport { MouseEventService } from \"./mouseEventService\";\n\nexport enum RowAnimationCssClasses {\n ANIMATION_ON = 'ag-row-animation',\n ANIMATION_OFF = 'ag-row-no-animation'\n}\n\nexport const CSS_CLASS_CELL_SELECTABLE = 'ag-selectable';\nexport const CSS_CLASS_FORCE_VERTICAL_SCROLL = 'ag-force-vertical-scroll';\nexport const CSS_CLASS_COLUMN_MOVING = 'ag-column-moving';\n\nexport interface IGridBodyComp extends LayoutView {\n setColumnMovingCss(cssClass: string | null, on: boolean): void;\n setCellSelectableCss(cssClass: string | null, on: boolean): void;\n setTopHeight(height: number): void;\n setTopDisplay(display: string): void;\n setBottomHeight(height: number): void;\n setBottomDisplay(display: string): void;\n setColumnCount(count: number): void;\n setRowCount(count: number): void;\n setRowAnimationCssOnBodyViewport(cssClass: string, animate: boolean): void;\n setAlwaysVerticalScrollClass(cssClass: string | null, on: boolean): void;\n setPinnedTopBottomOverflowY(overflow: string): void;\n registerBodyViewportResizeListener(listener: (() => void)): void;\n}\n\nexport class GridBodyCtrl extends BeanStub {\n\n @Autowired('rowContainerHeightService') private rowContainerHeightService: RowContainerHeightService;\n @Autowired('ctrlsService') private ctrlsService: CtrlsService;\n @Autowired('columnModel') private columnModel: ColumnModel;\n @Autowired('scrollVisibleService') private scrollVisibleService: ScrollVisibleService;\n @Optional('contextMenuFactory') private contextMenuFactory: IContextMenuFactory;\n @Autowired('headerNavigationService') private headerNavigationService: HeaderNavigationService;\n @Autowired('paginationProxy') private paginationProxy: PaginationProxy;\n @Autowired('dragAndDropService') private dragAndDropService: DragAndDropService;\n @Autowired('pinnedRowModel') private pinnedRowModel: PinnedRowModel;\n @Autowired('rowRenderer') private rowRenderer: RowRenderer;\n @Autowired('popupService') public popupService: PopupService;\n @Autowired('mouseEventService') public mouseEventService: MouseEventService;\n\n private comp: IGridBodyComp;\n private eGridBody: HTMLElement;\n private eBodyViewport: HTMLElement;\n private eTop: HTMLElement;\n private eBottom: HTMLElement;\n\n private bodyScrollFeature: GridBodyScrollFeature;\n private rowDragFeature: RowDragFeature;\n\n public getScrollFeature(): GridBodyScrollFeature {\n return this.bodyScrollFeature;\n }\n\n public getBodyViewportElement(): HTMLElement {\n return this.eBodyViewport;\n }\n\n public setComp(comp: IGridBodyComp, eGridBody: HTMLElement, eBodyViewport: HTMLElement,\n eTop: HTMLElement, eBottom: HTMLElement): void {\n this.comp = comp;\n this.eGridBody = eGridBody;\n this.eBodyViewport = eBodyViewport;\n this.eTop = eTop;\n this.eBottom = eBottom;\n\n this.setCellTextSelection(this.gridOptionsWrapper.isEnableCellTextSelect());\n\n this.createManagedBean(new LayoutFeature(this.comp));\n this.bodyScrollFeature = this.createManagedBean(new GridBodyScrollFeature(this.eBodyViewport));\n this.addRowDragListener();\n\n this.setupRowAnimationCssClass();\n\n this.addEventListeners();\n this.addFocusListeners([eTop, eBodyViewport, eBottom]);\n this.onGridColumnsChanged();\n this.addBodyViewportListener();\n this.setFloatingHeights();\n this.disableBrowserDragging();\n this.addStopEditingWhenGridLosesFocus();\n\n this.ctrlsService.registerGridBodyCtrl(this);\n }\n\n public getComp(): IGridBodyComp {\n return this.comp;\n }\n\n private addEventListeners(): void {\n this.addManagedListener(this.eventService, Events.EVENT_GRID_COLUMNS_CHANGED, this.onGridColumnsChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_SCROLL_VISIBILITY_CHANGED, this.onScrollVisibilityChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_PINNED_ROW_DATA_CHANGED, this.setFloatingHeights.bind(this));\n }\n\n private addFocusListeners(elements: HTMLElement[]): void {\n elements.forEach(element => {\n this.addManagedListener(element, 'focusin', () => {\n element.classList.add('ag-has-focus');\n });\n\n this.addManagedListener(element, 'focusout', (e: FocusEvent) => {\n if (!element.contains(e.relatedTarget as HTMLElement)) {\n element.classList.remove('ag-has-focus');\n }\n });\n });\n }\n\n // used by ColumnAnimationService\n public setColumnMovingCss(moving: boolean): void {\n this.comp.setColumnMovingCss(moving ? CSS_CLASS_COLUMN_MOVING : null, moving);\n }\n\n public setCellTextSelection(selectable: boolean = false): void {\n const cssClass = selectable ? CSS_CLASS_CELL_SELECTABLE : null;\n this.comp.setCellSelectableCss(cssClass, selectable);\n }\n\n private onScrollVisibilityChanged(): void {\n const visible = this.scrollVisibleService.isVerticalScrollShowing();\n this.setVerticalScrollPaddingVisible(visible);\n }\n\n private onGridColumnsChanged(): void {\n const columns = this.columnModel.getAllGridColumns();\n this.comp.setColumnCount(columns ? columns.length : 0);\n }\n\n // if we do not do this, then the user can select a pic in the grid (eg an image in a custom cell renderer)\n // and then that will start the browser native drag n' drop, which messes up with our own drag and drop.\n private disableBrowserDragging(): void {\n this.addManagedListener(this.eGridBody, 'dragstart', (event: MouseEvent) => {\n if (event.target instanceof HTMLImageElement) {\n event.preventDefault();\n return false;\n }\n });\n }\n\n private addStopEditingWhenGridLosesFocus(): void {\n if (!this.gridOptionsWrapper.isStopEditingWhenCellsLoseFocus()) { return; }\n\n const focusOutListener = (event: FocusEvent): void => {\n // this is the element the focus is moving to\n const elementWithFocus = event.relatedTarget as HTMLElement;\n\n if (getTabIndex(elementWithFocus) === null) {\n this.rowRenderer.stopEditing();\n return;\n }\n\n let clickInsideGrid =\n // see if click came from inside the viewports\n viewports.some(viewport => viewport.contains(elementWithFocus))\n // and also that it's not from a detail grid\n && this.mouseEventService.isElementInThisGrid(elementWithFocus);\n\n if (!clickInsideGrid) {\n const popupService = this.popupService;\n\n clickInsideGrid =\n popupService.getActivePopups().some(popup => popup.contains(elementWithFocus)) ||\n popupService.isElementWithinCustomPopup(elementWithFocus);\n }\n\n if (!clickInsideGrid) {\n this.rowRenderer.stopEditing();\n }\n };\n\n const viewports = [this.eBodyViewport, this.eBottom, this.eTop];\n\n viewports.forEach(viewport => this.addManagedListener(viewport, 'focusout', focusOutListener));\n }\n\n public updateRowCount(): void {\n const headerCount = this.headerNavigationService.getHeaderRowCount();\n const modelType = this.paginationProxy.getType();\n let rowCount = -1;\n\n if (modelType === Constants.ROW_MODEL_TYPE_CLIENT_SIDE) {\n rowCount = 0;\n this.paginationProxy.forEachNode(node => {\n if (!node.group) { rowCount++; }\n });\n }\n\n const total = rowCount === -1 ? -1 : (headerCount + rowCount);\n\n this.comp.setRowCount(total);\n }\n\n public registerBodyViewportResizeListener(listener: (() => void)): void {\n this.comp.registerBodyViewportResizeListener(listener);\n }\n\n public setVerticalScrollPaddingVisible(visible: boolean): void {\n const overflowY = visible ? 'scroll' : 'hidden';\n this.comp.setPinnedTopBottomOverflowY(overflowY);\n }\n\n public isVerticalScrollShowing(): boolean {\n const show = this.gridOptionsWrapper.isAlwaysShowVerticalScroll();\n const cssClass = show ? CSS_CLASS_FORCE_VERTICAL_SCROLL : null;\n this.comp.setAlwaysVerticalScrollClass(cssClass, show);\n return show || isVerticalScrollShowing(this.eBodyViewport);\n }\n\n private setupRowAnimationCssClass(): void {\n const listener = () => {\n // we don't want to use row animation if scaling, as rows jump strangely as you scroll,\n // when scaling and doing row animation.\n const animateRows = this.gridOptionsWrapper.isAnimateRows() && !this.rowContainerHeightService.isStretching();\n const animateRowsCssClass = animateRows ? RowAnimationCssClasses.ANIMATION_ON : RowAnimationCssClasses.ANIMATION_OFF;\n this.comp.setRowAnimationCssOnBodyViewport(animateRowsCssClass, animateRows);\n };\n\n listener();\n\n this.addManagedListener(this.eventService, Events.EVENT_HEIGHT_SCALE_CHANGED, listener);\n }\n\n public getGridBodyElement(): HTMLElement {\n return this.eGridBody;\n }\n\n private addBodyViewportListener(): void {\n // we want to listen for clicks directly on the eBodyViewport, so the user has a way of showing\n // the context menu if no rows or columns are displayed, or user simply clicks outside of a cell\n const listener = (mouseEvent: MouseEvent) => {\n if (this.gridOptionsWrapper.isPreventDefaultOnContextMenu()) {\n mouseEvent.preventDefault();\n }\n const { target } = mouseEvent;\n if (target === this.eBodyViewport || target === this.ctrlsService.getCenterRowContainerCtrl().getViewportElement()) {\n // show it\n if (this.contextMenuFactory) {\n this.contextMenuFactory.onContextMenu(mouseEvent, null, null, null, null, this.eGridBody);\n }\n }\n };\n\n this.addManagedListener(this.eBodyViewport, 'contextmenu', listener);\n this.addManagedListener(this.eBodyViewport, 'wheel', this.onWheel.bind(this));\n }\n\n private onWheel(e: MouseEvent): void {\n if (!this.gridOptionsWrapper.isSuppressScrollWhenPopupsAreOpen()) { return; }\n\n if (this.popupService.hasAnchoredPopup()) {\n e.preventDefault();\n }\n }\n\n public getGui(): HTMLElement {\n return this.eGridBody;\n }\n\n // called by rowDragFeature\n public scrollVertically(pixels: number): number {\n const oldScrollPosition = this.eBodyViewport.scrollTop;\n\n this.bodyScrollFeature.setVerticalScrollPosition(oldScrollPosition + pixels);\n return this.eBodyViewport.scrollTop - oldScrollPosition;\n }\n\n private addRowDragListener(): void {\n this.rowDragFeature = this.createManagedBean(new RowDragFeature(this.eBodyViewport));\n this.dragAndDropService.addDropTarget(this.rowDragFeature);\n }\n\n public getRowDragFeature(): RowDragFeature {\n return this.rowDragFeature;\n }\n\n private setFloatingHeights(): void {\n const { pinnedRowModel } = this;\n\n let floatingTopHeight = pinnedRowModel.getPinnedTopTotalHeight();\n\n if (floatingTopHeight) {\n // adding 1px for cell bottom border\n floatingTopHeight += 1;\n }\n\n let floatingBottomHeight = pinnedRowModel.getPinnedBottomTotalHeight();\n\n if (floatingBottomHeight) {\n // adding 1px for cell bottom border\n floatingBottomHeight += 1;\n }\n\n this.comp.setTopHeight(floatingTopHeight);\n this.comp.setBottomHeight(floatingBottomHeight);\n\n this.comp.setTopDisplay(floatingTopHeight ? 'inherit' : 'none');\n this.comp.setBottomDisplay(floatingBottomHeight ? 'inherit' : 'none');\n }\n\n // method will call itself if no available width. this covers if the grid\n // isn't visible, but is just about to be visible.\n public sizeColumnsToFit(nextTimeout?: number) {\n const removeScrollWidth = this.isVerticalScrollShowing();\n const scrollWidthToRemove = removeScrollWidth ? this.gridOptionsWrapper.getScrollbarWidth() : 0;\n const bodyViewportWidth = getInnerWidth(this.eBodyViewport);\n const availableWidth = bodyViewportWidth - scrollWidthToRemove;\n\n if (availableWidth > 0) {\n this.columnModel.sizeColumnsToFit(availableWidth, \"sizeColumnsToFit\");\n return;\n }\n\n if (nextTimeout === undefined) {\n window.setTimeout(() => {\n this.sizeColumnsToFit(100);\n }, 0);\n } else if (nextTimeout === 100) {\n window.setTimeout(() => {\n this.sizeColumnsToFit(500);\n }, 100);\n } else if (nextTimeout === 500) {\n window.setTimeout(() => {\n this.sizeColumnsToFit(-1);\n }, 500);\n } else {\n console.warn('AG Grid: tried to call sizeColumnsToFit() but the grid is coming back with ' +\n 'zero width, maybe the grid is not visible yet on the screen?');\n }\n }\n\n // + rangeService\n public addScrollEventListener(listener: () => void): void {\n this.eBodyViewport.addEventListener('scroll', listener);\n }\n\n // + focusService\n public removeScrollEventListener(listener: () => void): void {\n this.eBodyViewport.removeEventListener('scroll', listener);\n }\n}\n","import { Autowired, PostConstruct } from \"../context/context\";\nimport { BeanStub } from \"../context/beanStub\";\nimport { getInnerHeight, getScrollLeft, isRtlNegativeScroll, setScrollLeft } from \"../utils/dom\";\nimport { CtrlsService } from \"../ctrlsService\";\nimport { Events } from \"../eventKeys\";\nimport { debounce } from \"../utils/function\";\nimport { BodyScrollEvent, BodyScrollEndEvent } from \"../events\";\nimport { isIOSUserAgent } from \"../utils/browser\";\nimport { AnimationFrameService } from \"../misc/animationFrameService\";\nimport { ColumnApi } from \"../columns/columnApi\";\nimport { GridApi } from \"../gridApi\";\nimport { Constants } from \"../constants/constants\";\nimport { PaginationProxy } from \"../pagination/paginationProxy\";\nimport { IRowModel } from \"../interfaces/iRowModel\";\nimport { RowContainerHeightService } from \"../rendering/rowContainerHeightService\";\nimport { RowRenderer } from \"../rendering/rowRenderer\";\nimport { ColumnModel } from \"../columns/columnModel\";\nimport { RowContainerCtrl } from \"./rowContainer/rowContainerCtrl\";\nimport { Column } from \"../entities/column\";\n\ntype ScrollDirection = 'horizontal' | 'vertical';\n\nexport class GridBodyScrollFeature extends BeanStub {\n\n @Autowired('ctrlsService') public ctrlsService: CtrlsService;\n @Autowired('animationFrameService') private animationFrameService: AnimationFrameService;\n @Autowired('columnApi') private columnApi: ColumnApi;\n @Autowired('gridApi') private gridApi: GridApi;\n @Autowired('paginationProxy') private paginationProxy: PaginationProxy;\n @Autowired('rowModel') private rowModel: IRowModel;\n @Autowired('rowContainerHeightService') private heightScaler: RowContainerHeightService;\n @Autowired('rowRenderer') private rowRenderer: RowRenderer;\n @Autowired('columnModel') private columnModel: ColumnModel;\n\n private enableRtl: boolean;\n\n private lastHorizontalScrollElement: HTMLElement | undefined | null;\n\n private eBodyViewport: HTMLElement;\n\n private scrollLeft = -1;\n private nextScrollTop = -1;\n private scrollTop = -1;\n\n private scrollTimer: number | undefined;\n\n private readonly resetLastHorizontalScrollElementDebounced: () => void;\n\n private centerRowContainerCtrl: RowContainerCtrl;\n\n constructor(eBodyViewport: HTMLElement) {\n super();\n this.eBodyViewport = eBodyViewport;\n this.resetLastHorizontalScrollElementDebounced = debounce(this.resetLastHorizontalScrollElement.bind(this), 500);\n }\n\n @PostConstruct\n private postConstruct(): void {\n this.enableRtl = this.gridOptionsWrapper.isEnableRtl();\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, this.onDisplayedColumnsWidthChanged.bind(this));\n\n this.ctrlsService.whenReady(p => {\n this.centerRowContainerCtrl = p.centerRowContainerCtrl;\n this.onDisplayedColumnsWidthChanged();\n this.addScrollListener();\n });\n }\n\n private addScrollListener() {\n const fakeHScroll = this.ctrlsService.getFakeHScrollCtrl();\n\n this.addManagedListener(this.centerRowContainerCtrl.getViewportElement(), 'scroll', this.onCenterViewportScroll.bind(this));\n this.addManagedListener(fakeHScroll.getViewport(), 'scroll', this.onFakeHorizontalScroll.bind(this));\n\n const onVerticalScroll = this.gridOptionsWrapper.isDebounceVerticalScrollbar() ?\n debounce(this.onVerticalScroll.bind(this), 100)\n : this.onVerticalScroll.bind(this);\n\n this.addManagedListener(this.eBodyViewport, 'scroll', onVerticalScroll);\n }\n\n private onDisplayedColumnsWidthChanged(): void {\n if (this.enableRtl) {\n // because RTL is all backwards, a change in the width of the row\n // can cause a change in the scroll position, without a scroll event,\n // because the scroll position in RTL is a function that depends on\n // the width. to be convinced of this, take out this line, enable RTL,\n // scroll all the way to the left and then resize a column\n this.horizontallyScrollHeaderCenterAndFloatingCenter();\n }\n }\n\n public horizontallyScrollHeaderCenterAndFloatingCenter(scrollLeft?: number): void {\n // when doing RTL, this method gets called once prematurely\n const notYetInitialised = this.centerRowContainerCtrl == null;\n if (notYetInitialised) { return; }\n\n if (scrollLeft === undefined) {\n scrollLeft = this.centerRowContainerCtrl.getCenterViewportScrollLeft();\n }\n\n const offset = this.enableRtl ? scrollLeft : -scrollLeft;\n const topCenterContainer = this.ctrlsService.getTopCenterRowContainerCtrl();\n const bottomCenterContainer = this.ctrlsService.getBottomCenterRowContainerCtrl();\n const fakeHScroll = this.ctrlsService.getFakeHScrollCtrl();\n const centerHeaderContainer = this.ctrlsService.getHeaderRowContainerCtrl();\n\n centerHeaderContainer.setHorizontalScroll(offset);\n bottomCenterContainer.setContainerTranslateX(offset);\n topCenterContainer.setContainerTranslateX(offset);\n\n const partner = this.lastHorizontalScrollElement === this.centerRowContainerCtrl.getViewportElement() ?\n fakeHScroll.getViewport() : this.centerRowContainerCtrl.getViewportElement();\n\n setScrollLeft(partner, Math.abs(scrollLeft), this.enableRtl);\n }\n\n private isControllingScroll(eDiv: HTMLElement): boolean {\n if (!this.lastHorizontalScrollElement) {\n this.lastHorizontalScrollElement = eDiv;\n return true;\n }\n\n return eDiv === this.lastHorizontalScrollElement;\n }\n\n private onFakeHorizontalScroll(): void {\n const fakeHScrollViewport = this.ctrlsService.getFakeHScrollCtrl().getViewport();\n if (!this.isControllingScroll(fakeHScrollViewport)) { return; }\n this.onBodyHorizontalScroll(fakeHScrollViewport);\n }\n\n private onCenterViewportScroll(): void {\n const centerContainerViewport = this.centerRowContainerCtrl.getViewportElement();\n if (!this.isControllingScroll(centerContainerViewport)) { return; }\n this.onBodyHorizontalScroll(centerContainerViewport);\n }\n\n private onBodyHorizontalScroll(eSource: HTMLElement): void {\n const centerContainerViewport = this.centerRowContainerCtrl.getViewportElement();\n const { scrollLeft } = centerContainerViewport;\n\n if (this.shouldBlockScrollUpdate('horizontal', scrollLeft, true)) {\n return;\n }\n\n // we do Math.round() rather than Math.floor(), to mirror how scroll values are applied.\n // eg if a scale is applied (ie user has zoomed the browser), then applying scroll=200\n // could result in 199.88, which then floor(199.88) = 199, however round(199.88) = 200.\n // initially Math.floor() was used, however this caused (almost) infinite loop with aligned grids,\n // as the scroll would move 1px at at time bouncing from one grid to the next (eg one grid would cause\n // scroll to 200px, the next to 199px, then the first back to 198px and so on).\n this.doHorizontalScroll(Math.round(getScrollLeft(eSource, this.enableRtl)));\n this.resetLastHorizontalScrollElementDebounced();\n }\n\n private onVerticalScroll(): void {\n const scrollTop: number = this.eBodyViewport.scrollTop;\n\n if (this.shouldBlockScrollUpdate('vertical', scrollTop, true)) { return; }\n this.animationFrameService.setScrollTop(scrollTop);\n this.nextScrollTop = scrollTop;\n\n if (this.gridOptionsWrapper.isSuppressAnimationFrame()) {\n this.scrollTop = this.nextScrollTop;\n this.redrawRowsAfterScroll();\n } else {\n this.animationFrameService.schedule();\n }\n }\n\n private resetLastHorizontalScrollElement() {\n this.lastHorizontalScrollElement = null;\n }\n\n private doHorizontalScroll(scrollLeft: number): void {\n const fakeHScrollViewport = this.ctrlsService.getFakeHScrollCtrl().getViewport();\n const fakeScrollLeft = getScrollLeft(fakeHScrollViewport, this.enableRtl);\n\n if (this.scrollLeft === scrollLeft && scrollLeft === fakeScrollLeft) { return; }\n\n this.scrollLeft = scrollLeft;\n\n this.fireScrollEvent('horizontal');\n this.horizontallyScrollHeaderCenterAndFloatingCenter(scrollLeft);\n this.onHorizontalViewportChanged();\n }\n\n private fireScrollEvent(direction: 'horizontal' | 'vertical'): void {\n const bodyScrollEvent: BodyScrollEvent = {\n type: Events.EVENT_BODY_SCROLL,\n api: this.gridApi,\n columnApi: this.columnApi,\n direction,\n left: this.scrollLeft,\n top: this.scrollTop\n };\n\n this.eventService.dispatchEvent(bodyScrollEvent);\n\n window.clearTimeout(this.scrollTimer);\n this.scrollTimer = undefined;\n\n this.scrollTimer = window.setTimeout(() => {\n const bodyScrollEndEvent: BodyScrollEndEvent = Object.assign({}, bodyScrollEvent, {\n type: Events.EVENT_BODY_SCROLL_END\n });\n this.eventService.dispatchEvent(bodyScrollEndEvent);\n }, 100);\n }\n\n private shouldBlockScrollUpdate(direction: ScrollDirection, scrollTo: number, touchOnly: boolean = false): boolean {\n // touch devices allow elastic scroll - which temporally scrolls the panel outside of the viewport\n // (eg user uses touch to go to the left of the grid, but drags past the left, the rows will actually\n // scroll past the left until the user releases the mouse). when this happens, we want ignore the scroll,\n // as otherwise it was causing the rows and header to flicker.\n\n // sometimes when scrolling, we got values that extended the maximum scroll allowed. we used to\n // ignore these scrolls. problem is the max scroll position could be skipped (eg the previous scroll event\n // could be 10px before the max position, and then current scroll event could be 20px after the max position).\n // if we just ignored the last event, we would be setting the scroll to 10px before the max position, when in\n // actual fact the user has exceeded the max scroll and thus scroll should be set to the max.\n\n if (touchOnly && !isIOSUserAgent()) { return false; }\n\n if (direction === 'vertical') {\n const clientHeight = getInnerHeight(this.eBodyViewport);\n const { scrollHeight } = this.eBodyViewport;\n if (scrollTo < 0 || (scrollTo + clientHeight > scrollHeight)) {\n return true;\n }\n }\n\n if (direction === 'horizontal') {\n const clientWidth = this.centerRowContainerCtrl.getCenterWidth();\n const { scrollWidth } = this.centerRowContainerCtrl.getViewportElement();\n\n if (this.enableRtl && isRtlNegativeScroll()) {\n if (scrollTo > 0) { return true; }\n } else if (scrollTo < 0) { return true; }\n\n if (Math.abs(scrollTo) + clientWidth > scrollWidth) {\n return true;\n }\n }\n\n return false;\n }\n\n private redrawRowsAfterScroll(): void {\n this.fireScrollEvent('vertical');\n }\n\n private onHorizontalViewportChanged(): void {\n this.centerRowContainerCtrl.onHorizontalViewportChanged();\n }\n\n // this is to cater for AG-3274, where grid is removed from the dom and then inserted back in again.\n // (which happens with some implementations of tabbing). this can result in horizontal scroll getting\n // reset back to the left, however no scroll event is fired. so we need to get header to also scroll\n // back to the left to be kept in sync.\n // adding and removing the grid from the DOM both resets the scroll position and\n // triggers a resize event, so notify listeners if the scroll position has changed\n public checkScrollLeft(): void {\n if (this.scrollLeft !== this.centerRowContainerCtrl.getCenterViewportScrollLeft()) {\n this.onBodyHorizontalScroll(this.centerRowContainerCtrl.getViewportElement());\n }\n }\n\n public executeAnimationFrameScroll(): boolean {\n const frameNeeded = this.scrollTop != this.nextScrollTop;\n\n if (frameNeeded) {\n this.scrollTop = this.nextScrollTop;\n this.redrawRowsAfterScroll();\n }\n\n return frameNeeded;\n }\n\n // called by scrollHorizontally method and alignedGridsService\n public setHorizontalScrollPosition(hScrollPosition: number): void {\n const minScrollLeft = 0;\n const maxScrollLeft = this.centerRowContainerCtrl.getViewportElement().scrollWidth - this.centerRowContainerCtrl.getCenterWidth();\n\n if (this.shouldBlockScrollUpdate('horizontal', hScrollPosition)) {\n if (this.enableRtl && isRtlNegativeScroll()) {\n hScrollPosition = hScrollPosition > 0 ? 0 : maxScrollLeft;\n } else {\n hScrollPosition = Math.min(Math.max(hScrollPosition, minScrollLeft), maxScrollLeft);\n }\n }\n\n setScrollLeft(this.centerRowContainerCtrl.getViewportElement(), Math.abs(hScrollPosition), this.enableRtl);\n\n // we need to manually do the event handling (rather than wait for the event)\n // for the alignedGridsService, as if we don't, the aligned grid service gets\n // notified async, and then it's 'consuming' flag doesn't get used right, and\n // we can end up with an infinite loop\n this.doHorizontalScroll(hScrollPosition);\n }\n\n public setVerticalScrollPosition(vScrollPosition: number): void {\n this.eBodyViewport.scrollTop = vScrollPosition;\n }\n\n public getVScrollPosition(): { top: number, bottom: number; } {\n const result = {\n top: this.eBodyViewport.scrollTop,\n bottom: this.eBodyViewport.scrollTop + this.eBodyViewport.offsetHeight\n };\n return result;\n }\n\n public getHScrollPosition(): { left: number, right: number; } {\n return this.centerRowContainerCtrl.getHScrollPosition();\n }\n\n public isHorizontalScrollShowing(): boolean {\n return this.centerRowContainerCtrl.isHorizontalScrollShowing();\n }\n\n // called by the headerRootComp and moveColumnController\n public scrollHorizontally(pixels: number): number {\n const oldScrollPosition = this.centerRowContainerCtrl.getViewportElement().scrollLeft;\n\n this.setHorizontalScrollPosition(oldScrollPosition + pixels);\n return this.centerRowContainerCtrl.getViewportElement().scrollLeft - oldScrollPosition;\n }\n\n // gets called by rowRenderer when new data loaded, as it will want to scroll to the top\n public scrollToTop(): void {\n this.eBodyViewport.scrollTop = 0;\n }\n\n // Valid values for position are bottom, middle and top\n public ensureNodeVisible(comparator: any, position: 'top' | 'bottom' | 'middle' | null = null) {\n\n // look for the node index we want to display\n const rowCount = this.rowModel.getRowCount();\n const comparatorIsAFunction = typeof comparator === 'function';\n let indexToSelect = -1;\n // go through all the nodes, find the one we want to show\n for (let i = 0; i < rowCount; i++) {\n const node = this.rowModel.getRow(i);\n if (comparatorIsAFunction) {\n if (comparator(node)) {\n indexToSelect = i;\n break;\n }\n } else {\n // check object equality against node and data\n if (comparator === node || comparator === node!.data) {\n indexToSelect = i;\n break;\n }\n }\n }\n if (indexToSelect >= 0) {\n this.ensureIndexVisible(indexToSelect, position);\n }\n }\n\n // Valid values for position are bottom, middle and top\n // position should be {'top','middle','bottom', or undefined/null}.\n // if undefined/null, then the grid will to the minimal amount of scrolling,\n // eg if grid needs to scroll up, it scrolls until row is on top,\n // if grid needs to scroll down, it scrolls until row is on bottom,\n // if row is already in view, grid does not scroll\n public ensureIndexVisible(index: any, position?: 'top' | 'bottom' | 'middle' | null) {\n // if for print or auto height, everything is always visible\n if (this.gridOptionsWrapper.getDomLayout() === Constants.DOM_LAYOUT_PRINT) { return; }\n\n const rowCount = this.paginationProxy.getRowCount();\n\n if (typeof index !== 'number' || index < 0 || index >= rowCount) {\n console.warn('invalid row index for ensureIndexVisible: ' + index);\n return;\n }\n\n const isPaging = this.gridOptionsWrapper.isPagination();\n const paginationPanelEnabled = isPaging && !this.gridOptionsWrapper.isSuppressPaginationPanel();\n\n if (!paginationPanelEnabled) {\n this.paginationProxy.goToPageWithIndex(index);\n }\n\n const rowNode = this.paginationProxy.getRow(index);\n let rowGotShiftedDuringOperation: boolean;\n\n do {\n const startingRowTop = rowNode!.rowTop;\n const startingRowHeight = rowNode!.rowHeight;\n\n const paginationOffset = this.paginationProxy.getPixelOffset();\n const rowTopPixel = rowNode!.rowTop! - paginationOffset;\n const rowBottomPixel = rowTopPixel + rowNode!.rowHeight!;\n\n const scrollPosition = this.getVScrollPosition();\n const heightOffset = this.heightScaler.getDivStretchOffset();\n\n const vScrollTop = scrollPosition.top + heightOffset;\n const vScrollBottom = scrollPosition.bottom + heightOffset;\n\n const viewportHeight = vScrollBottom - vScrollTop;\n\n // work out the pixels for top, middle and bottom up front,\n // make the if/else below easier to read\n const pxTop = this.heightScaler.getScrollPositionForPixel(rowTopPixel);\n const pxBottom = this.heightScaler.getScrollPositionForPixel(rowBottomPixel - viewportHeight);\n // make sure if middle, the row is not outside the top of the grid\n const pxMiddle = Math.min((pxTop + pxBottom) / 2, rowTopPixel);\n\n const rowBelowViewport = vScrollTop > rowTopPixel;\n const rowAboveViewport = vScrollBottom < rowBottomPixel;\n\n let newScrollPosition: number | null = null;\n\n if (position === 'top') {\n newScrollPosition = pxTop;\n } else if (position === 'bottom') {\n newScrollPosition = pxBottom;\n } else if (position === 'middle') {\n newScrollPosition = pxMiddle;\n } else if (rowBelowViewport) {\n // if row is before, scroll up with row at top\n newScrollPosition = pxTop;\n } else if (rowAboveViewport) {\n // if row is below, scroll down with row at bottom\n newScrollPosition = pxBottom;\n }\n\n if (newScrollPosition !== null) {\n this.eBodyViewport.scrollTop = newScrollPosition;\n this.rowRenderer.redrawAfterScroll();\n }\n\n // the row can get shifted if during the rendering (during rowRenderer.redrawAfterScroll()),\n // the height of a row changes due to lazy calculation of row heights when using\n // colDef.autoHeight or gridOptions.getRowHeight.\n // if row was shifted, then the position we scrolled to is incorrect.\n rowGotShiftedDuringOperation = (startingRowTop !== rowNode!.rowTop)\n || (startingRowHeight !== rowNode!.rowHeight);\n\n } while (rowGotShiftedDuringOperation);\n\n // so when we return back to user, the cells have rendered\n this.animationFrameService.flushAllFrames();\n }\n\n public ensureColumnVisible(key: any, position: 'auto' | 'start' | 'middle' | 'end' = 'auto'): void {\n const column = this.columnModel.getGridColumn(key);\n\n if (!column) { return; }\n\n // calling ensureColumnVisible on a pinned column doesn't make sense\n if (column.isPinned()) { return; }\n\n // defensive\n if (!this.columnModel.isColumnDisplayed(column)) { return; }\n\n const newHorizontalScroll: number | null = this.getPositionedHorizontalScroll(column, position);\n\n if (newHorizontalScroll !== null) {\n this.centerRowContainerCtrl.setCenterViewportScrollLeft(newHorizontalScroll);\n }\n\n // this will happen anyway, as the move will cause a 'scroll' event on the body, however\n // it is possible that the ensureColumnVisible method is called from within AG Grid and\n // the caller will need to have the columns rendered to continue, which will be before\n // the event has been worked on (which is the case for cell navigation).\n this.centerRowContainerCtrl.onHorizontalViewportChanged();\n\n // so when we return back to user, the cells have rendered\n this.animationFrameService.flushAllFrames();\n }\n\n private getPositionedHorizontalScroll(column: Column, position: 'auto' | 'start' | 'middle' | 'end'): number | null {\n const { columnBeforeStart, columnAfterEnd } = this.isColumnOutsideViewport(column);\n\n const viewportTooSmallForColumn = this.centerRowContainerCtrl.getCenterWidth() < column.getActualWidth();\n const viewportWidth = this.centerRowContainerCtrl.getCenterWidth();\n\n const isRtl = this.enableRtl;\n\n let alignColToStart = (isRtl ? columnBeforeStart : columnAfterEnd) || viewportTooSmallForColumn;\n let alignColToEnd = isRtl ? columnAfterEnd : columnBeforeStart;\n\n if (position !== 'auto') {\n alignColToStart = position === 'start';\n alignColToEnd = position === 'end';\n }\n\n const isMiddle = position === 'middle';\n\n if (alignColToStart || alignColToEnd || isMiddle) {\n const { colLeft, colMiddle, colRight } = this.getColumnBounds(column);\n\n if (isMiddle) {\n return colMiddle - viewportWidth / 2;\n }\n\n if (alignColToStart) {\n return isRtl ? colRight : colLeft;\n }\n\n return isRtl ? (colLeft - viewportWidth) : (colRight - viewportWidth);\n }\n\n return null;\n }\n\n private isColumnOutsideViewport(column: Column): { columnBeforeStart: boolean, columnAfterEnd: boolean } {\n const { start: viewportStart, end: viewportEnd } = this.getViewportBounds();\n const { colLeft, colRight } = this.getColumnBounds(column);\n\n const isRtl = this.enableRtl;\n\n const columnBeforeStart = isRtl ? (viewportStart > colRight) : (viewportEnd < colRight);\n const columnAfterEnd = isRtl ? (viewportEnd < colLeft) : (viewportStart > colLeft);\n\n return { columnBeforeStart, columnAfterEnd };\n }\n\n private getColumnBounds(column: Column): { colLeft: number, colMiddle: number, colRight: number } {\n const isRtl = this.enableRtl;\n const bodyWidth = this.columnModel.getBodyContainerWidth();\n const colWidth = column.getActualWidth();\n const colLeft = column.getLeft()!;\n const multiplier = isRtl ? -1 : 1;\n\n const colLeftPixel = isRtl ? (bodyWidth - colLeft) : colLeft;\n const colRightPixel = colLeftPixel + colWidth * multiplier;\n const colMidPixel = colLeftPixel + colWidth / 2 * multiplier;\n\n return { colLeft: colLeftPixel, colMiddle: colMidPixel, colRight: colRightPixel };\n }\n\n private getViewportBounds(): { start: number, end: number, width: number } {\n const viewportWidth = this.centerRowContainerCtrl.getCenterWidth();\n const scrollPosition = this.centerRowContainerCtrl.getCenterViewportScrollLeft();\n\n const viewportStartPixel = scrollPosition;\n const viewportEndPixel = viewportWidth + scrollPosition;\n\n return { start: viewportStartPixel, end: viewportEndPixel, width: viewportWidth };\n }\n}","export class AutoScrollService {\n\n private tickingInterval: number | null = null;\n\n private scrollHorizontally: boolean;\n private scrollVertically: boolean;\n\n private tickLeft: boolean;\n private tickRight: boolean;\n private tickUp: boolean;\n private tickDown: boolean;\n\n private scrollContainer: HTMLElement;\n private scrollByTick: number;\n\n private getVerticalPosition: () => number;\n private setVerticalPosition: (position: number) => void;\n\n private getHorizontalPosition: () => number;\n private setHorizontalPosition: (position: number) => void;\n\n private shouldSkipVerticalScroll: () => boolean;\n private shouldSkipHorizontalScroll: () => boolean;\n\n private onScrollCallback: (() => void) | null = null;\n\n private tickCount: number;\n\n constructor(params: {\n scrollContainer: HTMLElement,\n scrollAxis: 'x' | 'y' | 'xy',\n scrollByTick?: number,\n getVerticalPosition?: () => number,\n setVerticalPosition?: (position: number) => void,\n getHorizontalPosition?: () => number,\n setHorizontalPosition?: (position: number) => void,\n shouldSkipVerticalScroll?: () => boolean,\n shouldSkipHorizontalScroll?: () => boolean,\n onScrollCallback?: () => void\n }) {\n this.scrollContainer = params.scrollContainer;\n this.scrollHorizontally = params.scrollAxis.indexOf('x') !== -1;\n this.scrollVertically = params.scrollAxis.indexOf('y') !== -1;\n\n this.scrollByTick = params.scrollByTick != null ? params.scrollByTick : 20;\n\n if (params.onScrollCallback) {\n this.onScrollCallback = params.onScrollCallback;\n }\n\n if (this.scrollVertically) {\n this.getVerticalPosition = params.getVerticalPosition!;\n this.setVerticalPosition = params.setVerticalPosition!;\n }\n\n if (this.scrollHorizontally) {\n this.getHorizontalPosition = params.getHorizontalPosition!;\n this.setHorizontalPosition = params.setHorizontalPosition!;\n }\n\n this.shouldSkipVerticalScroll = params.shouldSkipVerticalScroll || (() => false);\n this.shouldSkipHorizontalScroll = params.shouldSkipHorizontalScroll || (() => false);\n }\n\n public check(mouseEvent: MouseEvent, forceSkipVerticalScroll: boolean = false): void {\n const skipVerticalScroll = forceSkipVerticalScroll || this.shouldSkipVerticalScroll();\n\n if (skipVerticalScroll && this.shouldSkipHorizontalScroll()) { return; }\n\n const rect = this.scrollContainer.getBoundingClientRect();\n const scrollTick = this.scrollByTick;\n\n this.tickLeft = mouseEvent.clientX < (rect.left + scrollTick);\n this.tickRight = mouseEvent.clientX > (rect.right - scrollTick);\n this.tickUp = mouseEvent.clientY < (rect.top + scrollTick) && !skipVerticalScroll;\n this.tickDown = mouseEvent.clientY > (rect.bottom - scrollTick) && !skipVerticalScroll;\n\n if (this.tickLeft || this.tickRight || this.tickUp || this.tickDown) {\n this.ensureTickingStarted();\n } else {\n this.ensureCleared();\n }\n }\n\n private ensureTickingStarted(): void {\n if (this.tickingInterval === null) {\n this.tickingInterval = window.setInterval(this.doTick.bind(this), 100);\n this.tickCount = 0;\n }\n }\n\n private doTick(): void {\n this.tickCount++;\n\n let tickAmount: number;\n\n tickAmount = this.tickCount > 20 ? 200 : (this.tickCount > 10 ? 80 : 40);\n\n if (this.scrollVertically) {\n const vScrollPosition = this.getVerticalPosition();\n if (this.tickUp) {\n this.setVerticalPosition(vScrollPosition - tickAmount);\n }\n\n if (this.tickDown) {\n this.setVerticalPosition(vScrollPosition + tickAmount);\n }\n }\n\n if (this.scrollHorizontally) {\n const hScrollPosition = this.getHorizontalPosition();\n if (this.tickLeft) {\n this.setHorizontalPosition(hScrollPosition - tickAmount);\n }\n\n if (this.tickRight) {\n this.setHorizontalPosition(hScrollPosition + tickAmount);\n }\n }\n\n if (this.onScrollCallback) {\n this.onScrollCallback();\n }\n }\n\n public ensureCleared(): void {\n if (this.tickingInterval) {\n window.clearInterval(this.tickingInterval);\n this.tickingInterval = null;\n }\n }\n}\n","import {\n DragAndDropService,\n DraggingEvent,\n DragSourceType,\n DropTarget,\n VerticalDirection\n} from \"../dragAndDrop/dragAndDropService\";\nimport { Autowired, Optional, PostConstruct } from \"../context/context\";\nimport { ColumnModel } from \"../columns/columnModel\";\nimport { FocusService } from \"../focusService\";\nimport { IRangeService } from \"../interfaces/IRangeService\";\nimport { RowDragEndEvent, RowDragEnterEvent, RowDragEvent, RowDragLeaveEvent, RowDragMoveEvent } from \"../events\";\nimport { Events } from \"../eventKeys\";\nimport { IRowModel } from \"../interfaces/iRowModel\";\nimport { IClientSideRowModel } from \"../interfaces/iClientSideRowModel\";\nimport { RowHighlightPosition, RowNode } from \"../entities/rowNode\";\nimport { SelectionService } from \"../selectionService\";\nimport { MouseEventService } from \"./mouseEventService\";\nimport { last } from '../utils/array';\nimport { SortController } from \"../sortController\";\nimport { FilterManager } from \"../filter/filterManager\";\nimport { BeanStub } from \"../context/beanStub\";\nimport { missingOrEmpty } from \"../utils/generic\";\nimport { doOnce } from \"../utils/function\";\nimport { PaginationProxy } from \"../pagination/paginationProxy\";\nimport { CtrlsService } from \"../ctrlsService\";\nimport { AutoScrollService } from \"../autoScrollService\";\n\nimport { GridApi } from \"../gridApi\";\nimport { ColumnApi } from \"../columns/columnApi\";\n\nexport interface RowDropZoneEvents {\n /** Callback function that will be executed when the rowDrag enters the target. */\n onDragEnter?: (params: RowDragEnterEvent) => void;\n /** Callback function that will be executed when the rowDrag leaves the target */\n onDragLeave?: (params: RowDragLeaveEvent) => void;\n /**\n * Callback function that will be executed when the rowDrag is dragged inside the target.\n * Note: this gets called multiple times.\n */\n onDragging?: (params: RowDragMoveEvent) => void;\n /** Callback function that will be executed when the rowDrag drops rows within the target. */\n onDragStop?: (params: RowDragEndEvent) => void;\n}\n\nexport interface RowDropZoneParams extends RowDropZoneEvents {\n /** A callback method that returns the DropZone HTMLElement. */\n getContainer: () => HTMLElement;\n}\n\nexport class RowDragFeature extends BeanStub implements DropTarget {\n\n @Autowired('dragAndDropService') private dragAndDropService: DragAndDropService;\n // this feature is only created when row model is ClientSide, so we can type it as ClientSide\n @Autowired('rowModel') private rowModel: IRowModel;\n @Autowired('paginationProxy') private paginationProxy: PaginationProxy;\n @Autowired('columnModel') private columnModel: ColumnModel;\n @Autowired('focusService') private focusService: FocusService;\n @Autowired('sortController') private sortController: SortController;\n @Autowired('filterManager') private filterManager: FilterManager;\n @Autowired('selectionService') private selectionService: SelectionService;\n @Autowired('mouseEventService') private mouseEventService: MouseEventService;\n @Autowired('ctrlsService') private ctrlsService: CtrlsService;\n @Optional('rangeService') private rangeService: IRangeService;\n @Autowired('columnApi') private columnApi: ColumnApi;\n @Autowired('gridApi') private gridApi: GridApi;\n\n private clientSideRowModel: IClientSideRowModel;\n private eContainer: HTMLElement;\n private isMultiRowDrag: boolean = false;\n private isGridSorted: boolean = false;\n private isGridFiltered: boolean = false;\n private isRowGroupActive: boolean = false;\n private lastDraggingEvent: DraggingEvent;\n private autoScrollService: AutoScrollService;\n\n constructor(eContainer: HTMLElement) {\n super();\n this.eContainer = eContainer;\n }\n\n @PostConstruct\n private postConstruct(): void {\n if (this.gridOptionsWrapper.isRowModelDefault()) {\n this.clientSideRowModel = this.rowModel as IClientSideRowModel;\n }\n\n const refreshStatus = () => {\n this.onSortChanged();\n this.onFilterChanged();\n this.onRowGroupChanged();\n };\n\n this.addManagedListener(this.eventService, Events.EVENT_SORT_CHANGED, this.onSortChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_FILTER_CHANGED, this.onFilterChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_ROW_GROUP_CHANGED, this.onRowGroupChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_MODEL_UPDATED, () => {\n refreshStatus();\n });\n\n refreshStatus();\n\n this.ctrlsService.whenReady(() => {\n const gridBodyCon = this.ctrlsService.getGridBodyCtrl();\n this.autoScrollService = new AutoScrollService({\n scrollContainer: gridBodyCon.getBodyViewportElement(),\n scrollAxis: 'y',\n getVerticalPosition: () => gridBodyCon.getScrollFeature().getVScrollPosition().top,\n setVerticalPosition: (position) => gridBodyCon.getScrollFeature().setVerticalScrollPosition(position),\n onScrollCallback: () => { this.onDragging(this.lastDraggingEvent); }\n });\n });\n }\n\n private onSortChanged(): void {\n this.isGridSorted = this.sortController.isSortActive();\n }\n\n private onFilterChanged(): void {\n this.isGridFiltered = this.filterManager.isAnyFilterPresent();\n }\n\n private onRowGroupChanged(): void {\n const rowGroups = this.columnModel.getRowGroupColumns();\n this.isRowGroupActive = !missingOrEmpty(rowGroups);\n }\n\n public getContainer(): HTMLElement {\n return this.eContainer;\n }\n\n public isInterestedIn(type: DragSourceType): boolean {\n return type === DragSourceType.RowDrag;\n }\n\n public getIconName(): string {\n const managedDrag = this.gridOptionsWrapper.isRowDragManaged();\n\n if (managedDrag && this.shouldPreventRowMove()) {\n return DragAndDropService.ICON_NOT_ALLOWED;\n }\n\n return DragAndDropService.ICON_MOVE;\n }\n\n public shouldPreventRowMove(): boolean {\n return this.isGridSorted || this.isGridFiltered || this.isRowGroupActive;\n }\n\n private getRowNodes(draggingEvent: DraggingEvent): RowNode[] {\n if (!this.isFromThisGrid(draggingEvent)) {\n return draggingEvent.dragItem.rowNodes || [];\n }\n\n const isRowDragMultiRow = this.gridOptionsWrapper.isRowDragMultiRow();\n const selectedNodes = [...this.selectionService.getSelectedNodes()].sort(\n (a, b) => this.getRowIndexNumber(a) - this.getRowIndexNumber(b)\n );\n\n const currentNode = draggingEvent.dragItem.rowNode!;\n\n if (isRowDragMultiRow && selectedNodes.indexOf(currentNode) !== -1) {\n this.isMultiRowDrag = true;\n return selectedNodes;\n }\n\n this.isMultiRowDrag = false;\n\n return [currentNode];\n }\n\n public onDragEnter(draggingEvent: DraggingEvent): void {\n // builds a lits of all rows being dragged before firing events\n draggingEvent.dragItem.rowNodes = this.getRowNodes(draggingEvent);\n\n // when entering, we fire the enter event, then in onEnterOrDragging,\n // we also fire the move event. so we get both events when entering.\n this.dispatchGridEvent(Events.EVENT_ROW_DRAG_ENTER, draggingEvent);\n\n this.getRowNodes(draggingEvent).forEach(rowNode => {\n rowNode.setDragging(true);\n });\n\n this.onEnterOrDragging(draggingEvent);\n }\n\n public onDragging(draggingEvent: DraggingEvent): void {\n this.onEnterOrDragging(draggingEvent);\n }\n\n private isFromThisGrid(draggingEvent: DraggingEvent) {\n const { dragSourceDomDataKey } = draggingEvent.dragSource;\n\n return dragSourceDomDataKey === this.gridOptionsWrapper.getDomDataKey();\n }\n\n private isDropZoneWithinThisGrid(draggingEvent: DraggingEvent): boolean {\n const gridBodyCon = this.ctrlsService.getGridBodyCtrl();\n const gridGui = gridBodyCon.getGui();\n const { dropZoneTarget } = draggingEvent;\n\n return !gridGui.contains(dropZoneTarget);\n }\n\n private onEnterOrDragging(draggingEvent: DraggingEvent): void {\n // this event is fired for enter and move\n this.dispatchGridEvent(Events.EVENT_ROW_DRAG_MOVE, draggingEvent);\n\n this.lastDraggingEvent = draggingEvent;\n\n const pixel = this.mouseEventService.getNormalisedPosition(draggingEvent).y;\n const managedDrag = this.gridOptionsWrapper.isRowDragManaged();\n\n if (managedDrag) {\n this.doManagedDrag(draggingEvent, pixel);\n }\n\n this.autoScrollService.check(draggingEvent.event);\n }\n\n private doManagedDrag(draggingEvent: DraggingEvent, pixel: number): void {\n const isFromThisGrid = this.isFromThisGrid(draggingEvent);\n const managedDrag = this.gridOptionsWrapper.isRowDragManaged();\n const rowNodes = draggingEvent.dragItem.rowNodes!;\n\n if (managedDrag && this.shouldPreventRowMove()) {\n return;\n }\n\n if (this.gridOptionsWrapper.isSuppressMoveWhenRowDragging() || !isFromThisGrid) {\n if (!this.isDropZoneWithinThisGrid(draggingEvent)) {\n this.clientSideRowModel.highlightRowAtPixel(rowNodes[0], pixel);\n }\n } else {\n this.moveRows(rowNodes, pixel);\n }\n }\n\n private getRowIndexNumber(rowNode: RowNode): number {\n return parseInt(last(rowNode.getRowIndexString().split('-')), 10);\n }\n\n private moveRowAndClearHighlight(draggingEvent: DraggingEvent): void {\n const lastHighlightedRowNode = this.clientSideRowModel.getLastHighlightedRowNode();\n const isBelow = lastHighlightedRowNode && lastHighlightedRowNode.highlighted === RowHighlightPosition.Below;\n const pixel = this.mouseEventService.getNormalisedPosition(draggingEvent).y;\n const rowNodes = draggingEvent.dragItem.rowNodes;\n\n let increment = isBelow ? 1 : 0;\n\n if (this.isFromThisGrid(draggingEvent)) {\n rowNodes!.forEach(rowNode => {\n if (rowNode.rowTop! < pixel) {\n increment -= 1;\n }\n });\n this.moveRows(rowNodes!, pixel, increment);\n } else {\n const getRowIdFunc = this.gridOptionsWrapper.getRowIdFunc();\n\n let addIndex = this.clientSideRowModel.getRowIndexAtPixel(pixel) + 1;\n\n if (this.clientSideRowModel.getHighlightPosition(pixel) === RowHighlightPosition.Above) {\n addIndex--;\n }\n\n this.clientSideRowModel.updateRowData({\n add: rowNodes!\n .map(node => node.data)\n .filter(data => !this.clientSideRowModel.getRowNode(\n getRowIdFunc ? getRowIdFunc({ data, level: 0 }) : data.id)\n ),\n addIndex\n });\n }\n\n this.clearRowHighlight();\n }\n\n private clearRowHighlight(): void {\n this.clientSideRowModel.highlightRowAtPixel(null);\n }\n\n private moveRows(rowNodes: RowNode[], pixel: number, increment: number = 0): void {\n const rowWasMoved = this.clientSideRowModel.ensureRowsAtPixel(rowNodes, pixel, increment);\n\n if (rowWasMoved) {\n this.focusService.clearFocusedCell();\n if (this.rangeService) {\n this.rangeService.removeAllCellRanges();\n }\n }\n }\n\n public addRowDropZone(params: RowDropZoneParams): void {\n if (!params.getContainer()) {\n doOnce(() => console.warn('AG Grid: addRowDropZone - A container target needs to be provided'), 'add-drop-zone-empty-target');\n return;\n }\n\n if (this.dragAndDropService.findExternalZone(params)) {\n console.warn('AG Grid: addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.');\n return;\n }\n\n let processedParams: RowDropZoneParams = {\n getContainer: params.getContainer\n };\n\n if ((params as any).fromGrid) {\n (params as any).fromGrid = undefined;\n processedParams = params;\n } else {\n if (params.onDragEnter) {\n processedParams.onDragEnter = (e) => {\n params.onDragEnter!(this.draggingToRowDragEvent(Events.EVENT_ROW_DRAG_ENTER, e as any));\n };\n }\n if (params.onDragLeave) {\n processedParams.onDragLeave = (e) => {\n params.onDragLeave!(this.draggingToRowDragEvent(Events.EVENT_ROW_DRAG_LEAVE, e as any));\n };\n }\n if (params.onDragging) {\n processedParams.onDragging = (e) => {\n params.onDragging!(this.draggingToRowDragEvent(Events.EVENT_ROW_DRAG_MOVE, e as any));\n };\n }\n if (params.onDragStop) {\n processedParams.onDragStop = (e) => {\n params.onDragStop!(this.draggingToRowDragEvent(Events.EVENT_ROW_DRAG_END, e as any));\n };\n }\n }\n\n this.dragAndDropService.addDropTarget({\n isInterestedIn: (type: DragSourceType) => type === DragSourceType.RowDrag,\n getIconName: () => DragAndDropService.ICON_MOVE,\n external: true,\n ...processedParams as any\n });\n }\n\n public getRowDropZone(events?: RowDropZoneEvents): RowDropZoneParams {\n const getContainer = this.getContainer.bind(this);\n const onDragEnter = this.onDragEnter.bind(this);\n const onDragLeave = this.onDragLeave.bind(this);\n const onDragging = this.onDragging.bind(this);\n const onDragStop = this.onDragStop.bind(this);\n\n if (!events) {\n return { getContainer, onDragEnter, onDragLeave, onDragging, onDragStop, /* @private */ fromGrid: true } as RowDropZoneParams;\n }\n\n return {\n getContainer,\n onDragEnter: events.onDragEnter\n ? ((e) => {\n onDragEnter(e);\n events.onDragEnter!(this.draggingToRowDragEvent(Events.EVENT_ROW_DRAG_ENTER, e as any));\n })\n : onDragEnter,\n onDragLeave: events.onDragLeave\n ? ((e) => {\n onDragLeave(e);\n events.onDragLeave!(this.draggingToRowDragEvent(Events.EVENT_ROW_DRAG_LEAVE, e as any));\n })\n : onDragLeave,\n onDragging: events.onDragging\n ? ((e) => {\n onDragging(e);\n events.onDragging!(this.draggingToRowDragEvent(Events.EVENT_ROW_DRAG_MOVE, e as any));\n })\n : onDragging,\n onDragStop: events.onDragStop\n ? ((e) => {\n onDragStop(e);\n events.onDragStop!(this.draggingToRowDragEvent(Events.EVENT_ROW_DRAG_END, e as any));\n })\n : onDragStop,\n fromGrid: true /* @private */\n } as RowDropZoneParams;\n }\n\n private draggingToRowDragEvent(type: string, draggingEvent: DraggingEvent): RowDragEvent {\n const yNormalised = this.mouseEventService.getNormalisedPosition(draggingEvent).y;\n const mouseIsPastLastRow = yNormalised > this.paginationProxy.getCurrentPageHeight();\n\n let overIndex = -1;\n let overNode: RowNode | undefined;\n\n if (!mouseIsPastLastRow) {\n overIndex = this.rowModel.getRowIndexAtPixel(yNormalised);\n overNode = this.rowModel.getRow(overIndex);\n }\n\n let vDirectionString: string | null;\n\n switch (draggingEvent.vDirection) {\n case VerticalDirection.Down:\n vDirectionString = 'down';\n break;\n case VerticalDirection.Up:\n vDirectionString = 'up';\n break;\n default:\n vDirectionString = null;\n break;\n }\n\n const event: RowDragEvent = {\n type: type,\n api: this.gridOptionsWrapper.getApi()!,\n columnApi: this.gridOptionsWrapper.getColumnApi()!,\n event: draggingEvent.event,\n node: draggingEvent.dragItem.rowNode!,\n nodes: draggingEvent.dragItem.rowNodes!,\n overIndex: overIndex,\n overNode: overNode,\n y: yNormalised,\n vDirection: vDirectionString!\n };\n\n return event;\n }\n\n private dispatchGridEvent(type: string, draggingEvent: DraggingEvent): void {\n const event = this.draggingToRowDragEvent(type, draggingEvent);\n\n this.eventService.dispatchEvent(event);\n }\n\n public onDragLeave(draggingEvent: DraggingEvent): void {\n this.dispatchGridEvent(Events.EVENT_ROW_DRAG_LEAVE, draggingEvent);\n this.stopDragging(draggingEvent);\n\n if (this.gridOptionsWrapper.isRowDragManaged()) {\n this.clearRowHighlight();\n }\n\n if (this.isFromThisGrid(draggingEvent)) {\n this.isMultiRowDrag = false;\n }\n }\n\n public onDragStop(draggingEvent: DraggingEvent): void {\n this.dispatchGridEvent(Events.EVENT_ROW_DRAG_END, draggingEvent);\n this.stopDragging(draggingEvent);\n\n if (\n this.gridOptionsWrapper.isRowDragManaged() &&\n (this.gridOptionsWrapper.isSuppressMoveWhenRowDragging() || !this.isFromThisGrid(draggingEvent)) &&\n !this.isDropZoneWithinThisGrid(draggingEvent)\n ) {\n this.moveRowAndClearHighlight(draggingEvent);\n }\n }\n\n private stopDragging(draggingEvent: DraggingEvent): void {\n this.autoScrollService.ensureCleared();\n\n this.getRowNodes(draggingEvent).forEach(rowNode => {\n rowNode.setDragging(false);\n });\n }\n}\n","import { Column } from \"../entities/column\";\nimport { CellPosition } from \"../entities/cellPosition\";\nimport { RowPosition } from \"../entities/rowPosition\";\nimport { CellCtrl } from \"../rendering/cell/cellCtrl\";\n\nexport interface IRangeService {\n isEmpty(): boolean;\n removeAllCellRanges(): void;\n getCellRangeCount(cell: CellPosition): number;\n isCellInAnyRange(cell: CellPosition): boolean;\n isCellInSpecificRange(cell: CellPosition, range: CellRange): boolean;\n isBottomRightCell(cellRange: CellRange, cell: CellPosition): boolean;\n isContiguousRange(cellRange: CellRange): boolean;\n isMoreThanOneCell(): boolean;\n areAllRangesAbleToMerge(): boolean;\n onDragStart(mouseEvent: MouseEvent): void;\n onDragStop(): void;\n onDragging(mouseEvent: MouseEvent): void;\n getCellRanges(): CellRange[];\n setRangeToCell(cell: CellPosition, appendRange?: boolean): void;\n setCellRange(params: CellRangeParams): void;\n addCellRange(params: CellRangeParams): void;\n extendLatestRangeInDirection(event: KeyboardEvent): CellPosition | undefined;\n extendLatestRangeToCell(cell: CellPosition): void;\n updateRangeEnd(cellRange: CellRange, cellPosition: CellPosition, silent?: boolean): void;\n getRangeStartRow(cellRange: CellRange): RowPosition;\n getRangeEndRow(cellRange: CellRange): RowPosition;\n createCellRangeFromCellRangeParams(params: CellRangeParams): CellRange | undefined;\n setCellRanges(cellRanges: CellRange[]): void;\n}\n\nexport interface ISelectionHandle {\n getGui(): HTMLElement;\n getType(): SelectionHandleType;\n refresh(cellCtrl: CellCtrl): void;\n}\n\nexport interface ISelectionHandleFactory {\n createSelectionHandle(type: SelectionHandleType): ISelectionHandle;\n}\n\nexport enum SelectionHandleType { FILL, RANGE }\n\nexport enum CellRangeType { VALUE, DIMENSION }\n\nexport interface CellRange {\n id?: string;\n type?: CellRangeType;\n /** The start row of the range */\n startRow?: RowPosition;\n /** The end row of the range */\n endRow?: RowPosition;\n /** The columns in the range */\n columns: Column[];\n /** The start column for the range */\n startColumn: Column;\n}\n\nexport interface CellRangeParams {\n /** Start row index */\n rowStartIndex: number | null;\n /** Pinned state of start row. Either 'top', 'bottom' or null */\n rowStartPinned?: string | null;\n /** End row index */\n rowEndIndex: number | null;\n /** Pinned state of end row. Either 'top', 'bottom' or null */\n rowEndPinned?: string | null;\n\n /** Starting column for range */\n columnStart?: string | Column;\n /** End column for range */\n columnEnd?: string | Column;\n /** Specify Columns to include instead of using `columnStart` and `columnEnd` */\n columns?: (string | Column)[];\n}\n\n/** @deprecated */\n// instead of this, we now use CellRange\nexport interface RangeSelection {\n start: CellPosition;\n end: CellPosition;\n columns: Column[] | null;\n}\n\n/** @deprecated */\n// instead of this, we now use AddCellRangeParams\nexport interface AddRangeSelectionParams {\n rowStart: number;\n floatingStart: string;\n rowEnd: number;\n floatingEnd: string;\n columnStart: string | Column;\n columnEnd: string | Column;\n}\n","import { Beans } from \"../beans\";\nimport {\n CellCtrl,\n ICellComp\n} from \"./cellCtrl\";\nimport { includes, last } from \"../../utils/array\";\nimport { CellRangeType, ISelectionHandle, SelectionHandleType } from \"../../interfaces/IRangeService\";\nimport { Column } from \"../../entities/column\";\nimport { missing } from \"../../utils/generic\";\nimport { setAriaSelected } from \"../../utils/aria\";\n\nconst CSS_CELL_RANGE_SELECTED = 'ag-cell-range-selected';\nconst CSS_CELL_RANGE_CHART = 'ag-cell-range-chart';\nconst CSS_CELL_RANGE_SINGLE_CELL = 'ag-cell-range-single-cell';\nconst CSS_CELL_RANGE_CHART_CATEGORY = 'ag-cell-range-chart-category';\nconst CSS_CELL_RANGE_HANDLE = 'ag-cell-range-handle';\nconst CSS_CELL_RANGE_TOP = 'ag-cell-range-top';\nconst CSS_CELL_RANGE_RIGHT = 'ag-cell-range-right';\nconst CSS_CELL_RANGE_BOTTOM = 'ag-cell-range-bottom';\nconst CSS_CELL_RANGE_LEFT = 'ag-cell-range-left';\n\nexport class CellRangeFeature {\n\n private beans: Beans;\n private cellComp: ICellComp;\n private cellCtrl: CellCtrl;\n private eGui: HTMLElement;\n\n private rangeCount: number;\n private hasChartRange: boolean;\n\n private selectionHandle: ISelectionHandle | null | undefined;\n\n constructor(beans: Beans, ctrl: CellCtrl) {\n this.beans = beans;\n this.cellCtrl = ctrl;\n }\n\n public setComp(cellComp: ICellComp, eGui: HTMLElement): void {\n this.cellComp = cellComp;\n this.eGui = eGui;\n this.onRangeSelectionChanged();\n }\n\n public onRangeSelectionChanged(): void {\n // when using reactUi, given UI is async, it's possible this method is called before the comp is registered\n if (!this.cellComp) { return; }\n\n this.rangeCount = this.beans.rangeService.getCellRangeCount(this.cellCtrl.getCellPosition());\n this.hasChartRange = this.getHasChartRange();\n\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_SELECTED, this.rangeCount !== 0);\n this.cellComp.addOrRemoveCssClass(`${CSS_CELL_RANGE_SELECTED}-1`, this.rangeCount === 1);\n this.cellComp.addOrRemoveCssClass(`${CSS_CELL_RANGE_SELECTED}-2`, this.rangeCount === 2);\n this.cellComp.addOrRemoveCssClass(`${CSS_CELL_RANGE_SELECTED}-3`, this.rangeCount === 3);\n this.cellComp.addOrRemoveCssClass(`${CSS_CELL_RANGE_SELECTED}-4`, this.rangeCount >= 4);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_CHART, this.hasChartRange);\n\n setAriaSelected(this.eGui, this.rangeCount > 0 ? true : undefined);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_SINGLE_CELL, this.isSingleCell());\n\n this.updateRangeBorders();\n\n this.refreshHandle();\n }\n\n private updateRangeBorders(): void {\n const rangeBorders = this.getRangeBorders();\n const isSingleCell = this.isSingleCell();\n const isTop = !isSingleCell && rangeBorders.top;\n const isRight = !isSingleCell && rangeBorders.right;\n const isBottom = !isSingleCell && rangeBorders.bottom;\n const isLeft = !isSingleCell && rangeBorders.left;\n\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_TOP, isTop);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_RIGHT, isRight);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_BOTTOM, isBottom);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_LEFT, isLeft);\n }\n\n private isSingleCell(): boolean {\n const { rangeService } = this.beans;\n return this.rangeCount === 1 && rangeService && !rangeService.isMoreThanOneCell();\n }\n\n private getHasChartRange(): boolean {\n const { rangeService } = this.beans;\n\n if (!this.rangeCount || !rangeService) { return false; }\n\n const cellRanges = rangeService.getCellRanges();\n\n return cellRanges.length > 0 && cellRanges.every(range => includes([CellRangeType.DIMENSION, CellRangeType.VALUE], range.type));\n }\n\n public updateRangeBordersIfRangeCount(): void {\n // we only need to update range borders if we are in a range\n if (this.rangeCount > 0) {\n this.updateRangeBorders();\n this.refreshHandle();\n }\n }\n\n private getRangeBorders(): {\n top: boolean,\n right: boolean,\n bottom: boolean,\n left: boolean;\n } {\n const isRtl = this.beans.gridOptionsWrapper.isEnableRtl();\n\n let top = false;\n let right = false;\n let bottom = false;\n let left = false;\n\n const thisCol = this.cellCtrl.getCellPosition().column;\n const { rangeService, columnModel } = this.beans;\n\n let leftCol: Column | null;\n let rightCol: Column | null;\n\n if (isRtl) {\n leftCol = columnModel.getDisplayedColAfter(thisCol);\n rightCol = columnModel.getDisplayedColBefore(thisCol);\n } else {\n leftCol = columnModel.getDisplayedColBefore(thisCol);\n rightCol = columnModel.getDisplayedColAfter(thisCol);\n }\n\n const ranges = rangeService.getCellRanges().filter(\n range => rangeService.isCellInSpecificRange(this.cellCtrl.getCellPosition(), range)\n );\n\n // this means we are the first column in the grid\n if (!leftCol) {\n left = true;\n }\n\n // this means we are the last column in the grid\n if (!rightCol) {\n right = true;\n }\n\n for (let i = 0; i < ranges.length; i++) {\n if (top && right && bottom && left) { break; }\n\n const range = ranges[i];\n const startRow = rangeService.getRangeStartRow(range);\n const endRow = rangeService.getRangeEndRow(range);\n\n if (!top && this.beans.rowPositionUtils.sameRow(startRow, this.cellCtrl.getCellPosition())) {\n top = true;\n }\n\n if (!bottom && this.beans.rowPositionUtils.sameRow(endRow, this.cellCtrl.getCellPosition())) {\n bottom = true;\n }\n\n if (!left && leftCol && range.columns.indexOf(leftCol) < 0) {\n left = true;\n }\n\n if (!right && rightCol && range.columns.indexOf(rightCol) < 0) {\n right = true;\n }\n }\n\n return { top, right, bottom, left };\n }\n\n public refreshHandle(): void {\n if (!this.beans.rangeService) { return; }\n\n const shouldHaveSelectionHandle = this.shouldHaveSelectionHandle();\n\n if (this.selectionHandle && !shouldHaveSelectionHandle) {\n this.selectionHandle = this.beans.context.destroyBean(this.selectionHandle);\n }\n\n if (shouldHaveSelectionHandle) {\n this.addSelectionHandle();\n }\n\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_HANDLE, !!this.selectionHandle);\n }\n\n private shouldHaveSelectionHandle(): boolean {\n const { gridOptionsWrapper, rangeService } = this.beans;\n const cellRanges = rangeService.getCellRanges();\n const rangesLen = cellRanges.length;\n\n if (this.rangeCount < 1 || rangesLen < 1) {\n return false;\n }\n\n const cellRange = last(cellRanges);\n const cellPosition = this.cellCtrl.getCellPosition();\n const isFillHandleAvailable = gridOptionsWrapper.isEnableFillHandle() && !this.cellCtrl.isSuppressFillHandle();\n const isRangeHandleAvailable = gridOptionsWrapper.isEnableRangeHandle();\n\n let handleIsAvailable = rangesLen === 1 && !this.cellCtrl.isEditing() && (\n isFillHandleAvailable || isRangeHandleAvailable\n );\n\n if (this.hasChartRange) {\n const hasCategoryRange = cellRanges[0].type === CellRangeType.DIMENSION;\n const isCategoryCell = hasCategoryRange && rangeService.isCellInSpecificRange(cellPosition, cellRanges[0]);\n\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_CHART_CATEGORY, isCategoryCell);\n handleIsAvailable = cellRange.type === CellRangeType.VALUE;\n }\n\n return handleIsAvailable &&\n cellRange.endRow != null &&\n rangeService.isContiguousRange(cellRange) &&\n rangeService.isBottomRightCell(cellRange, cellPosition);\n }\n\n private addSelectionHandle() {\n const { gridOptionsWrapper, rangeService } = this.beans;\n const cellRangeType = last(rangeService.getCellRanges()).type;\n const selectionHandleFill = gridOptionsWrapper.isEnableFillHandle() && missing(cellRangeType);\n const type = selectionHandleFill ? SelectionHandleType.FILL : SelectionHandleType.RANGE;\n\n if (this.selectionHandle && this.selectionHandle.getType() !== type) {\n this.selectionHandle = this.beans.context.destroyBean(this.selectionHandle);\n }\n\n if (!this.selectionHandle) {\n this.selectionHandle = this.beans.selectionHandleFactory.createSelectionHandle(type);\n }\n\n this.selectionHandle.refresh(this.cellCtrl);\n }\n\n public destroy(): void {\n this.beans.context.destroyBean(this.selectionHandle);\n }\n\n}","import { ProcessRowParams } from \"../../entities/iCallbackParams\";\nimport { WithoutGridCommon } from \"../../interfaces/iCommon\";\nimport { UserCompDetails } from \"../../components/framework/userComponentFactory\";\nimport { Constants } from \"../../constants/constants\";\nimport { BeanStub } from \"../../context/beanStub\";\nimport { CellPosition } from \"../../entities/cellPosition\";\nimport { Column } from \"../../entities/column\";\nimport { RowClassParams } from \"../../entities/gridOptions\";\nimport { DataChangedEvent, RowHighlightPosition, RowNode } from \"../../entities/rowNode\";\nimport { RowPosition } from \"../../entities/rowPosition\";\nimport { CellFocusedEvent, Events, RowClickedEvent, RowDoubleClickedEvent, RowEditingStartedEvent, RowEditingStoppedEvent, RowEvent, RowValueChangedEvent, VirtualRowRemovedEvent } from \"../../events\";\nimport { RowContainerType } from \"../../gridBodyComp/rowContainer/rowContainerCtrl\";\nimport { IFrameworkOverrides } from \"../../interfaces/iFrameworkOverrides\";\nimport { ModuleNames } from \"../../modules/moduleNames\";\nimport { ModuleRegistry } from \"../../modules/moduleRegistry\";\nimport { setAriaExpanded, setAriaLabel, setAriaRowIndex, setAriaSelected } from \"../../utils/aria\";\nimport { isElementChildOfClass } from \"../../utils/dom\";\nimport { isStopPropagationForAgGrid } from \"../../utils/event\";\nimport { doOnce, executeNextVMTurn } from \"../../utils/function\";\nimport { exists, makeNull } from \"../../utils/generic\";\nimport { escapeString } from \"../../utils/string\";\nimport { Beans } from \"../beans\";\nimport { CellCtrl } from \"../cell/cellCtrl\";\nimport { ICellRenderer, ICellRendererParams } from \"../cellRenderers/iCellRenderer\";\nimport { RowCssClassCalculatorParams } from \"./rowCssClassCalculator\";\nimport { RowDragComp } from \"./rowDragComp\";\n\nexport enum RowType {\n Normal = 'Normal',\n FullWidth = 'FullWidth',\n FullWidthLoading = 'FullWidthLoading',\n FullWidthGroup = 'FullWidthGroup',\n FullWidthDetail = 'FullWidthDetail'\n}\n\nlet instanceIdSequence = 0;\n\nexport interface IRowComp {\n setDomOrder(domOrder: boolean): void;\n addOrRemoveCssClass(cssClassName: string, on: boolean): void;\n setCellCtrls(cellCtrls: CellCtrl[]): void;\n showFullWidth(compDetails: UserCompDetails): void;\n getFullWidthCellRenderer(): ICellRenderer | null | undefined;\n setTop(top: string): void;\n setTransform(transform: string): void;\n setRowIndex(rowIndex: string): void;\n setRowId(rowId: string): void;\n setRowBusinessKey(businessKey: string): void;\n setTabIndex(tabIndex: number): void;\n setUserStyles(styles: any): void;\n setRole(role: string): void;\n}\n\ninterface RowGui {\n rowComp: IRowComp;\n element: HTMLElement;\n containerType: RowContainerType;\n}\n\ninterface CellCtrlListAndMap {\n list: CellCtrl[];\n map: { [key: string]: CellCtrl };\n}\n\nexport class RowCtrl extends BeanStub {\n\n public static DOM_DATA_KEY_ROW_CTRL = 'renderedRow';\n\n private instanceId: string;\n\n private readonly rowNode: RowNode;\n\n private readonly beans: Beans;\n\n private rowType: RowType;\n\n private leftGui: RowGui;\n private centerGui: RowGui;\n private rightGui: RowGui;\n private fullWidthGui: RowGui;\n\n private allRowGuis: RowGui[] = [];\n\n private firstRowOnPage: boolean;\n private lastRowOnPage: boolean;\n\n private active = true;\n\n private editingRow: boolean;\n private rowFocused: boolean;\n\n private centerCellCtrls: CellCtrlListAndMap = { list: [], map: {} };\n private leftCellCtrls: CellCtrlListAndMap = { list: [], map: {} };\n private rightCellCtrls: CellCtrlListAndMap = { list: [], map: {} };\n\n private fadeRowIn: boolean;\n private slideRowIn: boolean;\n private readonly useAnimationFrameForCreate: boolean;\n\n private paginationPage: number;\n\n private lastMouseDownOnDragger = false;\n\n private rowLevel: number;\n\n private readonly printLayout: boolean;\n\n private updateColumnListsPending = false;\n\n // the top needs to be set into the DOM element when the element is created, not updated afterwards.\n // otherwise the transition would not work, as it would be transitioning from zero (the unset value).\n // for example, suppose a row that is outside the viewport, then user does a filter to remove other rows\n // and this row now appears in the viewport, and the row moves up (ie it was under the viewport and not rendered,\n // but now is in the viewport) then a new RowComp is created, however it should have it's position initialised\n // to below the viewport, so the row will appear to animate up. if we didn't set the initial position at creation\n // time, the row would animate down (ie from position zero).\n private initialTop: string;\n private initialTransform: string;\n\n constructor(\n rowNode: RowNode,\n beans: Beans,\n animateIn: boolean,\n useAnimationFrameForCreate: boolean,\n printLayout: boolean\n ) {\n super();\n this.beans = beans;\n this.rowNode = rowNode;\n this.paginationPage = this.beans.paginationProxy.getCurrentPage();\n this.useAnimationFrameForCreate = useAnimationFrameForCreate;\n this.printLayout = printLayout;\n\n this.instanceId = rowNode.id + '-' + instanceIdSequence++;\n\n this.setAnimateFlags(animateIn);\n\n this.rowFocused = this.beans.focusService.isRowFocused(this.rowNode.rowIndex!, this.rowNode.rowPinned);\n this.rowLevel = this.beans.rowCssClassCalculator.calculateRowLevel(this.rowNode);\n\n this.setRowType();\n\n this.addListeners();\n\n this.setInitialRowTop();\n }\n\n public getBeans(): Beans {\n return this.beans;\n }\n\n public getInstanceId(): string {\n return this.instanceId;\n }\n\n public setComp(rowComp: IRowComp, element: HTMLElement, containerType: RowContainerType): void {\n const gui: RowGui = { rowComp, element, containerType };\n this.allRowGuis.push(gui);\n\n if (containerType === RowContainerType.LEFT) {\n this.leftGui = gui;\n } else if (containerType === RowContainerType.RIGHT) {\n this.rightGui = gui;\n } else if (containerType === RowContainerType.FULL_WIDTH) {\n this.fullWidthGui = gui;\n } else {\n this.centerGui = gui;\n }\n\n const allNormalPresent = this.leftGui != null && this.rightGui != null && this.centerGui != null;\n const fullWidthPresent = this.fullWidthGui != null;\n if (allNormalPresent || fullWidthPresent) {\n this.initialiseRowComps();\n }\n }\n\n public isCacheable(): boolean {\n return this.rowType === RowType.FullWidthDetail\n && this.beans.gridOptionsWrapper.isKeepDetailRows();\n }\n\n public setCached(cached: boolean): void {\n const displayValue = cached ? 'none' : '';\n this.allRowGuis.forEach(rg => rg.element.style.display = displayValue);\n }\n\n private initialiseRowComps(): void {\n const gow = this.beans.gridOptionsWrapper;\n\n this.onRowHeightChanged();\n this.updateRowIndexes();\n this.setFocusedClasses();\n this.setStylesFromGridOptions();\n\n if (gow.isRowSelection() && this.rowNode.selectable) {\n this.onRowSelected();\n }\n\n this.updateColumnLists(!this.useAnimationFrameForCreate);\n\n if (this.slideRowIn) {\n executeNextVMTurn(this.onTopChanged.bind(this));\n }\n if (this.fadeRowIn) {\n executeNextVMTurn(() => {\n this.allRowGuis.forEach(gui => gui.rowComp.addOrRemoveCssClass('ag-opacity-zero', false));\n });\n }\n\n const businessKey = this.getRowBusinessKey();\n const rowIdSanitised = escapeString(this.rowNode.id!);\n const businessKeySanitised = escapeString(businessKey!);\n\n this.allRowGuis.forEach(gui => {\n const comp = gui.rowComp;\n\n comp.setRole('row');\n\n const initialRowClasses = this.getInitialRowClasses(gui.containerType);\n initialRowClasses.forEach(name => comp.addOrRemoveCssClass(name, true));\n\n if (this.rowNode.group) {\n setAriaExpanded(gui.element, this.rowNode.expanded == true);\n }\n\n if (rowIdSanitised != null) {\n comp.setRowId(rowIdSanitised);\n }\n if (businessKeySanitised != null) {\n comp.setRowBusinessKey(businessKeySanitised);\n }\n\n if (this.isFullWidth() && !this.beans.gridOptionsWrapper.isSuppressCellFocus()) {\n comp.setTabIndex(-1);\n }\n\n // DOM DATA\n gow.setDomData(gui.element, RowCtrl.DOM_DATA_KEY_ROW_CTRL, this);\n this.addDestroyFunc(\n () => gow.setDomData(gui.element, RowCtrl.DOM_DATA_KEY_ROW_CTRL, null)\n );\n\n // adding hover functionality adds listener to this row, so we\n // do it lazily in an animation frame\n if (this.useAnimationFrameForCreate) {\n this.beans.animationFrameService.createTask(\n this.addHoverFunctionality.bind(this, gui.element),\n this.rowNode.rowIndex!,\n 'createTasksP2'\n );\n } else {\n this.addHoverFunctionality(gui.element);\n }\n\n if (this.isFullWidth()) {\n this.setupFullWidth(gui);\n }\n\n if (gow.isRowDragEntireRow()) {\n this.addRowDraggerToRow(gui);\n }\n\n if (this.useAnimationFrameForCreate) {\n // the height animation we only want active after the row is alive for 1 second.\n // this stops the row animation working when rows are initially crated. otherwise\n // auto-height rows get inserted into the dom and resized immediately, which gives\n // very bad UX (eg 10 rows get inserted, then all 10 expand, look particularly bad\n // when scrolling). so this makes sure when rows are shown for the first time, they\n // are resized immediately without animation.\n this.beans.animationFrameService.addDestroyTask(() => {\n if (!this.isAlive()) { return; }\n gui.rowComp.addOrRemoveCssClass('ag-after-created', true);\n });\n }\n });\n\n this.executeProcessRowPostCreateFunc();\n }\n\n private addRowDraggerToRow(gui: RowGui) {\n const gow = this.beans.gridOptionsWrapper;\n\n if (gow.isEnableRangeSelection()) {\n doOnce(() => {\n console.warn('AG Grid: Setting `rowDragEntireRow: true` in the gridOptions doesn\\'t work with `enableRangeSelection: true`');\n }, 'rowDragAndRangeSelectionEnabled');\n return;\n }\n\n const rowDragComp = new RowDragComp(() => '1 row', this.rowNode, undefined, gui.element, undefined, true);\n this.createManagedBean(rowDragComp, this.beans.context);\n }\n\n private setupFullWidth(gui: RowGui): void {\n\n const pinned = this.getPinnedForContainer(gui.containerType);\n const params = this.createFullWidthParams(gui.element, pinned);\n\n const masterDetailModuleLoaded = ModuleRegistry.isRegistered(ModuleNames.MasterDetailModule);\n if (this.rowType == RowType.FullWidthDetail && !masterDetailModuleLoaded) {\n if (ModuleRegistry.isPackageBased()) {\n console.warn(`AG Grid: cell renderer 'agDetailCellRenderer' (for master detail) not found. Can only be used with ag-grid-enterprise package.`);\n } else {\n console.warn(`AG Grid: cell renderer 'agDetailCellRenderer' (for master detail) not found. Can only be used with AG Grid Enterprise Module ${ModuleNames.MasterDetailModule}`);\n }\n return;\n }\n\n let compDetails: UserCompDetails;\n switch (this.rowType) {\n case RowType.FullWidthDetail:\n compDetails = this.beans.userComponentFactory.getFullWidthDetailCellRendererDetails(params);\n break;\n case RowType.FullWidthGroup:\n compDetails = this.beans.userComponentFactory.getFullWidthGroupCellRendererDetails(params);\n break;\n case RowType.FullWidthLoading:\n compDetails = this.beans.userComponentFactory.getFullWidthLoadingCellRendererDetails(params);\n break;\n default:\n compDetails = this.beans.userComponentFactory.getFullWidthCellRendererDetails(params);\n break;\n }\n\n gui.rowComp.showFullWidth(compDetails);\n }\n\n public isPrintLayout(): boolean {\n return this.printLayout;\n }\n\n // use by autoWidthCalculator, as it clones the elements\n public getCellElement(column: Column): HTMLElement | null {\n const cellCtrl = this.getCellCtrl(column);\n return cellCtrl ? cellCtrl.getGui() : null;\n }\n\n public executeProcessRowPostCreateFunc(): void {\n const func = this.beans.gridOptionsWrapper.getProcessRowPostCreateFunc();\n if (!func) { return; }\n\n const params: WithoutGridCommon = {\n eRow: this.centerGui ? this.centerGui.element : undefined!,\n ePinnedLeftRow: this.leftGui ? this.leftGui.element : undefined!,\n ePinnedRightRow: this.rightGui ? this.rightGui.element : undefined!,\n node: this.rowNode,\n rowIndex: this.rowNode.rowIndex!,\n addRenderedRowListener: this.addEventListener.bind(this),\n };\n func(params);\n }\n\n private setRowType(): void {\n const isStub = this.rowNode.stub;\n const isFullWidthCell = this.rowNode.isFullWidthCell();\n const isDetailCell = this.beans.doingMasterDetail && this.rowNode.detail;\n const pivotMode = this.beans.columnModel.isPivotMode();\n // we only use full width for groups, not footers. it wouldn't make sense to include footers if not looking\n // for totals. if users complain about this, then we should introduce a new property 'footerUseEntireRow'\n // so each can be set independently (as a customer complained about footers getting full width, hence\n // introducing this logic)\n const isGroupRow = !!this.rowNode.group && !this.rowNode.footer;\n const isFullWidthGroup = isGroupRow && this.beans.gridOptionsWrapper.isGroupUseEntireRow(pivotMode);\n\n if (isStub) {\n this.rowType = RowType.FullWidthLoading;\n } else if (isDetailCell) {\n this.rowType = RowType.FullWidthDetail;\n } else if (isFullWidthCell) {\n this.rowType = RowType.FullWidth;\n } else if (isFullWidthGroup) {\n this.rowType = RowType.FullWidthGroup;\n } else {\n this.rowType = RowType.Normal;\n }\n }\n\n private updateColumnLists(suppressAnimationFrame = false): void {\n\n if (this.isFullWidth()) { return; }\n\n const noAnimation = suppressAnimationFrame\n || this.beans.gridOptionsWrapper.isSuppressAnimationFrame()\n || this.printLayout;\n\n if (noAnimation) {\n this.updateColumnListsImpl();\n return;\n }\n\n if (this.updateColumnListsPending) { return; }\n this.beans.animationFrameService.createTask(\n () => {\n if (!this.active) { return; }\n this.updateColumnListsImpl();\n },\n this.rowNode.rowIndex!,\n 'createTasksP1'\n );\n this.updateColumnListsPending = true;\n }\n\n private createCellCtrls(prev: CellCtrlListAndMap, cols: Column[], pinned: string | null = null): CellCtrlListAndMap {\n const res: CellCtrlListAndMap = {\n list: [],\n map: {}\n };\n\n const addCell = (colInstanceId: number, cellCtrl: CellCtrl) => {\n res.list.push(cellCtrl);\n res.map[colInstanceId] = cellCtrl;\n };\n\n cols.forEach(col => {\n // we use instanceId's rather than colId as it's possible there is a Column with same Id,\n // but it's referring to a different column instance. Happens a lot with pivot, as pivot col id's are\n // reused eg pivot_0, pivot_1 etc\n const colInstanceId = col.getInstanceId();\n let cellCtrl = prev.map[colInstanceId];\n if (!cellCtrl) {\n cellCtrl = new CellCtrl(col, this.rowNode, this.beans, this);\n }\n addCell(colInstanceId, cellCtrl);\n });\n\n prev.list.forEach(prevCellCtrl => {\n const cellInResult = res.map[prevCellCtrl.getColumn().getInstanceId()] != null;\n if (cellInResult) { return; }\n\n const keepCell = !this.isCellEligibleToBeRemoved(prevCellCtrl, pinned);\n if (keepCell) {\n addCell(prevCellCtrl.getColumn().getInstanceId(), prevCellCtrl);\n return;\n }\n\n prevCellCtrl.destroy();\n });\n\n return res;\n }\n\n private updateColumnListsImpl(): void {\n this.updateColumnListsPending = false;\n const columnModel = this.beans.columnModel;\n if (this.printLayout) {\n this.centerCellCtrls = this.createCellCtrls(this.centerCellCtrls, columnModel.getAllDisplayedColumns());\n this.leftCellCtrls = { list: [], map: {} };\n this.rightCellCtrls = { list: [], map: {} };\n } else {\n const centerCols = columnModel.getViewportCenterColumnsForRow(this.rowNode);\n this.centerCellCtrls = this.createCellCtrls(this.centerCellCtrls, centerCols);\n\n const leftCols = columnModel.getDisplayedLeftColumnsForRow(this.rowNode);\n this.leftCellCtrls = this.createCellCtrls(this.leftCellCtrls, leftCols, Constants.PINNED_LEFT);\n\n const rightCols = columnModel.getDisplayedRightColumnsForRow(this.rowNode);\n this.rightCellCtrls = this.createCellCtrls(this.rightCellCtrls, rightCols, Constants.PINNED_RIGHT);\n }\n\n this.allRowGuis.forEach(item => {\n const cellControls = item.containerType === RowContainerType.LEFT ? this.leftCellCtrls :\n item.containerType === RowContainerType.RIGHT ? this.rightCellCtrls : this.centerCellCtrls;\n item.rowComp.setCellCtrls(cellControls.list);\n });\n }\n\n private isCellEligibleToBeRemoved(cellCtrl: CellCtrl, nextContainerPinned: string | null): boolean {\n const REMOVE_CELL = true;\n const KEEP_CELL = false;\n\n // always remove the cell if it's not rendered or if it's in the wrong pinned location\n const column = cellCtrl.getColumn();\n if (column.getPinned() != nextContainerPinned) { return REMOVE_CELL; }\n\n // we want to try and keep editing and focused cells\n const editing = cellCtrl.isEditing();\n const focused = this.beans.focusService.isCellFocused(cellCtrl.getCellPosition());\n\n const mightWantToKeepCell = editing || focused;\n\n if (mightWantToKeepCell) {\n const column = cellCtrl.getColumn();\n const displayedColumns = this.beans.columnModel.getAllDisplayedColumns();\n const cellStillDisplayed = displayedColumns.indexOf(column) >= 0;\n return cellStillDisplayed ? KEEP_CELL : REMOVE_CELL;\n }\n\n return REMOVE_CELL;\n }\n\n private setAnimateFlags(animateIn: boolean): void {\n if (animateIn) {\n const oldRowTopExists = exists(this.rowNode.oldRowTop);\n // if the row had a previous position, we slide it in (animate row top)\n this.slideRowIn = oldRowTopExists;\n // if the row had no previous position, we fade it in (animate\n this.fadeRowIn = !oldRowTopExists;\n } else {\n this.slideRowIn = false;\n this.fadeRowIn = false;\n }\n }\n\n public isEditing(): boolean {\n return this.editingRow;\n }\n\n public stopRowEditing(cancel: boolean): void {\n this.stopEditing(cancel);\n }\n\n public isFullWidth(): boolean {\n return this.rowType !== RowType.Normal;\n }\n\n public getRowType(): RowType {\n return this.rowType;\n }\n\n public refreshFullWidth(): boolean {\n // returns 'true' if refresh succeeded\n const tryRefresh = (gui: RowGui, pinned: string | null): boolean => {\n if (!gui) { return true; } // no refresh needed\n\n const cellRenderer = gui.rowComp.getFullWidthCellRenderer();\n\n // no cell renderer, either means comp not yet ready, or comp ready but now reference\n // to it (happens in react when comp is stateless). if comp not ready, we don't need to\n // refresh, however we don't know which one, so we refresh to cover the case where it's\n // react comp without reference so need to force a refresh\n if (!cellRenderer) { return false; }\n\n // no refresh method present, so can't refresh, hard refresh needed\n if (!cellRenderer.refresh) { return false; }\n\n const params = this.createFullWidthParams(gui.element, pinned);\n const refreshSucceeded = cellRenderer.refresh(params);\n\n return refreshSucceeded;\n };\n\n const fullWidthSuccess = tryRefresh(this.fullWidthGui, null);\n const centerSuccess = tryRefresh(this.centerGui, null);\n const leftSuccess = tryRefresh(this.leftGui, Constants.PINNED_LEFT);\n const rightSuccess = tryRefresh(this.rightGui, Constants.PINNED_RIGHT);\n\n const allFullWidthRowsRefreshed = fullWidthSuccess && centerSuccess && leftSuccess && rightSuccess;\n\n return allFullWidthRowsRefreshed;\n }\n\n private addListeners(): void {\n this.addManagedListener(this.rowNode, RowNode.EVENT_HEIGHT_CHANGED, this.onRowHeightChanged.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_ROW_SELECTED, this.onRowSelected.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_ROW_INDEX_CHANGED, this.onRowIndexChanged.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_TOP_CHANGED, this.onTopChanged.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_EXPANDED_CHANGED, this.updateExpandedCss.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_HAS_CHILDREN_CHANGED, this.updateExpandedCss.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_DATA_CHANGED, this.onRowNodeDataChanged.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_CELL_CHANGED, this.onRowNodeCellChanged.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_HIGHLIGHT_CHANGED, this.onRowNodeHighlightChanged.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_DRAGGING_CHANGED, this.onRowNodeDraggingChanged.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_UI_LEVEL_CHANGED, this.onUiLevelChanged.bind(this));\n\n const eventService = this.beans.eventService;\n this.addManagedListener(eventService, Events.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED, this.onPaginationPixelOffsetChanged.bind(this));\n this.addManagedListener(eventService, Events.EVENT_HEIGHT_SCALE_CHANGED, this.onTopChanged.bind(this));\n this.addManagedListener(eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, this.onDisplayedColumnsChanged.bind(this));\n this.addManagedListener(eventService, Events.EVENT_VIRTUAL_COLUMNS_CHANGED, this.onVirtualColumnsChanged.bind(this));\n this.addManagedListener(eventService, Events.EVENT_CELL_FOCUSED, this.onCellFocusChanged.bind(this));\n this.addManagedListener(eventService, Events.EVENT_PAGINATION_CHANGED, this.onPaginationChanged.bind(this));\n this.addManagedListener(eventService, Events.EVENT_MODEL_UPDATED, this.onModelUpdated.bind(this));\n\n this.addManagedListener(eventService, Events.EVENT_COLUMN_MOVED, this.onColumnMoved.bind(this));\n\n this.addListenersForCellComps();\n }\n\n private onColumnMoved(): void {\n this.updateColumnLists();\n }\n\n private addListenersForCellComps(): void {\n\n this.addManagedListener(this.rowNode, RowNode.EVENT_ROW_INDEX_CHANGED, () => {\n this.getAllCellCtrls().forEach(cellCtrl => cellCtrl.onRowIndexChanged());\n });\n this.addManagedListener(this.rowNode, RowNode.EVENT_CELL_CHANGED, event => {\n this.getAllCellCtrls().forEach(cellCtrl => cellCtrl.onCellChanged(event));\n });\n\n }\n\n private onRowNodeDataChanged(event: DataChangedEvent): void {\n // if this is an update, we want to refresh, as this will allow the user to put in a transition\n // into the cellRenderer refresh method. otherwise this might be completely new data, in which case\n // we will want to completely replace the cells\n this.getAllCellCtrls().forEach(cellCtrl =>\n cellCtrl.refreshCell({\n suppressFlash: !event.update,\n newData: !event.update\n })\n );\n\n // check for selected also, as this could be after lazy loading of the row data, in which case\n // the id might of just gotten set inside the row and the row selected state may of changed\n // as a result. this is what happens when selected rows are loaded in virtual pagination.\n // - niall note - since moving to the stub component, this may no longer be true, as replacing\n // the stub component now replaces the entire row\n this.onRowSelected();\n\n // as data has changed, then the style and class needs to be recomputed\n this.postProcessCss();\n }\n\n private onRowNodeCellChanged(): void {\n // as data has changed, then the style and class needs to be recomputed\n this.postProcessCss();\n }\n\n private postProcessCss(): void {\n this.setStylesFromGridOptions();\n this.postProcessClassesFromGridOptions();\n this.postProcessRowClassRules();\n this.postProcessRowDragging();\n }\n\n private onRowNodeHighlightChanged(): void {\n const highlighted = this.rowNode.highlighted;\n\n this.allRowGuis.forEach(gui => {\n const aboveOn = highlighted === RowHighlightPosition.Above;\n const belowOn = highlighted === RowHighlightPosition.Below;\n gui.rowComp.addOrRemoveCssClass('ag-row-highlight-above', aboveOn);\n gui.rowComp.addOrRemoveCssClass('ag-row-highlight-below', belowOn);\n });\n }\n\n private onRowNodeDraggingChanged(): void {\n this.postProcessRowDragging();\n }\n\n private postProcessRowDragging(): void {\n const dragging = this.rowNode.dragging;\n this.allRowGuis.forEach(gui => gui.rowComp.addOrRemoveCssClass('ag-row-dragging', dragging));\n }\n\n private updateExpandedCss(): void {\n\n const expandable = this.rowNode.isExpandable();\n const expanded = this.rowNode.expanded == true;\n\n this.allRowGuis.forEach(gui => {\n gui.rowComp.addOrRemoveCssClass('ag-row-group', expandable);\n gui.rowComp.addOrRemoveCssClass('ag-row-group-expanded', expandable && expanded);\n gui.rowComp.addOrRemoveCssClass('ag-row-group-contracted', expandable && !expanded);\n setAriaExpanded(gui.element, expandable && expanded);\n });\n }\n\n private onDisplayedColumnsChanged(): void {\n // we skip animations for onDisplayedColumnChanged, as otherwise the client could remove columns and\n // then set data, and any old valueGetter's (ie from cols that were removed) would still get called.\n this.updateColumnLists(true);\n\n if (this.beans.columnModel.wasAutoRowHeightEverActive()) {\n this.rowNode.checkAutoHeights();\n }\n }\n\n private onVirtualColumnsChanged(): void {\n this.updateColumnLists();\n }\n\n public getRowPosition(): RowPosition {\n return {\n rowPinned: makeNull(this.rowNode.rowPinned),\n rowIndex: this.rowNode.rowIndex as number\n };\n }\n\n public onKeyboardNavigate(keyboardEvent: KeyboardEvent) {\n const currentFullWidthComp = this.allRowGuis.find(c => c.element.contains(keyboardEvent.target as HTMLElement));\n const currentFullWidthContainer = currentFullWidthComp ? currentFullWidthComp.element : null;\n const isFullWidthContainerFocused = currentFullWidthContainer === keyboardEvent.target;\n\n if (!isFullWidthContainerFocused) { return; }\n\n const node = this.rowNode;\n const lastFocusedCell = this.beans.focusService.getFocusedCell();\n const cellPosition: CellPosition = {\n rowIndex: node.rowIndex!,\n rowPinned: node.rowPinned,\n column: (lastFocusedCell && lastFocusedCell.column) as Column\n };\n\n this.beans.navigationService.navigateToNextCell(keyboardEvent, keyboardEvent.key, cellPosition, true);\n keyboardEvent.preventDefault();\n }\n\n public onTabKeyDown(keyboardEvent: KeyboardEvent) {\n if (keyboardEvent.defaultPrevented || isStopPropagationForAgGrid(keyboardEvent)) { return; }\n const currentFullWidthComp = this.allRowGuis.find(c => c.element.contains(keyboardEvent.target as HTMLElement));\n const currentFullWidthContainer = currentFullWidthComp ? currentFullWidthComp.element : null;\n const isFullWidthContainerFocused = currentFullWidthContainer === keyboardEvent.target;\n let nextEl: HTMLElement | null = null;\n\n if (!isFullWidthContainerFocused) {\n nextEl = this.beans.focusService.findNextFocusableElement(currentFullWidthContainer!, false, keyboardEvent.shiftKey);\n }\n\n if ((this.isFullWidth() && isFullWidthContainerFocused) || !nextEl) {\n this.beans.navigationService.onTabKeyDown(this, keyboardEvent);\n }\n }\n\n public onFullWidthRowFocused(event: CellFocusedEvent) {\n const node = this.rowNode;\n const isFocused = this.isFullWidth() && event.rowIndex === node.rowIndex && event.rowPinned == node.rowPinned;\n\n const element = this.fullWidthGui ? this.fullWidthGui.element : this.centerGui?.element;\n if (!element) { return; } // can happen with react ui, comp not yet ready\n\n element.classList.toggle('ag-full-width-focus', isFocused);\n if (isFocused) {\n // we don't scroll normal rows into view when we focus them, so we don't want\n // to scroll Full Width rows either.\n element.focus({ preventScroll: true });\n }\n }\n\n public refreshCell(cellCtrl: CellCtrl) {\n this.centerCellCtrls = this.removeCellCtrl(this.centerCellCtrls, cellCtrl);\n this.leftCellCtrls = this.removeCellCtrl(this.leftCellCtrls, cellCtrl);\n this.rightCellCtrls = this.removeCellCtrl(this.rightCellCtrls, cellCtrl);\n this.updateColumnLists();\n }\n\n private removeCellCtrl(prev: CellCtrlListAndMap, cellCtrlToRemove: CellCtrl): CellCtrlListAndMap {\n const res: CellCtrlListAndMap = {\n list: [],\n map: {}\n };\n prev.list.forEach(cellCtrl => {\n if (cellCtrl === cellCtrlToRemove) { return; }\n res.list.push(cellCtrl);\n res.map[cellCtrl.getInstanceId()] = cellCtrl;\n });\n return res;\n }\n\n public onMouseEvent(eventName: string, mouseEvent: MouseEvent): void {\n switch (eventName) {\n case 'dblclick': this.onRowDblClick(mouseEvent); break;\n case 'click': this.onRowClick(mouseEvent); break;\n case 'touchstart':\n case 'mousedown':\n this.onRowMouseDown(mouseEvent);\n break;\n }\n }\n\n public createRowEvent(type: string, domEvent?: Event): RowEvent {\n return {\n type: type,\n node: this.rowNode,\n data: this.rowNode.data,\n rowIndex: this.rowNode.rowIndex!,\n rowPinned: this.rowNode.rowPinned,\n context: this.beans.gridOptionsWrapper.getContext(),\n api: this.beans.gridOptionsWrapper.getApi()!,\n columnApi: this.beans.gridOptionsWrapper.getColumnApi()!,\n event: domEvent\n };\n }\n\n private createRowEventWithSource(type: string, domEvent: Event): RowEvent {\n const event = this.createRowEvent(type, domEvent);\n // when first developing this, we included the rowComp in the event.\n // this seems very weird. so when introducing the event types, i left the 'source'\n // out of the type, and just include the source in the two places where this event\n // was fired (rowClicked and rowDoubleClicked). it doesn't make sense for any\n // users to be using this, as the rowComp isn't an object we expose, so would be\n // very surprising if a user was using it.\n (event as any).source = this;\n return event;\n }\n\n private onRowDblClick(mouseEvent: MouseEvent): void {\n if (isStopPropagationForAgGrid(mouseEvent)) { return; }\n\n const agEvent: RowDoubleClickedEvent = this.createRowEventWithSource(Events.EVENT_ROW_DOUBLE_CLICKED, mouseEvent);\n\n this.beans.eventService.dispatchEvent(agEvent);\n }\n\n private onRowMouseDown(mouseEvent: MouseEvent) {\n this.lastMouseDownOnDragger = isElementChildOfClass(mouseEvent.target as HTMLElement, 'ag-row-drag', 3);\n\n if (!this.isFullWidth()) { return; }\n\n const node = this.rowNode;\n const columnModel = this.beans.columnModel;\n\n this.beans.focusService.setFocusedCell(\n node.rowIndex!,\n columnModel.getAllDisplayedColumns()[0],\n node.rowPinned, true\n );\n\n }\n\n public onRowClick(mouseEvent: MouseEvent) {\n const stop = isStopPropagationForAgGrid(mouseEvent) || this.lastMouseDownOnDragger;\n\n if (stop) { return; }\n\n const agEvent: RowClickedEvent = this.createRowEventWithSource(Events.EVENT_ROW_CLICKED, mouseEvent);\n\n this.beans.eventService.dispatchEvent(agEvent);\n\n // ctrlKey for windows, metaKey for Apple\n const multiSelectKeyPressed = mouseEvent.ctrlKey || mouseEvent.metaKey;\n const shiftKeyPressed = mouseEvent.shiftKey;\n\n // we do not allow selecting the group by clicking, when groupSelectChildren, as the logic to\n // handle this is broken. to observe, change the logic below and allow groups to be selected.\n // you will see the group gets selected, then all children get selected, then the grid unselects\n // the children (as the default behaviour when clicking is to unselect other rows) which results\n // in the group getting unselected (as all children are unselected). the correct thing would be\n // to change this, so that children of the selected group are not then subsequenly un-selected.\n const groupSelectsChildren = this.beans.gridOptionsWrapper.isGroupSelectsChildren();\n\n if (\n // we do not allow selecting groups by clicking (as the click here expands the group), or if it's a detail row,\n // so return if it's a group row\n (groupSelectsChildren && this.rowNode.group) ||\n // this is needed so we don't unselect other rows when we click this row, eg if this row is not selectable,\n // and we click it, the selection should not change (ie any currently selected row should stay selected)\n !this.rowNode.selectable ||\n // we also don't allow selection of pinned rows\n this.rowNode.rowPinned ||\n // if no selection method enabled, do nothing\n !this.beans.gridOptionsWrapper.isRowSelection() ||\n // if click selection suppressed, do nothing\n this.beans.gridOptionsWrapper.isSuppressRowClickSelection()\n ) {\n return;\n }\n\n const multiSelectOnClick = this.beans.gridOptionsWrapper.isRowMultiSelectWithClick();\n const rowDeselectionWithCtrl = !this.beans.gridOptionsWrapper.isSuppressRowDeselection();\n\n if (this.rowNode.isSelected()) {\n if (multiSelectOnClick) {\n this.rowNode.setSelectedParams({ newValue: false });\n } else if (multiSelectKeyPressed) {\n if (rowDeselectionWithCtrl) {\n this.rowNode.setSelectedParams({ newValue: false });\n }\n } else {\n // selected with no multi key, must make sure anything else is unselected\n this.rowNode.setSelectedParams({ newValue: true, clearSelection: !shiftKeyPressed, rangeSelect: shiftKeyPressed });\n }\n } else {\n const clearSelection = multiSelectOnClick ? false : !multiSelectKeyPressed;\n this.rowNode.setSelectedParams({ newValue: true, clearSelection: clearSelection, rangeSelect: shiftKeyPressed });\n }\n }\n\n public setupDetailRowAutoHeight(eDetailGui: HTMLElement): void {\n\n if (this.rowType !== RowType.FullWidthDetail) { return; }\n\n if (!this.beans.gridOptionsWrapper.isDetailRowAutoHeight()) { return; }\n\n const checkRowSizeFunc = () => {\n const clientHeight = eDetailGui.clientHeight;\n\n // if the UI is not ready, the height can be 0, which we ignore, as otherwise a flicker will occur\n // as UI goes from the default height, to 0, then to the real height as UI becomes ready. this means\n // it's not possible for have 0 as auto-height, however this is an improbable use case, as even an\n // empty detail grid would still have some styling around it giving at least a few pixels.\n if (clientHeight != null && clientHeight > 0) {\n // we do the update in a timeout, to make sure we are not calling from inside the grid\n // doing another update\n const updateRowHeightFunc = () => {\n this.rowNode.setRowHeight(clientHeight);\n if (this.beans.clientSideRowModel) {\n this.beans.clientSideRowModel.onRowHeightChanged();\n } else if (this.beans.serverSideRowModel) {\n this.beans.serverSideRowModel.onRowHeightChanged();\n }\n };\n this.beans.frameworkOverrides.setTimeout(updateRowHeightFunc, 0);\n }\n };\n\n const resizeObserverDestroyFunc = this.beans.resizeObserverService.observeResize(eDetailGui, checkRowSizeFunc);\n\n this.addDestroyFunc(resizeObserverDestroyFunc);\n\n checkRowSizeFunc();\n }\n\n public createFullWidthParams(eRow: HTMLElement, pinned: string | null): ICellRendererParams {\n const params = {\n fullWidth: true,\n data: this.rowNode.data,\n node: this.rowNode,\n value: this.rowNode.key,\n valueFormatted: this.rowNode.key,\n rowIndex: this.rowNode.rowIndex!,\n api: this.beans.gridOptionsWrapper.getApi()!,\n columnApi: this.beans.gridOptionsWrapper.getColumnApi()!,\n context: this.beans.gridOptionsWrapper.getContext(),\n // these need to be taken out, as part of 'afterAttached' now\n eGridCell: eRow,\n eParentOfValue: eRow,\n pinned: pinned,\n addRenderedRowListener: this.addEventListener.bind(this),\n registerRowDragger: (rowDraggerElement, dragStartPixels, value, suppressVisibilityChange) => this.addFullWidthRowDragging(rowDraggerElement, dragStartPixels, value, suppressVisibilityChange)\n } as ICellRendererParams;\n\n return params;\n }\n\n private addFullWidthRowDragging(\n rowDraggerElement?: HTMLElement,\n dragStartPixels?: number,\n value: string = '',\n suppressVisibilityChange?: boolean\n ): void {\n if (!this.isFullWidth()) { return; }\n\n const rowDragComp = new RowDragComp(() => value, this.rowNode, undefined, rowDraggerElement, dragStartPixels, suppressVisibilityChange);\n this.createManagedBean(rowDragComp, this.beans.context);\n }\n\n private onUiLevelChanged(): void {\n const newLevel = this.beans.rowCssClassCalculator.calculateRowLevel(this.rowNode);\n if (this.rowLevel != newLevel) {\n const classToAdd = 'ag-row-level-' + newLevel;\n const classToRemove = 'ag-row-level-' + this.rowLevel;\n this.allRowGuis.forEach(gui => {\n gui.rowComp.addOrRemoveCssClass(classToAdd, true);\n gui.rowComp.addOrRemoveCssClass(classToRemove, false);\n });\n }\n this.rowLevel = newLevel;\n }\n\n private isFirstRowOnPage(): boolean {\n return this.rowNode.rowIndex === this.beans.paginationProxy.getPageFirstRow();\n }\n\n private isLastRowOnPage(): boolean {\n return this.rowNode.rowIndex === this.beans.paginationProxy.getPageLastRow();\n }\n\n private onModelUpdated(): void {\n this.refreshFirstAndLastRowStyles();\n }\n\n private refreshFirstAndLastRowStyles(): void {\n const newFirst = this.isFirstRowOnPage();\n const newLast = this.isLastRowOnPage();\n\n if (this.firstRowOnPage !== newFirst) {\n this.firstRowOnPage = newFirst;\n this.allRowGuis.forEach(gui => gui.rowComp.addOrRemoveCssClass('ag-row-first', newFirst));\n }\n if (this.lastRowOnPage !== newLast) {\n this.lastRowOnPage = newLast;\n this.allRowGuis.forEach(gui => gui.rowComp.addOrRemoveCssClass('ag-row-last', newLast));\n }\n }\n\n public stopEditing(cancel = false): void {\n const cellEdits = this.getAllCellCtrls().map(cellCtrl => cellCtrl.stopEditing(cancel));\n\n if (!this.editingRow) { return; }\n\n if (!cancel && cellEdits.some(edit => edit)) {\n const event: RowValueChangedEvent = this.createRowEvent(Events.EVENT_ROW_VALUE_CHANGED);\n this.beans.eventService.dispatchEvent(event);\n }\n this.setEditingRow(false);\n }\n\n public setInlineEditingCss(editing: boolean): void {\n this.allRowGuis.forEach(gui => {\n gui.rowComp.addOrRemoveCssClass(\"ag-row-inline-editing\", editing);\n gui.rowComp.addOrRemoveCssClass(\"ag-row-not-inline-editing\", !editing);\n });\n }\n\n private setEditingRow(value: boolean): void {\n this.editingRow = value;\n this.allRowGuis.forEach(gui => gui.rowComp.addOrRemoveCssClass('ag-row-editing', value));\n\n const event: RowEvent = value ?\n this.createRowEvent(Events.EVENT_ROW_EDITING_STARTED) as RowEditingStartedEvent\n : this.createRowEvent(Events.EVENT_ROW_EDITING_STOPPED) as RowEditingStoppedEvent;\n\n this.beans.eventService.dispatchEvent(event);\n }\n\n public startRowEditing(key: string | null = null, charPress: string | null = null, sourceRenderedCell: CellCtrl | null = null, event: KeyboardEvent | null = null): void {\n // don't do it if already editing\n if (this.editingRow) { return; }\n\n this.getAllCellCtrls().forEach(cellCtrl => {\n const cellStartedEdit = cellCtrl === sourceRenderedCell;\n if (cellStartedEdit) {\n cellCtrl.startEditing(key, charPress, cellStartedEdit, event);\n } else {\n cellCtrl.startEditing(null, null, cellStartedEdit, event);\n }\n });\n this.setEditingRow(true);\n }\n\n public getAllCellCtrls(): CellCtrl[] {\n const res = [...this.centerCellCtrls.list, ...this.leftCellCtrls.list, ...this.rightCellCtrls.list];\n return res;\n }\n\n private postProcessClassesFromGridOptions(): void {\n const cssClasses = this.beans.rowCssClassCalculator.processClassesFromGridOptions(this.rowNode);\n if (!cssClasses || !cssClasses.length) { return; }\n\n cssClasses.forEach(classStr => {\n this.allRowGuis.forEach(c => c.rowComp.addOrRemoveCssClass(classStr, true));\n });\n }\n\n private postProcessRowClassRules(): void {\n this.beans.rowCssClassCalculator.processRowClassRules(\n this.rowNode, (className: string) => {\n this.allRowGuis.forEach(gui => gui.rowComp.addOrRemoveCssClass(className, true));\n },\n (className: string) => {\n this.allRowGuis.forEach(gui => gui.rowComp.addOrRemoveCssClass(className, false));\n }\n );\n }\n\n private setStylesFromGridOptions(): void {\n const rowStyles = this.processStylesFromGridOptions();\n this.allRowGuis.forEach(gui => gui.rowComp.setUserStyles(rowStyles));\n }\n\n public getRowBusinessKey(): string | undefined {\n const businessKeyForNodeFunc = this.beans.gridOptionsWrapper.getBusinessKeyForNodeFunc();\n if (typeof businessKeyForNodeFunc !== 'function') { return; }\n\n return businessKeyForNodeFunc(this.rowNode);\n }\n\n private getPinnedForContainer(rowContainerType: RowContainerType): string | null {\n const pinned = rowContainerType === RowContainerType.LEFT ? Constants.PINNED_LEFT :\n rowContainerType === RowContainerType.RIGHT ? Constants.PINNED_RIGHT : null;\n return pinned;\n }\n\n public getInitialRowClasses(rowContainerType: RowContainerType): string[] {\n const pinned = this.getPinnedForContainer(rowContainerType);\n\n const params: RowCssClassCalculatorParams = {\n rowNode: this.rowNode,\n rowFocused: this.rowFocused,\n fadeRowIn: this.fadeRowIn,\n rowIsEven: this.rowNode.rowIndex! % 2 === 0,\n rowLevel: this.rowLevel,\n fullWidthRow: this.isFullWidth(),\n firstRowOnPage: this.isFirstRowOnPage(),\n lastRowOnPage: this.isLastRowOnPage(),\n printLayout: this.printLayout,\n expandable: this.rowNode.isExpandable(),\n pinned: pinned\n };\n return this.beans.rowCssClassCalculator.getInitialRowClasses(params);\n }\n\n public processStylesFromGridOptions(): any {\n // part 1 - rowStyle\n const rowStyle = this.beans.gridOptionsWrapper.getRowStyle();\n\n if (rowStyle && typeof rowStyle === 'function') {\n console.warn('AG Grid: rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead');\n return;\n }\n\n // part 1 - rowStyleFunc\n const rowStyleFunc = this.beans.gridOptionsWrapper.getRowStyleFunc();\n let rowStyleFuncResult: any;\n\n if (rowStyleFunc) {\n const params: WithoutGridCommon = {\n data: this.rowNode.data,\n node: this.rowNode,\n rowIndex: this.rowNode.rowIndex!\n };\n rowStyleFuncResult = rowStyleFunc(params);\n }\n\n return Object.assign({}, rowStyle, rowStyleFuncResult);\n }\n\n private onRowSelected(): void {\n // Treat undefined as false, if we pass undefined down it gets treated as toggle class, rather than explicitly\n // setting the required value\n const selected = !!this.rowNode.isSelected();\n this.allRowGuis.forEach(gui => {\n gui.rowComp.addOrRemoveCssClass('ag-row-selected', selected);\n setAriaSelected(gui.element, selected ? true : undefined);\n\n const ariaLabel = this.createAriaLabel();\n setAriaLabel(gui.element, ariaLabel == null ? '' : ariaLabel);\n });\n }\n\n private createAriaLabel(): string | undefined {\n const selected = this.rowNode.isSelected()!;\n if (selected && this.beans.gridOptionsWrapper.isSuppressRowDeselection()) {\n return undefined;\n }\n\n const translate = this.beans.gridOptionsWrapper.getLocaleTextFunc();\n const label = translate(\n selected ? 'ariaRowDeselect' : 'ariaRowSelect',\n `Press SPACE to ${selected ? 'deselect' : 'select'} this row.`\n );\n\n return label;\n }\n\n public isUseAnimationFrameForCreate(): boolean {\n return this.useAnimationFrameForCreate;\n }\n\n public addHoverFunctionality(eRow: HTMLElement): void {\n // because we use animation frames to do this, it's possible the row no longer exists\n // by the time we get to add it\n if (!this.active) { return; }\n\n // because mouseenter and mouseleave do not propagate, we cannot listen on the gridPanel\n // like we do for all the other mouse events.\n\n // because of the pinning, we cannot simply add / remove the class based on the eRow. we\n // have to check all eRow's (body & pinned). so the trick is if any of the rows gets a\n // mouse hover, it sets such in the rowNode, and then all three reflect the change as\n // all are listening for event on the row node.\n\n // step 1 - add listener, to set flag on row node\n this.addManagedListener(eRow, 'mouseenter', () => this.rowNode.onMouseEnter());\n this.addManagedListener(eRow, 'mouseleave', () => this.rowNode.onMouseLeave());\n\n // step 2 - listen for changes on row node (which any eRow can trigger)\n this.addManagedListener(this.rowNode, RowNode.EVENT_MOUSE_ENTER, () => {\n // if hover turned off, we don't add the class. we do this here so that if the application\n // toggles this property mid way, we remove the hover form the last row, but we stop\n // adding hovers from that point onwards.\n if (!this.beans.gridOptionsWrapper.isSuppressRowHoverHighlight()) {\n eRow.classList.add('ag-row-hover');\n }\n });\n\n this.addManagedListener(this.rowNode, RowNode.EVENT_MOUSE_LEAVE, () => {\n eRow.classList.remove('ag-row-hover');\n });\n }\n\n // for animation, we don't want to animate entry or exit to a very far away pixel,\n // otherwise the row would move so fast, it would appear to disappear. so this method\n // moves the row closer to the viewport if it is far away, so the row slide in / out\n // at a speed the user can see.\n public roundRowTopToBounds(rowTop: number): number {\n const gridBodyCon = this.beans.ctrlsService.getGridBodyCtrl();\n const range = gridBodyCon.getScrollFeature().getVScrollPosition();\n const minPixel = this.applyPaginationOffset(range.top, true) - 100;\n const maxPixel = this.applyPaginationOffset(range.bottom, true) + 100;\n\n return Math.min(Math.max(minPixel, rowTop), maxPixel);\n }\n\n protected getFrameworkOverrides(): IFrameworkOverrides {\n return this.beans.frameworkOverrides;\n }\n\n private onRowHeightChanged(): void {\n // check for exists first - if the user is resetting the row height, then\n // it will be null (or undefined) momentarily until the next time the flatten\n // stage is called where the row will then update again with a new height\n if (this.rowNode.rowHeight == null) { return; }\n\n const rowHeight = this.rowNode.rowHeight;\n\n const defaultRowHeight = this.beans.gridOptionsWrapper.getDefaultRowHeight();\n const isHeightFromFunc = this.beans.gridOptionsWrapper.isGetRowHeightFunction();\n const heightFromFunc = isHeightFromFunc ? this.beans.gridOptionsWrapper.getRowHeightForNode(this.rowNode).height : undefined;\n const lineHeight = heightFromFunc ? `${Math.min(defaultRowHeight, heightFromFunc) - 2}px` : undefined;\n\n this.allRowGuis.forEach(gui => {\n gui.element.style.height = `${rowHeight}px`;\n\n // If the row height is coming from a function, this means some rows can\n // be smaller than the theme had intended. so we set --ag-line-height on\n // the row, which is picked up by the theme CSS and is used in a calc\n // for the CSS line-height property, which makes sure the line-height is\n // not bigger than the row height, otherwise the row text would not fit.\n // We do not use rowNode.rowHeight here, as this could be the result of autoHeight,\n // and we found using the autoHeight result causes a loop, where changing the\n // line-height them impacts the cell height, resulting in a new autoHeight,\n // resulting in a new line-height and so on loop. \n // const heightFromFunc = this.beans.gridOptionsWrapper.getRowHeightForNode(this.rowNode).height;\n if (lineHeight) {\n gui.element.style.setProperty('--ag-line-height', lineHeight);\n }\n });\n }\n\n public addEventListener(eventType: string, listener: Function): void {\n if (eventType === 'renderedRowRemoved' || eventType === 'rowRemoved') {\n eventType = Events.EVENT_VIRTUAL_ROW_REMOVED;\n console.warn('AG Grid: Since version 11, event renderedRowRemoved is now called ' + Events.EVENT_VIRTUAL_ROW_REMOVED);\n }\n super.addEventListener(eventType, listener);\n }\n\n public removeEventListener(eventType: string, listener: Function): void {\n if (eventType === 'renderedRowRemoved' || eventType === 'rowRemoved') {\n eventType = Events.EVENT_VIRTUAL_ROW_REMOVED;\n console.warn('AG Grid: Since version 11, event renderedRowRemoved and rowRemoved is now called ' + Events.EVENT_VIRTUAL_ROW_REMOVED);\n }\n super.removeEventListener(eventType, listener);\n }\n\n // note - this is NOT called by context, as we don't wire / unwire the CellComp for performance reasons.\n public destroyFirstPass(): void {\n this.active = false;\n\n // why do we have this method? shouldn't everything below be added as a destroy func beside\n // the corresponding create logic?\n\n this.setupRemoveAnimation();\n\n const event: VirtualRowRemovedEvent = this.createRowEvent(Events.EVENT_VIRTUAL_ROW_REMOVED);\n\n this.dispatchEvent(event);\n this.beans.eventService.dispatchEvent(event);\n super.destroy();\n }\n\n private setupRemoveAnimation(): void {\n const rowStillVisibleJustNotInViewport = this.rowNode.rowTop != null;\n if (rowStillVisibleJustNotInViewport) {\n // if the row is not rendered, but in viewport, it means it has moved,\n // so we animate the row out. if the new location is very far away,\n // the animation will be so fast the row will look like it's just disappeared,\n // so instead we animate to a position just outside the viewport.\n const rowTop = this.roundRowTopToBounds(this.rowNode.rowTop!);\n this.setRowTop(rowTop);\n } else {\n this.allRowGuis.forEach(gui => gui.rowComp.addOrRemoveCssClass('ag-opacity-zero', true));\n }\n }\n\n public destroySecondPass(): void {\n this.allRowGuis.length = 0;\n\n const destroyCellCtrls = (ctrls: CellCtrlListAndMap): CellCtrlListAndMap => {\n ctrls.list.forEach(c => c.destroy());\n return { list: [], map: {} };\n };\n\n this.centerCellCtrls = destroyCellCtrls(this.centerCellCtrls);\n this.leftCellCtrls = destroyCellCtrls(this.leftCellCtrls);\n this.rightCellCtrls = destroyCellCtrls(this.rightCellCtrls);\n }\n\n private setFocusedClasses(): void {\n this.allRowGuis.forEach(gui => {\n gui.rowComp.addOrRemoveCssClass('ag-row-focus', this.rowFocused);\n gui.rowComp.addOrRemoveCssClass('ag-row-no-focus', !this.rowFocused);\n });\n }\n\n private onCellFocusChanged(): void {\n const rowFocused = this.beans.focusService.isRowFocused(this.rowNode.rowIndex!, this.rowNode.rowPinned);\n\n if (rowFocused !== this.rowFocused) {\n this.rowFocused = rowFocused;\n this.setFocusedClasses();\n }\n\n // if we are editing, then moving the focus out of a row will stop editing\n if (!rowFocused && this.editingRow) {\n this.stopEditing(false);\n }\n }\n\n private onPaginationChanged(): void {\n const currentPage = this.beans.paginationProxy.getCurrentPage();\n // it is possible this row is in the new page, but the page number has changed, which means\n // it needs to reposition itself relative to the new page\n if (this.paginationPage !== currentPage) {\n this.paginationPage = currentPage;\n this.onTopChanged();\n }\n\n this.refreshFirstAndLastRowStyles();\n }\n\n private onTopChanged(): void {\n this.setRowTop(this.rowNode.rowTop!);\n }\n\n private onPaginationPixelOffsetChanged(): void {\n // the pixel offset is used when calculating rowTop to set on the row DIV\n this.onTopChanged();\n }\n\n // applies pagination offset, eg if on second page, and page height is 500px, then removes\n // 500px from the top position, so a row with rowTop 600px is displayed at location 100px.\n // reverse will take the offset away rather than add.\n private applyPaginationOffset(topPx: number, reverse = false): number {\n if (this.rowNode.isRowPinned()) {\n return topPx;\n }\n\n const pixelOffset = this.beans.paginationProxy.getPixelOffset();\n const multiplier = reverse ? 1 : -1;\n\n return topPx + (pixelOffset * multiplier);\n }\n\n public setRowTop(pixels: number): void {\n // print layout uses normal flow layout for row positioning\n if (this.printLayout) { return; }\n\n // need to make sure rowTop is not null, as this can happen if the node was once\n // visible (ie parent group was expanded) but is now not visible\n if (exists(pixels)) {\n const afterPaginationPixels = this.applyPaginationOffset(pixels);\n const afterScalingPixels = this.rowNode.isRowPinned() ? afterPaginationPixels : this.beans.rowContainerHeightService.getRealPixelPosition(afterPaginationPixels);\n const topPx = `${afterScalingPixels}px`;\n this.setRowTopStyle(topPx);\n }\n }\n\n public getInitialRowTop(): string | undefined {\n return this.initialTop;\n }\n\n public getInitialTransform(): string | undefined {\n return this.initialTransform;\n }\n\n private setInitialRowTop() {\n // print layout uses normal flow layout for row positioning\n if (this.printLayout) { return ''; }\n\n // if sliding in, we take the old row top. otherwise we just set the current row top.\n const pixels = this.slideRowIn ? this.roundRowTopToBounds(this.rowNode.oldRowTop!) : this.rowNode.rowTop;\n const afterPaginationPixels = this.applyPaginationOffset(pixels!);\n // we don't apply scaling if row is pinned\n const afterScalingPixels = this.rowNode.isRowPinned() ? afterPaginationPixels : this.beans.rowContainerHeightService.getRealPixelPosition(afterPaginationPixels);\n\n const res = afterScalingPixels + 'px';\n\n const suppressRowTransform = this.beans.gridOptionsWrapper.isSuppressRowTransform();\n if (suppressRowTransform) {\n this.initialTop = res;\n } else {\n this.initialTransform = `translateY(${res})`;\n }\n }\n\n private setRowTopStyle(topPx: string): void {\n const suppressRowTransform = this.beans.gridOptionsWrapper.isSuppressRowTransform();\n this.allRowGuis.forEach(\n gui => suppressRowTransform ?\n gui.rowComp.setTop(topPx) :\n gui.rowComp.setTransform(`translateY(${topPx})`)\n );\n }\n\n public getRowNode(): RowNode {\n return this.rowNode;\n }\n\n public getCellCtrl(column: Column): CellCtrl | null {\n // first up, check for cell directly linked to this column\n let res: CellCtrl | null = null;\n this.getAllCellCtrls().forEach(cellCtrl => {\n if (cellCtrl.getColumn() == column) {\n res = cellCtrl;\n }\n });\n\n if (res != null) { return res; }\n\n // second up, if not found, then check for spanned cols.\n // we do this second (and not at the same time) as this is\n // more expensive, as spanning cols is a\n // infrequently used feature so we don't need to do this most\n // of the time\n this.getAllCellCtrls().forEach(cellCtrl => {\n if (cellCtrl.getColSpanningList().indexOf(column) >= 0) {\n res = cellCtrl;\n }\n });\n\n return res;\n }\n\n private onRowIndexChanged(): void {\n // we only bother updating if the rowIndex is present. if it is not present, it means this row\n // is child of a group node, and the group node was closed, it's the only way to have no row index.\n // when this happens, row is about to be de-rendered, so we don't care, rowComp is about to die!\n if (this.rowNode.rowIndex != null) {\n this.onCellFocusChanged();\n this.updateRowIndexes();\n this.postProcessCss();\n }\n }\n\n private updateRowIndexes(): void {\n const rowIndexStr = this.rowNode.getRowIndexString();\n const headerRowCount = this.beans.headerNavigationService.getHeaderRowCount();\n const rowIsEven = this.rowNode.rowIndex! % 2 === 0;\n const ariaRowIndex = headerRowCount + this.rowNode.rowIndex! + 1;\n\n this.allRowGuis.forEach(c => {\n c.rowComp.setRowIndex(rowIndexStr);\n c.rowComp.addOrRemoveCssClass('ag-row-even', rowIsEven);\n c.rowComp.addOrRemoveCssClass('ag-row-odd', !rowIsEven);\n setAriaRowIndex(c.element, ariaRowIndex);\n });\n }\n\n // returns the pinned left container, either the normal one, or the embedded full with one if exists\n public getPinnedLeftRowElement(): HTMLElement {\n return this.leftGui ? this.leftGui.element : undefined!;\n }\n\n // returns the pinned right container, either the normal one, or the embedded full with one if exists\n public getPinnedRightRowElement(): HTMLElement {\n return this.rightGui ? this.rightGui.element : undefined!;\n }\n\n // returns the body container, either the normal one, or the embedded full with one if exists\n public getBodyRowElement(): HTMLElement {\n return this.centerGui ? this.centerGui.element : undefined!;\n }\n\n // returns the full width container\n public getFullWidthRowElement(): HTMLElement {\n return this.fullWidthGui ? this.fullWidthGui.element : undefined!;\n }\n\n}\n","import { CellCtrl, ICellComp } from \"./cellCtrl\";\nimport { Column } from \"../../entities/column\";\nimport { areEqual, last } from \"../../utils/array\";\nimport { Events } from \"../../eventKeys\";\nimport { missing } from \"../../utils/generic\";\nimport { Constants } from \"../../constants/constants\";\nimport { BeanStub } from \"../../context/beanStub\";\nimport { Beans } from \"../beans\";\nimport { RowNode } from \"../../entities/rowNode\";\n\n/**\n * Takes care of:\n * #) Cell Width (including when doing cell spanning, which makes width cover many columns)\n * #) Cell Height (when doing row span, otherwise we don't touch the height as it's just row height)\n * #) Cell Left (the horizontal positioning of the cell, the vertical positioning is on the row)\n */\nexport class CellPositionFeature extends BeanStub {\n\n private cellCtrl: CellCtrl;\n private eGui: HTMLElement;\n\n private readonly column: Column;\n private readonly rowNode: RowNode;\n\n private colsSpanning: Column[];\n private rowSpan: number;\n\n private beans: Beans;\n\n constructor(ctrl: CellCtrl, beans: Beans) {\n super();\n\n this.cellCtrl = ctrl;\n this.beans = beans;\n\n this.column = ctrl.getColumn();\n this.rowNode = ctrl.getRowNode();\n\n this.setupColSpan();\n this.setupRowSpan();\n }\n\n private setupRowSpan(): void {\n this.rowSpan = this.column.getRowSpan(this.rowNode);\n }\n\n public setComp(eGui: HTMLElement): void {\n this.eGui = eGui;\n this.onLeftChanged();\n this.onWidthChanged();\n this.applyRowSpan();\n }\n\n private onDisplayColumnsChanged(): void {\n const colsSpanning: Column[] = this.getColSpanningList();\n\n if (!areEqual(this.colsSpanning, colsSpanning)) {\n this.colsSpanning = colsSpanning;\n this.onWidthChanged();\n this.onLeftChanged(); // left changes when doing RTL\n }\n }\n\n private setupColSpan(): void {\n // if no col span is active, then we don't set it up, as it would be wasteful of CPU\n if (this.column.getColDef().colSpan == null) { return; }\n\n this.colsSpanning = this.getColSpanningList();\n\n // because we are col spanning, a reorder of the cols can change what cols we are spanning over\n this.addManagedListener(this.beans.eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, this.onDisplayColumnsChanged.bind(this));\n // because we are spanning over multiple cols, we check for width any time any cols width changes.\n // this is expensive - really we should be explicitly checking only the cols we are spanning over\n // instead of every col, however it would be tricky code to track the cols we are spanning over, so\n // because hardly anyone will be using colSpan, am favouring this easier way for more maintainable code.\n this.addManagedListener(this.beans.eventService, Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, this.onWidthChanged.bind(this));\n }\n\n public onWidthChanged(): void {\n if (!this.eGui) { return; }\n const width = this.getCellWidth();\n this.eGui.style.width = `${width}px`;\n }\n\n private getCellWidth(): number {\n if (!this.colsSpanning) {\n return this.column.getActualWidth();\n }\n\n return this.colsSpanning.reduce((width, col) => width + col.getActualWidth(), 0);\n }\n\n public getColSpanningList(): Column[] {\n const colSpan = this.column.getColSpan(this.rowNode);\n const colsSpanning: Column[] = [];\n\n // if just one col, the col span is just the column we are in\n if (colSpan === 1) {\n colsSpanning.push(this.column);\n } else {\n let pointer: Column | null = this.column;\n const pinned = this.column.getPinned();\n for (let i = 0; pointer && i < colSpan; i++) {\n colsSpanning.push(pointer);\n pointer = this.beans.columnModel.getDisplayedColAfter(pointer);\n if (!pointer || missing(pointer)) {\n break;\n }\n // we do not allow col spanning to span outside of pinned areas\n if (pinned !== pointer.getPinned()) {\n break;\n }\n }\n }\n\n return colsSpanning;\n }\n\n public onLeftChanged(): void {\n if (!this.eGui) { return; }\n const left = this.modifyLeftForPrintLayout(this.getCellLeft());\n this.eGui.style.left = left + 'px';\n }\n\n private getCellLeft(): number | null {\n let mostLeftCol: Column;\n\n if (this.beans.gridOptionsWrapper.isEnableRtl() && this.colsSpanning) {\n mostLeftCol = last(this.colsSpanning);\n } else {\n mostLeftCol = this.column;\n }\n\n return mostLeftCol.getLeft();\n }\n\n private modifyLeftForPrintLayout(leftPosition: number | null): number | null {\n if (!this.cellCtrl.isPrintLayout() || this.column.getPinned() === Constants.PINNED_LEFT) {\n return leftPosition;\n }\n\n const leftWidth = this.beans.columnModel.getDisplayedColumnsLeftWidth();\n\n if (this.column.getPinned() === Constants.PINNED_RIGHT) {\n const bodyWidth = this.beans.columnModel.getBodyContainerWidth();\n return leftWidth + bodyWidth + (leftPosition || 0);\n }\n\n // is in body\n return leftWidth + (leftPosition || 0);\n }\n\n private applyRowSpan(): void {\n\n if (this.rowSpan === 1) { return; }\n\n const singleRowHeight = this.beans.gridOptionsWrapper.getRowHeightAsNumber();\n const totalRowHeight = singleRowHeight * this.rowSpan;\n\n this.eGui.style.height = `${totalRowHeight}px`;\n this.eGui.style.zIndex = '1';\n }\n\n // overriding to make public, as we don't dispose this bean via context\n public destroy() {\n super.destroy();\n }\n}","import { BeanStub } from \"../../context/beanStub\";\nimport { CellClassParams } from \"../../entities/colDef\";\nimport { CellCtrl, ICellComp } from \"./cellCtrl\";\nimport { Column } from \"../../entities/column\";\nimport { RowNode } from \"../../entities/rowNode\";\nimport { Beans } from \"../beans\";\nimport { CellStyleFunc, CellStyle } from \"../../entities/colDef\";\n\nexport class CellCustomStyleFeature extends BeanStub {\n\n private readonly cellCtrl: CellCtrl;\n private readonly column: Column;\n private readonly rowNode: RowNode;\n private readonly beans: Beans;\n private staticClasses: string[] = [];\n\n private cellComp: ICellComp;\n\n constructor(ctrl: CellCtrl, beans: Beans) {\n super();\n\n this.cellCtrl = ctrl;\n this.beans = beans;\n\n this.column = ctrl.getColumn();\n this.rowNode = ctrl.getRowNode();\n }\n\n public setComp(comp: ICellComp): void {\n this.cellComp = comp;\n\n this.applyUserStyles();\n this.applyCellClassRules();\n this.applyClassesFromColDef();\n }\n\n public applyCellClassRules(): void {\n const colDef = this.column.getColDef();\n const cellClassParams: CellClassParams = {\n value: this.cellCtrl.getValue(),\n data: this.rowNode.data,\n node: this.rowNode,\n colDef: colDef,\n rowIndex: this.rowNode.rowIndex!,\n api: this.beans.gridOptionsWrapper.getApi()!,\n columnApi: this.beans.gridOptionsWrapper.getColumnApi()!,\n context: this.beans.gridOptionsWrapper.getContext()\n };\n\n this.beans.stylingService.processClassRules(\n colDef.cellClassRules,\n cellClassParams,\n className => this.cellComp.addOrRemoveCssClass(className, true),\n className => this.cellComp.addOrRemoveCssClass(className, false)\n );\n }\n\n public applyUserStyles() {\n const colDef = this.column.getColDef();\n\n if (!colDef.cellStyle) { return; }\n\n let styles: CellStyle | null | undefined;\n\n if (typeof colDef.cellStyle === 'function') {\n const cellStyleParams = {\n column: this.column,\n value: this.cellCtrl.getValue(),\n colDef: colDef,\n data: this.rowNode.data,\n node: this.rowNode,\n rowIndex: this.rowNode.rowIndex!,\n api: this.beans.gridOptionsWrapper.getApi()!,\n columnApi: this.beans.gridOptionsWrapper.getColumnApi()!,\n context: this.beans.gridOptionsWrapper.getContext(),\n } as CellClassParams;\n const cellStyleFunc = colDef.cellStyle as CellStyleFunc;\n styles = cellStyleFunc(cellStyleParams);\n } else {\n styles = colDef.cellStyle;\n }\n\n this.cellComp.setUserStyles(styles);\n }\n\n public applyClassesFromColDef() {\n const colDef = this.column.getColDef();\n const cellClassParams: CellClassParams = {\n value: this.cellCtrl.getValue(),\n data: this.rowNode.data,\n node: this.rowNode,\n colDef: colDef,\n rowIndex: this.rowNode.rowIndex!,\n api: this.beans.gridOptionsWrapper.getApi()!,\n columnApi: this.beans.gridOptionsWrapper.getColumnApi()!,\n context: this.beans.gridOptionsWrapper.getContext()\n };\n\n if (this.staticClasses.length) {\n this.staticClasses.forEach(className => this.cellComp.addOrRemoveCssClass(className, false));\n }\n\n this.staticClasses = this.beans.stylingService.getStaticCellClasses(colDef, cellClassParams);\n\n if (this.staticClasses.length) {\n this.staticClasses.forEach(className => this.cellComp.addOrRemoveCssClass(className, true));\n }\n }\n\n // overriding to make public, as we don't dispose this bean via context\n public destroy() {\n super.destroy();\n }\n}\n","import { BeanStub } from \"../context/beanStub\";\nimport { Column } from \"../entities/column\";\nimport { ColumnGroup } from \"../entities/columnGroup\";\nimport { RowNode } from \"../entities/rowNode\";\nimport { Beans } from \"../rendering/beans\";\nimport { CustomTooltipFeature, TooltipParentComp } from \"./customTooltipFeature\";\nimport { ITooltipParams } from \"../rendering/tooltipComponent\";\nimport { ColDef, ColGroupDef } from \"../entities/colDef\";\nimport { WithoutGridCommon } from \"../interfaces/iCommon\";\n\nexport interface ITooltipFeatureCtrl {\n getTooltipValue(): any;\n getGui(): HTMLElement;\n getLocation(): string;\n\n getColumn?(): Column | ColumnGroup;\n getColDef?(): ColDef | ColGroupDef;\n getRowIndex?(): number;\n getRowNode?(): RowNode;\n\n // this makes no sense, why is the cell formatted value passed to the tooltip???\n getValueFormatted?(): string;\n}\n\nexport interface ITooltipFeatureComp {\n setTitle(title: string | undefined): void;\n}\n\nexport class TooltipFeature extends BeanStub {\n\n private readonly ctrl: ITooltipFeatureCtrl;\n private readonly beans: Beans;\n\n private comp: ITooltipFeatureComp;\n\n private tooltip: any;\n\n private genericTooltipFeature: CustomTooltipFeature;\n private browserTooltips: boolean;\n\n constructor(ctrl: ITooltipFeatureCtrl, beans: Beans) {\n super();\n\n this.ctrl = ctrl;\n this.beans = beans;\n }\n\n public setComp(comp: ITooltipFeatureComp): void {\n this.comp = comp;\n this.setupTooltip();\n }\n\n private setupTooltip(): void {\n this.browserTooltips = this.beans.gridOptionsWrapper.isEnableBrowserTooltips();\n this.updateTooltipText();\n\n if (this.browserTooltips) {\n this.comp.setTitle(this.tooltip != null ? this.tooltip : undefined);\n } else {\n this.createTooltipFeatureIfNeeded();\n }\n }\n\n private updateTooltipText(): void {\n this.tooltip = this.ctrl.getTooltipValue();\n }\n\n private createTooltipFeatureIfNeeded(): void {\n if (this.genericTooltipFeature != null) { return; }\n\n const parent: TooltipParentComp = {\n getTooltipParams: () => this.getTooltipParams(),\n getGui: () => this.ctrl.getGui()\n };\n\n this.genericTooltipFeature = this.createManagedBean(new CustomTooltipFeature(parent), this.beans.context);\n }\n\n public refreshToolTip() {\n this.updateTooltipText();\n\n if (this.browserTooltips) {\n this.comp.setTitle(this.tooltip != null ? this.tooltip : undefined);\n }\n }\n\n public getTooltipParams(): WithoutGridCommon {\n const ctrl = this.ctrl;\n const column = ctrl.getColumn ? ctrl.getColumn() : undefined;\n const colDef = ctrl.getColDef ? ctrl.getColDef() : undefined;\n const rowNode = ctrl.getRowNode ? ctrl.getRowNode() : undefined;\n\n return {\n location: ctrl.getLocation(), //'cell',\n colDef: colDef,\n column: column,\n rowIndex: ctrl.getRowIndex ? ctrl.getRowIndex() : undefined,\n node: rowNode,\n data: rowNode ? rowNode.data : undefined,\n value: this.getTooltipText(),\n valueFormatted: ctrl.getValueFormatted ? ctrl.getValueFormatted() : undefined,\n };\n\n }\n\n private getTooltipText() {\n return this.tooltip;\n }\n\n // overriding to make public, as we don't dispose this bean via context\n public destroy() {\n super.destroy();\n }\n}","import { Autowired, Bean, Context, Optional, PostConstruct } from \"../context/context\";\nimport { ColumnApi } from \"../columns/columnApi\";\nimport { ColumnModel } from \"../columns/columnModel\";\nimport { HeaderNavigationService } from \"../headerRendering/common/headerNavigationService\";\nimport { GridApi } from \"../gridApi\";\nimport { GridOptionsWrapper } from \"../gridOptionsWrapper\";\nimport { ExpressionService } from \"../valueService/expressionService\";\nimport { RowRenderer } from \"./rowRenderer\";\nimport { TemplateService } from \"../templateService\";\nimport { ValueService } from \"../valueService/valueService\";\nimport { EventService } from \"../eventService\";\nimport { ColumnAnimationService } from \"./columnAnimationService\";\nimport { IRangeService, ISelectionHandleFactory } from \"../interfaces/IRangeService\";\nimport { FocusService } from \"../focusService\";\nimport { IContextMenuFactory } from \"../interfaces/iContextMenuFactory\";\nimport { PopupService } from \"../widgets/popupService\";\nimport { ValueFormatterService } from \"./valueFormatterService\";\nimport { StylingService } from \"../styling/stylingService\";\nimport { ColumnHoverService } from \"./columnHoverService\";\nimport { PaginationProxy } from \"../pagination/paginationProxy\";\nimport { AnimationFrameService } from \"../misc/animationFrameService\";\nimport { UserComponentFactory } from \"../components/framework/userComponentFactory\";\nimport { DragAndDropService } from \"../dragAndDrop/dragAndDropService\";\nimport { SortController } from \"../sortController\";\nimport { FilterManager } from \"../filter/filterManager\";\nimport { RowContainerHeightService } from \"./rowContainerHeightService\";\nimport { IFrameworkOverrides } from \"../interfaces/iFrameworkOverrides\";\nimport { CellPositionUtils } from \"../entities/cellPosition\";\nimport { RowPositionUtils } from \"../entities/rowPosition\";\nimport { SelectionService } from \"../selectionService\";\nimport { RowCssClassCalculator } from \"./row/rowCssClassCalculator\";\nimport { IRowModel } from \"../interfaces/iRowModel\";\nimport { IClientSideRowModel } from \"../interfaces/iClientSideRowModel\";\nimport { IServerSideRowModel } from \"../interfaces/iServerSideRowModel\";\nimport { ResizeObserverService } from \"../misc/resizeObserverService\";\nimport { CtrlsService } from \"../ctrlsService\";\nimport { NavigationService } from \"../gridBodyComp/navigationService\";\nimport { AgStackComponentsRegistry } from \"../components/agStackComponentsRegistry\";\nimport { CtrlsFactory } from \"../ctrlsFactory\";\nimport { UserComponentRegistry } from \"../components/framework/userComponentRegistry\";\nimport { ValueCache } from \"../valueService/valueCache\";\nimport { RowNodeEventThrottle } from \"../entities/rowNodeEventThrottle\";\n\n/** Using the IoC has a slight performance consideration, which is no problem most of the\n * time, unless we are trashing objects - which is the case when scrolling and rowComp\n * and cellComp. So for performance reasons, RowComp and CellComp do not get autowired\n * with the IoC. Instead they get passed this object which is all the beans the RowComp\n * and CellComp need. Not autowiring all the cells gives performance improvement. */\n@Bean('beans')\nexport class Beans {\n\n @Autowired('resizeObserverService') public resizeObserverService: ResizeObserverService;\n @Autowired('paginationProxy') public paginationProxy: PaginationProxy;\n @Autowired('context') public context: Context;\n @Autowired('columnApi') public columnApi: ColumnApi;\n @Autowired('gridApi') public gridApi: GridApi;\n @Autowired('gridOptionsWrapper') public gridOptionsWrapper: GridOptionsWrapper;\n @Autowired('expressionService') public expressionService: ExpressionService;\n @Autowired('rowRenderer') public rowRenderer: RowRenderer;\n @Autowired('templateService') public templateService: TemplateService;\n @Autowired('valueService') public valueService: ValueService;\n @Autowired('eventService') public eventService: EventService;\n @Autowired('columnModel') public columnModel: ColumnModel;\n @Autowired('headerNavigationService') public headerNavigationService: HeaderNavigationService;\n @Autowired('navigationService') public navigationService: NavigationService;\n @Autowired('columnAnimationService') public columnAnimationService: ColumnAnimationService;\n @Optional('rangeService') public rangeService: IRangeService;\n @Autowired('focusService') public focusService: FocusService;\n @Optional('contextMenuFactory') public contextMenuFactory: IContextMenuFactory;\n @Autowired('popupService') public popupService: PopupService;\n @Autowired('valueFormatterService') public valueFormatterService: ValueFormatterService;\n @Autowired('stylingService') public stylingService: StylingService;\n @Autowired('columnHoverService') public columnHoverService: ColumnHoverService;\n @Autowired('userComponentFactory') public userComponentFactory: UserComponentFactory;\n @Autowired('userComponentRegistry') public userComponentRegistry: UserComponentRegistry;\n @Autowired('animationFrameService') public animationFrameService: AnimationFrameService;\n @Autowired('dragAndDropService') public dragAndDropService: DragAndDropService;\n @Autowired('sortController') public sortController: SortController;\n @Autowired('filterManager') public filterManager: FilterManager;\n @Autowired('rowContainerHeightService') public rowContainerHeightService: RowContainerHeightService;\n @Autowired('frameworkOverrides') public frameworkOverrides: IFrameworkOverrides;\n @Autowired('cellPositionUtils') public cellPositionUtils: CellPositionUtils;\n @Autowired('rowPositionUtils') public rowPositionUtils: RowPositionUtils;\n @Autowired('selectionService') public selectionService: SelectionService;\n @Optional('selectionHandleFactory') public selectionHandleFactory: ISelectionHandleFactory;\n @Autowired('rowCssClassCalculator') public rowCssClassCalculator: RowCssClassCalculator;\n @Autowired('rowModel') public rowModel: IRowModel;\n @Autowired('ctrlsService') public ctrlsService: CtrlsService;\n @Autowired('ctrlsFactory') public ctrlsFactory: CtrlsFactory;\n @Autowired('agStackComponentsRegistry') public agStackComponentsRegistry: AgStackComponentsRegistry;\n @Autowired('valueCache') public valueCache: ValueCache;\n @Autowired('rowNodeEventThrottle') public rowNodeEventThrottle: RowNodeEventThrottle;\n\n public doingMasterDetail: boolean;\n\n public clientSideRowModel: IClientSideRowModel;\n public serverSideRowModel: IServerSideRowModel;\n\n @PostConstruct\n private postConstruct(): void {\n this.doingMasterDetail = this.gridOptionsWrapper.isMasterDetail();\n\n if (this.gridOptionsWrapper.isRowModelDefault()) {\n this.clientSideRowModel = this.rowModel as IClientSideRowModel;\n }\n if (this.gridOptionsWrapper.isRowModelServerSide()) {\n this.serverSideRowModel = this.rowModel as IServerSideRowModel;\n }\n }\n}\n","import { Column } from \"../../entities/column\";\nimport { CellClickedEvent, CellDoubleClickedEvent, CellMouseOutEvent, CellMouseOverEvent, Events } from \"../../events\";\nimport { isBrowserEdge, isIOSUserAgent } from \"../../utils/browser\";\nimport { isElementChildOfClass, isFocusableFormField } from \"../../utils/dom\";\nimport { isEventSupported, isStopPropagationForAgGrid } from \"../../utils/event\";\nimport { Beans } from \"../beans\";\nimport { CellCtrl } from \"./cellCtrl\";\n\nexport class CellMouseListenerFeature extends Beans {\n\n private readonly cellCtrl: CellCtrl;\n private readonly beans: Beans;\n private readonly column: Column;\n\n private lastIPadMouseClickEvent: number;\n\n constructor(ctrl: CellCtrl, beans: Beans, column: Column) {\n super();\n this.cellCtrl = ctrl;\n this.beans = beans;\n this.column = column;\n }\n\n public onMouseEvent(eventName: string, mouseEvent: MouseEvent): void {\n if (isStopPropagationForAgGrid(mouseEvent)) { return; }\n\n switch (eventName) {\n case 'click':\n this.onCellClicked(mouseEvent);\n break;\n case 'mousedown':\n case 'touchstart':\n this.onMouseDown(mouseEvent);\n break;\n case 'dblclick':\n this.onCellDoubleClicked(mouseEvent);\n break;\n case 'mouseout':\n this.onMouseOut(mouseEvent);\n break;\n case 'mouseover':\n this.onMouseOver(mouseEvent);\n break;\n }\n }\n\n private onCellClicked(mouseEvent: MouseEvent): void {\n // iPad doesn't have double click - so we need to mimic it to enable editing for iPad.\n if (this.isDoubleClickOnIPad()) {\n this.onCellDoubleClicked(mouseEvent);\n mouseEvent.preventDefault(); // if we don't do this, then iPad zooms in\n\n return;\n }\n\n const { eventService, gridOptionsWrapper } = this.beans;\n\n const cellClickedEvent: CellClickedEvent = this.cellCtrl.createEvent(mouseEvent, Events.EVENT_CELL_CLICKED);\n eventService.dispatchEvent(cellClickedEvent);\n\n const colDef = this.column.getColDef();\n\n if (colDef.onCellClicked) {\n // to make callback async, do in a timeout\n window.setTimeout(() => colDef.onCellClicked!(cellClickedEvent), 0);\n }\n\n const editOnSingleClick = (gridOptionsWrapper.isSingleClickEdit() || colDef.singleClickEdit)\n && !gridOptionsWrapper.isSuppressClickEdit();\n\n if (editOnSingleClick) {\n this.cellCtrl.startRowOrCellEdit();\n }\n }\n\n // returns true if on iPad and this is second 'click' event in 200ms\n private isDoubleClickOnIPad(): boolean {\n if (!isIOSUserAgent() || isEventSupported('dblclick')) { return false; }\n\n const nowMillis = new Date().getTime();\n const res = nowMillis - this.lastIPadMouseClickEvent < 200;\n this.lastIPadMouseClickEvent = nowMillis;\n\n return res;\n }\n\n private onCellDoubleClicked(mouseEvent: MouseEvent) {\n const colDef = this.column.getColDef();\n // always dispatch event to eventService\n const cellDoubleClickedEvent: CellDoubleClickedEvent = this.cellCtrl.createEvent(mouseEvent, Events.EVENT_CELL_DOUBLE_CLICKED);\n this.beans.eventService.dispatchEvent(cellDoubleClickedEvent);\n\n // check if colDef also wants to handle event\n if (typeof colDef.onCellDoubleClicked === 'function') {\n // to make the callback async, do in a timeout\n window.setTimeout(() => (colDef.onCellDoubleClicked as any)(cellDoubleClickedEvent), 0);\n }\n\n const editOnDoubleClick = !this.beans.gridOptionsWrapper.isSingleClickEdit()\n && !this.beans.gridOptionsWrapper.isSuppressClickEdit();\n if (editOnDoubleClick) {\n this.cellCtrl.startRowOrCellEdit(null, null, mouseEvent);\n }\n }\n\n private onMouseDown(mouseEvent: MouseEvent): void {\n const { ctrlKey, metaKey, shiftKey } = mouseEvent;\n const target = mouseEvent.target as HTMLElement;\n const { eventService, rangeService } = this.beans;\n\n // do not change the range for right-clicks inside an existing range\n if (this.isRightClickInExistingRange(mouseEvent)) {\n return;\n }\n\n const ranges = rangeService && rangeService.getCellRanges().length != 0;\n\n if (!shiftKey || !ranges) {\n // We only need to pass true to focusCell when the browser is IE/Edge and we are trying\n // to focus the cell itself. This should never be true if the mousedown was triggered\n // due to a click on a cell editor for example.\n const forceBrowserFocus = (isBrowserEdge()) && !this.cellCtrl.isEditing() && !isFocusableFormField(target);\n\n this.cellCtrl.focusCell(forceBrowserFocus);\n }\n\n // if shift clicking, and a range exists, we keep the focus on the cell that started the\n // range as the user then changes the range selection.\n if (shiftKey && ranges) {\n // this stops the cell from getting focused\n mouseEvent.preventDefault();\n }\n\n // if we are clicking on a checkbox, we need to make sure the cell wrapping that checkbox\n // is focused but we don't want to change the range selection, so return here.\n if (this.containsWidget(target)) { return; }\n\n if (rangeService) {\n const thisCell = this.cellCtrl.getCellPosition();\n\n if (shiftKey) {\n rangeService.extendLatestRangeToCell(thisCell);\n } else {\n const ctrlKeyPressed = ctrlKey || metaKey;\n rangeService.setRangeToCell(thisCell, ctrlKeyPressed);\n }\n }\n\n eventService.dispatchEvent(this.cellCtrl.createEvent(mouseEvent, Events.EVENT_CELL_MOUSE_DOWN));\n }\n\n private isRightClickInExistingRange(mouseEvent: MouseEvent): boolean {\n const { rangeService } = this.beans;\n\n if (rangeService) {\n const cellInRange = rangeService.isCellInAnyRange(this.cellCtrl.getCellPosition());\n\n if (cellInRange && mouseEvent.button === 2) {\n return true;\n }\n }\n\n return false;\n }\n\n private containsWidget(target: HTMLElement): boolean {\n return isElementChildOfClass(target, 'ag-selection-checkbox', 3);\n }\n\n private onMouseOut(mouseEvent: MouseEvent): void {\n if (this.mouseStayingInsideCell(mouseEvent)) { return; }\n const cellMouseOutEvent: CellMouseOutEvent = this.cellCtrl.createEvent(mouseEvent, Events.EVENT_CELL_MOUSE_OUT);\n this.beans.eventService.dispatchEvent(cellMouseOutEvent);\n this.beans.columnHoverService.clearMouseOver();\n }\n\n private onMouseOver(mouseEvent: MouseEvent): void {\n if (this.mouseStayingInsideCell(mouseEvent)) { return; }\n const cellMouseOverEvent: CellMouseOverEvent = this.cellCtrl.createEvent(mouseEvent, Events.EVENT_CELL_MOUSE_OVER);\n this.beans.eventService.dispatchEvent(cellMouseOverEvent);\n this.beans.columnHoverService.setMouseOver([this.column]);\n }\n\n private mouseStayingInsideCell(e: MouseEvent): boolean {\n if (!e.target || !e.relatedTarget) { return false; }\n const eGui = this.cellCtrl.getGui();\n const cellContainsTarget = eGui.contains(e.target as Node);\n const cellContainsRelatedTarget = eGui.contains(e.relatedTarget as Node);\n return cellContainsTarget && cellContainsRelatedTarget;\n }\n\n public destroy(): void {\n }\n}","import { BeanStub } from \"../../context/beanStub\";\nimport { CellCtrl } from \"./cellCtrl\";\nimport { Beans } from \"../beans\";\nimport { Column } from \"../../entities/column\";\nimport { RowNode } from \"../../entities/rowNode\";\nimport { KeyCode } from \"../../constants/keyCode\";\nimport { RowCtrl } from \"../row/rowCtrl\";\nimport { isEventFromPrintableCharacter } from \"../../utils/keyboard\";\n\nexport class CellKeyboardListenerFeature extends BeanStub {\n\n private readonly cellCtrl: CellCtrl;\n private readonly beans: Beans;\n private readonly rowNode: RowNode;\n private readonly rowCtrl: RowCtrl;\n\n private eGui: HTMLElement;\n\n constructor(ctrl: CellCtrl, beans: Beans, column: Column, rowNode: RowNode, rowCtrl: RowCtrl) {\n super();\n this.cellCtrl = ctrl;\n this.beans = beans;\n this.rowNode = rowNode;\n this.rowCtrl = rowCtrl;\n }\n\n public setComp(eGui: HTMLElement): void {\n this.eGui = eGui;\n }\n\n public onKeyDown(event: KeyboardEvent): void {\n const key = event.key;\n\n switch (key) {\n case KeyCode.ENTER:\n this.onEnterKeyDown(event);\n break;\n case KeyCode.F2:\n this.onF2KeyDown(event);\n break;\n case KeyCode.ESCAPE:\n this.onEscapeKeyDown(event);\n break;\n case KeyCode.TAB:\n this.onTabKeyDown(event);\n break;\n case KeyCode.BACKSPACE:\n case KeyCode.DELETE:\n this.onBackspaceOrDeleteKeyPressed(key, event);\n break;\n case KeyCode.DOWN:\n case KeyCode.UP:\n case KeyCode.RIGHT:\n case KeyCode.LEFT:\n this.onNavigationKeyPressed(event, key);\n break;\n }\n }\n\n private onNavigationKeyPressed(event: KeyboardEvent, key: string): void {\n if (this.cellCtrl.isEditing()) { return; }\n\n if (event.shiftKey && this.cellCtrl.isRangeSelectionEnabled()) {\n this.onShiftRangeSelect(event);\n } else {\n this.beans.navigationService.navigateToNextCell(event, key, this.cellCtrl.getCellPosition(), true);\n }\n\n // if we don't prevent default, the grid will scroll with the navigation keys\n event.preventDefault();\n }\n\n private onShiftRangeSelect(event: KeyboardEvent): void {\n if (!this.beans.rangeService) { return; }\n\n const endCell = this.beans.rangeService.extendLatestRangeInDirection(event);\n\n if (endCell) {\n this.beans.navigationService.ensureCellVisible(endCell);\n }\n }\n\n private onTabKeyDown(event: KeyboardEvent): void {\n this.beans.navigationService.onTabKeyDown(this.cellCtrl, event);\n }\n\n private onBackspaceOrDeleteKeyPressed(key: string, event: KeyboardEvent): void {\n if (!this.cellCtrl.isEditing()) {\n this.cellCtrl.startRowOrCellEdit(key, undefined, event);\n }\n }\n\n private onEnterKeyDown(e: KeyboardEvent): void {\n if (this.cellCtrl.isEditing() || this.rowCtrl.isEditing()) {\n this.cellCtrl.stopEditingAndFocus();\n } else {\n if (this.beans.gridOptionsWrapper.isEnterMovesDown()) {\n this.beans.navigationService.navigateToNextCell(null, KeyCode.DOWN, this.cellCtrl.getCellPosition(), false);\n } else {\n this.cellCtrl.startRowOrCellEdit(KeyCode.ENTER, undefined, e);\n if (this.cellCtrl.isEditing()) {\n // if we started editing, then we need to prevent default, otherwise the Enter action can get\n // applied to the cell editor. this happened, for example, with largeTextCellEditor where not\n // preventing default results in a 'new line' character getting inserted in the text area\n // when the editing was started\n e.preventDefault();\n }\n }\n }\n }\n\n private onF2KeyDown(event: KeyboardEvent): void {\n if (!this.cellCtrl.isEditing()) {\n this.cellCtrl.startRowOrCellEdit(KeyCode.F2, undefined, event);\n }\n }\n\n private onEscapeKeyDown(event: KeyboardEvent): void {\n if (this.cellCtrl.isEditing()) {\n this.cellCtrl.stopRowOrCellEdit(true);\n this.cellCtrl.focusCell(true);\n }\n }\n\n public onKeyPress(event: KeyboardEvent): void {\n // check this, in case focus is on a (for example) a text field inside the cell,\n // in which cse we should not be listening for these key pressed\n const eventTarget = event.target;\n const eventOnChildComponent = eventTarget !== this.eGui;\n\n if (eventOnChildComponent || this.cellCtrl.isEditing()) { return; }\n\n const pressedChar = String.fromCharCode(event.charCode);\n if (pressedChar === ' ') {\n this.onSpaceKeyPressed(event);\n } else if (isEventFromPrintableCharacter(event)) {\n this.cellCtrl.startRowOrCellEdit(null, pressedChar, event);\n // if we don't prevent default, then the keypress also gets applied to the text field\n // (at least when doing the default editor), but we need to allow the editor to decide\n // what it wants to do. we only do this IF editing was started - otherwise it messes\n // up when the use is not doing editing, but using rendering with text fields in cellRenderer\n // (as it would block the the user from typing into text fields).\n event.preventDefault();\n }\n }\n\n private onSpaceKeyPressed(event: KeyboardEvent): void {\n const { gridOptionsWrapper } = this.beans;\n\n if (!this.cellCtrl.isEditing() && gridOptionsWrapper.isRowSelection()) {\n const currentSelection = this.rowNode.isSelected();\n const newSelection = !currentSelection;\n if (newSelection || !gridOptionsWrapper.isSuppressRowDeselection()) {\n const groupSelectsFiltered = this.beans.gridOptionsWrapper.isGroupSelectsFiltered();\n const updatedCount = this.rowNode.setSelectedParams({\n newValue: newSelection,\n rangeSelect: event.shiftKey,\n groupSelectsFiltered: groupSelectsFiltered\n });\n if (currentSelection === undefined && updatedCount === 0) {\n this.rowNode.setSelectedParams({\n newValue: false,\n rangeSelect: event.shiftKey,\n groupSelectsFiltered: groupSelectsFiltered\n });\n }\n }\n }\n\n // prevent default as space key, by default, moves browser scroll down\n event.preventDefault();\n }\n\n public destroy(): void {\n }\n\n}\n","import { Component } from \"../widgets/component\";\nimport { PostConstruct } from \"../context/context\";\nimport { RowNode } from \"../entities/rowNode\";\nimport { Beans } from \"./beans\";\nimport { Column } from \"../entities/column\";\nimport { createIconNoSpan } from \"../utils/icon\";\nimport { DndSourceOnRowDragParams } from \"../entities/colDef\";\n\nexport class DndSourceComp extends Component {\n\n private readonly beans: Beans;\n\n private readonly rowNode: RowNode;\n private readonly column: Column;\n private readonly eCell: HTMLElement;\n\n constructor(rowNode: RowNode, column: Column, beans: Beans, eCell: HTMLElement) {\n super(`

`);\n this.rowNode = rowNode;\n this.column = column;\n this.beans = beans;\n this.eCell = eCell;\n }\n\n @PostConstruct\n private postConstruct(): void {\n const eGui = this.getGui();\n eGui.appendChild(createIconNoSpan('rowDrag', this.beans.gridOptionsWrapper, null)!);\n // we need to stop the event propagation here to avoid starting a range selection while dragging\n this.addGuiEventListener('mousedown', (e: MouseEvent) => {\n e.stopPropagation();\n });\n this.addDragSource();\n this.checkVisibility();\n }\n\n private addDragSource(): void {\n this.addGuiEventListener('dragstart', this.onDragStart.bind(this));\n }\n\n private onDragStart(dragEvent: DragEvent): void {\n\n const providedOnRowDrag = this.column.getColDef().dndSourceOnRowDrag;\n\n dragEvent.dataTransfer!.setDragImage(this.eCell, 0, 0);\n\n // default behaviour is to convert data to json and set into drag component\n const defaultOnRowDrag = () => {\n try {\n const jsonData = JSON.stringify(this.rowNode.data);\n\n dragEvent.dataTransfer!.setData('application/json', jsonData);\n dragEvent.dataTransfer!.setData('text/plain', jsonData);\n\n } catch (e) {\n // if we cannot convert the data to json, then we do not set the type\n }\n };\n\n if (providedOnRowDrag) {\n const params: DndSourceOnRowDragParams = {\n rowNode: this.rowNode, dragEvent: dragEvent,\n api: this.gridOptionsWrapper.getApi()!,\n columnApi: this.gridOptionsWrapper.getColumnApi()!,\n context: this.gridOptionsWrapper.getContext()\n }\n providedOnRowDrag(params);\n } else {\n defaultOnRowDrag();\n }\n }\n\n private checkVisibility(): void {\n const visible = this.column.isDndSource(this.rowNode);\n this.setDisplayed(visible);\n }\n}\n","import { Beans } from \"./../beans\";\nimport { Column } from \"../../entities/column\";\nimport { NewValueParams } from \"../../entities/colDef\";\nimport { CellChangedEvent, RowNode } from \"../../entities/rowNode\";\nimport { CellPosition } from \"../../entities/cellPosition\";\nimport {\n CellContextMenuEvent,\n CellEditingStartedEvent,\n CellEvent,\n CellFocusedEvent,\n Events,\n FlashCellsEvent,\n CellEditRequestEvent\n} from \"../../events\";\nimport { GridOptionsWrapper } from \"../../gridOptionsWrapper\";\nimport { CellRangeFeature } from \"./cellRangeFeature\";\nimport { exists, makeNull } from \"../../utils/generic\";\nimport { BeanStub } from \"../../context/beanStub\";\nimport { CellPositionFeature } from \"./cellPositionFeature\";\nimport { escapeString } from \"../../utils/string\";\nimport { CellCustomStyleFeature } from \"./cellCustomStyleFeature\";\nimport { TooltipFeature, ITooltipFeatureCtrl } from \"../../widgets/tooltipFeature\";\nimport { RowPosition } from \"../../entities/rowPosition\";\nimport { RowCtrl } from \"../row/rowCtrl\";\nimport { CellMouseListenerFeature } from \"./cellMouseListenerFeature\";\nimport { CellKeyboardListenerFeature } from \"./cellKeyboardListenerFeature\";\nimport { ICellRenderer, ICellRendererParams } from \"../cellRenderers/iCellRenderer\";\nimport { ICellEditor, ICellEditorParams } from \"../../interfaces/iCellEditor\";\nimport { KeyCode } from \"../../constants/keyCode\";\nimport { UserCompDetails } from \"../../components/framework/userComponentFactory\";\nimport { CheckboxSelectionComponent } from \"../checkboxSelectionComponent\";\nimport { DndSourceComp } from \"../dndSourceComp\";\nimport { doOnce } from \"../../utils/function\";\nimport { RowDragComp } from \"../row/rowDragComp\";\nimport { getValueUsingField } from \"../../utils/object\";\nimport { getElementSize } from \"../../utils/dom\";\nimport { setAriaColIndex } from \"../../utils/aria\";\n\nconst CSS_CELL = 'ag-cell';\nconst CSS_AUTO_HEIGHT = 'ag-cell-auto-height';\nconst CSS_NORMAL_HEIGHT = 'ag-cell-normal-height';\nconst CSS_CELL_FOCUS = 'ag-cell-focus';\nconst CSS_CELL_FIRST_RIGHT_PINNED = 'ag-cell-first-right-pinned';\nconst CSS_CELL_LAST_LEFT_PINNED = 'ag-cell-last-left-pinned';\nconst CSS_CELL_NOT_INLINE_EDITING = 'ag-cell-not-inline-editing';\nconst CSS_CELL_INLINE_EDITING = 'ag-cell-inline-editing';\nconst CSS_CELL_POPUP_EDITING = 'ag-cell-popup-editing';\nconst CSS_COLUMN_HOVER = 'ag-column-hover';\nconst CSS_CELL_WRAP_TEXT = 'ag-cell-wrap-text';\n\nexport interface ICellComp {\n addOrRemoveCssClass(cssClassName: string, on: boolean): void;\n setUserStyles(styles: any): void;\n getFocusableElement(): HTMLElement;\n\n setTabIndex(tabIndex: number): void;\n setRole(role: string): void;\n setColId(colId: string): void;\n setTitle(title: string | undefined): void;\n\n setIncludeSelection(include: boolean): void;\n setIncludeRowDrag(include: boolean): void;\n setIncludeDndSource(include: boolean): void;\n\n getCellEditor(): ICellEditor | null;\n getCellRenderer(): ICellRenderer | null;\n getParentOfValue(): HTMLElement | null;\n\n setRenderDetails(compDetails: UserCompDetails | undefined, valueToDisplay: any, forceNewCellRendererInstance: boolean): void;\n setEditDetails(compDetails?: UserCompDetails, popup?: boolean, position?: string): void;\n}\n\nlet instanceIdSequence = 0;\n\nexport class CellCtrl extends BeanStub {\n\n public static DOM_DATA_KEY_CELL_CTRL = 'cellCtrl';\n\n private instanceId: string;\n\n private eGui: HTMLElement;\n private eCellWrapper: HTMLElement | undefined;\n private cellComp: ICellComp;\n private beans: Beans;\n private gow: GridOptionsWrapper;\n private column: Column;\n private rowNode: RowNode;\n private rowCtrl: RowCtrl;\n\n private printLayout: boolean;\n\n private value: any;\n private valueFormatted: any;\n\n private cellRangeFeature: CellRangeFeature;\n private cellPositionFeature: CellPositionFeature;\n private cellCustomStyleFeature: CellCustomStyleFeature;\n private tooltipFeature: TooltipFeature;\n private cellMouseListenerFeature: CellMouseListenerFeature;\n private cellKeyboardListenerFeature: CellKeyboardListenerFeature;\n\n private cellPosition: CellPosition;\n\n private editing: boolean;\n private editingInPopup: boolean;\n\n private includeSelection: boolean;\n private includeDndSource: boolean;\n private includeRowDrag: boolean;\n\n private suppressRefreshCell = false;\n\n // this comp used only for custom row drag handle (ie when user calls params.registerRowDragger)\n private customRowDragComp: RowDragComp;\n\n constructor(column: Column, rowNode: RowNode, beans: Beans, rowCtrl: RowCtrl) {\n super();\n this.column = column;\n this.rowNode = rowNode;\n this.beans = beans;\n this.rowCtrl = rowCtrl;\n\n // unique id to this instance, including the column ID to help with debugging in React as it's used in 'key'\n this.instanceId = column.getId() + '-' + instanceIdSequence++;\n\n this.createCellPosition();\n this.addFeatures();\n }\n\n private addFeatures(): void {\n this.cellPositionFeature = new CellPositionFeature(this, this.beans);\n this.addDestroyFunc(() => this.cellPositionFeature.destroy());\n\n this.cellCustomStyleFeature = new CellCustomStyleFeature(this, this.beans);\n this.addDestroyFunc(() => this.cellCustomStyleFeature.destroy());\n\n this.cellMouseListenerFeature = new CellMouseListenerFeature(this, this.beans, this.column);\n this.addDestroyFunc(() => this.cellMouseListenerFeature.destroy());\n\n this.cellKeyboardListenerFeature = new CellKeyboardListenerFeature(this, this.beans, this.column, this.rowNode, this.rowCtrl);\n this.addDestroyFunc(() => this.cellKeyboardListenerFeature.destroy());\n\n const rangeSelectionEnabled = this.beans.rangeService && this.beans.gridOptionsWrapper.isEnableRangeSelection();\n if (rangeSelectionEnabled) {\n this.cellRangeFeature = new CellRangeFeature(this.beans, this);\n this.addDestroyFunc(() => this.cellRangeFeature.destroy());\n }\n\n this.addTooltipFeature();\n }\n\n private addTooltipFeature(): void {\n const getTooltipValue = () => {\n const colDef = this.column.getColDef();\n const data = this.rowNode.data;\n\n if (colDef.tooltipField && exists(data)) {\n return getValueUsingField(data, colDef.tooltipField, this.column.isTooltipFieldContainsDots());\n }\n\n const valueGetter = colDef.tooltipValueGetter;\n\n if (valueGetter) {\n return valueGetter({\n location: 'cell',\n api: this.beans.gridOptionsWrapper.getApi()!,\n columnApi: this.beans.gridOptionsWrapper.getColumnApi()!,\n context: this.beans.gridOptionsWrapper.getContext(),\n colDef: this.column.getColDef(),\n column: this.column,\n rowIndex: this.cellPosition.rowIndex,\n node: this.rowNode,\n data: this.rowNode.data,\n value: this.value,\n valueFormatted: this.valueFormatted,\n });\n }\n\n return null;\n };\n\n const tooltipCtrl: ITooltipFeatureCtrl = {\n getColumn: () => this.column,\n getColDef: () => this.column.getColDef(),\n getRowIndex: () => this.cellPosition.rowIndex,\n getRowNode: () => this.rowNode,\n getGui: () => this.getGui(),\n getLocation: () => 'cell',\n getTooltipValue: getTooltipValue,\n\n // this makes no sense, why is the cell formatted value passed to the tooltip???\n getValueFormatted: () => this.valueFormatted\n };\n\n this.tooltipFeature = new TooltipFeature(tooltipCtrl, this.beans);\n this.addDestroyFunc(() => this.tooltipFeature.destroy());\n }\n\n public setComp(\n comp: ICellComp,\n eGui: HTMLElement,\n eCellWrapper: HTMLElement | undefined,\n printLayout: boolean,\n startEditing: boolean\n ): void {\n this.cellComp = comp;\n this.gow = this.beans.gridOptionsWrapper;\n this.eGui = eGui;\n this.eCellWrapper = eCellWrapper;\n this.printLayout = printLayout;\n\n // we force to make sure formatter gets called at least once,\n // even if value has not changed (is is undefined)\n this.updateAndFormatValue(true);\n\n this.addDomData();\n\n this.onCellFocused();\n this.applyStaticCssClasses();\n this.setWrapText();\n\n this.onFirstRightPinnedChanged();\n this.onLastLeftPinnedChanged();\n this.onColumnHover();\n this.setupControlComps();\n this.setupAutoHeight();\n this.setAriaColIndex();\n\n if (!this.gow.isSuppressCellFocus()) {\n this.cellComp.setTabIndex(-1);\n }\n\n const colIdSanitised = escapeString(this.column.getId());\n this.cellComp.setColId(colIdSanitised!);\n this.cellComp.setRole('gridcell');\n\n this.cellPositionFeature.setComp(eGui);\n this.cellCustomStyleFeature.setComp(comp);\n this.tooltipFeature.setComp(comp);\n this.cellKeyboardListenerFeature.setComp(this.eGui);\n\n if (this.cellRangeFeature) { this.cellRangeFeature.setComp(comp, eGui); }\n\n if (startEditing && this.isCellEditable()) {\n this.startEditing();\n } else {\n this.showValue();\n }\n }\n\n private setupAutoHeight(): void {\n if (!this.column.isAutoHeight()) { return; }\n\n const eAutoHeightContainer = this.eCellWrapper!;\n const eParentCell = eAutoHeightContainer.parentElement!;\n // taking minRowHeight from getRowHeightForNode means the getRowHeight() callback is used,\n // thus allowing different min heights for different rows.\n const minRowHeight = this.beans.gridOptionsWrapper.getRowHeightForNode(this.rowNode).height;\n\n const measureHeight = (timesCalled: number) => {\n if (this.editing) { return; }\n // because of the retry's below, it's possible the retry's go beyond\n // the rows life.\n if (!this.isAlive()) { return; }\n\n const { paddingTop, paddingBottom } = getElementSize(eParentCell);\n const wrapperHeight = eAutoHeightContainer.offsetHeight;\n const autoHeight = wrapperHeight + paddingTop + paddingBottom;\n\n if (timesCalled<5) {\n // if not in doc yet, means framework not yet inserted, so wait for next VM turn,\n // maybe it will be ready next VM turn\n const doc = this.beans.gridOptionsWrapper.getDocument();\n const notYetInDom = !doc || !doc.contains(eAutoHeightContainer);\n\n // this happens in React, where React hasn't put any content in. we say 'possibly'\n // as a) may not be React and b) the cell could be empty anyway\n const possiblyNoContentYet = autoHeight==0;\n\n if (notYetInDom || possiblyNoContentYet) {\n this.beans.frameworkOverrides.setTimeout(() => measureHeight(timesCalled + 1), 0);\n return;\n }\n }\n\n const newHeight = Math.max(autoHeight, minRowHeight);\n this.rowNode.setRowAutoHeight(newHeight, this.column);\n };\n\n const listener = () => measureHeight(0);\n\n // do once to set size in case size doesn't change, common when cell is blank\n listener();\n\n const destroyResizeObserver = this.beans.resizeObserverService.observeResize(eAutoHeightContainer, listener);\n\n this.addDestroyFunc(() => {\n destroyResizeObserver();\n this.rowNode.setRowAutoHeight(undefined, this.column);\n });\n }\n\n public getInstanceId(): string {\n return this.instanceId;\n }\n\n private showValue(forceNewCellRendererInstance = false): void {\n const valueToDisplay = this.valueFormatted != null ? this.valueFormatted : this.value;\n const params = this.createCellRendererParams();\n const compDetails = this.beans.userComponentFactory.getCellRendererDetails(this.column.getColDef(), params);\n this.cellComp.setRenderDetails(compDetails, valueToDisplay, forceNewCellRendererInstance);\n this.refreshHandle();\n }\n\n private setupControlComps(): void {\n const colDef = this.column.getColDef();\n this.includeSelection = this.isIncludeControl(colDef.checkboxSelection);\n this.includeRowDrag = this.isIncludeControl(colDef.rowDrag);\n this.includeDndSource = this.isIncludeControl(colDef.dndSource);\n\n this.cellComp.setIncludeSelection(this.includeSelection);\n this.cellComp.setIncludeDndSource(this.includeDndSource);\n this.cellComp.setIncludeRowDrag(this.includeRowDrag);\n }\n\n public isForceWrapper(): boolean {\n // text selection requires the value to be wrapped in another element\n const forceWrapper = this.beans.gridOptionsWrapper.isEnableCellTextSelection() || this.column.isAutoHeight();\n return forceWrapper;\n }\n\n private isIncludeControl(value: boolean | Function | undefined): boolean {\n const rowNodePinned = this.rowNode.rowPinned != null;\n const isFunc = typeof value === 'function';\n const res = rowNodePinned ? false : isFunc || value === true;\n\n return res;\n }\n\n public refreshShouldDestroy(): boolean {\n const colDef = this.column.getColDef();\n const selectionChanged = this.includeSelection != this.isIncludeControl(colDef.checkboxSelection);\n const rowDragChanged = this.includeRowDrag != this.isIncludeControl(colDef.rowDrag);\n const dndSourceChanged = this.includeDndSource != this.isIncludeControl(colDef.dndSource);\n\n return selectionChanged || rowDragChanged || dndSourceChanged;\n }\n\n // either called internally if single cell editing, or called by rowRenderer if row editing\n public startEditing(key: string | null = null, charPress: string | null = null, cellStartedEdit = false, event: KeyboardEvent | MouseEvent | null = null): void {\n if (!this.isCellEditable() || this.editing) { return; }\n\n const editorParams = this.createCellEditorParams(key, charPress, cellStartedEdit);\n const colDef = this.column.getColDef();\n const compDetails = this.beans.userComponentFactory.getCellEditorDetails(colDef, editorParams);\n\n // if cellEditorSelector was used, we give preference to popup and popupPosition from the selector\n const popup = compDetails?.popupFromSelector != null ? compDetails.popupFromSelector : !!colDef.cellEditorPopup ;\n const position = compDetails?.popupPositionFromSelector != null ? compDetails.popupPositionFromSelector : colDef.cellEditorPopupPosition;\n\n this.setEditing(true, popup);\n this.cellComp.setEditDetails(compDetails!, popup, position);\n\n const e: CellEditingStartedEvent = this.createEvent(event, Events.EVENT_CELL_EDITING_STARTED);\n this.beans.eventService.dispatchEvent(e);\n }\n\n private setEditing(editing: boolean, inPopup = false): void {\n if (this.editing === editing) { return; }\n\n this.editing = editing;\n this.editingInPopup = inPopup;\n this.setInlineEditingClass();\n }\n\n // pass in 'true' to cancel the editing.\n public stopRowOrCellEdit(cancel: boolean = false) {\n if (this.beans.gridOptionsWrapper.isFullRowEdit()) {\n this.rowCtrl.stopRowEditing(cancel);\n } else {\n this.stopEditing(cancel);\n }\n }\n\n public onPopupEditorClosed(): void {\n if (!this.isEditing()) { return; }\n // note: this happens because of a click outside of the grid or if the popupEditor\n // is closed with `Escape` key. if another cell was clicked, then the editing will\n // have already stopped and returned on the conditional above.\n this.stopEditingAndFocus();\n }\n\n private takeValueFromCellEditor(cancel: boolean): { newValue?: any, newValueExists: boolean } {\n const noValueResult = { newValueExists: false };\n\n if (cancel) { return noValueResult; }\n\n const cellEditor = this.cellComp.getCellEditor();\n\n if (!cellEditor) { return noValueResult; }\n\n const userWantsToCancel = cellEditor.isCancelAfterEnd && cellEditor.isCancelAfterEnd();\n\n if (userWantsToCancel) { return noValueResult; }\n\n const newValue = cellEditor.getValue();\n\n return {\n newValue: newValue,\n newValueExists: true\n };\n }\n\n /**\n * @returns `True` if the value changes, otherwise `False`.\n */\n private saveNewValue(oldValue: any, newValue: any): boolean {\n if (newValue === oldValue) { return false; }\n\n if (this.beans.gridOptionsWrapper.isReadOnlyEdit()) {\n this.dispatchEventForSaveValueReadOnly(oldValue, newValue);\n return false;\n }\n\n // we suppressRefreshCell because the call to rowNode.setDataValue() results in change detection\n // getting triggered, which results in all cells getting refreshed. we do not want this refresh\n // to happen on this call as we want to call it explicitly below. otherwise refresh gets called twice.\n // if we only did this refresh (and not the one below) then the cell would flash and not be forced.\n this.suppressRefreshCell = true;\n const valueChanged = this.rowNode.setDataValue(this.column, newValue);\n this.suppressRefreshCell = false;\n\n return valueChanged;\n }\n\n private dispatchEventForSaveValueReadOnly(oldValue: any, newValue: any): void {\n const rowNode = this.rowNode;\n const event: CellEditRequestEvent = {\n type: Events.EVENT_CELL_EDIT_REQUEST,\n event: null,\n rowIndex: rowNode.rowIndex!,\n rowPinned: rowNode.rowPinned,\n column: this.column,\n api: this.beans.gridApi,\n columnApi: this.beans.columnApi,\n colDef: this.column.getColDef(),\n context: this.beans.gridOptionsWrapper.getContext(),\n data: rowNode.data,\n node: rowNode,\n oldValue,\n newValue,\n value: newValue,\n source: undefined\n };\n this.beans.eventService.dispatchEvent(event);\n }\n\n /**\n * Ends the Cell Editing\n * @param cancel `True` if the edit process is being canceled.\n * @returns `True` if the value of the `GridCell` has been updated, otherwise `False`.\n */\n public stopEditing(cancel = false): boolean {\n if (!this.editing) { return false; }\n\n const { newValue, newValueExists } = this.takeValueFromCellEditor(cancel);\n const oldValue = this.getValueFromValueService();\n let valueChanged = false;\n\n if (newValueExists) {\n valueChanged = this.saveNewValue(oldValue, newValue);\n }\n\n this.setEditing(false);\n this.cellComp.setEditDetails(); // passing nothing stops editing\n this.updateAndFormatValue();\n this.refreshCell({ forceRefresh: true, suppressFlash: true });\n this.dispatchEditingStoppedEvent(oldValue, newValue);\n\n return valueChanged;\n }\n\n private dispatchEditingStoppedEvent(oldValue: any, newValue: any): void {\n const editingStoppedEvent = {\n ...this.createEvent(null, Events.EVENT_CELL_EDITING_STOPPED),\n oldValue,\n newValue\n };\n\n this.beans.eventService.dispatchEvent(editingStoppedEvent);\n }\n\n // if we are editing inline, then we don't have the padding in the cell (set in the themes)\n // to allow the text editor full access to the entire cell\n private setInlineEditingClass(): void {\n if (!this.isAlive()) { return; }\n\n // ag-cell-inline-editing - appears when user is inline editing\n // ag-cell-not-inline-editing - appears when user is no inline editing\n // ag-cell-popup-editing - appears when user is editing cell in popup (appears on the cell, not on the popup)\n\n // note: one of {ag-cell-inline-editing, ag-cell-not-inline-editing} is always present, they toggle.\n // however {ag-cell-popup-editing} shows when popup, so you have both {ag-cell-popup-editing}\n // and {ag-cell-not-inline-editing} showing at the same time.\n const editingInline = this.editing && !this.editingInPopup;\n const popupEditorShowing = this.editing && this.editingInPopup;\n\n this.cellComp.addOrRemoveCssClass(CSS_CELL_INLINE_EDITING, editingInline);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_NOT_INLINE_EDITING, !editingInline);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_POPUP_EDITING, popupEditorShowing);\n\n this.rowCtrl.setInlineEditingCss(this.editing);\n }\n\n // this is needed as the JS CellComp still allows isPopup() on the CellEditor class, so\n // it's possible the editor is in a popup even though it's not configured via the colDef as so\n public hackSayEditingInPopup(): void {\n if (this.editingInPopup) { return; }\n this.editingInPopup = true;\n this.setInlineEditingClass();\n }\n\n private createCellEditorParams(key: string | null, charPress: string | null, cellStartedEdit: boolean): ICellEditorParams {\n const res: any = {\n value: this.getValueFromValueService(),\n key: key,\n eventKey: key,\n charPress: charPress,\n column: this.column,\n colDef: this.column.getColDef(),\n rowIndex: this.getCellPosition().rowIndex,\n node: this.rowNode,\n data: this.rowNode.data,\n api: this.beans.gridOptionsWrapper.getApi()!,\n cellStartedEdit: cellStartedEdit,\n columnApi: this.beans.gridOptionsWrapper.getColumnApi()!,\n context: this.beans.gridOptionsWrapper.getContext(),\n onKeyDown: this.onKeyDown.bind(this),\n stopEditing: this.stopEditingAndFocus.bind(this),\n eGridCell: this.getGui(),\n parseValue: this.parseValue.bind(this),\n formatValue: this.formatValue.bind(this)\n };\n return res as ICellEditorParams;\n }\n\n private createCellRendererParams(): ICellRendererParams {\n const addRowCompListener = (eventType: string, listener: Function) => {\n console.warn('AG Grid: since AG Grid v26, params.addRowCompListener() is deprecated. If you need this functionality, please contact AG Grid support and advise why so that we can revert with an appropriate workaround, as we dont have any valid use cases for it. This method was originally provided as a work around to know when cells were destroyed in AG Grid before custom Cell Renderers could be provided.');\n this.rowCtrl.addEventListener(eventType, listener);\n };\n\n const res: any = {\n value: this.value,\n valueFormatted: this.valueFormatted,\n getValue: this.getValueFromValueService.bind(this),\n setValue: (value:any) => this.beans.valueService.setValue(this.rowNode, this.column, value),\n formatValue: this.formatValue.bind(this),\n data: this.rowNode.data,\n node: this.rowNode,\n colDef: this.column.getColDef(),\n column: this.column,\n rowIndex: this.getCellPosition().rowIndex,\n api: this.beans.gridOptionsWrapper.getApi(),\n columnApi: this.beans.gridOptionsWrapper.getColumnApi(),\n context: this.beans.gridOptionsWrapper.getContext(),\n refreshCell: this.refreshCell.bind(this),\n eGridCell: this.getGui(),\n eParentOfValue: this.cellComp.getParentOfValue(),\n\n registerRowDragger: (rowDraggerElement: HTMLElement, dragStartPixels: number, value?: string, suppressVisibilityChange?: boolean) => this.registerRowDragger(rowDraggerElement, dragStartPixels, suppressVisibilityChange),\n\n // this function is not documented anywhere, so we could drop it\n // it was in the olden days to allow user to register for when rendered\n // row was removed (the row comp was removed), however now that the user\n // can provide components for cells, the destroy method gets call when this\n // happens so no longer need to fire event.\n addRowCompListener: addRowCompListener\n };\n\n return res as ICellRendererParams;\n }\n\n private parseValue(newValue: any): any {\n const colDef = this.column.getColDef();\n const params: NewValueParams = {\n node: this.rowNode,\n data: this.rowNode.data,\n oldValue: this.getValue(),\n newValue: newValue,\n colDef: colDef,\n column: this.column,\n api: this.beans.gridOptionsWrapper.getApi()!,\n columnApi: this.beans.gridOptionsWrapper.getColumnApi()!,\n context: this.beans.gridOptionsWrapper.getContext()\n };\n\n const valueParser = colDef.valueParser;\n\n return exists(valueParser) ? this.beans.expressionService.evaluate(valueParser, params) : newValue;\n }\n\n public setFocusOutOnEditor(): void {\n if (!this.editing) { return; }\n\n const cellEditor = this.cellComp.getCellEditor();\n\n if (cellEditor && cellEditor.focusOut) {\n cellEditor.focusOut();\n }\n }\n\n public setFocusInOnEditor(): void {\n if (!this.editing) { return; }\n\n const cellEditor = this.cellComp.getCellEditor();\n\n if (cellEditor && cellEditor.focusIn) {\n // if the editor is present, then we just focus it\n cellEditor.focusIn();\n } else {\n // if the editor is not present, it means async cell editor (eg React fibre)\n // and we are trying to set focus before the cell editor is present, so we\n // focus the cell instead\n this.focusCell(true);\n }\n }\n\n public onCellChanged(event: CellChangedEvent): void {\n // because of async in React, the cellComp may not be set yet, if no cellComp then we are\n // yet to initialise the cell, so no need to refresh.\n if (!this.cellComp) { return; }\n\n const eventImpactsThisCell = event.column === this.column;\n\n if (eventImpactsThisCell) {\n this.refreshCell({});\n }\n }\n\n // + stop editing {forceRefresh: true, suppressFlash: true}\n // + event cellChanged {}\n // + cellRenderer.params.refresh() {} -> method passes 'as is' to the cellRenderer, so params could be anything\n // + rowCtrl: event dataChanged {suppressFlash: !update, newData: !update}\n // + rowCtrl: api refreshCells() {animate: true/false}\n // + rowRenderer: api softRefreshView() {}\n public refreshCell(params?: { suppressFlash?: boolean, newData?: boolean, forceRefresh?: boolean; }) {\n // if we are in the middle of 'stopEditing', then we don't refresh here, as refresh gets called explicitly\n if (this.suppressRefreshCell || this.editing) { return; }\n\n // In React, due to async, it's possible a refresh was asked for before the CellComp\n // has been set. If this happens, we skip the refresh, as the cell is going to be\n // initialised anyway once the CellComp is set.\n if (!this.cellComp) { return; }\n\n const colDef = this.column.getColDef();\n const newData = params != null && !!params.newData;\n const suppressFlash = (params != null && !!params.suppressFlash) || !!colDef.suppressCellFlash;\n // we always refresh if cell has no value - this can happen when user provides Cell Renderer and the\n // cell renderer doesn't rely on a value, instead it could be looking directly at the data, or maybe\n // printing the current time (which would be silly)???. Generally speaking\n // non of {field, valueGetter, showRowGroup} is bad in the users application, however for this edge case, it's\n // best always refresh and take the performance hit rather than never refresh and users complaining in support\n // that cells are not updating.\n const noValueProvided = colDef.field == null && colDef.valueGetter == null && colDef.showRowGroup == null;\n const forceRefresh = (params && params.forceRefresh) || noValueProvided || newData;\n\n const valuesDifferent = this.updateAndFormatValue();\n const dataNeedsUpdating = forceRefresh || valuesDifferent;\n\n if (dataNeedsUpdating) {\n\n // if it's 'new data', then we don't refresh the cellRenderer, even if refresh method is available.\n // this is because if the whole data is new (ie we are showing stock price 'BBA' now and not 'SSD')\n // then we are not showing a movement in the stock price, rather we are showing different stock.\n this.showValue(newData);\n\n // we don't want to flash the cells when processing a filter change, as otherwise the UI would\n // be to busy. see comment in FilterManager with regards processingFilterChange\n const processingFilterChange = this.beans.filterManager.isSuppressFlashingCellsBecauseFiltering();\n\n const flashCell = !suppressFlash && !processingFilterChange &&\n (this.beans.gridOptionsWrapper.isEnableCellChangeFlash() || colDef.enableCellChangeFlash);\n\n if (flashCell) {\n this.flashCell();\n }\n\n this.cellCustomStyleFeature.applyUserStyles();\n this.cellCustomStyleFeature.applyClassesFromColDef();\n }\n\n this.refreshToolTip();\n\n // we do cellClassRules even if the value has not changed, so that users who have rules that\n // look at other parts of the row (where the other part of the row might of changed) will work.\n this.cellCustomStyleFeature.applyCellClassRules();\n }\n\n // cell editors call this, when they want to stop for reasons other\n // than what we pick up on. eg selecting from a dropdown ends editing.\n public stopEditingAndFocus(suppressNavigateAfterEdit = false): void {\n this.stopRowOrCellEdit();\n this.focusCell(true);\n\n if (!suppressNavigateAfterEdit) {\n this.navigateAfterEdit();\n }\n }\n\n private navigateAfterEdit(): void {\n const fullRowEdit = this.beans.gridOptionsWrapper.isFullRowEdit();\n\n if (fullRowEdit) { return; }\n\n const enterMovesDownAfterEdit = this.beans.gridOptionsWrapper.isEnterMovesDownAfterEdit();\n\n if (enterMovesDownAfterEdit) {\n this.beans.navigationService.navigateToNextCell(null, KeyCode.DOWN, this.getCellPosition(), false);\n }\n }\n\n // user can also call this via API\n public flashCell(delays?: { flashDelay?: number | null; fadeDelay?: number | null; }): void {\n const flashDelay = delays && delays.flashDelay;\n const fadeDelay = delays && delays.fadeDelay;\n\n this.animateCell('data-changed', flashDelay, fadeDelay);\n }\n\n private animateCell(cssName: string, flashDelay?: number | null, fadeDelay?: number | null): void {\n const fullName = `ag-cell-${cssName}`;\n const animationFullName = `ag-cell-${cssName}-animation`;\n const { gridOptionsWrapper } = this.beans;\n\n if (!flashDelay) {\n flashDelay = gridOptionsWrapper.getCellFlashDelay();\n }\n\n if (!exists(fadeDelay)) {\n fadeDelay = gridOptionsWrapper.getCellFadeDelay();\n }\n\n // we want to highlight the cells, without any animation\n this.cellComp.addOrRemoveCssClass(fullName, true);\n this.cellComp.addOrRemoveCssClass(animationFullName, false);\n\n // then once that is applied, we remove the highlight with animation\n window.setTimeout(() => {\n this.cellComp.addOrRemoveCssClass(fullName, false);\n this.cellComp.addOrRemoveCssClass(animationFullName, true);\n\n this.eGui.style.transition = `background-color ${fadeDelay}ms`;\n window.setTimeout(() => {\n // and then to leave things as we got them, we remove the animation\n this.cellComp.addOrRemoveCssClass(animationFullName, false);\n this.eGui.style.transition = '';\n }, fadeDelay!);\n }, flashDelay);\n }\n\n public onFlashCells(event: FlashCellsEvent): void {\n if (!this.cellComp) { return; }\n const cellId = this.beans.cellPositionUtils.createId(this.getCellPosition());\n const shouldFlash = event.cells[cellId];\n if (shouldFlash) {\n this.animateCell('highlight');\n }\n }\n\n public isCellEditable(): boolean {\n return this.column.isCellEditable(this.rowNode);\n }\n\n public isSuppressFillHandle(): boolean {\n return this.column.isSuppressFillHandle();\n }\n\n private formatValue(value: any): any {\n const res = this.callValueFormatter(value);\n return res != null ? res : value;\n }\n\n private callValueFormatter(value: any): any {\n return this.beans.valueFormatterService.formatValue(this.column, this.rowNode, value);\n }\n\n public updateAndFormatValue(force = false): boolean {\n const oldValue = this.value;\n const oldValueFormatted = this.valueFormatted;\n\n this.value = this.getValueFromValueService();\n this.valueFormatted = this.callValueFormatter(this.value);\n\n const valuesDifferent = force ? true :\n !this.valuesAreEqual(oldValue, this.value) || this.valueFormatted != oldValueFormatted;\n\n return valuesDifferent;\n }\n\n private valuesAreEqual(val1: any, val2: any): boolean {\n // if the user provided an equals method, use that, otherwise do simple comparison\n const colDef = this.column.getColDef();\n return colDef.equals ? colDef.equals(val1, val2) : val1 === val2;\n }\n\n public getComp(): ICellComp {\n return this.cellComp;\n }\n\n public getValueFromValueService(): any {\n // if we don't check this, then the grid will render leaf groups as open even if we are not\n // allowing the user to open leaf groups. confused? remember for pivot mode we don't allow\n // opening leaf groups, so we have to force leafGroups to be closed in case the user expanded\n // them via the API, or user user expanded them in the UI before turning on pivot mode\n const lockedClosedGroup = this.rowNode.leafGroup && this.beans.columnModel.isPivotMode();\n\n const isOpenGroup = this.rowNode.group && this.rowNode.expanded && !this.rowNode.footer && !lockedClosedGroup;\n\n // are we showing group footers\n const groupFootersEnabled = this.beans.gridOptionsWrapper.isGroupIncludeFooter();\n\n // if doing footers, we normally don't show agg data at group level when group is open\n const groupAlwaysShowAggData = this.beans.gridOptionsWrapper.isGroupSuppressBlankHeader();\n\n // if doing grouping and footers, we don't want to include the agg value\n // in the header when the group is open\n const ignoreAggData = (isOpenGroup && groupFootersEnabled) && !groupAlwaysShowAggData;\n\n const value = this.beans.valueService.getValue(this.column, this.rowNode, false, ignoreAggData);\n\n return value;\n }\n\n public getValue(): any {\n return this.value;\n }\n\n public getValueFormatted(): string {\n return this.valueFormatted;\n }\n\n private addDomData(): void {\n const element = this.getGui();\n\n this.beans.gridOptionsWrapper.setDomData(element, CellCtrl.DOM_DATA_KEY_CELL_CTRL, this);\n this.addDestroyFunc(() => this.beans.gridOptionsWrapper.setDomData(element, CellCtrl.DOM_DATA_KEY_CELL_CTRL, null));\n }\n\n public createEvent(domEvent: Event | null, eventType: string): CellEvent {\n const event: CellEvent = {\n type: eventType,\n node: this.rowNode,\n data: this.rowNode.data,\n value: this.value,\n column: this.column,\n colDef: this.column.getColDef(),\n context: this.beans.gridOptionsWrapper.getContext(),\n api: this.beans.gridApi,\n columnApi: this.beans.columnApi,\n rowPinned: this.rowNode.rowPinned,\n event: domEvent,\n rowIndex: this.rowNode.rowIndex!\n };\n\n return event;\n }\n\n public onKeyPress(event: KeyboardEvent): void {\n this.cellKeyboardListenerFeature.onKeyPress(event);\n }\n\n public onKeyDown(event: KeyboardEvent): void {\n this.cellKeyboardListenerFeature.onKeyDown(event);\n }\n\n public onMouseEvent(eventName: string, mouseEvent: MouseEvent): void {\n this.cellMouseListenerFeature.onMouseEvent(eventName, mouseEvent);\n }\n\n public getGui(): HTMLElement {\n return this.eGui;\n }\n\n public refreshToolTip(): void {\n this.tooltipFeature.refreshToolTip();\n }\n\n public getColSpanningList(): Column[] {\n return this.cellPositionFeature.getColSpanningList();\n }\n\n public onLeftChanged(): void {\n if (!this.cellComp) { return; }\n this.cellPositionFeature.onLeftChanged();\n }\n\n public onDisplayedColumnsChanged(): void {\n if (!this.eGui) { return; }\n this.setAriaColIndex();\n }\n\n private setAriaColIndex(): void {\n const colIdx = this.beans.columnModel.getAriaColumnIndex(this.column);\n setAriaColIndex(this.getGui(), colIdx); // for react, we don't use JSX, as it slowed down column moving\n }\n\n public isSuppressNavigable(): boolean {\n return this.column.isSuppressNavigable(this.rowNode);\n }\n\n public onWidthChanged(): void {\n return this.cellPositionFeature.onWidthChanged();\n }\n\n public getColumn(): Column {\n return this.column;\n }\n\n public getRowNode(): RowNode {\n return this.rowNode;\n }\n\n public getBeans(): Beans {\n return this.beans;\n }\n\n public isPrintLayout(): boolean {\n return this.printLayout;\n }\n\n public appendChild(htmlElement: HTMLElement): void {\n this.eGui.appendChild(htmlElement);\n }\n\n public refreshHandle(): void {\n if (this.editing) { return; }\n if (this.cellRangeFeature) {\n this.cellRangeFeature.refreshHandle();\n }\n }\n\n public getCellPosition(): CellPosition {\n return this.cellPosition;\n }\n\n public isEditing(): boolean {\n return this.editing;\n }\n\n // called by rowRenderer when user navigates via tab key\n public startRowOrCellEdit(key?: string | null, charPress?: string | null, event: KeyboardEvent | MouseEvent | null = null): void {\n if (this.beans.gridOptionsWrapper.isFullRowEdit()) {\n this.rowCtrl.startRowEditing(key, charPress, this);\n } else {\n this.startEditing(key, charPress, true, event);\n }\n }\n\n public getRowCtrl(): RowCtrl {\n return this.rowCtrl;\n }\n\n public getRowPosition(): RowPosition {\n return {\n rowIndex: this.cellPosition.rowIndex,\n rowPinned: this.cellPosition.rowPinned\n };\n }\n\n public updateRangeBordersIfRangeCount(): void {\n if (!this.cellComp) { return; }\n if (this.cellRangeFeature) {\n this.cellRangeFeature.updateRangeBordersIfRangeCount();\n }\n }\n\n public onRangeSelectionChanged(): void {\n if (!this.cellComp) { return; }\n if (this.cellRangeFeature) {\n this.cellRangeFeature.onRangeSelectionChanged();\n }\n }\n\n public isRangeSelectionEnabled(): boolean {\n return this.cellRangeFeature != null;\n }\n\n public focusCell(forceBrowserFocus = false): void {\n this.beans.focusService.setFocusedCell(this.getCellPosition().rowIndex, this.column, this.rowNode.rowPinned, forceBrowserFocus);\n }\n\n public onRowIndexChanged(): void {\n // when index changes, this influences items that need the index, so we update the\n // grid cell so they are working off the new index.\n this.createCellPosition();\n // when the index of the row changes, ie means the cell may have lost or gained focus\n this.onCellFocused();\n // check range selection\n if (this.cellRangeFeature) {\n this.cellRangeFeature.onRangeSelectionChanged();\n }\n }\n\n public onFirstRightPinnedChanged(): void {\n if (!this.cellComp) { return; }\n const firstRightPinned = this.column.isFirstRightPinned();\n this.cellComp.addOrRemoveCssClass(CSS_CELL_FIRST_RIGHT_PINNED, firstRightPinned);\n }\n\n public onLastLeftPinnedChanged(): void {\n if (!this.cellComp) { return; }\n const lastLeftPinned = this.column.isLastLeftPinned();\n this.cellComp.addOrRemoveCssClass(CSS_CELL_LAST_LEFT_PINNED, lastLeftPinned);\n }\n\n public onCellFocused(event?: CellFocusedEvent): void {\n if (!this.cellComp || this.gow.isSuppressCellFocus()) { return; }\n\n const cellFocused = this.beans.focusService.isCellFocused(this.cellPosition);\n\n this.cellComp.addOrRemoveCssClass(CSS_CELL_FOCUS, cellFocused);\n\n // see if we need to force browser focus - this can happen if focus is programmatically set\n if (cellFocused && event && event.forceBrowserFocus) {\n const focusEl = this.cellComp.getFocusableElement();\n focusEl.focus();\n }\n\n // if another cell was focused, and we are editing, then stop editing\n const fullRowEdit = this.beans.gridOptionsWrapper.isFullRowEdit();\n\n if (!cellFocused && !fullRowEdit && this.editing) {\n this.stopRowOrCellEdit();\n }\n }\n\n private createCellPosition(): void {\n this.cellPosition = {\n rowIndex: this.rowNode.rowIndex!,\n rowPinned: makeNull(this.rowNode.rowPinned),\n column: this.column\n };\n }\n\n // CSS Classes that only get applied once, they never change\n private applyStaticCssClasses(): void {\n this.cellComp.addOrRemoveCssClass(CSS_CELL, true);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_NOT_INLINE_EDITING, true);\n\n // normal cells fill the height of the row. autoHeight cells have no height to let them\n // fit the height of content.\n\n const autoHeight = this.column.isAutoHeight() == true;\n this.cellComp.addOrRemoveCssClass(CSS_AUTO_HEIGHT, autoHeight);\n this.cellComp.addOrRemoveCssClass(CSS_NORMAL_HEIGHT, !autoHeight);\n }\n\n public onColumnHover(): void {\n if (!this.cellComp) { return; }\n if (!this.beans.gridOptionsWrapper.isColumnHoverHighlight()) { return; }\n\n const isHovered = this.beans.columnHoverService.isHovered(this.column);\n this.cellComp.addOrRemoveCssClass(CSS_COLUMN_HOVER, isHovered);\n }\n\n public onNewColumnsLoaded(): void {\n if (!this.cellComp) { return; }\n\n this.setWrapText();\n\n if (!this.editing) {\n this.refreshCell({forceRefresh: true, suppressFlash: true});\n }\n }\n\n private setWrapText(): void {\n const value = this.column.getColDef().wrapText == true;\n\n this.cellComp.addOrRemoveCssClass(CSS_CELL_WRAP_TEXT, value);\n }\n\n public dispatchCellContextMenuEvent(event: Event | null) {\n const colDef = this.column.getColDef();\n const cellContextMenuEvent: CellContextMenuEvent = this.createEvent(event, Events.EVENT_CELL_CONTEXT_MENU);\n\n this.beans.eventService.dispatchEvent(cellContextMenuEvent);\n\n if (colDef.onCellContextMenu) {\n // to make the callback async, do in a timeout\n window.setTimeout(() => (colDef.onCellContextMenu as any)(cellContextMenuEvent), 0);\n }\n }\n\n public getCellRenderer(): ICellRenderer | null {\n return this.cellComp ? this.cellComp.getCellRenderer() : null;\n }\n\n public getCellEditor(): ICellEditor | null {\n return this.cellComp ? this.cellComp.getCellEditor() : null;\n }\n\n public destroy(): void {\n super.destroy();\n }\n\n public createSelectionCheckbox(): CheckboxSelectionComponent {\n const cbSelectionComponent = new CheckboxSelectionComponent();\n\n this.beans.context.createBean(cbSelectionComponent);\n cbSelectionComponent.init({ rowNode: this.rowNode, column: this.column });\n\n // put the checkbox in before the value\n return cbSelectionComponent;\n }\n\n public createDndSource(): DndSourceComp {\n const dndSourceComp = new DndSourceComp(this.rowNode, this.column, this.beans, this.eGui);\n this.beans.context.createBean(dndSourceComp);\n\n return dndSourceComp;\n }\n\n public registerRowDragger(\n customElement: HTMLElement,\n dragStartPixels?: number,\n suppressVisibilityChange?: boolean\n ): void {\n // if previously existed, then we are only updating\n if (this.customRowDragComp) {\n this.customRowDragComp.setDragElement(customElement, dragStartPixels);\n return;\n }\n\n const newComp = this.createRowDragComp(customElement, dragStartPixels, suppressVisibilityChange);\n\n if (newComp) {\n this.customRowDragComp = newComp;\n this.addDestroyFunc(() => this.beans.context.destroyBean(newComp));\n }\n }\n\n public createRowDragComp(\n customElement?: HTMLElement,\n dragStartPixels?: number,\n suppressVisibilityChange?: boolean\n ): RowDragComp | undefined {\n const pagination = this.beans.gridOptionsWrapper.isPagination();\n const rowDragManaged = this.beans.gridOptionsWrapper.isRowDragManaged();\n const clientSideRowModelActive = this.beans.gridOptionsWrapper.isRowModelDefault();\n\n if (rowDragManaged) {\n // row dragging only available in default row model\n if (!clientSideRowModelActive) {\n doOnce(() => console.warn('AG Grid: managed row dragging is only allowed in the Client Side Row Model'),\n 'CellComp.addRowDragging');\n\n return;\n }\n\n if (pagination) {\n doOnce(() => console.warn('AG Grid: managed row dragging is not possible when doing pagination'),\n 'CellComp.addRowDragging');\n\n return;\n }\n }\n\n // otherwise (normal case) we are creating a RowDraggingComp for the first time\n const rowDragComp = new RowDragComp(() => this.value, this.rowNode, this.column, customElement, dragStartPixels, suppressVisibilityChange);\n this.beans.context.createBean(rowDragComp);\n\n return rowDragComp;\n }\n}\n","import { BeanStub } from \"../../context/beanStub\";\nimport { Autowired, PostConstruct } from \"../../context/context\";\nimport { ScrollVisibleService } from \"../../gridBodyComp/scrollVisibleService\";\nimport { Events } from \"../../eventKeys\";\nimport { RowContainerEventsFeature } from \"./rowContainerEventsFeature\";\nimport { DragService } from \"../../dragAndDrop/dragService\";\nimport { CtrlsService } from \"../../ctrlsService\";\nimport { getInnerWidth, getScrollLeft, isHorizontalScrollShowing, isVisible, setScrollLeft } from \"../../utils/dom\";\nimport { ColumnModel } from \"../../columns/columnModel\";\nimport { ResizeObserverService } from \"../../misc/resizeObserverService\";\nimport { ViewportSizeFeature } from \"../viewportSizeFeature\";\nimport { convertToMap } from \"../../utils/map\";\nimport { SetPinnedLeftWidthFeature } from \"./setPinnedLeftWidthFeature\";\nimport { SetPinnedRightWidthFeature } from \"./setPinnedRightWidthFeature\";\nimport { SetHeightFeature } from \"./setHeightFeature\";\nimport { DragListenerFeature } from \"./dragListenerFeature\";\nimport { CenterWidthFeature } from \"../centerWidthFeature\";\nimport { RowCtrl } from \"../../rendering/row/rowCtrl\";\nimport { Constants } from \"../../constants/constants\";\nimport { RowRenderer } from \"../../rendering/rowRenderer\";\nimport { GridOptionsWrapper } from \"../../gridOptionsWrapper\";\n\nexport enum RowContainerName {\n LEFT = 'left',\n RIGHT = 'right',\n CENTER = 'center',\n FULL_WIDTH = 'fullWidth',\n\n TOP_LEFT = 'topLeft',\n TOP_RIGHT = 'topRight',\n TOP_CENTER = 'topCenter',\n TOP_FULL_WIDTH = 'topFullWidth',\n\n BOTTOM_LEFT = 'bottomLeft',\n BOTTOM_RIGHT = 'bottomRight',\n BOTTOM_CENTER = 'bottomCenter',\n BOTTOM_FULL_WIDTH = 'bottomFullWidth'\n}\n\nexport enum RowContainerType {\n LEFT = 'left',\n RIGHT = 'right',\n CENTER = 'center',\n FULL_WIDTH = 'fullWidth'\n}\n\nexport function getRowContainerTypeForName(name: RowContainerName): RowContainerType {\n switch (name) {\n case RowContainerName.CENTER:\n case RowContainerName.TOP_CENTER:\n case RowContainerName.BOTTOM_CENTER:\n return RowContainerType.CENTER;\n case RowContainerName.LEFT:\n case RowContainerName.TOP_LEFT:\n case RowContainerName.BOTTOM_LEFT:\n return RowContainerType.LEFT;\n case RowContainerName.RIGHT:\n case RowContainerName.TOP_RIGHT:\n case RowContainerName.BOTTOM_RIGHT:\n return RowContainerType.RIGHT;\n case RowContainerName.FULL_WIDTH:\n case RowContainerName.TOP_FULL_WIDTH:\n case RowContainerName.BOTTOM_FULL_WIDTH:\n return RowContainerType.FULL_WIDTH;\n default :\n throw Error('Invalid Row Container Type');\n }\n}\n\nconst ContainerCssClasses: Map = convertToMap([\n [RowContainerName.CENTER, 'ag-center-cols-container'],\n [RowContainerName.LEFT, 'ag-pinned-left-cols-container'],\n [RowContainerName.RIGHT, 'ag-pinned-right-cols-container'],\n [RowContainerName.FULL_WIDTH, 'ag-full-width-container'],\n\n [RowContainerName.TOP_CENTER, 'ag-floating-top-container'],\n [RowContainerName.TOP_LEFT, 'ag-pinned-left-floating-top'],\n [RowContainerName.TOP_RIGHT, 'ag-pinned-right-floating-top'],\n [RowContainerName.TOP_FULL_WIDTH, 'ag-floating-top-full-width-container'],\n\n [RowContainerName.BOTTOM_CENTER, 'ag-floating-bottom-container'],\n [RowContainerName.BOTTOM_LEFT, 'ag-pinned-left-floating-bottom'],\n [RowContainerName.BOTTOM_RIGHT, 'ag-pinned-right-floating-bottom'],\n [RowContainerName.BOTTOM_FULL_WIDTH, 'ag-floating-bottom-full-width-container'],\n]);\n\nconst ViewportCssClasses: Map = convertToMap([\n [RowContainerName.CENTER, 'ag-center-cols-viewport'],\n [RowContainerName.TOP_CENTER, 'ag-floating-top-viewport'],\n [RowContainerName.BOTTOM_CENTER, 'ag-floating-bottom-viewport'],\n]);\n\nconst WrapperCssClasses: Map = convertToMap([\n [RowContainerName.CENTER, 'ag-center-cols-clipper'],\n]);\n\nexport interface IRowContainerComp {\n setViewportHeight(height: string): void;\n setRowCtrls(rowCtrls: RowCtrl[]): void;\n setDomOrder(domOrder: boolean): void;\n setContainerWidth(width: string): void;\n}\n\nexport class RowContainerCtrl extends BeanStub {\n\n public static getRowContainerCssClasses(name: RowContainerName): {container?: string, viewport?: string, wrapper?: string} {\n const containerClass = ContainerCssClasses.get(name);\n const viewportClass = ViewportCssClasses.get(name);\n const wrapperClass = WrapperCssClasses.get(name);\n return {container: containerClass, viewport: viewportClass, wrapper: wrapperClass};\n }\n\n public static getPinned(name: RowContainerName): string | null {\n switch (name) {\n case RowContainerName.BOTTOM_LEFT:\n case RowContainerName.TOP_LEFT:\n case RowContainerName.LEFT:\n return Constants.PINNED_LEFT;\n case RowContainerName.BOTTOM_RIGHT:\n case RowContainerName.TOP_RIGHT:\n case RowContainerName.RIGHT:\n return Constants.PINNED_RIGHT;\n default:\n return null;\n }\n\n }\n\n @Autowired('scrollVisibleService') private scrollVisibleService: ScrollVisibleService;\n @Autowired('dragService') private dragService: DragService;\n @Autowired('ctrlsService') private ctrlsService: CtrlsService;\n @Autowired('columnModel') private columnModel: ColumnModel;\n @Autowired('resizeObserverService') private resizeObserverService: ResizeObserverService;\n @Autowired('rowRenderer') private rowRenderer: RowRenderer;\n\n private readonly name: RowContainerName;\n\n private comp: IRowContainerComp;\n private eContainer: HTMLElement;\n private eViewport: HTMLElement;\n private eWrapper: HTMLElement;\n private enableRtl: boolean;\n private embedFullWidthRows: boolean;\n\n private viewportSizeFeature: ViewportSizeFeature; // only center has this\n\n constructor(name: RowContainerName) {\n super();\n this.name = name;\n }\n\n @PostConstruct\n private postConstruct(): void {\n this.enableRtl = this.gridOptionsWrapper.isEnableRtl();\n this.embedFullWidthRows = this.gridOptionsWrapper.isEmbedFullWidthRows();\n\n this.forContainers([RowContainerName.CENTER],\n () => this.viewportSizeFeature = this.createManagedBean(new ViewportSizeFeature(this)));\n }\n\n private registerWithCtrlsService(): void {\n switch (this.name) {\n case RowContainerName.CENTER: this.ctrlsService.registerCenterRowContainerCtrl(this); break;\n case RowContainerName.LEFT: this.ctrlsService.registerLeftRowContainerCtrl(this); break;\n case RowContainerName.RIGHT: this.ctrlsService.registerRightRowContainerCtrl(this); break;\n case RowContainerName.TOP_CENTER: this.ctrlsService.registerTopCenterRowContainerCtrl(this); break;\n case RowContainerName.TOP_LEFT: this.ctrlsService.registerTopLeftRowContainerCon(this); break;\n case RowContainerName.TOP_RIGHT: this.ctrlsService.registerTopRightRowContainerCtrl(this); break;\n case RowContainerName.BOTTOM_CENTER: this.ctrlsService.registerBottomCenterRowContainerCtrl(this); break;\n case RowContainerName.BOTTOM_LEFT: this.ctrlsService.registerBottomLeftRowContainerCtrl(this); break;\n case RowContainerName.BOTTOM_RIGHT: this.ctrlsService.registerBottomRightRowContainerCtrl(this); break;\n }\n }\n\n private forContainers(names: RowContainerName[], callback: (() => void)): void {\n if (names.indexOf(this.name) >= 0) {\n callback();\n }\n }\n\n public getContainerElement(): HTMLElement {\n return this.eContainer;\n }\n\n public getViewportSizeFeature(): ViewportSizeFeature {\n return this.viewportSizeFeature;\n }\n\n public setComp(view: IRowContainerComp, eContainer: HTMLElement, eViewport: HTMLElement, eWrapper: HTMLElement): void {\n this.comp = view;\n this.eContainer = eContainer;\n this.eViewport = eViewport;\n this.eWrapper = eWrapper;\n\n this.createManagedBean(new RowContainerEventsFeature(this.eContainer));\n this.addPreventScrollWhileDragging();\n this.listenOnDomOrder();\n this.stopHScrollOnPinnedRows();\n\n const allTopNoFW = [RowContainerName.TOP_CENTER, RowContainerName.TOP_LEFT, RowContainerName.TOP_RIGHT];\n const allBottomNoFW = [RowContainerName.BOTTOM_CENTER, RowContainerName.BOTTOM_LEFT, RowContainerName.BOTTOM_RIGHT];\n const allMiddleNoFW = [RowContainerName.CENTER, RowContainerName.LEFT, RowContainerName.RIGHT];\n const allNoFW = [...allTopNoFW, ...allBottomNoFW, ...allMiddleNoFW];\n\n const allMiddle = [RowContainerName.CENTER, RowContainerName.LEFT, RowContainerName.RIGHT, RowContainerName.FULL_WIDTH];\n\n const allCenter = [RowContainerName.CENTER, RowContainerName.TOP_CENTER, RowContainerName.BOTTOM_CENTER];\n const allLeft = [RowContainerName.LEFT, RowContainerName.BOTTOM_LEFT, RowContainerName.TOP_LEFT];\n const allRight = [RowContainerName.RIGHT, RowContainerName.BOTTOM_RIGHT, RowContainerName.TOP_RIGHT];\n\n this.forContainers(allLeft, () => this.createManagedBean(new SetPinnedLeftWidthFeature(this.eContainer)));\n this.forContainers(allRight, () => this.createManagedBean(new SetPinnedRightWidthFeature(this.eContainer)));\n this.forContainers(allMiddle, () => this.createManagedBean(new SetHeightFeature(this.eContainer, this.eWrapper)));\n this.forContainers(allNoFW, () => this.createManagedBean(new DragListenerFeature(this.eContainer)));\n\n this.forContainers(allCenter, () => this.createManagedBean(\n new CenterWidthFeature(width => this.comp.setContainerWidth(`${width}px`))\n ));\n\n this.addListeners();\n this.registerWithCtrlsService();\n }\n\n private addListeners(): void {\n this.addManagedListener(this.eventService, Events.EVENT_SCROLL_VISIBILITY_CHANGED, ()=> this.onScrollVisibilityChanged());\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, ()=> this.onDisplayedColumnsChanged());\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, ()=> this.onDisplayedColumnsWidthChanged());\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_ROWS_CHANGED, ()=> this.onDisplayedRowsChanged());\n\n this.onScrollVisibilityChanged();\n this.onDisplayedColumnsChanged();\n this.onDisplayedColumnsWidthChanged();\n this.onDisplayedRowsChanged();\n }\n\n private listenOnDomOrder(): void {\n const listener = () => this.comp.setDomOrder(this.gridOptionsWrapper.isEnsureDomOrder());\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_DOM_LAYOUT, listener);\n listener();\n }\n\n // when editing a pinned row, if the cell is half outside the scrollable area, the browser can\n // scroll the column into view. we do not want this, the pinned sections should never scroll.\n // so we listen to scrolls on these containers and reset the scroll if we find one.\n private stopHScrollOnPinnedRows(): void {\n this.forContainers([RowContainerName.TOP_CENTER, RowContainerName.BOTTOM_CENTER], () => {\n const resetScrollLeft = () => this.eViewport.scrollLeft = 0;\n this.addManagedListener(this.eViewport, 'scroll', resetScrollLeft);\n });\n }\n\n public onDisplayedColumnsChanged(): void {\n this.forContainers([RowContainerName.CENTER], () => this.onHorizontalViewportChanged());\n }\n\n private onDisplayedColumnsWidthChanged(): void {\n this.forContainers([RowContainerName.CENTER], () => this.onHorizontalViewportChanged());\n }\n\n private onScrollVisibilityChanged(): void {\n if (this.name !== RowContainerName.CENTER) { return; }\n\n const visible = this.scrollVisibleService.isHorizontalScrollShowing();\n const scrollbarWidth = visible ? (this.gridOptionsWrapper.getScrollbarWidth() || 0) : 0;\n const height = scrollbarWidth == 0 ? '100%' : `calc(100% + ${scrollbarWidth}px)`;\n this.comp.setViewportHeight(height);\n }\n\n // this methods prevents the grid views from being scrolled while the dragService is being used\n // eg. the view should not scroll up and down while dragging rows using the rowDragComp.\n private addPreventScrollWhileDragging(): void {\n const preventScroll = (e: TouchEvent) => {\n if (this.dragService.isDragging()) {\n if (e.cancelable) { e.preventDefault(); }\n }\n };\n\n this.eContainer.addEventListener('touchmove', preventScroll, { passive: false });\n this.addDestroyFunc(() => this.eContainer.removeEventListener('touchmove', preventScroll));\n }\n\n // this gets called whenever a change in the viewport, so we can inform column controller it has to work\n // out the virtual columns again. gets called from following locations:\n // + ensureColVisible, scroll, init, layoutChanged, displayedColumnsChanged, API (doLayout)\n public onHorizontalViewportChanged(): void {\n const scrollWidth = this.getCenterWidth();\n const scrollPosition = this.getCenterViewportScrollLeft();\n\n this.columnModel.setViewportPosition(scrollWidth, scrollPosition);\n }\n\n public getCenterWidth(): number {\n return getInnerWidth(this.eViewport);\n }\n\n public getCenterViewportScrollLeft(): number {\n // we defer to a util, as how you calculated scrollLeft when doing RTL depends on the browser\n return getScrollLeft(this.eViewport, this.enableRtl);\n }\n\n public registerViewportResizeListener(listener: (() => void)) {\n const unsubscribeFromResize = this.resizeObserverService.observeResize(this.eViewport, listener);\n this.addDestroyFunc(() => unsubscribeFromResize());\n }\n\n public isViewportVisible(): boolean {\n return isVisible(this.eViewport);\n }\n\n public isViewportHScrollShowing(): boolean {\n return isHorizontalScrollShowing(this.eViewport);\n }\n\n public getViewportScrollLeft(): number {\n return getScrollLeft(this.eViewport, this.enableRtl);\n }\n\n public isHorizontalScrollShowing(): boolean {\n const isAlwaysShowHorizontalScroll = this.gridOptionsWrapper.isAlwaysShowHorizontalScroll();\n return isAlwaysShowHorizontalScroll || isHorizontalScrollShowing(this.eViewport);\n }\n\n public getViewportElement(): HTMLElement {\n return this.eViewport;\n }\n\n public setContainerTranslateX(amount: number): void {\n this.eContainer.style.transform = `translateX(${amount}px)`;\n }\n\n public getHScrollPosition(): { left: number, right: number; } {\n const res = {\n left: this.eViewport.scrollLeft,\n right: this.eViewport.scrollLeft + this.eViewport.offsetWidth\n };\n return res;\n }\n\n public setCenterViewportScrollLeft(value: number): void {\n // we defer to a util, as how you calculated scrollLeft when doing RTL depends on the browser\n setScrollLeft(this.eViewport, value, this.enableRtl);\n }\n\n private onDisplayedRowsChanged(): void {\n const fullWithContainer =\n this.name === RowContainerName.TOP_FULL_WIDTH\n || this.name === RowContainerName.BOTTOM_FULL_WIDTH\n || this.name === RowContainerName.FULL_WIDTH;\n\n const doesRowMatch = (rowCtrl: RowCtrl) => {\n const fullWidthRow = rowCtrl.isFullWidth();\n\n const printLayout = this.gridOptionsWrapper.getDomLayout() === Constants.DOM_LAYOUT_PRINT;\n\n const embedFW = this.embedFullWidthRows || printLayout;\n\n const match = fullWithContainer ?\n !embedFW && fullWidthRow\n : embedFW || !fullWidthRow;\n\n return match;\n };\n\n // this list contains either all pinned top, center or pinned bottom rows\n const allRowsRegardlessOfFullWidth = this.getRowCtrls();\n // this filters out rows not for this container, eg if it's a full with row, but we are not full with container\n const rowsThisContainer = allRowsRegardlessOfFullWidth.filter(doesRowMatch);\n\n this.comp.setRowCtrls(rowsThisContainer);\n }\n\n private getRowCtrls(): RowCtrl[] {\n switch (this.name) {\n case RowContainerName.TOP_CENTER:\n case RowContainerName.TOP_LEFT:\n case RowContainerName.TOP_RIGHT:\n case RowContainerName.TOP_FULL_WIDTH:\n return this.rowRenderer.getTopRowCtrls();\n\n case RowContainerName.BOTTOM_CENTER:\n case RowContainerName.BOTTOM_LEFT:\n case RowContainerName.BOTTOM_RIGHT:\n case RowContainerName.BOTTOM_FULL_WIDTH:\n return this.rowRenderer.getBottomRowCtrls();\n\n default:\n return this.rowRenderer.getRowCtrls();\n }\n }\n}","import { BeanStub } from \"../../context/beanStub\";\nimport { getCtrlForEvent, isStopPropagationForAgGrid, isEventSupported } from \"../../utils/event\";\nimport { Autowired, Optional, PostConstruct } from \"../../context/context\";\nimport { MouseEventService } from \"./../mouseEventService\";\nimport { RowCtrl } from \"../../rendering/row/rowCtrl\";\nimport { ValueService } from \"../../valueService/valueService\";\nimport { Column } from \"../../entities/column\";\nimport { IContextMenuFactory } from \"../../interfaces/iContextMenuFactory\";\nimport { isIOSUserAgent } from \"../../utils/browser\";\nimport { LongTapEvent, TouchListener } from \"../../widgets/touchListener\";\nimport { CtrlsService } from \"../../ctrlsService\";\nimport { isUserSuppressingKeyboardEvent } from \"../../utils/keyboard\";\nimport { CellKeyDownEvent, CellKeyPressEvent, Events, FullWidthCellKeyDownEvent, FullWidthCellKeyPressEvent } from \"../../events\";\nimport { NavigationService } from \"./../navigationService\";\nimport { FocusService } from \"../../focusService\";\nimport { KeyCode } from \"../../constants/keyCode\";\nimport { UndoRedoService } from \"../../undoRedo/undoRedoService\";\nimport { Constants } from \"../../constants/constants\";\nimport { missingOrEmpty } from \"../../utils/generic\";\nimport { last } from \"../../utils/array\";\nimport { ColumnModel } from \"../../columns/columnModel\";\nimport { PaginationProxy } from \"../../pagination/paginationProxy\";\nimport { PinnedRowModel } from \"../../pinnedRowModel/pinnedRowModel\";\nimport { IRangeService } from \"../../interfaces/IRangeService\";\nimport { ModuleRegistry } from \"../../modules/moduleRegistry\";\nimport { ModuleNames } from \"../../modules/moduleNames\";\nimport { IClipboardService } from \"../../interfaces/iClipboardService\";\nimport { CellCtrl } from \"../../rendering/cell/cellCtrl\";\n\nexport class RowContainerEventsFeature extends BeanStub {\n\n @Autowired('mouseEventService') private mouseEventService: MouseEventService;\n @Autowired('valueService') private valueService: ValueService;\n @Optional('contextMenuFactory') private contextMenuFactory: IContextMenuFactory;\n @Autowired('ctrlsService') private ctrlsService: CtrlsService;\n @Autowired('navigationService') private navigationService: NavigationService;\n @Autowired('focusService') private focusService: FocusService;\n @Autowired('undoRedoService') private undoRedoService: UndoRedoService;\n @Autowired('columnModel') private columnModel: ColumnModel;\n @Autowired('paginationProxy') private paginationProxy: PaginationProxy;\n @Autowired('pinnedRowModel') private pinnedRowModel: PinnedRowModel;\n @Optional('rangeService') private rangeService: IRangeService;\n @Optional('clipboardService') private clipboardService: IClipboardService;\n\n private element: HTMLElement;\n\n constructor(element: HTMLElement) {\n super();\n this.element = element;\n }\n\n @PostConstruct\n public postConstruct(): void {\n this.addMouseListeners();\n this.mockContextMenuForIPad();\n this.addKeyboardEvents();\n }\n\n private addKeyboardEvents(): void {\n const eventNames = ['keydown', 'keypress'];\n\n eventNames.forEach(eventName => {\n const listener = this.processKeyboardEvent.bind(this, eventName);\n this.addManagedListener(this.element, eventName, listener);\n });\n }\n\n private addMouseListeners(): void {\n const mouseDownEvent = isEventSupported('touchstart') ? 'touchstart' : 'mousedown';\n const eventNames = ['dblclick', 'contextmenu', 'mouseover', 'mouseout', 'click', mouseDownEvent];\n\n eventNames.forEach(eventName => {\n const listener = this.processMouseEvent.bind(this, eventName);\n this.addManagedListener(this.element, eventName, listener);\n });\n }\n\n private processMouseEvent(eventName: string, mouseEvent: MouseEvent): void {\n if (\n !this.mouseEventService.isEventFromThisGrid(mouseEvent) ||\n isStopPropagationForAgGrid(mouseEvent)\n ) {\n return;\n }\n\n const rowComp = this.getRowForEvent(mouseEvent);\n const cellCtrl = this.mouseEventService.getRenderedCellForEvent(mouseEvent)!;\n\n if (eventName === \"contextmenu\") {\n this.handleContextMenuMouseEvent(mouseEvent, null, rowComp, cellCtrl);\n } else {\n if (cellCtrl) {\n cellCtrl.onMouseEvent(eventName, mouseEvent);\n }\n if (rowComp) {\n rowComp.onMouseEvent(eventName, mouseEvent);\n }\n }\n }\n\n private mockContextMenuForIPad(): void {\n // we do NOT want this when not in iPad, otherwise we will be doing\n if (!isIOSUserAgent()) { return; }\n\n const touchListener = new TouchListener(this.element);\n const longTapListener = (event: LongTapEvent) => {\n const rowComp = this.getRowForEvent(event.touchEvent);\n const cellComp = this.mouseEventService.getRenderedCellForEvent(event.touchEvent)!;\n\n this.handleContextMenuMouseEvent(null, event.touchEvent, rowComp, cellComp);\n };\n\n this.addManagedListener(touchListener, TouchListener.EVENT_LONG_TAP, longTapListener);\n this.addDestroyFunc(() => touchListener.destroy());\n }\n\n private getRowForEvent(event: Event): RowCtrl | null {\n let sourceElement: HTMLElement | null = event.target as HTMLElement | null;\n\n while (sourceElement) {\n const rowCon = this.gridOptionsWrapper.getDomData(sourceElement, RowCtrl.DOM_DATA_KEY_ROW_CTRL);\n if (rowCon) {\n return rowCon;\n }\n\n sourceElement = sourceElement.parentElement;\n }\n\n return null;\n }\n\n private handleContextMenuMouseEvent(mouseEvent: MouseEvent | null, touchEvent: TouchEvent | null, rowComp: RowCtrl | null, cellCtrl: CellCtrl) {\n const rowNode = rowComp ? rowComp.getRowNode() : null;\n const column = cellCtrl ? cellCtrl.getColumn() : null;\n let value = null;\n\n if (column) {\n const event = mouseEvent ? mouseEvent : touchEvent;\n cellCtrl.dispatchCellContextMenuEvent(event);\n value = this.valueService.getValue(column, rowNode);\n }\n\n // if user clicked on a cell, anchor to that cell, otherwise anchor to the grid panel\n const gridBodyCon = this.ctrlsService.getGridBodyCtrl();\n const anchorToElement = cellCtrl ? cellCtrl.getGui() : gridBodyCon.getGridBodyElement();\n\n if (this.contextMenuFactory) {\n this.contextMenuFactory.onContextMenu(mouseEvent, touchEvent, rowNode, column, value, anchorToElement);\n }\n }\n\n private processKeyboardEvent(eventName: string, keyboardEvent: KeyboardEvent): void {\n const cellComp = getCtrlForEvent(this.gridOptionsWrapper, keyboardEvent, CellCtrl.DOM_DATA_KEY_CELL_CTRL);\n const rowComp = getCtrlForEvent(this.gridOptionsWrapper, keyboardEvent, RowCtrl.DOM_DATA_KEY_ROW_CTRL);\n\n if (keyboardEvent.defaultPrevented) { return; }\n if (cellComp) {\n this.processCellKeyboardEvent(cellComp, eventName, keyboardEvent);\n } else if (rowComp && rowComp.isFullWidth()) {\n this.processFullWidthRowKeyboardEvent(rowComp, eventName, keyboardEvent);\n }\n }\n\n private processCellKeyboardEvent(cellCtrl: CellCtrl, eventName: string, keyboardEvent: KeyboardEvent): void {\n const rowNode = cellCtrl.getRowNode();\n const column = cellCtrl.getColumn();\n const editing = cellCtrl.isEditing();\n\n const gridProcessingAllowed = !isUserSuppressingKeyboardEvent(this.gridOptionsWrapper, keyboardEvent, rowNode, column, editing);\n\n if (gridProcessingAllowed) {\n switch (eventName) {\n case 'keydown':\n // first see if it's a scroll key, page up / down, home / end etc\n const wasScrollKey = !editing && this.navigationService.handlePageScrollingKey(keyboardEvent);\n\n // if not a scroll key, then we pass onto cell\n if (!wasScrollKey) {\n cellCtrl.onKeyDown(keyboardEvent);\n }\n\n // perform clipboard and undo / redo operations\n this.doGridOperations(keyboardEvent, cellCtrl.isEditing());\n\n break;\n case 'keypress':\n cellCtrl.onKeyPress(keyboardEvent);\n break;\n }\n }\n\n if (eventName === 'keydown') {\n const cellKeyDownEvent: CellKeyDownEvent = cellCtrl.createEvent(keyboardEvent, Events.EVENT_CELL_KEY_DOWN);\n this.eventService.dispatchEvent(cellKeyDownEvent);\n }\n\n if (eventName === 'keypress') {\n const cellKeyPressEvent: CellKeyPressEvent = cellCtrl.createEvent(keyboardEvent, Events.EVENT_CELL_KEY_PRESS);\n this.eventService.dispatchEvent(cellKeyPressEvent);\n }\n }\n\n private processFullWidthRowKeyboardEvent(rowComp: RowCtrl, eventName: string, keyboardEvent: KeyboardEvent) {\n const rowNode = rowComp.getRowNode();\n const focusedCell = this.focusService.getFocusedCell();\n const column = (focusedCell && focusedCell.column) as Column;\n const gridProcessingAllowed = !isUserSuppressingKeyboardEvent(this.gridOptionsWrapper, keyboardEvent, rowNode, column, false);\n\n if (gridProcessingAllowed) {\n const key = keyboardEvent.key;\n if (eventName === 'keydown') {\n switch (key) {\n case KeyCode.UP:\n case KeyCode.DOWN:\n rowComp.onKeyboardNavigate(keyboardEvent);\n break;\n case KeyCode.TAB:\n rowComp.onTabKeyDown(keyboardEvent);\n default:\n }\n }\n }\n\n if (eventName === 'keydown') {\n const cellKeyDownEvent: FullWidthCellKeyDownEvent = rowComp.createRowEvent(Events.EVENT_CELL_KEY_DOWN, keyboardEvent);\n this.eventService.dispatchEvent(cellKeyDownEvent);\n }\n\n if (eventName === 'keypress') {\n const cellKeyPressEvent: FullWidthCellKeyPressEvent = rowComp.createRowEvent(Events.EVENT_CELL_KEY_PRESS, keyboardEvent);\n this.eventService.dispatchEvent(cellKeyPressEvent);\n }\n }\n\n private doGridOperations(keyboardEvent: KeyboardEvent, editing: boolean): void {\n // check if ctrl or meta key pressed\n if (!keyboardEvent.ctrlKey && !keyboardEvent.metaKey) { return; }\n\n // if the cell the event came from is editing, then we do not\n // want to do the default shortcut keys, otherwise the editor\n // (eg a text field) would not be able to do the normal cut/copy/paste\n if (editing) { return; }\n\n // for copy / paste, we don't want to execute when the event\n // was from a child grid (happens in master detail)\n if (!this.mouseEventService.isEventFromThisGrid(keyboardEvent)) { return; }\n\n switch (keyboardEvent.code) {\n case KeyCode.A:\n return this.onCtrlAndA(keyboardEvent);\n case KeyCode.C:\n return this.onCtrlAndC(keyboardEvent);\n case KeyCode.V:\n return this.onCtrlAndV();\n case KeyCode.D:\n return this.onCtrlAndD(keyboardEvent);\n case KeyCode.Z:\n return keyboardEvent.shiftKey ? this.undoRedoService.redo() : this.undoRedoService.undo();\n case KeyCode.Y:\n return this.undoRedoService.redo();\n }\n }\n\n private onCtrlAndA(event: KeyboardEvent): void {\n\n const { pinnedRowModel, paginationProxy, rangeService } = this;\n const { PINNED_BOTTOM, PINNED_TOP } = Constants;\n\n if (rangeService && paginationProxy.isRowsToRender()) {\n const [isEmptyPinnedTop, isEmptyPinnedBottom] = [\n pinnedRowModel.isEmpty(PINNED_TOP),\n pinnedRowModel.isEmpty(PINNED_BOTTOM)\n ];\n\n const floatingStart = isEmptyPinnedTop ? null : PINNED_TOP;\n let floatingEnd: string | null;\n let rowEnd: number;\n\n if (isEmptyPinnedBottom) {\n floatingEnd = null;\n rowEnd = this.paginationProxy.getRowCount() - 1;\n } else {\n floatingEnd = PINNED_BOTTOM;\n rowEnd = pinnedRowModel.getPinnedBottomRowData().length - 1;\n }\n\n const allDisplayedColumns = this.columnModel.getAllDisplayedColumns();\n if (missingOrEmpty(allDisplayedColumns)) { return; }\n\n rangeService.setCellRange({\n rowStartIndex: 0,\n rowStartPinned: floatingStart,\n rowEndIndex: rowEnd,\n rowEndPinned: floatingEnd,\n columnStart: allDisplayedColumns[0],\n columnEnd: last(allDisplayedColumns)\n });\n }\n event.preventDefault();\n }\n\n private onCtrlAndC(event: KeyboardEvent): void {\n\n if (!this.clipboardService || this.gridOptionsWrapper.isEnableCellTextSelection()) { return; }\n\n this.clipboardService.copyToClipboard();\n event.preventDefault();\n }\n\n private onCtrlAndV(): void {\n if (ModuleRegistry.isRegistered(ModuleNames.ClipboardModule) && !this.gridOptionsWrapper.isSuppressClipboardPaste()) {\n this.clipboardService.pasteFromClipboard();\n }\n }\n\n private onCtrlAndD(event: KeyboardEvent): void {\n if (ModuleRegistry.isRegistered(ModuleNames.ClipboardModule) && !this.gridOptionsWrapper.isSuppressClipboardPaste()) {\n this.clipboardService.copyRangeDown();\n }\n event.preventDefault();\n }\n\n}","import { BeanStub } from \"../context/beanStub\";\nimport { Autowired, PostConstruct } from \"../context/context\";\nimport { ColumnModel } from \"../columns/columnModel\";\nimport { ScrollVisibleService, SetScrollsVisibleParams } from \"../gridBodyComp/scrollVisibleService\";\nimport { GridBodyCtrl } from \"./gridBodyCtrl\";\nimport { BodyHeightChangedEvent, Events } from \"../events\";\nimport { ColumnApi } from \"../columns/columnApi\";\nimport { GridApi } from \"../gridApi\";\nimport { CtrlsService } from \"../ctrlsService\";\nimport { RowContainerCtrl } from \"./rowContainer/rowContainerCtrl\";\nimport { getInnerHeight } from \"../utils/dom\";\n\n// listens to changes in the center viewport size, for column and row virtualisation,\n// and adjusts grid as necessary. there are two viewports, one for horizontal and one for\n// vertical scrolling.\nexport class ViewportSizeFeature extends BeanStub {\n\n @Autowired('ctrlsService') private ctrlsService: CtrlsService;\n @Autowired('columnModel') private columnModel: ColumnModel;\n @Autowired('scrollVisibleService') private scrollVisibleService: ScrollVisibleService;\n @Autowired('columnApi') private columnApi: ColumnApi;\n @Autowired('gridApi') private gridApi: GridApi;\n\n private centerContainerCtrl: RowContainerCtrl;\n private gridBodyCtrl: GridBodyCtrl;\n\n private centerWidth: number;\n private bodyHeight: number;\n\n constructor(centerContainerCtrl: RowContainerCtrl) {\n super();\n this.centerContainerCtrl = centerContainerCtrl;\n }\n\n @PostConstruct\n private postConstruct(): void {\n this.ctrlsService.whenReady(() => {\n this.gridBodyCtrl = this.ctrlsService.getGridBodyCtrl();\n this.listenForResize();\n });\n this.addManagedListener(this.eventService, Events.EVENT_SCROLLBAR_WIDTH_CHANGED, this.onScrollbarWidthChanged.bind(this));\n }\n\n private listenForResize(): void {\n const listener = ()=> this.onCenterViewportResized();\n\n // centerContainer gets horizontal resizes\n this.centerContainerCtrl.registerViewportResizeListener(listener);\n\n // eBodyViewport gets vertical resizes\n this.gridBodyCtrl.registerBodyViewportResizeListener(listener);\n }\n\n private onScrollbarWidthChanged() {\n this.checkViewportAndScrolls();\n }\n\n private onCenterViewportResized(): void {\n if (this.centerContainerCtrl.isViewportVisible()) {\n this.checkViewportAndScrolls();\n\n const newWidth = this.centerContainerCtrl.getCenterWidth();\n\n if (newWidth !== this.centerWidth) {\n this.centerWidth = newWidth;\n this.columnModel.refreshFlexedColumns(\n { viewportWidth: this.centerWidth, updateBodyWidths: true, fireResizedEvent: true }\n );\n }\n } else {\n this.bodyHeight = 0;\n }\n }\n\n // gets called every time the viewport size changes. we use this to check visibility of scrollbars\n // in the grid panel, and also to check size and position of viewport for row and column virtualisation.\n private checkViewportAndScrolls(): void {\n // results in updating anything that depends on scroll showing\n this.updateScrollVisibleService();\n\n // fires event if height changes, used by PaginationService, HeightScalerService, RowRenderer\n this.checkBodyHeight();\n\n // check for virtual columns for ColumnController\n this.onHorizontalViewportChanged();\n\n this.gridBodyCtrl.getScrollFeature().checkScrollLeft();\n }\n\n public getBodyHeight(): number {\n return this.bodyHeight;\n }\n\n private checkBodyHeight(): void {\n const eBodyViewport = this.gridBodyCtrl.getBodyViewportElement();\n const bodyHeight = getInnerHeight(eBodyViewport);\n\n if (this.bodyHeight !== bodyHeight) {\n this.bodyHeight = bodyHeight;\n const event: BodyHeightChangedEvent = {\n type: Events.EVENT_BODY_HEIGHT_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event);\n }\n }\n\n private updateScrollVisibleService(): void {\n // because of column animation (which takes 200ms), we have to do this twice.\n // eg if user removes cols anywhere except at the RHS, then the cols on the RHS\n // will animate to the left to fill the gap. this animation means just after\n // the cols are removed, the remaining cols are still in the original location\n // at the start of the animation, so pre animation the H scrollbar is still needed,\n // but post animation it is not.\n this.updateScrollVisibleServiceImpl();\n setTimeout(this.updateScrollVisibleServiceImpl.bind(this), 500);\n }\n\n private updateScrollVisibleServiceImpl(): void {\n const params: SetScrollsVisibleParams = {\n horizontalScrollShowing: this.isHorizontalScrollShowing(),\n verticalScrollShowing: this.gridBodyCtrl.isVerticalScrollShowing()\n };\n\n this.scrollVisibleService.setScrollsVisible(params);\n\n // fix - gridComp should just listen to event from above\n this.gridBodyCtrl.setVerticalScrollPaddingVisible(params.verticalScrollShowing);\n }\n\n private isHorizontalScrollShowing(): boolean {\n const isAlwaysShowHorizontalScroll = this.gridOptionsWrapper.isAlwaysShowHorizontalScroll();\n return isAlwaysShowHorizontalScroll || this.centerContainerCtrl.isViewportHScrollShowing();\n }\n\n // this gets called whenever a change in the viewport, so we can inform column controller it has to work\n // out the virtual columns again. gets called from following locations:\n // + ensureColVisible, scroll, init, layoutChanged, displayedColumnsChanged, API (doLayout)\n private onHorizontalViewportChanged(): void {\n const scrollWidth = this.centerContainerCtrl.getCenterWidth();\n const scrollPosition = this.centerContainerCtrl.getViewportScrollLeft();\n\n this.columnModel.setViewportPosition(scrollWidth, scrollPosition);\n }\n}","import { BeanStub } from \"../../context/beanStub\";\nimport { Autowired, PostConstruct } from \"../../context/context\";\nimport { Events } from \"../../eventKeys\";\nimport { setDisplayed, setFixedWidth } from \"../../utils/dom\";\nimport { PinnedWidthService } from \"../pinnedWidthService\";\n\nexport class SetPinnedLeftWidthFeature extends BeanStub {\n\n @Autowired('pinnedWidthService') private pinnedWidthService: PinnedWidthService;\n\n private element: HTMLElement;\n\n constructor(element: HTMLElement) {\n super();\n this.element = element;\n }\n\n @PostConstruct\n private postConstruct(): void {\n this.addManagedListener(this.eventService, Events.EVENT_LEFT_PINNED_WIDTH_CHANGED, this.onPinnedLeftWidthChanged.bind(this));\n }\n\n private onPinnedLeftWidthChanged(): void {\n const leftWidth = this.pinnedWidthService.getPinnedLeftWidth();\n const displayed = leftWidth > 0;\n setDisplayed(this.element, displayed);\n if (displayed) {\n setFixedWidth(this.element, leftWidth);\n }\n }\n}","import { Autowired, PostConstruct } from \"../../context/context\";\nimport { PinnedWidthService } from \"../pinnedWidthService\";\nimport { Events } from \"../../eventKeys\";\nimport { setDisplayed, setFixedWidth } from \"../../utils/dom\";\nimport { BeanStub } from \"../../context/beanStub\";\n\nexport class SetPinnedRightWidthFeature extends BeanStub {\n\n @Autowired('pinnedWidthService') private pinnedWidthService: PinnedWidthService;\n\n private element: HTMLElement;\n\n constructor(element: HTMLElement) {\n super();\n this.element = element;\n }\n\n @PostConstruct\n private postConstruct(): void {\n this.addManagedListener(this.eventService, Events.EVENT_RIGHT_PINNED_WIDTH_CHANGED, this.onPinnedRightWidthChanged.bind(this));\n }\n\n private onPinnedRightWidthChanged(): void {\n const rightWidth = this.pinnedWidthService.getPinnedRightWidth();\n const displayed = rightWidth > 0;\n setDisplayed(this.element, displayed);\n if (displayed) {\n setFixedWidth(this.element, rightWidth);\n }\n }\n}","import { BeanStub } from \"../../context/beanStub\";\nimport { Autowired, PostConstruct } from \"../../context/context\";\nimport { RowContainerHeightService } from \"../../rendering/rowContainerHeightService\";\nimport { Events } from \"../../eventKeys\";\n\nexport class SetHeightFeature extends BeanStub {\n\n @Autowired(\"rowContainerHeightService\") private maxDivHeightScaler: RowContainerHeightService;\n\n private eContainer: HTMLElement;\n private eWrapper: HTMLElement;\n\n constructor(eContainer: HTMLElement, eWrapper: HTMLElement) {\n super();\n this.eContainer = eContainer;\n this.eWrapper = eWrapper;\n }\n\n @PostConstruct\n private postConstruct(): void {\n this.addManagedListener(this.eventService, Events.EVENT_ROW_CONTAINER_HEIGHT_CHANGED, this.onHeightChanged.bind(this));\n }\n\n private onHeightChanged(): void {\n const height = this.maxDivHeightScaler.getUiContainerHeight();\n const heightString = height != null ? `${height}px` : ``;\n\n this.eContainer.style.height = heightString;\n if (this.eWrapper) {\n this.eWrapper.style.height = heightString;\n }\n }\n}","import { BeanStub } from \"../../context/beanStub\";\nimport { missing } from \"../../utils/generic\";\nimport { Autowired, Optional, PostConstruct } from \"../../context/context\";\nimport { IRangeService } from \"../../interfaces/IRangeService\";\nimport { DragListenerParams, DragService } from \"../../dragAndDrop/dragService\";\n\nexport class DragListenerFeature extends BeanStub {\n\n @Optional('rangeService') private rangeService: IRangeService;\n @Autowired('dragService') private dragService: DragService;\n\n private eContainer: HTMLElement;\n\n constructor(eContainer: HTMLElement) {\n super();\n this.eContainer = eContainer;\n }\n\n @PostConstruct\n private postConstruct(): void {\n if (\n !this.gridOptionsWrapper.isEnableRangeSelection() || // no range selection if no property\n missing(this.rangeService) // no range selection if not enterprise version\n ) {\n return;\n }\n\n const params: DragListenerParams = {\n dragStartPixels: 0,\n eElement: this.eContainer,\n onDragStart: this.rangeService.onDragStart.bind(this.rangeService),\n onDragStop: this.rangeService.onDragStop.bind(this.rangeService),\n onDragging: this.rangeService.onDragging.bind(this.rangeService)\n };\n\n this.dragService.addDragSource(params);\n this.addDestroyFunc(() => this.dragService.removeDragSource(params));\n }\n\n}","import { BeanStub } from \"../context/beanStub\";\nimport { Autowired, PostConstruct } from \"../context/context\";\nimport { ColumnModel } from \"../columns/columnModel\";\nimport { GridOptionsWrapper } from \"../gridOptionsWrapper\";\nimport { Constants } from \"../constants/constants\";\nimport { Events } from \"../eventKeys\";\n\nexport class CenterWidthFeature extends BeanStub {\n\n @Autowired('columnModel') private columnModel: ColumnModel;\n\n private callback: (width: number) => void;\n\n constructor(callback: (width: number) => void) {\n super();\n this.callback = callback;\n }\n\n @PostConstruct\n private postConstruct(): void {\n const listener = this.setWidth.bind(this);\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_DOM_LAYOUT, listener);\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, listener);\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, listener);\n\n this.setWidth();\n }\n\n private setWidth(): void {\n const {columnModel} = this;\n\n const printLayout = this.gridOptionsWrapper.getDomLayout() === Constants.DOM_LAYOUT_PRINT;\n\n const centerWidth = columnModel.getBodyContainerWidth();\n const leftWidth = columnModel.getDisplayedColumnsLeftWidth();\n const rightWidth = columnModel.getDisplayedColumnsRightWidth();\n\n const totalWidth = printLayout ? centerWidth + leftWidth + rightWidth : centerWidth;\n\n this.callback(totalWidth);\n }\n}","import { Autowired, Optional, PostConstruct } from '../context/context';\nimport { GridHeaderComp } from '../headerRendering/gridHeaderComp';\nimport { IRangeService } from '../interfaces/IRangeService';\nimport { ResizeObserverService } from '../misc/resizeObserverService';\nimport { LayoutCssClasses } from \"../styling/layoutFeature\";\nimport { setAriaColCount, setAriaMultiSelectable, setAriaRowCount } from '../utils/aria';\nimport { Component } from '../widgets/component';\nimport { RefSelector } from '../widgets/componentAnnotations';\nimport {\n CSS_CLASS_CELL_SELECTABLE,\n CSS_CLASS_COLUMN_MOVING,\n CSS_CLASS_FORCE_VERTICAL_SCROLL,\n GridBodyCtrl,\n IGridBodyComp,\n RowAnimationCssClasses\n} from \"./gridBodyCtrl\";\nimport { RowContainerName } from \"./rowContainer/rowContainerCtrl\";\n\nconst GRID_BODY_TEMPLATE = /* html */\n `
\n \n
\n \n \n \n \n
\n
\n \n \n \n \n
\n
\n \n \n \n \n
\n \n \n
`;\n\nexport class GridBodyComp extends Component {\n\n @Autowired('resizeObserverService') private resizeObserverService: ResizeObserverService;\n\n @Optional('rangeService') private rangeService: IRangeService;\n\n @RefSelector('eBodyViewport') private eBodyViewport: HTMLElement;\n @RefSelector('eTop') private eTop: HTMLElement;\n @RefSelector('eBottom') private eBottom: HTMLElement;\n @RefSelector('gridHeader') headerRootComp: GridHeaderComp;\n\n private ctrl: GridBodyCtrl;\n\n constructor() {\n super(GRID_BODY_TEMPLATE);\n }\n\n @PostConstruct\n private init() {\n\n const setHeight = (height: number, element: HTMLElement) => {\n const heightString = `${height}px`;\n element.style.minHeight = heightString;\n element.style.height = heightString;\n };\n\n const compProxy: IGridBodyComp = {\n setRowAnimationCssOnBodyViewport: (cssClass, animate) => this.setRowAnimationCssOnBodyViewport(cssClass, animate),\n setColumnCount: count => setAriaColCount(this.getGui(), count),\n setRowCount: count => setAriaRowCount(this.getGui(), count),\n setTopHeight: height => setHeight(height, this.eTop),\n setBottomHeight: height => setHeight(height, this.eBottom),\n setTopDisplay: display => this.eTop.style.display = display,\n setBottomDisplay: display => this.eBottom.style.display = display,\n setColumnMovingCss: (cssClass, flag) => this.addOrRemoveCssClass(CSS_CLASS_COLUMN_MOVING, flag),\n updateLayoutClasses: (cssClass, params) => {\n const bodyViewportClassList = this.eBodyViewport.classList;\n bodyViewportClassList.toggle(LayoutCssClasses.AUTO_HEIGHT, params.autoHeight);\n bodyViewportClassList.toggle(LayoutCssClasses.NORMAL, params.normal);\n bodyViewportClassList.toggle(LayoutCssClasses.PRINT, params.print);\n\n this.addOrRemoveCssClass(LayoutCssClasses.AUTO_HEIGHT, params.autoHeight);\n this.addOrRemoveCssClass(LayoutCssClasses.NORMAL, params.normal);\n this.addOrRemoveCssClass(LayoutCssClasses.PRINT, params.print);\n },\n setAlwaysVerticalScrollClass: (cssClass, on) =>\n this.eBodyViewport.classList.toggle(CSS_CLASS_FORCE_VERTICAL_SCROLL, on),\n registerBodyViewportResizeListener: listener => {\n const unsubscribeFromResize = this.resizeObserverService.observeResize(this.eBodyViewport, listener);\n this.addDestroyFunc(() => unsubscribeFromResize());\n },\n setPinnedTopBottomOverflowY: overflow => this.eTop.style.overflowY = this.eBottom.style.overflowY = overflow,\n setCellSelectableCss: (cssClass, selectable) => {\n [this.eTop, this.eBodyViewport, this.eBottom]\n .forEach(ct => ct.classList.toggle(CSS_CLASS_CELL_SELECTABLE, selectable));\n },\n };\n\n this.ctrl = this.createManagedBean(new GridBodyCtrl());\n this.ctrl.setComp(compProxy, this.getGui(), this.eBodyViewport, this.eTop, this.eBottom);\n\n if (this.rangeService || this.gridOptionsWrapper.isRowSelectionMulti()) {\n setAriaMultiSelectable(this.getGui(), true);\n }\n }\n\n private setRowAnimationCssOnBodyViewport(cssClass: string, animateRows: boolean): void {\n const bodyViewportClassList = this.eBodyViewport.classList;\n bodyViewportClassList.toggle(RowAnimationCssClasses.ANIMATION_ON, animateRows);\n bodyViewportClassList.toggle(RowAnimationCssClasses.ANIMATION_OFF, !animateRows);\n }\n\n public getFloatingTopBottom(): HTMLElement[] {\n return [this.eTop, this.eBottom];\n }\n}\n","import { Bean, Autowired, PostConstruct } from \"../context/context\";\nimport { BeanStub } from \"../context/beanStub\";\nimport { Events, ScrollVisibilityChangedEvent } from \"../events\";\nimport { ColumnApi } from \"../columns/columnApi\";\nimport { GridApi } from \"../gridApi\";\nimport { CtrlsService } from \"../ctrlsService\";\n\nexport interface SetScrollsVisibleParams {\n horizontalScrollShowing: boolean;\n verticalScrollShowing: boolean;\n}\n\n@Bean('scrollVisibleService')\nexport class ScrollVisibleService extends BeanStub {\n\n @Autowired('columnApi') private columnApi: ColumnApi;\n @Autowired('gridApi') private gridApi: GridApi;\n @Autowired('ctrlsService') public ctrlsService: CtrlsService;\n\n private horizontalScrollShowing: boolean;\n private verticalScrollShowing: boolean;\n\n @PostConstruct\n private postConstruct(): void {\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, this.onDisplayedColumnsChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, this.onDisplayedColumnsWidthChanged.bind(this));\n\n }\n\n public onDisplayedColumnsChanged(): void {\n this.update();\n }\n\n private onDisplayedColumnsWidthChanged(): void {\n this.update();\n }\n\n private update(): void {\n // because of column animation (which takes 200ms), we have to do this twice.\n // eg if user removes cols anywhere except at the RHS, then the cols on the RHS\n // will animate to the left to fill the gap. this animation means just after\n // the cols are removed, the remaining cols are still in the original location\n // at the start of the animation, so pre animation the H scrollbar is still needed,\n // but post animation it is not.\n this.updateImpl();\n setTimeout(this.updateImpl.bind(this), 500);\n }\n\n private updateImpl(): void {\n const centerRowCtrl = this.ctrlsService.getCenterRowContainerCtrl();\n\n if (!centerRowCtrl) { return; }\n\n const params: SetScrollsVisibleParams = {\n horizontalScrollShowing: centerRowCtrl.isHorizontalScrollShowing(),\n verticalScrollShowing: this.isVerticalScrollShowing()\n };\n\n this.setScrollsVisible(params);\n }\n\n public setScrollsVisible(params: SetScrollsVisibleParams): void {\n const atLeastOneDifferent =\n this.horizontalScrollShowing !== params.horizontalScrollShowing ||\n this.verticalScrollShowing !== params.verticalScrollShowing;\n\n if (atLeastOneDifferent) {\n this.horizontalScrollShowing = params.horizontalScrollShowing;\n this.verticalScrollShowing = params.verticalScrollShowing;\n\n const event: ScrollVisibilityChangedEvent = {\n type: Events.EVENT_SCROLL_VISIBILITY_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event);\n }\n }\n\n // used by pagination service - to know page height\n public isHorizontalScrollShowing(): boolean {\n return this.horizontalScrollShowing;\n }\n\n // used by header container\n public isVerticalScrollShowing(): boolean {\n return this.verticalScrollShowing;\n }\n}\n","import { Bean } from \"../context/context\";\nimport { Autowired } from \"../context/context\";\nimport { CellPosition } from \"../entities/cellPosition\";\nimport { NumberSequence } from '../utils';\nimport { Constants } from \"../constants/constants\";\nimport { DraggingEvent } from \"../dragAndDrop/dragAndDropService\";\nimport { BeanStub } from \"../context/beanStub\";\nimport { getCtrlForEvent } from \"../utils/event\";\nimport { exists } from \"../utils/generic\";\nimport { CtrlsService } from \"../ctrlsService\";\nimport { CellCtrl } from \"../rendering/cell/cellCtrl\";\n\n@Bean('mouseEventService')\nexport class MouseEventService extends BeanStub {\n\n @Autowired('ctrlsService') private ctrlsService: CtrlsService;\n\n private static gridInstanceSequence = new NumberSequence();\n private static GRID_DOM_KEY = '__ag_grid_instance';\n\n private gridInstanceId = MouseEventService.gridInstanceSequence.next();\n\n // we put the instance id onto the main DOM element. this is used for events, when grids are inside grids,\n // so the grid can work out if the even came from this grid or a grid inside this one. see the ctrl+v logic\n // for where this is used.\n public stampTopLevelGridCompWithGridInstance(eGridDiv: HTMLElement): void {\n (eGridDiv as any)[MouseEventService.GRID_DOM_KEY] = this.gridInstanceId;\n }\n\n public getRenderedCellForEvent(event: Event): CellCtrl | null {\n return getCtrlForEvent(this.gridOptionsWrapper, event, CellCtrl.DOM_DATA_KEY_CELL_CTRL);\n }\n\n // walks the path of the event, and returns true if this grid is the first one that it finds. if doing\n // master / detail grids, and a child grid is found, then it returns false. this stops things like copy/paste\n // getting executed on many grids at the same time.\n public isEventFromThisGrid(event: UIEvent): boolean {\n const res = this.isElementInThisGrid(event.target as HTMLElement);\n return res;\n }\n\n public isElementInThisGrid(element: HTMLElement): boolean {\n let pointer: HTMLElement | null = element;\n while (pointer) {\n const instanceId = (pointer as any)[MouseEventService.GRID_DOM_KEY];\n if (exists(instanceId)) {\n const eventFromThisGrid = instanceId === this.gridInstanceId;\n return eventFromThisGrid;\n }\n pointer = pointer.parentElement;\n }\n return false;\n }\n\n public getCellPositionForEvent(event: MouseEvent | KeyboardEvent): CellPosition | null {\n const cellComp = this.getRenderedCellForEvent(event);\n return cellComp ? cellComp.getCellPosition() : null;\n }\n\n public getNormalisedPosition(event: MouseEvent | DraggingEvent): { x: number, y: number; } {\n const gridPanelHasScrolls = this.gridOptionsWrapper.getDomLayout() === Constants.DOM_LAYOUT_NORMAL;\n const e = event as MouseEvent;\n let x: number;\n let y: number;\n\n if (e.clientX != null || e.clientY != null) {\n x = e.clientX;\n y = e.clientY;\n } else {\n x = e.x;\n y = e.y;\n }\n\n if (gridPanelHasScrolls) {\n const gridBodyCon = this.ctrlsService.getGridBodyCtrl();\n const vRange = gridBodyCon.getScrollFeature().getVScrollPosition();\n const hRange = gridBodyCon.getScrollFeature().getHScrollPosition();\n x += hRange.left;\n y += vRange.top;\n }\n\n return { x, y };\n }\n\n}\n","import { Autowired, Bean, Optional, PostConstruct } from \"../context/context\";\nimport { CellPosition } from \"../entities/cellPosition\";\nimport { MouseEventService } from \"./mouseEventService\";\nimport { PaginationProxy } from \"../pagination/paginationProxy\";\nimport { Column } from \"../entities/column\";\nimport { FocusService } from \"../focusService\";\nimport { AnimationFrameService } from \"../misc/animationFrameService\";\nimport { IRangeService } from \"../interfaces/IRangeService\";\nimport { ColumnModel } from \"../columns/columnModel\";\nimport { BeanStub } from \"../context/beanStub\";\nimport { exists, missing } from \"../utils/generic\";\nimport { last } from \"../utils/array\";\nimport { KeyCode } from '../constants/keyCode';\nimport { CtrlsService } from \"../ctrlsService\";\nimport { GridBodyCtrl } from \"./gridBodyCtrl\";\nimport { CellCtrl } from \"../rendering/cell/cellCtrl\";\nimport { RowCtrl } from \"../rendering/row/rowCtrl\";\nimport { doOnce, throttle } from \"../utils/function\";\nimport { Constants } from \"../constants/constants\";\nimport { RowPosition, RowPositionUtils } from \"../entities/rowPosition\";\nimport { RowRenderer } from \"../rendering/rowRenderer\";\nimport { HeaderNavigationService } from \"../headerRendering/common/headerNavigationService\";\nimport { CellNavigationService } from \"../cellNavigationService\";\nimport { PinnedRowModel } from \"../pinnedRowModel/pinnedRowModel\";\nimport { NavigateToNextCellParams, TabToNextCellParams } from \"../entities/iCallbackParams\";\nimport { WithoutGridCommon } from \"../interfaces/iCommon\";\nimport { Events } from \"../eventKeys\";\nimport { FullWidthRowFocusedEvent } from \"../events\";\nimport { GridApi } from \"../gridApi\";\nimport { ColumnApi } from \"../columns/columnApi\";\n\ninterface NavigateParams {\n /** The rowIndex to vertically scroll to. */\n scrollIndex: number;\n /** The position to put scroll index. */\n scrollType: 'top' | 'bottom' | null;\n /** The column to horizontally scroll to. */\n scrollColumn: Column | null;\n /** For page up/down, we want to scroll to one row/column but focus another (ie. scrollRow could be stub). */\n focusIndex: number;\n focusColumn: Column;\n}\n\n@Bean('navigationService')\nexport class NavigationService extends BeanStub {\n\n @Autowired('columnApi') private readonly columnApi: ColumnApi;\n @Autowired('gridApi') private readonly gridApi: GridApi;\n @Autowired('mouseEventService') private mouseEventService: MouseEventService;\n @Autowired('paginationProxy') private paginationProxy: PaginationProxy;\n @Autowired('focusService') private focusService: FocusService;\n @Autowired('animationFrameService') private animationFrameService: AnimationFrameService;\n @Optional('rangeService') private rangeService: IRangeService;\n @Autowired('columnModel') private columnModel: ColumnModel;\n @Autowired('ctrlsService') public ctrlsService: CtrlsService;\n @Autowired('rowRenderer') public rowRenderer: RowRenderer;\n @Autowired('headerNavigationService') public headerNavigationService: HeaderNavigationService;\n @Autowired(\"rowPositionUtils\") private rowPositionUtils: RowPositionUtils;\n @Autowired(\"cellNavigationService\") private cellNavigationService: CellNavigationService;\n @Autowired(\"pinnedRowModel\") private pinnedRowModel: PinnedRowModel;\n\n private gridBodyCon: GridBodyCtrl;\n\n constructor() {\n super();\n this.onPageDown = throttle(this.onPageDown, 100);\n this.onPageUp = throttle(this.onPageUp, 100);\n }\n\n @PostConstruct\n private postConstruct(): void {\n this.ctrlsService.whenReady(p => {\n this.gridBodyCon = p.gridBodyCtrl;\n });\n }\n\n public handlePageScrollingKey(event: KeyboardEvent): boolean {\n const key = event.key;\n const alt = event.altKey;\n const ctrl = event.ctrlKey || event.metaKey;\n const rangeServiceShouldHandleShift = !!this.rangeService && event.shiftKey;\n\n const currentCell: CellPosition | null = this.mouseEventService.getCellPositionForEvent(event);\n if (!currentCell) { return false; }\n\n let processed = false;\n\n switch (key) {\n case KeyCode.PAGE_HOME:\n case KeyCode.PAGE_END:\n // handle home and end when ctrl & alt are NOT pressed\n if (!ctrl && !alt) {\n this.onHomeOrEndKey(key);\n processed = true;\n }\n break;\n case KeyCode.LEFT:\n case KeyCode.RIGHT:\n case KeyCode.UP:\n case KeyCode.DOWN:\n // handle when ctrl is pressed only, if shift is pressed\n // it will be handled by the rangeService\n if (ctrl && !alt && !rangeServiceShouldHandleShift) {\n this.onCtrlUpDownLeftRight(key, currentCell);\n processed = true;\n }\n break;\n case KeyCode.PAGE_DOWN:\n // handle page up and page down when ctrl & alt are NOT pressed\n if (!ctrl && !alt) {\n this.onPageDown(currentCell);\n processed = true;\n }\n break;\n case KeyCode.PAGE_UP:\n // handle page up and page down when ctrl & alt are NOT pressed\n if (!ctrl && !alt) {\n this.onPageUp(currentCell);\n processed = true;\n }\n break;\n }\n\n if (processed) {\n event.preventDefault();\n }\n\n return processed;\n }\n\n private navigateTo(navigateParams: NavigateParams): void {\n const { scrollIndex, scrollType, scrollColumn, focusIndex, focusColumn } = navigateParams;\n\n if (exists(scrollColumn) && !scrollColumn.isPinned()) {\n this.gridBodyCon.getScrollFeature().ensureColumnVisible(scrollColumn);\n }\n\n if (exists(scrollIndex)) {\n this.gridBodyCon.getScrollFeature().ensureIndexVisible(scrollIndex, scrollType);\n }\n\n // make sure the cell is rendered, needed if we are to focus\n this.animationFrameService.flushAllFrames();\n\n // if we don't do this, the range will be left on the last cell, which will leave the last focused cell\n // highlighted.\n this.focusService.setFocusedCell(focusIndex, focusColumn, null, true);\n\n if (this.rangeService) {\n const cellPosition: CellPosition = { rowIndex: focusIndex, rowPinned: null, column: focusColumn };\n this.rangeService.setRangeToCell(cellPosition);\n }\n }\n\n private onPageDown(gridCell: CellPosition): void {\n const gridBodyCon = this.ctrlsService.getGridBodyCtrl();\n const scrollPosition = gridBodyCon.getScrollFeature().getVScrollPosition();\n const pixelsInOnePage = this.getViewportHeight();\n\n const pagingPixelOffset = this.paginationProxy.getPixelOffset();\n\n const currentPageBottomPixel = scrollPosition.top + pixelsInOnePage;\n const currentPageBottomRow = this.paginationProxy.getRowIndexAtPixel(currentPageBottomPixel + pagingPixelOffset);\n\n if (this.columnModel.isAutoRowHeightActive()) {\n this.navigateToNextPageWithAutoHeight(gridCell, currentPageBottomRow);\n } else {\n this.navigateToNextPage(gridCell, currentPageBottomRow);\n }\n }\n\n private onPageUp(gridCell: CellPosition): void {\n const gridBodyCon = this.ctrlsService.getGridBodyCtrl();\n const scrollPosition = gridBodyCon.getScrollFeature().getVScrollPosition();\n\n const pagingPixelOffset = this.paginationProxy.getPixelOffset();\n\n const currentPageTopPixel = scrollPosition.top;\n const currentPageTopRow = this.paginationProxy.getRowIndexAtPixel(currentPageTopPixel + pagingPixelOffset);\n\n if (this.columnModel.isAutoRowHeightActive()) {\n this.navigateToNextPageWithAutoHeight(gridCell, currentPageTopRow, true);\n } else {\n this.navigateToNextPage(gridCell, currentPageTopRow, true);\n }\n }\n\n private navigateToNextPage(gridCell: CellPosition, scrollIndex: number, up: boolean = false): void {\n const pixelsInOnePage = this.getViewportHeight();\n const firstRow = this.paginationProxy.getPageFirstRow();\n const lastRow = this.paginationProxy.getPageLastRow();\n const pagingPixelOffset = this.paginationProxy.getPixelOffset();\n const currentRowNode = this.paginationProxy.getRow(gridCell.rowIndex);\n\n const rowPixelDiff = up\n ? (currentRowNode?.rowHeight! - pixelsInOnePage - pagingPixelOffset)\n : (pixelsInOnePage - pagingPixelOffset);\n\n const nextCellPixel = currentRowNode?.rowTop! + rowPixelDiff;\n\n let focusIndex = this.paginationProxy.getRowIndexAtPixel(nextCellPixel + pagingPixelOffset);\n\n if (focusIndex === gridCell.rowIndex) {\n const diff = up ? -1 : 1;\n scrollIndex = focusIndex = gridCell.rowIndex + diff;\n }\n\n let scrollType: 'top' | 'bottom';\n\n if (up) {\n scrollType = 'bottom';\n if (focusIndex < firstRow) { focusIndex = firstRow; }\n if (scrollIndex < firstRow) { scrollIndex = firstRow; }\n } else {\n scrollType = 'top';\n if (focusIndex > lastRow) { focusIndex = lastRow; }\n if (scrollIndex > lastRow) { scrollIndex = lastRow; }\n }\n\n if (this.isRowTallerThanView(focusIndex)) {\n scrollIndex = focusIndex;\n scrollType = 'top';\n }\n\n this.navigateTo({\n scrollIndex,\n scrollType,\n scrollColumn: null,\n focusIndex,\n focusColumn: gridCell.column\n });\n }\n\n private navigateToNextPageWithAutoHeight(gridCell: CellPosition, scrollIndex: number, up: boolean = false): void {\n // because autoHeight will calculate the height of rows after scroll\n // first we scroll towards the required point, then we add a small\n // delay to allow the height to be recalculated, check which index\n // should be focused and then finally navigate to that index.\n // TODO: we should probably have an event fired once to scrollbar has\n // settled and all rowHeights have been calculated instead of relying\n // on a setTimeout of 50ms.\n this.navigateTo({\n scrollIndex: scrollIndex,\n scrollType: up ? 'bottom' : 'top',\n scrollColumn: null,\n focusIndex: scrollIndex,\n focusColumn: gridCell.column\n });\n setTimeout(() => {\n const focusIndex = this.getNextFocusIndexForAutoHeight(gridCell, up);\n\n this.navigateTo({\n scrollIndex: scrollIndex,\n scrollType: up ? 'bottom' : 'top',\n scrollColumn: null,\n focusIndex: focusIndex,\n focusColumn: gridCell.column\n });\n }, 50);\n }\n\n private getNextFocusIndexForAutoHeight(gridCell: CellPosition, up: boolean = false): number {\n const step = up ? -1 : 1;\n const pixelsInOnePage = this.getViewportHeight();\n const lastRowIndex = this.paginationProxy.getPageLastRow();\n\n let pixelSum = 0;\n let currentIndex = gridCell.rowIndex;\n\n while (currentIndex >= 0 && currentIndex <= lastRowIndex) {\n const currentCell = this.paginationProxy.getRow(currentIndex);\n\n if (currentCell) {\n const currentCellHeight = currentCell.rowHeight ?? 0;\n\n if (pixelSum + currentCellHeight > pixelsInOnePage) { break; }\n pixelSum += currentCellHeight;\n }\n\n currentIndex += step;\n }\n\n return Math.max(0, Math.min(currentIndex, lastRowIndex));\n }\n\n private getViewportHeight(): number {\n const gridBodyCon = this.ctrlsService.getGridBodyCtrl();\n const scrollPosition = gridBodyCon.getScrollFeature().getVScrollPosition();\n const scrollbarWidth = this.gridOptionsWrapper.getScrollbarWidth();\n let pixelsInOnePage = scrollPosition.bottom - scrollPosition.top;\n\n if (this.ctrlsService.getCenterRowContainerCtrl().isHorizontalScrollShowing()) {\n pixelsInOnePage -= scrollbarWidth;\n }\n\n return pixelsInOnePage;\n }\n\n private isRowTallerThanView(rowIndex: number): boolean {\n const rowNode = this.paginationProxy.getRow(rowIndex);\n if (!rowNode) { return false; }\n\n const rowHeight = rowNode.rowHeight;\n\n if (typeof rowHeight !== 'number') { return false; }\n\n return rowHeight > this.getViewportHeight();\n }\n\n private onCtrlUpDownLeftRight(key: string, gridCell: CellPosition): void {\n const cellToFocus = this.cellNavigationService.getNextCellToFocus(key, gridCell, true)!;\n const { rowIndex, column } = cellToFocus;\n\n this.navigateTo({\n scrollIndex: rowIndex,\n scrollType: null,\n scrollColumn: column,\n focusIndex: rowIndex,\n focusColumn: column\n });\n }\n\n // home brings focus to top left cell, end brings focus to bottom right, grid scrolled to bring\n // same cell into view (which means either scroll all the way up, or all the way down).\n private onHomeOrEndKey(key: string): void {\n const homeKey = key === KeyCode.PAGE_HOME;\n const allColumns: Column[] = this.columnModel.getAllDisplayedColumns();\n const columnToSelect = homeKey ? allColumns[0] : last(allColumns);\n const scrollIndex = homeKey ? this.paginationProxy.getPageFirstRow() : this.paginationProxy.getPageLastRow();\n\n this.navigateTo({\n scrollIndex: scrollIndex,\n scrollType: null,\n scrollColumn: columnToSelect,\n focusIndex: scrollIndex,\n focusColumn: columnToSelect\n });\n }\n\n // result of keyboard event\n public onTabKeyDown(previous: CellCtrl | RowCtrl, keyboardEvent: KeyboardEvent): void {\n const backwards = keyboardEvent.shiftKey;\n const movedToNextCell = this.tabToNextCellCommon(previous, backwards, keyboardEvent);\n\n if (movedToNextCell) {\n // only prevent default if we found a cell. so if user is on last cell and hits tab, then we default\n // to the normal tabbing so user can exit the grid.\n keyboardEvent.preventDefault();\n return;\n }\n\n // if we didn't move to next cell, then need to tab out of the cells, ie to the header (if going\n // backwards)\n if (backwards) {\n const { rowIndex, rowPinned } = previous.getRowPosition();\n const firstRow = rowPinned ? rowIndex === 0 : rowIndex === this.paginationProxy.getPageFirstRow();\n if (firstRow) {\n keyboardEvent.preventDefault();\n this.focusService.focusLastHeader(keyboardEvent);\n }\n } else {\n // if the case it's a popup editor, the focus is on the editor and not the previous cell.\n // in order for the tab navigation to work, we need to focus the browser back onto the\n // previous cell.\n if (previous instanceof CellCtrl) {\n previous.focusCell(true);\n }\n\n if (this.focusService.focusNextGridCoreContainer(backwards)) {\n keyboardEvent.preventDefault();\n }\n }\n }\n\n // comes from API\n public tabToNextCell(backwards: boolean, event?: KeyboardEvent): boolean {\n const focusedCell = this.focusService.getFocusedCell();\n // if no focus, then cannot navigate\n if (!focusedCell) { return false; }\n\n let cellOrRow: CellCtrl | RowCtrl | null = this.getCellByPosition(focusedCell);\n\n // if cell is not rendered, means user has scrolled away from the cell\n // or that the focusedCell is a Full Width Row\n if (!cellOrRow) {\n cellOrRow = this.rowRenderer.getRowByPosition(focusedCell);\n if (!cellOrRow || !cellOrRow.isFullWidth()) {\n return false;\n }\n }\n\n return this.tabToNextCellCommon(cellOrRow, backwards, event);\n }\n\n private tabToNextCellCommon(previous: CellCtrl | RowCtrl, backwards: boolean, event?: KeyboardEvent): boolean {\n let editing = previous.isEditing();\n\n // if cell is not editing, there is still chance row is editing if it's Full Row Editing\n if (!editing && previous instanceof CellCtrl) {\n const cell = previous as CellCtrl;\n const row = cell.getRowCtrl();\n if (row) {\n editing = row.isEditing();\n }\n }\n\n let res: boolean;\n\n if (editing) {\n // if we are editing, we know it's not a Full Width Row (RowComp)\n if (this.gridOptionsWrapper.isFullRowEdit()) {\n res = this.moveToNextEditingRow(previous as CellCtrl, backwards, event);\n } else {\n res = this.moveToNextEditingCell(previous as CellCtrl, backwards, event);\n }\n } else {\n res = this.moveToNextCellNotEditing(previous, backwards);\n }\n\n // if a cell wasn't found, it's possible that focus was moved to the header\n return res || !!this.focusService.getFocusedHeader();\n }\n\n private moveToNextEditingCell(previousCell: CellCtrl, backwards: boolean, event: KeyboardEvent | null = null): boolean {\n const previousPos = previousCell.getCellPosition();\n\n // need to do this before getting next cell to edit, in case the next cell\n // has editable function (eg colDef.editable=func() ) and it depends on the\n // result of this cell, so need to save updates from the first edit, in case\n // the value is referenced in the function.\n previousCell.stopEditing();\n\n // find the next cell to start editing\n const nextCell = this.findNextCellToFocusOn(previousPos, backwards, true) as CellCtrl;\n\n if (nextCell == null) { return false; }\n\n // only prevent default if we found a cell. so if user is on last cell and hits tab, then we default\n // to the normal tabbing so user can exit the grid.\n nextCell.startEditing(null, null, true, event);\n nextCell.focusCell(false);\n return true;\n }\n\n private moveToNextEditingRow(previousCell: CellCtrl, backwards: boolean, event: KeyboardEvent | null = null): boolean {\n const previousPos = previousCell.getCellPosition();\n\n // find the next cell to start editing\n const nextCell = this.findNextCellToFocusOn(previousPos, backwards, true) as CellCtrl;\n if (nextCell == null) { return false; }\n\n const nextPos = nextCell.getCellPosition();\n\n const previousEditable = this.isCellEditable(previousPos);\n const nextEditable = this.isCellEditable(nextPos);\n\n const rowsMatch = nextPos && previousPos.rowIndex === nextPos.rowIndex && previousPos.rowPinned === nextPos.rowPinned;\n\n if (previousEditable) {\n previousCell.setFocusOutOnEditor();\n }\n\n if (!rowsMatch) {\n const pRow = previousCell.getRowCtrl();\n pRow!.stopEditing();\n\n const nRow = nextCell.getRowCtrl();\n nRow!.startRowEditing(undefined, undefined, undefined, event);\n }\n\n if (nextEditable) {\n nextCell.setFocusInOnEditor();\n nextCell.focusCell();\n } else {\n nextCell.focusCell(true);\n }\n\n return true;\n }\n\n private moveToNextCellNotEditing(previousCell: CellCtrl | RowCtrl, backwards: boolean): boolean {\n const displayedColumns = this.columnModel.getAllDisplayedColumns();\n let cellPos: CellPosition;\n\n if (previousCell instanceof RowCtrl) {\n cellPos = {\n ...previousCell.getRowPosition(),\n column: backwards ? displayedColumns[0] : last(displayedColumns)\n };\n } else {\n cellPos = previousCell.getCellPosition();\n }\n // find the next cell to start editing\n const nextCell = this.findNextCellToFocusOn(cellPos, backwards, false);\n\n // only prevent default if we found a cell. so if user is on last cell and hits tab, then we default\n // to the normal tabbing so user can exit the grid.\n if (nextCell instanceof CellCtrl) {\n nextCell.focusCell(true);\n } else if (nextCell) {\n return this.tryToFocusFullWidthRow(nextCell.getRowPosition(), backwards);\n }\n\n return exists(nextCell);\n }\n\n // called by the cell, when tab is pressed while editing.\n // @return: RenderedCell when navigation successful, otherwise null\n private findNextCellToFocusOn(previousPosition: CellPosition, backwards: boolean, startEditing: boolean): CellCtrl | RowCtrl | null {\n let nextPosition: CellPosition | null = previousPosition;\n\n while (true) {\n if (previousPosition !== nextPosition) { previousPosition = nextPosition; }\n\n if (!backwards) {\n nextPosition = this.getLastCellOfColSpan(nextPosition);\n }\n nextPosition = this.cellNavigationService.getNextTabbedCell(nextPosition, backwards);\n\n // allow user to override what cell to go to next\n const userFunc = this.gridOptionsWrapper.getTabToNextCellFunc();\n\n if (exists(userFunc)) {\n const params: WithoutGridCommon = {\n backwards: backwards,\n editing: startEditing,\n previousCellPosition: previousPosition,\n nextCellPosition: nextPosition ? nextPosition : null\n };\n const userCell = userFunc(params);\n if (exists(userCell)) {\n if ((userCell as any).floating) {\n doOnce(() => { console.warn(`AG Grid: tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?`); }, 'no floating in userCell');\n userCell.rowPinned = (userCell as any).floating;\n }\n nextPosition = {\n rowIndex: userCell.rowIndex,\n column: userCell.column,\n rowPinned: userCell.rowPinned\n } as CellPosition;\n } else {\n nextPosition = null;\n }\n }\n\n // if no 'next cell', means we have got to last cell of grid, so nothing to move to,\n // so bottom right cell going forwards, or top left going backwards\n if (!nextPosition) { return null; }\n\n if (nextPosition.rowIndex < 0) {\n const headerLen = this.headerNavigationService.getHeaderRowCount();\n\n this.focusService.focusHeaderPosition({\n headerPosition: {\n headerRowIndex: headerLen + (nextPosition.rowIndex),\n column: nextPosition.column\n }\n });\n\n return null;\n }\n\n // if editing, but cell not editable, skip cell. we do this before we do all of\n // the 'ensure index visible' and 'flush all frames', otherwise if we are skipping\n // a bunch of cells (eg 10 rows) then all the work on ensuring cell visible is useless\n // (except for the last one) which causes grid to stall for a while.\n // note - for full row edit, we do focus non-editable cells, as the row stays in edit mode.\n const fullRowEdit = this.gridOptionsWrapper.isFullRowEdit();\n if (startEditing && !fullRowEdit) {\n const cellIsEditable = this.isCellEditable(nextPosition);\n if (!cellIsEditable) { continue; }\n }\n\n this.ensureCellVisible(nextPosition);\n\n // we have to call this after ensureColumnVisible - otherwise it could be a virtual column\n // or row that is not currently in view, hence the renderedCell would not exist\n const nextCell = this.getCellByPosition(nextPosition);\n\n // if next cell is fullWidth row, then no rendered cell,\n // as fullWidth rows have no cells, so we skip it\n if (!nextCell) {\n const row = this.rowRenderer.getRowByPosition(nextPosition);\n if (!row || !row.isFullWidth()) {\n continue;\n } else {\n return row;\n }\n }\n\n if (nextCell.isSuppressNavigable()) { continue; }\n\n // by default, when we click a cell, it gets selected into a range, so to keep keyboard navigation\n // consistent, we set into range here also.\n if (this.rangeService) {\n this.rangeService.setRangeToCell(nextPosition);\n }\n\n // we successfully tabbed onto a grid cell, so return true\n return nextCell;\n }\n }\n\n private isCellEditable(cell: CellPosition): boolean {\n const rowNode = this.lookupRowNodeForCell(cell);\n\n if (rowNode) {\n return cell.column.isCellEditable(rowNode);\n }\n\n return false;\n }\n\n public getCellByPosition(cellPosition: CellPosition): CellCtrl | null {\n const rowCtrl = this.rowRenderer.getRowByPosition(cellPosition);\n if (!rowCtrl) { return null; }\n return rowCtrl.getCellCtrl(cellPosition.column);\n }\n\n private lookupRowNodeForCell(cell: CellPosition) {\n if (cell.rowPinned === Constants.PINNED_TOP) {\n return this.pinnedRowModel.getPinnedTopRow(cell.rowIndex);\n }\n\n if (cell.rowPinned === Constants.PINNED_BOTTOM) {\n return this.pinnedRowModel.getPinnedBottomRow(cell.rowIndex);\n }\n\n return this.paginationProxy.getRow(cell.rowIndex);\n }\n\n // we use index for rows, but column object for columns, as the next column (by index) might not\n // be visible (header grouping) so it's not reliable, so using the column object instead.\n public navigateToNextCell(event: KeyboardEvent | null, key: string, currentCell: CellPosition, allowUserOverride: boolean) {\n // we keep searching for a next cell until we find one. this is how the group rows get skipped\n let nextCell: CellPosition | null = currentCell;\n let hitEdgeOfGrid = false;\n\n while (nextCell && (nextCell === currentCell || !this.isValidNavigateCell(nextCell))) {\n // if the current cell is spanning across multiple columns, we need to move\n // our current position to be the last cell on the right before finding the\n // the next target.\n if (this.gridOptionsWrapper.isEnableRtl()) {\n if (key === KeyCode.LEFT) {\n nextCell = this.getLastCellOfColSpan(nextCell);\n }\n } else if (key === KeyCode.RIGHT) {\n nextCell = this.getLastCellOfColSpan(nextCell);\n }\n\n nextCell = this.cellNavigationService.getNextCellToFocus(key, nextCell);\n\n // eg if going down, and nextCell=undefined, means we are gone past the last row\n hitEdgeOfGrid = missing(nextCell);\n }\n\n if (hitEdgeOfGrid && event && event.key === KeyCode.UP) {\n nextCell = {\n rowIndex: -1,\n rowPinned: null,\n column: currentCell.column\n };\n }\n\n // allow user to override what cell to go to next. when doing normal cell navigation (with keys)\n // we allow this, however if processing 'enter after edit' we don't allow override\n if (allowUserOverride) {\n const userFunc = this.gridOptionsWrapper.getNavigateToNextCellFunc();\n if (exists(userFunc)) {\n const params: WithoutGridCommon = {\n key: key,\n previousCellPosition: currentCell,\n nextCellPosition: nextCell ? nextCell : null,\n event: event\n };\n const userCell = userFunc(params);\n if (exists(userCell)) {\n if ((userCell as any).floating) {\n doOnce(() => { console.warn(`AG Grid: tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?`); }, 'no floating in userCell');\n userCell.rowPinned = (userCell as any).floating;\n }\n nextCell = {\n rowPinned: userCell.rowPinned,\n rowIndex: userCell.rowIndex,\n column: userCell.column\n } as CellPosition;\n } else {\n nextCell = null;\n }\n }\n }\n\n // no next cell means we have reached a grid boundary, eg left, right, top or bottom of grid\n if (!nextCell) { return; }\n\n if (nextCell.rowIndex < 0) {\n const headerLen = this.headerNavigationService.getHeaderRowCount();\n\n this.focusService.focusHeaderPosition({\n headerPosition: { headerRowIndex: headerLen + (nextCell.rowIndex), column: currentCell.column },\n event: event || undefined\n });\n\n return;\n }\n\n // in case we have col spanning we get the cellComp and use it to get the\n // position. This was we always focus the first cell inside the spanning.\n const normalisedPosition = this.getNormalisedPosition(nextCell);\n if (normalisedPosition) {\n this.focusPosition(normalisedPosition);\n } else {\n this.tryToFocusFullWidthRow(nextCell);\n }\n }\n\n private getNormalisedPosition(cellPosition: CellPosition): CellPosition | null {\n // ensureCellVisible first, to make sure cell at position is rendered.\n this.ensureCellVisible(cellPosition);\n const cellComp = this.getCellByPosition(cellPosition);\n\n // not guaranteed to have a cellComp when using the SSRM as blocks are loading.\n if (!cellComp) { return null; }\n\n cellPosition = cellComp.getCellPosition();\n // we call this again, as nextCell can be different to it's previous value due to Column Spanning\n // (ie if cursor moving from right to left, and cell is spanning columns, then nextCell was the\n // last column in the group, however now it's the first column in the group). if we didn't do\n // ensureCellVisible again, then we could only be showing the last portion (last column) of the\n // merged cells.\n this.ensureCellVisible(cellPosition);\n\n return cellPosition;\n }\n\n private tryToFocusFullWidthRow(position: CellPosition | RowPosition, backwards: boolean = false): boolean {\n const displayedColumns = this.columnModel.getAllDisplayedColumns();\n const rowComp = this.rowRenderer.getRowByPosition(position);\n if (!rowComp || !rowComp.isFullWidth()) { return false; }\n\n const currentCellFocused = this.focusService.getFocusedCell();\n\n const cellPosition: CellPosition = {\n rowIndex: position.rowIndex,\n rowPinned: position.rowPinned,\n column: (position as CellPosition).column || (backwards ? last(displayedColumns) : displayedColumns[0])\n };\n\n this.focusPosition(cellPosition);\n\n const fromBelow = currentCellFocused != null ? this.rowPositionUtils.before(cellPosition, currentCellFocused) : false;\n\n const focusEvent: FullWidthRowFocusedEvent = {\n type: Events.EVENT_FULL_WIDTH_ROW_FOCUSED,\n api: this.gridApi,\n columnApi: this.columnApi,\n rowIndex: cellPosition.rowIndex,\n rowPinned: cellPosition.rowPinned,\n column: cellPosition.column,\n isFullWidthCell: true,\n floating: cellPosition.rowPinned,\n fromBelow\n };\n\n this.eventService.dispatchEvent(focusEvent);\n\n return true;\n }\n\n private focusPosition(cellPosition: CellPosition) {\n this.focusService.setFocusedCell(cellPosition.rowIndex, cellPosition.column, cellPosition.rowPinned, true);\n\n if (this.rangeService) {\n this.rangeService.setRangeToCell(cellPosition);\n }\n }\n\n private isValidNavigateCell(cell: CellPosition): boolean {\n const rowNode = this.rowPositionUtils.getRowNode(cell);\n\n // we do not allow focusing on detail rows and full width rows\n return !!rowNode;\n }\n\n private getLastCellOfColSpan(cell: CellPosition): CellPosition {\n const cellCtrl = this.getCellByPosition(cell);\n\n if (!cellCtrl) { return cell; }\n\n const colSpanningList = cellCtrl.getColSpanningList();\n\n if (colSpanningList.length === 1) { return cell; }\n\n return {\n rowIndex: cell.rowIndex,\n column: last(colSpanningList),\n rowPinned: cell.rowPinned\n };\n }\n\n public ensureCellVisible(gridCell: CellPosition): void {\n // this scrolls the row into view\n if (missing(gridCell.rowPinned)) {\n this.gridBodyCon.getScrollFeature().ensureIndexVisible(gridCell.rowIndex);\n }\n\n if (!gridCell.column.isPinned()) {\n this.gridBodyCon.getScrollFeature().ensureColumnVisible(gridCell.column);\n }\n\n // need to nudge the scrolls for the floating items. otherwise when we set focus on a non-visible\n // floating cell, the scrolls get out of sync\n this.gridBodyCon.getScrollFeature().horizontallyScrollHeaderCenterAndFloatingCenter();\n\n // need to flush frames, to make sure the correct cells are rendered\n this.animationFrameService.flushAllFrames();\n }\n}\n","import { PopupComponent } from \"../../widgets/popupComponent\";\nimport { ICellEditorParams } from \"../../interfaces/iCellEditor\";\nimport { isUserSuppressingKeyboardEvent } from \"../../utils/keyboard\";\nimport { PostConstruct } from \"../../context/context\";\n\nexport class PopupEditorWrapper extends PopupComponent {\n\n public static DOM_KEY_POPUP_EDITOR_WRAPPER = 'popupEditorWrapper';\n\n constructor(private readonly params: ICellEditorParams) {\n super(/* html */`
`);\n }\n\n @PostConstruct\n private postConstruct(): void {\n this.gridOptionsWrapper.setDomData(this.getGui(), PopupEditorWrapper.DOM_KEY_POPUP_EDITOR_WRAPPER, true);\n this.addKeyDownListener();\n }\n\n private addKeyDownListener(): void {\n const eGui = this.getGui();\n const params = this.params;\n const listener = (event: KeyboardEvent) => {\n if (!isUserSuppressingKeyboardEvent(this.gridOptionsWrapper, event, params.node, params.column, true)) {\n params.onKeyDown(event);\n }\n };\n\n this.addManagedListener(eGui, 'keydown', listener);\n }\n}\n","import { Column } from \"../../entities/column\";\nimport { RowNode } from \"../../entities/rowNode\";\nimport { Beans } from \"./../beans\";\nimport { Component } from \"../../widgets/component\";\nimport { ICellEditorComp, ICellEditorParams } from \"../../interfaces/iCellEditor\";\nimport { ICellRendererComp } from \"./../cellRenderers/iCellRenderer\";\nimport { CheckboxSelectionComponent } from \"./../checkboxSelectionComponent\";\nimport { RowCtrl } from \"./../row/rowCtrl\";\nimport { RowDragComp } from \"./../row/rowDragComp\";\nimport { PopupEditorWrapper } from \"./../cellEditors/popupEditorWrapper\";\nimport { DndSourceComp } from \"./../dndSourceComp\";\nimport { TooltipParentComp } from \"../../widgets/customTooltipFeature\";\nimport { setAriaColIndex, setAriaDescribedBy, setAriaRole } from \"../../utils/aria\";\nimport { escapeString } from \"../../utils/string\";\nimport { missing } from \"../../utils/generic\";\nimport { addStylesToElement, clearElement, loadTemplate, removeFromParent } from \"../../utils/dom\";\nimport { CellCtrl, ICellComp } from \"./cellCtrl\";\nimport { UserCompDetails } from \"../../components/framework/userComponentFactory\";\nimport { _ } from \"../../utils\";\n\nexport class CellComp extends Component implements TooltipParentComp {\n\n private eCellWrapper: HTMLElement | undefined;\n private eCellValue: HTMLElement | undefined;\n\n private beans: Beans;\n private column: Column;\n private rowNode: RowNode;\n private eRow: HTMLElement;\n\n private includeSelection: boolean;\n private includeRowDrag: boolean;\n private includeDndSource: boolean;\n\n private forceWrapper: boolean;\n\n private checkboxSelectionComp: CheckboxSelectionComponent | undefined;\n private dndSourceComp: DndSourceComp | undefined;\n private rowDraggingComp: RowDragComp | undefined;\n\n private hideEditorPopup: Function | null | undefined;\n private cellEditorPopupWrapper: PopupEditorWrapper | undefined;\n private cellEditor: ICellEditorComp | null | undefined;\n private cellEditorGui: HTMLElement | null;\n\n private cellRenderer: ICellRendererComp | null | undefined;\n private cellRendererGui: HTMLElement | null;\n private cellRendererClass: any;\n\n private rowCtrl: RowCtrl | null;\n\n private cellCtrl: CellCtrl;\n\n private firstRender: boolean;\n\n // every time we go into edit mode, or back again, this gets incremented.\n // it's the components way of dealing with the async nature of framework components,\n // so if a framework component takes a while to be created, we know if the object\n // is still relevant when creating is finished. eg we could click edit / un-edit 20\n // times before the first React edit component comes back - we should discard\n // the first 19.\n private rendererVersion = 0;\n private editorVersion = 0;\n\n constructor(beans: Beans, cellCtrl: CellCtrl,\n printLayout: boolean, eRow: HTMLElement, editingRow: boolean) {\n super();\n this.beans = beans;\n this.column = cellCtrl.getColumn();\n this.rowNode = cellCtrl.getRowNode();\n this.rowCtrl = cellCtrl.getRowCtrl();\n this.eRow = eRow;\n\n this.setTemplate(/* html */`
`);\n\n const eGui = this.getGui();\n\n this.forceWrapper = cellCtrl.isForceWrapper();\n\n this.refreshWrapper(false);\n\n const setAttribute = (name: string, value: string | null | undefined, element?: HTMLElement) => {\n const actualElement = element ? element : eGui;\n if (value != null && value != '') {\n actualElement.setAttribute(name, value);\n } else {\n actualElement.removeAttribute(name);\n }\n };\n\n const compProxy: ICellComp = {\n addOrRemoveCssClass: (cssClassName, on) => this.addOrRemoveCssClass(cssClassName, on),\n setUserStyles: styles => addStylesToElement(eGui, styles),\n getFocusableElement: () => this.getFocusableElement(),\n setTabIndex: tabIndex => setAttribute('tabindex', tabIndex.toString()),\n setRole: role => setAriaRole(eGui, role),\n setColId: colId => setAttribute('col-id', colId),\n setTitle: title => setAttribute('title', title),\n\n setIncludeSelection: include => this.includeSelection = include,\n setIncludeRowDrag: include => this.includeRowDrag = include,\n setIncludeDndSource: include => this.includeDndSource = include,\n\n setRenderDetails: (compDetails, valueToDisplay, force) =>\n this.setRenderDetails(compDetails, valueToDisplay, force),\n setEditDetails: (compDetails, popup, position) =>\n this.setEditDetails(compDetails, popup, position),\n\n getCellEditor: () => this.cellEditor || null,\n getCellRenderer: () => this.cellRenderer || null,\n getParentOfValue: () => this.getParentOfValue()\n };\n\n this.cellCtrl = cellCtrl;\n cellCtrl.setComp(compProxy, this.getGui(), this.eCellWrapper, printLayout, editingRow);\n }\n\n private getParentOfValue(): HTMLElement {\n if (this.eCellValue) {\n // if not editing, and using wrapper, then value goes in eCellValue\n return this.eCellValue;\n }\n if (this.eCellWrapper) {\n // if editing, and using wrapper, value (cell editor) goes in eCellWrapper\n return this.eCellWrapper;\n }\n\n // if editing or rendering, and not using wrapper, value (or comp) is directly inside cell\n return this.getGui();\n }\n\n private setRenderDetails(compDetails: UserCompDetails | undefined, valueToDisplay: any, forceNewCellRendererInstance: boolean): void {\n // this can happen if the users asks for the cell to refresh, but we are not showing the vale as we are editing\n const isInlineEditing = this.cellEditor && !this.cellEditorPopupWrapper;\n if (isInlineEditing) { return; }\n\n // this means firstRender will be true for one pass only, as it's initialised to undefined\n this.firstRender = this.firstRender == null;\n\n\n // if display template has changed, means any previous Cell Renderer is in the wrong location\n const controlWrapperChanged = this.refreshWrapper(false);\n\n // all of these have dependencies on the eGui, so only do them after eGui is set\n if (compDetails) {\n const neverRefresh = forceNewCellRendererInstance || controlWrapperChanged;\n const cellRendererRefreshSuccessful = neverRefresh ? false : this.refreshCellRenderer(compDetails);\n if (!cellRendererRefreshSuccessful) {\n this.destroyRenderer();\n this.createCellRendererInstance(compDetails);\n }\n } else {\n this.destroyRenderer();\n this.insertValueWithoutCellRenderer(valueToDisplay);\n }\n }\n\n private setEditDetails(compDetails: UserCompDetails | undefined, popup?: boolean, position?: string): void {\n if (compDetails) {\n this.createCellEditorInstance(compDetails, popup, position);\n } else {\n this.destroyEditor();\n }\n }\n\n private removeControls(): void {\n this.checkboxSelectionComp = this.beans.context.destroyBean(this.checkboxSelectionComp);\n this.dndSourceComp = this.beans.context.destroyBean(this.dndSourceComp);\n this.rowDraggingComp = this.beans.context.destroyBean(this.rowDraggingComp);\n }\n\n // returns true if wrapper was changed\n private refreshWrapper(editing: boolean): boolean {\n const providingControls = this.includeRowDrag || this.includeDndSource || this.includeSelection;\n const usingWrapper = providingControls || this.forceWrapper;\n\n const putWrapperIn = usingWrapper && this.eCellWrapper == null;\n if (putWrapperIn) {\n this.eCellWrapper = loadTemplate(`
`);\n this.getGui().appendChild(this.eCellWrapper);\n }\n const takeWrapperOut = !usingWrapper && this.eCellWrapper != null;\n if (takeWrapperOut) {\n removeFromParent(this.eCellWrapper!);\n this.eCellWrapper = undefined;\n }\n\n this.addOrRemoveCssClass('ag-cell-value', !usingWrapper);\n\n const usingCellValue = !editing && usingWrapper;\n const putCellValueIn = usingCellValue && this.eCellValue == null;\n if (putCellValueIn) {\n this.eCellValue = loadTemplate(``);\n this.eCellWrapper!.appendChild(this.eCellValue);\n }\n const takeCellValueOut = !usingCellValue && this.eCellValue != null;\n if (takeCellValueOut) {\n removeFromParent(this.eCellValue!);\n this.eCellValue = undefined;\n }\n\n const templateChanged = putWrapperIn || takeWrapperOut || putCellValueIn || takeCellValueOut;\n\n if (templateChanged) {\n this.removeControls();\n }\n\n if (!editing && providingControls) {\n this.addControls();\n }\n\n return templateChanged;\n }\n\n private addControls(): void {\n const id = this.eCellValue!.id = `cell-${this.getCompId()}`;\n const describedByIds: string[] = [];\n\n if (this.includeRowDrag) {\n if (this.rowDraggingComp == null) {\n this.rowDraggingComp = this.cellCtrl.createRowDragComp();\n if (this.rowDraggingComp) {\n // put the checkbox in before the value\n this.eCellWrapper!.insertBefore(this.rowDraggingComp.getGui(), this.eCellValue!);\n }\n }\n }\n\n if (this.includeDndSource) {\n if (this.dndSourceComp == null) {\n this.dndSourceComp = this.cellCtrl.createDndSource();\n // put the checkbox in before the value\n this.eCellWrapper!.insertBefore(this.dndSourceComp.getGui(), this.eCellValue!);\n }\n }\n\n if (this.includeSelection) {\n if (this.checkboxSelectionComp == null) {\n this.checkboxSelectionComp = this.cellCtrl.createSelectionCheckbox();\n this.eCellWrapper!.insertBefore(this.checkboxSelectionComp.getGui(), this.eCellValue!);\n }\n describedByIds.push(this.checkboxSelectionComp.getCheckboxId());\n }\n\n describedByIds.push(id);\n\n setAriaDescribedBy(this.getGui(), describedByIds.join(' '));\n }\n\n private createCellEditorInstance(compDetails: UserCompDetails, popup?: boolean, position?: string): void {\n const versionCopy = this.editorVersion;\n\n const cellEditorPromise = compDetails.newAgStackInstance();\n if (!cellEditorPromise) { return; } // if empty, userComponentFactory already did a console message\n\n const { params } = compDetails;\n cellEditorPromise.then(c => this.afterCellEditorCreated(versionCopy, c!, params, popup, position));\n\n // if we don't do this, and editor component is async, then there will be a period\n // when the component isn't present and keyboard navigation won't work - so example\n // of user hitting tab quickly (more quickly than renderers getting created) won't work\n const cellEditorAsync = missing(this.cellEditor);\n if (cellEditorAsync && params.cellStartedEdit) {\n this.cellCtrl.focusCell(true);\n }\n }\n\n private insertValueWithoutCellRenderer(valueToDisplay: any): void {\n const eParent = this.getParentOfValue();\n clearElement(eParent);\n\n const escapedValue = valueToDisplay != null ? escapeString(valueToDisplay) : null;\n if (escapedValue != null) {\n eParent.innerHTML = escapedValue;\n }\n }\n\n private destroyEditorAndRenderer(): void {\n this.destroyRenderer();\n this.destroyEditor();\n }\n\n private destroyRenderer(): void {\n const {context} = this.beans;\n this.cellRenderer = context.destroyBean(this.cellRenderer);\n removeFromParent(this.cellRendererGui);\n this.cellRendererGui = null;\n this.rendererVersion++;\n }\n\n private destroyEditor(): void {\n const {context} = this.beans;\n\n if (this.hideEditorPopup) { this.hideEditorPopup(); }\n this.hideEditorPopup = undefined;\n\n this.cellEditor = context.destroyBean(this.cellEditor);\n this.cellEditorPopupWrapper = context.destroyBean(this.cellEditorPopupWrapper);\n\n removeFromParent(this.cellEditorGui);\n this.cellEditorGui = null;\n\n this.editorVersion++;\n }\n\n private refreshCellRenderer(compClassAndParams: UserCompDetails): boolean {\n if (this.cellRenderer == null || this.cellRenderer.refresh == null) { return false; }\n\n // if different Cell Renderer configured this time (eg user is using selector, and\n // returns different component) then don't refresh, force recreate of Cell Renderer\n if (this.cellRendererClass !== compClassAndParams.componentClass) { return false; }\n\n // take any custom params off of the user\n const result = this.cellRenderer.refresh(compClassAndParams.params);\n\n // NOTE on undefined: previous version of the cellRenderer.refresh() interface\n // returned nothing, if the method existed, we assumed it refreshed. so for\n // backwards compatibility, we assume if method exists and returns nothing,\n // that it was successful.\n return result === true || result === undefined;\n }\n\n private createCellRendererInstance(compDetails: UserCompDetails): void {\n // never use task service if angularCompileRows=true, as that assume the cell renderers\n // are finished when the row is created. also we never use it if animation frame service\n // is turned off.\n // and lastly we never use it if doing auto-height, as the auto-height service checks the\n // row height directly after the cell is created, it doesn't wait around for the tasks to complete\n const angularCompileRows = this.beans.gridOptionsWrapper.isAngularCompileRows();\n const suppressAnimationFrame = this.beans.gridOptionsWrapper.isSuppressAnimationFrame();\n const useTaskService = !angularCompileRows && !suppressAnimationFrame;\n\n const displayComponentVersionCopy = this.rendererVersion;\n\n const {componentClass} = compDetails;\n\n const createCellRendererFunc = () => {\n const staleTask = this.rendererVersion !== displayComponentVersionCopy || !this.isAlive();\n if (staleTask) { return; }\n\n // this can return null in the event that the user has switched from a renderer component to nothing, for example\n // when using a cellRendererSelect to return a component or null depending on row data etc\n const componentPromise = compDetails.newAgStackInstance();\n const callback = this.afterCellRendererCreated.bind(this, displayComponentVersionCopy, componentClass);\n if (componentPromise) {\n componentPromise.then(callback);\n }\n };\n\n // we only use task service when rendering for first time, which means it is not used when doing edits.\n // if we changed this (always use task service) would make sense, however it would break tests, possibly\n // test of users.\n if (useTaskService && this.firstRender) {\n this.beans.animationFrameService.createTask(createCellRendererFunc, this.rowNode.rowIndex!, 'createTasksP2');\n } else {\n createCellRendererFunc();\n }\n }\n\n public getCtrl(): CellCtrl {\n return this.cellCtrl;\n }\n\n public getRowCtrl(): RowCtrl | null {\n return this.rowCtrl;\n }\n\n public getCellRenderer(): ICellRendererComp | null | undefined {\n return this.cellRenderer;\n }\n\n public getCellEditor(): ICellEditorComp | null | undefined {\n return this.cellEditor;\n }\n\n private afterCellRendererCreated(cellRendererVersion: number, cellRendererClass: any, cellRenderer: ICellRendererComp): void {\n const staleTask = !this.isAlive() || cellRendererVersion !== this.rendererVersion;\n\n if (staleTask) {\n this.beans.context.destroyBean(cellRenderer);\n return;\n }\n\n this.cellRenderer = cellRenderer;\n this.cellRendererClass = cellRendererClass;\n this.cellRendererGui = this.cellRenderer.getGui();\n\n if (this.cellRendererGui != null) {\n const eParent = this.getParentOfValue();\n clearElement(eParent);\n eParent.appendChild(this.cellRendererGui);\n }\n }\n\n private afterCellEditorCreated(requestVersion: number, cellEditor: ICellEditorComp, params: ICellEditorParams, popup?: boolean, position?: string): void {\n\n // if editingCell=false, means user cancelled the editor before component was ready.\n // if versionMismatch, then user cancelled the edit, then started the edit again, and this\n // is the first editor which is now stale.\n const staleComp = requestVersion !== this.editorVersion;\n\n if (staleComp) {\n this.beans.context.destroyBean(cellEditor);\n return;\n }\n\n const editingCancelledByUserComp = cellEditor.isCancelBeforeStart && cellEditor.isCancelBeforeStart();\n if (editingCancelledByUserComp) {\n this.beans.context.destroyBean(cellEditor);\n this.cellCtrl.stopEditing();\n return;\n }\n\n if (!cellEditor.getGui) {\n console.warn(`AG Grid: cellEditor for column ${this.column.getId()} is missing getGui() method`);\n this.beans.context.destroyBean(cellEditor);\n return;\n }\n\n this.cellEditor = cellEditor;\n this.cellEditorGui = cellEditor.getGui();\n\n const cellEditorInPopup = popup || (cellEditor.isPopup !== undefined && cellEditor.isPopup());\n if (cellEditorInPopup) {\n if (!popup) {\n this.cellCtrl.hackSayEditingInPopup();\n }\n this.addPopupCellEditor(params, position);\n } else {\n this.addInCellEditor();\n }\n\n if (cellEditor.afterGuiAttached) {\n cellEditor.afterGuiAttached();\n }\n }\n\n private addInCellEditor(): void {\n const eGui = this.getGui();\n\n // if focus is inside the cell, we move focus to the cell itself\n // before removing it's contents, otherwise errors could be thrown.\n const eDocument = this.beans.gridOptionsWrapper.getDocument();\n if (eGui.contains(eDocument.activeElement)) {\n eGui.focus();\n }\n\n this.destroyRenderer();\n this.refreshWrapper(true);\n this.clearParentOfValue();\n if (this.cellEditorGui) {\n const eParent = this.getParentOfValue();\n eParent.appendChild(this.cellEditorGui);\n }\n }\n\n private addPopupCellEditor(params: ICellEditorParams, position?: string): void {\n if (this.beans.gridOptionsWrapper.isFullRowEdit()) {\n console.warn('AG Grid: popup cellEditor does not work with fullRowEdit - you cannot use them both ' +\n '- either turn off fullRowEdit, or stop using popup editors.');\n }\n\n const cellEditor = this.cellEditor!;\n\n // if a popup, then we wrap in a popup editor and return the popup\n this.cellEditorPopupWrapper = this.beans.context.createBean(new PopupEditorWrapper(params));\n const ePopupGui = this.cellEditorPopupWrapper.getGui();\n if (this.cellEditorGui) {\n ePopupGui.appendChild(this.cellEditorGui);\n }\n\n const popupService = this.beans.popupService;\n\n const useModelPopup = this.beans.gridOptionsWrapper.isStopEditingWhenCellsLoseFocus();\n\n // see if position provided by colDef, if not then check old way of method on cellComp\n const positionToUse = position != null ? position : cellEditor.getPopupPosition ? cellEditor.getPopupPosition() : 'over';\n\n const positionParams = {\n column: this.column,\n rowNode: this.rowNode,\n type: 'popupCellEditor',\n eventSource: this.getGui(),\n ePopup: ePopupGui,\n keepWithinBounds: true\n };\n\n const positionCallback = positionToUse === 'under' ?\n popupService.positionPopupUnderComponent.bind(popupService, positionParams)\n : popupService.positionPopupOverComponent.bind(popupService, positionParams);\n\n const translate = this.beans.gridOptionsWrapper.getLocaleTextFunc();\n\n const addPopupRes = popupService.addPopup({\n modal: useModelPopup,\n eChild: ePopupGui,\n closeOnEsc: true,\n closedCallback: () => { this.cellCtrl.onPopupEditorClosed(); },\n anchorToElement: this.getGui(),\n positionCallback,\n ariaLabel: translate('ariaLabelCellEditor', 'Cell Editor')\n });\n if (addPopupRes) {\n this.hideEditorPopup = addPopupRes.hideFunc;\n }\n }\n\n public detach(): void {\n this.eRow.removeChild(this.getGui());\n }\n\n // if the row is also getting destroyed, then we don't need to remove from dom,\n // as the row will also get removed, so no need to take out the cells from the row\n // if the row is going (removing is an expensive operation, so only need to remove\n // the top part)\n //\n // note - this is NOT called by context, as we don't wire / unwire the CellComp for performance reasons.\n public destroy(): void {\n this.cellCtrl.stopEditing();\n\n this.destroyEditorAndRenderer();\n this.removeControls();\n\n super.destroy();\n }\n\n private clearParentOfValue(): void {\n const eGui = this.getGui();\n\n // if focus is inside the cell, we move focus to the cell itself\n // before removing it's contents, otherwise errors could be thrown.\n const eDocument = this.beans.gridOptionsWrapper.getDocument();\n if (eGui.contains(eDocument.activeElement)) {\n eGui.focus({\n preventScroll: true\n });\n }\n\n clearElement(this.getParentOfValue());\n }\n}\n","import { Component } from \"../../widgets/component\";\nimport { ICellRendererComp } from \"../cellRenderers/iCellRenderer\";\nimport { Beans } from \"../beans\";\nimport { addStylesToElement, setDomChildOrder } from \"../../utils/dom\";\nimport { IRowComp, RowCtrl, RowType } from \"./rowCtrl\";\nimport { CellComp } from \"../cell/cellComp\";\nimport { getAllValuesInObject } from \"../../utils/object\";\nimport { setAriaRole } from \"../../utils/aria\";\nimport { CellCtrl } from \"../cell/cellCtrl\";\nimport { UserCompDetails } from \"../../components/framework/userComponentFactory\";\nimport { RowContainerType } from \"../../gridBodyComp/rowContainer/rowContainerCtrl\";\n\nexport class RowComp extends Component {\n\n private fullWidthCellRenderer: ICellRendererComp | null | undefined;\n\n private beans: Beans;\n\n private rowCtrl: RowCtrl;\n\n private domOrder: boolean;\n private cellComps: { [key: string]: CellComp | null; } = {};\n\n constructor(ctrl: RowCtrl, beans: Beans, containerType: RowContainerType) {\n super();\n\n this.beans = beans;\n this.rowCtrl = ctrl;\n\n this.setTemplate(/* html */`
`);\n\n const eGui = this.getGui();\n const style = eGui.style;\n\n const compProxy: IRowComp = {\n setDomOrder: domOrder => this.domOrder = domOrder,\n setCellCtrls: cellCtrls => this.setCellCtrls(cellCtrls),\n showFullWidth: compDetails => this.showFullWidth(compDetails),\n getFullWidthCellRenderer: () => this.getFullWidthCellRenderer(),\n addOrRemoveCssClass: (name, on) => this.addOrRemoveCssClass(name, on),\n setUserStyles: styles => addStylesToElement(eGui, styles),\n setTop: top => style.top = top,\n setTransform: transform => style.transform = transform,\n setRowIndex: rowIndex => eGui.setAttribute('row-index', rowIndex),\n setRole: role => setAriaRole(eGui, role),\n setRowId: (rowId: string) => eGui.setAttribute('row-id', rowId),\n setRowBusinessKey: businessKey => eGui.setAttribute('row-business-key', businessKey),\n setTabIndex: tabIndex => eGui.setAttribute('tabindex', tabIndex.toString())\n };\n\n ctrl.setComp(compProxy, this.getGui(), containerType);\n }\n\n private getInitialStyle(): string {\n const transform = this.rowCtrl.getInitialTransform();\n const top = this.rowCtrl.getInitialRowTop();\n return transform ? `transform: ${transform}` : `top: ${top}`;\n }\n\n private showFullWidth(compDetails: UserCompDetails): void {\n const callback = (cellRenderer: ICellRendererComp) => {\n if (this.isAlive()) {\n const eGui = cellRenderer.getGui();\n this.getGui().appendChild(eGui);\n this.rowCtrl.setupDetailRowAutoHeight(eGui);\n this.setFullWidthRowComp(cellRenderer);\n } else {\n this.beans.context.destroyBean(cellRenderer);\n }\n };\n\n // if not in cache, create new one\n const res = compDetails.newAgStackInstance();\n\n if (!res) { return; }\n\n res.then(callback);\n }\n\n private setCellCtrls(cellCtrls: CellCtrl[]): void {\n const cellsToRemove = Object.assign({}, this.cellComps);\n\n cellCtrls.forEach(cellCtrl => {\n const key = cellCtrl.getInstanceId();\n const existingCellComp = this.cellComps[key];\n\n if (existingCellComp == null) {\n this.newCellComp(cellCtrl);\n } else {\n cellsToRemove[key] = null;\n }\n });\n\n const cellCompsToRemove = getAllValuesInObject(cellsToRemove)\n .filter(cellComp => cellComp != null);\n\n this.destroyCells(cellCompsToRemove as CellComp[]);\n this.ensureDomOrder(cellCtrls);\n }\n\n private ensureDomOrder(cellCtrls: CellCtrl[]): void {\n if (!this.domOrder) { return; }\n\n const elementsInOrder: HTMLElement[] = [];\n cellCtrls.forEach(cellCtrl => {\n const cellComp = this.cellComps[cellCtrl.getInstanceId()];\n if (cellComp) {\n elementsInOrder.push(cellComp.getGui());\n }\n });\n\n setDomChildOrder(this.getGui(), elementsInOrder);\n }\n\n private newCellComp(cellCtrl: CellCtrl): void {\n const cellComp = new CellComp(this.beans, cellCtrl,\n this.rowCtrl.isPrintLayout(), this.getGui(), this.rowCtrl.isEditing());\n this.cellComps[cellCtrl.getInstanceId()] = cellComp;\n this.getGui().appendChild(cellComp.getGui());\n }\n\n public destroy(): void {\n super.destroy();\n this.destroyAllCells();\n }\n\n private destroyAllCells(): void {\n const cellsToDestroy = getAllValuesInObject(this.cellComps).filter(cp => cp != null);\n this.destroyCells(cellsToDestroy as CellComp[]);\n }\n\n private setFullWidthRowComp(fullWidthRowComponent: ICellRendererComp): void {\n if (this.fullWidthCellRenderer) {\n console.error('AG Grid - should not be setting fullWidthRowComponent twice');\n }\n\n this.fullWidthCellRenderer = fullWidthRowComponent;\n this.addDestroyFunc(() => {\n this.fullWidthCellRenderer = this.beans.context.destroyBean(this.fullWidthCellRenderer);\n });\n }\n\n private getFullWidthCellRenderer(): ICellRendererComp | null | undefined {\n return this.fullWidthCellRenderer;\n }\n\n private destroyCells(cellComps: CellComp[]): void {\n cellComps.forEach(cellComp => {\n\n // could be old reference, ie removed cell\n if (!cellComp) { return; }\n\n // check cellComp belongs in this container\n const instanceId = cellComp.getCtrl().getInstanceId();\n if (this.cellComps[instanceId] !== cellComp) {return; }\n\n cellComp.detach();\n cellComp.destroy();\n this.cellComps[instanceId] = null;\n });\n }\n}\n","import { Component } from \"../../widgets/component\";\nimport { RefSelector } from \"../../widgets/componentAnnotations\";\nimport { Autowired, PostConstruct, PreDestroy } from \"../../context/context\";\nimport { getRowContainerTypeForName, IRowContainerComp, RowContainerCtrl, RowContainerName, RowContainerType } from \"./rowContainerCtrl\";\nimport { ensureDomOrder, insertWithDomOrder } from \"../../utils/dom\";\nimport { RowComp } from \"../../rendering/row/rowComp\";\nimport { RowCtrl } from \"../../rendering/row/rowCtrl\";\nimport { Beans } from \"../../rendering/beans\";\nimport { getAllValuesInObject } from \"../../utils/object\";\nimport { setAriaRole } from \"../../utils/aria\";\n\nfunction templateFactory(): string {\n const name = Component.elementGettingCreated.getAttribute('name') as RowContainerName;\n\n const cssClasses = RowContainerCtrl.getRowContainerCssClasses(name);\n\n let res: string;\n\n const template1 = name === RowContainerName.CENTER;\n const template2 = name === RowContainerName.TOP_CENTER || name === RowContainerName.BOTTOM_CENTER;\n\n if (template1) {\n res = /* html */\n `
\n
\n
\n
\n
`;\n } else if (template2) {\n res = /* html */\n `
\n
\n
`;\n } else {\n res = /* html */\n `
`;\n }\n\n return res;\n}\n\nexport class RowContainerComp extends Component {\n\n @Autowired('beans') private beans: Beans;\n\n @RefSelector('eViewport') private eViewport: HTMLElement;\n @RefSelector('eContainer') private eContainer: HTMLElement;\n @RefSelector('eWrapper') private eWrapper: HTMLElement;\n\n private readonly name: RowContainerName;\n private readonly type: RowContainerType;\n\n private rowComps: {[id: string]: RowComp} = {};\n\n // we ensure the rows are in the dom in the order in which they appear on screen when the\n // user requests this via gridOptions.ensureDomOrder. this is typically used for screen readers.\n private domOrder: boolean;\n private lastPlacedElement: HTMLElement | null;\n\n constructor() {\n super(templateFactory());\n this.name = Component.elementGettingCreated.getAttribute('name') as RowContainerName;\n this.type = getRowContainerTypeForName(this.name);\n }\n\n @PostConstruct\n private postConstruct(): void {\n const compProxy: IRowContainerComp = {\n setViewportHeight: height => this.eViewport.style.height = height,\n setRowCtrls: rowCtrls => this.setRowCtrls(rowCtrls),\n setDomOrder: domOrder => {\n this.domOrder = domOrder;\n },\n setContainerWidth: width => this.eContainer.style.width = width\n };\n\n const ctrl = this.createManagedBean(new RowContainerCtrl(this.name));\n ctrl.setComp(compProxy, this.eContainer, this.eViewport, this.eWrapper);\n }\n\n @PreDestroy\n private preDestroy(): void {\n // destroys all row comps\n this.setRowCtrls([]);\n }\n\n private setRowCtrls(rowCtrls: RowCtrl[]): void {\n const oldRows = {...this.rowComps};\n this.rowComps = {};\n\n this.lastPlacedElement = null;\n\n const processRow = (rowCon: RowCtrl) => {\n const instanceId = rowCon.getInstanceId();\n const existingRowComp = oldRows[instanceId];\n if (existingRowComp) {\n this.rowComps[instanceId] = existingRowComp;\n delete oldRows[instanceId];\n this.ensureDomOrder(existingRowComp.getGui());\n } else {\n const rowComp = this.newRowComp(rowCon);\n this.rowComps[instanceId] = rowComp;\n this.appendRow(rowComp.getGui());\n }\n };\n\n rowCtrls.forEach(processRow);\n getAllValuesInObject(oldRows).forEach(oldRowComp => {\n this.eContainer.removeChild(oldRowComp.getGui());\n oldRowComp.destroy();\n });\n\n setAriaRole(this.eContainer, rowCtrls.length ? \"rowgroup\" : \"presentation\");\n }\n\n public appendRow(element: HTMLElement) {\n if (this.domOrder) {\n insertWithDomOrder(this.eContainer, element, this.lastPlacedElement);\n } else {\n this.eContainer.appendChild(element);\n }\n this.lastPlacedElement = element;\n }\n\n private ensureDomOrder(eRow: HTMLElement): void {\n if (this.domOrder) {\n ensureDomOrder(this.eContainer, eRow, this.lastPlacedElement);\n this.lastPlacedElement = eRow;\n }\n }\n\n private newRowComp(rowCtrl: RowCtrl): RowComp {\n const pinned = RowContainerCtrl.getPinned(this.name);\n const res = new RowComp(rowCtrl, this.beans, this.type);\n return res;\n }\n\n}","import { PostConstruct, PreDestroy } from '../../context/context';\nimport { setAriaRowIndex } from '../../utils/aria';\nimport { setDomChildOrder } from '../../utils/dom';\nimport { getAllValuesInObject, iterateObject } from '../../utils/object';\nimport { Component } from '../../widgets/component';\nimport { AbstractHeaderCellComp } from '../cells/abstractCell/abstractHeaderCellComp';\nimport { AbstractHeaderCellCtrl } from '../cells/abstractCell/abstractHeaderCellCtrl';\nimport { HeaderCellComp } from '../cells/column/headerCellComp';\nimport { HeaderCellCtrl } from '../cells/column/headerCellCtrl';\nimport { HeaderGroupCellComp } from '../cells/columnGroup/headerGroupCellComp';\nimport { HeaderGroupCellCtrl } from '../cells/columnGroup/headerGroupCellCtrl';\nimport { HeaderFilterCellComp } from '../cells/floatingFilter/headerFilterCellComp';\nimport { HeaderFilterCellCtrl } from '../cells/floatingFilter/headerFilterCellCtrl';\nimport { HeaderRowCtrl, IHeaderRowComp } from './headerRowCtrl';\n\nexport enum HeaderRowType {\n COLUMN_GROUP = 'group',\n COLUMN = 'column',\n FLOATING_FILTER = 'filter'\n}\n\nexport class HeaderRowComp extends Component {\n\n private ctrl: HeaderRowCtrl;\n\n private headerComps: { [key: string]: AbstractHeaderCellComp; } = {};\n\n constructor(ctrl: HeaderRowCtrl) {\n super();\n\n const extraClass = ctrl.getType() == HeaderRowType.COLUMN_GROUP ? `ag-header-row-column-group` :\n ctrl.getType() == HeaderRowType.FLOATING_FILTER ? `ag-header-row-column-filter` : `ag-header-row-column`;\n\n this.setTemplate(/* html */`
`);\n\n this.ctrl = ctrl;\n }\n\n //noinspection JSUnusedLocalSymbols\n @PostConstruct\n private init(): void {\n\n const compProxy: IHeaderRowComp = {\n setTransform: transform => this.getGui().style.transform = transform,\n setHeight: height => this.getGui().style.height = height,\n setTop: top => this.getGui().style.top = top,\n setHeaderCtrls: ctrls => this.setHeaderCtrls(ctrls),\n setWidth: width => this.getGui().style.width = width,\n setAriaRowIndex: rowIndex => setAriaRowIndex(this.getGui(), rowIndex)\n };\n\n this.ctrl.setComp(compProxy);\n }\n\n @PreDestroy\n private destroyHeaderCtrls(): void {\n this.setHeaderCtrls([]);\n }\n\n private setHeaderCtrls(ctrls: AbstractHeaderCellCtrl[]): void {\n if (!this.isAlive()) { return; }\n\n const oldComps = this.headerComps;\n this.headerComps = {};\n\n ctrls.forEach(ctrl => {\n const id = ctrl.getInstanceId();\n let comp = oldComps[id];\n delete oldComps[id];\n\n if (comp == null) {\n comp = this.createHeaderComp(ctrl);\n this.getGui().appendChild(comp.getGui());\n }\n\n this.headerComps[id] = comp;\n });\n\n iterateObject(oldComps, (id: string, comp: AbstractHeaderCellComp) => {\n this.getGui().removeChild(comp.getGui());\n this.destroyBean(comp);\n });\n\n const ensureDomOrder = this.gridOptionsWrapper.isEnsureDomOrder();\n if (ensureDomOrder) {\n const comps = getAllValuesInObject(this.headerComps);\n // ordering the columns by left position orders them in the order they appear on the screen\n comps.sort((a: AbstractHeaderCellComp, b: AbstractHeaderCellComp) => {\n const leftA = a.getCtrl().getColumnGroupChild().getLeft()!;\n const leftB = b.getCtrl().getColumnGroupChild().getLeft()!;\n return leftA - leftB;\n });\n const elementsInOrder = comps.map(c => c.getGui());\n setDomChildOrder(this.getGui(), elementsInOrder);\n }\n }\n\n private createHeaderComp(headerCtrl: AbstractHeaderCellCtrl): AbstractHeaderCellComp {\n\n let result: AbstractHeaderCellComp;\n\n switch (this.ctrl.getType()) {\n case HeaderRowType.COLUMN_GROUP:\n result = new HeaderGroupCellComp(headerCtrl as HeaderGroupCellCtrl);\n break;\n case HeaderRowType.FLOATING_FILTER:\n result = new HeaderFilterCellComp(headerCtrl as HeaderFilterCellCtrl);\n break;\n default:\n result = new HeaderCellComp(headerCtrl as HeaderCellCtrl);\n break;\n }\n\n this.createBean(result);\n result.setParentComponent(this);\n\n return result;\n }\n}\n","import { DraggingEvent, DragAndDropService } from \"../../dragAndDrop/dragAndDropService\";\nimport { Column } from \"../../entities/column\";\nimport { ColumnModel } from \"../../columns/columnModel\";\nimport { Autowired } from \"../../context/context\";\nimport { GridOptionsWrapper } from \"../../gridOptionsWrapper\";\nimport { DropListener } from \"./bodyDropTarget\";\n\nexport class BodyDropPivotTarget implements DropListener {\n\n @Autowired('columnModel') private columnModel: ColumnModel;\n @Autowired('gridOptionsWrapper') private gridOptionsWrapper: GridOptionsWrapper;\n\n private columnsToAggregate: Column[] = [];\n private columnsToGroup: Column[] = [];\n private columnsToPivot: Column[] = [];\n\n private pinned: string | null;\n\n constructor(pinned: string | null) {\n this.pinned = pinned;\n }\n\n /** Callback for when drag enters */\n public onDragEnter(draggingEvent: DraggingEvent): void {\n this.clearColumnsList();\n\n // in pivot mode, we don't accept any drops if functions are read only\n if (this.gridOptionsWrapper.isFunctionsReadOnly()) { return; }\n\n const dragColumns: Column[] | undefined = draggingEvent.dragItem.columns;\n\n if (!dragColumns) { return; }\n\n dragColumns.forEach(column => {\n // we don't allow adding secondary columns\n if (!column.isPrimary()) { return; }\n\n if (column.isAnyFunctionActive()) { return; }\n\n if (column.isAllowValue()) {\n this.columnsToAggregate.push(column);\n } else if (column.isAllowRowGroup()) {\n this.columnsToGroup.push(column);\n } else if (column.isAllowPivot()) {\n this.columnsToPivot.push(column);\n }\n\n });\n }\n\n public getIconName(): string | null {\n const totalColumns = this.columnsToAggregate.length + this.columnsToGroup.length + this.columnsToPivot.length;\n if (totalColumns > 0) {\n return this.pinned ? DragAndDropService.ICON_PINNED : DragAndDropService.ICON_MOVE;\n }\n\n return null;\n }\n\n /** Callback for when drag leaves */\n public onDragLeave(draggingEvent: DraggingEvent): void {\n // if we are taking columns out of the center, then we remove them from the report\n this.clearColumnsList();\n }\n\n private clearColumnsList(): void {\n this.columnsToAggregate.length = 0;\n this.columnsToGroup.length = 0;\n this.columnsToPivot.length = 0;\n }\n\n /** Callback for when dragging */\n public onDragging(draggingEvent: DraggingEvent): void {\n }\n\n /** Callback for when drag stops */\n public onDragStop(draggingEvent: DraggingEvent): void {\n if (this.columnsToAggregate.length > 0) {\n this.columnModel.addValueColumns(this.columnsToAggregate, \"toolPanelDragAndDrop\");\n }\n if (this.columnsToGroup.length > 0) {\n this.columnModel.addRowGroupColumns(this.columnsToGroup, \"toolPanelDragAndDrop\");\n }\n if (this.columnsToPivot.length > 0) {\n this.columnModel.addPivotColumns(this.columnsToPivot, \"toolPanelDragAndDrop\");\n }\n }\n\n}","import { Autowired, PostConstruct } from \"../../context/context\";\nimport { Constants } from \"../../constants/constants\";\nimport { ColumnModel } from \"../../columns/columnModel\";\nimport { Column } from \"../../entities/column\";\nimport { DragAndDropService, DraggingEvent, DragSourceType, HorizontalDirection } from \"../../dragAndDrop/dragAndDropService\";\nimport { DropListener } from \"./bodyDropTarget\";\nimport { GridOptionsWrapper } from \"../../gridOptionsWrapper\";\nimport { Logger, LoggerFactory } from \"../../logger\";\nimport { ColumnEventType } from \"../../events\";\nimport { missing, exists } from \"../../utils/generic\";\nimport { sortNumerically, last, includes } from \"../../utils/array\";\nimport { CtrlsService } from \"../../ctrlsService\";\nimport { GridBodyCtrl } from \"../../gridBodyComp/gridBodyCtrl\";\n\nexport class MoveColumnFeature implements DropListener {\n\n @Autowired('columnModel') private columnModel: ColumnModel;\n @Autowired('dragAndDropService') private dragAndDropService: DragAndDropService;\n @Autowired('gridOptionsWrapper') private gridOptionsWrapper: GridOptionsWrapper;\n @Autowired('ctrlsService') public ctrlsService: CtrlsService;\n\n private gridBodyCon: GridBodyCtrl;\n\n private needToMoveLeft = false;\n private needToMoveRight = false;\n private movingIntervalId: number | null;\n private intervalCount: number;\n\n private pinned: string | null;\n private centerContainer: boolean;\n\n private lastDraggingEvent: DraggingEvent;\n\n // this counts how long the user has been trying to scroll by dragging and failing,\n // if they fail x amount of times, then the column will get pinned. this is what gives\n // the 'hold and pin' functionality\n private failedMoveAttempts: number;\n\n private eContainer: HTMLElement;\n\n constructor(pinned: string | null, eContainer: HTMLElement) {\n this.pinned = pinned;\n this.eContainer = eContainer;\n this.centerContainer = !exists(pinned);\n }\n\n @PostConstruct\n public init(): void {\n this.ctrlsService.whenReady(() => {\n this.gridBodyCon = this.ctrlsService.getGridBodyCtrl();\n });\n }\n\n public getIconName(): string {\n return this.pinned ? DragAndDropService.ICON_PINNED : DragAndDropService.ICON_MOVE;\n }\n\n public onDragEnter(draggingEvent: DraggingEvent): void {\n // we do dummy drag, so make sure column appears in the right location when first placed\n\n const columns = draggingEvent.dragItem.columns;\n const dragCameFromToolPanel = draggingEvent.dragSource.type === DragSourceType.ToolPanel;\n\n if (dragCameFromToolPanel) {\n // the if statement doesn't work if drag leaves grid, then enters again\n this.setColumnsVisible(columns, true, \"uiColumnDragged\");\n } else {\n // restore previous state of visible columns upon re-entering. this means if the user drags\n // a group out, and then drags the group back in, only columns that were originally visible\n // will be visible again. otherwise a group with three columns (but only two visible) could\n // be dragged out, then when it's dragged in again, all three are visible. this stops that.\n const visibleState = draggingEvent.dragItem.visibleState;\n const visibleColumns: Column[] = (columns || []).filter(column => visibleState![column.getId()]);\n this.setColumnsVisible(visibleColumns, true, \"uiColumnDragged\");\n }\n\n this.setColumnsPinned(columns, this.pinned, \"uiColumnDragged\");\n this.onDragging(draggingEvent, true);\n }\n\n public onDragLeave(draggingEvent: DraggingEvent): void {\n const hideColumnOnExit = !this.gridOptionsWrapper.isSuppressDragLeaveHidesColumns() && !draggingEvent.fromNudge;\n\n if (hideColumnOnExit) {\n const dragItem = draggingEvent.dragSource.getDragItem();\n const columns = dragItem.columns;\n this.setColumnsVisible(columns, false, \"uiColumnDragged\");\n }\n\n this.ensureIntervalCleared();\n }\n\n public setColumnsVisible(columns: Column[] | null | undefined, visible: boolean, source: ColumnEventType = \"api\") {\n if (columns) {\n const allowedCols = columns.filter(c => !c.getColDef().lockVisible);\n this.columnModel.setColumnsVisible(allowedCols, visible, source);\n }\n }\n\n public setColumnsPinned(columns: Column[] | null | undefined, pinned: string | null, source: ColumnEventType = \"api\") {\n if (columns) {\n const allowedCols = columns.filter(c => !c.getColDef().lockPinned);\n this.columnModel.setColumnsPinned(allowedCols, pinned, source);\n }\n }\n\n public onDragStop(): void {\n this.ensureIntervalCleared();\n }\n\n private normaliseX(x: number): number {\n // flip the coordinate if doing RTL\n if (this.gridOptionsWrapper.isEnableRtl()) {\n const clientWidth = this.eContainer.clientWidth;\n x = clientWidth - x;\n }\n\n // adjust for scroll only if centre container (the pinned containers don't scroll)\n if (this.centerContainer) {\n x += this.ctrlsService.getCenterRowContainerCtrl().getCenterViewportScrollLeft();\n }\n\n return x;\n }\n\n private checkCenterForScrolling(xAdjustedForScroll: number): void {\n if (this.centerContainer) {\n // scroll if the mouse has gone outside the grid (or just outside the scrollable part if pinning)\n // putting in 50 buffer, so even if user gets to edge of grid, a scroll will happen\n const firstVisiblePixel = this.ctrlsService.getCenterRowContainerCtrl().getCenterViewportScrollLeft();\n const lastVisiblePixel = firstVisiblePixel + this.ctrlsService.getCenterRowContainerCtrl().getCenterWidth();\n\n if (this.gridOptionsWrapper.isEnableRtl()) {\n this.needToMoveRight = xAdjustedForScroll < (firstVisiblePixel + 50);\n this.needToMoveLeft = xAdjustedForScroll > (lastVisiblePixel - 50);\n } else {\n this.needToMoveLeft = xAdjustedForScroll < (firstVisiblePixel + 50);\n this.needToMoveRight = xAdjustedForScroll > (lastVisiblePixel - 50);\n }\n\n if (this.needToMoveLeft || this.needToMoveRight) {\n this.ensureIntervalStarted();\n } else {\n this.ensureIntervalCleared();\n }\n }\n }\n\n public onDragging(draggingEvent: DraggingEvent, fromEnter = false): void {\n\n this.lastDraggingEvent = draggingEvent;\n\n // if moving up or down (ie not left or right) then do nothing\n if (missing(draggingEvent.hDirection)) {\n return;\n }\n\n const mouseXNormalised = this.normaliseX(draggingEvent.x);\n\n // if the user is dragging into the panel, ie coming from the side panel into the main grid,\n // we don't want to scroll the grid this time, it would appear like the table is jumping\n // each time a column is dragged in.\n if (!fromEnter) {\n this.checkCenterForScrolling(mouseXNormalised);\n }\n\n const hDirectionNormalised = this.normaliseDirection(draggingEvent.hDirection);\n\n const dragSourceType: DragSourceType = draggingEvent.dragSource.type;\n let columnsToMove = draggingEvent.dragSource.getDragItem().columns;\n\n columnsToMove = columnsToMove!.filter(col => {\n if (col.getColDef().lockPinned) {\n // if locked return true only if both col and container are same pin type.\n // double equals (==) here on purpose so that null==undefined is true (for not pinned options)\n return col.getPinned() == this.pinned;\n }\n // if not pin locked, then always allowed to be in this container\n return true;\n });\n\n this.attemptMoveColumns(dragSourceType, columnsToMove, hDirectionNormalised, mouseXNormalised, fromEnter);\n }\n\n private normaliseDirection(hDirection: HorizontalDirection): HorizontalDirection | undefined {\n if (this.gridOptionsWrapper.isEnableRtl()) {\n switch (hDirection) {\n case HorizontalDirection.Left: return HorizontalDirection.Right;\n case HorizontalDirection.Right: return HorizontalDirection.Left;\n default: console.error(`AG Grid: Unknown direction ${hDirection}`);\n }\n } else {\n return hDirection;\n }\n }\n\n // returns the index of the first column in the list ONLY if the cols are all beside\n // each other. if the cols are not beside each other, then returns null\n private calculateOldIndex(movingCols: Column[]): number | null {\n const gridCols: Column[] = this.columnModel.getAllGridColumns();\n const indexes = sortNumerically(movingCols.map(col => gridCols.indexOf(col)));\n const firstIndex = indexes[0];\n const lastIndex = last(indexes);\n const spread = lastIndex - firstIndex;\n const gapsExist = spread !== indexes.length - 1;\n\n return gapsExist ? null : firstIndex;\n }\n\n private attemptMoveColumns(dragSourceType: DragSourceType, allMovingColumns: Column[], hDirection: HorizontalDirection | undefined, mouseX: number, fromEnter: boolean): void {\n const draggingLeft = hDirection === HorizontalDirection.Left;\n const draggingRight = hDirection === HorizontalDirection.Right;\n\n // it is important to sort the moving columns as they are in grid columns, as the list of moving columns\n // could themselves be part of 'married children' groups, which means we need to maintain the order within\n // the moving list.\n const allMovingColumnsOrdered = allMovingColumns.slice();\n this.columnModel.sortColumnsLikeGridColumns(allMovingColumnsOrdered);\n\n const validMoves = this.calculateValidMoves(allMovingColumnsOrdered, draggingRight, mouseX);\n\n // if cols are not adjacent, then this returns null. when moving, we constrain the direction of the move\n // (ie left or right) to the mouse direction. however\n const oldIndex = this.calculateOldIndex(allMovingColumnsOrdered);\n\n if (validMoves.length === 0) { return; }\n\n const firstValidMove = validMoves[0];\n\n // the two check below stop an error when the user grabs a group my a middle column, then\n // it is possible the mouse pointer is to the right of a column while been dragged left.\n // so we need to make sure that the mouse pointer is actually left of the left most column\n // if moving left, and right of the right most column if moving right\n\n // we check 'fromEnter' below so we move the column to the new spot if the mouse is coming from\n // outside the grid, eg if the column is moving from side panel, mouse is moving left, then we should\n // place the column to the RHS even if the mouse is moving left and the column is already on\n // the LHS. otherwise we stick to the rule described above.\n\n let constrainDirection = oldIndex !== null && !fromEnter;\n\n // don't consider 'fromEnter' when dragging header cells, otherwise group can jump to opposite direction of drag\n if (dragSourceType == DragSourceType.HeaderCell) {\n constrainDirection = oldIndex !== null;\n }\n\n if (constrainDirection) {\n // only allow left drag if this column is moving left\n if (draggingLeft && firstValidMove >= (oldIndex as number)) { return; }\n\n // only allow right drag if this column is moving right\n if (draggingRight && firstValidMove <= (oldIndex as number)) { return; }\n }\n\n for (let i = 0; i < validMoves.length; i++) {\n const move: number = validMoves[i];\n\n if (!this.columnModel.doesMovePassRules(allMovingColumnsOrdered, move)) {\n continue;\n }\n\n this.columnModel.moveColumns(allMovingColumnsOrdered, move, \"uiColumnDragged\");\n\n // important to return here, so once we do the first valid move, we don't try do any more\n return;\n }\n }\n\n private calculateValidMoves(movingCols: Column[], draggingRight: boolean, mouseX: number): number[] {\n const isMoveBlocked = this.gridOptionsWrapper.isSuppressMovableColumns() || movingCols.some(col => col.getColDef().suppressMovable);\n\n if (isMoveBlocked) { return []; }\n // this is the list of cols on the screen, so it's these we use when comparing the x mouse position\n const allDisplayedCols = this.columnModel.getDisplayedColumns(this.pinned);\n // but this list is the list of all cols, when we move a col it's the index within this list that gets used,\n // so the result we return has to be and index location for this list\n const allGridCols = this.columnModel.getAllGridColumns();\n\n const movingDisplayedCols = allDisplayedCols.filter(col => includes(movingCols, col));\n const otherDisplayedCols = allDisplayedCols.filter(col => !includes(movingCols, col));\n const otherGridCols = allGridCols.filter(col => !includes(movingCols, col));\n\n // work out how many DISPLAYED columns fit before the 'x' position. this gives us the displayIndex.\n // for example, if cols are a,b,c,d and we find a,b fit before 'x', then we want to place the moving\n // col between b and c (so that it is under the mouse position).\n let displayIndex = 0;\n let availableWidth = mouseX;\n\n // if we are dragging right, then the columns will be to the left of the mouse, so we also want to\n // include the width of the moving columns\n if (draggingRight) {\n let widthOfMovingDisplayedCols = 0;\n movingDisplayedCols.forEach(col => widthOfMovingDisplayedCols += col.getActualWidth());\n availableWidth -= widthOfMovingDisplayedCols;\n }\n\n if (availableWidth > 0) {\n // now count how many of the displayed columns will fit to the left\n for (let i = 0; i < otherDisplayedCols.length; i++) {\n const col = otherDisplayedCols[i];\n availableWidth -= col.getActualWidth();\n if (availableWidth < 0) { break; }\n displayIndex++;\n }\n // trial and error, if going right, we adjust by one, i didn't manage to quantify why, but it works\n if (draggingRight) {\n displayIndex++;\n }\n }\n\n // the display index is with respect to all the showing columns, however when we move, it's with\n // respect to all grid columns, so we need to translate from display index to grid index\n\n let firstValidMove: number;\n if (displayIndex > 0) {\n const leftColumn = otherDisplayedCols[displayIndex - 1];\n firstValidMove = otherGridCols.indexOf(leftColumn) + 1;\n } else {\n firstValidMove = otherGridCols.indexOf(otherDisplayedCols[0]);\n if (firstValidMove === -1) {\n firstValidMove = 0;\n }\n }\n\n const validMoves = [firstValidMove];\n const numberComparator = (a: number, b:number) => a - b;\n\n // add in other valid moves due to hidden columns and married children. for example, a particular\n // move might break a group that has married children (so move isn't valid), however there could\n // be hidden columns (not displayed) that we could jump over to make the move valid. because\n // they are hidden, user doesn't see any different, however it allows moves that would otherwise\n // not work. for example imagine a group with 9 columns and all columns are hidden except the\n // middle one (so 4 hidden to left, 4 hidden to right), then when moving 'firstValidMove' will\n // be relative to the not-shown column, however we need to consider the move jumping over all the\n // hidden children. if we didn't do this, then if the group just described was at the end (RHS) of the\n // grid, there would be no way to put a column after it (as the grid would only consider beside the\n // visible column, which would fail valid move rules).\n if (draggingRight) {\n // if dragging right, then we add all the additional moves to the right. so in other words\n // if the next move is not valid, find the next move to the right that is valid.\n let pointer = firstValidMove + 1;\n const lastIndex = allGridCols.length - 1;\n while (pointer <= lastIndex) {\n validMoves.push(pointer);\n pointer++;\n }\n\n // adding columns here means the order is now messed up\n validMoves.sort(numberComparator);\n } else {\n // if dragging left we do the reverse of dragging right, we add in all the valid moves to the\n // left. however we also have to consider moves to the right for all hidden columns first.\n // (this logic is hard to reason with, it was worked out with trial and error,\n // more observation rather than science).\n\n // add moves to the right\n let pointer = firstValidMove;\n const lastIndex = allGridCols.length - 1;\n let displacedCol = allGridCols[pointer];\n while (pointer <= lastIndex && this.isColumnHidden(allDisplayedCols, displacedCol)) {\n pointer++;\n validMoves.push(pointer);\n displacedCol = allGridCols[pointer];\n }\n\n // add moves to the left\n pointer = firstValidMove - 1;\n const firstDisplayIndex = 0;\n while (pointer >= firstDisplayIndex) {\n validMoves.push(pointer);\n pointer--;\n }\n\n // adding columns here means the order is now messed up\n validMoves.sort(numberComparator).reverse();\n }\n\n return validMoves;\n }\n\n // isHidden takes into account visible=false and group=closed, ie it is not displayed\n private isColumnHidden(displayedColumns: Column[], col: Column) {\n return displayedColumns.indexOf(col) < 0;\n }\n\n private ensureIntervalStarted(): void {\n if (!this.movingIntervalId) {\n this.intervalCount = 0;\n this.failedMoveAttempts = 0;\n this.movingIntervalId = window.setInterval(this.moveInterval.bind(this), 100);\n if (this.needToMoveLeft) {\n this.dragAndDropService.setGhostIcon(DragAndDropService.ICON_LEFT, true);\n } else {\n this.dragAndDropService.setGhostIcon(DragAndDropService.ICON_RIGHT, true);\n }\n }\n }\n\n private ensureIntervalCleared(): void {\n if (this.movingIntervalId) {\n window.clearInterval(this.movingIntervalId);\n this.movingIntervalId = null;\n this.dragAndDropService.setGhostIcon(DragAndDropService.ICON_MOVE);\n }\n }\n\n private moveInterval(): void {\n // the amounts we move get bigger at each interval, so the speed accelerates, starting a bit slow\n // and getting faster. this is to give smoother user experience. we max at 100px to limit the speed.\n let pixelsToMove: number;\n this.intervalCount++;\n pixelsToMove = 10 + (this.intervalCount * 5);\n if (pixelsToMove > 100) {\n pixelsToMove = 100;\n }\n\n let pixelsMoved: number | null = null;\n const scrollFeature = this.gridBodyCon.getScrollFeature();\n if (this.needToMoveLeft) {\n pixelsMoved = scrollFeature.scrollHorizontally(-pixelsToMove);\n } else if (this.needToMoveRight) {\n pixelsMoved = scrollFeature.scrollHorizontally(pixelsToMove);\n }\n\n if (pixelsMoved !== 0) {\n this.onDragging(this.lastDraggingEvent);\n this.failedMoveAttempts = 0;\n } else {\n // we count the failed move attempts. if we fail to move 7 times, then we pin the column.\n // this is how we achieve pining by dragging the column to the edge of the grid.\n this.failedMoveAttempts++;\n\n const columns = this.lastDraggingEvent.dragItem.columns;\n const columnsThatCanPin = columns!.filter(c => !c.getColDef().lockPinned);\n\n if (columnsThatCanPin.length > 0) {\n this.dragAndDropService.setGhostIcon(DragAndDropService.ICON_PINNED);\n if (this.failedMoveAttempts > 7) {\n const pinType = this.needToMoveLeft ? Constants.PINNED_LEFT : Constants.PINNED_RIGHT;\n this.setColumnsPinned(columnsThatCanPin, pinType, \"uiColumnDragged\");\n this.dragAndDropService.nudge();\n }\n }\n }\n }\n}","import { DragAndDropService, DraggingEvent, DragSourceType, DropTarget } from \"../../dragAndDrop/dragAndDropService\";\nimport { Autowired, PostConstruct } from \"../../context/context\";\nimport { MoveColumnFeature } from \"./moveColumnFeature\";\nimport { BodyDropPivotTarget } from \"./bodyDropPivotTarget\";\nimport { ColumnModel } from \"../../columns/columnModel\";\nimport { Constants } from \"../../constants/constants\";\nimport { BeanStub } from \"../../context/beanStub\";\nimport { CtrlsService } from \"../../ctrlsService\";\n\nexport interface DropListener {\n getIconName(): string | null;\n onDragEnter(params: DraggingEvent): void;\n onDragLeave(params: DraggingEvent): void;\n onDragging(params: DraggingEvent): void;\n onDragStop(params: DraggingEvent): void;\n}\n\nexport class BodyDropTarget extends BeanStub implements DropTarget {\n\n @Autowired('dragAndDropService') private dragAndDropService: DragAndDropService;\n @Autowired('columnModel') private columnModel: ColumnModel;\n @Autowired('ctrlsService') private ctrlsService: CtrlsService;\n\n private pinned: string | null;\n // public because it's part of the DropTarget interface\n private eContainer: HTMLElement;\n // public because it's part of the DropTarget interface\n private eSecondaryContainers: HTMLElement[][];\n private currentDropListener: DropListener;\n\n private moveColumnFeature: MoveColumnFeature;\n private bodyDropPivotTarget: BodyDropPivotTarget;\n\n constructor(pinned: string | null, eContainer: HTMLElement) {\n super();\n this.pinned = pinned;\n this.eContainer = eContainer;\n }\n\n @PostConstruct\n private postConstruct(): void {\n this.ctrlsService.whenReady(p => {\n switch (this.pinned) {\n case Constants.PINNED_LEFT:\n this.eSecondaryContainers = [\n [p.gridBodyCtrl.getBodyViewportElement(), p.leftRowContainerCtrl.getContainerElement()],\n [p.bottomLeftRowContainerCtrl.getContainerElement()],\n [p.topLeftRowContainerCtrl.getContainerElement()]\n ];\n break;\n case Constants.PINNED_RIGHT:\n this.eSecondaryContainers = [\n [p.gridBodyCtrl.getBodyViewportElement(), p.rightRowContainerCtrl.getContainerElement()],\n [p.bottomRightRowContainerCtrl.getContainerElement()],\n [p.topRightRowContainerCtrl.getContainerElement()]\n ];\n break;\n default:\n this.eSecondaryContainers = [\n [p.gridBodyCtrl.getBodyViewportElement(), p.centerRowContainerCtrl.getViewportElement()],\n [p.bottomCenterRowContainerCtrl.getViewportElement()],\n [p.topCenterRowContainerCtrl.getViewportElement()]\n ];\n break;\n }\n });\n }\n\n public isInterestedIn(type: DragSourceType): boolean {\n return type === DragSourceType.HeaderCell ||\n (type === DragSourceType.ToolPanel && this.gridOptionsWrapper.isAllowDragFromColumnsToolPanel());\n }\n\n public getSecondaryContainers(): HTMLElement[][] {\n return this.eSecondaryContainers;\n }\n\n public getContainer(): HTMLElement {\n return this.eContainer;\n }\n\n @PostConstruct\n private init(): void {\n this.moveColumnFeature = this.createManagedBean(new MoveColumnFeature(this.pinned, this.eContainer));\n this.bodyDropPivotTarget = this.createManagedBean(new BodyDropPivotTarget(this.pinned));\n\n this.dragAndDropService.addDropTarget(this);\n }\n\n public getIconName(): string | null {\n return this.currentDropListener.getIconName();\n }\n\n // we want to use the bodyPivotTarget if the user is dragging columns in from the toolPanel\n // and we are in pivot mode, as it has to logic to set pivot/value/group on the columns when\n // dropped into the grid's body.\n private isDropColumnInPivotMode(draggingEvent: DraggingEvent): boolean {\n // in pivot mode, then if moving a column (ie didn't come from toolpanel) then it's\n // a standard column move, however if it came from the toolpanel, then we are introducing\n // dimensions or values to the grid\n return this.columnModel.isPivotMode() && draggingEvent.dragSource.type === DragSourceType.ToolPanel;\n }\n\n public onDragEnter(draggingEvent: DraggingEvent): void {\n // we pick the drop listener depending on whether we are in pivot mode are not. if we are\n // in pivot mode, then dropping cols changes the row group, pivot, value stats. otherwise\n // we change visibility state and position.\n this.currentDropListener = this.isDropColumnInPivotMode(draggingEvent) ? this.bodyDropPivotTarget : this.moveColumnFeature;\n this.currentDropListener.onDragEnter(draggingEvent);\n }\n\n public onDragLeave(params: DraggingEvent): void {\n this.currentDropListener.onDragLeave(params);\n }\n\n public onDragging(params: DraggingEvent): void {\n this.currentDropListener.onDragging(params);\n }\n\n public onDragStop(params: DraggingEvent): void {\n this.currentDropListener.onDragStop(params);\n }\n\n}\n","import { AbstractColDef, HeaderClassParams, ToolPanelClassParams } from \"../../entities/colDef\";\nimport { GridOptionsWrapper } from \"../../gridOptionsWrapper\";\nimport { ColumnGroup } from \"../../entities/columnGroup\";\nimport { Column } from \"../../entities/column\";\nimport { ProvidedColumnGroup } from \"../../entities/providedColumnGroup\";\nimport { missing } from \"../../utils/generic\";\n\nexport class CssClassApplier {\n\n public static getHeaderClassesFromColDef(\n abstractColDef: AbstractColDef | null,\n gridOptionsWrapper: GridOptionsWrapper,\n column: Column | null,\n columnGroup: ColumnGroup | null\n ): string[] {\n if (missing(abstractColDef)) { return []; }\n\n return this.getColumnClassesFromCollDef(\n abstractColDef.headerClass,\n abstractColDef,\n gridOptionsWrapper,\n column,\n columnGroup\n );\n }\n\n public static getToolPanelClassesFromColDef(\n abstractColDef: AbstractColDef | null,\n gridOptionsWrapper: GridOptionsWrapper,\n column: Column | null,\n columnGroup: ProvidedColumnGroup | null\n ): string[] {\n if (missing(abstractColDef)) { return []; }\n\n return this.getColumnClassesFromCollDef(\n abstractColDef.toolPanelClass,\n abstractColDef,\n gridOptionsWrapper,\n column,\n columnGroup\n );\n }\n\n private static getClassParams(abstractColDef: AbstractColDef,\n gridOptionsWrapper: GridOptionsWrapper,\n column: Column | null,\n columnGroup: T['columnGroup']): T {\n return {\n // bad naming, as colDef here can be a group or a column,\n // however most people won't appreciate the difference,\n // so keeping it as colDef to avoid confusion.\n colDef: abstractColDef,\n column: column,\n columnGroup: columnGroup,\n api: gridOptionsWrapper.getApi()!,\n columnApi: gridOptionsWrapper.getColumnApi()!,\n context: gridOptionsWrapper.getContext()\n } as T;\n }\n\n private static getColumnClassesFromCollDef(\n classesOrFunc: string | string[] | ((params: T) => string | string[] | undefined) | null | undefined,\n abstractColDef: AbstractColDef,\n gridOptionsWrapper: GridOptionsWrapper,\n column: Column | null,\n columnGroup: ColumnGroup | ProvidedColumnGroup | null\n ): string[] {\n if (missing(classesOrFunc)) { return []; }\n\n let classToUse: string | string[] | undefined;\n\n if (typeof classesOrFunc === 'function') {\n const params: T = this.getClassParams(abstractColDef, gridOptionsWrapper, column, columnGroup);\n classToUse = classesOrFunc(params);\n } else {\n classToUse = classesOrFunc;\n }\n\n if (typeof classToUse === 'string') { return [classToUse]; }\n if (Array.isArray(classToUse)) { return [...classToUse]; }\n\n return [];\n }\n}","import { UserCompDetails } from \"../../../components/framework/userComponentFactory\";\nimport { PostConstruct, PreDestroy } from \"../../../context/context\";\nimport { Column } from \"../../../entities/column\";\nimport { removeAriaSort, setAriaDescription, setAriaSort } from \"../../../utils/aria\";\nimport { RefSelector } from \"../../../widgets/componentAnnotations\";\nimport { AbstractHeaderCellComp } from \"../abstractCell/abstractHeaderCellComp\";\nimport { HeaderCellCtrl, IHeaderCellComp } from \"./headerCellCtrl\";\nimport { IHeaderComp } from \"./headerComp\";\n\nexport class HeaderCellComp extends AbstractHeaderCellComp {\n\n private static TEMPLATE = /* html */\n `
\n
\n
`;\n\n @RefSelector('eResize') private eResize: HTMLElement;\n\n protected readonly column: Column;\n protected readonly pinned: string | null;\n\n private headerComp: IHeaderComp | undefined;\n private headerCompGui: HTMLElement | undefined;\n private headerCompVersion = 0;\n\n constructor(ctrl: HeaderCellCtrl) {\n super(HeaderCellComp.TEMPLATE, ctrl);\n this.column = ctrl.getColumnGroupChild() as Column;\n this.pinned = ctrl.getPinned();\n }\n\n @PostConstruct\n private postConstruct(): void {\n\n const eGui = this.getGui();\n\n const setAttribute = (name: string, value: string | null | undefined, element?: HTMLElement) => {\n const actualElement = element ? element : eGui;\n if (value != null && value != '') {\n actualElement.setAttribute(name, value);\n } else {\n actualElement.removeAttribute(name);\n }\n };\n\n const compProxy: IHeaderCellComp = {\n setWidth: width => eGui.style.width = width,\n addOrRemoveCssClass: (cssClassName, on) => this.addOrRemoveCssClass(cssClassName, on),\n setColId: id => setAttribute('col-id', id),\n setTitle: title => setAttribute('title', title),\n setAriaDescription: label => setAriaDescription(eGui, label),\n setAriaSort: sort => sort ? setAriaSort(eGui, sort) : removeAriaSort(eGui),\n setUserCompDetails: compDetails => this.setUserCompDetails(compDetails),\n getUserCompInstance: () => this.headerComp\n };\n\n this.ctrl.setComp(compProxy, this.getGui(), this.eResize);\n\n const selectAllGui = this.ctrl.getSelectAllGui();\n this.eResize.insertAdjacentElement('afterend', selectAllGui);\n }\n\n @PreDestroy\n private destroyHeaderComp(): void {\n if (this.headerComp) {\n this.getGui().removeChild(this.headerCompGui!);\n this.headerComp = this.destroyBean(this.headerComp);\n this.headerCompGui = undefined;\n }\n }\n\n private setUserCompDetails(compDetails: UserCompDetails): void {\n this.headerCompVersion++;\n\n const versionCopy = this.headerCompVersion;\n\n compDetails.newAgStackInstance()!.then(comp => this.afterCompCreated(versionCopy, comp));\n }\n\n private afterCompCreated(version: number, headerComp: IHeaderComp): void {\n\n if (version != this.headerCompVersion || !this.isAlive()) {\n this.destroyBean(headerComp);\n return;\n }\n\n this.destroyHeaderComp();\n\n this.headerComp = headerComp;\n this.headerCompGui = headerComp.getGui();\n this.getGui().appendChild(this.headerCompGui);\n this.ctrl.setDragSource(this.headerCompGui!);\n }\n}\n","import { UserCompDetails, UserComponentFactory } from \"../../../components/framework/userComponentFactory\";\nimport { Autowired, PostConstruct } from \"../../../context/context\";\nimport { RefSelector } from \"../../../widgets/componentAnnotations\";\nimport { AbstractHeaderCellComp } from \"../abstractCell/abstractHeaderCellComp\";\nimport { HeaderGroupCellCtrl, IHeaderGroupCellComp } from \"./headerGroupCellCtrl\";\nimport { IHeaderGroupComp } from \"./headerGroupComp\";\n\nexport class HeaderGroupCellComp extends AbstractHeaderCellComp {\n\n private static TEMPLATE = /* html */\n `
\n
\n
`;\n\n @Autowired('userComponentFactory') private userComponentFactory: UserComponentFactory;\n\n @RefSelector('eResize') private eResize: HTMLElement;\n\n constructor(ctrl: HeaderGroupCellCtrl) {\n super(HeaderGroupCellComp.TEMPLATE, ctrl);\n }\n\n @PostConstruct\n private postConstruct(): void {\n\n const eGui = this.getGui();\n\n const setAttribute = (key: string, value: string | undefined) =>\n value != undefined ? eGui.setAttribute(key, value) : eGui.removeAttribute(key);\n\n const compProxy: IHeaderGroupCellComp = {\n addOrRemoveCssClass: (cssClassName, on) => this.addOrRemoveCssClass(cssClassName, on),\n addOrRemoveResizableCssClass: (cssClassName, on) => this.eResize.classList.toggle(cssClassName, on),\n setWidth: width => eGui.style.width = width,\n setColId: id => eGui.setAttribute(\"col-id\", id),\n setAriaExpanded: expanded => setAttribute('aria-expanded', expanded),\n setTitle: title => setAttribute(\"title\", title),\n setUserCompDetails: details => this.setUserCompDetails(details)\n };\n\n this.ctrl.setComp(compProxy, eGui, this.eResize);\n }\n\n private setUserCompDetails(details: UserCompDetails): void {\n details.newAgStackInstance()!.then(comp => this.afterHeaderCompCreated(comp));\n }\n\n private afterHeaderCompCreated(headerGroupComp: IHeaderGroupComp): void {\n\n const destroyFunc = () => this.destroyBean(headerGroupComp);\n\n if (!this.isAlive()) {\n destroyFunc();\n return;\n }\n\n this.getGui().appendChild(headerGroupComp.getGui());\n this.addDestroyFunc(destroyFunc);\n\n this.ctrl.setDragSource(headerGroupComp.getGui());\n }\n\n}\n","import { IRowModel } from './iRowModel';\nimport { RowNodeTransaction } from './rowNodeTransaction';\nimport { RowDataTransaction } from './rowDataTransaction';\nimport { RowHighlightPosition, RowNode } from '../entities/rowNode';\nimport { ChangedPath } from '../utils/changedPath';\n\nexport enum ClientSideRowModelSteps {\n EVERYTHING = 'group',\n FILTER = 'filter',\n SORT = 'sort',\n MAP = 'map',\n AGGREGATE = 'aggregate',\n FILTER_AGGREGATES = 'filter_aggregates',\n PIVOT = 'pivot',\n NOTHING = 'nothing'\n}\n\nexport interface IClientSideRowModel extends IRowModel {\n onRowGroupOpened(): void;\n updateRowData(rowDataTran: RowDataTransaction, rowNodeOrder?: { [id: string]: number; } | null): RowNodeTransaction | null;\n setRowData(rowData: any[]): void;\n refreshModel(params: RefreshModelParams): void;\n expandOrCollapseAll(expand: boolean): void;\n forEachLeafNode(callback: (node: RowNode, index: number) => void): void;\n forEachNode(callback: (node: RowNode, index: number) => void): void;\n forEachNodeAfterFilter(callback: (node: RowNode, index: number) => void): void;\n forEachNodeAfterFilterAndSort(callback: (node: RowNode, index: number) => void): void;\n resetRowHeights(): void;\n onRowHeightChanged(): void;\n batchUpdateRowData(rowDataTransaction: RowDataTransaction, callback?: (res: RowNodeTransaction) => void): void;\n flushAsyncTransactions(): void;\n getRootNode(): RowNode;\n doAggregate(changedPath?: ChangedPath): void;\n getTopLevelNodes(): RowNode[] | null;\n forEachPivotNode(callback: (node: RowNode, index: number) => void): void;\n ensureRowsAtPixel(rowNode: RowNode[], pixel: number, increment: number): boolean;\n highlightRowAtPixel(rowNode: RowNode | null, pixel?: number): void;\n getHighlightPosition(pixel: number, rowNode?: RowNode): RowHighlightPosition;\n getLastHighlightedRowNode(): RowNode | null;\n}\n\nexport interface RefreshModelParams {\n // how much of the pipeline to execute\n step: ClientSideRowModelSteps;\n // what state to reset the groups back to after the refresh\n groupState?: any;\n // if NOT new data, then this flag tells grid to check if rows already\n // exist for the nodes (matching by node id) and reuses the row if it does.\n keepRenderedRows?: boolean;\n // if true, rows that are kept are animated to the new position\n animate?: boolean;\n // if true, then rows we are editing will be kept\n keepEditingRows?: boolean;\n // if doing delta updates, this has the changes that were done\n rowNodeTransactions?: RowNodeTransaction[];\n // if doing delta updates, this has the order of the nodes\n rowNodeOrder?: { [id: string]: number };\n // true user called setRowData() (or a new page in pagination). the grid scrolls\n // back to the top when this is true.\n newData?: boolean;\n // true if this update is due to columns changing, ie no rows were changed\n afterColumnsChanged?: boolean;\n}\n","import { BeanStub } from \"../../../context/beanStub\";\nimport { Autowired } from \"../../../context/context\";\nimport { IHeaderColumn } from \"../../../entities/iHeaderColumn\";\nimport { FocusService } from \"../../../focusService\";\nimport { isUserSuppressingHeaderKeyboardEvent } from \"../../../utils/keyboard\";\nimport { HeaderRowCtrl } from \"../../row/headerRowCtrl\";\nimport { IHeaderCellComp } from \"../column/headerCellCtrl\";\n\nlet instanceIdSequence = 0;\n\nexport interface IAbstractHeaderCellComp {\n}\n\nexport class AbstractHeaderCellCtrl extends BeanStub {\n\n public static DOM_DATA_KEY_HEADER_CTRL = 'headerCtrl';\n\n @Autowired('focusService') protected focusService: FocusService;\n\n private instanceId: string;\n\n private columnGroupChild: IHeaderColumn;\n\n private parentRowCtrl: HeaderRowCtrl;\n\n protected eGui: HTMLElement;\n\n public lastFocusEvent: KeyboardEvent | null = null;\n\n constructor(columnGroupChild: IHeaderColumn, parentRowCtrl: HeaderRowCtrl) {\n super();\n\n this.columnGroupChild = columnGroupChild;\n this.parentRowCtrl = parentRowCtrl;\n\n // unique id to this instance, including the column ID to help with debugging in React as it's used in 'key'\n this.instanceId = columnGroupChild.getUniqueId() + '-' + instanceIdSequence++;\n }\n\n protected shouldStopEventPropagation(e: KeyboardEvent): boolean {\n const { headerRowIndex, column } = this.focusService.getFocusedHeader()!;\n\n return isUserSuppressingHeaderKeyboardEvent(\n this.gridOptionsWrapper,\n e,\n headerRowIndex,\n column\n );\n }\n\n protected setGui(eGui: HTMLElement): void {\n this.eGui = eGui;\n this.addDomData();\n }\n\n private addDomData(): void {\n const key = AbstractHeaderCellCtrl.DOM_DATA_KEY_HEADER_CTRL;\n this.gridOptionsWrapper.setDomData(this.eGui, key, this);\n this.addDestroyFunc(() => this.gridOptionsWrapper.setDomData(this.eGui, key, null));\n }\n\n public getGui(): HTMLElement {\n return this.eGui;\n }\n\n public focus(event?: KeyboardEvent): boolean {\n if (!this.eGui) { return false; }\n\n this.lastFocusEvent = event || null;\n this.eGui.focus();\n return true;\n }\n\n public getRowIndex(): number {\n return this.parentRowCtrl.getRowIndex();\n }\n\n public getParentRowCtrl(): HeaderRowCtrl {\n return this.parentRowCtrl;\n }\n\n public getPinned(): string | null {\n return this.parentRowCtrl.getPinned();\n }\n\n public getInstanceId(): string {\n return this.instanceId;\n }\n\n public getColumnGroupChild(): IHeaderColumn {\n return this.columnGroupChild;\n }\n}\n","import { AlignedGridsService } from \"./alignedGridsService\";\nimport { ColumnApi } from \"./columns/columnApi\";\nimport { ColumnModel } from \"./columns/columnModel\";\nimport { FrameworkComponentWrapper } from \"./components/framework/frameworkComponentWrapper\";\nimport { Constants } from \"./constants/constants\";\nimport { Autowired, Bean, Context, Optional, PostConstruct, PreDestroy } from \"./context/context\";\nimport { CtrlsService } from \"./ctrlsService\";\nimport { DragAndDropService } from \"./dragAndDrop/dragAndDropService\";\nimport { CellPosition } from \"./entities/cellPosition\";\nimport { ColDef, ColGroupDef, IAggFunc } from \"./entities/colDef\";\nimport { Column } from \"./entities/column\";\nimport {\n ChartRef,\n GetChartToolbarItems,\n GetContextMenuItems,\n GetMainMenuItems,\n GetRowIdFunc,\n GetRowNodeIdFunc,\n GetServerSideGroupKey,\n IsApplyServerSideTransaction,\n IsRowMaster,\n IsRowSelectable,\n IsServerSideGroup,\n RowClassParams,\n ServerSideStoreParams,\n} from \"./entities/gridOptions\";\nimport {\n GetGroupRowAggParams,\n GetServerSideStoreParamsParams,\n InitialGroupOrderComparatorParams,\n IsServerSideGroupOpenByDefaultParams,\n NavigateToNextCellParams,\n NavigateToNextHeaderParams,\n PaginationNumberFormatterParams,\n PostProcessPopupParams,\n PostSortRowsParams,\n ProcessRowParams,\n RowHeightParams,\n TabToNextCellParams,\n TabToNextHeaderParams\n} from \"./entities/iCallbackParams\";\nimport { RowNode } from \"./entities/rowNode\";\nimport { SideBarDef, SideBarDefParser } from \"./entities/sideBar\";\nimport { AgEvent, ColumnEventType } from \"./events\";\nimport { EventService } from \"./eventService\";\nimport { FilterManager } from \"./filter/filterManager\";\nimport { FocusService } from \"./focusService\";\nimport { GridBodyCtrl } from \"./gridBodyComp/gridBodyCtrl\";\nimport { NavigationService } from \"./gridBodyComp/navigationService\";\nimport { RowDropZoneEvents, RowDropZoneParams } from \"./gridBodyComp/rowDragFeature\";\nimport { GridOptionsWrapper } from \"./gridOptionsWrapper\";\nimport { HeaderPosition } from \"./headerRendering/common/headerPosition\";\nimport { CsvExportParams, ProcessCellForExportParams } from \"./interfaces/exportParams\";\nimport { AgChartThemeOverrides, AgChartThemePalette } from \"./interfaces/iAgChartOptions\";\nimport { IAggFuncService } from \"./interfaces/iAggFuncService\";\nimport { ICellEditor } from \"./interfaces/iCellEditor\";\nimport { ChartType, CrossFilterChartType, SeriesChartType } from \"./interfaces/iChartOptions\";\nimport { ChartModel, GetChartImageDataUrlParams, IChartService } from \"./interfaces/IChartService\";\nimport { ClientSideRowModelSteps, IClientSideRowModel, RefreshModelParams } from \"./interfaces/iClientSideRowModel\";\nimport { IClipboardCopyParams, IClipboardCopyRowsParams, IClipboardService } from \"./interfaces/iClipboardService\";\nimport { IContextMenuFactory } from \"./interfaces/iContextMenuFactory\";\nimport { ICsvCreator } from \"./interfaces/iCsvCreator\";\nimport { IDatasource } from \"./interfaces/iDatasource\";\nimport {\n ExcelExportMultipleSheetParams,\n ExcelExportParams,\n ExcelFactoryMode,\n IExcelCreator\n} from \"./interfaces/iExcelCreator\";\nimport { IFilter, IFilterComp } from \"./interfaces/iFilter\";\nimport { IImmutableService } from \"./interfaces/iImmutableService\";\nimport { IInfiniteRowModel } from \"./interfaces/iInfiniteRowModel\";\nimport { IMenuFactory } from \"./interfaces/iMenuFactory\";\nimport { CellRange, CellRangeParams, IRangeService } from \"./interfaces/IRangeService\";\nimport { IRowModel } from \"./interfaces/iRowModel\";\nimport { IServerSideDatasource } from \"./interfaces/iServerSideDatasource\";\nimport {\n IServerSideRowModel,\n IServerSideTransactionManager,\n RefreshStoreParams\n} from \"./interfaces/iServerSideRowModel\";\nimport { ServerSideStoreState } from \"./interfaces/IServerSideStore\";\nimport { ISideBar } from \"./interfaces/iSideBar\";\nimport { IStatusBarService } from \"./interfaces/iStatusBarService\";\nimport { IStatusPanel } from \"./interfaces/iStatusPanel\";\nimport { IToolPanel } from \"./interfaces/iToolPanel\";\nimport { IViewportDatasource } from \"./interfaces/iViewportDatasource\";\nimport { RowDataTransaction } from \"./interfaces/rowDataTransaction\";\nimport { RowNodeTransaction } from \"./interfaces/rowNodeTransaction\";\nimport { ServerSideTransaction, ServerSideTransactionResult } from \"./interfaces/serverSideTransaction\";\nimport { AnimationFrameService } from \"./misc/animationFrameService\";\nimport { ModuleNames } from \"./modules/moduleNames\";\nimport { ModuleRegistry } from \"./modules/moduleRegistry\";\nimport { PaginationProxy } from \"./pagination/paginationProxy\";\nimport { PinnedRowModel } from \"./pinnedRowModel/pinnedRowModel\";\nimport { ICellRenderer } from \"./rendering/cellRenderers/iCellRenderer\";\nimport { OverlayWrapperComponent } from \"./rendering/overlays/overlayWrapperComponent\";\nimport { RowRenderer } from \"./rendering/rowRenderer\";\nimport { RowNodeBlockLoader } from \"./rowNodeCache/rowNodeBlockLoader\";\nimport { SelectionService } from \"./selectionService\";\nimport { SortController } from \"./sortController\";\nimport { UndoRedoService } from \"./undoRedo/undoRedoService\";\nimport { doOnce } from \"./utils/function\";\nimport { exists, missing } from \"./utils/generic\";\nimport { iterateObject, removeAllReferences } from \"./utils/object\";\nimport { camelCaseToHumanText } from \"./utils/string\";\nimport { ValueCache } from \"./valueService/valueCache\";\nimport { ValueService } from \"./valueService/valueService\";\n\nexport interface StartEditingCellParams {\n /** The row index of the row to start editing */\n rowIndex: number;\n /** The column key of the row to start editing */\n colKey: string | Column;\n /** Set to `'top'` or `'bottom'` to start editing a pinned row */\n rowPinned?: string;\n /** The key to pass to the cell editor */\n key?: string;\n /** The charPress to pass to the cell editor */\n charPress?: string;\n}\n\nexport interface GetCellsParams {\n /** Optional list of row nodes to restrict operation to */\n rowNodes?: RowNode[];\n /** Optional list of columns to restrict operation to */\n columns?: (string | Column)[];\n}\n\nexport interface RefreshCellsParams extends GetCellsParams {\n /** Skip change detection, refresh everything. */\n force?: boolean;\n /** Skip cell flashing, if cell flashing is enabled. */\n suppressFlash?: boolean;\n}\n\nexport interface FlashCellsParams extends GetCellsParams {\n flashDelay?: number;\n fadeDelay?: number;\n}\n\nexport interface GetCellRendererInstancesParams extends GetCellsParams { }\n\nexport interface GetCellEditorInstancesParams extends GetCellsParams { }\n\nexport interface RedrawRowsParams {\n /** Row nodes to redraw */\n rowNodes?: RowNode[];\n}\n\ninterface CreateChartParams {\n /** The type of chart to create. */\n chartType: ChartType;\n /** The default theme to use, either a default option or your own custom theme. */\n chartThemeName?: string;\n /** Provide to display the chart outside of the grid in your own container. */\n chartContainer?: HTMLElement;\n /** Allows specific chart options in the current theme to be overridden. */\n chartThemeOverrides?: AgChartThemeOverrides;\n /** When enabled the chart will be unlinked from the grid after creation, any updates to the data will not be reflected in the chart. */\n unlinkChart?: boolean;\n}\n\nexport type ChartParamsCellRange = Partial>;\nexport interface CreateRangeChartParams extends CreateChartParams {\n /** The range of cells to be charted. If no rows / rowIndexes are specified all rows will be included. */\n cellRange: ChartParamsCellRange;\n /** Suppress highlighting the selected range in the grid. */\n suppressChartRanges?: boolean;\n /** The aggregation function that should be applied to all series data. */\n aggFunc?: string | IAggFunc;\n /** The series chart type configurations used in combination charts */\n seriesChartTypes?: SeriesChartType[];\n}\nexport interface CreateCrossFilterChartParams extends CreateChartParams {\n /** The type of cross-filter chart to create. */\n chartType: CrossFilterChartType;\n /** The range of cells to be charted. If no rows / rowIndexes are specified all rows will be included. */\n cellRange: ChartParamsCellRange;\n /** Suppress highlighting the selected range in the grid. */\n suppressChartRanges?: boolean;\n /** The aggregation function that should be applied to all series data. */\n aggFunc?: string | IAggFunc;\n}\n\nexport interface CreatePivotChartParams extends CreateChartParams { }\n\nexport interface DetailGridInfo {\n /**\n * Id of the detail grid, the format is `detail_`,\n * where ROW_ID is the `id` of the parent row.\n */\n id: string;\n /** Grid api of the detail grid. */\n api?: GridApi;\n /** Column api of the detail grid. */\n columnApi?: ColumnApi;\n}\n\nexport function unwrapUserComp(comp: T): T {\n const compAsAny = comp as any;\n const isProxy = compAsAny != null && compAsAny.getFrameworkComponentInstance != null;\n return isProxy ? compAsAny.getFrameworkComponentInstance() : comp;\n}\n\n@Bean('gridApi')\nexport class GridApi {\n\n @Optional('immutableService') private immutableService: IImmutableService;\n @Optional('csvCreator') private csvCreator: ICsvCreator;\n @Optional('excelCreator') private excelCreator: IExcelCreator;\n @Autowired('rowRenderer') private rowRenderer: RowRenderer;\n @Autowired('navigationService') private navigationService: NavigationService;\n @Autowired('filterManager') private filterManager: FilterManager;\n @Autowired('columnModel') private columnModel: ColumnModel;\n @Autowired('selectionService') private selectionService: SelectionService;\n @Autowired('gridOptionsWrapper') private gridOptionsWrapper: GridOptionsWrapper;\n @Autowired('valueService') private valueService: ValueService;\n @Autowired('alignedGridsService') private alignedGridsService: AlignedGridsService;\n @Autowired('eventService') private eventService: EventService;\n @Autowired('pinnedRowModel') private pinnedRowModel: PinnedRowModel;\n @Autowired('context') private context: Context;\n @Autowired('rowModel') private rowModel: IRowModel;\n @Autowired('sortController') private sortController: SortController;\n @Autowired('paginationProxy') private paginationProxy: PaginationProxy;\n @Autowired('focusService') private focusService: FocusService;\n @Autowired('dragAndDropService') private dragAndDropService: DragAndDropService;\n @Optional('rangeService') private rangeService: IRangeService;\n @Optional('clipboardService') private clipboardService: IClipboardService;\n @Optional('aggFuncService') private aggFuncService: IAggFuncService;\n @Autowired('menuFactory') private menuFactory: IMenuFactory;\n @Optional('contextMenuFactory') private contextMenuFactory: IContextMenuFactory;\n @Autowired('valueCache') private valueCache: ValueCache;\n @Autowired('animationFrameService') private animationFrameService: AnimationFrameService;\n @Optional('statusBarService') private statusBarService: IStatusBarService;\n @Optional('chartService') private chartService: IChartService;\n @Optional('undoRedoService') private undoRedoService: UndoRedoService;\n @Optional('rowNodeBlockLoader') private rowNodeBlockLoader: RowNodeBlockLoader;\n @Optional('ssrmTransactionManager') private serverSideTransactionManager: IServerSideTransactionManager;\n @Autowired('ctrlsService') private ctrlsService: CtrlsService;\n @Optional('frameworkComponentWrapper') private frameworkComponentWrapper: FrameworkComponentWrapper;\n\n private overlayWrapperComp: OverlayWrapperComponent;\n\n private gridBodyCtrl: GridBodyCtrl;\n private sideBarComp: ISideBar;\n\n private clientSideRowModel: IClientSideRowModel;\n private infiniteRowModel: IInfiniteRowModel;\n\n private serverSideRowModel: IServerSideRowModel;\n\n private detailGridInfoMap: { [id: string]: DetailGridInfo | undefined; } = {};\n\n private destroyCalled = false;\n\n public registerOverlayWrapperComp(overlayWrapperComp: OverlayWrapperComponent): void {\n this.overlayWrapperComp = overlayWrapperComp;\n }\n\n public registerSideBarComp(sideBarComp: ISideBar): void {\n this.sideBarComp = sideBarComp;\n }\n\n @PostConstruct\n private init(): void {\n switch (this.rowModel.getType()) {\n case Constants.ROW_MODEL_TYPE_CLIENT_SIDE:\n this.clientSideRowModel = this.rowModel as IClientSideRowModel;\n break;\n case Constants.ROW_MODEL_TYPE_INFINITE:\n this.infiniteRowModel = this.rowModel as IInfiniteRowModel;\n break;\n case Constants.ROW_MODEL_TYPE_SERVER_SIDE:\n this.serverSideRowModel = this.rowModel as IServerSideRowModel;\n break;\n }\n\n this.ctrlsService.whenReady(() => {\n this.gridBodyCtrl = this.ctrlsService.getGridBodyCtrl();\n });\n }\n\n /** Used internally by grid. Not intended to be used by the client. Interface may change between releases. */\n public __getAlignedGridService(): AlignedGridsService {\n return this.alignedGridsService;\n }\n\n /** Used internally by grid. Not intended to be used by the client. Interface may change between releases. */\n public __getContext(): Context {\n return this.context;\n }\n\n /** Register a detail grid with the master grid when it is created. */\n public addDetailGridInfo(id: string, gridInfo: DetailGridInfo): void {\n this.detailGridInfoMap[id] = gridInfo;\n }\n\n /** Unregister a detail grid from the master grid when it is destroyed. */\n public removeDetailGridInfo(id: string): void {\n this.detailGridInfoMap[id] = undefined;\n }\n\n /** Returns the `DetailGridInfo` corresponding to the supplied `detailGridId`. */\n public getDetailGridInfo(id: string): DetailGridInfo | undefined {\n return this.detailGridInfoMap[id];\n }\n\n /** Iterates through each `DetailGridInfo` in the grid and calls the supplied callback on each. */\n public forEachDetailGridInfo(callback: (gridInfo: DetailGridInfo, index: number) => void) {\n let index = 0;\n iterateObject(this.detailGridInfoMap, (id: string, gridInfo: DetailGridInfo) => {\n // check for undefined, as old references will still be lying around\n if (exists(gridInfo)) {\n callback(gridInfo, index);\n index++;\n }\n });\n }\n\n /** Similar to `exportDataAsCsv`, except returns the result as a string rather than download it. */\n public getDataAsCsv(params?: CsvExportParams): string | undefined {\n if (ModuleRegistry.assertRegistered(ModuleNames.CsvExportModule, 'api.getDataAsCsv')) {\n return this.csvCreator.getDataAsCsv(params);\n }\n }\n\n /** Downloads a CSV export of the grid's data. */\n public exportDataAsCsv(params?: CsvExportParams): void {\n if (ModuleRegistry.assertRegistered(ModuleNames.CsvExportModule, 'api.exportDataAsCSv')) {\n this.csvCreator.exportDataAsCsv(params);\n }\n }\n\n private getExcelExportMode(params?: ExcelExportParams): 'xlsx' | 'xml' {\n const baseParams = this.gridOptionsWrapper.getDefaultExportParams('excel');\n const mergedParams = Object.assign({ exportMode: 'xlsx' }, baseParams, params);\n return mergedParams.exportMode;\n }\n\n /** Similar to `exportDataAsExcel`, except instead of downloading a file, it will return a [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) to be processed by the user. */\n public getDataAsExcel(params?: ExcelExportParams): string | Blob | undefined {\n if (!ModuleRegistry.assertRegistered(ModuleNames.ExcelExportModule, 'api.getDataAsExcel')) { return; }\n const exportMode = this.getExcelExportMode(params);\n if (this.excelCreator.getFactoryMode(exportMode) === ExcelFactoryMode.MULTI_SHEET) {\n console.warn('AG Grid: The Excel Exporter is currently on Multi Sheet mode. End that operation by calling `api.getMultipleSheetAsExcel()` or `api.exportMultipleSheetsAsExcel()`');\n return;\n }\n return this.excelCreator.getDataAsExcel(params);\n }\n\n /** Downloads an Excel export of the grid's data. */\n public exportDataAsExcel(params?: ExcelExportParams): void {\n if (!ModuleRegistry.assertRegistered(ModuleNames.ExcelExportModule, 'api.exportDataAsExcel')) { return; }\n const exportMode = this.getExcelExportMode(params);\n if (this.excelCreator.getFactoryMode(exportMode) === ExcelFactoryMode.MULTI_SHEET) {\n console.warn('AG Grid: The Excel Exporter is currently on Multi Sheet mode. End that operation by calling `api.getMultipleSheetAsExcel()` or `api.exportMultipleSheetsAsExcel()`');\n return;\n }\n this.excelCreator.exportDataAsExcel(params);\n }\n\n /** This is method to be used to get the grid's data as a sheet, that will later be exported either by `getMultipleSheetsAsExcel()` or `exportMultipleSheetsAsExcel()`. */\n public getSheetDataForExcel(params?: ExcelExportParams): string | undefined {\n if (!ModuleRegistry.assertRegistered(ModuleNames.ExcelExportModule, 'api.getSheetDataForExcel')) { return; }\n const exportMode = this.getExcelExportMode(params);\n this.excelCreator.setFactoryMode(ExcelFactoryMode.MULTI_SHEET, exportMode);\n\n return this.excelCreator.getSheetDataForExcel(params);\n }\n\n /** Similar to `exportMultipleSheetsAsExcel`, except instead of downloading a file, it will return a [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) to be processed by the user. */\n public getMultipleSheetsAsExcel(params: ExcelExportMultipleSheetParams): Blob | undefined {\n if (ModuleRegistry.assertRegistered(ModuleNames.ExcelExportModule, 'api.getMultipleSheetsAsExcel')) {\n return this.excelCreator.getMultipleSheetsAsExcel(params);\n }\n }\n\n /** Downloads an Excel export of multiple sheets in one file. */\n public exportMultipleSheetsAsExcel(params: ExcelExportMultipleSheetParams): void {\n if (ModuleRegistry.assertRegistered(ModuleNames.ExcelExportModule, 'api.exportMultipleSheetsAsExcel')) {\n return this.excelCreator.exportMultipleSheetsAsExcel(params);\n }\n }\n\n /** @deprecated */\n public setEnterpriseDatasource(datasource: IServerSideDatasource) {\n console.warn(`AG Grid: since version 18.x, api.setEnterpriseDatasource() should be replaced with api.setServerSideDatasource()`);\n this.setServerSideDatasource(datasource);\n }\n\n /**\n * Sets an ARIA property in the grid panel (element with `role=\\\"grid\\\"`), and removes an ARIA property when the value is null.\n *\n * Example: `api.setGridAriaProperty('label', 'my grid')` will set `aria-label=\\\"my grid\\\"`.\n *\n * `api.setGridAriaProperty('label', null)` will remove the `aria-label` attribute from the grid element.\n */\n public setGridAriaProperty(property: string, value: string | null): void {\n if (!property) { return; }\n const eGrid = this.ctrlsService.getGridBodyCtrl().getGui();\n const ariaProperty = `aria-${property}`;\n\n if (value === null) {\n eGrid.removeAttribute(ariaProperty);\n } else {\n eGrid.setAttribute(ariaProperty, value);\n }\n\n }\n\n /** Set new datasource for Server-Side Row Model. */\n public setServerSideDatasource(datasource: IServerSideDatasource) {\n if (this.serverSideRowModel) {\n // should really have an IEnterpriseRowModel interface, so we are not casting to any\n this.serverSideRowModel.setDatasource(datasource);\n } else {\n console.warn(`AG Grid: you can only use an enterprise datasource when gridOptions.rowModelType is '${Constants.ROW_MODEL_TYPE_SERVER_SIDE}'`);\n }\n }\n\n /** Set new datasource for Infinite Row Model. */\n public setDatasource(datasource: IDatasource) {\n if (this.gridOptionsWrapper.isRowModelInfinite()) {\n (this.rowModel as IInfiniteRowModel).setDatasource(datasource);\n } else {\n console.warn(`AG Grid: you can only use a datasource when gridOptions.rowModelType is '${Constants.ROW_MODEL_TYPE_INFINITE}'`);\n }\n }\n\n /** Set new datasource for Viewport Row Model. */\n public setViewportDatasource(viewportDatasource: IViewportDatasource) {\n if (this.gridOptionsWrapper.isRowModelViewport()) {\n // this is bad coding, because it's using an interface that's exposed in the enterprise.\n // really we should create an interface in the core for viewportDatasource and let\n // the enterprise implement it, rather than casting to 'any' here\n (this.rowModel as any).setViewportDatasource(viewportDatasource);\n } else {\n console.warn(`AG Grid: you can only use a viewport datasource when gridOptions.rowModelType is '${Constants.ROW_MODEL_TYPE_VIEWPORT}'`);\n }\n }\n\n /** Set the row data. */\n public setRowData(rowData: any[]) {\n // immutable service is part of the CSRM module, if missing, no CSRM\n const missingImmutableService = this.immutableService == null;\n\n if (missingImmutableService) {\n console.warn('AG Grid: you can only set rowData when using the Client Side Row Model');\n return;\n }\n\n // if no keys provided provided for rows, then we can tread the operation as Immutable\n if (this.immutableService.isActive()) {\n this.immutableService.setRowData(rowData);\n } else {\n this.selectionService.reset();\n this.clientSideRowModel.setRowData(rowData);\n }\n }\n\n /** @deprecated */\n public setFloatingTopRowData(rows: any[]): void {\n console.warn('AG Grid: since v12, api.setFloatingTopRowData() is now api.setPinnedTopRowData()');\n this.setPinnedTopRowData(rows);\n }\n\n /** @deprecated */\n public setFloatingBottomRowData(rows: any[]): void {\n console.warn('AG Grid: since v12, api.setFloatingBottomRowData() is now api.setPinnedBottomRowData()');\n this.setPinnedBottomRowData(rows);\n }\n\n /** @deprecated */\n public getFloatingTopRowCount(): number {\n console.warn('AG Grid: since v12, api.getFloatingTopRowCount() is now api.getPinnedTopRowCount()');\n return this.getPinnedTopRowCount();\n }\n\n /** @deprecated */\n public getFloatingBottomRowCount(): number {\n console.warn('AG Grid: since v12, api.getFloatingBottomRowCount() is now api.getPinnedBottomRowCount()');\n return this.getPinnedBottomRowCount();\n }\n\n /** @deprecated */\n public getFloatingTopRow(index: number): RowNode | undefined {\n console.warn('AG Grid: since v12, api.getFloatingTopRow() is now api.getPinnedTopRow()');\n return this.getPinnedTopRow(index);\n }\n\n /** @deprecated */\n public getFloatingBottomRow(index: number): RowNode | undefined {\n console.warn('AG Grid: since v12, api.getFloatingBottomRow() is now api.getPinnedBottomRow()');\n return this.getPinnedBottomRow(index);\n }\n\n /** Set the top pinned rows. Call with no rows / undefined to clear top pinned rows. */\n public setPinnedTopRowData(rows?: any[]): void {\n this.pinnedRowModel.setPinnedTopRowData(rows);\n }\n\n /** Set the bottom pinned rows. Call with no rows / undefined to clear bottom pinned rows. */\n public setPinnedBottomRowData(rows?: any[]): void {\n this.pinnedRowModel.setPinnedBottomRowData(rows);\n }\n\n /** Gets the number of top pinned rows. */\n public getPinnedTopRowCount(): number {\n return this.pinnedRowModel.getPinnedTopRowCount();\n }\n\n /** Gets the number of bottom pinned rows. */\n public getPinnedBottomRowCount(): number {\n return this.pinnedRowModel.getPinnedBottomRowCount();\n }\n\n /** Gets the top pinned row with the specified index. */\n public getPinnedTopRow(index: number): RowNode | undefined {\n return this.pinnedRowModel.getPinnedTopRow(index);\n }\n\n /** Gets the top pinned row with the specified index. */\n public getPinnedBottomRow(index: number): RowNode | undefined {\n return this.pinnedRowModel.getPinnedBottomRow(index);\n }\n\n /**\n * Call to set new column definitions. The grid will redraw all the column headers, and then redraw all of the rows.\n */\n public setColumnDefs(colDefs: (ColDef | ColGroupDef)[], source: ColumnEventType = \"api\") {\n this.columnModel.setColumnDefs(colDefs, source);\n }\n\n /** Call to set new auto group column definition. The grid will recreate any auto-group columns if present. */\n public setAutoGroupColumnDef(colDef: ColDef, source: ColumnEventType = \"api\") {\n this.gridOptionsWrapper.setProperty('autoGroupColumnDef', colDef, true);\n }\n\n /** Call to set new Default Column Definition. */\n public setDefaultColDef(colDef: ColDef, source: ColumnEventType = \"api\") {\n this.gridOptionsWrapper.setProperty('defaultColDef', colDef, true);\n }\n\n public expireValueCache(): void {\n this.valueCache.expire();\n }\n\n /**\n * Returns an object with two properties:\n * - `top`: The top pixel position of the current scroll in the grid\n * - `bottom`: The bottom pixel position of the current scroll in the grid\n */\n public getVerticalPixelRange(): { top: number, bottom: number; } {\n return this.gridBodyCtrl.getScrollFeature().getVScrollPosition();\n }\n\n /**\n * Returns an object with two properties:\n * - `left`: The left pixel position of the current scroll in the grid\n * - `right`: The right pixel position of the current scroll in the grid\n */\n public getHorizontalPixelRange(): { left: number, right: number; } {\n return this.gridBodyCtrl.getScrollFeature().getHScrollPosition();\n }\n\n /** If `true`, the horizontal scrollbar will always be present, even if not required. Otherwise, it will only be displayed when necessary. */\n public setAlwaysShowHorizontalScroll(show: boolean) {\n this.gridOptionsWrapper.setProperty('alwaysShowHorizontalScroll', show);\n }\n\n /** If `true`, the vertical scrollbar will always be present, even if not required. Otherwise it will only be displayed when necessary. */\n public setAlwaysShowVerticalScroll(show: boolean) {\n this.gridOptionsWrapper.setProperty('alwaysShowVerticalScroll', show);\n }\n\n /** Force refresh all tool panels by calling their `refresh` method. */\n public refreshToolPanel(): void {\n if (!this.sideBarComp) { return; }\n this.sideBarComp.refresh();\n }\n\n /** Performs change detection on all cells, refreshing cells where required. */\n public refreshCells(params: RefreshCellsParams = {}): void {\n if (Array.isArray(params)) {\n // the old version of refreshCells() took an array of rowNodes for the first argument\n console.warn('since AG Grid v11.1, refreshCells() now takes parameters, please see the documentation.');\n return;\n }\n this.rowRenderer.refreshCells(params);\n }\n\n /** Flash rows, columns or individual cells. */\n public flashCells(params: FlashCellsParams = {}): void {\n this.rowRenderer.flashCells(params);\n }\n\n /** Remove row(s) from the DOM and recreate them again from scratch. */\n public redrawRows(params: RedrawRowsParams = {}): void {\n const rowNodes = params ? params.rowNodes : undefined;\n this.rowRenderer.redrawRows(rowNodes);\n }\n\n public setFunctionsReadOnly(readOnly: boolean) {\n this.gridOptionsWrapper.setProperty('functionsReadOnly', readOnly);\n }\n\n /** Redraws the header. Useful if a column name changes, or something else that changes how the column header is displayed. */\n public refreshHeader() {\n this.ctrlsService.getHeaderRowContainerCtrls().forEach(c => c.refresh());\n }\n\n /** Returns `true` if any filter is set. This includes quick filter, advanced filter or external filter. */\n public isAnyFilterPresent(): boolean {\n return this.filterManager.isAnyFilterPresent();\n }\n\n /** Returns `true` if any column filter is set, otherwise `false`. */\n public isColumnFilterPresent(): boolean {\n return this.filterManager.isColumnFilterPresent() || this.filterManager.isAggregateFilterPresent();\n }\n\n /** Returns `true` if the quick filter is set, otherwise `false`. */\n public isQuickFilterPresent(): boolean {\n return this.filterManager.isQuickFilterPresent();\n }\n\n /**\n * Returns the row model inside the table.\n * From here you can see the original rows, rows after filter has been applied,\n * rows after aggregation has been applied, and the final set of 'to be displayed' rows.\n */\n public getModel(): IRowModel {\n return this.rowModel;\n }\n\n /** Expand or collapse a specific row node. */\n public setRowNodeExpanded(rowNode: RowNode, expanded: boolean): void {\n if (rowNode) {\n rowNode.setExpanded(expanded);\n }\n }\n\n /**\n * If after getting the model, you expand or collapse a group, call this method to inform the grid.\n * It will work out the final set of 'to be displayed' rows again (i.e. expand or collapse the group visually).\n */\n public onGroupExpandedOrCollapsed(deprecated_refreshFromIndex?: any) {\n if (missing(this.clientSideRowModel)) { console.warn('AG Grid: cannot call onGroupExpandedOrCollapsed unless using normal row model'); }\n if (exists(deprecated_refreshFromIndex)) { console.warn('AG Grid: api.onGroupExpandedOrCollapsed - refreshFromIndex parameter is no longer used, the grid will refresh all rows'); }\n // we don't really want the user calling this if only one rowNode was expanded, instead they should be\n // calling rowNode.setExpanded(boolean) - this way we do a 'keepRenderedRows=false' so that the whole\n // grid gets refreshed again - otherwise the row with the rowNodes that were changed won't get updated,\n // and thus the expand icon in the group cell won't get 'opened' or 'closed'.\n this.clientSideRowModel.refreshModel({ step: ClientSideRowModelSteps.MAP });\n }\n\n public refreshInMemoryRowModel(step?: string): any {\n console.warn(`ag-grid: since version 18.x, api.refreshInMemoryRowModel() should be replaced with api.refreshClientSideRowModel()`);\n this.refreshClientSideRowModel(step);\n }\n\n /** Gets the Client-Side Row Model to refresh, executing the grouping, filtering and sorting again. */\n public refreshClientSideRowModel(step?: string): any {\n if (missing(this.clientSideRowModel)) { console.warn('cannot call refreshClientSideRowModel unless using normal row model'); }\n\n let paramsStep = ClientSideRowModelSteps.EVERYTHING;\n const stepsMapped: any = {\n group: ClientSideRowModelSteps.EVERYTHING,\n filter: ClientSideRowModelSteps.FILTER,\n map: ClientSideRowModelSteps.MAP,\n aggregate: ClientSideRowModelSteps.AGGREGATE,\n sort: ClientSideRowModelSteps.SORT,\n pivot: ClientSideRowModelSteps.PIVOT\n };\n\n if (exists(step)) {\n paramsStep = stepsMapped[step];\n }\n if (missing(paramsStep)) {\n console.error(`AG Grid: invalid step ${step}, available steps are ${Object.keys(stepsMapped).join(', ')}`);\n return;\n }\n const animate = !this.gridOptionsWrapper.isSuppressAnimationFrame();\n const modelParams: RefreshModelParams = {\n step: paramsStep,\n keepRenderedRows: true,\n keepEditingRows: true,\n animate\n };\n\n this.clientSideRowModel.refreshModel(modelParams);\n }\n\n /** Returns `true` when there are no more animation frames left to process. */\n public isAnimationFrameQueueEmpty(): boolean {\n return this.animationFrameService.isQueueEmpty();\n }\n\n public flushAllAnimationFrames(): void {\n this.animationFrameService.flushAllFrames();\n }\n\n /**\n * Returns the row node with the given ID.\n * The row node ID is the one you provide from the callback `getRowId(params)`,\n * otherwise the ID is a number (cast as string) auto-generated by the grid when\n * the row data is set.\n */\n public getRowNode(id: string): RowNode | undefined {\n return this.rowModel.getRowNode(id);\n }\n\n /**\n * Gets the sizes that various UI elements will be rendered at with the current theme.\n * If you override the row or header height using `gridOptions`, the override value you provided will be returned.\n */\n public getSizesForCurrentTheme() {\n return {\n rowHeight: this.gridOptionsWrapper.getRowHeightAsNumber(),\n headerHeight: this.gridOptionsWrapper.getHeaderHeight()\n };\n }\n\n /** Expand all groups. */\n public expandAll() {\n if (this.clientSideRowModel) {\n this.clientSideRowModel.expandOrCollapseAll(true);\n } else if (this.serverSideRowModel) {\n this.serverSideRowModel.expandAll(true);\n } else {\n console.warn('AG Grid: expandAll only works with Client Side Row Model and Server Side Row Model');\n }\n }\n\n /** Collapse all groups. */\n public collapseAll() {\n if (this.clientSideRowModel) {\n this.clientSideRowModel.expandOrCollapseAll(false);\n } else if (this.serverSideRowModel) {\n this.serverSideRowModel.expandAll(false);\n } else {\n console.warn('AG Grid: collapseAll only works with Client Side Row Model and Server Side Row Model');\n }\n }\n\n /** Gets the tool panel instance corresponding to the supplied `id`. */\n public getToolPanelInstance(id: string): IToolPanel | undefined {\n if (!this.sideBarComp) {\n console.warn('AG Grid: toolPanel is only available in AG Grid Enterprise');\n return;\n }\n const comp = this.sideBarComp.getToolPanelInstance(id);\n return unwrapUserComp(comp);\n }\n\n public addVirtualRowListener(eventName: string, rowIndex: number, callback: Function) {\n if (typeof eventName !== 'string') {\n console.warn('AG Grid: addVirtualRowListener is deprecated, please use addRenderedRowListener.');\n }\n this.addRenderedRowListener(eventName, rowIndex, callback);\n }\n\n /**\n * Registers a callback to a virtual row.\n * A virtual row is a row that is visually rendered on the screen (rows that are not visible because of the scroll position are not rendered).\n * Unlike normal events, you do not need to unregister rendered row listeners.\n * When the rendered row is removed from the grid, all associated rendered row listeners will also be removed.\n * Currently supports only one event, `virtualRowRemoved`;\n * listen for this event if your `cellRenderer` needs to do cleanup when the row no longer exists.\n */\n public addRenderedRowListener(eventName: string, rowIndex: number, callback: Function) {\n if (eventName === 'virtualRowSelected') {\n console.warn(`AG Grid: event virtualRowSelected is deprecated, to register for individual row\n selection events, add a listener directly to the row node.`);\n }\n this.rowRenderer.addRenderedRowListener(eventName, rowIndex, callback);\n }\n\n /** Pass a quick filter text into the grid for filtering. */\n public setQuickFilter(newFilter: string): void {\n this.filterManager.setQuickFilter(newFilter);\n }\n\n public selectIndex(index: any, tryMulti: any, suppressEvents: any) {\n console.warn('AG Grid: do not use api for selection, call node.setSelected(value) instead');\n if (suppressEvents) {\n console.warn('AG Grid: suppressEvents is no longer supported, stop listening for the event if you no longer want it');\n }\n this.selectionService.selectIndex(index, tryMulti);\n }\n\n public deselectIndex(index: number, suppressEvents: boolean = false) {\n console.warn('AG Grid: do not use api for selection, call node.setSelected(value) instead');\n if (suppressEvents) {\n console.warn('AG Grid: suppressEvents is no longer supported, stop listening for the event if you no longer want it');\n }\n this.selectionService.deselectIndex(index);\n }\n\n public selectNode(node: RowNode, tryMulti: boolean = false, suppressEvents: boolean = false) {\n console.warn('AG Grid: API for selection is deprecated, call node.setSelected(value) instead');\n if (suppressEvents) {\n console.warn('AG Grid: suppressEvents is no longer supported, stop listening for the event if you no longer want it');\n }\n node.setSelectedParams({ newValue: true, clearSelection: !tryMulti });\n }\n\n public deselectNode(node: RowNode, suppressEvents: boolean = false) {\n console.warn('AG Grid: API for selection is deprecated, call node.setSelected(value) instead');\n if (suppressEvents) {\n console.warn('AG Grid: suppressEvents is no longer supported, stop listening for the event if you no longer want it');\n }\n node.setSelectedParams({ newValue: false });\n }\n\n /** Select all rows, regardless of filtering and rows that are not visible due to grouping being enabled and their groups not expanded. */\n public selectAll() {\n this.selectionService.selectAllRowNodes();\n }\n\n /** Clear all row selections, regardless of filtering. */\n public deselectAll() {\n this.selectionService.deselectAllRowNodes();\n }\n\n /** Select all filtered rows. */\n public selectAllFiltered() {\n this.selectionService.selectAllRowNodes(true);\n }\n\n /** Clear all filtered selections. */\n public deselectAllFiltered() {\n this.selectionService.deselectAllRowNodes(true);\n }\n\n public recomputeAggregates(): void {\n if (missing(this.clientSideRowModel)) { console.warn('cannot call recomputeAggregates unless using normal row model'); }\n console.warn(`recomputeAggregates is deprecated, please call api.refreshClientSideRowModel('aggregate') instead`);\n this.clientSideRowModel.refreshModel({ step: ClientSideRowModelSteps.AGGREGATE });\n }\n\n /** Sets columns to adjust in size to fit the grid horizontally. */\n public sizeColumnsToFit() {\n this.gridBodyCtrl.sizeColumnsToFit();\n }\n\n /** Show the 'loading' overlay. */\n public showLoadingOverlay(): void {\n this.overlayWrapperComp.showLoadingOverlay();\n }\n\n /** Show the 'no rows' overlay. */\n public showNoRowsOverlay(): void {\n this.overlayWrapperComp.showNoRowsOverlay();\n }\n\n /** Hides the overlay if showing. */\n public hideOverlay(): void {\n this.overlayWrapperComp.hideOverlay();\n }\n\n public isNodeSelected(node: any) {\n console.warn('AG Grid: no need to call api.isNodeSelected(), just call node.isSelected() instead');\n return node.isSelected();\n }\n\n public getSelectedNodesById(): { [nodeId: number]: RowNode; } | null {\n console.error('AG Grid: since version 3.4, getSelectedNodesById no longer exists, use getSelectedNodes() instead');\n return null;\n }\n\n /**\n * Returns a list of selected nodes.\n * Getting the underlying node (rather than the data) is useful when working with tree / aggregated data,\n * as the node can be traversed.\n */\n public getSelectedNodes(): RowNode[] {\n return this.selectionService.getSelectedNodes();\n }\n /** Returns a list of selected rows (i.e. row data that you provided). */\n public getSelectedRows(): any[] {\n return this.selectionService.getSelectedRows();\n }\n\n /**\n * Returns a list of all selected nodes at 'best cost', a feature to be used with groups / trees.\n * If a group has all its children selected, then the group appears in the result, but not the children.\n * Designed for use with `'children'` as the group selection type, where groups don't actually appear in the selection normally.\n */\n public getBestCostNodeSelection(): RowNode[] | undefined {\n return this.selectionService.getBestCostNodeSelection();\n }\n\n /** Retrieve rendered nodes. Due to virtualisation this will contain only the current visible rows and those in the buffer. */\n public getRenderedNodes(): RowNode[] {\n return this.rowRenderer.getRenderedNodes();\n }\n\n public ensureColIndexVisible(index: any) {\n console.warn('AG Grid: ensureColIndexVisible(index) no longer supported, use ensureColumnVisible(colKey) instead.');\n }\n\n /**\n * Ensures the column is visible by scrolling the table if needed.\n * @param key - The column to ensure visible\n * @param position - Where the column will be positioned.\n * - `auto` - Scrolls the minimum amount to make sure the column is visible.\n * - `start` - Scrolls the column to the start of the viewport.\n * - `middle` - Scrolls the column to the middle of the viewport.\n * - `end` - Scrolls the column to the end of the viewport.\n */\n public ensureColumnVisible(key: string | Column, position: 'auto' | 'start' | 'middle' | 'end' = 'auto') {\n this.gridBodyCtrl.getScrollFeature().ensureColumnVisible(key, position);\n }\n\n /**\n * Ensures the row index is visible by vertically scrolling the grid.\n * If a position of `'top'`, `'middle'` or `'bottom'` is supplied, the grid will scroll the grid to place the row at the top, middle or bottom respectively.\n * Otherwise, the grid will do the minimum scrolling possible to show the row.\n * i.e.\n * - if the grid needs to scroll up then it will scroll so that the row is at the top,\n * - if the grid needs to scroll down then it will scroll so that the row is at the bottom,\n * - if the row is already in view then the grid will do nothing.\n */\n public ensureIndexVisible(index: any, position?: 'top' | 'bottom' | 'middle' | null) {\n this.gridBodyCtrl.getScrollFeature().ensureIndexVisible(index, position);\n }\n\n /**\n * Ensures a row node is visible, scrolling the grid if needed.\n * Provide either:\n * - the node,\n * - the data object\n * - a comparator function (that takes the node as a parameter, and returns `true` for match or `false` for no match).\n */\n public ensureNodeVisible(comparator: any, position: 'top' | 'bottom' | 'middle' | null = null) {\n this.gridBodyCtrl.getScrollFeature().ensureNodeVisible(comparator, position);\n }\n\n /**\n * Similar to `forEachNode`, except lists all the leaf nodes.\n * This effectively goes through all the data that you provided to the grid before the grid performed any grouping.\n * If using tree data, goes through all the nodes for the data you provided, including nodes that have children,\n * but excluding groups the grid created where gaps were missing in the hierarchy.\n */\n public forEachLeafNode(callback: (rowNode: RowNode) => void) {\n if (missing(this.clientSideRowModel)) { console.warn('cannot call forEachNode unless using normal row model'); }\n this.clientSideRowModel.forEachLeafNode(callback);\n }\n\n /**\n * Iterates through each node (row) in the grid and calls the callback for each node.\n * This works similar to the `forEach` method on a JavaScript array.\n * This is called for every node, ignoring any filtering or sorting applied within the grid.\n * If using the Infinite Row Model, then this gets called for each page loaded in the page cache.\n */\n public forEachNode(callback: (rowNode: RowNode, index: number) => void) {\n this.rowModel.forEachNode(callback);\n }\n\n /** Similar to `forEachNode`, except skips any filtered out data. */\n public forEachNodeAfterFilter(callback: (rowNode: RowNode, index: number) => void) {\n if (missing(this.clientSideRowModel)) { console.warn('cannot call forEachNodeAfterFilter unless using normal row model'); }\n this.clientSideRowModel.forEachNodeAfterFilter(callback);\n }\n\n /** Similar to `forEachNodeAfterFilter`, except the callbacks are called in the order the rows are displayed in the grid. */\n public forEachNodeAfterFilterAndSort(callback: (rowNode: RowNode, index: number) => void) {\n if (missing(this.clientSideRowModel)) { console.warn('cannot call forEachNodeAfterFilterAndSort unless using normal row model'); }\n this.clientSideRowModel.forEachNodeAfterFilterAndSort(callback);\n }\n\n /**\n * Returns the filter component instance for a column.\n * `key` can be a string field name or a ColDef object (matches on object reference, useful if field names are not unique).\n * If your filter is created asynchronously, `getFilterInstance` will return `null` so you will need to use the `callback` to access the filter instance instead.\n */\n public getFilterInstance(key: string | Column, callback?: (filter: IFilter | null) => void): IFilter | null | undefined {\n const res = this.getFilterInstanceImpl(key, instance => {\n if (!callback) { return; }\n const unwrapped = unwrapUserComp(instance);\n callback(unwrapped);\n });\n const unwrapped = unwrapUserComp(res);\n return unwrapped;\n }\n\n private getFilterInstanceImpl(key: string | Column, callback: (filter: IFilter) => void): IFilter | null | undefined {\n const column = this.columnModel.getPrimaryColumn(key);\n\n if (!column) { return undefined; }\n\n const filterPromise = this.filterManager.getFilterComponent(column, 'NO_UI');\n const currentValue = filterPromise && filterPromise.resolveNow(null, filterComp => filterComp);\n\n if (currentValue) {\n setTimeout(callback, 0, currentValue);\n } else if (filterPromise) {\n filterPromise.then(comp => {\n callback(comp!);\n });\n }\n\n return currentValue;\n }\n\n /** Destroys a filter. Useful to force a particular filter to be created from scratch again. */\n public destroyFilter(key: string | Column) {\n const column = this.columnModel.getPrimaryColumn(key);\n if (column) {\n return this.filterManager.destroyFilter(column, \"filterDestroyed\");\n }\n }\n\n /** Gets the status panel instance corresponding to the supplied `id`. */\n public getStatusPanel(key: string): IStatusPanel | undefined {\n if (!this.statusBarService) { return; }\n\n const comp = this.statusBarService.getStatusPanel(key);\n return unwrapUserComp(comp);\n }\n\n public getColumnDef(key: string | Column) {\n const column = this.columnModel.getPrimaryColumn(key);\n if (column) {\n return column.getColDef();\n }\n return null;\n }\n\n /**\n * Returns the current column definitions.\n */\n public getColumnDefs(): (ColDef | ColGroupDef)[] | undefined { return this.columnModel.getColumnDefs(); }\n\n /** Informs the grid that a filter has changed. This is typically called after a filter change through one of the filter APIs. */\n public onFilterChanged() {\n this.filterManager.onFilterChanged();\n }\n\n /**\n * Gets the grid to act as if the sort was changed.\n * Useful if you update some values and want to get the grid to reorder them according to the new values.\n */\n public onSortChanged() {\n this.sortController.onSortChanged('api');\n }\n\n /** Sets the state of all the advanced filters. Provide it with what you get from `getFilterModel()` to restore filter state. */\n public setFilterModel(model: any) {\n this.filterManager.setFilterModel(model);\n }\n\n /** Gets the current state of all the advanced filters. Used for saving filter state. */\n public getFilterModel(): { [key: string]: any; } {\n return this.filterManager.getFilterModel();\n }\n\n /** Returns the focused cell (or the last focused cell if the grid lost focus). */\n public getFocusedCell(): CellPosition | null {\n return this.focusService.getFocusedCell();\n }\n\n /** Clears the focused cell. */\n public clearFocusedCell(): void {\n return this.focusService.clearFocusedCell();\n }\n\n /** Sets the focus to the specified cell. `rowPinned` can be either 'top', 'bottom' or null (for not pinned). */\n public setFocusedCell(rowIndex: number, colKey: string | Column, rowPinned?: string) {\n this.focusService.setFocusedCell(rowIndex, colKey, rowPinned, true);\n }\n\n /** Sets the `suppressRowDrag` property. */\n public setSuppressRowDrag(value: boolean): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_SUPPRESS_ROW_DRAG, value);\n }\n\n /** Sets the `suppressMoveWhenRowDragging` property. */\n public setSuppressMoveWhenRowDragging(value: boolean): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_SUPPRESS_MOVE_WHEN_ROW_DRAG, value);\n }\n\n /** Sets the `suppressRowClickSelection` property. */\n public setSuppressRowClickSelection(value: boolean): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_SUPPRESS_ROW_CLICK_SELECTION, value);\n }\n\n /** Adds a drop zone outside of the grid where rows can be dropped. */\n public addRowDropZone(params: RowDropZoneParams): void {\n this.gridBodyCtrl.getRowDragFeature().addRowDropZone(params);\n }\n\n /** Removes an external drop zone added by `addRowDropZone`. */\n public removeRowDropZone(params: RowDropZoneParams): void {\n const activeDropTarget = this.dragAndDropService.findExternalZone(params);\n\n if (activeDropTarget) {\n this.dragAndDropService.removeDropTarget(activeDropTarget);\n }\n }\n\n /** Returns the `RowDropZoneParams` to be used by another grid's `addRowDropZone` method. */\n public getRowDropZoneParams(events?: RowDropZoneEvents): RowDropZoneParams {\n return this.gridBodyCtrl.getRowDragFeature().getRowDropZone(events);\n }\n\n /** Sets the height in pixels for the row containing the column label header. */\n public setHeaderHeight(headerHeight?: number) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_HEADER_HEIGHT, headerHeight);\n }\n\n /**\n * Switch between layout options: `normal`, `autoHeight`, `print`.\n * Defaults to `normal` if no domLayout provided.\n */\n public setDomLayout(domLayout?: 'normal' | 'autoHeight' | 'print') {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_DOM_LAYOUT, domLayout);\n }\n\n /** Sets the `enableCellTextSelection` property. */\n public setEnableCellTextSelection(selectable: boolean) {\n this.gridBodyCtrl.setCellTextSelection(selectable);\n }\n\n /** Sets the preferred direction for the selection fill handle. */\n public setFillHandleDirection(direction: 'x' | 'y' | 'xy') {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_FILL_HANDLE_DIRECTION, direction);\n }\n\n /** Sets the height in pixels for the rows containing header column groups. */\n public setGroupHeaderHeight(headerHeight?: number) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GROUP_HEADER_HEIGHT, headerHeight);\n }\n\n /** Sets the height in pixels for the row containing the floating filters. */\n public setFloatingFiltersHeight(headerHeight?: number) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_FLOATING_FILTERS_HEIGHT, headerHeight);\n }\n\n /** Sets the height in pixels for the row containing the columns when in pivot mode. */\n public setPivotHeaderHeight(headerHeight?: number) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_PIVOT_HEADER_HEIGHT, headerHeight);\n }\n\n /** Sets the height in pixels for the row containing header column groups when in pivot mode. */\n public setPivotGroupHeaderHeight(headerHeight?: number) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_PIVOT_GROUP_HEADER_HEIGHT, headerHeight);\n }\n\n public setIsExternalFilterPresent(isExternalFilterPresentFunc: () => boolean): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_IS_EXTERNAL_FILTER_PRESENT, isExternalFilterPresentFunc);\n }\n\n public setDoesExternalFilterPass(doesExternalFilterPassFunc: (node: RowNode) => boolean): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_DOES_EXTERNAL_FILTER_PASS, doesExternalFilterPassFunc);\n }\n\n public setNavigateToNextCell(navigateToNextCellFunc: (params: NavigateToNextCellParams) => (CellPosition | null)): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_NAVIGATE_TO_NEXT_CELL, navigateToNextCellFunc);\n }\n\n public setTabToNextCell(tabToNextCellFunc: (params: TabToNextCellParams) => (CellPosition | null)): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_TAB_TO_NEXT_CELL, tabToNextCellFunc);\n }\n\n public setTabToNextHeader(tabToNextHeaderFunc: (params: TabToNextHeaderParams) => (HeaderPosition | null)): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_TAB_TO_NEXT_HEADER, tabToNextHeaderFunc);\n }\n\n public setNavigateToNextHeader(navigateToNextHeaderFunc: (params: NavigateToNextHeaderParams) => (HeaderPosition | null)): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_NAVIGATE_TO_NEXT_HEADER, navigateToNextHeaderFunc);\n }\n\n public setGroupRowAggNodes(groupRowAggNodesFunc: (nodes: RowNode[]) => any): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GROUP_ROW_AGG_NODES, groupRowAggNodesFunc);\n }\n public setGetGroupRowAgg(getGroupRowAggFunc: (params: GetGroupRowAggParams) => any): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GET_GROUP_ROW_AGG, getGroupRowAggFunc);\n }\n\n public setGetBusinessKeyForNode(getBusinessKeyForNodeFunc: (nodes: RowNode) => string): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GET_BUSINESS_KEY_FOR_NODE, getBusinessKeyForNodeFunc);\n }\n\n public setGetChildCount(getChildCountFunc: (dataItem: any) => number): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GET_CHILD_COUNT, getChildCountFunc);\n }\n\n public setProcessRowPostCreate(processRowPostCreateFunc: (params: ProcessRowParams) => void): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_PROCESS_ROW_POST_CREATE, processRowPostCreateFunc);\n }\n\n public setGetRowNodeId(getRowNodeIdFunc: GetRowNodeIdFunc): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GET_ROW_NODE_ID, getRowNodeIdFunc);\n }\n public setGetRowId(getRowIdFunc: GetRowIdFunc): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GET_ROW_ID, getRowIdFunc);\n }\n\n public setGetRowClass(rowClassFunc: (params: RowClassParams) => string | string[]): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GET_ROW_CLASS, rowClassFunc);\n }\n\n public setIsFullWidthCell(isFullWidthCellFunc: (rowNode: RowNode) => boolean): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_IS_FULL_WIDTH_CELL, isFullWidthCellFunc);\n }\n public setIsFullWidthRow(isFullWidthRowFunc: (rowNode: RowNode) => boolean): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_IS_FULL_WIDTH_ROW, isFullWidthRowFunc);\n }\n\n public setIsRowSelectable(isRowSelectableFunc: IsRowSelectable): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_IS_ROW_SELECTABLE, isRowSelectableFunc);\n }\n\n public setIsRowMaster(isRowMasterFunc: IsRowMaster): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_IS_ROW_MASTER, isRowMasterFunc);\n }\n\n public setPostSort(postSortFunc: (nodes: RowNode[]) => void): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_POST_SORT, postSortFunc);\n }\n public setPostSortRows(postSortRowsFunc: (params: PostSortRowsParams) => void): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_POST_SORT_ROWS, postSortRowsFunc);\n }\n\n public setGetDocument(getDocumentFunc: () => Document): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GET_DOCUMENT, getDocumentFunc);\n }\n\n public setGetContextMenuItems(getContextMenuItemsFunc: GetContextMenuItems): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GET_CONTEXT_MENU_ITEMS, getContextMenuItemsFunc);\n }\n\n public setGetMainMenuItems(getMainMenuItemsFunc: GetMainMenuItems): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GET_MAIN_MENU_ITEMS, getMainMenuItemsFunc);\n }\n\n public setProcessCellForClipboard(processCellForClipboardFunc: (params: ProcessCellForExportParams) => any): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_PROCESS_CELL_FOR_CLIPBOARD, processCellForClipboardFunc);\n }\n\n public setSendToClipboard(sendToClipboardFunc: (params: { data: string }) => void): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_SEND_TO_CLIPBOARD, sendToClipboardFunc);\n }\n\n public setProcessCellFromClipboard(processCellFromClipboardFunc: (params: ProcessCellForExportParams) => any): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_PROCESS_CELL_FROM_CLIPBOARD, processCellFromClipboardFunc);\n }\n\n public setProcessSecondaryColDef(processSecondaryColDefFunc: (colDef: ColDef) => void): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_PROCESS_TO_SECONDARY_COLDEF, processSecondaryColDefFunc);\n }\n\n public setProcessSecondaryColGroupDef(processSecondaryColGroupDefFunc: (colDef: ColDef) => void): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_PROCESS_SECONDARY_COL_GROUP_DEF, processSecondaryColGroupDefFunc);\n }\n\n public setPostProcessPopup(postProcessPopupFunc: (params: PostProcessPopupParams) => void): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_POST_PROCESS_POPUP, postProcessPopupFunc);\n }\n\n public setDefaultGroupOrderComparator(defaultGroupOrderComparatorFunc: (nodeA: RowNode, nodeB: RowNode) => number): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_DEFAULT_GROUP_ORDER_COMPARATOR, defaultGroupOrderComparatorFunc);\n }\n public setInitialGroupOrderComparator(initialGroupOrderComparatorFunc: (params: InitialGroupOrderComparatorParams) => number): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_INITIAL_GROUP_ORDER_COMPARATOR, initialGroupOrderComparatorFunc);\n }\n\n public setGetChartToolbarItems(getChartToolbarItemsFunc: GetChartToolbarItems): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GET_CHART_TOOLBAR_ITEMS, getChartToolbarItemsFunc);\n }\n\n public setPaginationNumberFormatter(paginationNumberFormatterFunc: (params: PaginationNumberFormatterParams) => string): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_PAGINATION_NUMBER_FORMATTER, paginationNumberFormatterFunc);\n }\n\n public setGetServerSideStoreParams(getServerSideStoreParamsFunc: (params: GetServerSideStoreParamsParams) => ServerSideStoreParams): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GET_SERVER_SIDE_STORE_PARAMS, getServerSideStoreParamsFunc);\n }\n\n public setIsServerSideGroupOpenByDefault(isServerSideGroupOpenByDefaultFunc: (params: IsServerSideGroupOpenByDefaultParams) => boolean): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_IS_SERVER_SIDE_GROUPS_OPEN_BY_DEFAULT, isServerSideGroupOpenByDefaultFunc);\n }\n\n public setIsApplyServerSideTransaction(isApplyServerSideTransactionFunc: IsApplyServerSideTransaction): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_IS_APPLY_SERVER_SIDE_TRANSACTION, isApplyServerSideTransactionFunc);\n }\n\n public setIsServerSideGroup(isServerSideGroupFunc: IsServerSideGroup): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_IS_SERVER_SIDE_GROUP, isServerSideGroupFunc);\n }\n\n public setGetServerSideGroupKey(getServerSideGroupKeyFunc: GetServerSideGroupKey): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GET_SERVER_SIDE_GROUP_KEY, getServerSideGroupKeyFunc);\n }\n\n public setGetRowStyle(rowStyleFunc: (params: RowClassParams) => {}): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GET_ROW_STYLE, rowStyleFunc);\n }\n\n public setGetRowHeight(rowHeightFunc: (params: RowHeightParams) => number): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GET_ROW_HEIGHT, rowHeightFunc);\n }\n\n /** Returns `true` if the side bar is visible. */\n public isSideBarVisible(): boolean {\n return this.sideBarComp ? this.sideBarComp.isDisplayed() : false;\n }\n\n /** Show/hide the entire side bar, including any visible panel and the tab buttons. */\n public setSideBarVisible(show: boolean) {\n if (!this.sideBarComp) {\n if (show) {\n console.warn('AG Grid: sideBar is not loaded');\n }\n return;\n }\n this.sideBarComp.setDisplayed(show);\n }\n\n /** Sets the side bar position relative to the grid. Possible values are `'left'` or `'right'`. */\n public setSideBarPosition(position: 'left' | 'right') {\n if (!this.sideBarComp) {\n console.warn('AG Grid: sideBar is not loaded');\n return;\n }\n this.sideBarComp.setSideBarPosition(position);\n }\n\n /** Opens a particular tool panel. Provide the ID of the tool panel to open. */\n public openToolPanel(key: string) {\n if (!this.sideBarComp) {\n console.warn('AG Grid: toolPanel is only available in AG Grid Enterprise');\n return;\n }\n this.sideBarComp.openToolPanel(key);\n }\n\n /** Closes the currently open tool panel (if any). */\n public closeToolPanel() {\n if (!this.sideBarComp) {\n console.warn('AG Grid: toolPanel is only available in AG Grid Enterprise');\n return;\n }\n this.sideBarComp.close();\n }\n\n /** Returns the ID of the currently shown tool panel if any, otherwise `null`. */\n public getOpenedToolPanel(): string | null {\n return this.sideBarComp ? this.sideBarComp.openedItem() : null;\n }\n\n /** Returns the current side bar configuration. If a shortcut was used, returns the detailed long form. */\n public getSideBar(): SideBarDef {\n return this.gridOptionsWrapper.getSideBar();\n }\n\n /** Resets the side bar to the provided configuration. The parameter is the same as the sideBar grid property. The side bar is re-created from scratch with the new config. */\n public setSideBar(def: SideBarDef | string | string[] | boolean): void {\n this.gridOptionsWrapper.setProperty('sideBar', SideBarDefParser.parse(def));\n }\n\n public setSuppressClipboardPaste(value: boolean): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_SUPPRESS_CLIPBOARD_PASTE, value);\n }\n\n /** Returns `true` if the tool panel is showing, otherwise `false`. */\n public isToolPanelShowing(): boolean {\n return this.sideBarComp.isToolPanelShowing();\n }\n\n public doLayout() {\n const message = `AG Grid - since version 25.1, doLayout was taken out, as it's not needed. The grid responds to grid size changes automatically`;\n doOnce(() => console.warn(message), 'doLayoutDeprecated');\n }\n\n /** Tells the grid to recalculate the row heights. */\n public resetRowHeights() {\n if (exists(this.clientSideRowModel)) {\n if (this.columnModel.isAutoRowHeightActive()) {\n console.warn('AG Grid: calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.');\n return;\n }\n this.clientSideRowModel.resetRowHeights();\n }\n }\n\n public setGroupRemoveSingleChildren(value: boolean) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GROUP_REMOVE_SINGLE_CHILDREN, value);\n }\n\n public setGroupRemoveLowestSingleChildren(value: boolean) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GROUP_REMOVE_LOWEST_SINGLE_CHILDREN, value);\n }\n\n /** Tells the grid a row height has changed. To be used after calling `rowNode.setRowHeight(newHeight)`. */\n public onRowHeightChanged() {\n if (this.clientSideRowModel) {\n this.clientSideRowModel.onRowHeightChanged();\n } else if (this.serverSideRowModel) {\n this.serverSideRowModel.onRowHeightChanged();\n }\n }\n\n /**\n * Gets the value for a column for a particular `rowNode` (row).\n * This is useful if you want the raw value of a cell e.g. if implementing your own CSV export.\n */\n public getValue(colKey: string | Column, rowNode: RowNode): any {\n let column = this.columnModel.getPrimaryColumn(colKey);\n if (missing(column)) {\n column = this.columnModel.getGridColumn(colKey);\n }\n if (missing(column)) {\n return null;\n }\n return this.valueService.getValue(column, rowNode);\n }\n\n /** Add an event listener for the specified `eventType`. Works similar to `addEventListener` for a browser DOM element. */\n public addEventListener(eventType: string, listener: Function): void {\n const async = this.gridOptionsWrapper.useAsyncEvents();\n this.eventService.addEventListener(eventType, listener, async);\n }\n\n /** Add an event listener for all event types coming from the grid. */\n public addGlobalListener(listener: Function): void {\n const async = this.gridOptionsWrapper.useAsyncEvents();\n this.eventService.addGlobalListener(listener, async);\n }\n\n /** Remove an event listener. */\n public removeEventListener(eventType: string, listener: Function): void {\n const async = this.gridOptionsWrapper.useAsyncEvents();\n this.eventService.removeEventListener(eventType, listener, async);\n }\n\n /** Remove a global event listener. */\n public removeGlobalListener(listener: Function): void {\n const async = this.gridOptionsWrapper.useAsyncEvents();\n this.eventService.removeGlobalListener(listener, async);\n }\n\n public dispatchEvent(event: AgEvent): void {\n this.eventService.dispatchEvent(event);\n }\n\n /** Will destroy the grid and release resources. If you are using a framework you do not need to call this, as the grid links in with the framework lifecycle. However if you are using Web Components or native JavaScript, you do need to call this, to avoid a memory leak in your application. */\n public destroy(): void {\n // this is needed as GridAPI is a bean, and GridAPI.destroy() is called as part\n // of context.destroy(). so we need to stop the infinite loop.\n if (this.destroyCalled) { return; }\n this.destroyCalled = true;\n\n // destroy the UI first (as they use the services)\n const gridCtrl = this.ctrlsService.getGridCtrl();\n\n if (gridCtrl) {\n gridCtrl.destroyGridUi();\n }\n\n // destroy the services\n this.context.destroy();\n }\n\n @PreDestroy\n private cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid(): void {\n // some users were raising support issues with regards memory leaks. the problem was the customers applications\n // were keeping references to the API. trying to educate them all would be difficult, easier to just remove\n // all references in the API so at least the core grid can be garbage collected.\n //\n // wait about 100ms before clearing down the references, in case user has some cleanup to do,\n // and needs to deference the API first\n setTimeout(removeAllReferences.bind(window, this, 'Grid API'), 100);\n }\n\n private warnIfDestroyed(methodName: string): boolean {\n if (this.destroyCalled) {\n console.warn(`AG Grid: Grid API method ${methodName} was called on a grid that was destroyed.`);\n }\n return this.destroyCalled;\n }\n\n /** Reset the quick filter cache text on every rowNode. */\n public resetQuickFilter(): void {\n if (this.warnIfDestroyed('resetQuickFilter')) { return; }\n this.rowModel.forEachNode(node => node.quickFilterAggregateText = null);\n }\n\n public getRangeSelections(): any {\n console.warn(`AG Grid: in v20.1.x, api.getRangeSelections() is gone, please use getCellRanges() instead.\n We had to change how cell selections works a small bit to allow charting to integrate. The return type of\n getCellRanges() is a bit different, please check the AG Grid documentation.`);\n return null;\n }\n\n /** Returns the list of selected cell ranges. */\n public getCellRanges(): CellRange[] | null {\n if (this.rangeService) {\n return this.rangeService.getCellRanges();\n }\n\n console.warn('AG Grid: cell range selection is only available in AG Grid Enterprise');\n return null;\n }\n\n public camelCaseToHumanReadable(camelCase: string): string | null {\n return camelCaseToHumanText(camelCase);\n }\n\n public addRangeSelection(deprecatedNoLongerUsed: any): void {\n console.warn('AG Grid: As of version 21.x, range selection changed slightly to allow charting integration. Please call api.addCellRange() instead of api.addRangeSelection()');\n }\n /** Adds the provided cell range to the selected ranges. */\n public addCellRange(params: CellRangeParams): void {\n if (!this.rangeService) { console.warn('AG Grid: cell range selection is only available in AG Grid Enterprise'); }\n this.rangeService.addCellRange(params);\n }\n\n /** Clears the selected ranges. */\n public clearRangeSelection(): void {\n if (!this.rangeService) { console.warn('AG Grid: cell range selection is only available in AG Grid Enterprise'); }\n this.rangeService.removeAllCellRanges();\n }\n /** Reverts the last cell edit. */\n public undoCellEditing(): void {\n this.undoRedoService.undo();\n }\n /** Re-applies the most recently undone cell edit. */\n public redoCellEditing(): void {\n this.undoRedoService.redo();\n }\n\n /** Returns current number of available cell edit undo operations. */\n public getCurrentUndoSize(): number {\n return this.undoRedoService.getCurrentUndoStackSize();\n }\n /** Returns current number of available cell edit redo operations. */\n public getCurrentRedoSize(): number {\n return this.undoRedoService.getCurrentRedoStackSize();\n }\n\n /** Returns a list of models with information about the charts that are currently rendered from the grid. */\n public getChartModels(): ChartModel[] | undefined {\n if (ModuleRegistry.assertRegistered(ModuleNames.RangeSelectionModule, 'api.getChartModels') &&\n ModuleRegistry.assertRegistered(ModuleNames.GridChartsModule, 'api.getChartModels')) {\n return this.chartService.getChartModels();\n }\n }\n\n /** Returns the `ChartRef` using the supplied `chartId`. */\n public getChartRef(chartId: string): ChartRef | undefined {\n if (ModuleRegistry.assertRegistered(ModuleNames.RangeSelectionModule, 'api.getChartRef') &&\n ModuleRegistry.assertRegistered(ModuleNames.GridChartsModule, 'api.getChartRef')) {\n return this.chartService.getChartRef(chartId);\n }\n }\n\n /** Returns a string containing the requested data URL which contains a representation of the chart image. */\n public getChartImageDataURL(params: GetChartImageDataUrlParams): string | undefined {\n if (ModuleRegistry.assertRegistered(ModuleNames.RangeSelectionModule, 'api.getChartImageDataURL') &&\n ModuleRegistry.assertRegistered(ModuleNames.GridChartsModule, 'api.getChartImageDataURL')) {\n return this.chartService.getChartImageDataURL(params);\n }\n }\n\n /** Used to programmatically create charts from a range. */\n public createRangeChart(params: CreateRangeChartParams): ChartRef | undefined {\n if (ModuleRegistry.assertRegistered(ModuleNames.RangeSelectionModule, 'api.createRangeChart') &&\n ModuleRegistry.assertRegistered(ModuleNames.GridChartsModule, 'api.createRangeChart')) {\n return this.chartService.createRangeChart(params);\n }\n }\n\n /** Used to programmatically create cross filter charts from a range. */\n public createCrossFilterChart(params: CreateCrossFilterChartParams): ChartRef | undefined {\n if (ModuleRegistry.assertRegistered(ModuleNames.RangeSelectionModule, 'api.createCrossFilterChart') &&\n ModuleRegistry.assertRegistered(ModuleNames.GridChartsModule, 'api.createCrossFilterChart')) {\n return this.chartService.createCrossFilterChart(params);\n }\n }\n\n /** Restores a chart using the `ChartModel` that was previously obtained from `getChartModels()`. */\n public restoreChart(chartModel: ChartModel, chartContainer?: HTMLElement): ChartRef | undefined {\n if (ModuleRegistry.assertRegistered(ModuleNames.RangeSelectionModule, 'api.restoreChart') &&\n ModuleRegistry.assertRegistered(ModuleNames.GridChartsModule, 'api.restoreChart')) {\n return this.chartService.restoreChart(chartModel, chartContainer);\n }\n }\n\n /** Used to programmatically create pivot charts from a grid. */\n public createPivotChart(params: CreatePivotChartParams): ChartRef | undefined {\n if (ModuleRegistry.assertRegistered(ModuleNames.RangeSelectionModule, 'api.createPivotChart') &&\n ModuleRegistry.assertRegistered(ModuleNames.GridChartsModule, 'api.createPivotChart')) {\n return this.chartService.createPivotChart(params);\n }\n }\n\n /** Copies the selected rows to the clipboard. */\n public copySelectedRowsToClipboard(params?: IClipboardCopyRowsParams): void {\n if (!this.clipboardService) { console.warn('AG Grid: clipboard is only available in AG Grid Enterprise'); }\n this.clipboardService.copySelectedRowsToClipboard(params);\n }\n\n /** Copies the selected ranges to the clipboard. */\n public copySelectedRangeToClipboard(params?: IClipboardCopyParams): void {\n if (!this.clipboardService) { console.warn('AG Grid: clipboard is only available in AG Grid Enterprise'); }\n this.clipboardService.copySelectedRangeToClipboard(params);\n }\n\n /** Copies the selected range down, similar to `Ctrl + D` in Excel. */\n public copySelectedRangeDown(): void {\n if (!this.clipboardService) { console.warn('AG Grid: clipboard is only available in AG Grid Enterprise'); }\n this.clipboardService.copyRangeDown();\n }\n\n /** Shows the column menu after and positions it relative to the provided button element. Use in conjunction with your own header template. */\n public showColumnMenuAfterButtonClick(colKey: string | Column, buttonElement: HTMLElement): void {\n // use grid column so works with pivot mode\n const column = this.columnModel.getGridColumn(colKey);\n this.menuFactory.showMenuAfterButtonClick(column, buttonElement, 'columnMenu');\n }\n\n /** Shows the column menu after and positions it relative to the mouse event. Use in conjunction with your own header template. */\n public showColumnMenuAfterMouseClick(colKey: string | Column, mouseEvent: MouseEvent | Touch): void {\n // use grid column so works with pivot mode\n let column = this.columnModel.getGridColumn(colKey);\n\n if (!column) {\n column = this.columnModel.getPrimaryColumn(colKey);\n }\n\n if (!column) {\n console.error(`AG Grid: column '${colKey}' not found`);\n return;\n }\n\n this.menuFactory.showMenuAfterMouseEvent(column, mouseEvent);\n }\n\n /** Hides any visible context menu or column menu. */\n public hidePopupMenu(): void {\n // hide the context menu if in enterprise\n if (this.contextMenuFactory) {\n this.contextMenuFactory.hideActiveMenu();\n }\n // and hide the column menu always\n this.menuFactory.hideActiveMenu();\n }\n\n /** DOM element to use as the popup parent for grid popups (context menu, column menu etc). */\n public setPopupParent(ePopupParent: HTMLElement): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_POPUP_PARENT, ePopupParent);\n }\n\n /** Navigates the grid focus to the next cell, as if tabbing. */\n public tabToNextCell(event?: KeyboardEvent): boolean {\n return this.navigationService.tabToNextCell(false, event);\n }\n\n /** Navigates the grid focus to the previous cell, as if shift-tabbing. */\n public tabToPreviousCell(event?: KeyboardEvent): boolean {\n return this.navigationService.tabToNextCell(true, event);\n }\n\n /** Returns the list of active cell renderer instances. */\n public getCellRendererInstances(params: GetCellRendererInstancesParams = {}): ICellRenderer[] {\n const res = this.rowRenderer.getCellRendererInstances(params);\n const unwrapped = res.map(unwrapUserComp);\n return unwrapped;\n }\n\n /** Returns the list of active cell editor instances. Optionally provide parameters to restrict to certain columns / row nodes. */\n public getCellEditorInstances(params: GetCellEditorInstancesParams = {}): ICellEditor[] {\n const res = this.rowRenderer.getCellEditorInstances(params);\n const unwrapped = res.map(unwrapUserComp);\n return unwrapped;\n }\n\n /** If the grid is editing, returns back details of the editing cell(s). */\n public getEditingCells(): CellPosition[] {\n return this.rowRenderer.getEditingCells();\n }\n\n /** If a cell is editing, it stops the editing. Pass `true` if you want to cancel the editing (i.e. don't accept changes). */\n public stopEditing(cancel: boolean = false): void {\n this.rowRenderer.stopEditing(cancel);\n }\n\n /** Start editing the provided cell. If another cell is editing, the editing will be stopped in that other cell. */\n public startEditingCell(params: StartEditingCellParams): void {\n const column = this.columnModel.getGridColumn(params.colKey);\n if (!column) {\n console.warn(`AG Grid: no column found for ${params.colKey}`);\n return;\n }\n const cellPosition: CellPosition = {\n rowIndex: params.rowIndex,\n rowPinned: params.rowPinned || null,\n column: column\n };\n const notPinned = params.rowPinned == null;\n if (notPinned) {\n this.gridBodyCtrl.getScrollFeature().ensureIndexVisible(params.rowIndex);\n }\n\n const cell = this.navigationService.getCellByPosition(cellPosition);\n if (!cell) { return; }\n cell.startRowOrCellEdit(params.key, params.charPress);\n }\n\n /** Add an aggregation function with the specified key. */\n public addAggFunc(key: string, aggFunc: IAggFunc): void {\n if (this.aggFuncService) {\n this.aggFuncService.addAggFunc(key, aggFunc);\n }\n }\n\n /** Add aggregations function with the specified keys. */\n public addAggFuncs(aggFuncs: { [key: string]: IAggFunc; }): void {\n if (this.aggFuncService) {\n this.aggFuncService.addAggFuncs(aggFuncs);\n }\n }\n\n /** Clears all aggregation functions (including those provided by the grid). */\n public clearAggFuncs(): void {\n if (this.aggFuncService) {\n this.aggFuncService.clear();\n }\n }\n\n /** Apply transactions to the server side row model. */\n public applyServerSideTransaction(transaction: ServerSideTransaction): ServerSideTransactionResult | undefined {\n if (!this.serverSideTransactionManager) {\n console.warn('AG Grid: Cannot apply Server Side Transaction if not using the Server Side Row Model.');\n return;\n }\n return this.serverSideTransactionManager.applyTransaction(transaction);\n }\n\n public applyServerSideTransactionAsync(transaction: ServerSideTransaction, callback?: (res: ServerSideTransactionResult) => void): void {\n if (!this.serverSideTransactionManager) {\n console.warn('AG Grid: Cannot apply Server Side Transaction if not using the Server Side Row Model.');\n return;\n }\n return this.serverSideTransactionManager.applyTransactionAsync(transaction, callback);\n }\n\n /** Gets all failed server side loads to retry. */\n public retryServerSideLoads(): void {\n if (!this.serverSideRowModel) {\n console.warn('AG Grid: API retryServerSideLoads() can only be used when using Server-Side Row Model.');\n return;\n }\n this.serverSideRowModel.retryLoads();\n }\n\n public flushServerSideAsyncTransactions(): void {\n if (!this.serverSideTransactionManager) {\n console.warn('AG Grid: Cannot flush Server Side Transaction if not using the Server Side Row Model.');\n return;\n }\n return this.serverSideTransactionManager.flushAsyncTransactions();\n }\n\n /** Update row data. Pass a transaction object with lists for `add`, `remove` and `update`. */\n public applyTransaction(rowDataTransaction: RowDataTransaction): RowNodeTransaction | null | undefined {\n if (!this.clientSideRowModel) {\n console.error('AG Grid: updateRowData() only works with ClientSideRowModel. Working with InfiniteRowModel was deprecated in v23.1 and removed in v24.1');\n return;\n }\n\n const res: RowNodeTransaction | null = this.clientSideRowModel.updateRowData(rowDataTransaction);\n\n // refresh all the full width rows\n this.rowRenderer.refreshFullWidthRows(res!.update);\n\n // do change detection for all present cells\n if (!this.gridOptionsWrapper.isSuppressChangeDetection()) {\n this.rowRenderer.refreshCells();\n }\n\n return res;\n }\n\n /** Sets the `deltaSort` property */\n public setDeltaSort(enable: boolean): void {\n this.gridOptionsWrapper.setProperty('deltaSort', enable);\n }\n\n /** @deprecated */\n public updateRowData(rowDataTransaction: RowDataTransaction): RowNodeTransaction | null | undefined {\n const message = 'AG Grid: as of v23.1, grid API updateRowData(transaction) is now called applyTransaction(transaction). updateRowData is deprecated and will be removed in a future major release.';\n doOnce(() => console.warn(message), 'updateRowData deprecated');\n\n return this.applyTransaction(rowDataTransaction);\n }\n\n /** Same as `applyTransaction` except executes asynchronously for efficiency. */\n public applyTransactionAsync(rowDataTransaction: RowDataTransaction, callback?: (res: RowNodeTransaction) => void): void {\n if (!this.clientSideRowModel) {\n console.error('AG Grid: api.applyTransactionAsync() only works with ClientSideRowModel.');\n return;\n }\n this.clientSideRowModel.batchUpdateRowData(rowDataTransaction, callback);\n }\n\n /** Executes any remaining asynchronous grid transactions, if any are waiting to be executed. */\n public flushAsyncTransactions(): void {\n if (!this.clientSideRowModel) {\n console.error('AG Grid: api.applyTransactionAsync() only works with ClientSideRowModel.');\n return;\n }\n this.clientSideRowModel.flushAsyncTransactions();\n }\n\n /** @deprecated */\n public batchUpdateRowData(rowDataTransaction: RowDataTransaction, callback?: (res: RowNodeTransaction) => void): void {\n const message = 'AG Grid: as of v23.1, grid API batchUpdateRowData(transaction, callback) is now called applyTransactionAsync(transaction, callback). batchUpdateRowData is deprecated and will be removed in a future major release.';\n doOnce(() => console.warn(message), 'batchUpdateRowData deprecated');\n\n this.applyTransactionAsync(rowDataTransaction, callback);\n }\n\n public insertItemsAtIndex(index: number, items: any[], skipRefresh = false): void {\n console.warn('AG Grid: insertItemsAtIndex() is deprecated, use updateRowData(transaction) instead.');\n this.updateRowData({ add: items, addIndex: index, update: null, remove: null });\n }\n\n public removeItems(rowNodes: RowNode[], skipRefresh = false): void {\n console.warn('AG Grid: removeItems() is deprecated, use updateRowData(transaction) instead.');\n const dataToRemove: any[] = rowNodes.map(rowNode => rowNode.data);\n this.updateRowData({ add: null, addIndex: null, update: null, remove: dataToRemove });\n }\n\n public addItems(items: any[], skipRefresh = false): void {\n console.warn('AG Grid: addItems() is deprecated, use updateRowData(transaction) instead.');\n this.updateRowData({ add: items, addIndex: null, update: null, remove: null });\n }\n\n public refreshVirtualPageCache(): void {\n console.warn('AG Grid: refreshVirtualPageCache() is now called refreshInfiniteCache(), please call refreshInfiniteCache() instead');\n this.refreshInfiniteCache();\n }\n\n public refreshInfinitePageCache(): void {\n console.warn('AG Grid: refreshInfinitePageCache() is now called refreshInfiniteCache(), please call refreshInfiniteCache() instead');\n this.refreshInfiniteCache();\n }\n\n /**\n * Marks all the currently loaded blocks in the cache for reload.\n * If you have 10 blocks in the cache, all 10 will be marked for reload.\n * The old data will continue to be displayed until the new data is loaded.\n */\n public refreshInfiniteCache(): void {\n if (this.infiniteRowModel) {\n this.infiniteRowModel.refreshCache();\n } else {\n console.warn(`AG Grid: api.refreshInfiniteCache is only available when rowModelType='infinite'.`);\n }\n }\n\n public purgeVirtualPageCache(): void {\n console.warn('AG Grid: purgeVirtualPageCache() is now called purgeInfiniteCache(), please call purgeInfiniteCache() instead');\n this.purgeInfinitePageCache();\n }\n\n public purgeInfinitePageCache(): void {\n console.warn('AG Grid: purgeInfinitePageCache() is now called purgeInfiniteCache(), please call purgeInfiniteCache() instead');\n this.purgeInfiniteCache();\n }\n\n /**\n * Purges the cache.\n * The grid is then told to refresh. Only the blocks required to display the current data on screen are fetched (typically no more than 2).\n * The grid will display nothing while the new blocks are loaded.\n * Use this to immediately remove the old data from the user.\n */\n public purgeInfiniteCache(): void {\n if (this.infiniteRowModel) {\n this.infiniteRowModel.purgeCache();\n } else {\n console.warn(`AG Grid: api.purgeInfiniteCache is only available when rowModelType='infinite'.`);\n }\n }\n\n /** @deprecated */\n public purgeEnterpriseCache(route?: string[]): void {\n console.warn(`ag-grid: since version 18.x, api.purgeEnterpriseCache() should be replaced with api.purgeServerSideCache()`);\n this.purgeServerSideCache(route);\n }\n\n /** @deprecated */\n public purgeServerSideCache(route: string[] = []): void {\n if (this.serverSideRowModel) {\n console.warn(`AG Grid: since v25.0, api.purgeServerSideCache is deprecated. Please use api.refreshServerSideStore({purge: true}) instead.`);\n this.refreshServerSideStore({\n route: route,\n purge: true\n });\n } else {\n console.warn(`AG Grid: api.purgeServerSideCache is only available when rowModelType='serverSide'.`);\n }\n }\n\n /**\n * Refresh a server-side store.\n * If you pass no parameters, then the top level cache is purged.\n * To purge a child cache, pass in the string of keys to get to the child cache.\n */\n public refreshServerSideStore(params?: RefreshStoreParams): void {\n if (this.serverSideRowModel) {\n this.serverSideRowModel.refreshStore(params);\n } else {\n console.warn(`AG Grid: api.refreshServerSideStore is only available when rowModelType='serverSide'.`);\n }\n }\n\n /** Returns info on all server side stores. */\n public getServerSideStoreState(): ServerSideStoreState[] {\n if (this.serverSideRowModel) {\n return this.serverSideRowModel.getStoreState();\n } else {\n console.warn(`AG Grid: api.getServerSideStoreState is only available when rowModelType='serverSide'.`);\n return [];\n }\n }\n\n public getVirtualRowCount(): number | null | undefined {\n console.warn('AG Grid: getVirtualRowCount() is now called getInfiniteRowCount(), please call getInfiniteRowCount() instead');\n return this.getInfiniteRowCount();\n }\n\n /** The row count defines how many rows the grid allows scrolling to. */\n public getInfiniteRowCount(): number | undefined {\n if (this.infiniteRowModel) {\n return this.infiniteRowModel.getRowCount();\n } else {\n console.warn(`AG Grid: api.getVirtualRowCount is only available when rowModelType='virtual'.`);\n }\n }\n\n public isMaxRowFound(): boolean | undefined {\n console.warn(`AG Grid: api.isLastRowIndexKnown is deprecated, please use api.isLastRowIndexKnown()`);\n return this.isLastRowIndexKnown();\n }\n\n /** Returns `true` if grid allows for scrolling past the last row to load more rows, thus providing infinite scroll. */\n public isLastRowIndexKnown(): boolean | undefined {\n if (this.infiniteRowModel) {\n return this.infiniteRowModel.isLastRowIndexKnown();\n } else {\n console.warn(`AG Grid: api.isMaxRowFound is only available when rowModelType='virtual'.`);\n }\n }\n\n public setVirtualRowCount(rowCount: number, maxRowFound?: boolean): void {\n console.warn('AG Grid: setVirtualRowCount() is now called setInfiniteRowCount(), please call setInfiniteRowCount() instead');\n this.setRowCount(rowCount, maxRowFound);\n }\n\n public setInfiniteRowCount(rowCount: number, maxRowFound?: boolean): void {\n console.warn('AG Grid: setInfiniteRowCount() is now called setRowCount(), please call setRowCount() instead');\n this.setRowCount(rowCount, maxRowFound);\n }\n\n /**\n * Sets the `rowCount` and `lastRowIndexKnown` properties.\n * The second parameter, `lastRowIndexKnown`, is optional and if left out, only `rowCount` is set.\n * Set `rowCount` to adjust the height of the vertical scroll.\n * Set `lastRowIndexKnown` to enable / disable searching for more rows.\n * Use this method if you add or remove rows into the dataset and need to reset the number of rows or put the data back into 'look for data' mode.\n */\n public setRowCount(rowCount: number, maxRowFound?: boolean): void {\n if (this.infiniteRowModel) {\n this.infiniteRowModel.setRowCount(rowCount, maxRowFound);\n } else {\n console.warn(`AG Grid: api.setRowCount is only available for Infinite Row Model.`);\n }\n }\n\n public getVirtualPageState(): any {\n console.warn('AG Grid: getVirtualPageState() is now called getCacheBlockState(), please call getCacheBlockState() instead');\n return this.getCacheBlockState();\n }\n\n public getInfinitePageState(): any {\n console.warn('AG Grid: getInfinitePageState() is now called getCacheBlockState(), please call getCacheBlockState() instead');\n return this.getCacheBlockState();\n }\n\n /**\n * Returns an object representing the state of the cache. This is useful for debugging and understanding how the cache is working.\n */\n public getCacheBlockState(): any {\n return this.rowNodeBlockLoader.getBlockState();\n }\n\n public checkGridSize(): void {\n console.warn(`in AG Grid v25.2.0, checkGridSize() was removed, as it was legacy and didn't do anything uesful.`);\n }\n\n public getFirstRenderedRow(): number {\n console.warn('in AG Grid v12, getFirstRenderedRow() was renamed to getFirstDisplayedRow()');\n return this.getFirstDisplayedRow();\n }\n\n /** Get the index of the first displayed row due to scrolling (includes invisible rendered rows in the buffer). */\n public getFirstDisplayedRow(): number {\n return this.rowRenderer.getFirstVirtualRenderedRow();\n }\n\n public getLastRenderedRow(): number {\n console.warn('in AG Grid v12, getLastRenderedRow() was renamed to getLastDisplayedRow()');\n return this.getLastDisplayedRow();\n }\n\n /** Get the index of the last displayed row due to scrolling (includes invisible rendered rows in the buffer). */\n public getLastDisplayedRow(): number {\n return this.rowRenderer.getLastVirtualRenderedRow();\n }\n\n /** Returns the displayed `RowNode` at the given `index`. */\n public getDisplayedRowAtIndex(index: number): RowNode | undefined {\n return this.rowModel.getRow(index);\n }\n\n /** Returns the total number of displayed rows. */\n public getDisplayedRowCount(): number {\n return this.rowModel.getRowCount();\n }\n\n /**\n * Returns `true` when the last page is known.\n * This will always be `true` if you are using the Client-Side Row Model for pagination.\n * Returns `false` when the last page is not known; this only happens when using Infinite Row Model.\n */\n public paginationIsLastPageFound(): boolean {\n return this.paginationProxy.isLastPageFound();\n }\n\n /** Returns how many rows are being shown per page. */\n public paginationGetPageSize(): number {\n return this.paginationProxy.getPageSize();\n }\n\n /** Sets the `paginationPageSize`, then re-paginates the grid so the changes are applied immediately. */\n public paginationSetPageSize(size?: number): void {\n this.gridOptionsWrapper.setProperty('paginationPageSize', size);\n }\n\n /** Returns the 0-based index of the page which is showing. */\n public paginationGetCurrentPage(): number {\n return this.paginationProxy.getCurrentPage();\n }\n\n /** Returns the total number of pages. Returns `null` if `paginationIsLastPageFound() === false`. */\n public paginationGetTotalPages(): number {\n return this.paginationProxy.getTotalPages();\n }\n\n /** The total number of rows. Returns `null` if `paginationIsLastPageFound() === false`. */\n public paginationGetRowCount(): number {\n return this.paginationProxy.getMasterRowCount();\n }\n\n /** Navigates to the next page. */\n public paginationGoToNextPage(): void {\n this.paginationProxy.goToNextPage();\n }\n\n /** Navigates to the previous page. */\n public paginationGoToPreviousPage(): void {\n this.paginationProxy.goToPreviousPage();\n }\n\n /** Navigates to the first page. */\n public paginationGoToFirstPage(): void {\n this.paginationProxy.goToFirstPage();\n }\n\n /** Navigates to the last page. */\n public paginationGoToLastPage(): void {\n this.paginationProxy.goToLastPage();\n }\n\n /** Goes to the specified page. If the page requested doesn't exist, it will go to the last page. */\n public paginationGoToPage(page: number): void {\n this.paginationProxy.goToPage(page);\n }\n\n public setRowClass(className: string | undefined): void {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_ROW_CLASS, className);\n }\n}\n","import { BeanStub } from \"../../context/beanStub\";\nimport { Autowired, Bean, PostConstruct } from \"../../context/context\";\nimport { CtrlsService } from \"../../ctrlsService\";\nimport { Column } from \"../../entities/column\";\nimport { ColumnGroup } from \"../../entities/columnGroup\";\nimport { FocusService } from \"../../focusService\";\nimport { GridBodyCtrl } from \"../../gridBodyComp/gridBodyCtrl\";\nimport { AnimationFrameService } from \"../../misc/animationFrameService\";\nimport { last } from \"../../utils/array\";\nimport { HeaderRowType } from \"../row/headerRowComp\";\nimport { HeaderPosition, HeaderPositionUtils } from \"./headerPosition\";\n\nexport enum HeaderNavigationDirection {\n UP,\n DOWN,\n LEFT,\n RIGHT\n}\n\n@Bean('headerNavigationService')\nexport class HeaderNavigationService extends BeanStub {\n\n @Autowired('focusService') private focusService: FocusService;\n @Autowired('headerPositionUtils') private headerPositionUtils: HeaderPositionUtils;\n @Autowired('animationFrameService') private animationFrameService: AnimationFrameService;\n @Autowired('ctrlsService') private ctrlsService: CtrlsService;\n\n private gridBodyCon: GridBodyCtrl;\n\n @PostConstruct\n private postConstruct(): void {\n this.ctrlsService.whenReady(p => {\n this.gridBodyCon = p.gridBodyCtrl;\n });\n }\n\n public getHeaderRowCount(): number {\n const centerHeaderContainer = this.ctrlsService.getHeaderRowContainerCtrl();\n return centerHeaderContainer ? centerHeaderContainer.getRowCount() : 0;\n }\n\n public getHeaderRowType(rowIndex: number): HeaderRowType | undefined {\n const centerHeaderContainer = this.ctrlsService.getHeaderRowContainerCtrl();\n if (centerHeaderContainer) {\n return centerHeaderContainer.getRowType(rowIndex);\n }\n }\n\n /*\n * This method navigates grid header vertically\n * @return {boolean} true to preventDefault on the event that caused this navigation.\n */\n public navigateVertically(direction: HeaderNavigationDirection, fromHeader: HeaderPosition | null, event: KeyboardEvent): boolean {\n if (!fromHeader) {\n fromHeader = this.focusService.getFocusedHeader();\n }\n\n if (!fromHeader) { return false; }\n\n const { headerRowIndex, column } = fromHeader;\n const rowLen = this.getHeaderRowCount();\n const isUp = direction === HeaderNavigationDirection.UP ;\n let nextRow = isUp ? headerRowIndex - 1 : headerRowIndex + 1;\n let nextFocusColumn: ColumnGroup | Column | null = null;\n let skipColumn = false;\n\n if (nextRow < 0) {\n nextRow = 0;\n nextFocusColumn = column;\n skipColumn = true;\n }\n\n if (nextRow >= rowLen) {\n nextRow = -1; // -1 indicates the focus should move to grid rows.\n }\n\n const currentRowType = this.getHeaderRowType(headerRowIndex);\n\n if (!skipColumn) {\n if (currentRowType === HeaderRowType.COLUMN_GROUP) {\n const currentColumn = column as ColumnGroup;\n nextFocusColumn = isUp ? column.getParent() : currentColumn.getDisplayedChildren()![0] as ColumnGroup;\n } else if (currentRowType === HeaderRowType.FLOATING_FILTER) {\n nextFocusColumn = column;\n } else {\n const currentColumn = column as Column;\n nextFocusColumn = isUp ? currentColumn.getParent() : currentColumn;\n }\n\n if (!nextFocusColumn) { return false; }\n }\n\n return this.focusService.focusHeaderPosition({\n headerPosition: { headerRowIndex: nextRow, column: nextFocusColumn! },\n allowUserOverride: true,\n event\n });\n }\n\n /*\n * This method navigates grid header horizontally\n * @return {boolean} true to preventDefault on the event that caused this navigation.\n */\n public navigateHorizontally(direction: HeaderNavigationDirection, fromTab: boolean = false, event: KeyboardEvent): boolean {\n const focusedHeader = this.focusService.getFocusedHeader()!;\n const isLeft = direction === HeaderNavigationDirection.LEFT;\n const isRtl = this.gridOptionsWrapper.isEnableRtl();\n let nextHeader: HeaderPosition;\n let normalisedDirection: 'Before' | 'After';\n\n // either navigating to the left or isRtl (cannot be both)\n if (isLeft !== isRtl) {\n normalisedDirection = 'Before';\n nextHeader = this.headerPositionUtils.findHeader(focusedHeader, normalisedDirection)!;\n } else {\n normalisedDirection = 'After';\n nextHeader = this.headerPositionUtils.findHeader(focusedHeader, normalisedDirection)!;\n }\n\n if (nextHeader) {\n return this.focusService.focusHeaderPosition({\n headerPosition: nextHeader,\n direction: normalisedDirection,\n fromTab,\n allowUserOverride: true,\n event\n });\n }\n\n if (!fromTab) { return true; }\n\n return this.focusNextHeaderRow(focusedHeader, normalisedDirection, event);\n }\n\n private focusNextHeaderRow(focusedHeader: HeaderPosition, direction: 'Before' | 'After', event: KeyboardEvent): boolean {\n const currentIndex = focusedHeader.headerRowIndex;\n let nextPosition: HeaderPosition | null = null;\n let nextRowIndex: number;\n\n if (direction === 'Before') {\n if (currentIndex > 0) {\n nextRowIndex = currentIndex - 1;\n nextPosition = this.headerPositionUtils.findColAtEdgeForHeaderRow(nextRowIndex, 'end')!;\n }\n } else {\n nextRowIndex = currentIndex + 1;\n nextPosition = this.headerPositionUtils.findColAtEdgeForHeaderRow(nextRowIndex, 'start')!;\n }\n\n return this.focusService.focusHeaderPosition({\n headerPosition: nextPosition,\n direction,\n fromTab: true,\n allowUserOverride: true,\n event\n });\n }\n\n public scrollToColumn(column: Column | ColumnGroup, direction: 'Before' | 'After' | null = 'After'): void {\n if (column.getPinned()) { return; }\n\n let columnToScrollTo: Column;\n\n if (column instanceof ColumnGroup) {\n const columns = column.getDisplayedLeafColumns();\n columnToScrollTo = direction === 'Before' ? last(columns) : columns[0];\n } else {\n columnToScrollTo = column;\n }\n\n this.gridBodyCon.getScrollFeature().ensureColumnVisible(columnToScrollTo);\n\n // need to nudge the scrolls for the floating items. otherwise when we set focus on a non-visible\n // floating cell, the scrolls get out of sync\n this.gridBodyCon.getScrollFeature().horizontallyScrollHeaderCenterAndFloatingCenter();\n\n // need to flush frames, to make sure the correct cells are rendered\n this.animationFrameService.flushAllFrames();\n }\n}\n","import { IHeaderColumn } from \"../../entities/iHeaderColumn\";\nimport { Column } from \"../../entities/column\";\nimport { BeanStub } from \"../../context/beanStub\";\nimport { Beans } from \"../beans\";\nimport { Constants } from \"../../constants/constants\";\nimport { PostConstruct } from \"../../context/context\";\nimport { ColumnGroup } from \"../../entities/columnGroup\";\nimport { setAriaColIndex, setAriaColSpan } from \"../../utils/aria\";\nimport { last } from \"../../utils/array\";\nimport { exists } from \"../../utils/generic\";\nimport { Events } from \"../../eventKeys\";\nimport { GridOptionsWrapper } from \"../../gridOptionsWrapper\";\n\nexport class SetLeftFeature extends BeanStub {\n\n private readonly columnOrGroup: IHeaderColumn;\n private eCell: HTMLElement;\n private ariaEl: HTMLElement;\n\n private actualLeft: number;\n\n // if we are spanning columns, this tells what columns,\n // otherwise this is empty\n private colsSpanning: Column[] | undefined;\n\n private beans: Beans;\n\n constructor(columnOrGroup: IHeaderColumn, eCell: HTMLElement, beans: Beans, colsSpanning?: Column[]) {\n super();\n this.columnOrGroup = columnOrGroup;\n this.eCell = eCell;\n this.ariaEl = this.eCell.querySelector('[role=columnheader]') || this.eCell;\n this.colsSpanning = colsSpanning;\n this.beans = beans;\n }\n\n public setColsSpanning(colsSpanning: Column[]): void {\n this.colsSpanning = colsSpanning;\n this.onLeftChanged();\n }\n\n public getColumnOrGroup(): IHeaderColumn {\n if (this.beans.gridOptionsWrapper.isEnableRtl() && this.colsSpanning) {\n return last(this.colsSpanning);\n }\n return this.columnOrGroup;\n }\n\n @PostConstruct\n private postConstruct(): void {\n this.addManagedListener(this.columnOrGroup, Column.EVENT_LEFT_CHANGED, this.onLeftChanged.bind(this));\n this.setLeftFirstTime();\n\n // when in print layout, the left position is also dependent on the width of the pinned sections.\n // so additionally update left if any column width changes.\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, this.onLeftChanged.bind(this));\n\n // setting left has a dependency on print layout\n this.addManagedListener(this.beans.gridOptionsWrapper, GridOptionsWrapper.PROP_DOM_LAYOUT, this.onLeftChanged.bind(this));\n }\n\n private setLeftFirstTime(): void {\n const suppressMoveAnimation = this.beans.gridOptionsWrapper.isSuppressColumnMoveAnimation();\n const oldLeftExists = exists(this.columnOrGroup.getOldLeft());\n const animateColumnMove = this.beans.columnAnimationService.isActive() && oldLeftExists && !suppressMoveAnimation;\n if (animateColumnMove) {\n this.animateInLeft();\n } else {\n this.onLeftChanged();\n }\n }\n\n private animateInLeft(): void {\n const colOrGroup = this.getColumnOrGroup();\n\n const left = colOrGroup.getLeft();\n const oldLeft = colOrGroup.getOldLeft();\n\n const oldActualLeft = this.modifyLeftForPrintLayout(colOrGroup, oldLeft!);\n const actualLeft = this.modifyLeftForPrintLayout(colOrGroup, left!);\n\n this.setLeft(oldActualLeft!);\n\n // we must keep track of the left we want to set to, as this would otherwise lead to a race\n // condition, if the user changed the left value many times in one VM turn, then we want to make\n // make sure the actualLeft we set in the timeout below (in the next VM turn) is the correct left\n // position. eg if user changes column position twice, then setLeft() below executes twice in next\n // VM turn, but only one (the correct one) should get applied.\n this.actualLeft = actualLeft;\n\n this.beans.columnAnimationService.executeNextVMTurn(() => {\n // test this left value is the latest one to be applied, and if not, do nothing\n if (this.actualLeft === actualLeft) {\n this.setLeft(actualLeft);\n }\n });\n }\n\n private onLeftChanged(): void {\n const colOrGroup = this.getColumnOrGroup();\n const left = colOrGroup.getLeft();\n this.actualLeft = this.modifyLeftForPrintLayout(colOrGroup, left!);\n this.setLeft(this.actualLeft);\n }\n\n private modifyLeftForPrintLayout(colOrGroup: IHeaderColumn, leftPosition: number): number {\n const printLayout = this.beans.gridOptionsWrapper.getDomLayout() === Constants.DOM_LAYOUT_PRINT;\n\n if (!printLayout) { return leftPosition; }\n\n if (colOrGroup.getPinned() === Constants.PINNED_LEFT) {\n return leftPosition;\n }\n\n const leftWidth = this.beans.columnModel.getDisplayedColumnsLeftWidth();\n\n if (colOrGroup.getPinned() === Constants.PINNED_RIGHT) {\n const bodyWidth = this.beans.columnModel.getBodyContainerWidth();\n return leftWidth + bodyWidth + leftPosition;\n }\n\n // is in body\n return leftWidth + leftPosition;\n }\n\n private setLeft(value: number): void {\n // if the value is null, then that means the column is no longer\n // displayed. there is logic in the rendering to fade these columns\n // out, so we don't try and change their left positions.\n if (exists(value)) {\n this.eCell.style.left = `${value}px`;\n }\n\n let indexColumn: Column;\n\n if (this.columnOrGroup instanceof Column) {\n indexColumn = this.columnOrGroup;\n } else {\n const columnGroup = this.columnOrGroup as ColumnGroup;\n const children = columnGroup.getLeafColumns();\n\n if (!children.length) { return; }\n\n if (children.length > 1) {\n setAriaColSpan(this.ariaEl, children.length);\n }\n\n indexColumn = children[0];\n }\n\n const index = this.beans.columnModel.getAriaColumnIndex(indexColumn);\n setAriaColIndex(this.ariaEl, index);\n }\n}\n","import { Column } from \"../../entities/column\";\nimport { BeanStub } from \"../../context/beanStub\";\nimport { Autowired, PostConstruct } from \"../../context/context\";\nimport { ColumnHoverService } from \"../../rendering/columnHoverService\";\nimport { GridOptionsWrapper } from \"../../gridOptionsWrapper\";\n\nexport class HoverFeature extends BeanStub {\n\n @Autowired('columnHoverService') private columnHoverService: ColumnHoverService;\n\n private readonly columns: Column[];\n\n private element: HTMLElement;\n\n constructor(columns: Column[], element: HTMLElement) {\n super();\n this.columns = columns;\n this.element = element;\n }\n\n @PostConstruct\n private postConstruct(): void {\n if (this.gridOptionsWrapper.isColumnHoverHighlight()) {\n this.addMouseHoverListeners();\n }\n }\n\n private addMouseHoverListeners(): void {\n this.addManagedListener(this.element, 'mouseout', this.onMouseOut.bind(this));\n this.addManagedListener(this.element, 'mouseover', this.onMouseOver.bind(this));\n }\n\n private onMouseOut(): void {\n this.columnHoverService.clearMouseOver();\n }\n\n private onMouseOver(): void {\n this.columnHoverService.setMouseOver(this.columns);\n }\n\n}\n","\nimport { HeaderRowCtrl } from \"../../row/headerRowCtrl\";\nimport { AbstractHeaderCellCtrl, IAbstractHeaderCellComp } from \"../abstractCell/abstractHeaderCellCtrl\";\nimport { UserComponentFactory } from '../../../components/framework/userComponentFactory';\nimport { KeyCode } from '../../../constants/keyCode';\nimport { Autowired } from '../../../context/context';\nimport { Column } from '../../../entities/column';\nimport { Events, FilterChangedEvent } from '../../../events';\nimport { FilterManager } from '../../../filter/filterManager';\nimport { IFloatingFilter, IFloatingFilterParams, IFloatingFilterParentCallback } from '../../../filter/floating/floatingFilter';\nimport { GridApi, unwrapUserComp } from '../../../gridApi';\nimport { IFilter, IFilterComp } from '../../../interfaces/iFilter';\nimport { IMenuFactory } from '../../../interfaces/iMenuFactory';\nimport { WithoutGridCommon } from '../../../interfaces/iCommon';\nimport { Beans } from '../../../rendering/beans';\nimport { ColumnHoverService } from '../../../rendering/columnHoverService';\nimport { SetLeftFeature } from '../../../rendering/features/setLeftFeature';\nimport { AgPromise } from '../../../utils';\nimport { isElementChildOfClass } from '../../../utils/dom';\nimport { createIconNoSpan } from '../../../utils/icon';\nimport { ManagedFocusFeature } from '../../../widgets/managedFocusFeature';\nimport { HoverFeature } from '../hoverFeature';\nimport { UserCompDetails } from \"../../../components/framework/userComponentFactory\";\nimport { FilterComponent } from \"../../../components/framework/componentTypes\";\n\nexport interface IHeaderFilterCellComp extends IAbstractHeaderCellComp {\n addOrRemoveCssClass(cssClassName: string, on: boolean): void;\n addOrRemoveBodyCssClass(cssClassName: string, on: boolean): void;\n addOrRemoveButtonWrapperCssClass(cssClassName: string, on: boolean): void;\n setCompDetails(compDetails: UserCompDetails): void;\n getFloatingFilterComp(): AgPromise | null;\n setWidth(width: string): void;\n setMenuIcon(icon: HTMLElement): void;\n}\n\nexport class HeaderFilterCellCtrl extends AbstractHeaderCellCtrl {\n\n @Autowired('userComponentFactory') private readonly userComponentFactory: UserComponentFactory;\n @Autowired('filterManager') private readonly filterManager: FilterManager;\n @Autowired('columnHoverService') private readonly columnHoverService: ColumnHoverService;\n @Autowired('gridApi') private readonly gridApi: GridApi;\n @Autowired('menuFactory') private readonly menuFactory: IMenuFactory;\n @Autowired('beans') protected readonly beans: Beans;\n\n private comp: IHeaderFilterCellComp;\n\n private column: Column;\n\n private eButtonShowMainFilter: HTMLElement;\n private eFloatingFilterBody: HTMLElement;\n\n private suppressFilterButton: boolean;\n private active: boolean;\n\n constructor(column: Column, parentRowCtrl: HeaderRowCtrl) {\n super(column, parentRowCtrl);\n this.column = column;\n }\n\n public setComp(comp: IHeaderFilterCellComp, eGui: HTMLElement, eButtonShowMainFilter: HTMLElement, eFloatingFilterBody: HTMLElement): void {\n super.setGui(eGui);\n this.comp = comp;\n this.eButtonShowMainFilter = eButtonShowMainFilter;\n this.eFloatingFilterBody = eFloatingFilterBody;\n\n const colDef = this.column.getColDef();\n const filterExists = !!colDef.filter || !!colDef.filterFramework;\n const floatingFilterExists = !!colDef.floatingFilter;\n this.active = filterExists && floatingFilterExists;\n\n this.setupWidth();\n this.setupLeft();\n this.setupHover();\n this.setupFocus();\n this.setupUserComp();\n this.setupSyncWithFilter();\n this.setupUi();\n\n this.addManagedListener(this.eButtonShowMainFilter, 'click', this.showParentFilter.bind(this));\n }\n\n private setupUi(): void {\n\n this.comp.addOrRemoveButtonWrapperCssClass('ag-hidden', !this.active || this.suppressFilterButton);\n\n if (!this.active) { return; }\n\n this.comp.addOrRemoveBodyCssClass('ag-floating-filter-full-body', this.suppressFilterButton);\n this.comp.addOrRemoveBodyCssClass('ag-floating-filter-body', !this.suppressFilterButton);\n\n const eMenuIcon = createIconNoSpan('filter', this.gridOptionsWrapper, this.column);\n\n if (eMenuIcon) {\n this.eButtonShowMainFilter.appendChild(eMenuIcon);\n }\n }\n\n private setupFocus(): void {\n this.createManagedBean(new ManagedFocusFeature(\n this.eGui,\n {\n shouldStopEventPropagation: this.shouldStopEventPropagation.bind(this),\n onTabKeyDown: this.onTabKeyDown.bind(this),\n handleKeyDown: this.handleKeyDown.bind(this),\n onFocusIn: this.onFocusIn.bind(this)\n }\n ));\n }\n\n protected onTabKeyDown(e: KeyboardEvent) {\n const eDocument = this.gridOptionsWrapper.getDocument();\n const activeEl = eDocument.activeElement as HTMLElement;\n const wrapperHasFocus = activeEl === this.eGui;\n\n if (wrapperHasFocus) { return; }\n\n const nextFocusableEl = this.focusService.findNextFocusableElement(this.eGui, null, e.shiftKey);\n\n if (nextFocusableEl) {\n this.beans.headerNavigationService.scrollToColumn(this.column);\n e.preventDefault();\n nextFocusableEl.focus();\n return;\n }\n\n const nextFocusableColumn = this.findNextColumnWithFloatingFilter(e.shiftKey);\n\n if (!nextFocusableColumn) { return; }\n\n if (this.focusService.focusHeaderPosition({\n headerPosition: {\n headerRowIndex: this.getParentRowCtrl().getRowIndex(),\n column: nextFocusableColumn\n },\n event: e\n })) {\n e.preventDefault();\n }\n }\n\n private findNextColumnWithFloatingFilter(backwards: boolean): Column | null {\n const columModel = this.beans.columnModel;\n let nextCol: Column | null = this.column;\n\n do {\n nextCol = backwards\n ? columModel.getDisplayedColBefore(nextCol)\n : columModel.getDisplayedColAfter(nextCol);\n\n if (!nextCol) { break; }\n\n } while (!nextCol.getColDef().filter || !nextCol.getColDef().floatingFilter);\n\n return nextCol;\n }\n\n protected handleKeyDown(e: KeyboardEvent) {\n const eDocument = this.gridOptionsWrapper.getDocument();\n const activeEl = eDocument.activeElement;\n const wrapperHasFocus = activeEl === this.eGui;\n\n switch (e.key) {\n case KeyCode.UP:\n case KeyCode.DOWN:\n if (!wrapperHasFocus) {\n e.preventDefault();\n }\n case KeyCode.LEFT:\n case KeyCode.RIGHT:\n if (wrapperHasFocus) { return; }\n e.stopPropagation();\n case KeyCode.ENTER:\n if (wrapperHasFocus) {\n if (this.focusService.focusInto(this.eGui)) {\n e.preventDefault();\n }\n }\n break;\n case KeyCode.ESCAPE:\n if (!wrapperHasFocus) {\n this.eGui.focus();\n }\n }\n }\n\n protected onFocusIn(e: FocusEvent): void {\n const isRelatedWithin = this.eGui.contains(e.relatedTarget as HTMLElement);\n\n // when the focus is already within the component,\n // we default to the browser's behavior\n if (isRelatedWithin) { return; }\n\n const notFromHeaderWrapper = !!e.relatedTarget && !(e.relatedTarget as HTMLElement).classList.contains('ag-floating-filter');\n const fromWithinHeader = !!e.relatedTarget && isElementChildOfClass(e.relatedTarget as HTMLElement, 'ag-floating-filter');\n\n if (notFromHeaderWrapper && fromWithinHeader && e.target === this.eGui) {\n const lastFocusEvent = this.lastFocusEvent;\n const fromTab = !!(lastFocusEvent && lastFocusEvent.key === KeyCode.TAB);\n\n if (lastFocusEvent && fromTab) {\n const shouldFocusLast = lastFocusEvent.shiftKey;\n\n this.focusService.focusInto(this.eGui, shouldFocusLast);\n }\n }\n\n const rowIndex = this.getRowIndex();\n this.beans.focusService.setFocusedHeader(rowIndex, this.column);\n }\n\n private setupHover(): void {\n this.createManagedBean(new HoverFeature([this.column], this.eGui));\n\n const listener = () => {\n if (!this.gridOptionsWrapper.isColumnHoverHighlight()) { return; }\n const hovered = this.columnHoverService.isHovered(this.column);\n this.comp.addOrRemoveCssClass('ag-column-hover', hovered);\n };\n\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_HOVER_CHANGED, listener);\n listener();\n }\n\n private setupLeft(): void {\n const setLeftFeature = new SetLeftFeature(this.column, this.eGui, this.beans);\n this.createManagedBean(setLeftFeature);\n }\n\n private setupUserComp(): void {\n if (!this.active) { return; }\n\n const colDef = this.column.getColDef();\n const filterParams = this.filterManager.createFilterParams(this.column, colDef);\n const finalFilterParams = this.userComponentFactory.mergeParamsWithApplicationProvidedParams(colDef, FilterComponent, filterParams);\n\n let defaultFloatingFilterType = this.userComponentFactory.getDefaultFloatingFilterType(colDef);\n\n if (defaultFloatingFilterType == null) {\n defaultFloatingFilterType = 'agReadOnlyFloatingFilter';\n }\n\n const params: WithoutGridCommon = {\n column: this.column,\n filterParams: finalFilterParams,\n currentParentModel: () => this.currentParentModel(),\n parentFilterInstance: (cb) => this.parentFilterInstance(cb),\n showParentFilter: () => this.showParentFilter(),\n suppressFilterButton: false // This one might be overridden from the colDef\n };\n\n // this is unusual - we need a params value OUTSIDE the component the params are for.\n // the params are for the floating filter component, but this property is actually for the wrapper.\n this.suppressFilterButton = colDef.floatingFilterComponentParams ? !!colDef.floatingFilterComponentParams.suppressFilterButton : false;\n\n const compDetails = this.userComponentFactory.getFloatingFilterCompDetails(colDef, params, defaultFloatingFilterType);\n\n if (compDetails) {\n this.comp.setCompDetails(compDetails);\n }\n }\n\n private currentParentModel(): any {\n const filterComponent = this.getFilterComponent(false);\n\n return filterComponent ? filterComponent.resolveNow(null, filter => filter && filter.getModel()) : null;\n }\n\n private getFilterComponent(createIfDoesNotExist = true): AgPromise | null {\n return this.filterManager.getFilterComponent(this.column, 'NO_UI', createIfDoesNotExist);\n }\n\n private parentFilterInstance(callback: IFloatingFilterParentCallback): void {\n const filterComponent = this.getFilterComponent();\n\n if (filterComponent == null) { return; }\n\n filterComponent.then(instance => {\n callback(unwrapUserComp(instance!));\n });\n }\n\n private showParentFilter() {\n const eventSource = this.suppressFilterButton ? this.eFloatingFilterBody : this.eButtonShowMainFilter;\n this.menuFactory.showMenuAfterButtonClick(this.column, eventSource, 'floatingFilter', 'filterMenuTab', ['filterMenuTab']);\n }\n\n private setupSyncWithFilter(): void {\n if (!this.active) { return; }\n\n const syncWithFilter = (filterChangedEvent: FilterChangedEvent | null) => {\n const compPromise = this.comp.getFloatingFilterComp();\n\n if (!compPromise) { return; }\n\n const parentModel = this.currentParentModel();\n\n compPromise.then(comp => {\n if (comp) {\n comp.onParentModelChanged(parentModel, filterChangedEvent);\n }\n });\n };\n\n this.addManagedListener(this.column, Column.EVENT_FILTER_CHANGED, syncWithFilter);\n\n if (this.filterManager.isFilterActive(this.column)) {\n syncWithFilter(null);\n }\n }\n\n private setupWidth(): void {\n const listener = () => {\n const width = `${this.column.getActualWidth()}px`;\n this.comp.setWidth(width);\n };\n\n this.addManagedListener(this.column, Column.EVENT_WIDTH_CHANGED, listener);\n listener();\n }\n\n}\n","import { ColumnModel } from \"../../../columns/columnModel\";\nimport { Constants } from \"../../../constants/constants\";\nimport { BeanStub } from \"../../../context/beanStub\";\nimport { Autowired, PostConstruct } from \"../../../context/context\";\nimport { Column } from \"../../../entities/column\";\nimport { setDisplayed } from \"../../../utils/dom\";\nimport { TouchListener } from \"../../../widgets/touchListener\";\nimport { HorizontalResizeService } from \"../../common/horizontalResizeService\";\nimport { HeaderCellCtrl, IHeaderCellComp } from \"./headerCellCtrl\";\n\nexport class ResizeFeature extends BeanStub {\n\n @Autowired('horizontalResizeService') private horizontalResizeService: HorizontalResizeService;\n @Autowired('columnModel') private columnModel: ColumnModel;\n\n private pinned: string | null;\n private column: Column;\n private eResize: HTMLElement;\n private comp: IHeaderCellComp;\n\n private resizeStartWidth: number;\n private resizeWithShiftKey: boolean;\n\n private ctrl: HeaderCellCtrl;\n\n constructor(\n pinned: string | null,\n column: Column,\n eResize: HTMLElement,\n comp: IHeaderCellComp,\n ctrl: HeaderCellCtrl\n ) {\n super();\n this.pinned = pinned;\n this.column = column;\n this.eResize = eResize;\n this.comp = comp;\n this.ctrl = ctrl;\n }\n\n @PostConstruct\n private postConstruct(): void {\n const colDef = this.column.getColDef();\n\n const destroyResizeFuncs: (() => void)[] = [];\n\n let canResize: boolean;\n let canAutosize: boolean;\n\n const addResize = () => {\n setDisplayed(this.eResize, canResize);\n\n if (!canResize) { return; }\n\n const finishedWithResizeFunc = this.horizontalResizeService.addResizeBar({\n eResizeBar: this.eResize,\n onResizeStart: this.onResizeStart.bind(this),\n onResizing: this.onResizing.bind(this, false),\n onResizeEnd: this.onResizing.bind(this, true)\n });\n destroyResizeFuncs.push(finishedWithResizeFunc);\n\n if (canAutosize) {\n const skipHeaderOnAutoSize = this.gridOptionsWrapper.isSkipHeaderOnAutoSize();\n\n const autoSizeColListener = () => {\n this.columnModel.autoSizeColumn(this.column, skipHeaderOnAutoSize, \"uiColumnResized\");\n };\n\n this.eResize.addEventListener('dblclick', autoSizeColListener);\n const touchListener: TouchListener = new TouchListener(this.eResize);\n touchListener.addEventListener(TouchListener.EVENT_DOUBLE_TAP, autoSizeColListener);\n\n this.addDestroyFunc(() => {\n this.eResize.removeEventListener('dblclick', autoSizeColListener);\n touchListener.removeEventListener(TouchListener.EVENT_DOUBLE_TAP, autoSizeColListener);\n touchListener.destroy();\n });\n }\n };\n\n const removeResize = () => {\n destroyResizeFuncs.forEach(f => f());\n destroyResizeFuncs.length = 0;\n };\n\n const refresh = () => {\n const resize = this.column.isResizable();\n const autoSize = !this.gridOptionsWrapper.isSuppressAutoSize() && !colDef.suppressAutoSize;\n const propertyChange = resize !== canResize || autoSize !== canAutosize;\n if (propertyChange) {\n canResize = resize;\n canAutosize = autoSize;\n removeResize();\n addResize();\n }\n };\n\n refresh();\n this.addDestroyFunc(removeResize);\n this.ctrl.addRefreshFunction(refresh);\n }\n\n private onResizing(finished: boolean, resizeAmount: number): void {\n const resizeAmountNormalised = this.normaliseResizeAmount(resizeAmount);\n const columnWidths = [{ key: this.column, newWidth: this.resizeStartWidth + resizeAmountNormalised }];\n this.columnModel.setColumnWidths(columnWidths, this.resizeWithShiftKey, finished, \"uiColumnDragged\");\n\n if (finished) {\n this.comp.addOrRemoveCssClass('ag-column-resizing', false);\n }\n }\n\n private onResizeStart(shiftKey: boolean): void {\n this.resizeStartWidth = this.column.getActualWidth();\n this.resizeWithShiftKey = shiftKey;\n\n this.comp.addOrRemoveCssClass('ag-column-resizing', true);\n }\n\n // optionally inverts the drag, depending on pinned and RTL\n // note - this method is duplicated in RenderedHeaderGroupCell - should refactor out?\n private normaliseResizeAmount(dragChange: number): number {\n let result = dragChange;\n\n const notPinningLeft = this.pinned !== Constants.PINNED_LEFT;\n const pinningRight = this.pinned === Constants.PINNED_RIGHT;\n\n if (this.gridOptionsWrapper.isEnableRtl()) {\n // for RTL, dragging left makes the col bigger, except when pinning left\n if (notPinningLeft) {\n result *= -1;\n }\n } else {\n // for LTR (ie normal), dragging left makes the col smaller, except when pinning right\n if (pinningRight) {\n result *= -1;\n }\n }\n\n return result;\n }\n\n}","import { Events, CheckboxChangedEvent } from \"../events\";\nimport { AgEvent } from '../events';\nimport { AgAbstractInputField, IInputField } from './agAbstractInputField';\nimport { LabelAlignment } from './agAbstractLabel';\n\nexport interface ChangeEvent extends AgEvent {\n selected: boolean;\n}\n\nexport class AgCheckbox extends AgAbstractInputField {\n\n protected labelAlignment: LabelAlignment = 'right';\n\n private selected?: boolean = false;\n private readOnly = false;\n private passive = false;\n\n constructor(config?: IInputField, className = 'ag-checkbox', inputType = 'checkbox') {\n super(config, className, inputType);\n }\n\n protected addInputListeners() {\n this.addManagedListener(this.eInput, 'click', this.onCheckboxClick.bind(this));\n this.addManagedListener(this.eLabel, 'click', this.toggle.bind(this));\n }\n\n public getNextValue(): boolean {\n return this.selected === undefined ? true : !this.selected;\n }\n\n public setPassive(passive: boolean): void {\n this.passive = passive;\n }\n\n public isReadOnly(): boolean {\n return this.readOnly;\n }\n\n public setReadOnly(readOnly: boolean): void {\n this.eWrapper.classList.toggle('ag-disabled', readOnly);\n this.eInput.disabled = readOnly;\n this.readOnly = readOnly;\n }\n\n public setDisabled(disabled: boolean): this {\n this.eWrapper.classList.toggle('ag-disabled', disabled);\n\n return super.setDisabled(disabled);\n }\n\n public toggle(): void {\n if (this.eInput.disabled) { return; }\n\n const previousValue = this.isSelected();\n const nextValue = this.getNextValue();\n\n if (this.passive) {\n this.dispatchChange(nextValue, previousValue);\n } else {\n this.setValue(nextValue);\n }\n }\n\n public getValue(): boolean | undefined {\n return this.isSelected();\n }\n\n public setValue(value?: boolean, silent?: boolean): this {\n this.refreshSelectedClass(value);\n this.setSelected(value, silent);\n\n return this;\n }\n\n public setName(name: string): this {\n const input = this.getInputElement();\n input.name = name;\n\n return this;\n }\n\n protected isSelected(): boolean | undefined {\n return this.selected;\n }\n\n private setSelected(selected?: boolean, silent?: boolean): void {\n if (this.isSelected() === selected) {\n return;\n }\n\n this.previousValue = this.isSelected();\n\n selected = this.selected = typeof selected === 'boolean' ? selected : undefined;\n this.eInput.checked = selected!;\n this.eInput.indeterminate = selected === undefined;\n\n if (!silent) {\n this.dispatchChange(this.selected, this.previousValue);\n }\n }\n\n private dispatchChange(selected: boolean | undefined, previousValue: boolean | undefined, event?: MouseEvent) {\n this.dispatchEvent({ type: AgCheckbox.EVENT_CHANGED, selected, previousValue, event });\n\n const input = this.getInputElement();\n const checkboxChangedEvent: CheckboxChangedEvent = {\n type: Events.EVENT_CHECKBOX_CHANGED,\n id: input.id,\n name: input.name,\n selected,\n previousValue\n };\n\n this.eventService.dispatchEvent(checkboxChangedEvent);\n }\n\n private onCheckboxClick(e: MouseEvent) {\n if (this.passive || this.eInput.disabled) { return; }\n const previousValue = this.isSelected();\n const selected = this.selected = (e.target as HTMLInputElement).checked;\n this.refreshSelectedClass(selected);\n this.dispatchChange(selected, previousValue, e);\n }\n\n private refreshSelectedClass(value?: boolean | null) {\n this.eWrapper.classList.toggle('ag-checked', value === true);\n this.eWrapper.classList.toggle('ag-indeterminate', value == null);\n }\n}\n","import { AgCheckbox } from \"../../../widgets/agCheckbox\";\nimport { BeanStub } from \"../../../context/beanStub\";\nimport { Autowired } from \"../../../context/context\";\nimport { ColumnApi } from \"../../../columns/columnApi\";\nimport { GridApi } from \"../../../gridApi\";\nimport { Events } from \"../../../events\";\nimport { IRowModel } from \"../../../interfaces/iRowModel\";\nimport { Constants } from \"../../../constants/constants\";\nimport { Column } from \"../../../entities/column\";\nimport { RowNode } from \"../../../entities/rowNode\";\nimport { SelectionService } from \"../../../selectionService\";\nimport { HeaderCellCtrl } from \"./headerCellCtrl\";\nimport { setAriaRole } from \"../../../utils/aria\";\nimport { HeaderCheckboxSelectionCallbackParams } from \"../../../entities/colDef\";\n\nexport class SelectAllFeature extends BeanStub {\n\n @Autowired('gridApi') private gridApi: GridApi;\n @Autowired('columnApi') private columnApi: ColumnApi;\n @Autowired('rowModel') private rowModel: IRowModel;\n @Autowired('selectionService') private selectionService: SelectionService;\n\n private cbSelectAllVisible = false;\n private processingEventFromCheckbox = false;\n private column: Column;\n private headerCellCtrl: HeaderCellCtrl;\n\n private filteredOnly: boolean;\n private cbSelectAll: AgCheckbox;\n\n constructor(column: Column) {\n super();\n this.column = column;\n\n const colDef = column.getColDef();\n this.filteredOnly = colDef ? !!colDef.headerCheckboxSelectionFilteredOnly : false;\n }\n\n public onSpaceKeyPressed(e: KeyboardEvent): void {\n const checkbox = this.cbSelectAll;\n const eDocument = this.gridOptionsWrapper.getDocument();\n\n if (checkbox.isDisplayed() && !checkbox.getGui().contains(eDocument.activeElement)) {\n e.preventDefault();\n checkbox.setValue(!checkbox.getValue());\n }\n }\n\n public getCheckboxGui(): HTMLElement {\n return this.cbSelectAll.getGui();\n }\n\n public setComp(ctrl: HeaderCellCtrl): void {\n this.headerCellCtrl = ctrl;\n this.cbSelectAll = this.createManagedBean(new AgCheckbox());\n this.cbSelectAll.addCssClass('ag-header-select-all');\n setAriaRole(this.cbSelectAll.getGui(), 'presentation');\n this.showOrHideSelectAll();\n\n this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.showOrHideSelectAll.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, this.showOrHideSelectAll.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_SELECTION_CHANGED, this.onSelectionChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_MODEL_UPDATED, this.onModelChanged.bind(this));\n this.addManagedListener(this.cbSelectAll, AgCheckbox.EVENT_CHANGED, this.onCbSelectAll.bind(this));\n this.cbSelectAll.getInputElement().setAttribute('tabindex', '-1');\n this.refreshSelectAllLabel();\n }\n\n private showOrHideSelectAll(): void {\n this.cbSelectAllVisible = this.isCheckboxSelection();\n this.cbSelectAll.setDisplayed(this.cbSelectAllVisible);\n\n if (this.cbSelectAllVisible) {\n // in case user is trying this feature with the wrong model type\n this.checkRightRowModelType();\n // make sure checkbox is showing the right state\n this.updateStateOfCheckbox();\n }\n this.refreshSelectAllLabel();\n }\n\n private onModelChanged(): void {\n if (!this.cbSelectAllVisible) { return; }\n this.updateStateOfCheckbox();\n }\n\n private onSelectionChanged(): void {\n if (!this.cbSelectAllVisible) { return; }\n this.updateStateOfCheckbox();\n }\n\n private getNextCheckboxState(selectionCount: SelectionCount): boolean | null {\n // if no rows, always have it unselected\n if (selectionCount.selected === 0 && selectionCount.notSelected === 0) {\n return false;\n }\n\n // if mix of selected and unselected, this is the tri-state\n if (selectionCount.selected > 0 && selectionCount.notSelected > 0) {\n return null;\n }\n\n // only selected\n if (selectionCount.selected > 0) {\n return true;\n }\n\n // nothing selected\n return false;\n }\n\n private updateStateOfCheckbox(): void {\n if (this.processingEventFromCheckbox) { return; }\n\n this.processingEventFromCheckbox = true;\n\n const selectionCount = this.getSelectionCount();\n const allSelected = this.getNextCheckboxState(selectionCount);\n\n this.cbSelectAll.setValue(allSelected!);\n this.refreshSelectAllLabel();\n\n this.processingEventFromCheckbox = false;\n }\n\n private refreshSelectAllLabel(): void {\n if (!this.cbSelectAllVisible) {\n this.headerCellCtrl.setAriaDescriptionProperty('selectAll', null);\n } else {\n const translate = this.gridOptionsWrapper.getLocaleTextFunc();\n const checked = this.cbSelectAll.getValue();\n const ariaStatus = checked ? translate('ariaChecked', 'checked') : translate('ariaUnchecked', 'unchecked');\n const ariaLabel = translate('ariaRowSelectAll', 'Press Space to toggle all rows selection');\n\n this.headerCellCtrl.setAriaDescriptionProperty('selectAll', `${ariaLabel} (${ariaStatus})`);\n }\n\n this.headerCellCtrl.refreshAriaDescription();\n }\n\n private getSelectionCount(): SelectionCount {\n let selectedCount = 0;\n let notSelectedCount = 0;\n\n const callback = (node: RowNode) => {\n\n if (this.gridOptionsWrapper.isGroupSelectsChildren() && node.group) { return; }\n\n if (node.isSelected()) {\n selectedCount++;\n } else if (!node.selectable) {\n // don't count non-selectable nodes!\n } else {\n notSelectedCount++;\n }\n };\n\n if (this.filteredOnly) {\n this.gridApi.forEachNodeAfterFilter(callback);\n } else {\n this.gridApi.forEachNode(callback);\n }\n\n return {\n notSelected: notSelectedCount,\n selected: selectedCount\n };\n }\n\n private checkRightRowModelType(): void {\n const rowModelType = this.rowModel.getType();\n const rowModelMatches = rowModelType === Constants.ROW_MODEL_TYPE_CLIENT_SIDE;\n\n if (!rowModelMatches) {\n console.warn(`AG Grid: selectAllCheckbox is only available if using normal row model, you are using ${rowModelType}`);\n }\n }\n\n private onCbSelectAll(): void {\n if (this.processingEventFromCheckbox) { return; }\n if (!this.cbSelectAllVisible) { return; }\n\n const value = this.cbSelectAll.getValue();\n\n if (value) {\n this.selectionService.selectAllRowNodes(this.filteredOnly);\n } else {\n this.selectionService.deselectAllRowNodes(this.filteredOnly);\n }\n }\n\n private isCheckboxSelection(): boolean {\n let result = this.column.getColDef().headerCheckboxSelection;\n\n if (typeof result === 'function') {\n const func = result as (params: HeaderCheckboxSelectionCallbackParams) => boolean;\n const params: HeaderCheckboxSelectionCallbackParams = {\n column: this.column,\n colDef: this.column.getColDef(),\n columnApi: this.columnApi,\n api: this.gridApi,\n context: this.gridOptionsWrapper.getContext()\n };\n result = func(params);\n }\n\n if (result) {\n if (this.gridOptionsWrapper.isRowModelServerSide()) {\n console.warn('AG Grid: headerCheckboxSelection is not supported for Server Side Row Model');\n return false;\n }\n if (this.gridOptionsWrapper.isRowModelInfinite()) {\n console.warn('AG Grid: headerCheckboxSelection is not supported for Infinite Row Model');\n return false;\n }\n if (this.gridOptionsWrapper.isRowModelViewport()) {\n console.warn('AG Grid: headerCheckboxSelection is not supported for Viewport Row Model');\n return false;\n }\n // otherwise the row model is compatible, so return true\n return true;\n }\n\n return false;\n }\n\n}\n\ninterface SelectionCount {\n selected: number;\n notSelected: number;\n}\n","import { ColumnApi } from \"../../../columns/columnApi\";\nimport { ColumnModel } from \"../../../columns/columnModel\";\nimport { UserCompDetails, UserComponentFactory } from \"../../../components/framework/userComponentFactory\";\nimport { KeyCode } from '../../../constants/keyCode';\nimport { Autowired, PreDestroy } from \"../../../context/context\";\nimport { DragAndDropService, DragItem, DragSource, DragSourceType } from \"../../../dragAndDrop/dragAndDropService\";\nimport { Column } from \"../../../entities/column\";\nimport { Events } from \"../../../eventKeys\";\nimport { GridApi } from \"../../../gridApi\";\nimport { IMenuFactory } from \"../../../interfaces/iMenuFactory\";\nimport { Beans } from \"../../../rendering/beans\";\nimport { ColumnHoverService } from \"../../../rendering/columnHoverService\";\nimport { SetLeftFeature } from \"../../../rendering/features/setLeftFeature\";\nimport { SortController } from \"../../../sortController\";\nimport { ColumnSortState, getAriaSortState } from \"../../../utils/aria\";\nimport { ManagedFocusFeature } from \"../../../widgets/managedFocusFeature\";\nimport { ITooltipFeatureComp, ITooltipFeatureCtrl, TooltipFeature } from \"../../../widgets/tooltipFeature\";\nimport { HeaderRowCtrl } from \"../../row/headerRowCtrl\";\nimport { AbstractHeaderCellCtrl, IAbstractHeaderCellComp } from \"../abstractCell/abstractHeaderCellCtrl\";\nimport { CssClassApplier } from \"../cssClassApplier\";\nimport { HoverFeature } from \"../hoverFeature\";\nimport { HeaderComp, IHeader, IHeaderParams } from \"./headerComp\";\nimport { ResizeFeature } from \"./resizeFeature\";\nimport { SelectAllFeature } from \"./selectAllFeature\";\n\nexport interface IHeaderCellComp extends IAbstractHeaderCellComp, ITooltipFeatureComp {\n setWidth(width: string): void;\n addOrRemoveCssClass(cssClassName: string, on: boolean): void;\n setColId(id: string): void;\n setAriaDescription(description?: string): void;\n setAriaSort(sort?: ColumnSortState): void;\n setUserCompDetails(compDetails: UserCompDetails): void;\n getUserCompInstance(): IHeader | undefined;\n}\n\nexport class HeaderCellCtrl extends AbstractHeaderCellCtrl {\n\n @Autowired('columnModel') private columnModel: ColumnModel;\n @Autowired('columnHoverService') private columnHoverService: ColumnHoverService;\n @Autowired('beans') protected beans: Beans;\n @Autowired('sortController') private sortController: SortController;\n @Autowired('menuFactory') private menuFactory: IMenuFactory;\n @Autowired('dragAndDropService') private dragAndDropService: DragAndDropService;\n @Autowired('gridApi') private gridApi: GridApi;\n @Autowired('columnApi') private columnApi: ColumnApi;\n @Autowired('userComponentFactory') private userComponentFactory: UserComponentFactory;\n\n private colDefVersion: number;\n\n private comp: IHeaderCellComp;\n\n private column: Column;\n\n private refreshFunctions: (() => void)[] = [];\n\n private selectAllFeature: SelectAllFeature;\n\n private moveDragSource: DragSource | undefined;\n\n private sortable: boolean | null | undefined;\n private displayName: string | null;\n private draggable: boolean;\n private menuEnabled: boolean;\n private dragSourceElement: HTMLElement | undefined;\n\n private userCompDetails: UserCompDetails;\n\n private userHeaderClasses: Set = new Set();\n private ariaDescriptionProperties = new Map();\n\n constructor(column: Column, parentRowCtrl: HeaderRowCtrl) {\n super(column, parentRowCtrl);\n this.column = column;\n }\n\n public setComp(comp: IHeaderCellComp, eGui: HTMLElement, eResize: HTMLElement): void {\n super.setGui(eGui);\n this.comp = comp;\n\n this.colDefVersion = this.columnModel.getColDefVersion();\n\n this.updateState();\n this.setupWidth();\n this.setupMovingCss();\n this.setupMenuClass();\n this.setupSortableClass();\n this.addColumnHoverListener();\n this.setupFilterCss();\n this.setupColId();\n this.setupClassesFromColDef();\n this.setupTooltip();\n this.addActiveHeaderMouseListeners();\n this.setupSelectAll();\n this.setupUserComp();\n this.refreshAria();\n\n this.createManagedBean(new ResizeFeature(this.getPinned(), this.column, eResize, comp, this));\n this.createManagedBean(new HoverFeature([this.column], eGui));\n this.createManagedBean(new SetLeftFeature(this.column, eGui, this.beans));\n this.createManagedBean(new ManagedFocusFeature(\n eGui,\n {\n shouldStopEventPropagation: e => this.shouldStopEventPropagation(e),\n onTabKeyDown: () => null,\n handleKeyDown: this.handleKeyDown.bind(this),\n onFocusIn: this.onFocusIn.bind(this),\n onFocusOut: this.onFocusOut.bind(this)\n }\n ));\n\n this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.onNewColumnsLoaded.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_VALUE_CHANGED, this.onColumnValueChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_ROW_GROUP_CHANGED, this.onColumnRowGroupChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PIVOT_CHANGED, this.onColumnPivotChanged.bind(this));\n }\n\n private setupUserComp(): void {\n const compDetails = this.lookupUserCompDetails();\n this.setCompDetails(compDetails);\n }\n\n private setCompDetails(compDetails: UserCompDetails): void {\n this.userCompDetails = compDetails;\n this.comp.setUserCompDetails(compDetails);\n }\n\n private lookupUserCompDetails(): UserCompDetails {\n const params = this.createParams();\n const colDef = this.column.getColDef();\n return this.userComponentFactory.getHeaderCompDetails(colDef, params)!;\n }\n\n private createParams(): IHeaderParams {\n\n const colDef = this.column.getColDef();\n\n const params: IHeaderParams = {\n column: this.column,\n displayName: this.displayName,\n enableSorting: colDef.sortable,\n enableMenu: this.menuEnabled,\n showColumnMenu: (source: HTMLElement) => {\n this.gridApi.showColumnMenuAfterButtonClick(this.column, source);\n },\n progressSort: (multiSort?: boolean) => {\n this.sortController.progressSort(this.column, !!multiSort, \"uiColumnSorted\");\n },\n setSort: (sort: 'asc' | 'desc' | null, multiSort?: boolean) => {\n this.sortController.setSortForColumn(this.column, sort, !!multiSort, \"uiColumnSorted\");\n },\n api: this.gridApi,\n columnApi: this.columnApi,\n context: this.gridOptionsWrapper.getContext(),\n eGridHeader: this.getGui()\n } as IHeaderParams;\n\n return params;\n }\n\n private setupSelectAll(): void {\n this.selectAllFeature = this.createManagedBean(new SelectAllFeature(this.column));\n this.selectAllFeature.setComp(this);\n }\n\n public getSelectAllGui(): HTMLElement {\n return this.selectAllFeature.getCheckboxGui();\n }\n\n protected handleKeyDown(e: KeyboardEvent): void {\n if (e.key === KeyCode.SPACE) {\n this.selectAllFeature.onSpaceKeyPressed(e);\n }\n if (e.key === KeyCode.ENTER) {\n this.onEnterKeyPressed(e);\n }\n }\n\n private onEnterKeyPressed(e: KeyboardEvent): void {\n /// THIS IS BAD - we are assuming the header is not a user provided comp\n const headerComp = this.comp.getUserCompInstance() as HeaderComp;\n if (!headerComp) { return; }\n\n if (e.ctrlKey || e.metaKey) {\n if (this.menuEnabled && headerComp.showMenu) {\n e.preventDefault();\n headerComp.showMenu();\n }\n } else if (this.sortable) {\n const multiSort = e.shiftKey;\n this.sortController.progressSort(this.column, multiSort, \"uiColumnSorted\");\n }\n }\n\n public isMenuEnabled(): boolean {\n return this.menuEnabled;\n }\n\n protected onFocusIn(e: FocusEvent) {\n if (!this.getGui().contains(e.relatedTarget as HTMLElement)) {\n const rowIndex = this.getRowIndex();\n this.focusService.setFocusedHeader(rowIndex, this.column);\n }\n\n this.setActiveHeader(true);\n }\n\n protected onFocusOut(e: FocusEvent) {\n if (\n this.getGui().contains(e.relatedTarget as HTMLElement)\n ) { return; }\n\n this.setActiveHeader(false);\n }\n\n private setupTooltip(): void {\n\n const tooltipCtrl: ITooltipFeatureCtrl = {\n getColumn: () => this.column,\n getColDef: () => this.column.getColDef(),\n getGui: () => this.eGui,\n getLocation: () => 'header',\n getTooltipValue: () => {\n const res = this.column.getColDef().headerTooltip;\n return res;\n },\n };\n\n const tooltipFeature = this.createManagedBean(new TooltipFeature(tooltipCtrl, this.beans));\n\n tooltipFeature.setComp(this.comp);\n\n this.refreshFunctions.push(() => tooltipFeature.refreshToolTip());\n }\n\n private setupClassesFromColDef(): void {\n const refreshHeaderClasses = () => {\n const colDef = this.column.getColDef();\n const goa = this.gridOptionsWrapper;\n const classes = CssClassApplier.getHeaderClassesFromColDef(colDef, goa, this.column, null);\n\n const oldClasses = this.userHeaderClasses;\n this.userHeaderClasses = new Set(classes);\n\n classes.forEach(c => {\n if (oldClasses.has(c)) {\n // class already added, no need to apply it, but remove from old set\n oldClasses.delete(c);\n } else {\n // class new since last time, so apply it\n this.comp.addOrRemoveCssClass(c, true);\n }\n });\n\n // now old set only has classes that were applied last time, but not this time, so remove them\n oldClasses.forEach(c => this.comp.addOrRemoveCssClass(c, false));\n };\n\n this.refreshFunctions.push(refreshHeaderClasses);\n refreshHeaderClasses();\n }\n\n public setDragSource(eSource: HTMLElement | undefined): void {\n this.dragSourceElement = eSource;\n this.removeDragSource();\n\n if (!eSource) { return; }\n\n if (!this.draggable) { return; }\n\n this.moveDragSource = {\n type: DragSourceType.HeaderCell,\n eElement: eSource,\n defaultIconName: DragAndDropService.ICON_HIDE,\n getDragItem: () => this.createDragItem(),\n dragItemName: this.displayName,\n onDragStarted: () => this.column.setMoving(true, \"uiColumnMoved\"),\n onDragStopped: () => this.column.setMoving(false, \"uiColumnMoved\")\n };\n\n this.dragAndDropService.addDragSource(this.moveDragSource, true);\n }\n\n private createDragItem(): DragItem {\n const visibleState: { [key: string]: boolean; } = {};\n visibleState[this.column.getId()] = this.column.isVisible();\n\n return {\n columns: [this.column],\n visibleState: visibleState\n };\n }\n\n @PreDestroy\n public removeDragSource(): void {\n if (this.moveDragSource) {\n this.dragAndDropService.removeDragSource(this.moveDragSource);\n this.moveDragSource = undefined;\n }\n }\n\n private onNewColumnsLoaded(): void {\n const colDefVersionNow = this.columnModel.getColDefVersion();\n if (colDefVersionNow != this.colDefVersion) {\n this.colDefVersion = colDefVersionNow;\n this.refresh();\n }\n }\n\n private updateState(): void {\n const colDef = this.column.getColDef();\n this.menuEnabled = this.menuFactory.isMenuEnabled(this.column) && !colDef.suppressMenu;\n this.sortable = colDef.sortable;\n this.displayName = this.calculateDisplayName();\n this.draggable = this.workOutDraggable();\n }\n\n public addRefreshFunction(func: () => void): void {\n this.refreshFunctions.push(func);\n }\n\n private refresh(): void {\n this.updateState();\n this.refreshHeaderComp();\n this.refreshAria();\n this.refreshFunctions.forEach(f => f());\n }\n\n private refreshHeaderComp(): void {\n const newCompDetails = this.lookupUserCompDetails();\n\n const compInstance = this.comp.getUserCompInstance();\n\n // only try refresh if old comp exists adn it is the correct type\n const attemptRefresh = compInstance != null && this.userCompDetails.componentClass == newCompDetails.componentClass;\n\n const headerCompRefreshed = attemptRefresh ? this.attemptHeaderCompRefresh(newCompDetails.params) : false;\n\n if (headerCompRefreshed) {\n // we do this as a refresh happens after colDefs change, and it's possible the column has had it's\n // draggable property toggled. no need to call this if not refreshing, as setDragSource is done\n // as part of appendHeaderComp\n this.setDragSource(this.dragSourceElement);\n } else {\n this.setCompDetails(newCompDetails);\n }\n }\n\n public attemptHeaderCompRefresh(params: IHeaderParams): boolean {\n const headerComp = this.comp.getUserCompInstance();\n if (!headerComp) { return false; }\n\n // if no refresh method, then we want to replace the headerComp\n if (!headerComp.refresh) { return false; }\n\n const res = headerComp.refresh(params);\n\n return res;\n }\n\n private calculateDisplayName(): string | null {\n return this.columnModel.getDisplayNameForColumn(this.column, 'header', true);\n }\n\n private checkDisplayName(): void {\n // display name can change if aggFunc different, eg sum(Gold) is now max(Gold)\n if (this.displayName !== this.calculateDisplayName()) {\n this.refresh();\n }\n }\n\n private workOutDraggable(): boolean {\n const colDef = this.column.getColDef();\n const isSuppressMovableColumns = this.gridOptionsWrapper.isSuppressMovableColumns();\n\n const colCanMove = !isSuppressMovableColumns && !colDef.suppressMovable && !colDef.lockPosition;\n\n // we should still be allowed drag the column, even if it can't be moved, if the column\n // can be dragged to a rowGroup or pivot drop zone\n return !!colCanMove || !!colDef.enableRowGroup || !!colDef.enablePivot;\n }\n\n private onColumnRowGroupChanged(): void {\n this.checkDisplayName();\n }\n\n private onColumnPivotChanged(): void {\n this.checkDisplayName();\n }\n\n private onColumnValueChanged(): void {\n this.checkDisplayName();\n }\n\n private setupWidth(): void {\n const listener = () => {\n this.comp.setWidth(this.column.getActualWidth() + 'px');\n };\n\n this.addManagedListener(this.column, Column.EVENT_WIDTH_CHANGED, listener);\n listener();\n }\n\n private setupMovingCss(): void {\n const listener = () => {\n // this is what makes the header go dark when it is been moved (gives impression to\n // user that the column was picked up).\n this.comp.addOrRemoveCssClass('ag-header-cell-moving', this.column.isMoving());\n };\n\n this.addManagedListener(this.column, Column.EVENT_MOVING_CHANGED, listener);\n listener();\n }\n\n private setupMenuClass(): void {\n const listener = () => {\n this.comp.addOrRemoveCssClass('ag-column-menu-visible', this.column.isMenuVisible());\n };\n\n this.addManagedListener(this.column, Column.EVENT_MENU_VISIBLE_CHANGED, listener);\n listener();\n }\n\n private setupSortableClass(): void {\n\n const updateSortableCssClass = () => {\n this.comp.addOrRemoveCssClass('ag-header-cell-sortable', !!this.sortable);\n };\n\n updateSortableCssClass();\n\n this.addRefreshFunction(updateSortableCssClass);\n this.addManagedListener(this.column, Column.EVENT_SORT_CHANGED, this.refreshAriaSort.bind(this));\n }\n\n private refreshAriaSort(): void {\n if (this.sortable) {\n const translate = this.gridOptionsWrapper.getLocaleTextFunc();\n this.comp.setAriaSort(getAriaSortState(this.column));\n this.setAriaDescriptionProperty('sort', translate('ariaSortableColumn', 'Press ENTER to sort.'));\n } else {\n this.comp.setAriaSort();\n this.setAriaDescriptionProperty('sort', null);\n }\n }\n\n private refreshAriaMenu(): void {\n if (this.menuEnabled) {\n const translate = this.gridOptionsWrapper.getLocaleTextFunc();\n this.setAriaDescriptionProperty('menu', translate('ariaMenuColumn', 'Press CTRL ENTER to open column menu.'));\n } else {\n this.setAriaDescriptionProperty('menu', null);\n }\n }\n\n public setAriaDescriptionProperty(property: string, value: string | null): void {\n if (value != null) {\n this.ariaDescriptionProperties.set(property, value);\n } else {\n this.ariaDescriptionProperties.delete(property);\n }\n }\n\n public refreshAriaDescription(): void {\n const descriptionArray = Array.from(this.ariaDescriptionProperties.values());\n\n this.comp.setAriaDescription(descriptionArray.length ? descriptionArray.join(' ') : undefined);\n }\n\n private refreshAria(): void {\n this.refreshAriaSort();\n this.refreshAriaMenu();\n this.refreshAriaDescription();\n }\n\n private addColumnHoverListener(): void {\n const listener = () => {\n if (!this.gridOptionsWrapper.isColumnHoverHighlight()) { return; }\n const isHovered = this.columnHoverService.isHovered(this.column);\n this.comp.addOrRemoveCssClass('ag-column-hover', isHovered);\n };\n\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_HOVER_CHANGED, listener);\n listener();\n }\n\n private setupFilterCss(): void {\n const listener = () => {\n this.comp.addOrRemoveCssClass('ag-header-cell-filtered', this.column.isFilterActive());\n };\n\n this.addManagedListener(this.column, Column.EVENT_FILTER_ACTIVE_CHANGED, listener);\n listener();\n }\n\n private setupColId(): void {\n this.comp.setColId(this.column.getColId());\n }\n\n private addActiveHeaderMouseListeners(): void {\n const listener = (e: MouseEvent) => this.setActiveHeader(e.type === 'mouseenter');\n this.addManagedListener(this.getGui(), 'mouseenter', listener);\n this.addManagedListener(this.getGui(), 'mouseleave', listener);\n }\n\n private setActiveHeader(active: boolean): void {\n this.comp.addOrRemoveCssClass('ag-header-active', active);\n }\n}\n","import { ColumnModel, ColumnResizeSet } from \"../../../columns/columnModel\";\nimport { Constants } from \"../../../constants/constants\";\nimport { BeanStub } from \"../../../context/beanStub\";\nimport { Autowired, PostConstruct } from \"../../../context/context\";\nimport { Column } from \"../../../entities/column\";\nimport { ColumnGroup } from \"../../../entities/columnGroup\";\nimport { AutoWidthCalculator } from \"../../../rendering/autoWidthCalculator\";\nimport { HorizontalResizeService } from \"../../common/horizontalResizeService\";\nimport { IHeaderGroupCellComp } from \"./headerGroupCellCtrl\";\n\nexport class GroupResizeFeature extends BeanStub {\n\n private eResize: HTMLElement;\n private columnGroup: ColumnGroup;\n private comp: IHeaderGroupCellComp;\n private pinned: string | null;\n\n private resizeCols: Column[];\n private resizeStartWidth: number;\n private resizeRatios: number[];\n\n private resizeTakeFromCols: Column[] | null;\n private resizeTakeFromStartWidth: number | null;\n private resizeTakeFromRatios: number[] | null;\n\n @Autowired('horizontalResizeService') private readonly horizontalResizeService: HorizontalResizeService;\n @Autowired('autoWidthCalculator') private readonly autoWidthCalculator: AutoWidthCalculator;\n @Autowired('columnModel') private readonly columnModel: ColumnModel;\n\n constructor(comp: IHeaderGroupCellComp, eResize: HTMLElement, pinned: string | null, columnGroup: ColumnGroup) {\n super();\n\n this.eResize = eResize;\n this.comp = comp;\n this.pinned = pinned;\n this.columnGroup = columnGroup;\n }\n\n @PostConstruct\n private postConstruct(): void {\n\n if (!this.columnGroup.isResizable()) {\n this.comp.addOrRemoveResizableCssClass('ag-hidden', true);\n return;\n }\n\n const finishedWithResizeFunc = this.horizontalResizeService.addResizeBar({\n eResizeBar: this.eResize,\n onResizeStart: this.onResizeStart.bind(this),\n onResizing: this.onResizing.bind(this, false),\n onResizeEnd: this.onResizing.bind(this, true)\n });\n\n this.addDestroyFunc(finishedWithResizeFunc);\n\n if (!this.gridOptionsWrapper.isSuppressAutoSize()) {\n const skipHeaderOnAutoSize = this.gridOptionsWrapper.isSkipHeaderOnAutoSize();\n\n this.eResize.addEventListener('dblclick', () => {\n // get list of all the column keys we are responsible for\n const keys: string[] = [];\n const leafCols = this.columnGroup.getDisplayedLeafColumns();\n\n leafCols.forEach((column: Column) => {\n // not all cols in the group may be participating with auto-resize\n if (!column.getColDef().suppressAutoSize) {\n keys.push(column.getColId());\n }\n });\n\n if (keys.length > 0) {\n this.columnModel.autoSizeColumns({\n columns: keys,\n skipHeader: skipHeaderOnAutoSize,\n stopAtGroup: this.columnGroup,\n source: 'uiColumnResized'\n });\n }\n\n this.resizeLeafColumnsToFit();\n });\n }\n }\n\n public onResizeStart(shiftKey: boolean): void {\n this.calculateInitialValues();\n\n let takeFromGroup: ColumnGroup | null = null;\n\n if (shiftKey) {\n takeFromGroup = this.columnModel.getDisplayedGroupAfter(this.columnGroup);\n }\n\n if (takeFromGroup) {\n const takeFromLeafCols = takeFromGroup.getDisplayedLeafColumns();\n\n this.resizeTakeFromCols = takeFromLeafCols.filter(col => col.isResizable());\n\n this.resizeTakeFromStartWidth = 0;\n this.resizeTakeFromCols.forEach(col => this.resizeTakeFromStartWidth! += col.getActualWidth());\n this.resizeTakeFromRatios = [];\n this.resizeTakeFromCols.forEach(col => this.resizeTakeFromRatios!.push(col.getActualWidth() / this.resizeTakeFromStartWidth!));\n } else {\n this.resizeTakeFromCols = null;\n this.resizeTakeFromStartWidth = null;\n this.resizeTakeFromRatios = null;\n }\n\n this.comp.addOrRemoveCssClass('ag-column-resizing', true);\n\n }\n\n public onResizing(finished: boolean, resizeAmount: any): void {\n const resizeAmountNormalised = this.normaliseDragChange(resizeAmount);\n const width = this.resizeStartWidth + resizeAmountNormalised;\n\n this.resizeColumns(width, finished);\n }\n\n public resizeLeafColumnsToFit(): void {\n const preferredSize = this.autoWidthCalculator.getPreferredWidthForColumnGroup(this.columnGroup);\n this.calculateInitialValues();\n\n if (preferredSize > this.resizeStartWidth) {\n this.resizeColumns(preferredSize, true);\n }\n }\n\n public resizeColumns(totalWidth: number, finished: boolean = true): void {\n const resizeSets: ColumnResizeSet[] = [];\n\n resizeSets.push({\n columns: this.resizeCols,\n ratios: this.resizeRatios,\n width: totalWidth\n });\n\n if (this.resizeTakeFromCols) {\n const diff = totalWidth - this.resizeStartWidth;\n resizeSets.push({\n columns: this.resizeTakeFromCols,\n ratios: this.resizeTakeFromRatios!,\n width: this.resizeTakeFromStartWidth! - diff\n });\n }\n\n this.columnModel.resizeColumnSets({\n resizeSets,\n finished,\n source: 'uiColumnDragged'\n });\n\n if (finished) {\n this.comp.addOrRemoveCssClass('ag-column-resizing', false);\n }\n }\n\n private calculateInitialValues(): void {\n const leafCols = this.columnGroup.getDisplayedLeafColumns();\n this.resizeCols = leafCols.filter(col => col.isResizable());\n this.resizeStartWidth = 0;\n this.resizeCols.forEach(col => this.resizeStartWidth += col.getActualWidth());\n this.resizeRatios = [];\n this.resizeCols.forEach(col => this.resizeRatios.push(col.getActualWidth() / this.resizeStartWidth));\n }\n\n // optionally inverts the drag, depending on pinned and RTL\n // note - this method is duplicated in RenderedHeaderCell - should refactor out?\n private normaliseDragChange(dragChange: number): number {\n let result = dragChange;\n\n if (this.gridOptionsWrapper.isEnableRtl()) {\n // for RTL, dragging left makes the col bigger, except when pinning left\n if (this.pinned !== Constants.PINNED_LEFT) {\n result *= -1;\n }\n } else if (this.pinned === Constants.PINNED_RIGHT) {\n // for LTR (ie normal), dragging left makes the col smaller, except when pinning right\n result *= -1;\n }\n\n return result;\n }\n}","import { BeanStub } from \"../../../context/beanStub\";\nimport { PostConstruct } from \"../../../context/context\";\nimport { Column } from \"../../../entities/column\";\nimport { ColumnGroup } from \"../../../entities/columnGroup\";\nimport { IHeaderGroupCellComp } from \"./headerGroupCellCtrl\";\n\nexport class GroupWidthFeature extends BeanStub {\n\n private columnGroup: ColumnGroup;\n private comp: IHeaderGroupCellComp;\n\n // the children can change, we keep destroy functions related to listening to the children here\n private removeChildListenersFuncs: (() => void)[] = [];\n\n constructor(comp: IHeaderGroupCellComp, columnGroup: ColumnGroup) {\n super();\n this.columnGroup = columnGroup;\n this.comp = comp;\n }\n\n @PostConstruct\n private postConstruct(): void {\n // we need to listen to changes in child columns, as they impact our width\n this.addListenersToChildrenColumns();\n\n // the children belonging to this group can change, so we need to add and remove listeners as they change\n this.addManagedListener(this.columnGroup, ColumnGroup.EVENT_DISPLAYED_CHILDREN_CHANGED, this.onDisplayedChildrenChanged.bind(this));\n\n this.onWidthChanged();\n\n // the child listeners are not tied to this components life-cycle, as children can get added and removed\n // to the group - hence they are on a different life-cycle. so we must make sure the existing children\n // listeners are removed when we finally get destroyed\n this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this));\n }\n\n private addListenersToChildrenColumns(): void {\n // first destroy any old listeners\n this.removeListenersOnChildrenColumns();\n\n // now add new listeners to the new set of children\n const widthChangedListener = this.onWidthChanged.bind(this);\n this.columnGroup.getLeafColumns().forEach(column => {\n column.addEventListener(Column.EVENT_WIDTH_CHANGED, widthChangedListener);\n column.addEventListener(Column.EVENT_VISIBLE_CHANGED, widthChangedListener);\n this.removeChildListenersFuncs.push(() => {\n column.removeEventListener(Column.EVENT_WIDTH_CHANGED, widthChangedListener);\n column.removeEventListener(Column.EVENT_VISIBLE_CHANGED, widthChangedListener);\n });\n });\n }\n\n private removeListenersOnChildrenColumns(): void {\n this.removeChildListenersFuncs.forEach(func => func());\n this.removeChildListenersFuncs = [];\n }\n\n private onDisplayedChildrenChanged(): void {\n this.addListenersToChildrenColumns();\n this.onWidthChanged();\n }\n\n private onWidthChanged(): void {\n this.comp.setWidth(this.columnGroup.getActualWidth() + 'px');\n }\n\n}\n","import { ColumnApi } from \"../../../columns/columnApi\";\nimport { ColumnModel } from \"../../../columns/columnModel\";\nimport { UserCompDetails, UserComponentFactory } from \"../../../components/framework/userComponentFactory\";\nimport { KeyCode } from '../../../constants/keyCode';\nimport { Autowired } from \"../../../context/context\";\nimport {\n DragAndDropService,\n DragItem,\n DragSource,\n DragSourceType\n} from \"../../../dragAndDrop/dragAndDropService\";\nimport { Column } from \"../../../entities/column\";\nimport { ColumnGroup } from \"../../../entities/columnGroup\";\nimport { ProvidedColumnGroup } from \"../../../entities/providedColumnGroup\";\nimport { GridApi } from \"../../../gridApi\";\nimport { Beans } from \"../../../rendering/beans\";\nimport { SetLeftFeature } from \"../../../rendering/features/setLeftFeature\";\nimport { removeFromArray } from \"../../../utils/array\";\nimport { ManagedFocusFeature } from \"../../../widgets/managedFocusFeature\";\nimport { ITooltipFeatureComp, ITooltipFeatureCtrl, TooltipFeature } from \"../../../widgets/tooltipFeature\";\nimport { HeaderRowCtrl } from \"../../row/headerRowCtrl\";\nimport { AbstractHeaderCellCtrl, IAbstractHeaderCellComp } from \"../abstractCell/abstractHeaderCellCtrl\";\nimport { CssClassApplier } from \"../cssClassApplier\";\nimport { HoverFeature } from \"../hoverFeature\";\nimport { GroupResizeFeature } from \"./groupResizeFeature\";\nimport { GroupWidthFeature } from \"./groupWidthFeature\";\nimport { IHeaderGroupParams } from \"./headerGroupComp\";\n\nexport interface IHeaderGroupCellComp extends IAbstractHeaderCellComp, ITooltipFeatureComp {\n addOrRemoveCssClass(cssClassName: string, on: boolean): void;\n addOrRemoveResizableCssClass(cssClassName: string, on: boolean): void;\n setWidth(width: string): void;\n setColId(id: string): void;\n setAriaExpanded(expanded: 'true' | 'false' | undefined): void;\n setUserCompDetails(compDetails: UserCompDetails): void;\n}\n\nexport class HeaderGroupCellCtrl extends AbstractHeaderCellCtrl {\n\n @Autowired('beans') protected beans: Beans;\n @Autowired('columnModel') private columnModel: ColumnModel;\n @Autowired('dragAndDropService') private dragAndDropService: DragAndDropService;\n @Autowired('userComponentFactory') private userComponentFactory: UserComponentFactory;\n @Autowired('gridApi') private gridApi: GridApi;\n @Autowired('columnApi') private columnApi: ColumnApi;\n\n private columnGroup: ColumnGroup;\n private comp: IHeaderGroupCellComp;\n\n private expandable: boolean;\n private displayName: string | null;\n private groupResizeFeature: GroupResizeFeature;\n\n constructor(columnGroup: ColumnGroup, parentRowCtrl: HeaderRowCtrl) {\n super(columnGroup, parentRowCtrl);\n this.columnGroup = columnGroup;\n }\n\n public setComp(comp: IHeaderGroupCellComp, eGui: HTMLElement, eResize: HTMLElement): void {\n super.setGui(eGui);\n this.comp = comp;\n\n this.displayName = this.columnModel.getDisplayNameForColumnGroup(this.columnGroup, 'header');\n\n this.addClasses();\n this.addAttributes();\n this.setupMovingCss();\n this.setupExpandable();\n this.setupTooltip();\n this.setupUserComp();\n\n const pinned = this.getParentRowCtrl().getPinned();\n const leafCols = this.columnGroup.getProvidedColumnGroup().getLeafColumns();\n\n this.createManagedBean(new HoverFeature(leafCols, eGui));\n this.createManagedBean(new SetLeftFeature(this.columnGroup, eGui, this.beans));\n this.createManagedBean(new GroupWidthFeature(comp, this.columnGroup));\n this.groupResizeFeature = this.createManagedBean(new GroupResizeFeature(comp, eResize, pinned, this.columnGroup));\n\n this.createManagedBean(new ManagedFocusFeature(\n eGui,\n {\n shouldStopEventPropagation: this.shouldStopEventPropagation.bind(this),\n onTabKeyDown: () => undefined,\n handleKeyDown: this.handleKeyDown.bind(this),\n onFocusIn: this.onFocusIn.bind(this)\n }\n ));\n }\n\n public resizeLeafColumnsToFit(): void {\n this.groupResizeFeature.onResizeStart(false);\n this.groupResizeFeature.resizeLeafColumnsToFit();\n }\n\n private setupUserComp(): void {\n\n let displayName = this.displayName;\n\n const params: IHeaderGroupParams = {\n displayName: this.displayName!,\n columnGroup: this.columnGroup,\n setExpanded: (expanded: boolean) => {\n this.columnModel.setColumnGroupOpened(this.columnGroup.getProvidedColumnGroup(), expanded, \"gridInitializing\");\n },\n api: this.gridApi,\n columnApi: this.columnApi,\n context: this.gridOptionsWrapper.getContext()\n };\n\n if (!displayName) {\n let columnGroup = this.columnGroup;\n const leafCols = columnGroup.getLeafColumns();\n\n // find the top most column group that represents the same columns. so if we are dragging a group, we also\n // want to visually show the parent groups dragging for the same column set. for example imaging 5 levels\n // of grouping, with each group only containing the next group, and the last group containing three columns,\n // then when you move any group (even the lowest level group) you are in-fact moving all the groups, as all\n // the groups represent the same column set.\n while (columnGroup.getParent() && columnGroup.getParent().getLeafColumns().length === leafCols.length) {\n columnGroup = columnGroup.getParent();\n }\n\n const colGroupDef = columnGroup.getColGroupDef();\n\n if (colGroupDef) {\n displayName = colGroupDef.headerName!;\n }\n\n if (!displayName) {\n displayName = leafCols ? this.columnModel.getDisplayNameForColumn(leafCols[0], 'header', true)! : '';\n }\n }\n\n const compDetails = this.userComponentFactory.getHeaderGroupCompDetails(params)!;\n\n this.comp.setUserCompDetails(compDetails);\n }\n\n private setupTooltip(): void {\n\n const colGroupDef = this.columnGroup.getColGroupDef();\n\n const tooltipCtrl: ITooltipFeatureCtrl = {\n getColumn: () => this.columnGroup,\n getGui: () => this.eGui,\n getLocation: () => 'headerGroup',\n getTooltipValue: () => colGroupDef && colGroupDef.headerTooltip\n };\n\n if (colGroupDef) {\n tooltipCtrl.getColDef = () => colGroupDef;\n }\n\n const tooltipFeature = this.createManagedBean(new TooltipFeature(tooltipCtrl, this.beans));\n\n tooltipFeature.setComp(this.comp);\n }\n\n private setupExpandable(): void {\n const providedColGroup = this.columnGroup.getProvidedColumnGroup();\n\n this.refreshExpanded();\n\n this.addManagedListener(providedColGroup, ProvidedColumnGroup.EVENT_EXPANDABLE_CHANGED, this.refreshExpanded.bind(this));\n this.addManagedListener(providedColGroup, ProvidedColumnGroup.EVENT_EXPANDED_CHANGED, this.refreshExpanded.bind(this));\n }\n\n private refreshExpanded(): void {\n const column = this.columnGroup as ColumnGroup;\n this.expandable = column.isExpandable();\n const expanded = column.isExpanded();\n\n if (this.expandable) {\n this.comp.setAriaExpanded(expanded ? 'true' : 'false');\n } else {\n this.comp.setAriaExpanded(undefined);\n }\n }\n\n private addAttributes(): void {\n this.comp.setColId(this.columnGroup.getUniqueId());\n }\n\n private addClasses(): void {\n const colGroupDef = this.columnGroup.getColGroupDef();\n const classes = CssClassApplier.getHeaderClassesFromColDef(colGroupDef, this.gridOptionsWrapper, null, this.columnGroup);\n\n // having different classes below allows the style to not have a bottom border\n // on the group header, if no group is specified\n classes.push(this.columnGroup.isPadding() ? `ag-header-group-cell-no-group` : `ag-header-group-cell-with-group`);\n\n classes.forEach(c => this.comp.addOrRemoveCssClass(c, true));\n }\n\n private setupMovingCss(): void {\n const providedColumnGroup = this.columnGroup.getProvidedColumnGroup();\n const leafColumns = providedColumnGroup.getLeafColumns();\n\n // this function adds or removes the moving css, based on if the col is moving.\n // this is what makes the header go dark when it is been moved (gives impression to\n // user that the column was picked up).\n const listener = () => this.comp.addOrRemoveCssClass('ag-header-cell-moving', this.columnGroup.isMoving());\n\n leafColumns.forEach(col => {\n this.addManagedListener(col, Column.EVENT_MOVING_CHANGED, listener);\n });\n\n listener();\n }\n\n protected onFocusIn(e: FocusEvent) {\n if (!this.eGui.contains(e.relatedTarget as HTMLElement)) {\n const rowIndex = this.getRowIndex();\n this.beans.focusService.setFocusedHeader(rowIndex, this.columnGroup);\n }\n }\n\n protected handleKeyDown(e: KeyboardEvent) {\n const eDocument = this.gridOptionsWrapper.getDocument();\n const activeEl = eDocument.activeElement;\n const wrapperHasFocus = activeEl === this.eGui;\n\n if (!this.expandable || !wrapperHasFocus) { return; }\n\n if (e.key === KeyCode.ENTER) {\n const column = this.columnGroup;\n const newExpandedValue = !column.isExpanded();\n\n this.columnModel.setColumnGroupOpened(column.getProvidedColumnGroup(), newExpandedValue, \"uiColumnExpanded\");\n }\n }\n\n // unlike columns, this will only get called once, as we don't react on props on column groups\n // (we will always destroy and recreate this comp if something changes)\n public setDragSource(eHeaderGroup: HTMLElement): void {\n\n if (this.isSuppressMoving()) { return; }\n\n const allLeafColumns = this.columnGroup.getProvidedColumnGroup().getLeafColumns();\n const dragSource: DragSource = {\n type: DragSourceType.HeaderCell,\n eElement: eHeaderGroup,\n defaultIconName: DragAndDropService.ICON_HIDE,\n dragItemName: this.displayName,\n // we add in the original group leaf columns, so we move both visible and non-visible items\n getDragItem: this.getDragItemForGroup.bind(this),\n onDragStarted: () => allLeafColumns.forEach(col => col.setMoving(true, \"uiColumnDragged\")),\n onDragStopped: () => allLeafColumns.forEach(col => col.setMoving(false, \"uiColumnDragged\"))\n };\n\n this.dragAndDropService.addDragSource(dragSource, true);\n this.addDestroyFunc(() => this.dragAndDropService.removeDragSource(dragSource));\n }\n\n // when moving the columns, we want to move all the columns (contained within the DragItem) in this group in one go,\n // and in the order they are currently in the screen.\n public getDragItemForGroup(): DragItem {\n const allColumnsOriginalOrder = this.columnGroup.getProvidedColumnGroup().getLeafColumns();\n\n // capture visible state, used when re-entering grid to dictate which columns should be visible\n const visibleState: { [key: string]: boolean; } = {};\n allColumnsOriginalOrder.forEach(column => visibleState[column.getId()] = column.isVisible());\n\n const allColumnsCurrentOrder: Column[] = [];\n this.columnModel.getAllDisplayedColumns().forEach(column => {\n if (allColumnsOriginalOrder.indexOf(column) >= 0) {\n allColumnsCurrentOrder.push(column);\n removeFromArray(allColumnsOriginalOrder, column);\n }\n });\n\n // we are left with non-visible columns, stick these in at the end\n allColumnsOriginalOrder.forEach(column => allColumnsCurrentOrder.push(column));\n\n // create and return dragItem\n return {\n columns: allColumnsCurrentOrder,\n visibleState: visibleState\n };\n }\n\n private isSuppressMoving(): boolean {\n // if any child is fixed, then don't allow moving\n let childSuppressesMoving = false;\n this.columnGroup.getLeafColumns().forEach((column: Column) => {\n if (column.getColDef().suppressMovable || column.getColDef().lockPosition) {\n childSuppressesMoving = true;\n }\n });\n\n const result = childSuppressesMoving || this.gridOptionsWrapper.isSuppressMovableColumns();\n\n return result;\n }\n}\n","import { ColumnModel } from \"../../columns/columnModel\";\nimport { Constants } from \"../../constants/constants\";\nimport { BeanStub } from \"../../context/beanStub\";\nimport { Autowired, PreDestroy } from \"../../context/context\";\nimport { Column } from \"../../entities/column\";\nimport { ColumnGroup } from \"../../entities/columnGroup\";\nimport { IHeaderColumn } from \"../../entities/iHeaderColumn\";\nimport { Events } from \"../../eventKeys\";\nimport { FocusService } from \"../../focusService\";\nimport { GridOptionsWrapper } from \"../../gridOptionsWrapper\";\nimport { isBrowserSafari } from \"../../utils/browser\";\nimport { getAllValuesInObject, iterateObject } from \"../../utils/object\";\nimport { AbstractHeaderCellCtrl } from \"../cells/abstractCell/abstractHeaderCellCtrl\";\nimport { HeaderFilterCellCtrl } from \"../cells/floatingFilter/headerFilterCellCtrl\";\nimport { HeaderCellCtrl } from \"../cells/column/headerCellCtrl\";\nimport { HeaderGroupCellCtrl } from \"../cells/columnGroup/headerGroupCellCtrl\";\nimport { HeaderRowType } from \"./headerRowComp\";\nimport { values } from \"../../utils/generic\";\n\nexport interface IHeaderRowComp {\n setTransform(transform: string): void;\n setTop(top: string): void;\n setHeight(height: string): void;\n setHeaderCtrls(ctrls: AbstractHeaderCellCtrl[]): void;\n setWidth(width: string): void;\n setAriaRowIndex(rowIndex: number): void;\n}\n\nlet instanceIdSequence = 0;\n\nexport class HeaderRowCtrl extends BeanStub {\n\n @Autowired('columnModel') private columnModel: ColumnModel;\n @Autowired('focusService') private focusService: FocusService;\n\n private comp: IHeaderRowComp;\n private rowIndex: number;\n private pinned: string | null;\n private type: HeaderRowType;\n\n private instanceId = instanceIdSequence++;\n\n private headerCellCtrls: { [key: string]: AbstractHeaderCellCtrl } = {};\n\n constructor(rowIndex: number, pinned: string | null, type: HeaderRowType) {\n super();\n this.rowIndex = rowIndex;\n this.pinned = pinned;\n this.type = type;\n }\n\n public getInstanceId(): number {\n return this.instanceId;\n }\n\n public setComp(comp: IHeaderRowComp): void {\n this.comp = comp;\n\n this.onRowHeightChanged();\n this.onVirtualColumnsChanged();\n this.setWidth();\n\n this.addEventListeners();\n\n if (isBrowserSafari()) {\n // fix for a Safari rendering bug that caused the header to flicker above chart panels\n // as you move the mouse over the header\n this.comp.setTransform('translateZ(0)');\n }\n\n comp.setAriaRowIndex(this.rowIndex + 1);\n }\n\n private addEventListeners(): void {\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_RESIZED, this.onColumnResized.bind(this));\n\n // when print layout changes, it changes what columns are in what section\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_DOM_LAYOUT, this.onDisplayedColumnsChanged.bind(this));\n\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, this.onDisplayedColumnsChanged.bind(this));\n\n this.addManagedListener(this.eventService, Events.EVENT_VIRTUAL_COLUMNS_CHANGED, this.onVirtualColumnsChanged.bind(this));\n\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_HEADER_HEIGHT, this.onRowHeightChanged.bind(this));\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_PIVOT_HEADER_HEIGHT, this.onRowHeightChanged.bind(this));\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_GROUP_HEADER_HEIGHT, this.onRowHeightChanged.bind(this));\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_PIVOT_GROUP_HEADER_HEIGHT, this.onRowHeightChanged.bind(this));\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_FLOATING_FILTERS_HEIGHT, this.onRowHeightChanged.bind(this));\n }\n\n public getHeaderCellCtrl(column: ColumnGroup): HeaderGroupCellCtrl | undefined;\n public getHeaderCellCtrl(column: Column): HeaderCellCtrl | undefined;\n public getHeaderCellCtrl(column: any): any {\n return values(this.headerCellCtrls).find(cellCtrl => cellCtrl.getColumnGroupChild() === column);\n }\n\n private onDisplayedColumnsChanged(): void {\n this.onVirtualColumnsChanged();\n this.setWidth();\n }\n\n public getType(): HeaderRowType {\n return this.type;\n }\n\n private onColumnResized(): void {\n this.setWidth();\n }\n\n private setWidth(): void {\n const width = this.getWidthForRow();\n this.comp.setWidth(`${width}px`);\n }\n\n private getWidthForRow(): number {\n const printLayout = this.gridOptionsWrapper.getDomLayout() === Constants.DOM_LAYOUT_PRINT;\n\n if (printLayout) {\n const pinned = this.pinned != null;\n if (pinned) { return 0; }\n\n return this.columnModel.getContainerWidth(Constants.PINNED_RIGHT)\n + this.columnModel.getContainerWidth(Constants.PINNED_LEFT)\n + this.columnModel.getContainerWidth(null);\n }\n\n // if not printing, just return the width as normal\n return this.columnModel.getContainerWidth(this.pinned);\n }\n\n private onRowHeightChanged(): void {\n let headerRowCount = this.columnModel.getHeaderRowCount();\n const sizes: number[] = [];\n\n let numberOfFloating = 0;\n let groupHeight: number | null | undefined;\n let headerHeight: number | null | undefined;\n\n if (this.columnModel.hasFloatingFilters()) {\n headerRowCount++;\n numberOfFloating = 1;\n }\n\n if (this.columnModel.isPivotMode()) {\n groupHeight = this.gridOptionsWrapper.getPivotGroupHeaderHeight();\n headerHeight = this.gridOptionsWrapper.getPivotHeaderHeight();\n } else {\n groupHeight = this.gridOptionsWrapper.getGroupHeaderHeight();\n headerHeight = this.gridOptionsWrapper.getHeaderHeight();\n }\n\n const numberOfNonGroups = 1 + numberOfFloating;\n const numberOfGroups = headerRowCount - numberOfNonGroups;\n\n for (let i = 0; i < numberOfGroups; i++) { sizes.push(groupHeight as number); }\n\n sizes.push(headerHeight as number);\n\n for (let i = 0; i < numberOfFloating; i++) { sizes.push(this.gridOptionsWrapper.getFloatingFiltersHeight() as number); }\n\n let rowHeight = 0;\n\n for (let i = 0; i < this.rowIndex; i++) { rowHeight += sizes[i]; }\n\n this.comp.setTop(rowHeight + 'px');\n this.comp.setHeight(sizes[this.rowIndex] + 'px');\n }\n\n public getPinned(): string | null {\n return this.pinned;\n }\n\n public getRowIndex(): number {\n return this.rowIndex;\n }\n\n private onVirtualColumnsChanged(): void {\n const oldCtrls = this.headerCellCtrls;\n this.headerCellCtrls = {};\n const columns = this.getColumnsInViewport();\n\n columns.forEach(child => {\n // skip groups that have no displayed children. this can happen when the group is broken,\n // and this section happens to have nothing to display for the open / closed state.\n // (a broken group is one that is split, ie columns in the group have a non-group column\n // in between them)\n if (child.isEmptyGroup()) {\n return;\n }\n\n const idOfChild = child.getUniqueId();\n\n // if we already have this cell rendered, do nothing\n let headerCtrl: AbstractHeaderCellCtrl | undefined = oldCtrls[idOfChild];\n delete oldCtrls[idOfChild];\n\n // it's possible there is a new Column with the same ID, but it's for a different Column.\n // this is common with pivoting, where the pivot cols change, but the id's are still pivot_0,\n // pivot_1 etc. so if new col but same ID, need to remove the old col here first as we are\n // about to replace it in the this.headerComps map.\n const forOldColumn = headerCtrl && headerCtrl.getColumnGroupChild() != child;\n if (forOldColumn) {\n this.destroyBean(headerCtrl);\n headerCtrl = undefined;\n }\n\n if (headerCtrl == null) {\n switch (this.type) {\n case HeaderRowType.FLOATING_FILTER:\n headerCtrl = this.createBean(new HeaderFilterCellCtrl(child as Column, this));\n break;\n case HeaderRowType.COLUMN_GROUP:\n headerCtrl = this.createBean(new HeaderGroupCellCtrl(child as ColumnGroup, this));\n break;\n default:\n headerCtrl = this.createBean(new HeaderCellCtrl(child as Column, this));\n break;\n }\n }\n\n this.headerCellCtrls[idOfChild] = headerCtrl;\n });\n\n // we want to keep columns that are focused, otherwise keyboard navigation breaks\n const isFocusedAndDisplayed = (ctrl: HeaderCellCtrl) => {\n const isFocused = this.focusService.isHeaderWrapperFocused(ctrl);\n if (!isFocused) { return false; }\n const isDisplayed = this.columnModel.isDisplayed(ctrl.getColumnGroupChild());\n return isDisplayed;\n };\n\n iterateObject(oldCtrls, (id: string, oldCtrl: HeaderCellCtrl) => {\n const keepCtrl = isFocusedAndDisplayed(oldCtrl);\n if (keepCtrl) {\n this.headerCellCtrls[id] = oldCtrl;\n } else {\n this.destroyBean(oldCtrl);\n }\n });\n\n const ctrlsToDisplay = getAllValuesInObject(this.headerCellCtrls);\n this.comp.setHeaderCtrls(ctrlsToDisplay);\n }\n\n @PreDestroy\n private destroyCtrls(): void {\n iterateObject(this.headerCellCtrls, (key, ctrl)=> {\n this.destroyBean(ctrl);\n });\n this.headerCellCtrls = {};\n }\n\n private getColumnsInViewport(): IHeaderColumn[] {\n const printLayout = this.gridOptionsWrapper.getDomLayout() === Constants.DOM_LAYOUT_PRINT;\n return printLayout ? this.getColumnsInViewportPrintLayout() : this.getColumnsInViewportNormalLayout();\n }\n\n private getColumnsInViewportPrintLayout(): IHeaderColumn[] {\n // for print layout, we add all columns into the center\n if (this.pinned != null) { return []; }\n\n let viewportColumns: IHeaderColumn[] = [];\n const actualDepth = this.getActualDepth();\n\n [Constants.PINNED_LEFT, null, Constants.PINNED_RIGHT].forEach(pinned => {\n const items = this.columnModel.getVirtualHeaderGroupRow(pinned, actualDepth);\n viewportColumns = viewportColumns.concat(items);\n });\n\n return viewportColumns;\n }\n\n private getActualDepth(): number {\n return this.type == HeaderRowType.FLOATING_FILTER ? this.rowIndex - 1 : this.rowIndex;\n }\n\n private getColumnsInViewportNormalLayout(): IHeaderColumn[] {\n // when in normal layout, we add the columns for that container only\n return this.columnModel.getVirtualHeaderGroupRow(this.pinned, this.getActualDepth());\n }\n\n public focusHeader(column: IHeaderColumn, event?: KeyboardEvent): boolean {\n const allCtrls = getAllValuesInObject(this.headerCellCtrls);\n const ctrl: AbstractHeaderCellCtrl = allCtrls.find(ctrl => ctrl.getColumnGroupChild() == column);\n if (!ctrl) { return false; }\n\n ctrl.focus(event);\n\n return true;\n }\n}","import { ColumnModel } from \"../../columns/columnModel\";\nimport { Constants } from \"../../constants/constants\";\nimport { BeanStub } from \"../../context/beanStub\";\nimport { Autowired } from \"../../context/context\";\nimport { CtrlsService } from \"../../ctrlsService\";\nimport { Column } from \"../../entities/column\";\nimport { IHeaderColumn } from \"../../entities/iHeaderColumn\";\nimport { Events } from \"../../eventKeys\";\nimport { CenterWidthFeature } from \"../../gridBodyComp/centerWidthFeature\";\nimport { PinnedWidthService } from \"../../gridBodyComp/pinnedWidthService\";\nimport { ScrollVisibleService } from \"../../gridBodyComp/scrollVisibleService\";\nimport { NumberSequence } from \"../../utils\";\nimport { BodyDropTarget } from \"../columnDrag/bodyDropTarget\";\nimport { HeaderRowType } from \"../row/headerRowComp\";\nimport { HeaderRowCtrl } from \"../row/headerRowCtrl\";\nimport { FocusService } from \"../../focusService\";\nimport { HeaderPosition } from \"../common/headerPosition\";\nimport { ColumnGroup } from \"../../entities/columnGroup\";\nimport { HeaderCellCtrl } from \"../cells/column/headerCellCtrl\";\nimport { HeaderGroupCellCtrl } from \"../cells/columnGroup/headerGroupCellCtrl\";\n\nexport interface IHeaderRowContainerComp {\n setCenterWidth(width: string): void;\n setContainerTransform(transform: string): void;\n setPinnedContainerWidth(width: string): void;\n addOrRemoveCssClass(cssClassName: string, on: boolean): void;\n setCtrls(ctrls: HeaderRowCtrl[]): void;\n}\n\nexport class HeaderRowContainerCtrl extends BeanStub {\n\n @Autowired('ctrlsService') private ctrlsService: CtrlsService;\n @Autowired('scrollVisibleService') private scrollVisibleService: ScrollVisibleService;\n @Autowired('pinnedWidthService') private pinnedWidthService: PinnedWidthService;\n @Autowired('columnModel') private columnModel: ColumnModel;\n @Autowired('focusService') public focusService: FocusService;\n\n private pinned: string | null;\n private comp: IHeaderRowContainerComp;\n\n private filtersRowCtrl: HeaderRowCtrl | undefined;\n private columnsRowCtrl: HeaderRowCtrl;\n private groupsRowCtrls: HeaderRowCtrl[] = [];\n\n constructor(pinned: string | null) {\n super();\n this.pinned = pinned;\n }\n\n public setComp(comp: IHeaderRowContainerComp, eGui: HTMLElement): void {\n this.comp = comp;\n\n this.setupCenterWidth();\n this.setupPinnedWidth();\n\n this.setupDragAndDrop(eGui);\n\n this.addManagedListener(this.eventService, Events.EVENT_GRID_COLUMNS_CHANGED, this.onGridColumnsChanged.bind(this));\n\n this.ctrlsService.registerHeaderContainer(this, this.pinned);\n\n if (this.columnModel.isReady()) {\n this.refresh();\n }\n }\n\n private setupDragAndDrop(dropContainer: HTMLElement): void {\n const bodyDropTarget = new BodyDropTarget(this.pinned, dropContainer);\n this.createManagedBean(bodyDropTarget);\n }\n\n public refresh(keepColumns = false): void {\n const sequence = new NumberSequence();\n\n const focusedHeaderPosition = this.focusService.getFocusHeaderToUseAfterRefresh();\n\n const refreshColumnGroups = () => {\n const groupRowCount = this.columnModel.getHeaderRowCount() - 1;\n\n this.groupsRowCtrls = this.destroyBeans(this.groupsRowCtrls);\n\n for (let i = 0; i < groupRowCount; i++) {\n const ctrl = this.createBean(new HeaderRowCtrl(sequence.next(), this.pinned, HeaderRowType.COLUMN_GROUP));\n this.groupsRowCtrls.push(ctrl);\n }\n };\n\n const refreshColumns = () => {\n const rowIndex = sequence.next();\n const needNewInstance = this.columnsRowCtrl == null || !keepColumns || this.columnsRowCtrl.getRowIndex() !== rowIndex;\n\n if (needNewInstance) {\n this.destroyBean(this.columnsRowCtrl);\n this.columnsRowCtrl = this.createBean(new HeaderRowCtrl(rowIndex, this.pinned, HeaderRowType.COLUMN));\n }\n };\n\n const refreshFilters = () => {\n\n const includeFloatingFilter = this.columnModel.hasFloatingFilters();\n\n const destroyPreviousComp = () => {\n this.filtersRowCtrl = this.destroyBean(this.filtersRowCtrl);\n };\n\n if (!includeFloatingFilter) {\n destroyPreviousComp();\n return;\n }\n\n const rowIndex = sequence.next();\n\n if (this.filtersRowCtrl) {\n const rowIndexMismatch = this.filtersRowCtrl.getRowIndex() !== rowIndex;\n if (!keepColumns || rowIndexMismatch) {\n destroyPreviousComp();\n }\n }\n\n if (!this.filtersRowCtrl) {\n this.filtersRowCtrl = this.createBean(new HeaderRowCtrl(rowIndex, this.pinned, HeaderRowType.FLOATING_FILTER));\n }\n };\n\n refreshColumnGroups();\n refreshColumns();\n refreshFilters();\n\n const allCtrls = this.getAllCtrls();\n this.comp.setCtrls(allCtrls);\n\n this.restoreFocusOnHeader(focusedHeaderPosition);\n }\n\n private restoreFocusOnHeader(position: HeaderPosition | null): void {\n if (position == null || position.column.getPinned() != this.pinned) { return; }\n\n this.focusService.focusHeaderPosition({ headerPosition: position });\n }\n\n private getAllCtrls(): HeaderRowCtrl[] {\n const res = [...this.groupsRowCtrls, this.columnsRowCtrl];\n if (this.filtersRowCtrl) {\n res.push(this.filtersRowCtrl!);\n }\n return res;\n }\n\n // grid cols have changed - this also means the number of rows in the header can have\n // changed. so we remove all the old rows and insert new ones for a complete refresh\n private onGridColumnsChanged() {\n this.refresh(true);\n }\n\n private setupCenterWidth(): void {\n if (this.pinned != null) { return; }\n\n this.createManagedBean(new CenterWidthFeature(width => this.comp.setCenterWidth(`${width}px`)));\n }\n\n public setHorizontalScroll(offset: number): void {\n this.comp.setContainerTransform(`translateX(${offset}px)`);\n }\n\n private setupPinnedWidth(): void {\n if (this.pinned == null) { return; }\n\n const pinningLeft = this.pinned === Constants.PINNED_LEFT;\n const pinningRight = this.pinned === Constants.PINNED_RIGHT;\n\n const listener = () => {\n const width = pinningLeft ? this.pinnedWidthService.getPinnedLeftWidth() : this.pinnedWidthService.getPinnedRightWidth();\n if (width == null) { return; } // can happen at initialisation, width not yet set\n\n const hidden = width == 0;\n const isRtl = this.gridOptionsWrapper.isEnableRtl();\n const scrollbarWidth = this.gridOptionsWrapper.getScrollbarWidth();\n\n // if there is a scroll showing (and taking up space, so Windows, and not iOS)\n // in the body, then we add extra space to keep header aligned with the body,\n // as body width fits the cols and the scrollbar\n const addPaddingForScrollbar = this.scrollVisibleService.isVerticalScrollShowing() && ((isRtl && pinningLeft) || (!isRtl && pinningRight));\n const widthWithPadding = addPaddingForScrollbar ? width + scrollbarWidth : width;\n\n this.comp.setPinnedContainerWidth(widthWithPadding + 'px');\n this.comp.addOrRemoveCssClass('ag-hidden', hidden);\n };\n\n this.addManagedListener(this.eventService, Events.EVENT_LEFT_PINNED_WIDTH_CHANGED, listener);\n this.addManagedListener(this.eventService, Events.EVENT_RIGHT_PINNED_WIDTH_CHANGED, listener);\n this.addManagedListener(this.eventService, Events.EVENT_SCROLL_VISIBILITY_CHANGED, listener);\n this.addManagedListener(this.eventService, Events.EVENT_SCROLLBAR_WIDTH_CHANGED, listener);\n }\n\n public getHeaderCtrlForColumn(column: Column): HeaderCellCtrl | undefined;\n public getHeaderCtrlForColumn(column: ColumnGroup): HeaderGroupCellCtrl | undefined;\n public getHeaderCtrlForColumn(column: any): any {\n if (column instanceof Column) {\n if (!this.columnsRowCtrl) { return; }\n return this.columnsRowCtrl.getHeaderCellCtrl(column);\n }\n\n if (this.groupsRowCtrls.length === 0) { return; }\n\n for (let i = 0; i < this.groupsRowCtrls.length; i++) {\n const ctrl = this.groupsRowCtrls[i].getHeaderCellCtrl(column);\n\n if (ctrl) { return ctrl; }\n }\n }\n\n /* tslint:disable */\n public getHtmlElementForColumnHeader(column: ColumnGroup): HTMLElement | null;\n public getHtmlElementForColumnHeader(column: Column): HTMLElement | null;\n public getHtmlElementForColumnHeader(column: any): any {\n /* tslint:enable */\n const cellCtrl = this.getHeaderCtrlForColumn(column);\n\n if (!cellCtrl) { return null; }\n\n return cellCtrl.getGui();\n }\n\n public getRowType(rowIndex: number): HeaderRowType | undefined {\n const allCtrls = this.getAllCtrls();\n const ctrl = allCtrls[rowIndex];\n return ctrl ? ctrl.getType() : undefined;\n }\n\n public focusHeader(rowIndex: number, column: IHeaderColumn, event?: KeyboardEvent): boolean {\n const allCtrls = this.getAllCtrls();\n const ctrl = allCtrls[rowIndex];\n if (!ctrl) { return false; }\n\n return ctrl.focusHeader(column, event);\n }\n\n public getRowCount(): number {\n return this.getAllCtrls().length;\n }\n}","import { Constants } from '../../constants/constants';\nimport { PostConstruct, PreDestroy } from '../../context/context';\nimport { ensureDomOrder } from '../../utils/dom';\nimport { getAllValuesInObject } from '../../utils/object';\nimport { Component } from '../../widgets/component';\nimport { RefSelector } from '../../widgets/componentAnnotations';\nimport { HeaderRowComp } from '../row/headerRowComp';\nimport { HeaderRowCtrl } from '../row/headerRowCtrl';\nimport { HeaderRowContainerCtrl, IHeaderRowContainerComp } from './headerRowContainerCtrl';\n\nexport class HeaderRowContainerComp extends Component {\n\n private static PINNED_LEFT_TEMPLATE = /* html */ `
`;\n\n private static PINNED_RIGHT_TEMPLATE = /* html */ `
`;\n\n private static CENTER_TEMPLATE = /* html */\n `
\n
\n
`;\n\n @RefSelector('eCenterContainer') private eCenterContainer: HTMLElement;\n\n private eRowContainer: HTMLElement;\n\n private pinned: string | null;\n\n private headerRowComps: {[ctrlId: string]: HeaderRowComp} = {};\n private rowCompsList: HeaderRowComp[] = [];\n\n constructor(pinned: string | null) {\n super();\n this.pinned = pinned;\n }\n\n @PostConstruct\n private init(): void {\n this.selectAndSetTemplate();\n\n const compProxy: IHeaderRowContainerComp = {\n addOrRemoveCssClass: (cssClassName, on) => this.addOrRemoveCssClass(cssClassName, on),\n setCtrls: ctrls => this.setCtrls(ctrls),\n\n // only gets called for center section\n setCenterWidth: width => this.eCenterContainer.style.width = width,\n setContainerTransform: transform => this.eCenterContainer.style.transform = transform,\n\n // only gets called for pinned sections\n setPinnedContainerWidth: width => {\n const eGui = this.getGui();\n eGui.style.width = width;\n eGui.style.maxWidth = width;\n eGui.style.minWidth = width;\n }\n };\n\n const ctrl = this.createManagedBean(new HeaderRowContainerCtrl(this.pinned));\n ctrl.setComp(compProxy, this.getGui());\n }\n\n private selectAndSetTemplate(): void {\n const pinnedLeft = this.pinned == Constants.PINNED_LEFT;\n const pinnedRight = this.pinned == Constants.PINNED_RIGHT;\n\n const template = pinnedLeft ? HeaderRowContainerComp.PINNED_LEFT_TEMPLATE :\n pinnedRight ? HeaderRowContainerComp.PINNED_RIGHT_TEMPLATE : HeaderRowContainerComp.CENTER_TEMPLATE;\n\n this.setTemplate(template);\n\n // for left and right, we add rows directly to the root element,\n // but for center container we add elements to the child container.\n this.eRowContainer = this.eCenterContainer ? this.eCenterContainer : this.getGui();\n }\n\n @PreDestroy\n private destroyRowComps(): void {\n this.setCtrls([]);\n }\n\n private destroyRowComp(rowComp: HeaderRowComp): void {\n this.destroyBean(rowComp);\n this.eRowContainer.removeChild(rowComp.getGui());\n }\n\n private setCtrls(ctrls: HeaderRowCtrl[]): void {\n\n const oldRowComps = this.headerRowComps;\n this.headerRowComps = {};\n this.rowCompsList = [];\n\n let prevGui: HTMLElement;\n\n const appendEnsuringDomOrder = (rowComp: HeaderRowComp) => {\n const eGui = rowComp.getGui();\n\n const notAlreadyIn = eGui.parentElement != this.eRowContainer;\n if (notAlreadyIn) {\n this.eRowContainer.appendChild(eGui);\n }\n if (prevGui) {\n ensureDomOrder(this.eRowContainer, eGui, prevGui);\n }\n\n prevGui = eGui;\n };\n\n ctrls.forEach(ctrl => {\n const ctrlId = ctrl.getInstanceId();\n const existingComp = oldRowComps[ctrlId];\n delete oldRowComps[ctrlId];\n\n const rowComp = existingComp ? existingComp : this.createBean(new HeaderRowComp(ctrl));\n this.headerRowComps[ctrlId] = rowComp;\n this.rowCompsList.push(rowComp);\n\n appendEnsuringDomOrder(rowComp);\n });\n\n getAllValuesInObject(oldRowComps).forEach(c => this.destroyRowComp(c));\n }\n}\n","import { ColumnModel } from \"../columns/columnModel\";\nimport { KeyCode } from \"../constants/keyCode\";\nimport { BeanStub } from \"../context/beanStub\";\nimport { Autowired } from \"../context/context\";\nimport { CtrlsService } from \"../ctrlsService\";\nimport { Events } from \"../eventKeys\";\nimport { FocusService } from \"../focusService\";\nimport { GridOptionsWrapper } from \"../gridOptionsWrapper\";\nimport { exists } from \"../utils/generic\";\nimport { ManagedFocusFeature } from \"../widgets/managedFocusFeature\";\nimport { HeaderNavigationDirection, HeaderNavigationService } from \"./common/headerNavigationService\";\n\nexport interface IGridHeaderComp {\n addOrRemoveCssClass(cssClassName: string, on: boolean): void;\n setHeightAndMinHeight(height: string): void;\n}\n\nexport class GridHeaderCtrl extends BeanStub {\n\n @Autowired('headerNavigationService') private headerNavigationService: HeaderNavigationService;\n @Autowired('focusService') private focusService: FocusService;\n @Autowired('columnModel') private columnModel: ColumnModel;\n @Autowired('ctrlsService') private ctrlsService: CtrlsService;\n\n private comp: IGridHeaderComp;\n private eGui: HTMLElement;\n\n public setComp(comp: IGridHeaderComp, eGui: HTMLElement, eFocusableElement: HTMLElement): void {\n this.comp = comp;\n this.eGui = eGui;\n\n this.createManagedBean(new ManagedFocusFeature(\n eFocusableElement,\n {\n onTabKeyDown: this.onTabKeyDown.bind(this),\n handleKeyDown: this.handleKeyDown.bind(this),\n onFocusOut: this.onFocusOut.bind(this)\n }\n ));\n\n // for setting ag-pivot-on / ag-pivot-off CSS classes\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, this.onPivotModeChanged.bind(this));\n\n this.onPivotModeChanged();\n this.setupHeaderHeight();\n\n this.ctrlsService.registerGridHeaderCtrl(this);\n }\n\n private setupHeaderHeight(): void {\n const listener = this.setHeaderHeight.bind(this);\n listener();\n\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_HEADER_HEIGHT, listener);\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_PIVOT_HEADER_HEIGHT, listener);\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_GROUP_HEADER_HEIGHT, listener);\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_PIVOT_GROUP_HEADER_HEIGHT, listener);\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_FLOATING_FILTERS_HEIGHT, listener);\n\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, listener);\n }\n\n private setHeaderHeight(): void {\n const {columnModel, gridOptionsWrapper} = this;\n\n let numberOfFloating = 0;\n let headerRowCount = columnModel.getHeaderRowCount();\n let totalHeaderHeight: number;\n let groupHeight: number | null | undefined;\n let headerHeight: number | null | undefined;\n\n const hasFloatingFilters = columnModel.hasFloatingFilters();\n\n if (hasFloatingFilters) {\n headerRowCount++;\n numberOfFloating = 1;\n }\n\n if (columnModel.isPivotMode()) {\n groupHeight = gridOptionsWrapper.getPivotGroupHeaderHeight();\n headerHeight = gridOptionsWrapper.getPivotHeaderHeight();\n } else {\n groupHeight = gridOptionsWrapper.getGroupHeaderHeight();\n headerHeight = gridOptionsWrapper.getHeaderHeight();\n }\n\n const numberOfNonGroups = 1 + numberOfFloating;\n const numberOfGroups = headerRowCount - numberOfNonGroups;\n\n totalHeaderHeight = numberOfFloating * gridOptionsWrapper.getFloatingFiltersHeight()!;\n totalHeaderHeight += numberOfGroups * groupHeight!;\n totalHeaderHeight += headerHeight!;\n\n // one extra pixel is needed here to account for the\n // height of the border\n const px = `${totalHeaderHeight + 1}px`;\n this.comp.setHeightAndMinHeight(px);\n }\n\n private onPivotModeChanged(): void {\n const pivotMode = this.columnModel.isPivotMode();\n\n this.comp.addOrRemoveCssClass('ag-pivot-on', pivotMode);\n this.comp.addOrRemoveCssClass('ag-pivot-off', !pivotMode);\n }\n\n protected onTabKeyDown(e: KeyboardEvent): void {\n const isRtl = this.gridOptionsWrapper.isEnableRtl();\n const direction = e.shiftKey !== isRtl\n ? HeaderNavigationDirection.LEFT\n : HeaderNavigationDirection.RIGHT;\n\n if (this.headerNavigationService.navigateHorizontally(direction, true, e) ||\n this.focusService.focusNextGridCoreContainer(e.shiftKey)\n ) {\n e.preventDefault();\n }\n }\n\n protected handleKeyDown(e: KeyboardEvent): void {\n let direction: HeaderNavigationDirection | null = null;\n\n switch (e.key) {\n case KeyCode.LEFT:\n direction = HeaderNavigationDirection.LEFT;\n case KeyCode.RIGHT:\n if (!exists(direction)) {\n direction = HeaderNavigationDirection.RIGHT;\n }\n this.headerNavigationService.navigateHorizontally(direction, false, e);\n break;\n case KeyCode.UP:\n direction = HeaderNavigationDirection.UP;\n case KeyCode.DOWN:\n if (!exists(direction)) {\n direction = HeaderNavigationDirection.DOWN;\n }\n if (this.headerNavigationService.navigateVertically(direction, null, e)) {\n e.preventDefault();\n }\n break;\n default:\n return;\n }\n }\n\n protected onFocusOut(e: FocusEvent): void {\n const eDocument = this.gridOptionsWrapper.getDocument();\n const { relatedTarget } = e;\n\n if (!relatedTarget && this.eGui.contains(eDocument.activeElement)) { return; }\n\n if (!this.eGui.contains(relatedTarget as HTMLElement)) {\n this.focusService.clearFocusedHeader();\n }\n }\n}\n","import { Constants } from '../constants/constants';\nimport { PostConstruct } from '../context/context';\nimport { Component } from '../widgets/component';\nimport { GridHeaderCtrl, IGridHeaderComp } from './gridHeaderCtrl';\nimport { HeaderRowContainerComp } from './rowContainer/headerRowContainerComp';\n\nexport class GridHeaderComp extends Component {\n\n private static TEMPLATE = /* html */\n `
`;\n\n constructor() {\n super(GridHeaderComp.TEMPLATE);\n }\n\n @PostConstruct\n private postConstruct(): void {\n\n const compProxy: IGridHeaderComp = {\n addOrRemoveCssClass: (cssClassName, on) => this.addOrRemoveCssClass(cssClassName, on),\n setHeightAndMinHeight: height => {\n this.getGui().style.height = height;\n this.getGui().style.minHeight = height;\n }\n };\n\n const ctrl = this.createManagedBean(new GridHeaderCtrl());\n ctrl.setComp(compProxy, this.getGui(), this.getFocusableElement());\n\n const addContainer = (container: HeaderRowContainerComp) => {\n this.createManagedBean(container);\n this.appendChild(container);\n };\n\n addContainer(new HeaderRowContainerComp(Constants.PINNED_LEFT));\n addContainer(new HeaderRowContainerComp(null));\n addContainer(new HeaderRowContainerComp(Constants.PINNED_RIGHT));\n }\n}\n","import { Autowired, Bean } from \"../../context/context\";\nimport { DragListenerParams, DragService } from \"../../dragAndDrop/dragService\";\nimport { BeanStub } from \"../../context/beanStub\";\nimport { CtrlsService } from \"../../ctrlsService\";\n\nexport interface HorizontalResizeParams {\n eResizeBar: HTMLElement;\n dragStartPixels?: number;\n onResizeStart: (shiftKey: boolean) => void;\n onResizing: (delta: number) => void;\n onResizeEnd: (delta: number) => void;\n}\n\n@Bean('horizontalResizeService')\nexport class HorizontalResizeService extends BeanStub {\n\n @Autowired('dragService') private dragService: DragService;\n @Autowired('ctrlsService') private ctrlsService: CtrlsService;\n\n private dragStartX: number;\n private resizeAmount: number;\n\n public addResizeBar(params: HorizontalResizeParams): () => void {\n const dragSource: DragListenerParams = {\n dragStartPixels: params.dragStartPixels || 0,\n eElement: params.eResizeBar,\n onDragStart: this.onDragStart.bind(this, params),\n onDragStop: this.onDragStop.bind(this, params),\n onDragging: this.onDragging.bind(this, params)\n };\n\n this.dragService.addDragSource(dragSource, true);\n\n // we pass remove func back to the caller, so call can tell us when they\n // are finished, and then we remove the listener from the drag source\n const finishedWithResizeFunc = () => this.dragService.removeDragSource(dragSource);\n\n return finishedWithResizeFunc;\n }\n\n private onDragStart(params: HorizontalResizeParams, mouseEvent: MouseEvent | Touch): void {\n this.dragStartX = mouseEvent.clientX;\n\n this.setResizeIcons();\n\n const shiftKey = mouseEvent instanceof MouseEvent && mouseEvent.shiftKey === true;\n params.onResizeStart(shiftKey);\n }\n\n private setResizeIcons(): void {\n\n const ctrl = this.ctrlsService.getGridCtrl();\n // change the body cursor, so when drag moves out of the drag bar, the cursor is still 'resize' (or 'move'\n ctrl.setResizeCursor(true);\n // we don't want text selection outside the grid (otherwise it looks weird as text highlights when we move)\n ctrl.disableUserSelect(true);\n }\n\n private onDragStop(params: HorizontalResizeParams, mouseEvent: MouseEvent | Touch): void {\n params.onResizeEnd(this.resizeAmount);\n this.resetIcons();\n }\n\n private resetIcons(): void {\n const ctrl = this.ctrlsService.getGridCtrl();\n ctrl.setResizeCursor(false);\n ctrl.disableUserSelect(false);\n }\n\n private onDragging(params: HorizontalResizeParams, mouseEvent: MouseEvent | Touch): void {\n this.resizeAmount = mouseEvent.clientX - this.dragStartX;\n params.onResizing(this.resizeAmount);\n }\n\n}\n","import { Autowired, Bean } from '../../../context/context';\nimport { BeanStub } from \"../../../context/beanStub\";\nimport { IMenuFactory } from '../../../interfaces/iMenuFactory';\nimport { FilterManager } from '../../../filter/filterManager';\nimport { Column } from '../../../entities/column';\nimport { PopupService } from '../../../widgets/popupService';\nimport { FocusService } from '../../../focusService';\nimport { isVisible } from '../../../utils/dom';\nimport { KeyCode } from '../../../constants/keyCode';\nimport { ContainerType } from '../../../interfaces/iAfterGuiAttachedParams';\nimport { CtrlsService } from '../../../ctrlsService';\nimport { setAriaRole } from '../../../utils/aria';\n\n@Bean('menuFactory')\nexport class StandardMenuFactory extends BeanStub implements IMenuFactory {\n\n @Autowired('filterManager') private filterManager: FilterManager;\n @Autowired('popupService') private popupService: PopupService;\n @Autowired('focusService') private focusService: FocusService;\n @Autowired('ctrlsService') private ctrlsService: CtrlsService;\n\n private hidePopup: () => void;\n private tabListener: () => null;\n\n public hideActiveMenu(): void {\n if (this.hidePopup) {\n this.hidePopup();\n }\n }\n\n public showMenuAfterMouseEvent(column: Column, mouseEvent: MouseEvent | Touch): void {\n this.showPopup(column, eMenu => {\n this.popupService.positionPopupUnderMouseEvent({\n column,\n type: 'columnMenu',\n mouseEvent,\n ePopup: eMenu\n });\n }, mouseEvent.target as HTMLElement);\n }\n\n public showMenuAfterButtonClick(column: Column, eventSource: HTMLElement, containerType: ContainerType): void {\n this.showPopup(column, eMenu => {\n this.popupService.positionPopupUnderComponent({\n type: containerType,\n eventSource,\n ePopup: eMenu,\n keepWithinBounds: true,\n column\n });\n }, eventSource);\n }\n\n public showPopup(column: Column, positionCallback: (eMenu: HTMLElement) => void, eventSource: HTMLElement): void {\n const filterWrapper = this.filterManager.getOrCreateFilterWrapper(column, 'COLUMN_MENU');\n if (!filterWrapper) {\n throw new Error('AG Grid - unable to show popup filter, filter instantiation failed');\n }\n\n const eMenu = document.createElement('div');\n\n setAriaRole(eMenu, 'presentation');\n eMenu.classList.add('ag-menu');\n\n this.tabListener = this.addManagedListener(eMenu, 'keydown', (e) => this.trapFocusWithin(e, eMenu))!;\n\n filterWrapper.guiPromise.then(gui => eMenu.appendChild(gui!));\n\n let hidePopup: (() => void);\n\n const anchorToElement = eventSource || this.ctrlsService.getGridBodyCtrl().getGui();\n const closedCallback = (e: MouseEvent | TouchEvent | KeyboardEvent) => {\n column.setMenuVisible(false, 'contextMenu');\n const isKeyboardEvent = e instanceof KeyboardEvent;\n\n if (this.tabListener) {\n this.tabListener = this.tabListener()!;\n }\n\n if (isKeyboardEvent && eventSource && isVisible(eventSource)) {\n const focusableEl = this.focusService.findTabbableParent(eventSource);\n\n if (focusableEl) { focusableEl.focus(); }\n }\n };\n\n const translate = this.gridOptionsWrapper.getLocaleTextFunc();\n\n const addPopupRes = this.popupService.addPopup({\n modal: true,\n eChild: eMenu,\n closeOnEsc: true,\n closedCallback,\n positionCallback: () => positionCallback(eMenu),\n anchorToElement,\n ariaLabel: translate('ariaLabelColumnMenu', 'Column Menu')\n });\n\n if (addPopupRes) {\n this.hidePopup = hidePopup = addPopupRes.hideFunc;\n }\n\n filterWrapper.filterPromise!.then(filter => {\n // need to make sure the filter is present before positioning, as only\n // after filter it is visible can we find out what the width of it is\n positionCallback(eMenu);\n\n if (filter!.afterGuiAttached) {\n filter!.afterGuiAttached({ container: 'columnMenu', hidePopup });\n }\n });\n\n column.setMenuVisible(true, 'contextMenu');\n }\n\n private trapFocusWithin(e: KeyboardEvent, menu: HTMLElement) {\n if (e.key !== KeyCode.TAB ||\n e.defaultPrevented ||\n this.focusService.findNextFocusableElement(menu, false, e.shiftKey)) {\n return;\n }\n\n e.preventDefault();\n\n this.focusService.focusInto(menu, e.shiftKey);\n }\n\n public isMenuEnabled(column: Column): boolean {\n // for standard, we show menu if filter is enabled, and the menu is not suppressed\n return column.isFilterAllowed();\n }\n}\n","import { AgPromise } from '../utils';\nimport { RefSelector } from '../widgets/componentAnnotations';\nimport { ManagedFocusFeature } from '../widgets/managedFocusFeature';\nimport { IAfterGuiAttachedParams } from '../interfaces/iAfterGuiAttachedParams';\nimport { clearElement } from '../utils/dom';\nimport { setAriaLabel, setAriaRole } from '../utils/aria';\nimport { callIfPresent } from '../utils/function';\nimport { KeyCode } from '../constants/keyCode';\nimport { Component } from '../widgets/component';\nimport { PostConstruct, Autowired } from '../context/context';\nimport { FocusService } from '../focusService';\n\nexport class TabbedLayout extends Component {\n\n @Autowired('focusService') private focusService: FocusService;\n\n @RefSelector('eHeader') private readonly eHeader: HTMLElement;\n @RefSelector('eBody') private readonly eBody: HTMLElement;\n\n private params: TabbedLayoutParams;\n private afterAttachedParams: IAfterGuiAttachedParams;\n private items: TabbedItemWrapper[] = [];\n private activeItem: TabbedItemWrapper;\n private lastScrollListener: (() => null) | null | undefined;\n private readonly tabbedItemScrollMap = new Map();\n\n constructor(params: TabbedLayoutParams) {\n super(TabbedLayout.getTemplate(params.cssClass));\n this.params = params;\n\n if (params.items) {\n params.items.forEach(item => this.addItem(item));\n }\n }\n\n @PostConstruct\n private postConstruct() {\n this.createManagedBean(new ManagedFocusFeature(\n this.getFocusableElement(),\n {\n onTabKeyDown: this.onTabKeyDown.bind(this),\n handleKeyDown: this.handleKeyDown.bind(this)\n }\n ));\n }\n\n private static getTemplate(cssClass?: string) {\n return /* html */ `
\n
\n
\n
`;\n }\n\n protected handleKeyDown(e: KeyboardEvent): void {\n const eDocument = this.gridOptionsWrapper.getDocument();\n switch (e.key) {\n case KeyCode.RIGHT:\n case KeyCode.LEFT:\n if (!this.eHeader.contains(eDocument.activeElement)) { return; }\n\n const currentPosition = this.items.indexOf(this.activeItem);\n const nextPosition = e.key === KeyCode.RIGHT ? Math.min(currentPosition + 1, this.items.length - 1) : Math.max(currentPosition - 1, 0);\n\n if (currentPosition === nextPosition) { return; }\n\n e.preventDefault();\n\n const nextItem = this.items[nextPosition];\n\n this.showItemWrapper(nextItem);\n nextItem.eHeaderButton.focus();\n break;\n case KeyCode.UP:\n case KeyCode.DOWN:\n e.stopPropagation();\n break;\n }\n }\n\n protected onTabKeyDown(e: KeyboardEvent) {\n if (e.defaultPrevented) { return; }\n\n const { focusService, eHeader, eBody, activeItem } = this;\n const eDocument = this.gridOptionsWrapper.getDocument();\n const activeElement = eDocument.activeElement as HTMLElement;\n\n e.preventDefault();\n\n if (eHeader.contains(activeElement)) {\n // focus is in header, move into body of popup\n focusService.focusInto(eBody, e.shiftKey);\n } else {\n // focus is in body, establish if it should return to header\n if (focusService.isFocusUnderManagedComponent(eBody)) {\n // focus was in a managed focus component and has now left, so we can return to the header\n activeItem.eHeaderButton.focus();\n } else {\n const nextEl = focusService.findNextFocusableElement(eBody, false, e.shiftKey);\n\n if (nextEl) {\n // if another element exists in the body that can be focussed, go to that\n nextEl.focus();\n } else {\n // otherwise return to the header\n activeItem.eHeaderButton.focus();\n }\n }\n }\n }\n\n public setAfterAttachedParams(params: IAfterGuiAttachedParams): void {\n this.afterAttachedParams = params;\n }\n\n public showFirstItem(): void {\n if (this.items.length > 0) {\n this.showItemWrapper(this.items[0]);\n }\n }\n\n private addItem(item: TabbedItem): void {\n const eHeaderButton = document.createElement('span');\n\n setAriaRole(eHeaderButton, 'tab');\n eHeaderButton.setAttribute('tabIndex', '-1');\n eHeaderButton.appendChild(item.title);\n eHeaderButton.classList.add('ag-tab');\n\n this.eHeader.appendChild(eHeaderButton);\n setAriaLabel(eHeaderButton, item.titleLabel);\n\n const wrapper: TabbedItemWrapper = {\n tabbedItem: item,\n eHeaderButton: eHeaderButton\n };\n this.items.push(wrapper);\n\n eHeaderButton.addEventListener('click', this.showItemWrapper.bind(this, wrapper));\n }\n\n public showItem(tabbedItem: TabbedItem): void {\n const itemWrapper = this.items.find(wrapper => wrapper.tabbedItem === tabbedItem);\n\n if (itemWrapper) {\n this.showItemWrapper(itemWrapper);\n }\n }\n\n private showItemWrapper(wrapper: TabbedItemWrapper): void {\n const { tabbedItem, eHeaderButton } = wrapper;\n\n if (this.params.onItemClicked) {\n this.params.onItemClicked({ item: tabbedItem });\n }\n\n if (this.activeItem === wrapper) {\n callIfPresent(this.params.onActiveItemClicked!);\n return;\n }\n\n if (this.lastScrollListener) {\n this.lastScrollListener = this.lastScrollListener();\n }\n\n clearElement(this.eBody);\n\n tabbedItem.bodyPromise.then((body: HTMLElement) => {\n this.eBody.appendChild(body);\n const onlyUnmanaged = !this.focusService.isKeyboardMode();\n\n this.focusService.focusInto(this.eBody, false, onlyUnmanaged);\n\n if (tabbedItem.afterAttachedCallback) {\n tabbedItem.afterAttachedCallback(this.afterAttachedParams);\n }\n\n if (this.params.keepScrollPosition) {\n const scrollableContainer = (tabbedItem.getScrollableContainer && tabbedItem.getScrollableContainer()) || body;\n this.lastScrollListener = this.addManagedListener(scrollableContainer, 'scroll', () => {\n this.tabbedItemScrollMap.set(tabbedItem.name, scrollableContainer.scrollTop);\n });\n const scrollPosition = this.tabbedItemScrollMap.get(tabbedItem.name);\n if (scrollPosition !== undefined) {\n // Safari needs a small timeout or it will fire a scroll event to position 0\n setTimeout(() => {\n scrollableContainer.scrollTop = scrollPosition;\n }, 0);\n }\n }\n });\n\n if (this.activeItem) {\n this.activeItem.eHeaderButton.classList.remove('ag-tab-selected');\n }\n\n eHeaderButton.classList.add('ag-tab-selected');\n\n this.activeItem = wrapper;\n }\n}\n\nexport interface TabbedLayoutParams {\n items: TabbedItem[];\n cssClass?: string;\n keepScrollPosition?: boolean;\n onItemClicked?: Function;\n onActiveItemClicked?: Function;\n}\n\nexport interface TabbedItem {\n title: Element;\n titleLabel: string;\n bodyPromise: AgPromise;\n name: string;\n getScrollableContainer?: () => HTMLElement;\n afterAttachedCallback?: (params: IAfterGuiAttachedParams) => void;\n}\n\ninterface TabbedItemWrapper {\n tabbedItem: TabbedItem;\n eHeaderButton: HTMLElement;\n}\n","import { AgPromise } from \"../utils\";\n\nexport interface SimpleHttpRequestParams {\n url: string;\n}\n\n/**\n * @deprecated\n */\nexport function simpleHttpRequest(params: SimpleHttpRequestParams): AgPromise {\n return new AgPromise(resolve => {\n const httpRequest = new XMLHttpRequest();\n httpRequest.open('GET', params.url);\n httpRequest.send();\n httpRequest.onreadystatechange = function () {\n if (httpRequest.readyState === 4 && httpRequest.status === 200) {\n resolve(JSON.parse(httpRequest.responseText));\n }\n };\n });\n}\n","import { RowNode } from \"../entities/rowNode\";\n\nexport interface ServerSideTransaction {\n /**\n * The Row Store to apply the transaction to, ie what group level.\n * eg ['Ireland','2002'] to update the child store found after expanding Ireland and 2002 groups.\n * Passing in blank to empty applies the transaction to the top level.\n */\n route?: string[];\n /** Index position to add at. If missing, rows will be added to the end. */\n addIndex?: number;\n /** Rows to add */\n add?: any[];\n /** Rows to remove */\n remove?: any[];\n /** Rows to update */\n update?: any[];\n}\n\nexport interface ServerSideTransactionResult {\n /** The status of applying the transaction. */\n status: ServerSideTransactionResultStatus;\n /** If rows were added, the newly created Row Nodes for those rows. */\n add?: RowNode[];\n /** If rows were removed, the deleted Row Nodes. */\n remove?: RowNode[];\n /** If rows were updated, the updated Row Nodes. */\n update?: RowNode[];\n}\n\nexport enum ServerSideTransactionResultStatus {\n /** Transaction was successfully applied */\n Applied = 'Applied',\n /**\n * Store was not found, transaction not applied.\n * Either invalid route, or the parent row has not yet been expanded.\n */\n StoreNotFound = 'StoreNotFound',\n /**\n * Store is loading, transaction not applied.\n */\n StoreLoading = 'StoreLoading',\n /**\n * Store is loading (as max loads exceeded), transaction not applied.\n */\n StoreWaitingToLoad = 'StoreWaitingToLoad',\n /**\n * Store load attempt failed, transaction not applied.\n */\n StoreLoadingFailed = 'StoreLoadingFailed',\n /**\n * Store is type Partial, which doesn't accept transactions\n */\n StoreWrongType = 'StoreWrongType',\n /**\n * Transaction was cancelled, due to grid.\n * Callback isApplyServerSideTransaction() returning false\n */\n Cancelled = 'Cancelled'\n}","import { Bean } from \"../context/context\";\nimport { BeanStub } from \"../context/beanStub\";\nimport { debounce } from \"../utils/function\";\nimport { offsetHeight, offsetWidth } from \"../utils/dom\";\n\nconst DEBOUNCE_DELAY = 50;\n@Bean('resizeObserverService')\nexport class ResizeObserverService extends BeanStub {\n\n private polyfillFunctions: (() => void)[] = [];\n private polyfillScheduled: boolean;\n\n public observeResize(element: HTMLElement, callback: () => void): () => void {\n const eDocument = this.gridOptionsWrapper.getDocument();\n const win = (eDocument.defaultView || window) as any;\n // this gets fired too often and might cause some relayout issues\n // so we add a debounce to the callback here to avoid the flashing effect.\n const debouncedCallback = debounce(callback, DEBOUNCE_DELAY);\n const useBrowserResizeObserver = () => {\n\n const resizeObserver = new win.ResizeObserver(debouncedCallback);\n resizeObserver.observe(element);\n return () => resizeObserver.disconnect();\n };\n\n const usePolyfill = () => {\n\n // initialise to the current width and height, so first call will have no changes\n let widthLastTime = offsetWidth(element);\n let heightLastTime = offsetHeight(element);\n\n // when finished, this gets turned to false.\n let running = true;\n\n const periodicallyCheckWidthAndHeight = () => {\n if (running) {\n\n const newWidth = offsetWidth(element);\n const newHeight = offsetHeight(element);\n\n const changed = newWidth !== widthLastTime || newHeight !== heightLastTime;\n if (changed) {\n widthLastTime = newWidth;\n heightLastTime = newHeight;\n callback();\n }\n\n this.doNextPolyfillTurn(periodicallyCheckWidthAndHeight);\n }\n };\n\n periodicallyCheckWidthAndHeight();\n\n // the callback function we return sets running to false\n return () => running = false;\n };\n\n const suppressResize = this.gridOptionsWrapper.isSuppressBrowserResizeObserver();\n const resizeObserverExists = !!win.ResizeObserver;\n\n if (resizeObserverExists && !suppressResize) {\n return useBrowserResizeObserver();\n }\n\n return usePolyfill();\n }\n\n private doNextPolyfillTurn(func: () => void): void {\n this.polyfillFunctions.push(func);\n this.schedulePolyfill();\n }\n\n private schedulePolyfill(): void {\n if (this.polyfillScheduled) { return; }\n\n const executeAllFuncs = () => {\n const funcs = this.polyfillFunctions;\n\n // make sure set scheduled to false and clear clear array\n // before executing the funcs, as the funcs could add more funcs\n this.polyfillScheduled = false;\n this.polyfillFunctions = [];\n\n funcs.forEach(f => f());\n };\n\n this.polyfillScheduled = true;\n this.getFrameworkOverrides().setTimeout(executeAllFuncs, DEBOUNCE_DELAY);\n }\n\n}\n","import { Autowired, Bean, PostConstruct } from \"../context/context\";\nimport { BeanStub } from \"../context/beanStub\";\nimport { CtrlsService } from \"../ctrlsService\";\n\ninterface TaskItem {\n task: () => void;\n index: number;\n createOrder: number;\n}\n\ninterface TaskList {\n list: TaskItem[];\n sorted: boolean;\n}\n\n@Bean('animationFrameService')\nexport class AnimationFrameService extends BeanStub {\n\n @Autowired('ctrlsService') private ctrlsService: CtrlsService;\n\n // p1 and p2 are create tasks are to do with row and cell creation.\n // for them we want to execute according to row order, so we use\n // TaskItem so we know what index the item is for.\n private createTasksP1: TaskList = {list: [], sorted: false}; // eg drawing back-ground of rows\n private createTasksP2: TaskList = {list: [], sorted: false}; // eg cell renderers, adding hover functionality\n\n // destroy tasks are to do with row removal. they are done after row creation as the user will need to see new\n // rows first (as blank is scrolled into view), when we remove the old rows (no longer in view) is not as\n // important.\n private destroyTasks: (() => void)[] = [];\n private ticking = false;\n private useAnimationFrame: boolean;\n\n // we need to know direction of scroll, to build up rows in the direction of\n // the scroll. eg if user scrolls down, we extend the rows by building down.\n private scrollGoingDown = true;\n private lastScrollTop = 0;\n\n private taskCount = 0;\n private cancelledTasks = new Set();\n\n public setScrollTop(scrollTop: number): void {\n this.scrollGoingDown = scrollTop > this.lastScrollTop;\n this.lastScrollTop = scrollTop;\n }\n\n @PostConstruct\n private init(): void {\n this.useAnimationFrame = !this.gridOptionsWrapper.isSuppressAnimationFrame();\n }\n\n public isOn(): boolean {\n return this.useAnimationFrame;\n }\n\n // this method is for our AG Grid sanity only - if animation frames are turned off,\n // then no place in the code should be looking to add any work to be done in animation\n // frames. this stops bugs - where some code is asking for a frame to be executed\n // when it should not.\n private verifyAnimationFrameOn(methodName: string): void {\n if (this.useAnimationFrame === false) {\n console.warn(`AG Grid: AnimationFrameService.${methodName} called but animation frames are off`);\n }\n }\n\n public createTask(task: () => void, index: number, list: 'createTasksP1' | 'createTasksP2') {\n this.verifyAnimationFrameOn(list);\n const taskItem: TaskItem = {task, index, createOrder: ++this.taskCount};\n this.addTaskToList(this[list], taskItem);\n this.schedule();\n }\n\n public cancelTask(task: () => void) {\n this.cancelledTasks.add(task);\n }\n\n private addTaskToList(taskList: TaskList, task: TaskItem): void {\n taskList.list.push(task);\n taskList.sorted = false;\n }\n\n private sortTaskList(taskList: TaskList) {\n if (taskList.sorted) {\n return;\n }\n\n const sortDirection = this.scrollGoingDown ? 1 : -1;\n\n // sort first by row index (taking into account scroll direction), then by\n // order of task creation (always ascending, so cells will render left-to-right)\n taskList.list.sort((a, b) => a.index !== b.index ? sortDirection * (b.index - a.index) : b.createOrder - a.createOrder);\n taskList.sorted = true;\n }\n\n public addDestroyTask(task: () => void): void {\n this.verifyAnimationFrameOn('createTasksP3');\n this.destroyTasks.push(task);\n this.schedule();\n }\n\n private executeFrame(millis: number): void {\n this.verifyAnimationFrameOn('executeFrame');\n\n const p1TaskList = this.createTasksP1;\n const p1Tasks = p1TaskList.list;\n\n const p2TaskList = this.createTasksP2;\n const p2Tasks = p2TaskList.list;\n\n const destroyTasks = this.destroyTasks;\n\n const frameStart = new Date().getTime();\n let duration = (new Date().getTime()) - frameStart;\n\n // 16ms is 60 fps\n const noMaxMillis = millis <= 0;\n\n const gridBodyCon = this.ctrlsService.getGridBodyCtrl();\n\n while (noMaxMillis || duration < millis) {\n const gridBodyDidSomething = gridBodyCon.getScrollFeature().executeAnimationFrameScroll();\n\n if (!gridBodyDidSomething) {\n let task: () => void;\n if (p1Tasks.length) {\n this.sortTaskList(p1TaskList);\n task = p1Tasks.pop()!.task;\n } else if (p2Tasks.length) {\n this.sortTaskList(p2TaskList);\n task = p2Tasks.pop()!.task;\n } else if (destroyTasks.length) {\n task = destroyTasks.pop()!;\n } else {\n this.cancelledTasks.clear();\n break;\n }\n\n if (!this.cancelledTasks.has(task)) {\n task();\n }\n }\n\n duration = (new Date().getTime()) - frameStart;\n }\n\n if (p1Tasks.length || p2Tasks.length || destroyTasks.length) {\n this.requestFrame();\n } else {\n this.stopTicking();\n }\n }\n\n private stopTicking(): void {\n this.ticking = false;\n }\n\n public flushAllFrames(): void {\n if (!this.useAnimationFrame) {\n return;\n }\n this.executeFrame(-1);\n }\n\n public schedule(): void {\n if (!this.useAnimationFrame) {\n return;\n }\n if (!this.ticking) {\n this.ticking = true;\n this.requestFrame();\n }\n }\n\n private requestFrame(): void {\n // check for the existence of requestAnimationFrame, and if\n // it's missing, then we polyfill it with setTimeout()\n const callback = this.executeFrame.bind(this, 60);\n const eDocument = this.gridOptionsWrapper.getDocument();\n const win = (eDocument.defaultView || window) as any;\n\n if (win.requestAnimationFrame) {\n win.requestAnimationFrame(callback);\n } else if (win.webkitRequestAnimationFrame) {\n win.webkitRequestAnimationFrame(callback);\n } else {\n win.setTimeout(callback, 0);\n }\n }\n\n public isQueueEmpty(): boolean {\n return !this.ticking;\n }\n\n // a debounce utility used for parts of the app involved with rendering.\n // the advantage over normal debounce is the client can call flushAllFrames()\n // to make sure all rendering is complete. we don't wait any milliseconds,\n // as this is intended to batch calls in one VM turn.\n public debounce(func: () => void) {\n let pending = false;\n return () => {\n if (!this.isOn()) {\n this.getFrameworkOverrides().setTimeout(func, 0);\n return;\n }\n if (pending) {\n return;\n }\n pending = true;\n this.addDestroyTask(() => {\n pending = false;\n func();\n });\n };\n }\n}\n","import { BeanStub } from \"../../context/beanStub\";\nimport { Autowired } from \"../../context/context\";\nimport { DragListenerParams, DragService } from \"../../dragAndDrop/dragService\";\nimport { getAbsoluteHeight, getAbsoluteWidth, setFixedHeight, setFixedWidth } from \"../../utils/dom\";\nimport { PopupService } from \"../../widgets/popupService\";\n\nconst RESIZE_CONTAINER_STYLE = 'ag-resizer-wrapper';\n\nconst RESIZE_TEMPLATE = /* html */\n `
\n
\n
\n
\n
\n
\n
\n
\n
\n
`;\n\nexport interface PositionableOptions {\n popup?: boolean;\n minWidth?: number | null;\n width?: number | string | null;\n minHeight?: number | null;\n height?: number | string | null;\n centered?: boolean | null;\n calculateTopBuffer?: () => number;\n /**\n * Used for when a popup needs to be resized by an element within itself\n * In that case, the feature will configured as `popup=false` but the offsetParent\n * needs to be the popupParent.\n */\n forcePopupParentAsOffsetParent?: boolean;\n x?: number | null;\n y?: number | null;\n}\n\nexport type ResizableSides = 'topLeft' |\n 'top' |\n 'topRight' |\n 'right' |\n 'bottomRight' |\n 'bottom' |\n 'bottomLeft' |\n 'left';\n\nexport type ResizableStructure = {\n [key in ResizableSides]?: boolean;\n};\n\ninterface MappedResizer {\n element: HTMLElement;\n dragSource?: DragListenerParams;\n}\n\nexport class PositionableFeature extends BeanStub {\n\n private dragStartPosition = {\n x: 0,\n y: 0\n };\n\n private position = {\n x: 0,\n y: 0\n };\n\n private lastSize = {\n width: -1,\n height: -1\n };\n\n private resizerMap: {\n [key in ResizableSides]: MappedResizer\n } | undefined;\n\n private minWidth: number;\n private minHeight?: number;\n private positioned = false;\n private resizersAdded = false;\n private config: PositionableOptions;\n\n private resizeListeners: DragListenerParams[] = [];\n private moveElementDragListener: DragListenerParams | undefined;\n\n private offsetParent: HTMLElement;\n private boundaryEl: HTMLElement | null = null;\n\n private isResizing: boolean = false;\n private isMoving = false;\n private resizable: ResizableStructure = {};\n private movable = false;\n private currentResizer: { isTop: boolean, isRight: boolean, isBottom: boolean, isLeft: boolean } | null = null;\n\n @Autowired('popupService') protected readonly popupService: PopupService;\n @Autowired('dragService') private readonly dragService: DragService;\n\n constructor(\n private readonly element: HTMLElement,\n config?: PositionableOptions\n ) {\n super();\n this.config = Object.assign({}, { popup: false }, config);\n }\n\n public center() {\n const { clientHeight, clientWidth } = this.offsetParent;\n\n const x = (clientWidth / 2) - (this.getWidth()! / 2);\n const y = (clientHeight / 2) - (this.getHeight()! / 2);\n\n this.offsetElement(x, y);\n }\n\n public initialisePosition(): void {\n const { centered, forcePopupParentAsOffsetParent, minWidth, width, minHeight, height, x, y } = this.config;\n\n if (!this.offsetParent) { this.setOffsetParent(); }\n\n let computedMinHeight = 0;\n let computedMinWidth = 0;\n\n // here we don't use the main offset parent but the element's offsetParent\n // in order to calculated the minWidth and minHeight correctly\n const isVisible = !!this.element.offsetParent;\n if (isVisible) {\n const boundaryEl = this.findBoundaryElement();\n const offsetParentComputedStyles = window.getComputedStyle(boundaryEl);\n if (offsetParentComputedStyles.minWidth != null) {\n const paddingWidth = boundaryEl.offsetWidth - this.element.offsetWidth;\n computedMinWidth = parseInt(offsetParentComputedStyles.minWidth, 10) - paddingWidth;\n }\n\n if (offsetParentComputedStyles.minHeight != null) {\n const paddingHeight = boundaryEl.offsetHeight - this.element.offsetHeight;\n computedMinHeight = parseInt(offsetParentComputedStyles.minHeight, 10) - paddingHeight;\n }\n }\n\n this.minHeight = minHeight || computedMinHeight;\n this.minWidth = minWidth || computedMinWidth;\n\n if (width) {\n this.setWidth(width);\n }\n\n if (height) {\n this.setHeight(height);\n }\n\n if (!width || !height) {\n this.refreshSize();\n }\n\n if (centered) {\n this.center();\n } else if (x || y) {\n this.offsetElement(x!, y!);\n } else if (isVisible && forcePopupParentAsOffsetParent && this.boundaryEl) {\n const top = parseFloat(this.boundaryEl.style.top!);\n const left = parseFloat(this.boundaryEl.style.left!);\n\n this.offsetElement(\n isNaN(left) ? 0 : left,\n isNaN(top) ? 0 : top\n );\n }\n\n this.positioned = !!this.offsetParent;\n }\n\n public isPositioned(): boolean {\n return this.positioned;\n }\n\n public getPosition(): { x: number; y: number } {\n return this.position;\n }\n\n public setMovable(movable: boolean, moveElement: HTMLElement) {\n if (!this.config.popup || movable === this.movable) { return; }\n\n this.movable = movable;\n\n const params: DragListenerParams = this.moveElementDragListener || {\n eElement: moveElement,\n onDragStart: this.onMoveStart.bind(this),\n onDragging: this.onMove.bind(this),\n onDragStop: this.onMoveEnd.bind(this)\n };\n\n if (movable) {\n this.dragService.addDragSource(params);\n this.moveElementDragListener = params;\n } else {\n this.dragService.removeDragSource(params);\n this.moveElementDragListener = undefined;\n }\n }\n\n public setResizable(resizable: boolean | ResizableStructure) {\n this.clearResizeListeners();\n\n if (resizable) {\n this.addResizers();\n } else {\n this.removeResizers();\n }\n\n if (typeof resizable === 'boolean') {\n if (resizable === false) { return; }\n\n resizable = {\n topLeft: resizable,\n top: resizable,\n topRight: resizable,\n right: resizable,\n bottomRight: resizable,\n bottom: resizable,\n bottomLeft: resizable,\n left: resizable\n } as ResizableStructure;\n }\n\n Object.keys(resizable).forEach((side: ResizableSides) => {\n const resizableStructure = resizable as ResizableStructure;\n const val = !!resizableStructure[side];\n const resizerEl = this.getResizerElement(side);\n\n const params: DragListenerParams = {\n dragStartPixels: 0,\n eElement: resizerEl!,\n onDragStart: (e: MouseEvent) => this.onResizeStart(e, side),\n onDragging: this.onResize.bind(this),\n onDragStop: (e: MouseEvent) => this.onResizeEnd(e, side),\n };\n\n if (!!this.resizable[side] !== val || (!this.isAlive() && !val)) {\n if (val) {\n this.dragService.addDragSource(params);\n this.resizeListeners.push(params);\n resizerEl!.style.pointerEvents = 'all';\n } else {\n resizerEl!.style.pointerEvents = 'none';\n }\n }\n });\n }\n\n public removeSizeFromEl(): void {\n this.element.style.removeProperty('height');\n this.element.style.removeProperty('width');\n this.element.style.removeProperty('flex');\n }\n\n public restoreLastSize(): void {\n this.element.style.flex = '0 0 auto';\n\n const { height, width } = this.lastSize;\n\n if (width !== -1) {\n this.element.style.width = `${width}px`;\n }\n\n if (height !== -1) {\n this.element.style.height = `${height}px`;\n }\n }\n\n public getHeight(): number | undefined {\n return this.element.offsetHeight;\n }\n\n public setHeight(height: number | string) {\n const { popup } = this.config;\n const eGui = this.element;\n\n let isPercent = false;\n\n if (typeof height === 'string' && height.indexOf('%') !== -1) {\n setFixedHeight(eGui, height);\n height = getAbsoluteHeight(eGui);\n isPercent = true;\n } else if (this.positioned) {\n const elRect = this.element.getBoundingClientRect();\n const parentRect = this.offsetParent.getBoundingClientRect();\n\n height = Math.max(this.minHeight!, height as number);\n const { clientHeight } = this.offsetParent;\n const yPosition = popup ? this.position.y : elRect.top;\n const parentTop = popup ? 0 : parentRect.top;\n\n if (clientHeight && (height + yPosition > clientHeight + parentTop)) {\n height = clientHeight - yPosition;\n }\n }\n\n if (this.getHeight() === height) { return; }\n\n if (!isPercent) {\n if (popup) {\n setFixedHeight(eGui, height);\n } else {\n eGui.style.height = `${height}px`;\n eGui.style.flex = '0 0 auto';\n this.lastSize.height = typeof height === 'number' ? height : parseFloat(height);\n }\n } else {\n eGui.style.maxHeight = 'unset';\n eGui.style.minHeight = 'unset';\n }\n }\n\n public getWidth(): number | undefined {\n return this.element.offsetWidth;\n }\n\n public setWidth(width: number | string) {\n const eGui = this.element;\n const { popup } = this.config;\n\n let isPercent = false;\n\n if (typeof width === 'string' && width.indexOf('%') !== -1) {\n setFixedWidth(eGui, width);\n width = getAbsoluteWidth(eGui);\n isPercent = true;\n } else if (this.positioned) {\n width = Math.max(this.minWidth, width as number);\n const { clientWidth } = this.offsetParent;\n const xPosition = popup ? this.position.x : this.element.getBoundingClientRect().left;\n\n if (clientWidth && (width + xPosition > clientWidth)) {\n width = clientWidth - xPosition;\n }\n }\n\n if (this.getWidth() === width) { return; }\n\n if (!isPercent) {\n if (this.config.popup) {\n setFixedWidth(eGui, width);\n } else {\n eGui.style.width = `${width}px`;\n eGui.style.flex = ' unset';\n this.lastSize.width = typeof width === 'number' ? width : parseFloat(width);\n }\n } else {\n eGui.style.maxWidth = 'unset';\n eGui.style.minWidth = 'unset';\n }\n }\n\n public offsetElement(x = 0, y = 0) {\n const ePopup = this.config.forcePopupParentAsOffsetParent ? this.boundaryEl! : this.element;\n\n this.popupService.positionPopup({\n ePopup,\n x,\n y,\n keepWithinBounds: true\n });\n\n this.setPosition(\n parseFloat(ePopup.style.left!),\n parseFloat(ePopup.style.top!)\n );\n }\n\n private setPosition(x: number, y: number): void {\n this.position.x = x;\n this.position.y = y;\n }\n\n private updateDragStartPosition(x: number, y: number) {\n this.dragStartPosition = { x, y };\n }\n\n private calculateMouseMovement(params: {\n e: MouseEvent,\n topBuffer?: number,\n anywhereWithin?: boolean,\n isLeft?: boolean,\n isTop?: boolean;\n }): { movementX: number, movementY: number; } {\n const { e, isLeft, isTop, anywhereWithin, topBuffer } = params;\n\n const xDiff = e.clientX - this.dragStartPosition.x;\n const yDiff = e.clientY - this.dragStartPosition.y;\n\n const movementX = this.shouldSkipX(e, !!isLeft, !!anywhereWithin, xDiff) ? 0 : xDiff;\n const movementY = this.shouldSkipY(e, !!isTop, topBuffer, yDiff) ? 0 : yDiff;\n\n return { movementX, movementY };\n }\n\n private shouldSkipX(e: MouseEvent, isLeft: boolean, anywhereWithin: boolean, diff: number): boolean {\n const elRect = this.element.getBoundingClientRect();\n const parentRect = this.offsetParent.getBoundingClientRect();\n const boundaryElRect = this.boundaryEl!.getBoundingClientRect();\n const xPosition = this.config.popup ? this.position.x : elRect.left;\n // skip if cursor is outside of popupParent horizontally\n let skipX = (\n (xPosition <= 0 && parentRect.left >= e.clientX) ||\n (parentRect.right <= e.clientX && parentRect.right <= boundaryElRect.right)\n );\n\n if (skipX) { return true; }\n\n if (isLeft) {\n skipX = (\n // skip if we are moving to the left and the cursor\n // is positioned to the right of the left side anchor\n (diff < 0 && e.clientX > xPosition + parentRect.left) ||\n // skip if we are moving to the right and the cursor\n // is positioned to the left of the dialog\n (diff > 0 && e.clientX < xPosition + parentRect.left)\n );\n } else {\n if (anywhereWithin) {\n // if anywhereWithin is true, we allow to move\n // as long as the cursor is within the dialog\n skipX = (\n (diff < 0 && e.clientX > boundaryElRect.right) ||\n (diff > 0 && e.clientX < xPosition + parentRect.left)\n );\n } else {\n skipX = (\n // if the movement is bound to the right side of the dialog\n // we skip if we are moving to the left and the cursor\n // is to the right of the dialog\n (diff < 0 && e.clientX > boundaryElRect.right) ||\n // or skip if we are moving to the right and the cursor\n // is to the left of the right side anchor\n (diff > 0 && e.clientX < boundaryElRect.right)\n );\n }\n }\n\n return skipX;\n }\n\n private shouldSkipY(e: MouseEvent, isTop: boolean, topBuffer: number = 0, diff: number): boolean {\n const elRect = this.element.getBoundingClientRect();\n const parentRect = this.offsetParent.getBoundingClientRect();\n const boundaryElRect = this.boundaryEl!.getBoundingClientRect();\n const yPosition = this.config.popup ? this.position.y : elRect.top;\n\n // skip if cursor is outside of popupParent vertically\n let skipY = (\n (yPosition <= 0 && parentRect.top >= e.clientY) ||\n (parentRect.bottom <= e.clientY && parentRect.bottom <= boundaryElRect.bottom)\n );\n\n if (skipY) { return true; }\n\n if (isTop) {\n skipY = (\n // skip if we are moving to towards top and the cursor is\n // below the top anchor + topBuffer\n // note: topBuffer is used when moving the dialog using the title bar\n (diff < 0 && e.clientY > yPosition + parentRect.top + topBuffer) ||\n // skip if we are moving to the bottom and the cursor is\n // above the top anchor\n (diff > 0 && e.clientY < yPosition + parentRect.top)\n );\n } else {\n skipY = (\n // skip if we are moving towards the top and the cursor\n // is below the bottom anchor\n (diff < 0 && e.clientY > boundaryElRect.bottom) ||\n // skip if we are moving towards the bottom and the cursor\n // is above the bottom anchor\n (diff > 0 && e.clientY < boundaryElRect.bottom)\n );\n }\n\n return skipY;\n }\n\n private createResizeMap() {\n const eGui = this.element;\n\n this.resizerMap = {\n topLeft: { element: eGui.querySelector('[ref=eTopLeftResizer]') as HTMLElement },\n top: { element: eGui.querySelector('[ref=eTopResizer]') as HTMLElement },\n topRight: { element: eGui.querySelector('[ref=eTopRightResizer]') as HTMLElement },\n right: { element: eGui.querySelector('[ref=eRightResizer]') as HTMLElement },\n bottomRight: { element: eGui.querySelector('[ref=eBottomRightResizer]') as HTMLElement },\n bottom: { element: eGui.querySelector('[ref=eBottomResizer]') as HTMLElement },\n bottomLeft: { element: eGui.querySelector('[ref=eBottomLeftResizer]') as HTMLElement },\n left: { element: eGui.querySelector('[ref=eLeftResizer]') as HTMLElement }\n };\n }\n\n private addResizers() {\n if (this.resizersAdded) { return; }\n\n const eGui = this.element;\n\n if (!eGui) { return; }\n\n const parser = new DOMParser();\n const resizers = parser.parseFromString(RESIZE_TEMPLATE, 'text/html').body;\n\n eGui.appendChild(resizers.firstChild!);\n this.createResizeMap();\n this.resizersAdded = true;\n }\n\n private removeResizers() {\n this.resizerMap = undefined;\n const resizerEl = this.element.querySelector(`.${RESIZE_CONTAINER_STYLE}`);\n\n if (resizerEl) {\n this.element.removeChild(resizerEl);\n }\n this.resizersAdded = false;\n }\n\n private getResizerElement(side: ResizableSides): HTMLElement | null {\n return this.resizerMap![side].element;\n }\n\n private onResizeStart(e: MouseEvent, side: ResizableSides) {\n this.boundaryEl = this.findBoundaryElement();\n\n if (!this.positioned) { this.initialisePosition(); }\n\n this.currentResizer = {\n isTop: !!side.match(/top/i),\n isRight: !!side.match(/right/i),\n isBottom: !!side.match(/bottom/i),\n isLeft: !!side.match(/left/i),\n };\n\n this.element.classList.add('ag-resizing');\n this.resizerMap![side].element.classList.add('ag-active');\n\n const { popup, forcePopupParentAsOffsetParent } = this.config;\n\n if (!popup && !forcePopupParentAsOffsetParent) {\n this.applySizeToSiblings(this.currentResizer.isBottom || this.currentResizer.isTop);\n }\n\n this.isResizing = true;\n this.updateDragStartPosition(e.clientX, e.clientY);\n }\n\n private getSiblings(): HTMLElement[] | null {\n const element = this.element;\n const parent = element.parentElement;\n if (!parent) { return null; }\n\n return Array.prototype.slice.call(parent.children).filter((el: HTMLElement) => !el.classList.contains('ag-hidden'));\n }\n\n private getMinSizeOfSiblings(): { height: number, width: number } {\n const siblings = this.getSiblings() || [];\n\n let height = 0;\n let width = 0;\n\n for (let i = 0; i < siblings.length; i++) {\n const currentEl = siblings[i];\n const isFlex = !!currentEl.style.flex && currentEl.style.flex !== '0 0 auto';\n\n if (currentEl === this.element) { continue; }\n\n let nextHeight = this.minHeight || 0;\n let nextWidth = this.minWidth || 0;\n\n if (isFlex) {\n const computedStyle = window.getComputedStyle(currentEl);\n if (computedStyle.minHeight) {\n nextHeight = parseInt(computedStyle.minHeight, 10);\n }\n if (computedStyle.minWidth) {\n nextWidth = parseInt(computedStyle.minWidth, 10);\n }\n } else {\n nextHeight = currentEl.offsetHeight;\n nextWidth = currentEl.offsetWidth;\n }\n\n height += nextHeight;\n width += nextWidth;\n }\n\n return { height, width };\n }\n\n private applySizeToSiblings(vertical: boolean) {\n let containerToFlex: HTMLElement | null = null;\n const siblings = this.getSiblings();\n\n if (!siblings) { return; }\n\n for (let i = 0; i < siblings.length; i++) {\n const el = siblings[i];\n\n if (el === containerToFlex) { continue; }\n\n if (vertical) {\n el.style.height = `${el.offsetHeight}px`;\n } else {\n el.style.width = `${el.offsetWidth}px`;\n }\n el.style.flex = '0 0 auto';\n\n if (el === this.element) {\n containerToFlex = siblings[i + 1];\n }\n }\n\n if (containerToFlex) {\n containerToFlex.style.removeProperty('height');\n containerToFlex.style.removeProperty('min-height');\n containerToFlex.style.removeProperty('max-height');\n containerToFlex.style.flex = '1 1 auto';\n }\n }\n\n private onResize(e: MouseEvent) {\n if (!this.isResizing || !this.currentResizer) { return; }\n\n const { popup, forcePopupParentAsOffsetParent } = this.config;\n const { isTop, isRight, isBottom, isLeft } = this.currentResizer;\n const isHorizontal = isRight || isLeft;\n const isVertical = isBottom || isTop;\n const { movementX, movementY } = this.calculateMouseMovement({ e, isLeft, isTop });\n\n const xPosition = this.position.x;\n const yPosition = this.position.y;\n\n let offsetLeft = 0;\n let offsetTop = 0;\n\n if (isHorizontal && movementX) {\n const direction = isLeft ? -1 : 1;\n const oldWidth = this.getWidth();\n const newWidth = oldWidth! + (movementX * direction);\n let skipWidth = false;\n\n if (isLeft) {\n offsetLeft = oldWidth! - newWidth;\n if (xPosition + offsetLeft <= 0 || newWidth <= this.minWidth) {\n skipWidth = true;\n offsetLeft = 0;\n }\n }\n\n if (!skipWidth) {\n this.setWidth(newWidth);\n }\n }\n\n if (isVertical && movementY) {\n const direction = isTop ? -1 : 1;\n const oldHeight = this.getHeight();\n const newHeight = oldHeight! + (movementY * direction);\n let skipHeight = false;\n\n if (isTop) {\n offsetTop = oldHeight! - newHeight;\n if (yPosition + offsetTop <= 0 || newHeight <= this.minHeight!) {\n skipHeight = true;\n offsetTop = 0;\n }\n } else {\n // do not let the size of all siblings be higher than the parent container\n if (\n !this.config.popup &&\n !this.config.forcePopupParentAsOffsetParent &&\n oldHeight! < newHeight &&\n (this.getMinSizeOfSiblings().height + newHeight) > this.element.parentElement!.offsetHeight\n ) {\n skipHeight = true;\n }\n }\n\n if (!skipHeight) {\n this.setHeight(newHeight);\n }\n }\n\n this.updateDragStartPosition(e.clientX, e.clientY);\n\n if ((popup || forcePopupParentAsOffsetParent) && offsetLeft || offsetTop) {\n this.offsetElement(\n xPosition + offsetLeft,\n yPosition + offsetTop\n );\n }\n }\n\n private onResizeEnd(e: MouseEvent, side: ResizableSides) {\n this.isResizing = false;\n this.currentResizer = null;\n this.boundaryEl = null;\n\n const params = {\n type: 'resize',\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi()\n };\n\n this.element.classList.remove('ag-resizing');\n this.resizerMap![side].element.classList.remove('ag-active');\n\n this.dispatchEvent(params);\n }\n\n private refreshSize() {\n const eGui = this.element;\n\n if (this.config.popup) {\n if (!this.config.width) {\n this.setWidth(eGui.offsetWidth);\n }\n\n if (!this.config.height) {\n this.setHeight(eGui.offsetHeight);\n }\n }\n }\n\n private onMoveStart(e: MouseEvent) {\n this.boundaryEl = this.findBoundaryElement();\n\n if (!this.positioned) { this.initialisePosition(); }\n\n this.isMoving = true;\n\n this.element.classList.add('ag-moving');\n this.updateDragStartPosition(e.clientX, e.clientY);\n }\n\n private onMove(e: MouseEvent) {\n if (!this.isMoving) { return; }\n\n const { x, y } = this.position;\n let topBuffer;\n\n if (this.config.calculateTopBuffer) {\n topBuffer = this.config.calculateTopBuffer();\n }\n\n const { movementX, movementY } = this.calculateMouseMovement({\n e,\n isTop: true,\n anywhereWithin: true,\n topBuffer\n });\n\n this.offsetElement(x + movementX, y + movementY);\n this.updateDragStartPosition(e.clientX, e.clientY);\n }\n\n private onMoveEnd() {\n this.isMoving = false;\n this.boundaryEl = null;\n this.element.classList.remove('ag-moving');\n }\n\n private setOffsetParent() {\n if (this.config.forcePopupParentAsOffsetParent) {\n this.offsetParent = this.popupService.getPopupParent();\n } else {\n this.offsetParent = this.element.offsetParent as HTMLElement;\n }\n }\n\n private findBoundaryElement(): HTMLElement {\n let el = this.element;\n while (el) {\n if (window.getComputedStyle(el).position !== 'static') { return el; }\n el = el.parentElement as HTMLElement;\n }\n\n return this.element;\n }\n\n private clearResizeListeners(): void {\n while (this.resizeListeners.length) {\n const params = this.resizeListeners.pop()!;\n this.dragService.removeDragSource(params);\n }\n }\n\n protected destroy() {\n super.destroy();\n\n if (this.moveElementDragListener) {\n this.dragService.removeDragSource(this.moveElementDragListener);\n }\n\n this.clearResizeListeners();\n this.removeResizers();\n }\n}","import { RowRenderer } from \"./rowRenderer\";\nimport { Column } from \"../entities/column\";\nimport { Autowired, Bean, PostConstruct } from \"../context/context\";\nimport { BeanStub } from \"../context/beanStub\";\nimport { CtrlsService } from \"../ctrlsService\";\nimport { RowContainerCtrl } from \"../gridBodyComp/rowContainer/rowContainerCtrl\";\nimport { RowCssClassCalculator } from \"./row/rowCssClassCalculator\";\nimport { ColumnGroup } from \"../entities/columnGroup\";\n\n@Bean('autoWidthCalculator')\nexport class AutoWidthCalculator extends BeanStub {\n\n @Autowired('rowRenderer') private rowRenderer: RowRenderer;\n @Autowired('ctrlsService') private ctrlsService: CtrlsService;\n @Autowired('rowCssClassCalculator') public rowCssClassCalculator: RowCssClassCalculator;\n\n private centerRowContainerCtrl: RowContainerCtrl;\n\n @PostConstruct\n private postConstruct(): void {\n this.ctrlsService.whenReady(p => {\n this.centerRowContainerCtrl = p.centerRowContainerCtrl;\n });\n }\n\n // this is the trick: we create a dummy container and clone all the cells\n // into the dummy, then check the dummy's width. then destroy the dummy\n // as we don't need it any more.\n // drawback: only the cells visible on the screen are considered\n public getPreferredWidthForColumn(column: Column, skipHeader?: boolean): number {\n const eHeaderCell = this.getHeaderCellForColumn(column);\n // cell isn't visible\n if (!eHeaderCell) { return -1; }\n\n const elements = this.rowRenderer.getAllCellsForColumn(column);\n\n if (!skipHeader) {\n // we only consider the lowest level cell, not the group cell. in 99% of the time, this\n // will be enough. if we consider groups, then it gets too complicated for what it's worth,\n // as the groups can span columns and this class only considers one column at a time.\n elements.push(eHeaderCell);\n }\n\n return this.addElementsToContainerAndGetWidth(elements);\n }\n\n public getPreferredWidthForColumnGroup(columnGroup: ColumnGroup): number {\n const eHeaderCell = this.getHeaderCellForColumn(columnGroup);\n\n if (!eHeaderCell) { return -1; }\n\n return this.addElementsToContainerAndGetWidth([eHeaderCell]);\n }\n\n private addElementsToContainerAndGetWidth(elements: HTMLElement[]): number {\n const eDummyContainer = document.createElement('span');\n // position fixed, so it isn't restricted to the boundaries of the parent\n eDummyContainer.style.position = 'fixed';\n\n // we put the dummy into the body container, so it will inherit all the\n // css styles that the real cells are inheriting\n const eBodyContainer = this.centerRowContainerCtrl.getContainerElement();\n eBodyContainer.appendChild(eDummyContainer);\n\n elements.forEach(el => this.cloneItemIntoDummy(el, eDummyContainer));\n\n // at this point, all the clones are lined up vertically with natural widths. the dummy\n // container will have a width wide enough just to fit the largest.\n const dummyContainerWidth = eDummyContainer.offsetWidth;\n\n // we are finished with the dummy container, so get rid of it\n eBodyContainer.removeChild(eDummyContainer);\n\n // we add padding as I found sometimes the gui still put '...' after some of the texts. so the\n // user can configure the grid to add a few more pixels after the calculated width\n const autoSizePadding = this.gridOptionsWrapper.getAutoSizePadding();\n\n return dummyContainerWidth + autoSizePadding;\n }\n\n /* tslint:disable */\n private getHeaderCellForColumn(column: ColumnGroup): HTMLElement | null;\n private getHeaderCellForColumn(column: Column): HTMLElement | null;\n private getHeaderCellForColumn(column: any): any {\n /* tslint:enable */\n let element: HTMLElement | null = null;\n\n this.ctrlsService.getHeaderRowContainerCtrls().forEach(container => {\n const res = container.getHtmlElementForColumnHeader(column);\n if (res != null) { element = res; }\n }\n );\n\n return element;\n }\n\n private cloneItemIntoDummy(eCell: HTMLElement, eDummyContainer: HTMLElement): void {\n // make a deep clone of the cell\n const eCellClone: HTMLElement = eCell.cloneNode(true) as HTMLElement;\n // the original has a fixed width, we remove this to allow the natural width based on content\n eCellClone.style.width = '';\n // the original has position = absolute, we need to remove this so it's positioned normally\n eCellClone.style.position = 'static';\n eCellClone.style.left = '';\n // we put the cell into a containing div, as otherwise the cells would just line up\n // on the same line, standard flow layout, by putting them into divs, they are laid\n // out one per line\n const eCloneParent = document.createElement('div');\n const eCloneParentClassList = eCloneParent.classList;\n const isHeader = ['ag-header-cell', 'ag-header-group-cell'].some(\n cls => eCellClone.classList.contains(cls)\n );\n\n if (isHeader) {\n eCloneParentClassList.add('ag-header', 'ag-header-row');\n eCloneParent.style.position = 'static';\n } else {\n eCloneParentClassList.add('ag-row');\n }\n\n // find parent using classes (headers have ag-header-cell, rows have ag-row), and copy classes from it.\n // if we didn't do this, things like ag-row-level-2 would be missing if present, which sets indents\n // onto group items.\n let pointer = eCell.parentElement;\n while (pointer) {\n const isRow = ['ag-header-row', 'ag-row'].some(\n cls => pointer!.classList.contains(cls)\n );\n if (isRow) {\n for (let i = 0; i < pointer.classList.length; i++) {\n const item = pointer.classList[i];\n\n // we skip ag-row-position-absolute, as this has structural CSS applied that stops the\n // element from fitting into it's parent, and we need the element to stretch the parent\n // as we are measuring the parents width\n if (item != 'ag-row-position-absolute') {\n eCloneParentClassList.add(item);\n }\n }\n break;\n }\n pointer = pointer.parentElement;\n }\n\n // the twig on the branch, the branch on the tree, the tree in the hole,\n // the hole in the bog, the bog in the clone, the clone in the parent,\n // the parent in the dummy, and the dummy down in the vall-e-ooo, OOOOOOOOO! Oh row the rattling bog....\n eCloneParent.appendChild(eCellClone);\n eDummyContainer.appendChild(eCloneParent);\n }\n}\n","import { GridOptionsWrapper } from \"../gridOptionsWrapper\";\nimport { RowCtrl } from \"./row/rowCtrl\";\nimport { Column } from \"../entities/column\";\nimport { RowNode } from \"../entities/rowNode\";\nimport {\n CellFocusedEvent,\n DisplayedRowsChangedEvent,\n Events,\n FirstDataRenderedEvent,\n ModelUpdatedEvent,\n ViewportChangedEvent\n} from \"../events\";\nimport { Constants } from \"../constants/constants\";\nimport { Autowired, Bean, Optional, PostConstruct, Qualifier } from \"../context/context\";\nimport { ColumnApi } from \"../columns/columnApi\";\nimport { ColumnModel } from \"../columns/columnModel\";\nimport { FocusService } from \"../focusService\";\nimport { CellPosition } from \"../entities/cellPosition\";\nimport { BeanStub } from \"../context/beanStub\";\nimport { PaginationProxy } from \"../pagination/paginationProxy\";\nimport { FlashCellsParams, GetCellRendererInstancesParams, GridApi, RefreshCellsParams } from \"../gridApi\";\nimport { Beans } from \"./beans\";\nimport { RowContainerHeightService } from \"./rowContainerHeightService\";\nimport { ICellRenderer } from \"./cellRenderers/iCellRenderer\";\nimport { ICellEditor } from \"../interfaces/iCellEditor\";\nimport { IRowModel } from \"../interfaces/iRowModel\";\nimport { RowPosition } from \"../entities/rowPosition\";\nimport { PinnedRowModel } from \"../pinnedRowModel/pinnedRowModel\";\nimport { exists, missing } from \"../utils/generic\";\nimport { getAllValuesInObject, iterateObject } from \"../utils/object\";\nimport { createArrayOfNumbers } from \"../utils/number\";\nimport { executeInAWhile } from \"../utils/function\";\nimport { CtrlsService } from \"../ctrlsService\";\nimport { GridBodyCtrl } from \"../gridBodyComp/gridBodyCtrl\";\nimport { CellCtrl } from \"./cell/cellCtrl\";\nimport { removeFromArray } from \"../utils/array\";\n\nexport interface RowCtrlMap {\n [key: string]: RowCtrl;\n}\n\ninterface RowNodeMap {\n [id: string]: RowNode;\n}\n\n@Bean(\"rowRenderer\")\nexport class RowRenderer extends BeanStub {\n\n @Autowired(\"paginationProxy\") private paginationProxy: PaginationProxy;\n @Autowired(\"columnModel\") private columnModel: ColumnModel;\n @Autowired(\"pinnedRowModel\") private pinnedRowModel: PinnedRowModel;\n @Autowired(\"rowModel\") private rowModel: IRowModel;\n @Autowired(\"focusService\") private focusService: FocusService;\n @Autowired(\"columnApi\") private columnApi: ColumnApi;\n @Autowired(\"gridApi\") private gridApi: GridApi;\n @Autowired(\"beans\") private beans: Beans;\n @Autowired(\"rowContainerHeightService\") private rowContainerHeightService: RowContainerHeightService;\n @Optional(\"ctrlsService\") private ctrlsService: CtrlsService;\n\n private gridBodyCtrl: GridBodyCtrl;\n\n private destroyFuncsForColumnListeners: (() => void)[] = [];\n\n private firstRenderedRow: number;\n private lastRenderedRow: number;\n\n // map of row ids to row objects. keeps track of which elements\n // are rendered for which rows in the dom.\n private rowCtrlsByRowIndex: RowCtrlMap = {};\n private zombieRowCtrls: RowCtrlMap = {};\n private cachedRowCtrls: RowCtrlCache;\n private allRowCtrls: RowCtrl[] = [];\n\n private topRowCtrls: RowCtrl[] = [];\n private bottomRowCtrls: RowCtrl[] = [];\n\n private pinningLeft: boolean;\n private pinningRight: boolean;\n\n // we only allow one refresh at a time, otherwise the internal memory structure here\n // will get messed up. this can happen if the user has a cellRenderer, and inside the\n // renderer they call an API method that results in another pass of the refresh,\n // then it will be trying to draw rows in the middle of a refresh.\n private refreshInProgress = false;\n\n private printLayout: boolean;\n private embedFullWidthRows: boolean;\n\n @PostConstruct\n private postConstruct(): void {\n this.ctrlsService.whenReady(() => {\n this.gridBodyCtrl = this.ctrlsService.getGridBodyCtrl();\n this.initialise();\n });\n }\n\n private initialise(): void {\n this.addManagedListener(this.eventService, Events.EVENT_PAGINATION_CHANGED, this.onPageLoaded.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_PINNED_ROW_DATA_CHANGED, this.onPinnedRowDataChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, this.onDisplayedColumnsChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_BODY_SCROLL, this.redrawAfterScroll.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_BODY_HEIGHT_CHANGED, this.redrawAfterScroll.bind(this));\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_DOM_LAYOUT, this.onDomLayoutChanged.bind(this));\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_ROW_CLASS, this.redrawRows.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.onNewColumnsLoaded.bind(this));\n\n this.registerCellEventListeners();\n\n this.initialiseCache();\n this.printLayout = this.gridOptionsWrapper.getDomLayout() === Constants.DOM_LAYOUT_PRINT;\n this.embedFullWidthRows = this.printLayout || this.gridOptionsWrapper.isEmbedFullWidthRows();\n\n this.redrawAfterModelUpdate();\n }\n\n private initialiseCache(): void {\n if (this.gridOptionsWrapper.isKeepDetailRows()) {\n const countProp = this.gridOptionsWrapper.getKeepDetailRowsCount();\n const count = countProp != null ? countProp : 3;\n this.cachedRowCtrls = new RowCtrlCache(count);\n }\n }\n\n public getRowCtrls(): RowCtrl[] {\n return this.allRowCtrls;\n }\n\n private updateAllRowCtrls(): void {\n const liveList = getAllValuesInObject(this.rowCtrlsByRowIndex);\n if (this.gridOptionsWrapper.isEnsureDomOrder()) {\n liveList.sort((a, b) => a.getRowNode().rowIndex - b.getRowNode.rowIndex);\n }\n const zombieList = getAllValuesInObject(this.zombieRowCtrls);\n const cachedList = this.cachedRowCtrls ? this.cachedRowCtrls.getEntries() : [];\n this.allRowCtrls = [...liveList, ...zombieList, ...cachedList];\n }\n\n // in a clean design, each cell would register for each of these events. however when scrolling, all the cells\n // registering and de-registering for events is a performance bottleneck. so we register here once and inform\n // all active cells.\n private registerCellEventListeners(): void {\n this.addManagedListener(this.eventService, Events.EVENT_CELL_FOCUSED, (event: CellFocusedEvent) => {\n this.getAllCellCtrls().forEach(cellCtrl => cellCtrl.onCellFocused(event));\n this.getFullWidthRowCtrls().forEach(rowCtrl => {\n rowCtrl.onFullWidthRowFocused(event);\n });\n });\n\n this.addManagedListener(this.eventService, Events.EVENT_FLASH_CELLS, event => {\n this.getAllCellCtrls().forEach(cellCtrl => cellCtrl.onFlashCells(event));\n });\n\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_HOVER_CHANGED, () => {\n this.getAllCellCtrls().forEach(cellCtrl => cellCtrl.onColumnHover());\n });\n\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, () => {\n this.getAllCellCtrls().forEach(cellCtrl => cellCtrl.onDisplayedColumnsChanged());\n });\n\n // only for printLayout - because we are rendering all the cells in the same row, regardless of pinned state,\n // then changing the width of the containers will impact left position. eg the center cols all have their\n // left position adjusted by the width of the left pinned column, so if the pinned left column width changes,\n // all the center cols need to be shifted to accommodate this. when in normal layout, the pinned cols are\n // in different containers so doesn't impact.\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, () => {\n if (this.printLayout) {\n this.getAllCellCtrls().forEach(cellCtrl => cellCtrl.onLeftChanged());\n }\n });\n\n const rangeSelectionEnabled = this.gridOptionsWrapper.isEnableRangeSelection();\n if (rangeSelectionEnabled) {\n\n this.addManagedListener(this.eventService, Events.EVENT_RANGE_SELECTION_CHANGED, () => {\n this.getAllCellCtrls().forEach(cellCtrl => cellCtrl.onRangeSelectionChanged());\n });\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_MOVED, () => {\n this.getAllCellCtrls().forEach(cellCtrl => cellCtrl.updateRangeBordersIfRangeCount());\n });\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PINNED, () => {\n this.getAllCellCtrls().forEach(cellCtrl => cellCtrl.updateRangeBordersIfRangeCount());\n });\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_VISIBLE, () => {\n this.getAllCellCtrls().forEach(cellCtrl => cellCtrl.updateRangeBordersIfRangeCount());\n });\n\n }\n\n // add listeners to the grid columns\n this.refreshListenersToColumnsForCellComps();\n // if the grid columns change, then refresh the listeners again\n this.addManagedListener(this.eventService, Events.EVENT_GRID_COLUMNS_CHANGED, this.refreshListenersToColumnsForCellComps.bind(this));\n\n this.addDestroyFunc(this.removeGridColumnListeners.bind(this));\n }\n\n // executes all functions in destroyFuncsForColumnListeners and then clears the list\n private removeGridColumnListeners(): void {\n this.destroyFuncsForColumnListeners.forEach(func => func());\n this.destroyFuncsForColumnListeners.length = 0;\n }\n\n // this function adds listeners onto all the grid columns, which are the column that we could have cellComps for.\n // when the grid columns change, we add listeners again. in an ideal design, each CellComp would just register to\n // the column it belongs to on creation, however this was a bottleneck with the number of cells, so do it here\n // once instead.\n private refreshListenersToColumnsForCellComps(): void {\n this.removeGridColumnListeners();\n\n const cols = this.columnModel.getAllGridColumns();\n\n if (!cols) { return; }\n\n cols.forEach(col => {\n const forEachCellWithThisCol = (callback: (cellCtrl: CellCtrl) => void) => {\n this.getAllCellCtrls().forEach(cellCtrl => {\n if (cellCtrl.getColumn() === col) {\n callback(cellCtrl);\n }\n });\n };\n\n const leftChangedListener = () => {\n forEachCellWithThisCol(cellCtrl => cellCtrl.onLeftChanged());\n };\n const widthChangedListener = () => {\n forEachCellWithThisCol(cellCtrl => cellCtrl.onWidthChanged());\n };\n const firstRightPinnedChangedListener = () => {\n forEachCellWithThisCol(cellCtrl => cellCtrl.onFirstRightPinnedChanged());\n };\n const lastLeftPinnedChangedListener = () => {\n forEachCellWithThisCol(cellCtrl => cellCtrl.onLastLeftPinnedChanged());\n };\n\n col.addEventListener(Column.EVENT_LEFT_CHANGED, leftChangedListener);\n col.addEventListener(Column.EVENT_WIDTH_CHANGED, widthChangedListener);\n col.addEventListener(Column.EVENT_FIRST_RIGHT_PINNED_CHANGED, firstRightPinnedChangedListener);\n col.addEventListener(Column.EVENT_LAST_LEFT_PINNED_CHANGED, lastLeftPinnedChangedListener);\n\n this.destroyFuncsForColumnListeners.push(() => {\n col.removeEventListener(Column.EVENT_LEFT_CHANGED, leftChangedListener);\n col.removeEventListener(Column.EVENT_WIDTH_CHANGED, widthChangedListener);\n col.removeEventListener(Column.EVENT_FIRST_RIGHT_PINNED_CHANGED, firstRightPinnedChangedListener);\n col.removeEventListener(Column.EVENT_LAST_LEFT_PINNED_CHANGED, lastLeftPinnedChangedListener);\n });\n });\n\n }\n\n private onDomLayoutChanged(): void {\n const printLayout = this.gridOptionsWrapper.getDomLayout() === Constants.DOM_LAYOUT_PRINT;\n const embedFullWidthRows = printLayout || this.gridOptionsWrapper.isEmbedFullWidthRows();\n\n // if moving towards or away from print layout, means we need to destroy all rows, as rows are not laid\n // out using absolute positioning when doing print layout\n const destroyRows = embedFullWidthRows !== this.embedFullWidthRows || this.printLayout !== printLayout;\n\n this.printLayout = printLayout;\n this.embedFullWidthRows = embedFullWidthRows;\n\n if (destroyRows) {\n this.redrawAfterModelUpdate();\n }\n }\n\n // for row models that have datasources, when we update the datasource, we need to force the rowRenderer\n // to redraw all rows. otherwise the old rows from the old datasource will stay displayed.\n public datasourceChanged(): void {\n this.firstRenderedRow = 0;\n this.lastRenderedRow = -1;\n const rowIndexesToRemove = Object.keys(this.rowCtrlsByRowIndex);\n this.removeRowCtrls(rowIndexesToRemove);\n }\n\n private onPageLoaded(event: ModelUpdatedEvent): void {\n const params: RefreshViewParams = {\n recycleRows: event.keepRenderedRows,\n animate: event.animate,\n newData: event.newData,\n newPage: event.newPage,\n // because this is a model updated event (not pinned rows), we\n // can skip updating the pinned rows. this is needed so that if user\n // is doing transaction updates, the pinned rows are not getting constantly\n // trashed - or editing cells in pinned rows are not refreshed and put into read mode\n onlyBody: true\n };\n this.redrawAfterModelUpdate(params);\n }\n\n public getAllCellsForColumn(column: Column): HTMLElement[] {\n const res: HTMLElement[] = [];\n\n this.getAllRowCtrls().forEach(rowCtrl => {\n const eCell = rowCtrl.getCellElement(column);\n if (eCell) { res.push(eCell); }\n });\n\n return res;\n }\n\n public refreshFloatingRowComps(): void {\n this.refreshFloatingRows(\n this.topRowCtrls,\n this.pinnedRowModel.getPinnedTopRowData()\n );\n\n this.refreshFloatingRows(\n this.bottomRowCtrls,\n this.pinnedRowModel.getPinnedBottomRowData()\n );\n }\n\n public getTopRowCtrls(): RowCtrl[] {\n return this.topRowCtrls;\n }\n\n public getBottomRowCtrls(): RowCtrl[] {\n return this.bottomRowCtrls;\n }\n\n private refreshFloatingRows(rowComps: RowCtrl[], rowNodes: RowNode[]): void {\n rowComps.forEach((row: RowCtrl) => {\n row.destroyFirstPass();\n row.destroySecondPass();\n });\n\n rowComps.length = 0;\n\n if (!rowNodes) { return; }\n\n rowNodes.forEach(rowNode => {\n const rowCtrl = new RowCtrl(\n rowNode,\n this.beans,\n false,\n false,\n this.printLayout\n );\n\n rowComps.push(rowCtrl);\n });\n }\n\n private onPinnedRowDataChanged(): void {\n // recycling rows in order to ensure cell editing is not cancelled\n const params: RefreshViewParams = {\n recycleRows: true\n };\n\n this.redrawAfterModelUpdate(params);\n }\n\n // if the row nodes are not rendered, no index is returned\n private getRenderedIndexesForRowNodes(rowNodes: RowNode[]): string[] {\n const result: string[] = [];\n\n if (missing(rowNodes)) { return result; }\n\n iterateObject(this.rowCtrlsByRowIndex, (index: string, renderedRow: RowCtrl) => {\n const rowNode = renderedRow.getRowNode();\n if (rowNodes.indexOf(rowNode) >= 0) {\n result.push(index);\n }\n });\n\n return result;\n }\n\n public redrawRows(rowNodes?: RowNode[]): void {\n // if no row nodes provided, then refresh everything\n const partialRefresh = rowNodes != null && rowNodes.length > 0;\n\n if (partialRefresh) {\n const indexesToRemove = this.getRenderedIndexesForRowNodes(rowNodes!);\n // remove the rows\n this.removeRowCtrls(indexesToRemove);\n }\n\n // add draw them again\n this.redrawAfterModelUpdate({\n recycleRows: partialRefresh\n });\n }\n\n private getCellToRestoreFocusToAfterRefresh(params: RefreshViewParams): CellPosition | null {\n const focusedCell = params.suppressKeepFocus ? null : this.focusService.getFocusCellToUseAfterRefresh();\n\n if (focusedCell == null) { return null; }\n\n // if the dom is not actually focused on a cell, then we don't try to refocus. the problem this\n // solves is with editing - if the user is editing, eg focus is on a text field, and not on the\n // cell itself, then the cell can be registered as having focus, however it's the text field that\n // has the focus and not the cell div. therefore, when the refresh is finished, the grid will focus\n // the cell, and not the textfield. that means if the user is in a text field, and the grid refreshes,\n // the focus is lost from the text field. we do not want this.\n const eDocument = this.gridOptionsWrapper.getDocument();\n const activeElement = eDocument.activeElement;\n const cellDomData = this.gridOptionsWrapper.getDomData(activeElement, CellCtrl.DOM_DATA_KEY_CELL_CTRL);\n const rowDomData = this.gridOptionsWrapper.getDomData(activeElement, RowCtrl.DOM_DATA_KEY_ROW_CTRL);\n\n const gridElementFocused = cellDomData || rowDomData;\n\n return gridElementFocused ? focusedCell : null;\n }\n\n // gets called from:\n // +) initialisation (in registerGridComp) params = null\n // +) onDomLayoutChanged, params = null\n // +) onPageLoaded, recycleRows, animate, newData, newPage from event, onlyBody=true\n // +) onPinnedRowDataChanged, recycleRows = true\n // +) redrawRows (from Grid API), recycleRows = true/false\n private redrawAfterModelUpdate(params: RefreshViewParams = {}): void {\n this.getLockOnRefresh();\n\n const focusedCell: CellPosition | null = this.getCellToRestoreFocusToAfterRefresh(params);\n\n this.updateContainerHeights();\n this.scrollToTopIfNewData(params);\n\n // never recycle rows when print layout, we draw each row again from scratch. this is because print layout\n // uses normal dom layout to put cells into dom - it doesn't allow reordering rows.\n const recycleRows = !this.printLayout && !!params.recycleRows;\n const animate = params.animate && this.gridOptionsWrapper.isAnimateRows();\n\n // after modelUpdate, row indexes can change, so we clear out the rowsByIndex map,\n // however we can reuse the rows, so we keep them but index by rowNode.id\n const rowsToRecycle = recycleRows ? this.recycleRows() : null;\n if (!recycleRows) {\n this.removeAllRowComps();\n }\n\n const isFocusedCellGettingRecycled = () => {\n if (focusedCell == null || rowsToRecycle == null) { return false; }\n let res = false;\n\n iterateObject(rowsToRecycle, (key: string, rowComp: RowCtrl) => {\n const rowNode = rowComp.getRowNode();\n const rowIndexEqual = rowNode.rowIndex == focusedCell.rowIndex;\n const pinnedEqual = rowNode.rowPinned == focusedCell.rowPinned;\n if (rowIndexEqual && pinnedEqual) {\n res = true;\n }\n });\n\n return res;\n };\n\n const focusedCellRecycled = isFocusedCellGettingRecycled();\n\n this.redraw(rowsToRecycle, animate);\n\n if (!params.onlyBody) {\n this.refreshFloatingRowComps();\n }\n\n this.dispatchDisplayedRowsChanged();\n\n // if we focus a cell that's already focused, then we get an unnecessary 'cellFocused' event fired.\n // this was happening when user clicked 'expand' on a rowGroup, then cellFocused was getting fired twice.\n if (!focusedCellRecycled) {\n this.restoreFocusedCell(focusedCell);\n }\n\n this.releaseLockOnRefresh();\n }\n\n private scrollToTopIfNewData(params: RefreshViewParams): void {\n const scrollToTop = params.newData || params.newPage;\n const suppressScrollToTop = this.gridOptionsWrapper.isSuppressScrollOnNewData();\n\n if (scrollToTop && !suppressScrollToTop) {\n this.gridBodyCtrl.getScrollFeature().scrollToTop();\n }\n }\n\n private updateContainerHeights(): void {\n // when doing print layout, we don't explicitly set height on the containers\n if (this.printLayout) {\n this.rowContainerHeightService.setModelHeight(null);\n return;\n }\n\n let containerHeight = this.paginationProxy.getCurrentPageHeight();\n // we need at least 1 pixel for the horizontal scroll to work. so if there are now rows,\n // we still want the scroll to be present, otherwise there would be no way to scroll the header\n // which might be needed us user wants to access columns\n // on the RHS - and if that was where the filter was that cause no rows to be presented, there\n // is no way to remove the filter.\n if (containerHeight === 0) {\n containerHeight = 1;\n }\n\n this.rowContainerHeightService.setModelHeight(containerHeight);\n }\n\n private getLockOnRefresh(): void {\n if (this.refreshInProgress) {\n throw new Error(\n \"AG Grid: cannot get grid to draw rows when it is in the middle of drawing rows. \" +\n \"Your code probably called a grid API method while the grid was in the render stage. To overcome \" +\n \"this, put the API call into a timeout, e.g. instead of api.redrawRows(), \" +\n \"call setTimeout(function() { api.redrawRows(); }, 0). To see what part of your code \" +\n \"that caused the refresh check this stacktrace.\"\n );\n }\n\n this.refreshInProgress = true;\n }\n\n private releaseLockOnRefresh(): void {\n this.refreshInProgress = false;\n }\n\n public isRefreshInProgress(): boolean {\n return this.refreshInProgress;\n }\n\n // sets the focus to the provided cell, if the cell is provided. this way, the user can call refresh without\n // worry about the focus been lost. this is important when the user is using keyboard navigation to do edits\n // and the cellEditor is calling 'refresh' to get other cells to update (as other cells might depend on the\n // edited cell).\n private restoreFocusedCell(cellPosition: CellPosition | null): void {\n if (cellPosition) {\n this.focusService.setFocusedCell(cellPosition.rowIndex, cellPosition.column, cellPosition.rowPinned, true);\n }\n }\n\n public stopEditing(cancel: boolean = false) {\n this.getAllRowCtrls().forEach(rowCtrl => {\n rowCtrl.stopEditing(cancel);\n });\n }\n\n private onNewColumnsLoaded(): void {\n // we don't want each cellComp to register for events, as would increase rendering time.\n // so for newColumnsLoaded, we register once here (in rowRenderer) and then inform\n // each cell if / when event was fired.\n this.getAllCellCtrls().forEach(cellCtrl => cellCtrl.onNewColumnsLoaded());\n }\n\n public getAllCellCtrls(): CellCtrl[] {\n let res: CellCtrl[] = [];\n this.getAllRowCtrls().forEach(rowCtrl => res = res.concat(rowCtrl.getAllCellCtrls()));\n return res;\n }\n\n private getAllRowCtrls(): RowCtrl[] {\n const res = [...this.topRowCtrls, ...this.bottomRowCtrls];\n Object.keys(this.rowCtrlsByRowIndex).forEach(key => res.push(this.rowCtrlsByRowIndex[key]));\n return res;\n }\n\n public addRenderedRowListener(eventName: string, rowIndex: number, callback: Function): void {\n const rowComp = this.rowCtrlsByRowIndex[rowIndex];\n if (rowComp) {\n rowComp.addEventListener(eventName, callback);\n }\n }\n\n public flashCells(params: FlashCellsParams = {}): void {\n const { flashDelay, fadeDelay } = params;\n this.getCellCtrls(params.rowNodes, params.columns)\n .forEach(cellCtrl => cellCtrl.flashCell({ flashDelay, fadeDelay }));\n }\n\n public refreshCells(params: RefreshCellsParams = {}): void {\n const refreshCellParams = {\n forceRefresh: params.force,\n newData: false,\n suppressFlash: params.suppressFlash\n };\n this.getCellCtrls(params.rowNodes, params.columns)\n .forEach(cellCtrl => {\n if (cellCtrl.refreshShouldDestroy()) {\n const rowCtrl = cellCtrl.getRowCtrl();\n if (rowCtrl) {\n rowCtrl.refreshCell(cellCtrl);\n }\n } else {\n cellCtrl.refreshCell(refreshCellParams);\n }\n });\n this.getFullWidthRowCtrls(params.rowNodes).forEach( fullWidthRowCtrl => {\n fullWidthRowCtrl.refreshFullWidth();\n });\n }\n\n public getCellRendererInstances(params: GetCellRendererInstancesParams): ICellRenderer[] {\n const res = this.getCellCtrls(params.rowNodes, params.columns)\n .map(cellCtrl => cellCtrl.getCellRenderer())\n .filter(renderer => renderer != null) as ICellRenderer[];\n return res;\n }\n\n public getCellEditorInstances(params: GetCellRendererInstancesParams): ICellEditor[] {\n\n const res: ICellEditor[] = [];\n\n this.getCellCtrls(params.rowNodes, params.columns).forEach(cellCtrl => {\n const cellEditor = cellCtrl.getCellEditor() as ICellEditor;\n\n if (cellEditor) {\n res.push(cellEditor);\n }\n });\n\n return res;\n }\n\n public getEditingCells(): CellPosition[] {\n const res: CellPosition[] = [];\n\n this.getAllCellCtrls().forEach(cellCtrl => {\n if (cellCtrl.isEditing()) {\n const cellPosition = cellCtrl.getCellPosition();\n res.push(cellPosition);\n }\n });\n\n return res;\n }\n\n private mapRowNodes(rowNodes?: RowNode[] | null): {top: RowNodeMap, bottom: RowNodeMap, normal: RowNodeMap} | undefined {\n if (!rowNodes) { return; }\n\n const res: {top: RowNodeMap, bottom: RowNodeMap, normal: RowNodeMap} = {\n top: {},\n bottom: {},\n normal: {}\n };\n\n rowNodes.forEach(rowNode => {\n const id = rowNode.id!;\n if (rowNode.rowPinned === Constants.PINNED_TOP) {\n res.top[id] = rowNode;\n } else if (rowNode.rowPinned === Constants.PINNED_BOTTOM) {\n res.bottom[id] = rowNode;\n } else {\n res.normal[id] = rowNode;\n }\n });\n\n return res;\n }\n\n private isRowInMap(rowNode: RowNode, rowIdsMap: {top: RowNodeMap, bottom: RowNodeMap, normal: RowNodeMap}): boolean {\n // skip this row if it is missing from the provided list\n const id = rowNode.id!;\n const floating = rowNode.rowPinned;\n if (floating === Constants.PINNED_BOTTOM) {\n return rowIdsMap.bottom[id]!=null;\n } else if (floating === Constants.PINNED_TOP) {\n return rowIdsMap.top[id]!=null;\n } else {\n return rowIdsMap.normal[id]!=null;\n }\n }\n\n // returns CellCtrl's that match the provided rowNodes and columns. eg if one row node\n // and two columns provided, that identifies 4 cells, so 4 CellCtrl's returned.\n private getCellCtrls(rowNodes?: RowNode[] | null, columns?: (string | Column)[]): CellCtrl[] {\n let rowIdsMap = this.mapRowNodes(rowNodes);\n\n const res: CellCtrl[] = [];\n\n let colIdsMap: any;\n\n if (exists(columns)) {\n colIdsMap = {};\n columns.forEach((colKey: string | Column) => {\n const column: Column | null = this.columnModel.getGridColumn(colKey);\n if (exists(column)) {\n colIdsMap[column.getId()] = true;\n }\n });\n }\n\n const processRow = (rowComp: RowCtrl) => {\n const rowNode: RowNode = rowComp.getRowNode();\n\n // skip this row if it is missing from the provided list\n if (rowIdsMap!=null && !this.isRowInMap(rowNode, rowIdsMap)) { return; }\n\n rowComp.getAllCellCtrls().forEach(cellCtrl => {\n const colId: string = cellCtrl.getColumn().getId();\n const excludeColFromRefresh = colIdsMap && !colIdsMap[colId];\n\n if (excludeColFromRefresh) { return; }\n\n res.push(cellCtrl);\n });\n };\n\n iterateObject(this.rowCtrlsByRowIndex, (index: string, rowComp: RowCtrl) => {\n processRow(rowComp);\n });\n\n if (this.topRowCtrls) {\n this.topRowCtrls.forEach(processRow);\n }\n\n if (this.bottomRowCtrls) {\n this.bottomRowCtrls.forEach(processRow);\n }\n\n return res;\n }\n\n protected destroy(): void {\n this.removeAllRowComps();\n super.destroy();\n }\n\n private removeAllRowComps(): void {\n const rowIndexesToRemove = Object.keys(this.rowCtrlsByRowIndex);\n this.removeRowCtrls(rowIndexesToRemove);\n }\n\n private recycleRows(): RowCtrlMap {\n // remove all stub nodes, they can't be reused, as no rowNode id\n const stubNodeIndexes: string[] = [];\n iterateObject(this.rowCtrlsByRowIndex, (index: string, rowComp: RowCtrl) => {\n const stubNode = rowComp.getRowNode().id == null;\n if (stubNode) {\n stubNodeIndexes.push(index);\n }\n });\n this.removeRowCtrls(stubNodeIndexes);\n\n // then clear out rowCompsByIndex, but before that take a copy, but index by id, not rowIndex\n const nodesByIdMap: RowCtrlMap = {};\n iterateObject(this.rowCtrlsByRowIndex, (index: string, rowComp: RowCtrl) => {\n const rowNode = rowComp.getRowNode();\n nodesByIdMap[rowNode.id!] = rowComp;\n });\n this.rowCtrlsByRowIndex = {};\n\n return nodesByIdMap;\n }\n\n // takes array of row indexes\n private removeRowCtrls(rowsToRemove: any[]) {\n // if no fromIndex then set to -1, which will refresh everything\n // let realFromIndex = -1;\n rowsToRemove.forEach(indexToRemove => {\n const rowCtrl = this.rowCtrlsByRowIndex[indexToRemove];\n if (rowCtrl) {\n rowCtrl.destroyFirstPass();\n rowCtrl.destroySecondPass();\n }\n delete this.rowCtrlsByRowIndex[indexToRemove];\n });\n }\n\n // gets called when rows don't change, but viewport does, so after:\n // 1) height of grid body changes, ie number of displayed rows has changed\n // 2) grid scrolled to new position\n // 3) ensure index visible (which is a scroll)\n public redrawAfterScroll() {\n this.getLockOnRefresh();\n this.redraw(null, false, true);\n this.releaseLockOnRefresh();\n this.dispatchDisplayedRowsChanged();\n }\n\n private removeRowCompsNotToDraw(indexesToDraw: number[]): void {\n // for speedy lookup, dump into map\n const indexesToDrawMap: { [index: string]: boolean; } = {};\n indexesToDraw.forEach(index => (indexesToDrawMap[index] = true));\n\n const existingIndexes = Object.keys(this.rowCtrlsByRowIndex);\n const indexesNotToDraw: string[] = existingIndexes.filter(index => !indexesToDrawMap[index]);\n\n this.removeRowCtrls(indexesNotToDraw);\n }\n\n private calculateIndexesToDraw(rowsToRecycle?: { [key: string]: RowCtrl; } | null): number[] {\n // all in all indexes in the viewport\n const indexesToDraw = createArrayOfNumbers(this.firstRenderedRow, this.lastRenderedRow);\n\n const checkRowToDraw = (indexStr: string, rowComp: RowCtrl) => {\n const index = rowComp.getRowNode().rowIndex;\n if (index == null) { return; }\n if (index < this.firstRenderedRow || index > this.lastRenderedRow) {\n if (this.doNotUnVirtualiseRow(rowComp)) {\n indexesToDraw.push(index);\n }\n }\n };\n\n // if we are redrawing due to scrolling change, then old rows are in this.rowCompsByIndex\n iterateObject(this.rowCtrlsByRowIndex, checkRowToDraw);\n\n // if we are redrawing due to model update, then old rows are in rowsToRecycle\n iterateObject(rowsToRecycle, checkRowToDraw);\n\n indexesToDraw.sort((a: number, b: number) => a - b);\n\n return indexesToDraw;\n }\n\n private redraw(rowsToRecycle?: { [key: string]: RowCtrl; } | null, animate = false, afterScroll = false) {\n this.rowContainerHeightService.updateOffset();\n this.workOutFirstAndLastRowsToRender();\n\n // the row can already exist and be in the following:\n // rowsToRecycle -> if model change, then the index may be different, however row may\n // exist here from previous time (mapped by id).\n // this.rowCompsByIndex -> if just a scroll, then this will contain what is currently in the viewport\n\n // this is all the indexes we want, including those that already exist, so this method\n // will end up going through each index and drawing only if the row doesn't already exist\n const indexesToDraw = this.calculateIndexesToDraw(rowsToRecycle);\n\n this.removeRowCompsNotToDraw(indexesToDraw);\n\n // never animate when doing print layout - as we want to get things ready to print as quickly as possible,\n // otherwise we risk the printer printing a row that's half faded (half way through fading in)\n if (this.printLayout) {\n animate = false;\n }\n\n // add in new rows\n const rowCtrls: RowCtrl[] = [];\n\n indexesToDraw.forEach(rowIndex => {\n const rowCtrl = this.createOrUpdateRowCtrl(rowIndex, rowsToRecycle, animate, afterScroll);\n if (exists(rowCtrl)) {\n rowCtrls.push(rowCtrl);\n }\n });\n\n if (rowsToRecycle) {\n const useAnimationFrame = afterScroll && !this.gridOptionsWrapper.isSuppressAnimationFrame() && !this.printLayout;\n if (useAnimationFrame) {\n this.beans.animationFrameService.addDestroyTask(() => {\n this.destroyRowCtrls(rowsToRecycle, animate);\n this.updateAllRowCtrls();\n this.dispatchDisplayedRowsChanged();\n });\n } else {\n this.destroyRowCtrls(rowsToRecycle, animate);\n }\n }\n\n this.updateAllRowCtrls();\n this.gridBodyCtrl.updateRowCount();\n }\n\n private dispatchDisplayedRowsChanged(): void {\n const event: DisplayedRowsChangedEvent = {type: Events.EVENT_DISPLAYED_ROWS_CHANGED};\n this.eventService.dispatchEvent(event);\n }\n\n private onDisplayedColumnsChanged(): void {\n const pinningLeft = this.columnModel.isPinningLeft();\n const pinningRight = this.columnModel.isPinningRight();\n const atLeastOneChanged = this.pinningLeft !== pinningLeft || pinningRight !== this.pinningRight;\n\n if (atLeastOneChanged) {\n this.pinningLeft = pinningLeft;\n this.pinningRight = pinningRight;\n\n if (this.embedFullWidthRows) {\n this.redrawFullWidthEmbeddedRows();\n }\n }\n }\n\n // when embedding, what gets showed in each section depends on what is pinned. eg if embedding group expand / collapse,\n // then it should go into the pinned left area if pinning left, or the center area if not pinning.\n private redrawFullWidthEmbeddedRows(): void {\n // if either of the pinned panels has shown / hidden, then need to redraw the fullWidth bits when\n // embedded, as what appears in each section depends on whether we are pinned or not\n const rowsToRemove: string[] = [];\n\n this.getFullWidthRowCtrls().forEach(fullWidthCtrl => {\n const rowIndex = fullWidthCtrl.getRowNode().rowIndex;\n rowsToRemove.push(rowIndex!.toString());\n });\n\n this.refreshFloatingRowComps();\n this.removeRowCtrls(rowsToRemove);\n this.redrawAfterScroll();\n }\n\n public getFullWidthRowCtrls(rowNodes?: RowNode[]): RowCtrl[] {\n const rowNodesMap = this.mapRowNodes(rowNodes);\n return getAllValuesInObject(this.rowCtrlsByRowIndex).filter( (rowCtrl: RowCtrl) => {\n // include just full width\n if (!rowCtrl.isFullWidth()) { return false; }\n\n // if Row Nodes provided, we exclude where Row Node is missing\n const rowNode = rowCtrl.getRowNode();\n if (rowNodesMap!=null && !this.isRowInMap(rowNode, rowNodesMap)) { return false; }\n\n return true;\n });\n }\n\n public refreshFullWidthRows(rowNodesToRefresh?: RowNode[]): void {\n const rowsToRemove: string[] = [];\n\n const selectivelyRefreshing = !!rowNodesToRefresh;\n const idsToRefresh: { [id: string]: boolean; } | undefined = selectivelyRefreshing ? {} : undefined;\n\n if (selectivelyRefreshing && idsToRefresh) {\n rowNodesToRefresh!.forEach(r => idsToRefresh[r.id!] = true);\n }\n\n this.getFullWidthRowCtrls().forEach(fullWidthRowCtrl => {\n const rowNode = fullWidthRowCtrl.getRowNode();\n\n if (selectivelyRefreshing && idsToRefresh) {\n // we refresh if a) this node is present or b) this parents nodes is present. checking parent\n // node is important for master/detail, as we want detail to refresh on changes to parent node.\n // it's also possible, if user is provider their own fullWidth, that details panels contain\n // some info on the parent, eg if in tree data and child row shows some data from parent row also.\n const parentId = (rowNode.level > 0 && rowNode.parent) ? rowNode.parent.id : undefined;\n const skipThisNode = !idsToRefresh[rowNode.id!] && !idsToRefresh[parentId!];\n if (skipThisNode) { return; }\n }\n\n const fullWidthRowsRefreshed = fullWidthRowCtrl.refreshFullWidth();\n if (!fullWidthRowsRefreshed) {\n const rowIndex = fullWidthRowCtrl.getRowNode().rowIndex;\n\n rowsToRemove.push(rowIndex!.toString());\n }\n });\n\n this.removeRowCtrls(rowsToRemove);\n this.redrawAfterScroll();\n }\n\n private createOrUpdateRowCtrl(\n rowIndex: number,\n rowsToRecycle: { [key: string]: RowCtrl | null; } | null | undefined,\n animate: boolean,\n afterScroll: boolean\n ): RowCtrl | null | undefined {\n let rowNode: RowNode | undefined;\n let rowCtrl: RowCtrl | null = this.rowCtrlsByRowIndex[rowIndex];\n\n // if no row comp, see if we can get it from the previous rowComps\n if (!rowCtrl) {\n rowNode = this.paginationProxy.getRow(rowIndex);\n if (exists(rowNode) && exists(rowsToRecycle) && rowsToRecycle[rowNode.id!] && rowNode.alreadyRendered) {\n rowCtrl = rowsToRecycle[rowNode.id!];\n rowsToRecycle[rowNode.id!] = null;\n }\n }\n\n const creatingNewRowCtrl = !rowCtrl;\n\n if (creatingNewRowCtrl) {\n // create a new one\n if (!rowNode) {\n rowNode = this.paginationProxy.getRow(rowIndex);\n }\n\n if (exists(rowNode)) {\n rowCtrl = this.createRowCon(rowNode, animate, afterScroll);\n } else {\n // this should never happen - if somehow we are trying to create\n // a row for a rowNode that does not exist.\n return;\n }\n }\n\n if (rowNode) {\n // set node as 'alreadyRendered' to ensure we only recycle rowComps that have been rendered, this ensures\n // we don't reuse rowComps that have been removed and then re-added in the same batch transaction.\n rowNode.alreadyRendered = true;\n }\n\n this.rowCtrlsByRowIndex[rowIndex] = rowCtrl!;\n\n return rowCtrl;\n }\n\n private destroyRowCtrls(rowCtrlsMap: RowCtrlMap | null | undefined, animate: boolean): void {\n const executeInAWhileFuncs: (() => void)[] = [];\n iterateObject(rowCtrlsMap, (nodeId: string, rowCtrl: RowCtrl) => {\n // if row was used, then it's null\n if (!rowCtrl) { return; }\n\n if (this.cachedRowCtrls && rowCtrl.isCacheable()) {\n this.cachedRowCtrls.addRow(rowCtrl);\n return;\n }\n\n rowCtrl.destroyFirstPass();\n if (animate) {\n this.zombieRowCtrls[rowCtrl.getInstanceId()] = rowCtrl;\n executeInAWhileFuncs.push(() => {\n rowCtrl.destroySecondPass();\n delete this.zombieRowCtrls[rowCtrl.getInstanceId()];\n });\n } else {\n rowCtrl.destroySecondPass();\n }\n });\n if (animate) {\n // this ensures we fire displayedRowsChanged AFTER all the 'executeInAWhileFuncs' get\n // executed, as we added it to the end of the list.\n executeInAWhileFuncs.push(() => {\n this.updateAllRowCtrls();\n this.dispatchDisplayedRowsChanged();\n });\n executeInAWhile(executeInAWhileFuncs);\n }\n }\n\n private workOutFirstAndLastRowsToRender(): void {\n let newFirst: number;\n let newLast: number;\n\n if (!this.paginationProxy.isRowsToRender()) {\n newFirst = 0;\n newLast = -1; // setting to -1 means nothing in range\n } else if (this.printLayout) {\n newFirst = this.paginationProxy.getPageFirstRow();\n newLast = this.paginationProxy.getPageLastRow();\n } else {\n const bufferPixels = this.gridOptionsWrapper.getRowBufferInPixels();\n const gridBodyCtrl = this.ctrlsService.getGridBodyCtrl();\n const suppressRowVirtualisation = this.gridOptionsWrapper.isSuppressRowVirtualisation();\n\n let rowHeightsChanged = false;\n let firstPixel: number;\n let lastPixel: number;\n do {\n const paginationOffset = this.paginationProxy.getPixelOffset();\n const {pageFirstPixel, pageLastPixel} = this.paginationProxy.getCurrentPagePixelRange();\n const divStretchOffset = this.rowContainerHeightService.getDivStretchOffset();\n\n if (suppressRowVirtualisation) {\n firstPixel = pageFirstPixel + divStretchOffset;\n lastPixel = pageLastPixel + divStretchOffset; \n } else {\n const bodyVRange = gridBodyCtrl.getScrollFeature().getVScrollPosition();\n const bodyTopPixel = bodyVRange.top;\n const bodyBottomPixel = bodyVRange.bottom;\n\n firstPixel = Math.max(bodyTopPixel + paginationOffset - bufferPixels, pageFirstPixel) + divStretchOffset;\n lastPixel = Math.min(bodyBottomPixel + paginationOffset + bufferPixels, pageLastPixel) + divStretchOffset; \n }\n\n // if the rows we are about to display get their heights changed, then that upsets the calcs from above.\n rowHeightsChanged = this.ensureAllRowsInRangeHaveHeightsCalculated(firstPixel, lastPixel);\n\n } while (rowHeightsChanged);\n\n let firstRowIndex = this.paginationProxy.getRowIndexAtPixel(firstPixel);\n let lastRowIndex = this.paginationProxy.getRowIndexAtPixel(lastPixel);\n\n const pageFirstRow = this.paginationProxy.getPageFirstRow();\n const pageLastRow = this.paginationProxy.getPageLastRow();\n\n // adjust, in case buffer extended actual size\n if (firstRowIndex < pageFirstRow) {\n firstRowIndex = pageFirstRow;\n }\n\n if (lastRowIndex > pageLastRow) {\n lastRowIndex = pageLastRow;\n }\n\n newFirst = firstRowIndex;\n newLast = lastRowIndex;\n }\n\n // sometimes user doesn't set CSS right and ends up with grid with no height and grid ends up\n // trying to render all the rows, eg 10,000+ rows. this will kill the browser. so instead of\n // killing the browser, we limit the number of rows. just in case some use case we didn't think\n // of, we also have a property to not do this operation.\n const rowLayoutNormal = this.gridOptionsWrapper.getDomLayout() === Constants.DOM_LAYOUT_NORMAL;\n const suppressRowCountRestriction = this.gridOptionsWrapper.isSuppressMaxRenderedRowRestriction();\n const rowBufferMaxSize = Math.max(this.gridOptionsWrapper.getRowBuffer(), 500);\n\n if (rowLayoutNormal && !suppressRowCountRestriction) {\n if (newLast - newFirst > rowBufferMaxSize) {\n newLast = newFirst + rowBufferMaxSize;\n }\n }\n\n const firstDiffers = newFirst !== this.firstRenderedRow;\n const lastDiffers = newLast !== this.lastRenderedRow;\n\n if (firstDiffers || lastDiffers) {\n this.firstRenderedRow = newFirst;\n this.lastRenderedRow = newLast;\n\n const event: ViewportChangedEvent = {\n type: Events.EVENT_VIEWPORT_CHANGED,\n firstRow: newFirst,\n lastRow: newLast,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n\n this.eventService.dispatchEvent(event);\n }\n\n // only dispatch firstDataRendered if we have actually rendered some data\n if (this.paginationProxy.isRowsToRender()) {\n const event: FirstDataRenderedEvent = {\n type: Events.EVENT_FIRST_DATA_RENDERED,\n firstRow: newFirst,\n lastRow: newLast,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n\n // added a small delay here because in some scenarios this can be fired\n // before the grid is actually rendered, causing component creation\n // on EVENT_FIRST_DATA_RENDERED to fail.\n window.setTimeout(() => this.eventService.dispatchEventOnce(event), 50);\n }\n }\n\n private ensureAllRowsInRangeHaveHeightsCalculated(topPixel: number, bottomPixel: number): boolean {\n // ensureRowHeightsVisible only works with CSRM, as it's the only row model that allows lazy row height calcs.\n // all the other row models just hard code so the method just returns back false\n const res = this.paginationProxy.ensureRowHeightsValid(topPixel, bottomPixel, -1, -1);\n\n if (res) {\n this.updateContainerHeights();\n }\n\n return res;\n }\n\n public getFirstVirtualRenderedRow() {\n return this.firstRenderedRow;\n }\n\n public getLastVirtualRenderedRow() {\n return this.lastRenderedRow;\n }\n\n // check that none of the rows to remove are editing or focused as:\n // a) if editing, we want to keep them, otherwise the user will loose the context of the edit,\n // eg user starts editing, enters some text, then scrolls down and then up, next time row rendered\n // the edit is reset - so we want to keep it rendered.\n // b) if focused, we want ot keep keyboard focus, so if user ctrl+c, it goes to clipboard,\n // otherwise the user can range select and drag (with focus cell going out of the viewport)\n // and then ctrl+c, nothing will happen if cell is removed from dom.\n // c) if detail record of master detail, as users complained that the context of detail rows\n // was getting lost when detail row out of view. eg user expands to show detail row,\n // then manipulates the detail panel (eg sorts the detail grid), then context is lost\n // after detail panel is scrolled out of / into view.\n private doNotUnVirtualiseRow(rowComp: RowCtrl): boolean {\n const REMOVE_ROW: boolean = false;\n const KEEP_ROW: boolean = true;\n const rowNode = rowComp.getRowNode();\n\n const rowHasFocus = this.focusService.isRowNodeFocused(rowNode);\n const rowIsEditing = rowComp.isEditing();\n const rowIsDetail = rowNode.detail;\n\n const mightWantToKeepRow = rowHasFocus || rowIsEditing || rowIsDetail;\n\n // if we deffo don't want to keep it,\n if (!mightWantToKeepRow) {\n return REMOVE_ROW;\n }\n\n // editing row, only remove if it is no longer rendered, eg filtered out or new data set.\n // the reason we want to keep is if user is scrolling up and down, we don't want to loose\n // the context of the editing in process.\n const rowNodePresent = this.paginationProxy.isRowPresent(rowNode);\n return rowNodePresent ? KEEP_ROW : REMOVE_ROW;\n }\n\n private createRowCon(rowNode: RowNode, animate: boolean, afterScroll: boolean): RowCtrl {\n\n const rowCtrlFromCache = this.cachedRowCtrls ? this.cachedRowCtrls.getRow(rowNode) : null;\n if (rowCtrlFromCache) { return rowCtrlFromCache; }\n\n // we don't use animations frames for printing, so the user can put the grid into print mode\n // and immediately print - otherwise the user would have to wait for the rows to draw in the background\n // (via the animation frames) which is awkward to do from code.\n\n // we only do the animation frames after scrolling, as this is where we want the smooth user experience.\n // having animation frames for other times makes the grid look 'jumpy'.\n\n const suppressAnimationFrame = this.gridOptionsWrapper.isSuppressAnimationFrame();\n const useAnimationFrameForCreate = afterScroll && !suppressAnimationFrame && !this.printLayout;\n\n const res = new RowCtrl(\n rowNode,\n this.beans,\n animate,\n useAnimationFrameForCreate,\n this.printLayout\n );\n\n return res;\n }\n\n public getRenderedNodes() {\n const renderedRows = this.rowCtrlsByRowIndex;\n\n return Object.keys(renderedRows).map(key => renderedRows[key]!.getRowNode());\n }\n\n public getRowByPosition(rowPosition: RowPosition): RowCtrl | null {\n let rowComponent: RowCtrl | null;\n switch (rowPosition.rowPinned) {\n case Constants.PINNED_TOP:\n rowComponent = this.topRowCtrls[rowPosition.rowIndex];\n break;\n case Constants.PINNED_BOTTOM:\n rowComponent = this.bottomRowCtrls[rowPosition.rowIndex];\n break;\n default:\n rowComponent = this.rowCtrlsByRowIndex[rowPosition.rowIndex];\n break;\n }\n\n return rowComponent;\n }\n\n public getRowNode(gridRow: RowPosition): RowNode | undefined {\n switch (gridRow.rowPinned) {\n case Constants.PINNED_TOP:\n return this.pinnedRowModel.getPinnedTopRowData()[gridRow.rowIndex];\n case Constants.PINNED_BOTTOM:\n return this.pinnedRowModel.getPinnedBottomRowData()[gridRow.rowIndex];\n default:\n return this.rowModel.getRow(gridRow.rowIndex);\n }\n }\n\n // returns true if any row between startIndex and endIndex is rendered. used by\n // SSRM or IRM, as they don't want to purge visible blocks from cache.\n public isRangeInRenderedViewport(startIndex: number, endIndex: number): boolean {\n\n // parent closed means the parent node is not expanded, thus these blocks are not visible\n const parentClosed = startIndex == null || endIndex == null;\n if (parentClosed) { return false; }\n\n const blockAfterViewport = startIndex > this.lastRenderedRow;\n const blockBeforeViewport = endIndex < this.firstRenderedRow;\n const blockInsideViewport = !blockBeforeViewport && !blockAfterViewport;\n\n return blockInsideViewport;\n }\n}\n\nclass RowCtrlCache {\n\n // map for fast access\n private entriesMap: RowCtrlMap = {};\n\n // list for keeping order\n private entriesList: RowCtrl[] = [];\n\n private readonly maxCount: number;\n\n constructor(maxCount: number) {\n this.maxCount = maxCount;\n }\n\n public addRow(rowCtrl: RowCtrl): void {\n this.entriesMap[rowCtrl.getRowNode().id!] = rowCtrl;\n this.entriesList.push(rowCtrl);\n rowCtrl.setCached(true);\n\n if (this.entriesList.length > this.maxCount) {\n const rowCtrlToDestroy = this.entriesList[0];\n rowCtrlToDestroy.destroyFirstPass();\n rowCtrlToDestroy.destroySecondPass();\n this.removeFromCache(rowCtrlToDestroy);\n }\n }\n\n public getRow(rowNode: RowNode): RowCtrl | null {\n if (rowNode == null || rowNode.id == null) { return null; }\n\n const res = this.entriesMap[rowNode.id];\n\n if (!res) { return null; }\n\n this.removeFromCache(res);\n res.setCached(false);\n\n // this can happen if user reloads data, and a new RowNode is reusing\n // the same ID as the old one\n const rowNodeMismatch = res.getRowNode() != rowNode;\n\n return rowNodeMismatch ? null : res;\n }\n\n private removeFromCache(rowCtrl: RowCtrl): void {\n const rowNodeId = rowCtrl.getRowNode().id!;\n delete this.entriesMap[rowNodeId];\n removeFromArray(this.entriesList, rowCtrl);\n }\n\n public getEntries(): RowCtrl[] {\n return this.entriesList;\n }\n}\n\nexport interface RefreshViewParams {\n recycleRows?: boolean;\n animate?: boolean;\n suppressKeepFocus?: boolean;\n onlyBody?: boolean;\n // when new data, grid scrolls back to top\n newData?: boolean;\n newPage?: boolean;\n}\n","import { Bean, Autowired } from '../context/context';\nimport { Column } from '../entities/column';\nimport { RowNode } from '../entities/rowNode';\nimport { ExpressionService } from '../valueService/expressionService';\nimport { ValueFormatterParams } from '../entities/colDef';\nimport { BeanStub } from \"../context/beanStub\";\n\n@Bean('valueFormatterService')\nexport class ValueFormatterService extends BeanStub {\n\n @Autowired('expressionService') private expressionService: ExpressionService;\n\n public formatValue(\n column: Column,\n node: RowNode | null,\n value: any,\n suppliedFormatter?: (value: any) => string,\n useFormatterFromColumn = true\n ): string | null {\n let result: string | null = null;\n let formatter: ((value: any) => string) | string | undefined;\n\n const colDef = column.getColDef();\n\n if (suppliedFormatter) {\n // use supplied formatter if provided, e.g. set filter items can have their own value formatters\n formatter = suppliedFormatter;\n } else if (useFormatterFromColumn) {\n // if row is pinned, give preference to the pinned formatter\n formatter = node && node.rowPinned && colDef.pinnedRowValueFormatter ?\n colDef.pinnedRowValueFormatter : colDef.valueFormatter;\n }\n\n if (formatter) {\n const params: ValueFormatterParams = {\n value,\n node,\n data: node ? node.data : null,\n colDef,\n column,\n api: this.gridOptionsWrapper.getApi()!,\n columnApi: this.gridOptionsWrapper.getColumnApi()!,\n context: this.gridOptionsWrapper.getContext()\n };\n\n result = this.expressionService.evaluate(formatter, params);\n } else if (colDef.refData) {\n return colDef.refData[value] || '';\n }\n\n // if we don't do this, then arrays get displayed as 1,2,3, but we want 1, 2, 3 (i.e. with spaces)\n if (result == null && Array.isArray(value)) {\n result = value.join(', ');\n }\n\n return result;\n }\n}\n","import { RowNode } from \"../entities/rowNode\";\nimport { Autowired, Bean, PostConstruct } from \"../context/context\";\nimport { Events, PinnedRowDataChangedEvent } from \"../events\";\nimport { Constants } from \"../constants/constants\";\nimport { ColumnApi } from \"../columns/columnApi\";\nimport { GridApi } from \"../gridApi\";\nimport { BeanStub } from \"../context/beanStub\";\nimport { missingOrEmpty } from \"../utils/generic\";\nimport { last } from \"../utils/array\";\nimport { Beans } from \"../rendering/beans\";\n\n@Bean('pinnedRowModel')\nexport class PinnedRowModel extends BeanStub {\n\n @Autowired('columnApi') private columnApi: ColumnApi;\n @Autowired('gridApi') private gridApi: GridApi;\n @Autowired('beans') private beans: Beans;\n\n private pinnedTopRows: RowNode[];\n private pinnedBottomRows: RowNode[];\n\n @PostConstruct\n public init(): void {\n this.setPinnedTopRowData(this.gridOptionsWrapper.getPinnedTopRowData());\n this.setPinnedBottomRowData(this.gridOptionsWrapper.getPinnedBottomRowData());\n }\n\n public isEmpty(floating: string): boolean {\n const rows = floating === Constants.PINNED_TOP ? this.pinnedTopRows : this.pinnedBottomRows;\n return missingOrEmpty(rows);\n }\n\n public isRowsToRender(floating: string): boolean {\n return !this.isEmpty(floating);\n }\n\n public getRowAtPixel(pixel: number, floating: string): number {\n const rows = floating === Constants.PINNED_TOP ? this.pinnedTopRows : this.pinnedBottomRows;\n if (missingOrEmpty(rows)) {\n return 0; // this should never happen, just in case, 0 is graceful failure\n }\n for (let i = 0; i < rows.length; i++) {\n const rowNode = rows[i];\n const rowTopPixel = rowNode.rowTop! + rowNode.rowHeight! - 1;\n // only need to range check against the top pixel, as we are going through the list\n // in order, first row to hit the pixel wins\n if (rowTopPixel >= pixel) {\n return i;\n }\n }\n return rows.length - 1;\n }\n\n public setPinnedTopRowData(rowData: any[] | undefined): void {\n this.pinnedTopRows = this.createNodesFromData(rowData, true);\n const event: PinnedRowDataChangedEvent = {\n type: Events.EVENT_PINNED_ROW_DATA_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event);\n }\n\n public setPinnedBottomRowData(rowData: any[] | undefined): void {\n this.pinnedBottomRows = this.createNodesFromData(rowData, false);\n const event: PinnedRowDataChangedEvent = {\n type: Events.EVENT_PINNED_ROW_DATA_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event);\n }\n\n private createNodesFromData(allData: any[] | undefined, isTop: boolean): RowNode[] {\n const rowNodes: RowNode[] = [];\n if (allData) {\n let nextRowTop = 0;\n allData.forEach((dataItem: any, index: number) => {\n const rowNode = new RowNode(this.beans);\n rowNode.data = dataItem;\n\n const idPrefix = isTop ? RowNode.ID_PREFIX_TOP_PINNED : RowNode.ID_PREFIX_BOTTOM_PINNED;\n rowNode.id = idPrefix + index;\n\n rowNode.rowPinned = isTop ? Constants.PINNED_TOP : Constants.PINNED_BOTTOM;\n rowNode.setRowTop(nextRowTop);\n rowNode.setRowHeight(this.gridOptionsWrapper.getRowHeightForNode(rowNode).height);\n rowNode.setRowIndex(index);\n nextRowTop += rowNode.rowHeight!;\n rowNodes.push(rowNode);\n });\n }\n return rowNodes;\n }\n\n public getPinnedTopRowData(): RowNode[] {\n return this.pinnedTopRows;\n }\n\n public getPinnedBottomRowData(): RowNode[] {\n return this.pinnedBottomRows;\n }\n\n public getPinnedTopTotalHeight(): number {\n return this.getTotalHeight(this.pinnedTopRows);\n }\n\n public getPinnedTopRowCount(): number {\n return this.pinnedTopRows ? this.pinnedTopRows.length : 0;\n }\n\n public getPinnedBottomRowCount(): number {\n return this.pinnedBottomRows ? this.pinnedBottomRows.length : 0;\n }\n\n public getPinnedTopRow(index: number): RowNode | undefined {\n return this.pinnedTopRows[index];\n }\n\n public getPinnedBottomRow(index: number): RowNode | undefined {\n return this.pinnedBottomRows[index];\n }\n\n public forEachPinnedTopRow(callback: (rowNode: RowNode, index: number) => void): void {\n if (missingOrEmpty(this.pinnedTopRows)) {\n return;\n }\n this.pinnedTopRows.forEach(callback);\n }\n\n public forEachPinnedBottomRow(callback: (rowNode: RowNode, index: number) => void): void {\n if (missingOrEmpty(this.pinnedBottomRows)) {\n return;\n }\n this.pinnedBottomRows.forEach(callback);\n }\n\n public getPinnedBottomTotalHeight(): number {\n return this.getTotalHeight(this.pinnedBottomRows);\n }\n\n private getTotalHeight(rowNodes: RowNode[]): number {\n if (!rowNodes || rowNodes.length === 0) { return 0; }\n\n const lastNode = last(rowNodes);\n return lastNode.rowTop! + lastNode.rowHeight!;\n }\n\n}\n","import { RowNode } from \"../entities/rowNode\";\nimport { Column } from \"../entities/column\";\n\n// the class below contains a tree of row nodes. each node is\n// represented by a PathItem\ninterface PathItem {\n rowNode: RowNode; // the node this item points to\n children: PathItem[] | null; // children of this node - will be a subset of all the nodes children\n}\n\n// when doing transactions, or change detection, and grouping is present\n// in the data, there is no need for the ClientSideRowModel to update each\n// group after an update, ony parts that were impacted by the change.\n// this class keeps track of all groups that were impacted by a transaction.\n// the the different CSRM operations (filter, sort etc) use the forEach method\n// to visit each group that was changed.\nexport class ChangedPath {\n\n // we keep columns when doing changed detection after user edits.\n // when a user edits, we only need to re-aggregate the column\n // that was edited.\n private readonly keepingColumns: boolean;\n\n // the root path always points to RootNode, and RootNode\n // is always in the changed path. over time, we add items to\n // the path, but this stays as the root. when the changed path\n // is ready, this will be the root of the tree of RowNodes that\n // need to be refreshed (all the row nodes that were impacted by\n // the transaction).\n private readonly pathRoot: PathItem;\n\n // whether changed path is active of not. it is active when a) doing\n // a transaction update or b) doing change detection. if we are doing\n // a CSRM refresh for other reasons (after sort or filter, or user calling\n // setRowData() without delta mode) then we are not active. we are also\n // marked as not active if secondary columns change in pivot (as this impacts\n // aggregations)\n private active = true;\n\n // for each node in the change path, we also store which columns need\n // to be re-aggregated.\n private nodeIdsToColumns: {[nodeId:string]: {[colId:string]:boolean}} = {};\n\n // for quick lookup, all items in the change path are mapped by nodeId\n private mapToItems: {[id: string]: PathItem} = {};\n\n public constructor(keepingColumns: boolean, rootNode: RowNode) {\n this.keepingColumns = keepingColumns;\n\n this.pathRoot = {\n rowNode: rootNode,\n children: null\n };\n this.mapToItems[rootNode.id!] = this.pathRoot;\n }\n\n // can be set inactive by:\n // a) ClientSideRowModel, if no transactions or\n // b) PivotService, if secondary columns changed\n public setInactive(): void {\n this.active = false;\n }\n\n public isActive(): boolean {\n return this.active;\n }\n\n private depthFirstSearchChangedPath(pathItem: PathItem, callback: (rowNode: RowNode) => void): void {\n if (pathItem.children) {\n for (let i = 0; i < pathItem.children.length; i++) {\n this.depthFirstSearchChangedPath(pathItem.children[i], callback);\n }\n }\n callback(pathItem.rowNode);\n }\n\n private depthFirstSearchEverything(rowNode: RowNode, callback: (rowNode: RowNode) => void, traverseEverything: boolean): void {\n if (rowNode.childrenAfterGroup) {\n for (let i = 0; i < rowNode.childrenAfterGroup.length; i++) {\n const childNode = rowNode.childrenAfterGroup[i];\n if (childNode.childrenAfterGroup) {\n this.depthFirstSearchEverything(rowNode.childrenAfterGroup[i], callback, traverseEverything);\n } else if (traverseEverything) {\n callback(childNode);\n }\n }\n }\n callback(rowNode);\n }\n\n // traverseLeafNodes -> used when NOT doing changed path, ie traversing everything. the callback\n // will be called for child nodes in addition to parent nodes.\n public forEachChangedNodeDepthFirst(\n callback: (rowNode: RowNode) => void,\n traverseLeafNodes = false,\n ): void {\n if (this.active) {\n // if we are active, then use the change path to callback\n // only for updated groups\n this.depthFirstSearchChangedPath(this.pathRoot, callback);\n } else {\n // we are not active, so callback for everything, walk the entire path\n this.depthFirstSearchEverything(this.pathRoot.rowNode, callback, traverseLeafNodes);\n }\n }\n\n public executeFromRootNode(callback: (rowNode: RowNode) => void) {\n callback(this.pathRoot.rowNode);\n }\n\n private createPathItems(rowNode: RowNode): number {\n let pointer = rowNode;\n let newEntryCount = 0;\n while (!this.mapToItems[pointer.id!]) {\n const newEntry: PathItem = {\n rowNode: pointer,\n children: null\n };\n this.mapToItems[pointer.id!] = newEntry;\n newEntryCount++;\n pointer = pointer.parent!;\n }\n return newEntryCount;\n }\n\n private populateColumnsMap(rowNode: RowNode, columns: Column[]): void {\n if (!this.keepingColumns || !columns) { return; }\n\n let pointer = rowNode;\n while (pointer) {\n // if columns, add the columns in all the way to parent, merging\n // in any other columns that might be there already\n if (!this.nodeIdsToColumns[pointer.id!]) {\n this.nodeIdsToColumns[pointer.id!] = {};\n }\n columns.forEach(col => this.nodeIdsToColumns[pointer.id!][col.getId()] = true);\n pointer = pointer.parent!;\n }\n }\n\n private linkPathItems(rowNode: RowNode, newEntryCount: number): void {\n let pointer = rowNode;\n for (let i = 0; i < newEntryCount; i++) {\n const thisItem = this.mapToItems[pointer.id!];\n const parentItem = this.mapToItems[pointer.parent!.id!];\n if (!parentItem.children) {\n parentItem.children = [];\n }\n parentItem.children.push(thisItem);\n pointer = pointer.parent!;\n }\n }\n\n // called by\n // 1) change detection (provides cols) and\n // 2) groupStage if doing transaction update (doesn't provide cols)\n public addParentNode(rowNode: RowNode | null, columns?: Column[]): void {\n\n if (!rowNode || rowNode.isRowPinned()) { return; }\n\n // we cannot do both steps below in the same loop as\n // the second loop has a dependency on the first loop.\n // ie the hierarchy cannot be stitched up yet because\n // we don't have it built yet\n\n // create the new PathItem objects.\n const newEntryCount = this.createPathItems(rowNode);\n\n // link in the node items\n this.linkPathItems(rowNode, newEntryCount);\n\n // update columns\n this.populateColumnsMap(rowNode, columns!);\n }\n\n public canSkip(rowNode: RowNode): boolean {\n return this.active && !this.mapToItems[rowNode.id!];\n }\n\n public getValueColumnsForNode(rowNode: RowNode, valueColumns: Column[]): Column[] {\n if (!this.keepingColumns) { return valueColumns; }\n\n const colsForThisNode = this.nodeIdsToColumns[rowNode.id!];\n const result = valueColumns.filter(col => colsForThisNode[col.getId()]);\n return result;\n }\n\n public getNotValueColumnsForNode(rowNode: RowNode, valueColumns: Column[]): Column[] | null {\n if (!this.keepingColumns) { return null; }\n\n const colsForThisNode = this.nodeIdsToColumns[rowNode.id!];\n const result = valueColumns.filter(col => !colsForThisNode[col.getId()]);\n return result;\n }\n}\n","import { Autowired, Bean, PostConstruct } from \"../context/context\";\nimport { RowNode } from \"../entities/rowNode\";\nimport { Column } from \"../entities/column\";\nimport { Environment } from \"../environment\";\nimport { Events } from '../events';\nimport { BeanStub } from \"../context/beanStub\";\nimport { getAbsoluteHeight, getAbsoluteWidth } from '../utils/dom';\nimport { last } from '../utils/array';\nimport { isElementInEventPath } from '../utils/event';\nimport { KeyCode } from '../constants/keyCode';\nimport { FocusService } from \"../focusService\";\nimport { GridCtrl } from \"../gridComp/gridCtrl\";\nimport { IAfterGuiAttachedParams } from \"../interfaces/iAfterGuiAttachedParams\";\nimport { AgPromise } from \"../utils\";\nimport { CtrlsService } from \"../ctrlsService\";\nimport { setAriaLabel, setAriaRole } from \"../utils/aria\";\nimport { PostProcessPopupParams } from \"../entities/iCallbackParams\";\nimport { WithoutGridCommon } from \"../interfaces/iCommon\";\n\nexport interface PopupEventParams {\n originalMouseEvent?: MouseEvent | Touch | null;\n mouseEvent?: MouseEvent;\n touchEvent?: TouchEvent;\n keyboardEvent?: KeyboardEvent;\n}\n\nexport interface AgPopup {\n element: HTMLElement;\n wrapper: HTMLElement;\n hideFunc: () => void;\n isAnchored: boolean;\n stopAnchoringPromise: AgPromise;\n instanceId: number;\n}\n\ninterface Rect {\n top: number;\n left: number;\n right: number;\n bottom: number;\n}\n\nenum DIRECTION { vertical, horizontal }\n\nlet instanceIdSeq = 0;\n\nexport interface AddPopupParams {\n // if true then listens to background checking for clicks, so that when the background is clicked,\n // the child is removed again, giving a model look to popups.\n modal?: boolean;\n // the element to place in the popup\n eChild: HTMLElement;\n // if hitting ESC should close the popup\n closeOnEsc?: boolean;\n // a callback that gets called when the popup is closed\n closedCallback?: (e?: MouseEvent | TouchEvent | KeyboardEvent) => void;\n // if a clicked caused the popup (eg click a button) then the click that caused it\n click?: MouseEvent | Touch | null;\n alwaysOnTop?: boolean;\n afterGuiAttached?: (params: IAfterGuiAttachedParams) => void;\n // this gets called after the popup is created. the called could just call positionCallback themselves,\n // however it needs to be called first before anchorToElement is called, so must provide this callback\n // here if setting anchorToElement\n positionCallback?: () => void;\n // if the underlying anchorToElement moves, the popup will follow it. for example if context menu\n // showing, and the whole grid moves (browser is scrolled down) then we want the popup to stay above\n // the cell it appeared on. make sure though if setting, don't anchor to a temporary or moving element,\n // eg if cellComp element is passed, what happens if row moves (sorting, filtering etc)? best anchor against\n // the grid, not the cell.\n anchorToElement?: HTMLElement;\n\n // an aria label should be added to provided context to screen readers\n ariaLabel: string;\n}\n\nexport interface AddPopupResult {\n hideFunc: () => void;\n stopAnchoringPromise: AgPromise;\n}\n\n@Bean('popupService')\nexport class PopupService extends BeanStub {\n\n // really this should be using eGridDiv, not sure why it's not working.\n // maybe popups in the future should be parent to the body??\n @Autowired('environment') private environment: Environment;\n @Autowired('focusService') private focusService: FocusService;\n @Autowired('ctrlsService') public ctrlsService: CtrlsService;\n\n private gridCtrl: GridCtrl;\n\n private popupList: AgPopup[] = [];\n\n @PostConstruct\n private postConstruct(): void {\n this.ctrlsService.whenReady(p => {\n this.gridCtrl = p.gridCtrl;\n this.addManagedListener(this.gridCtrl, Events.EVENT_KEYBOARD_FOCUS, () => {\n this.popupList.forEach(popup => popup.element.classList.add(FocusService.AG_KEYBOARD_FOCUS));\n });\n this.addManagedListener(this.gridCtrl, Events.EVENT_MOUSE_FOCUS, () => {\n this.popupList.forEach(popup => popup.element.classList.remove(FocusService.AG_KEYBOARD_FOCUS));\n });\n });\n }\n\n public getPopupParent(): HTMLElement {\n const ePopupParent = this.gridOptionsWrapper.getPopupParent();\n\n if (ePopupParent) { return ePopupParent; }\n\n return this.gridCtrl.getGui();\n }\n\n public positionPopupForMenu(params: { eventSource: HTMLElement, ePopup: HTMLElement; }): void {\n const sourceRect = params.eventSource.getBoundingClientRect();\n const parentRect = this.getParentRect();\n const y = this.keepXYWithinBounds(params.ePopup, sourceRect.top - parentRect.top, DIRECTION.vertical);\n\n const minWidth = (params.ePopup.clientWidth > 0) ? params.ePopup.clientWidth : 200;\n params.ePopup.style.minWidth = `${minWidth}px`;\n const widthOfParent = parentRect.right - parentRect.left;\n const maxX = widthOfParent - minWidth;\n\n // the x position of the popup depends on RTL or LTR. for normal cases, LTR, we put the child popup\n // to the right, unless it doesn't fit and we then put it to the left. for RTL it's the other way around,\n // we try place it first to the left, and then if not to the right.\n let x: number;\n if (this.gridOptionsWrapper.isEnableRtl()) {\n // for RTL, try left first\n x = xLeftPosition();\n if (x < 0) {\n x = xRightPosition();\n }\n if (x > maxX) {\n x = 0;\n }\n } else {\n // for LTR, try right first\n x = xRightPosition();\n if (x > maxX) {\n x = xLeftPosition();\n }\n if (x < 0) {\n x = 0;\n }\n }\n\n params.ePopup.style.left = `${x}px`;\n params.ePopup.style.top = `${y}px`;\n\n function xRightPosition(): number {\n return sourceRect.right - parentRect.left - 2;\n }\n\n function xLeftPosition(): number {\n return sourceRect.left - parentRect.left - minWidth;\n }\n }\n\n public positionPopupUnderMouseEvent(params: {\n rowNode?: RowNode | null,\n column?: Column | null,\n type: string,\n mouseEvent: MouseEvent | Touch,\n nudgeX?: number,\n nudgeY?: number,\n ePopup: HTMLElement,\n }): void {\n const { ePopup, nudgeX, nudgeY } = params;\n const { x, y } = this.calculatePointerAlign(params.mouseEvent);\n\n this.positionPopup({\n ePopup: ePopup,\n x,\n y,\n nudgeX,\n nudgeY,\n keepWithinBounds: true\n });\n\n this.callPostProcessPopup(params.type, params.ePopup, null, params.mouseEvent, params.column, params.rowNode);\n }\n\n private calculatePointerAlign(e: MouseEvent | Touch): { x: number, y: number; } {\n const parentRect = this.getParentRect();\n\n return {\n x: e.clientX - parentRect.left,\n y: e.clientY - parentRect.top\n };\n }\n\n public positionPopupUnderComponent(params: {\n type: string,\n eventSource: HTMLElement,\n ePopup: HTMLElement,\n column?: Column,\n rowNode?: RowNode,\n nudgeX?: number,\n nudgeY?: number,\n alignSide?: 'left' | 'right',\n keepWithinBounds?: boolean;\n }) {\n const sourceRect = params.eventSource.getBoundingClientRect();\n const alignSide = params.alignSide || 'left';\n const parentRect = this.getParentRect();\n\n let x = sourceRect.left - parentRect.left;\n\n if (alignSide === 'right') {\n x -= (params.ePopup.offsetWidth - sourceRect.width);\n }\n\n this.positionPopup({\n ePopup: params.ePopup,\n nudgeX: params.nudgeX,\n nudgeY: params.nudgeY,\n x,\n y: sourceRect.top - parentRect.top + sourceRect.height,\n keepWithinBounds: params.keepWithinBounds\n });\n\n this.callPostProcessPopup(params.type, params.ePopup, params.eventSource, null, params.column, params.rowNode);\n }\n\n public positionPopupOverComponent(params: {\n type: string,\n eventSource: HTMLElement,\n ePopup: HTMLElement,\n column: Column,\n rowNode: RowNode,\n nudgeX?: number,\n nudgeY?: number,\n keepWithinBounds?: boolean;\n }) {\n const sourceRect = params.eventSource.getBoundingClientRect();\n const parentRect = this.getParentRect();\n\n this.positionPopup({\n ePopup: params.ePopup,\n nudgeX: params.nudgeX,\n nudgeY: params.nudgeY,\n x: sourceRect.left - parentRect.left,\n y: sourceRect.top - parentRect.top,\n keepWithinBounds: params.keepWithinBounds\n });\n\n this.callPostProcessPopup(params.type, params.ePopup, params.eventSource, null, params.column, params.rowNode);\n }\n\n private callPostProcessPopup(\n type: string,\n ePopup: HTMLElement,\n eventSource?: HTMLElement | null,\n mouseEvent?: MouseEvent | Touch | null,\n column?: Column | null,\n rowNode?: RowNode | null\n ): void {\n const callback = this.gridOptionsWrapper.getPostProcessPopupFunc();\n if (callback) {\n const params: WithoutGridCommon = {\n column: column,\n rowNode: rowNode,\n ePopup: ePopup,\n type: type,\n eventSource: eventSource,\n mouseEvent: mouseEvent\n };\n callback(params);\n }\n }\n\n public positionPopup(params: {\n ePopup: HTMLElement,\n nudgeX?: number,\n nudgeY?: number,\n x: number,\n y: number,\n keepWithinBounds?: boolean;\n }): void {\n const { ePopup, keepWithinBounds, nudgeX, nudgeY } = params;\n let { x, y } = params;\n\n if (nudgeX) {\n x += nudgeX;\n }\n if (nudgeY) {\n y += nudgeY;\n }\n\n // if popup is overflowing to the bottom, move it up\n if (keepWithinBounds) {\n x = this.keepXYWithinBounds(ePopup, x, DIRECTION.horizontal);\n y = this.keepXYWithinBounds(ePopup, y, DIRECTION.vertical);\n }\n\n ePopup.style.left = `${x}px`;\n ePopup.style.top = `${y}px`;\n }\n\n public getActivePopups(): HTMLElement[] {\n return this.popupList.map((popup) => popup.element);\n }\n\n public getPopupList(): AgPopup[] {\n return this.popupList;\n }\n\n private getParentRect(): Rect {\n // subtract the popup parent borders, because popupParent.getBoundingClientRect\n // returns the rect outside the borders, but the 0,0 coordinate for absolute\n // positioning is inside the border, leading the popup to be off by the width\n // of the border\n const eDocument = this.gridOptionsWrapper.getDocument();\n let popupParent = this.getPopupParent();\n\n if (popupParent === eDocument.body) {\n popupParent = eDocument.documentElement;\n }\n\n const style = getComputedStyle(popupParent);\n const bounds = popupParent.getBoundingClientRect();\n\n return {\n top: bounds.top + parseFloat(style.borderTopWidth!) || 0,\n left: bounds.left + parseFloat(style.borderLeftWidth!) || 0,\n right: bounds.right + parseFloat(style.borderRightWidth!) || 0,\n bottom: bounds.bottom + parseFloat(style.borderBottomWidth!) || 0,\n };\n }\n\n private keepXYWithinBounds(\n ePopup: HTMLElement,\n position: number,\n direction: DIRECTION\n ): number {\n const isVertical = direction === DIRECTION.vertical;\n const sizeProperty = isVertical ? 'clientHeight' : 'clientWidth';\n const anchorProperty = isVertical ? 'top' : 'left';\n const offsetProperty = isVertical ? 'offsetHeight' : 'offsetWidth';\n const scrollPositionProperty = isVertical ? 'scrollTop' : 'scrollLeft';\n\n const eDocument = this.gridOptionsWrapper.getDocument();\n const docElement = eDocument.documentElement;\n const popupParent = this.getPopupParent();\n const parentRect = popupParent.getBoundingClientRect();\n const documentRect = eDocument.documentElement.getBoundingClientRect();\n const isBody = popupParent === eDocument.body;\n\n const offsetSize = ePopup[offsetProperty];\n const getSize = isVertical ? getAbsoluteHeight : getAbsoluteWidth;\n\n let sizeOfParent = isBody ? (getSize(docElement) + docElement[scrollPositionProperty]) : popupParent[sizeProperty];\n\n if (isBody) {\n sizeOfParent -= Math.abs(documentRect[anchorProperty] - parentRect[anchorProperty]);\n }\n\n const max = sizeOfParent - offsetSize;\n\n return Math.min(Math.max(position, 0), Math.abs(max));\n }\n\n private keepPopupPositionedRelativeTo(params: {\n ePopup: HTMLElement,\n element: HTMLElement,\n hidePopup: () => void;\n }): AgPromise<() => void> {\n const eParent = this.getPopupParent();\n const parentRect = eParent.getBoundingClientRect();\n\n const sourceRect = params.element.getBoundingClientRect();\n const initialDiffTop = parentRect.top - sourceRect.top;\n const initialDiffLeft = parentRect.left - sourceRect.left;\n\n let lastDiffTop = initialDiffTop;\n let lastDiffLeft = initialDiffLeft;\n\n const topPx = params.ePopup.style.top;\n const top = parseInt(topPx!.substring(0, topPx!.length - 1), 10);\n\n const leftPx = params.ePopup.style.left;\n const left = parseInt(leftPx!.substring(0, leftPx!.length - 1), 10);\n\n return new AgPromise<() => void>(resolve => {\n this.getFrameworkOverrides().setInterval(() => {\n const pRect = eParent.getBoundingClientRect();\n const sRect = params.element.getBoundingClientRect();\n\n const elementNotInDom = sRect.top == 0 && sRect.left == 0 && sRect.height == 0 && sRect.width == 0;\n if (elementNotInDom) {\n params.hidePopup();\n return;\n }\n\n const currentDiffTop = pRect.top - sRect.top;\n if (currentDiffTop != lastDiffTop) {\n const newTop = this.keepXYWithinBounds(params.ePopup, top + initialDiffTop - currentDiffTop, DIRECTION.vertical);\n params.ePopup.style.top = `${newTop}px`;\n }\n lastDiffTop = currentDiffTop;\n\n const currentDiffLeft = pRect.left - sRect.left;\n if (currentDiffLeft != lastDiffLeft) {\n const newLeft = this.keepXYWithinBounds(params.ePopup, left + initialDiffLeft - currentDiffLeft, DIRECTION.horizontal);\n params.ePopup.style.left = `${newLeft}px`;\n }\n lastDiffLeft = currentDiffLeft;\n\n }, 200).then(intervalId => {\n const result = () => {\n if (intervalId != null) {\n window.clearInterval(intervalId);\n }\n };\n resolve(result);\n });\n });\n }\n\n public addPopup(params: AddPopupParams): AddPopupResult {\n const {\n modal,\n eChild,\n closeOnEsc,\n closedCallback,\n click,\n alwaysOnTop,\n afterGuiAttached,\n positionCallback,\n anchorToElement,\n ariaLabel\n } = params;\n\n const eDocument = this.gridOptionsWrapper.getDocument();\n\n let destroyPositionTracker: AgPromise<() => void> = new AgPromise(resolve => resolve(() => { }));\n\n if (!eDocument) {\n console.warn('ag-grid: could not find the document, document is empty');\n return { hideFunc: () => { }, stopAnchoringPromise: destroyPositionTracker };\n }\n\n const pos = this.popupList.findIndex(popup => popup.element === eChild);\n\n if (pos !== -1) {\n const popup = this.popupList[pos];\n return { hideFunc: popup.hideFunc, stopAnchoringPromise: popup.stopAnchoringPromise };\n }\n\n const ePopupParent = this.getPopupParent();\n\n if (eChild.style.top == null) {\n eChild.style.top = '0px';\n }\n if (eChild.style.left == null) {\n eChild.style.left = '0px';\n }\n\n // add env CSS class to child, in case user provided a popup parent, which means\n // theme class may be missing\n const eWrapper = document.createElement('div');\n const { theme } = this.environment.getTheme();\n\n if (theme) {\n eWrapper.classList.add(theme);\n }\n\n eWrapper.classList.add('ag-popup');\n eChild.classList.add(\n this.gridOptionsWrapper.isEnableRtl() ? 'ag-rtl' : 'ag-ltr',\n 'ag-popup-child'\n );\n\n if (!eChild.hasAttribute('role')) {\n setAriaRole(eChild, 'dialog');\n }\n\n setAriaLabel(eChild, ariaLabel);\n\n if (this.focusService.isKeyboardMode()) {\n eChild.classList.add(FocusService.AG_KEYBOARD_FOCUS);\n }\n\n eWrapper.appendChild(eChild);\n ePopupParent.appendChild(eWrapper);\n\n if (alwaysOnTop) {\n this.setAlwaysOnTop(eWrapper, true);\n } else {\n this.bringPopupToFront(eWrapper);\n }\n\n let popupHidden = false;\n\n const hidePopupOnKeyboardEvent = (event: KeyboardEvent) => {\n if (!eWrapper.contains(eDocument.activeElement)) {\n return;\n }\n\n const key = event.key;\n\n if (key === KeyCode.ESCAPE) {\n hidePopup({ keyboardEvent: event });\n }\n };\n\n const hidePopupOnMouseEvent = (event: MouseEvent) => hidePopup({ mouseEvent: event });\n const hidePopupOnTouchEvent = (event: TouchEvent) => hidePopup({ touchEvent: event });\n\n const hidePopup = (popupParams: PopupEventParams = {}) => {\n const { mouseEvent, touchEvent, keyboardEvent } = popupParams;\n if (\n // we don't hide popup if the event was on the child, or any\n // children of this child\n this.isEventFromCurrentPopup({ mouseEvent, touchEvent }, eChild) ||\n // if the event to close is actually the open event, then ignore it\n this.isEventSameChainAsOriginalEvent({ originalMouseEvent: click, mouseEvent, touchEvent }) ||\n // this method should only be called once. the client can have different\n // paths, each one wanting to close, so this method may be called multiple times.\n popupHidden\n ) {\n return;\n }\n\n popupHidden = true;\n\n ePopupParent.removeChild(eWrapper);\n\n eDocument.removeEventListener('keydown', hidePopupOnKeyboardEvent);\n eDocument.removeEventListener('mousedown', hidePopupOnMouseEvent);\n eDocument.removeEventListener('touchstart', hidePopupOnTouchEvent);\n eDocument.removeEventListener('contextmenu', hidePopupOnMouseEvent);\n\n this.eventService.removeEventListener(Events.EVENT_DRAG_STARTED, hidePopupOnMouseEvent);\n\n if (closedCallback) {\n closedCallback(mouseEvent || touchEvent || keyboardEvent);\n }\n\n this.popupList = this.popupList.filter(popup => popup.element !== eChild);\n\n if (destroyPositionTracker) {\n destroyPositionTracker.then(destroyFunc => destroyFunc && destroyFunc());\n }\n };\n\n if (afterGuiAttached) {\n afterGuiAttached({ hidePopup });\n }\n\n // if we add these listeners now, then the current mouse\n // click will be included, which we don't want\n window.setTimeout(() => {\n if (closeOnEsc) {\n eDocument.addEventListener('keydown', hidePopupOnKeyboardEvent);\n }\n\n if (modal) {\n eDocument.addEventListener('mousedown', hidePopupOnMouseEvent);\n this.eventService.addEventListener(Events.EVENT_DRAG_STARTED, hidePopupOnMouseEvent);\n eDocument.addEventListener('touchstart', hidePopupOnTouchEvent);\n eDocument.addEventListener('contextmenu', hidePopupOnMouseEvent);\n }\n }, 0);\n\n if (positionCallback) {\n positionCallback();\n }\n if (anchorToElement) {\n // keeps popup positioned under created, eg if context menu, if user scrolls\n // using touchpad and the cell moves, it moves the popup to keep it with the cell.\n destroyPositionTracker = this.keepPopupPositionedRelativeTo({\n element: anchorToElement,\n ePopup: eChild,\n hidePopup\n });\n }\n\n this.popupList.push({\n element: eChild,\n wrapper: eWrapper,\n hideFunc: hidePopup,\n stopAnchoringPromise: destroyPositionTracker,\n instanceId: instanceIdSeq++,\n isAnchored: !!anchorToElement\n });\n\n return {\n hideFunc: hidePopup,\n stopAnchoringPromise: destroyPositionTracker\n };\n }\n\n public hasAnchoredPopup(): boolean {\n return this.popupList.some(popup => popup.isAnchored);\n }\n\n private isEventFromCurrentPopup(params: PopupEventParams, target: HTMLElement): boolean {\n const { mouseEvent, touchEvent } = params;\n\n const event = mouseEvent ? mouseEvent : touchEvent;\n\n if (!event) { return false; }\n\n const indexOfThisChild = this.popupList.findIndex(popup => popup.element === target);\n\n if (indexOfThisChild === -1) { return false; }\n\n for (let i = indexOfThisChild; i < this.popupList.length; i++) {\n const popup = this.popupList[i];\n\n if (isElementInEventPath(popup.element, event)) { return true; }\n }\n\n // if the user did not write their own Custom Element to be rendered as popup\n // and this component has an additional popup element, they should have the\n // `ag-custom-component-popup` class to be detected as part of the Custom Component\n return this.isElementWithinCustomPopup(event.target as HTMLElement);\n }\n\n public isElementWithinCustomPopup(el: HTMLElement): boolean {\n const eDocument = this.gridOptionsWrapper.getDocument();\n while (el && el !== eDocument.body) {\n if (el.classList.contains('ag-custom-component-popup') || el.parentElement === null) {\n return true;\n }\n el = el.parentElement;\n }\n\n return false;\n }\n\n // in some browsers, the context menu event can be fired before the click event, which means\n // the context menu event could open the popup, but then the click event closes it straight away.\n private isEventSameChainAsOriginalEvent(params: PopupEventParams): boolean {\n const { originalMouseEvent, mouseEvent, touchEvent } = params;\n // we check the coordinates of the event, to see if it's the same event. there is a 1 / 1000 chance that\n // the event is a different event, however that is an edge case that is not very relevant (the user clicking\n // twice on the same location isn't a normal path).\n\n // event could be mouse event or touch event.\n let mouseEventOrTouch: MouseEvent | Touch | null = null;\n\n if (mouseEvent) {\n // mouse event can be used direction, it has coordinates\n mouseEventOrTouch = mouseEvent;\n } else if (touchEvent) {\n // touch event doesn't have coordinates, need it's touch object\n mouseEventOrTouch = touchEvent.touches[0];\n }\n if (mouseEventOrTouch && originalMouseEvent) {\n // for x, allow 4px margin, to cover iPads, where touch (which opens menu) is followed\n // by browser click (when you finger up, touch is interrupted as click in browser)\n const screenX = mouseEvent ? mouseEvent.screenX : 0;\n const screenY = mouseEvent ? mouseEvent.screenY : 0;\n\n const xMatch = Math.abs(originalMouseEvent.screenX - screenX) < 5;\n const yMatch = Math.abs(originalMouseEvent.screenY - screenY) < 5;\n\n if (xMatch && yMatch) {\n return true;\n }\n }\n\n return false;\n }\n\n private getWrapper(ePopup: HTMLElement): HTMLElement | null {\n while (!ePopup.classList.contains('ag-popup') && ePopup.parentElement) {\n ePopup = ePopup.parentElement;\n }\n\n return ePopup.classList.contains('ag-popup') ? ePopup : null;\n }\n\n public setAlwaysOnTop(ePopup: HTMLElement, alwaysOnTop?: boolean): void {\n const eWrapper = this.getWrapper(ePopup);\n\n if (!eWrapper) {\n return;\n }\n\n eWrapper.classList.toggle('ag-always-on-top', !!alwaysOnTop);\n\n if (alwaysOnTop) {\n this.bringPopupToFront(eWrapper);\n }\n }\n\n public bringPopupToFront(ePopup: HTMLElement) {\n const parent = this.getPopupParent();\n const popupList: HTMLElement[] = Array.prototype.slice.call(parent.querySelectorAll('.ag-popup'));\n const popupLen = popupList.length;\n const alwaysOnTopList: HTMLElement[] = Array.prototype.slice.call(parent.querySelectorAll('.ag-popup.ag-always-on-top'));\n const onTopLength = alwaysOnTopList.length;\n const eWrapper = this.getWrapper(ePopup);\n\n if (!eWrapper || popupLen <= 1 || !parent.contains(ePopup)) {\n return;\n }\n\n const pos = popupList.indexOf(eWrapper);\n\n const innerEls = eWrapper.querySelectorAll('div');\n const innerElsScrollMap: [HTMLElement, number][] = [];\n\n innerEls.forEach(el => {\n if (el.scrollTop !== 0) {\n innerElsScrollMap.push([el, el.scrollTop]);\n }\n });\n\n if (onTopLength) {\n const isPopupAlwaysOnTop = eWrapper.classList.contains('ag-always-on-top');\n\n if (isPopupAlwaysOnTop) {\n if (pos !== popupLen - 1) {\n last(alwaysOnTopList).insertAdjacentElement('afterend', eWrapper);\n }\n } else if (pos !== popupLen - onTopLength - 1) {\n alwaysOnTopList[0].insertAdjacentElement('beforebegin', eWrapper);\n }\n } else if (pos !== popupLen - 1) {\n last(popupList).insertAdjacentElement('afterend', eWrapper);\n }\n\n while (innerElsScrollMap.length) {\n const currentEl = innerElsScrollMap.pop();\n currentEl![0].scrollTop = currentEl![1];\n }\n\n const params = {\n type: 'popupToFront',\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi(),\n eWrapper\n };\n\n this.eventService.dispatchEvent(params);\n }\n}\n","import { AgEvent } from \"../events\";\nimport { BeanStub } from \"../context/beanStub\";\n\nexport interface LoadCompleteEvent extends AgEvent {\n success: boolean;\n block: RowNodeBlock;\n}\n\nexport interface LoadSuccessParams {\n /**\n * Data retrieved from the server as requested by the grid.\n */\n rowData: any[];\n /**\n * The last row, if known, to help Infinite Scroll (i.e Partial Store) and Pagination.\n */\n rowCount?: number;\n /**\n * Any extra information for the grid to associate with this load.\n */\n storeInfo?: any;\n}\n\nexport abstract class RowNodeBlock extends BeanStub {\n\n public static EVENT_LOAD_COMPLETE = 'loadComplete';\n\n public static STATE_WAITING_TO_LOAD = 'needsLoading';\n public static STATE_LOADING = 'loading';\n public static STATE_LOADED = 'loaded';\n public static STATE_FAILED = 'failed';\n\n private readonly id: number;\n\n private state = RowNodeBlock.STATE_WAITING_TO_LOAD;\n\n private version = 0;\n\n public abstract getBlockStateJson(): { id: string, state: any };\n\n protected abstract loadFromDatasource(): void;\n\n protected abstract processServerResult(params: LoadSuccessParams): void;\n\n protected abstract processServerFail(): void;\n\n protected constructor(id: number) {\n super();\n this.id = id;\n }\n\n public getId(): number {\n return this.id;\n }\n\n public load(): void {\n this.state = RowNodeBlock.STATE_LOADING;\n this.loadFromDatasource();\n }\n\n public getVersion(): number {\n return this.version;\n }\n\n public setStateWaitingToLoad(): void {\n // in case any current loads in progress, this will have their results ignored\n this.version++;\n this.state = RowNodeBlock.STATE_WAITING_TO_LOAD;\n }\n\n public getState(): string {\n return this.state;\n }\n\n protected pageLoadFailed(version: number) {\n const requestMostRecentAndLive = this.isRequestMostRecentAndLive(version);\n if (requestMostRecentAndLive) {\n this.state = RowNodeBlock.STATE_FAILED;\n this.processServerFail();\n }\n\n this.dispatchLoadCompleted(false);\n }\n\n protected success(version: number, params: LoadSuccessParams): void {\n this.successCommon(version, params);\n }\n\n protected pageLoaded(version: number, rows: any[], lastRow: number) {\n this.successCommon(version, {rowData: rows, rowCount: lastRow});\n }\n\n private isRequestMostRecentAndLive(version: number): boolean {\n // thisIsMostRecentRequest - if block was refreshed, then another request\n // could of been sent after this one.\n const thisIsMostRecentRequest = version === this.version;\n\n // weAreNotDestroyed - if InfiniteStore is purged, then blocks are destroyed\n // and new blocks created. so data loads of old blocks are discarded.\n const weAreNotDestroyed = this.isAlive();\n\n return thisIsMostRecentRequest && weAreNotDestroyed;\n }\n\n protected successCommon(version: number, params: LoadSuccessParams) {\n\n // need to dispatch load complete before processing the data, as PaginationComp checks\n // RowNodeBlockLoader to see if it is still loading, so the RowNodeBlockLoader needs to\n // be updated first (via LoadComplete event) before PaginationComp updates (via processServerResult method)\n this.dispatchLoadCompleted();\n\n const requestMostRecentAndLive = this.isRequestMostRecentAndLive(version);\n\n if (requestMostRecentAndLive) {\n this.state = RowNodeBlock.STATE_LOADED;\n this.processServerResult(params);\n }\n }\n\n private dispatchLoadCompleted(success = true) {\n // we fire event regardless of processing data or now, as we want\n // the concurrentLoadRequests count to be reduced in BlockLoader\n const event: LoadCompleteEvent = {\n type: RowNodeBlock.EVENT_LOAD_COMPLETE,\n success: success,\n block: this\n };\n\n this.dispatchEvent(event);\n }\n}\n","import { RowNodeBlock } from \"./rowNodeBlock\";\nimport { Bean, PostConstruct, Qualifier } from \"../context/context\";\nimport { BeanStub } from \"../context/beanStub\";\nimport { Logger, LoggerFactory } from \"../logger\";\nimport { _ } from \"../utils\";\n\n@Bean('rowNodeBlockLoader')\nexport class RowNodeBlockLoader extends BeanStub {\n\n public static BLOCK_LOADER_FINISHED_EVENT = 'blockLoaderFinished';\n\n private maxConcurrentRequests: number | undefined;\n private checkBlockToLoadDebounce: () => void;\n\n private activeBlockLoadsCount = 0;\n private blocks: RowNodeBlock[] = [];\n private logger: Logger;\n private active = true;\n\n @PostConstruct\n private postConstruct(): void {\n this.maxConcurrentRequests = this.gridOptionsWrapper.getMaxConcurrentDatasourceRequests();\n const blockLoadDebounceMillis = this.gridOptionsWrapper.getBlockLoadDebounceMillis();\n\n if (blockLoadDebounceMillis && blockLoadDebounceMillis > 0) {\n this.checkBlockToLoadDebounce = _.debounce(this.performCheckBlocksToLoad.bind(this), blockLoadDebounceMillis);\n }\n }\n\n private setBeans(@Qualifier('loggerFactory') loggerFactory: LoggerFactory) {\n this.logger = loggerFactory.create('RowNodeBlockLoader');\n }\n\n public addBlock(block: RowNodeBlock): void {\n this.blocks.push(block);\n\n // note that we do not remove this listener when removing the block. this is because the\n // cache can get destroyed (and containing blocks) when a block is loading. however the loading block\n // is still counted as an active loading block and we must decrement activeBlockLoadsCount when it finishes.\n block.addEventListener(RowNodeBlock.EVENT_LOAD_COMPLETE, this.loadComplete.bind(this));\n\n this.checkBlockToLoad();\n }\n\n public removeBlock(block: RowNodeBlock): void {\n _.removeFromArray(this.blocks, block);\n }\n\n protected destroy(): void {\n super.destroy();\n this.active = false;\n }\n\n private loadComplete(): void {\n this.activeBlockLoadsCount--;\n this.checkBlockToLoad();\n if (this.activeBlockLoadsCount == 0) {\n this.dispatchEvent({type: RowNodeBlockLoader.BLOCK_LOADER_FINISHED_EVENT});\n }\n }\n\n public checkBlockToLoad(): void {\n if (this.checkBlockToLoadDebounce) {\n this.checkBlockToLoadDebounce();\n } else {\n this.performCheckBlocksToLoad();\n }\n }\n\n private performCheckBlocksToLoad(): void {\n if (!this.active) { return; }\n\n this.printCacheStatus();\n\n if (this.maxConcurrentRequests != null && this.activeBlockLoadsCount >= this.maxConcurrentRequests) {\n this.logger.log(`checkBlockToLoad: max loads exceeded`);\n return;\n }\n\n let blockToLoad: RowNodeBlock | null = null;\n this.blocks.forEach(block => {\n if (block.getState() === RowNodeBlock.STATE_WAITING_TO_LOAD) {\n blockToLoad = block;\n }\n });\n\n if (blockToLoad) {\n (blockToLoad as RowNodeBlock).load();\n this.activeBlockLoadsCount++;\n this.printCacheStatus();\n }\n }\n\n public getBlockState(): any {\n const result: any = {};\n this.blocks.forEach((block: RowNodeBlock) => {\n const {id, state} = block.getBlockStateJson();\n result[id] = state;\n });\n return result;\n }\n\n private printCacheStatus(): void {\n\n if (this.logger.isLogging()) {\n this.logger.log(`printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount},`\n + ` blocks = ${JSON.stringify(this.getBlockState())}`);\n }\n }\n\n public isLoading(): boolean {\n return this.activeBlockLoadsCount > 0;\n }\n}\n","import { IRowModel, RowBounds } from \"../interfaces/iRowModel\";\nimport { BeanStub } from \"../context/beanStub\";\nimport { Events, ModelUpdatedEvent, PaginationChangedEvent } from \"../events\";\nimport { RowNode } from \"../entities/rowNode\";\nimport { Autowired, Bean, PostConstruct } from \"../context/context\";\nimport { ColumnApi } from \"../columns/columnApi\";\nimport { GridApi } from \"../gridApi\";\nimport { missing, exists } from \"../utils/generic\";\nimport { isNumeric } from \"../utils/number\";\nimport { RowPosition } from \"../entities/rowPosition\";\n\n@Bean('paginationProxy')\nexport class PaginationProxy extends BeanStub {\n\n @Autowired('rowModel') private rowModel: IRowModel;\n @Autowired('columnApi') private columnApi: ColumnApi;\n @Autowired('gridApi') private gridApi: GridApi;\n\n private active: boolean;\n private paginateChildRows: boolean;\n\n private pageSize: number;\n\n private totalPages: number;\n private currentPage = 0;\n\n private topDisplayedRowIndex = 0;\n private bottomDisplayedRowIndex = 0;\n private pixelOffset = 0;\n private topRowBounds: RowBounds;\n private bottomRowBounds: RowBounds;\n\n private masterRowCount: number = 0;\n\n @PostConstruct\n private postConstruct() {\n this.active = this.gridOptionsWrapper.isPagination();\n this.paginateChildRows = this.gridOptionsWrapper.isPaginateChildRows();\n\n this.addManagedListener(this.eventService, Events.EVENT_MODEL_UPDATED, this.onModelUpdated.bind(this));\n this.addManagedListener(this.gridOptionsWrapper, 'paginationPageSize', this.onPaginationPageSizeChanged.bind(this));\n\n this.onModelUpdated();\n }\n\n public ensureRowHeightsValid(startPixel: number, endPixel: number, startLimitIndex: number, endLimitIndex: number): boolean {\n const res = this.rowModel.ensureRowHeightsValid(startPixel, endPixel, this.getPageFirstRow(), this.getPageLastRow());\n if (res) {\n this.calculatePages();\n }\n return res;\n }\n\n private onModelUpdated(modelUpdatedEvent?: ModelUpdatedEvent): void {\n this.calculatePages();\n const paginationChangedEvent: PaginationChangedEvent = {\n type: Events.EVENT_PAGINATION_CHANGED,\n animate: modelUpdatedEvent ? modelUpdatedEvent.animate : false,\n newData: modelUpdatedEvent ? modelUpdatedEvent.newData : false,\n newPage: modelUpdatedEvent ? modelUpdatedEvent.newPage : false,\n keepRenderedRows: modelUpdatedEvent ? modelUpdatedEvent.keepRenderedRows : false,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(paginationChangedEvent);\n }\n\n private onPaginationPageSizeChanged(): void {\n this.calculatePages();\n const paginationChangedEvent: PaginationChangedEvent = {\n type: Events.EVENT_PAGINATION_CHANGED,\n animate: false,\n newData: false,\n newPage: false,\n // important to keep rendered rows, otherwise every time grid is resized,\n // we would destroy all the rows.\n keepRenderedRows: true,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(paginationChangedEvent);\n }\n\n public goToPage(page: number): void {\n if (!this.active || this.currentPage === page) { return; }\n\n this.currentPage = page;\n const event: ModelUpdatedEvent = {\n type: Events.EVENT_MODEL_UPDATED,\n animate: false,\n keepRenderedRows: false,\n newData: false,\n newPage: true,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.onModelUpdated(event);\n }\n\n public getPixelOffset(): number {\n return this.pixelOffset;\n }\n\n public getRow(index: number): RowNode | undefined {\n return this.rowModel.getRow(index);\n }\n\n public getRowNode(id: string): RowNode | undefined {\n return this.rowModel.getRowNode(id);\n }\n\n public getRowIndexAtPixel(pixel: number): number {\n return this.rowModel.getRowIndexAtPixel(pixel);\n }\n\n public getCurrentPageHeight(): number {\n if (missing(this.topRowBounds) || missing(this.bottomRowBounds)) {\n return 0;\n }\n return Math.max(this.bottomRowBounds.rowTop + this.bottomRowBounds.rowHeight - this.topRowBounds.rowTop, 0);\n }\n\n public getCurrentPagePixelRange(): {pageFirstPixel: number, pageLastPixel: number} {\n const pageFirstPixel = this.topRowBounds ? this.topRowBounds.rowTop : 0;\n const pageLastPixel = this.bottomRowBounds ? this.bottomRowBounds.rowTop + this.bottomRowBounds.rowHeight : 0;\n return {pageFirstPixel, pageLastPixel};\n }\n\n public isRowPresent(rowNode: RowNode): boolean {\n if (!this.rowModel.isRowPresent(rowNode)) {\n return false;\n }\n const nodeIsInPage = rowNode.rowIndex! >= this.topDisplayedRowIndex && rowNode.rowIndex! <= this.bottomDisplayedRowIndex;\n return nodeIsInPage;\n }\n\n public isEmpty(): boolean {\n return this.rowModel.isEmpty();\n }\n\n public isRowsToRender(): boolean {\n return this.rowModel.isRowsToRender();\n }\n\n public getNodesInRangeForSelection(firstInRange: RowNode, lastInRange: RowNode): RowNode[] {\n return this.rowModel.getNodesInRangeForSelection(firstInRange, lastInRange);\n }\n\n public forEachNode(callback: (rowNode: RowNode, index: number) => void): void {\n return this.rowModel.forEachNode(callback);\n }\n\n public getType(): string {\n return this.rowModel.getType();\n }\n\n public getRowBounds(index: number): RowBounds {\n const res = this.rowModel.getRowBounds(index)!;\n res.rowIndex = index;\n return res;\n }\n\n public getPageFirstRow(): number {\n return this.topRowBounds ? this.topRowBounds.rowIndex! : -1;\n }\n\n public getPageLastRow(): number {\n return this.bottomRowBounds ? this.bottomRowBounds.rowIndex! : -1;\n }\n\n public getRowCount(): number {\n return this.rowModel.getRowCount();\n }\n\n public getPageForIndex(index: number): number {\n return Math.floor(index / this.pageSize);\n }\n\n public goToPageWithIndex(index: any): void {\n if (!this.active) { return; }\n\n const pageNumber = this.getPageForIndex(index);\n this.goToPage(pageNumber);\n }\n\n public isRowInPage(row: RowPosition): boolean {\n if (!this.active) { return true; }\n const rowPage = this.getPageForIndex(row.rowIndex);\n return rowPage === this.currentPage;\n }\n\n public isLastPageFound(): boolean {\n return this.rowModel.isLastRowIndexKnown();\n }\n\n public getCurrentPage(): number {\n return this.currentPage;\n }\n\n public goToNextPage(): void {\n this.goToPage(this.currentPage + 1);\n }\n\n public goToPreviousPage(): void {\n this.goToPage(this.currentPage - 1);\n }\n\n public goToFirstPage(): void {\n this.goToPage(0);\n }\n\n public goToLastPage(): void {\n const rowCount = this.rowModel.getRowCount();\n const lastPage = Math.floor(rowCount / this.pageSize);\n this.goToPage(lastPage);\n }\n\n public getPageSize(): number {\n return this.pageSize;\n }\n\n public getTotalPages(): number {\n return this.totalPages;\n }\n\n private setPageSize(): void {\n // show put this into super class\n this.pageSize = this.gridOptionsWrapper.getPaginationPageSize()!;\n if (this.pageSize == null || this.pageSize < 1) {\n this.pageSize = 100;\n }\n }\n\n private calculatePages(): void {\n if (this.active) {\n this.setPageSize();\n if (this.paginateChildRows) {\n this.calculatePagesAllRows();\n } else {\n this.calculatePagesMasterRowsOnly();\n }\n } else {\n this.calculatedPagesNotActive();\n }\n\n this.topRowBounds = this.rowModel.getRowBounds(this.topDisplayedRowIndex)!;\n if (this.topRowBounds) {\n this.topRowBounds.rowIndex = this.topDisplayedRowIndex;\n }\n\n this.bottomRowBounds = this.rowModel.getRowBounds(this.bottomDisplayedRowIndex)!;\n if (this.bottomRowBounds) {\n this.bottomRowBounds.rowIndex = this.bottomDisplayedRowIndex;\n }\n\n this.setPixelOffset(exists(this.topRowBounds) ? this.topRowBounds.rowTop : 0);\n }\n\n private setPixelOffset(value: number): void {\n if (this.pixelOffset === value) { return; }\n\n this.pixelOffset = value;\n this.eventService.dispatchEvent({type: Events.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED});\n }\n\n private setZeroRows(): void {\n this.masterRowCount = 0;\n this.topDisplayedRowIndex = 0;\n this.bottomDisplayedRowIndex = -1;\n this.currentPage = 0;\n this.totalPages = 0;\n }\n\n private calculatePagesMasterRowsOnly(): void {\n\n // const csrm = this.rowModel;\n // const rootNode = csrm.getRootNode();\n // const masterRows = rootNode.childrenAfterSort;\n\n this.masterRowCount = this.rowModel.getTopLevelRowCount();\n\n // we say <=0 (rather than =0) as viewport returns -1 when no rows\n if (this.masterRowCount <= 0) {\n this.setZeroRows();\n return;\n }\n\n const masterLastRowIndex = this.masterRowCount - 1;\n\n this.totalPages = Math.floor((masterLastRowIndex) / this.pageSize) + 1;\n\n if (this.currentPage >= this.totalPages) {\n this.currentPage = this.totalPages - 1;\n }\n\n if (!isNumeric(this.currentPage) || this.currentPage < 0) {\n this.currentPage = 0;\n }\n\n const masterPageStartIndex = this.pageSize * this.currentPage;\n let masterPageEndIndex = (this.pageSize * (this.currentPage + 1)) - 1;\n\n if (masterPageEndIndex > masterLastRowIndex) {\n masterPageEndIndex = masterLastRowIndex;\n }\n\n this.topDisplayedRowIndex = this.rowModel.getTopLevelRowDisplayedIndex(masterPageStartIndex);\n // masterRows[masterPageStartIndex].rowIndex;\n\n if (masterPageEndIndex === masterLastRowIndex) {\n // if showing the last master row, then we want to show the very last row of the model\n this.bottomDisplayedRowIndex = this.rowModel.getRowCount() - 1;\n } else {\n const firstIndexNotToShow = this.rowModel.getTopLevelRowDisplayedIndex(masterPageEndIndex + 1);\n //masterRows[masterPageEndIndex + 1].rowIndex;\n // this gets the index of the last child - eg current row is open, we want to display all children,\n // the index of the last child is one less than the index of the next parent row.\n this.bottomDisplayedRowIndex = firstIndexNotToShow - 1;\n }\n }\n\n public getMasterRowCount(): number {\n return this.masterRowCount;\n }\n\n private calculatePagesAllRows(): void {\n this.masterRowCount = this.rowModel.getRowCount();\n\n if (this.masterRowCount === 0) {\n this.setZeroRows();\n return;\n }\n\n const maxRowIndex = this.masterRowCount - 1;\n\n this.totalPages = Math.floor((maxRowIndex) / this.pageSize) + 1;\n\n if (this.currentPage >= this.totalPages) {\n this.currentPage = this.totalPages - 1;\n }\n\n if (!isNumeric(this.currentPage) || this.currentPage < 0) {\n this.currentPage = 0;\n }\n\n this.topDisplayedRowIndex = this.pageSize * this.currentPage;\n this.bottomDisplayedRowIndex = (this.pageSize * (this.currentPage + 1)) - 1;\n\n if (this.bottomDisplayedRowIndex > maxRowIndex) {\n this.bottomDisplayedRowIndex = maxRowIndex;\n }\n }\n\n private calculatedPagesNotActive(): void {\n this.pageSize = this.rowModel.getRowCount();\n this.totalPages = 1;\n this.currentPage = 0;\n this.topDisplayedRowIndex = 0;\n this.bottomDisplayedRowIndex = this.rowModel.getRowCount() - 1;\n }\n}\n","import { CellClassParams, ColDef } from \"../entities/colDef\";\nimport { Autowired, Bean } from \"../context/context\";\nimport { ExpressionService } from \"../valueService/expressionService\";\nimport { BeanStub } from \"../context/beanStub\";\nimport { RowClassParams } from \"../entities/gridOptions\";\n\n@Bean('stylingService')\nexport class StylingService extends BeanStub {\n\n @Autowired('expressionService') private expressionService: ExpressionService;\n\n public processAllCellClasses(\n colDef: ColDef,\n params: CellClassParams,\n onApplicableClass: (className: string) => void,\n onNotApplicableClass?: (className: string) => void\n ) {\n this.processClassRules(colDef.cellClassRules, params, onApplicableClass, onNotApplicableClass);\n this.processStaticCellClasses(colDef, params, onApplicableClass);\n }\n\n public processClassRules(\n classRules: { [cssClassName: string]: (Function | string) } | undefined,\n params: RowClassParams | CellClassParams,\n onApplicableClass: (className: string) => void,\n onNotApplicableClass?: (className: string) => void\n ) {\n if (classRules == null) { return; }\n\n const classNames = Object.keys(classRules!);\n const classesToApply: {[name: string]: boolean} = {};\n const classesToRemove: {[name: string]: boolean} = {};\n\n for (let i = 0; i < classNames.length; i++) {\n const className = classNames[i];\n const rule = classRules![className];\n\n let resultOfRule: any;\n\n if (typeof rule === 'string') {\n resultOfRule = this.expressionService.evaluate(rule, params);\n } else if (typeof rule === 'function') {\n resultOfRule = rule(params);\n }\n\n // in case className = 'my-class1 my-class2', we need to split into individual class names\n className.split(' ').forEach(singleClass => {\n if (singleClass == null || singleClass.trim() == '') { return; }\n resultOfRule ? classesToApply[singleClass] = true : classesToRemove[singleClass] = true;\n });\n }\n\n // we remove all classes first, then add all classes second,\n // in case a class appears in more than one rule, this means it will be added\n // if appears in at least one truthy rule\n if (onNotApplicableClass) {\n Object.keys(classesToRemove).forEach(onNotApplicableClass);\n }\n Object.keys(classesToApply).forEach(onApplicableClass);\n }\n\n public getStaticCellClasses(colDef: ColDef, params: CellClassParams): string[] {\n const { cellClass } = colDef;\n\n if (!cellClass) { return []; }\n\n let classOrClasses: string | string[] | null | undefined;\n\n if (typeof cellClass === 'function') {\n const cellClassFunc = cellClass;\n classOrClasses = cellClassFunc(params);\n } else {\n classOrClasses = cellClass;\n }\n\n if (typeof classOrClasses === 'string') {\n classOrClasses = [classOrClasses];\n }\n\n return classOrClasses || [];\n }\n\n private processStaticCellClasses(\n colDef: ColDef,\n params: CellClassParams,\n onApplicableClass: (className: string) => void\n ) {\n const classOrClasses = this.getStaticCellClasses(colDef, params);\n\n classOrClasses.forEach((cssClassItem: string) => {\n onApplicableClass(cssClassItem);\n });\n }\n\n}\n","import { AgCheckbox } from './agCheckbox';\nimport { Events } from '../eventKeys';\nimport { CheckboxChangedEvent } from '../events';\nimport { IInputField } from './agAbstractInputField';\n\nexport class AgRadioButton extends AgCheckbox {\n constructor(config?: IInputField) {\n super(config, 'ag-radio-button', 'radio');\n }\n\n protected isSelected(): boolean {\n return this.eInput.checked;\n }\n\n public toggle(): void {\n if (this.eInput.disabled) { return; }\n\n // do not allow an active radio button to be deselected\n if (!this.isSelected()) {\n this.setValue(true);\n }\n }\n\n protected addInputListeners() {\n super.addInputListeners();\n\n this.addManagedListener(this.eventService, Events.EVENT_CHECKBOX_CHANGED, this.onChange.bind(this));\n }\n\n /**\n * This ensures that if another radio button in the same named group is selected, we deselect this radio button.\n * By default the browser does this for you, but we are managing classes ourselves in order to ensure input\n * elements are styled correctly in IE11, and the DOM 'changed' event is only fired when a button is selected,\n * not deselected, so we need to use our own event.\n */\n private onChange(event: CheckboxChangedEvent) {\n if (event.selected &&\n event.name &&\n this.eInput.name &&\n this.eInput.name === event.name &&\n event.id &&\n this.eInput.id !== event.id) {\n this.setValue(false, true);\n }\n }\n}\n","import { AgCheckbox } from './agCheckbox';\nimport { IInputField } from './agAbstractInputField';\n\nexport class AgToggleButton extends AgCheckbox {\n constructor(config?: IInputField) {\n super(config, 'ag-toggle-button');\n }\n\n public setValue(value: boolean, silent?: boolean): this {\n super.setValue(value, silent);\n\n this.addOrRemoveCssClass('ag-selected', this.getValue()!);\n\n return this;\n }\n}\n","import { AgAbstractInputField, IInputField } from './agAbstractInputField';\nimport { exists } from '../utils/generic';\n\nexport interface ITextInputField extends IInputField {\n allowedCharPattern?: string;\n}\n\nexport class AgInputTextField extends AgAbstractInputField {\n constructor(config?: ITextInputField, className = 'ag-text-field', inputType = 'text') {\n super(config, className, inputType);\n }\n\n protected postConstruct() {\n super.postConstruct();\n\n if (this.config.allowedCharPattern) {\n this.preventDisallowedCharacters();\n }\n }\n\n public setValue(value?: string | null, silent?: boolean): this {\n const ret = super.setValue(value, silent);\n\n if (this.eInput.value !== value) {\n this.eInput.value = exists(value) ? value : '';\n }\n\n return ret;\n }\n\n private preventDisallowedCharacters(): void {\n const pattern = new RegExp(`[${this.config.allowedCharPattern}]`);\n\n const preventDisallowedCharacters = (event: KeyboardEvent) => {\n if (event.key && !pattern.test(event.key)) {\n event.preventDefault();\n }\n };\n\n this.addManagedListener(this.eInput, 'keypress', preventDisallowedCharacters);\n\n this.addManagedListener(this.eInput, 'paste', (e: ClipboardEvent) => {\n const text = e.clipboardData?.getData('text');\n\n if (text && text.split('').some((c: string) => !pattern.test(c))) {\n e.preventDefault();\n }\n });\n }\n}\n","import { AgAbstractInputField, IInputField } from \"./agAbstractInputField\";\n\nexport class AgInputTextArea extends AgAbstractInputField {\n constructor(config?: IInputField) {\n super(config, 'ag-text-area', null, 'textarea');\n }\n\n public setValue(value: string, silent?: boolean): this {\n const ret = super.setValue(value, silent);\n\n this.eInput.value = value;\n\n return ret;\n }\n\n public setCols(cols: number): this {\n this.eInput.cols = cols;\n\n return this;\n }\n\n public setRows(rows: number): this {\n this.eInput.rows = rows;\n\n return this;\n }\n}","import { AgInputTextField, ITextInputField } from \"./agInputTextField\";\nimport { addOrRemoveAttribute } from '../utils/dom';\n\nexport class AgInputNumberField extends AgInputTextField {\n private precision?: number;\n private step?: number;\n private min?: number;\n private max?: number;\n\n constructor(config?: ITextInputField) {\n super(config, 'ag-number-field', 'number');\n }\n\n postConstruct() {\n super.postConstruct();\n this.addManagedListener(this.eInput, 'blur', () => {\n const floatedValue = parseFloat(this.eInput.value);\n const value = isNaN(floatedValue) ? '' : this.normalizeValue(floatedValue.toString());\n\n if (this.value !== value) {\n this.setValue(value);\n }\n });\n\n this.eInput.step = 'any';\n }\n\n public normalizeValue(value: string): string {\n if (value === '') { return ''; }\n\n if (this.precision) {\n value = this.adjustPrecision(value);\n }\n\n const val = parseFloat(value);\n\n if (this.min != null && val < this.min) {\n value = this.min.toString();\n } else if (this.max != null && val > this.max) {\n value = this.max.toString();\n }\n\n return value;\n }\n\n private adjustPrecision(value: string): string {\n if (this.precision) {\n const floatString = parseFloat(value).toFixed(this.precision);\n value = parseFloat(floatString).toString();\n }\n\n return value;\n }\n\n public setMin(min: number | undefined): this {\n if (this.min === min) {\n return this;\n }\n\n this.min = min;\n\n addOrRemoveAttribute(this.eInput, 'min', min);\n\n return this;\n }\n\n public setMax(max: number | undefined): this {\n if (this.max === max) {\n return this;\n }\n\n this.max = max;\n\n addOrRemoveAttribute(this.eInput, 'max', max);\n\n return this;\n }\n\n public setPrecision(precision: number): this {\n this.precision = precision;\n\n return this;\n }\n\n public setStep(step?: number): this {\n if (this.step === step) {\n return this;\n }\n\n this.step = step;\n\n addOrRemoveAttribute(this.eInput, 'step', step);\n\n return this;\n }\n\n public setValue(value: string, silent?: boolean): this {\n value = this.adjustPrecision(value);\n const normalizedValue = this.normalizeValue(value);\n\n if (value != normalizedValue) { return this; }\n\n return super.setValue(value, silent);\n }\n}\n","import { IInputField, AgAbstractInputField } from \"./agAbstractInputField\";\n\ninterface IInputRange extends IInputField {\n min?: number;\n max?: number;\n step?: number;\n}\n\nexport class AgInputRange extends AgAbstractInputField {\n private min: number;\n private max: number;\n\n constructor(config?: IInputRange) {\n super(config, 'ag-range-field', 'range');\n }\n\n protected postConstruct() {\n super.postConstruct();\n\n const { min, max, step } = this.config;\n\n if (min != null) {\n this.setMinValue(min);\n }\n\n if (max != null) {\n this.setMaxValue(max);\n }\n\n this.setStep(step || 1);\n }\n\n protected addInputListeners() {\n this.addManagedListener(this.eInput, 'input', (e) => {\n const value = e.target.value;\n\n this.setValue(value);\n });\n }\n\n public setMinValue(value: number): this {\n this.min = value;\n\n this.eInput.setAttribute('min', value.toString());\n\n return this;\n }\n\n public setMaxValue(value: number): this {\n this.max = value;\n\n this.eInput.setAttribute('max', value.toString());\n\n return this;\n }\n\n public setStep(value: number): this {\n this.eInput.setAttribute('step', value.toString());\n\n return this;\n }\n\n public setValue(value: string, silent?: boolean): this {\n if (this.min != null) {\n value = Math.max(parseFloat(value), this.min).toString();\n }\n\n if (this.max != null) {\n value = Math.min(parseFloat(value), this.max).toString();\n }\n\n const ret = super.setValue(value, silent);\n\n this.eInput.value = value;\n\n return ret;\n }\n}\n","import { RefSelector } from \"./componentAnnotations\";\nimport { AgInputRange } from \"./agInputRange\";\nimport { AgAbstractLabel, LabelAlignment, IAgLabel } from \"./agAbstractLabel\";\nimport { AgInputNumberField } from \"./agInputNumberField\";\nimport { AgAbstractField } from \"./agAbstractField\";\nimport { PostConstruct } from \"../context/context\";\n\nexport class AgSlider extends AgAbstractLabel {\n private static TEMPLATE = /* html */\n `
\n \n
\n \n \n
\n
`;\n\n @RefSelector('eLabel') protected readonly eLabel: HTMLElement;\n @RefSelector('eSlider') private readonly eSlider: AgInputRange;\n @RefSelector('eText') private readonly eText: AgInputNumberField;\n\n protected labelAlignment: LabelAlignment = 'top';\n\n constructor(config?: IAgLabel) {\n super(config, AgSlider.TEMPLATE);\n }\n\n @PostConstruct\n private init() {\n this.eSlider.addCssClass('ag-slider-field');\n }\n\n public onValueChange(callbackFn: (newValue: number) => void) {\n const eventChanged = AgAbstractField.EVENT_CHANGED;\n this.addManagedListener(this.eText, eventChanged, () => {\n const textValue = parseFloat(this.eText.getValue()!);\n this.eSlider.setValue(textValue.toString(), true);\n callbackFn(textValue || 0);\n });\n\n this.addManagedListener(this.eSlider, eventChanged, () => {\n const sliderValue = this.eSlider.getValue()!;\n this.eText.setValue(sliderValue, true);\n callbackFn(parseFloat(sliderValue));\n });\n\n return this;\n }\n\n public setSliderWidth(width: number): this {\n this.eSlider.setWidth(width);\n return this;\n }\n\n public setTextFieldWidth(width: number): this {\n this.eText.setWidth(width);\n return this;\n }\n\n public setMinValue(minValue: number): this {\n this.eSlider.setMinValue(minValue);\n this.eText.setMin(minValue);\n\n return this;\n }\n\n public setMaxValue(maxValue: number): this {\n this.eSlider.setMaxValue(maxValue);\n this.eText.setMax(maxValue);\n return this;\n }\n\n public getValue(): string | null | undefined {\n return this.eText.getValue();\n }\n\n public setValue(value: string): this {\n if (this.getValue() === value) {\n return this;\n }\n\n this.eText.setValue(value, true);\n this.eSlider.setValue(value, true);\n\n this.dispatchEvent({ type: AgAbstractField.EVENT_CHANGED });\n\n return this;\n }\n\n public setStep(step: number): this {\n this.eSlider.setStep(step);\n this.eText.setStep(step);\n return this;\n }\n}\n","import { AgAbstractLabel, IAgLabel } from \"./agAbstractLabel\";\nimport { RefSelector } from \"./componentAnnotations\";\nimport { Autowired } from \"../context/context\";\nimport { DragService, DragListenerParams } from \"../dragAndDrop/dragService\";\nimport { AgInputNumberField } from \"./agInputNumberField\";\nimport { AgAbstractField } from \"./agAbstractField\";\nimport { exists } from \"../utils/generic\";\nimport { setFixedWidth } from \"../utils/dom\";\n\nexport class AgAngleSelect extends AgAbstractLabel {\n\n private static TEMPLATE = /* html */\n `
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
`;\n\n @RefSelector('eLabel') protected readonly eLabel: HTMLElement;\n @RefSelector('eParentCircle') private readonly eParentCircle: HTMLElement;\n @RefSelector('eChildCircle') private readonly eChildCircle: HTMLElement;\n @RefSelector('eAngleValue') private readonly eAngleValue: AgInputNumberField;\n\n @Autowired('dragService') protected readonly dragService: DragService;\n\n private parentCircleRect: ClientRect | DOMRect;\n private degrees: number;\n private radius: number = 0;\n private offsetX: number = 0;\n private offsetY: number = 0;\n private dragListener: DragListenerParams;\n\n constructor(config?: IAgLabel) {\n super(config, AgAngleSelect.TEMPLATE);\n }\n\n postConstruct() {\n super.postConstruct();\n\n this.dragListener = {\n eElement: this.eParentCircle,\n dragStartPixels: 0,\n onDragStart: (e: MouseEvent | Touch) => {\n this.parentCircleRect = this.eParentCircle.getBoundingClientRect();\n },\n onDragging: (e: MouseEvent | Touch) => this.calculateAngleDrag(e),\n onDragStop: () => { }\n };\n\n this.dragService.addDragSource(this.dragListener);\n\n this.eAngleValue\n .setLabel('')\n .setLabelWidth(5)\n .setInputWidth(45)\n .setMin(0)\n .setMax(360)\n .setValue(`${this.degrees}`)\n .onValueChange((value: string) => {\n if (value == null || value === '') {\n value = '0';\n }\n value = this.eAngleValue.normalizeValue(value);\n let floatValue = parseFloat(value);\n if (floatValue > 180) {\n floatValue = floatValue - 360;\n }\n this.setValue(floatValue);\n });\n\n this.updateNumberInput();\n\n if (exists(this.getValue())) {\n this.eAngleValue.setValue(this.normalizeNegativeValue(this.getValue()).toString());\n }\n\n this.addManagedListener(this, AgAbstractField.EVENT_CHANGED, () => {\n const eDocument = this.gridOptionsWrapper.getDocument();\n if (this.eAngleValue.getInputElement().contains(eDocument.activeElement)) {\n return;\n }\n this.updateNumberInput();\n });\n }\n\n private updateNumberInput(): void {\n const normalizedValue = this.normalizeNegativeValue(this.getValue());\n this.eAngleValue.setValue(normalizedValue.toString());\n }\n\n private positionChildCircle(radians: number) {\n const rect = this.parentCircleRect || { width: 24, height: 24 };\n const eChildCircle = this.eChildCircle;\n\n const centerX = rect.width / 2;\n const centerY = rect.height / 2;\n\n eChildCircle.style.left = `${centerX + Math.cos(radians) * 8}px`;\n eChildCircle.style.top = `${centerY + Math.sin(radians) * 8}px`;\n }\n\n private calculatePolar() {\n const x = this.offsetX;\n const y = this.offsetY;\n\n const radians = Math.atan2(y, x);\n this.degrees = this.toDegrees(radians);\n this.radius = Math.sqrt((x * x) + (y * y));\n\n this.positionChildCircle(radians);\n }\n\n private calculateCartesian() {\n const radians = this.toRadians(this.getValue());\n const radius = this.getRadius();\n\n this\n .setOffsetX(Math.cos(radians) * radius)\n .setOffsetY(Math.sin(radians) * radius);\n }\n\n private setOffsetX(offset: number): this {\n if (this.offsetX !== offset) {\n this.offsetX = offset;\n this.calculatePolar();\n }\n\n return this;\n }\n\n private setOffsetY(offset: number): this {\n if (this.offsetY !== offset) {\n this.offsetY = offset;\n this.calculatePolar();\n }\n return this;\n }\n\n private calculateAngleDrag(e: MouseEvent | Touch) {\n const rect = this.parentCircleRect;\n const centerX = rect.width / 2;\n const centerY = rect.height / 2;\n\n const x = e.clientX - rect.left;\n const y = e.clientY - rect.top;\n\n const dx = x - centerX;\n const dy = y - centerY;\n\n const radians = Math.atan2(dy, dx);\n\n this.setValue(radians, true);\n }\n\n private toDegrees(radians: number): number {\n return radians / Math.PI * 180;\n }\n\n private toRadians(degrees: number): number {\n return degrees / 180 * Math.PI;\n }\n\n private normalizeNegativeValue(degrees: number): number {\n return degrees < 0 ? 360 + degrees : degrees;\n }\n\n private normalizeAngle180(radians: number): number {\n radians %= Math.PI * 2;\n\n if (radians < -Math.PI) {\n radians += Math.PI * 2;\n } else if (radians >= Math.PI) {\n radians -= Math.PI * 2;\n }\n\n return radians;\n }\n\n public getRadius(): number {\n return this.radius;\n }\n\n public setRadius(r: number): this {\n if (this.radius === r) { return this; }\n this.radius = r;\n this.calculateCartesian();\n\n return this;\n }\n\n public onValueChange(callbackFn: (newValue: number) => void): this {\n this.addManagedListener(this, AgAbstractField.EVENT_CHANGED, () => {\n callbackFn(this.degrees);\n });\n return this;\n }\n\n public getValue(radians?: boolean): number {\n return radians ? this.toRadians(this.degrees) : this.degrees;\n }\n\n public setValue(degrees: number, radians?: boolean): this {\n let radiansValue: number;\n if (!radians) {\n radiansValue = this.normalizeAngle180(this.toRadians(degrees));\n } else {\n radiansValue = degrees;\n }\n\n degrees = this.toDegrees(radiansValue);\n\n if (this.degrees !== degrees) {\n this.degrees = Math.floor(degrees);\n this.calculateCartesian();\n this.positionChildCircle(radiansValue);\n this.dispatchEvent({ type: AgAbstractField.EVENT_CHANGED });\n }\n\n return this;\n }\n\n public setWidth(width: number): this {\n setFixedWidth(this.getGui(), width);\n return this;\n }\n\n protected destroy(): void {\n this.dragService.removeDragSource(this.dragListener);\n super.destroy();\n }\n}\n","import { Component } from \"./component\";\nimport { Color } from \"../utils\";\nimport { RefSelector } from \"./componentAnnotations\";\nimport { PostConstruct } from \"../context/context\";\nimport { AgColorPicker } from \"./agColorPicker\";\nimport { exists } from \"../utils/generic\";\n\nexport class AgColorPanel extends Component {\n private H = 1; // in the [0, 1] range\n private S = 1; // in the [0, 1] range\n private B = 1; // in the [0, 1] range\n private A = 1; // in the [0, 1] range\n\n private spectrumValRect?: ClientRect | DOMRect;\n private isSpectrumDragging = false;\n\n private spectrumHueRect?: ClientRect | DOMRect;\n private isSpectrumHueDragging = false;\n\n private spectrumAlphaRect?: ClientRect | DOMRect;\n private isSpectrumAlphaDragging = false;\n\n private picker: Component;\n\n private colorChanged = false;\n private static maxRecentColors = 8;\n private static recentColors: string[] = [];\n\n private static TEMPLATE = /* html */\n `
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
`;\n\n @RefSelector('spectrumColor') private readonly spectrumColor: HTMLElement;\n @RefSelector('spectrumVal') private readonly spectrumVal: HTMLElement;\n @RefSelector('spectrumDragger') private readonly spectrumDragger: HTMLElement;\n @RefSelector('spectrumHue') private readonly spectrumHue: HTMLElement;\n @RefSelector('spectrumHueSlider') private readonly spectrumHueSlider: HTMLElement;\n @RefSelector('spectrumAlpha') private readonly spectrumAlpha: HTMLElement;\n @RefSelector('spectrumAlphaSlider') private readonly spectrumAlphaSlider: HTMLElement;\n @RefSelector('recentColors') private readonly recentColors: HTMLElement;\n\n constructor(config: { picker: Component }) {\n super(AgColorPanel.TEMPLATE);\n this.picker = config.picker;\n }\n\n @PostConstruct\n private postConstruct() {\n const eGui = this.getGui();\n\n this.initRecentColors();\n\n this.addManagedListener(this.spectrumVal, 'mousedown', this.onSpectrumDraggerDown.bind(this));\n this.addManagedListener(eGui, 'mousemove', this.onSpectrumDraggerMove.bind(this));\n\n this.addManagedListener(this.spectrumHue, 'mousedown', this.onSpectrumHueDown.bind(this));\n this.addManagedListener(eGui, 'mousemove', this.onSpectrumHueMove.bind(this));\n\n this.addManagedListener(this.spectrumAlpha, 'mousedown', this.onSpectrumAlphaDown.bind(this));\n this.addManagedListener(eGui, 'mousemove', this.onSpectrumAlphaMove.bind(this));\n\n // Listening to `mouseup` on the document on purpose. The user might release the mouse button\n // outside the UI control. When the mouse returns back to the control's area, the dragging\n // of the thumb is not expected and seen as a bug.\n this.addManagedListener(document, 'mouseup', this.onMouseUp.bind(this));\n\n this.addManagedListener(this.recentColors, 'click', this.onRecentColorClick.bind(this));\n }\n\n private refreshSpectrumRect() {\n return this.spectrumValRect = this.spectrumVal.getBoundingClientRect();\n }\n\n private refreshHueRect() {\n return this.spectrumHueRect = this.spectrumHue.getBoundingClientRect();\n }\n\n private refreshAlphaRect() {\n return this.spectrumAlphaRect = this.spectrumAlpha.getBoundingClientRect();\n }\n\n private onSpectrumDraggerDown(e: MouseEvent) {\n this.refreshSpectrumRect();\n this.isSpectrumDragging = true;\n\n this.moveDragger(e);\n }\n\n private onSpectrumDraggerMove(e: MouseEvent) {\n if (this.isSpectrumDragging) {\n this.moveDragger(e);\n }\n }\n\n private onSpectrumHueDown(e: MouseEvent) {\n this.refreshHueRect();\n this.isSpectrumHueDragging = true;\n\n this.moveHueSlider(e);\n }\n\n private onSpectrumHueMove(e: MouseEvent) {\n if (this.isSpectrumHueDragging) {\n this.moveHueSlider(e);\n }\n }\n\n private onSpectrumAlphaDown(e: MouseEvent) {\n this.refreshAlphaRect();\n this.isSpectrumAlphaDragging = true;\n\n this.moveAlphaSlider(e);\n }\n\n private onSpectrumAlphaMove(e: MouseEvent) {\n if (this.isSpectrumAlphaDragging) {\n this.moveAlphaSlider(e);\n }\n }\n\n private onMouseUp() {\n this.isSpectrumDragging = false;\n this.isSpectrumHueDragging = false;\n this.isSpectrumAlphaDragging = false;\n }\n\n private moveDragger(e: MouseEvent) {\n const valRect = this.spectrumValRect;\n\n if (valRect) {\n let x = e.clientX - valRect.left;\n let y = e.clientY - valRect.top;\n\n x = Math.max(x, 0);\n x = Math.min(x, valRect.width);\n y = Math.max(y, 0);\n y = Math.min(y, valRect.height);\n\n this.setSpectrumValue(x / valRect.width, 1 - y / valRect.height);\n }\n }\n\n private moveHueSlider(e: MouseEvent) {\n const hueRect = this.spectrumHueRect;\n\n if (hueRect) {\n const slider = this.spectrumHueSlider;\n const sliderRect = slider.getBoundingClientRect();\n\n let x = e.clientX - hueRect.left;\n\n x = Math.max(x, 0);\n x = Math.min(x, hueRect.width);\n\n this.H = 1 - x / hueRect.width;\n\n slider.style.left = (x + sliderRect.width / 2) + 'px';\n\n this.update();\n }\n }\n\n private moveAlphaSlider(e: MouseEvent) {\n const alphaRect = this.spectrumAlphaRect;\n\n if (alphaRect) {\n const slider = this.spectrumAlphaSlider;\n const sliderRect = slider.getBoundingClientRect();\n\n let x = e.clientX - alphaRect.left;\n\n x = Math.max(x, 0);\n x = Math.min(x, alphaRect.width);\n\n this.A = x / alphaRect.width;\n\n slider.style.left = (x + sliderRect.width / 2) + 'px';\n\n this.update();\n }\n }\n\n private update() {\n const color = Color.fromHSB(this.H * 360, this.S, this.B, this.A);\n const spectrumColor = Color.fromHSB(this.H * 360, 1, 1);\n const rgbaColor = color.toRgbaString();\n\n // the recent color list needs to know color has actually changed\n const colorPicker = this.picker as AgColorPicker;\n\n const existingColor = Color.fromString(colorPicker.getValue());\n if (existingColor.toRgbaString() !== rgbaColor) {\n this.colorChanged = true;\n }\n\n colorPicker.setValue(rgbaColor);\n\n this.spectrumColor.style.backgroundColor = spectrumColor.toRgbaString();\n this.spectrumDragger.style.backgroundColor = rgbaColor;\n }\n\n /**\n * @param saturation In the [0, 1] interval.\n * @param brightness In the [0, 1] interval.\n */\n public setSpectrumValue(saturation: number, brightness: number) {\n const valRect = this.spectrumValRect || this.refreshSpectrumRect();\n\n if (valRect) {\n const dragger = this.spectrumDragger;\n const draggerRect = dragger.getBoundingClientRect();\n\n saturation = Math.max(0, saturation);\n saturation = Math.min(1, saturation);\n brightness = Math.max(0, brightness);\n brightness = Math.min(1, brightness);\n\n this.S = saturation;\n this.B = brightness;\n\n dragger.style.left = (saturation * valRect.width - draggerRect.width / 2) + 'px';\n dragger.style.top = ((1 - brightness) * valRect.height - draggerRect.height / 2) + 'px';\n\n this.update();\n }\n }\n\n private initRecentColors() {\n const recentColors = AgColorPanel.recentColors;\n const innerHtml = recentColors.map((color: string, index: number) => {\n return `
`;\n });\n\n this.recentColors.innerHTML = innerHtml.join('');\n }\n\n public setValue(val: string) {\n const color: Color = Color.fromString(val);\n const [h, s, b] = color.toHSB();\n\n this.H = (isNaN(h) ? 0 : h) / 360;\n this.A = color.a;\n\n const spectrumHueRect = this.spectrumHueRect || this.refreshHueRect();\n const spectrumAlphaRect = this.spectrumAlphaRect || this.refreshAlphaRect();\n\n this.spectrumHueSlider.style.left = `${((this.H - 1) * -spectrumHueRect.width)}px`;\n this.spectrumAlphaSlider.style.left = `${(this.A * spectrumAlphaRect.width)}px`;\n\n this.setSpectrumValue(s, b);\n }\n\n private onRecentColorClick(e: MouseEvent) {\n const target = e.target as HTMLElement;\n\n if (!exists(target.id)) {\n return;\n }\n\n const id = parseInt(target.id, 10);\n\n this.setValue(AgColorPanel.recentColors[id]);\n this.destroy();\n }\n\n private addRecentColor() {\n const color = Color.fromHSB(this.H * 360, this.S, this.B, this.A);\n const rgbaColor = color.toRgbaString();\n\n let recentColors = AgColorPanel.recentColors;\n\n if (!this.colorChanged || recentColors[0] === rgbaColor) {\n return;\n }\n\n // remove duplicate color\n recentColors = recentColors.filter(currentColor => currentColor != rgbaColor);\n\n // add color to head\n recentColors = [rgbaColor].concat(recentColors);\n\n // ensure we don't exceed max number of recent colors\n if (recentColors.length > AgColorPanel.maxRecentColors) {\n recentColors = recentColors.slice(0, AgColorPanel.maxRecentColors);\n }\n\n AgColorPanel.recentColors = recentColors;\n }\n\n protected destroy(): void {\n this.addRecentColor();\n super.destroy();\n }\n}\n","import { RefSelector } from \"./componentAnnotations\";\nimport { PostConstruct } from \"../context/context\";\nimport { Component } from \"./component\";\nimport { getInnerHeight, getInnerWidth } from \"../utils/dom\";\nimport { createIconNoSpan } from \"../utils/icon\";\nimport { PositionableFeature, PositionableOptions, ResizableStructure } from \"../rendering/features/positionableFeature\";\n\nexport interface PanelOptions extends PositionableOptions {\n component?: Component;\n hideTitleBar?: boolean | null;\n closable?: boolean | null;\n resizable?: boolean | ResizableStructure;\n title?: string | null;\n cssIdentifier?: string | null;\n}\n\nexport class AgPanel extends Component {\n\n protected static CLOSE_BTN_TEMPLATE = /* html */ `
`;\n protected closable = true;\n protected config: PanelOptions | undefined;\n\n protected closeButtonComp: Component | undefined;\n protected positionableFeature: PositionableFeature;\n public close: () => void;\n\n @RefSelector('eContentWrapper') protected readonly eContentWrapper: HTMLElement;\n @RefSelector('eTitleBar') protected readonly eTitleBar: HTMLElement;\n @RefSelector('eTitleBarButtons') protected readonly eTitleBarButtons: HTMLElement;\n @RefSelector('eTitle') protected readonly eTitle: HTMLElement;\n\n constructor(config?: PanelOptions) {\n super(AgPanel.getTemplate(config));\n this.config = config;\n }\n\n private static getTemplate(config?: PanelOptions) {\n const cssIdentifier = (config && config.cssIdentifier) || 'default';\n return /* html */ `
\n
\n \n
\n
\n
\n
`;\n }\n\n @PostConstruct\n protected postConstruct() {\n const {\n component,\n closable,\n hideTitleBar,\n title,\n minWidth = 250,\n width,\n minHeight = 250,\n height,\n centered,\n popup,\n x,\n y\n } = this.config as PanelOptions;\n\n this.positionableFeature = new PositionableFeature(this.getGui(), {\n minWidth, width, minHeight, height, centered, x, y, popup,\n calculateTopBuffer: () => this.positionableFeature.getHeight()! - this.getBodyHeight()\n });\n\n this.createManagedBean(this.positionableFeature);\n\n const eGui = this.getGui();\n\n if (component) { this.setBodyComponent(component); }\n\n if (!hideTitleBar) {\n if (title) { this.setTitle(title); }\n this.setClosable(closable != null ? closable : this.closable);\n } else {\n this.eTitleBar.classList.add('ag-hidden');\n }\n\n this.addManagedListener(this.eTitleBar, 'mousedown', (e: MouseEvent) => {\n const eDocument = this.gridOptionsWrapper.getDocument();\n if (\n eGui.contains(e.relatedTarget as HTMLElement) ||\n eGui.contains(eDocument.activeElement) ||\n this.eTitleBarButtons.contains(e.target as HTMLElement)\n ) {\n e.preventDefault();\n return;\n }\n\n const focusEl = this.eContentWrapper.querySelector('button, [href], input, select, textarea, [tabindex]');\n\n if (focusEl) {\n (focusEl as HTMLElement).focus();\n }\n });\n\n if (popup && this.positionableFeature.isPositioned()) { return; }\n\n if (this.renderComponent) {\n this.renderComponent();\n }\n\n this.positionableFeature.initialisePosition();\n this.eContentWrapper.style.height = '0';\n }\n\n protected renderComponent() {\n const eGui = this.getGui();\n eGui.focus();\n\n this.close = () => {\n eGui.parentElement!.removeChild(eGui);\n this.destroy();\n };\n }\n\n public getHeight(): number | undefined {\n return this.positionableFeature.getHeight();\n }\n\n public setHeight(height: number | string): void {\n this.positionableFeature.setHeight(height);\n }\n\n public getWidth(): number | undefined {\n return this.positionableFeature.getWidth();\n }\n\n public setWidth(width: number | string): void {\n this.positionableFeature.setWidth(width);\n }\n\n public setClosable(closable: boolean) {\n if (closable !== this.closable) {\n this.closable = closable;\n }\n\n if (closable) {\n const closeButtonComp = this.closeButtonComp = new Component(AgPanel.CLOSE_BTN_TEMPLATE);\n this.getContext().createBean(closeButtonComp);\n\n const eGui = closeButtonComp.getGui();\n const child = createIconNoSpan('close', this.gridOptionsWrapper)!;\n child.classList.add('ag-panel-title-bar-button-icon');\n eGui.appendChild(child);\n\n this.addTitleBarButton(closeButtonComp);\n closeButtonComp.addManagedListener(eGui, 'click', this.onBtClose.bind(this));\n } else if (this.closeButtonComp) {\n const eGui = this.closeButtonComp.getGui();\n eGui.parentElement!.removeChild(eGui);\n\n this.closeButtonComp = this.destroyBean(this.closeButtonComp);\n }\n }\n\n public setBodyComponent(bodyComponent: Component) {\n bodyComponent.setParentComponent(this);\n this.eContentWrapper.appendChild(bodyComponent.getGui());\n }\n\n public addTitleBarButton(button: Component, position?: number) {\n const eTitleBarButtons = this.eTitleBarButtons;\n const buttons = eTitleBarButtons.children;\n const len = buttons.length;\n\n if (position == null) {\n position = len;\n }\n\n position = Math.max(0, Math.min(position, len));\n\n button.addCssClass('ag-panel-title-bar-button');\n\n const eGui = button.getGui();\n\n if (position === 0) {\n eTitleBarButtons.insertAdjacentElement('afterbegin', eGui);\n } else if (position === len) {\n eTitleBarButtons.insertAdjacentElement('beforeend', eGui);\n } else {\n buttons[position - 1].insertAdjacentElement('afterend', eGui);\n }\n\n button.setParentComponent(this);\n }\n\n public getBodyHeight(): number {\n return getInnerHeight(this.eContentWrapper);\n }\n\n public getBodyWidth(): number {\n return getInnerWidth(this.eContentWrapper);\n }\n\n public setTitle(title: string) {\n this.eTitle.innerText = title;\n }\n\n // called when user hits the 'x' in the top right\n private onBtClose() {\n this.close();\n }\n\n protected destroy(): void {\n if (this.closeButtonComp) {\n this.closeButtonComp = this.destroyBean(this.closeButtonComp);\n }\n\n const eGui = this.getGui();\n\n if (eGui && eGui.offsetParent) {\n this.close();\n }\n\n super.destroy();\n }\n}\n","import { Autowired } from \"../context/context\";\nimport { PanelOptions, AgPanel } from \"./agPanel\";\nimport { Component } from \"./component\";\nimport { setDisplayed } from \"../utils/dom\";\nimport { createIconNoSpan } from \"../utils/icon\";\nimport { PopupService } from \"./popupService\";\nimport { ResizableStructure } from \"../rendering/features/positionableFeature\";\n\nexport type ResizableSides = 'topLeft' |\n 'top' |\n 'topRight' |\n 'right' |\n 'bottomRight' |\n 'bottom' |\n 'bottomLeft' |\n 'left';\n\nexport interface DialogOptions extends PanelOptions {\n eWrapper?: HTMLElement;\n modal?: boolean;\n movable?: boolean;\n alwaysOnTop?: boolean;\n maximizable?: boolean;\n}\n\nexport class AgDialog extends AgPanel {\n\n @Autowired('popupService') private popupService: PopupService;\n\n private isMaximizable: boolean = false;\n private isMaximized: boolean = false;\n private maximizeListeners: (() => void)[] = [];\n private maximizeButtonComp: Component | undefined;\n private maximizeIcon: HTMLElement | undefined;\n private minimizeIcon: HTMLElement | undefined;\n private resizeListenerDestroy: (() => void) | null | undefined = null;\n\n private lastPosition = {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n };\n\n protected config: DialogOptions | undefined;\n\n constructor(config: DialogOptions) {\n super({...config, popup: true });\n }\n\n protected postConstruct() {\n const eGui = this.getGui();\n const { movable, resizable, maximizable } = this.config as DialogOptions;\n\n this.addCssClass('ag-dialog');\n\n super.postConstruct();\n\n this.addManagedListener(eGui, 'focusin', (e: FocusEvent) => {\n if (eGui.contains(e.relatedTarget as HTMLElement)) { return; }\n this.popupService.bringPopupToFront(eGui);\n });\n\n if (movable) { this.setMovable(movable); }\n if (maximizable) { this.setMaximizable(maximizable); }\n if (resizable) { this.setResizable(resizable); }\n }\n\n protected renderComponent() {\n const eGui = this.getGui();\n const { alwaysOnTop, modal, title } = this.config as DialogOptions;\n const translate = this.gridOptionsWrapper.getLocaleTextFunc();\n\n const addPopupRes = this.popupService.addPopup({\n modal,\n eChild: eGui,\n closeOnEsc: true,\n closedCallback: this.destroy.bind(this),\n alwaysOnTop,\n ariaLabel: title || translate('ariaLabelDialog', 'Dialog')\n });\n\n if (addPopupRes) {\n this.close = addPopupRes.hideFunc;\n }\n }\n\n private toggleMaximize() {\n const position = this.positionableFeature.getPosition();\n if (this.isMaximized) {\n const { x, y, width, height } = this.lastPosition;\n this.setWidth(width);\n this.setHeight(height);\n this.positionableFeature.offsetElement(x, y);\n } else {\n this.lastPosition.width = this.getWidth()!;\n this.lastPosition.height = this.getHeight()!;\n this.lastPosition.x = position.x;\n this.lastPosition.y = position.y;\n this.positionableFeature.offsetElement(0, 0);\n this.setHeight('100%');\n this.setWidth('100%');\n }\n\n this.isMaximized = !this.isMaximized;\n this.refreshMaximizeIcon();\n }\n\n private refreshMaximizeIcon() {\n setDisplayed(this.maximizeIcon!, !this.isMaximized);\n setDisplayed(this.minimizeIcon!, this.isMaximized);\n }\n\n private clearMaximizebleListeners() {\n if (this.maximizeListeners.length) {\n this.maximizeListeners.forEach(destroyListener => destroyListener());\n this.maximizeListeners.length = 0;\n }\n\n if (this.resizeListenerDestroy) {\n this.resizeListenerDestroy();\n this.resizeListenerDestroy = null;\n }\n }\n\n protected destroy(): void {\n this.maximizeButtonComp = this.destroyBean(this.maximizeButtonComp);\n\n this.clearMaximizebleListeners();\n super.destroy();\n }\n\n public setResizable(resizable: boolean | ResizableStructure) {\n this.positionableFeature.setResizable(resizable);\n }\n\n public setMovable(movable: boolean) {\n this.positionableFeature.setMovable(movable, this.eTitleBar);\n }\n\n public setMaximizable(maximizable: boolean) {\n if (!maximizable) {\n this.clearMaximizebleListeners();\n\n if (this.maximizeButtonComp) {\n this.destroyBean(this.maximizeButtonComp);\n this.maximizeButtonComp = this.maximizeIcon = this.minimizeIcon = undefined;\n }\n\n return;\n }\n\n const eTitleBar = this.eTitleBar;\n\n if (!eTitleBar || maximizable === this.isMaximizable) { return; }\n\n const maximizeButtonComp = this.maximizeButtonComp =\n this.createBean(new Component(/* html */`
`));\n\n const eGui = maximizeButtonComp.getGui();\n\n eGui.appendChild(this.maximizeIcon = createIconNoSpan('maximize', this.gridOptionsWrapper)!);\n this.maximizeIcon.classList.add('ag-panel-title-bar-button-icon');\n\n eGui.appendChild(this.minimizeIcon = createIconNoSpan('minimize', this.gridOptionsWrapper)!);\n this.minimizeIcon.classList.add('ag-panel-title-bar-button-icon', 'ag-hidden');\n\n maximizeButtonComp.addManagedListener(eGui, 'click', this.toggleMaximize.bind(this));\n\n this.addTitleBarButton(maximizeButtonComp, 0);\n\n this.maximizeListeners.push(\n this.addManagedListener(eTitleBar, 'dblclick', this.toggleMaximize.bind(this))!\n );\n\n this.resizeListenerDestroy = this.addManagedListener(this, 'resize', () => {\n this.isMaximized = false;\n this.refreshMaximizeIcon();\n });\n }\n}\n","import { AgColorPanel } from \"./agColorPanel\";\nimport { AgDialog } from \"./agDialog\";\nimport { IAgLabel } from \"./agAbstractLabel\";\nimport { AgPickerField } from \"./agPickerField\";\nimport { setAriaExpanded } from \"../utils/aria\";\n\ninterface ColorPickerConfig extends IAgLabel {\n color: string;\n}\n\nexport class AgColorPicker extends AgPickerField {\n constructor(config?: ColorPickerConfig) {\n super(config, 'ag-color-picker', 'colorPicker');\n\n if (config && config.color) {\n this.value = config.color;\n }\n }\n\n protected postConstruct() {\n super.postConstruct();\n\n if (this.value) {\n this.setValue(this.value);\n }\n }\n\n public showPicker() {\n const eGuiRect = this.getGui().getBoundingClientRect();\n const colorDialog = this.createBean(new AgDialog({\n closable: false,\n modal: true,\n hideTitleBar: true,\n minWidth: 190,\n width: 190,\n height: 250,\n x: eGuiRect.right - 190,\n y: eGuiRect.top - 250\n }));\n\n this.isPickerDisplayed = true;\n\n colorDialog.addCssClass('ag-color-dialog');\n setAriaExpanded(this.eWrapper, true);\n\n const colorPanel = this.createBean(new AgColorPanel({ picker: this }));\n\n colorPanel.addDestroyFunc(() => {\n if (colorDialog.isAlive()) {\n this.destroyBean(colorDialog);\n }\n });\n\n colorDialog.setParentComponent(this);\n colorDialog.setBodyComponent(colorPanel);\n colorPanel.setValue(this.getValue());\n\n colorDialog.addDestroyFunc(() => {\n // here we check if the picker was already being\n // destroyed to avoid a stack overflow\n if (!this.isDestroyingPicker) {\n this.isDestroyingPicker = true;\n\n if (colorPanel.isAlive()) {\n this.destroyBean(colorPanel);\n }\n } else {\n this.isDestroyingPicker = false;\n }\n\n if (this.isAlive()) {\n setAriaExpanded(this.eWrapper, false);\n this.getFocusableElement().focus();\n }\n\n this.isPickerDisplayed = false;\n });\n\n return colorDialog;\n }\n\n public setValue(color: string): this {\n if (this.value === color) { return this; }\n\n this.eDisplayField.style.backgroundColor = color;\n\n return super.setValue(color);\n }\n\n public getValue(): string {\n return this.value;\n }\n}\n","import { Component } from './component';\nimport { RefSelector } from './componentAnnotations';\nimport { PostConstruct } from '../context/context';\nimport { AgCheckbox } from './agCheckbox';\nimport { createIcon } from '../utils/icon';\nimport { setDisplayed } from '../utils/dom';\nimport { KeyCode } from '../constants/keyCode';\nimport { setAriaExpanded } from '../utils/aria';\n\ntype GroupItem = Component | HTMLElement;\ntype Align = 'start' | 'end' | 'center' | 'stretch';\ntype Direction = 'horizontal' | 'vertical';\n\nexport interface AgGroupComponentParams {\n title?: string;\n enabled?: boolean;\n suppressEnabledCheckbox?: boolean;\n suppressOpenCloseIcons?: boolean;\n cssIdentifier?: string;\n items?: GroupItem[];\n alignItems?: Align;\n direction?: Direction;\n}\n\nexport class AgGroupComponent extends Component {\n public static EVENT_EXPANDED = 'expanded';\n public static EVENT_COLLAPSED = 'collapsed';\n\n private items: GroupItem[];\n private title: string | undefined;\n private cssIdentifier: string;\n private enabled: boolean;\n private expanded: boolean;\n private suppressEnabledCheckbox: boolean = true;\n private suppressOpenCloseIcons: boolean = false;\n private alignItems: Align | undefined;\n\n @RefSelector('eTitleBar') private eTitleBar: HTMLElement;\n @RefSelector('eGroupOpenedIcon') private eGroupOpenedIcon: HTMLElement;\n @RefSelector('eGroupClosedIcon') private eGroupClosedIcon: HTMLElement;\n @RefSelector('eToolbar') private eToolbar: HTMLElement;\n @RefSelector('cbGroupEnabled') private cbGroupEnabled: AgCheckbox;\n @RefSelector('eTitle') private eTitle: HTMLElement;\n @RefSelector('eContainer') private eContainer: HTMLElement;\n\n constructor(params: AgGroupComponentParams = {}) {\n super(AgGroupComponent.getTemplate(params));\n\n const { title, enabled, items, suppressEnabledCheckbox, suppressOpenCloseIcons } = params;\n\n this.title = title;\n this.cssIdentifier = params.cssIdentifier || 'default';\n this.enabled = enabled != null ? enabled : true;\n this.items = items || [];\n\n this.alignItems = params.alignItems || 'center';\n\n if (suppressEnabledCheckbox != null) {\n this.suppressEnabledCheckbox = suppressEnabledCheckbox;\n }\n\n if (suppressOpenCloseIcons != null) {\n this.suppressOpenCloseIcons = suppressOpenCloseIcons;\n }\n }\n\n private static getTemplate(params: AgGroupComponentParams) {\n const cssIdentifier = params.cssIdentifier || 'default';\n const direction: Direction = params.direction || 'vertical';\n\n return /* html */ `
\n
\n \n \n \n
\n
\n \n
\n
\n
`;\n }\n\n @PostConstruct\n private postConstruct() {\n if (this.items.length) {\n const initialItems = this.items;\n this.items = [];\n\n this.addItems(initialItems);\n }\n\n const localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n this.cbGroupEnabled.setLabel(localeTextFunc('enabled', 'Enabled'));\n\n if (this.title) {\n this.setTitle(this.title);\n }\n\n if (this.enabled) {\n this.setEnabled(this.enabled);\n }\n\n this.setAlignItems(this.alignItems);\n\n this.hideEnabledCheckbox(this.suppressEnabledCheckbox);\n this.hideOpenCloseIcons(this.suppressOpenCloseIcons);\n\n this.setupExpandContract();\n this.refreshAriaStatus();\n this.refreshChildDisplay();\n }\n\n private setupExpandContract(): void {\n this.eGroupClosedIcon.appendChild(createIcon('columnSelectClosed', this.gridOptionsWrapper, null));\n this.eGroupOpenedIcon.appendChild(createIcon('columnSelectOpen', this.gridOptionsWrapper, null));\n this.addManagedListener(this.eTitleBar, 'click', () => this.toggleGroupExpand());\n this.addManagedListener(this.eTitleBar, 'keydown', (e: KeyboardEvent) => {\n switch (e.key) {\n case KeyCode.ENTER:\n case KeyCode.SPACE:\n e.preventDefault();\n this.toggleGroupExpand();\n break;\n case KeyCode.RIGHT:\n case KeyCode.LEFT:\n e.preventDefault();\n this.toggleGroupExpand(e.key === KeyCode.RIGHT);\n break;\n }\n });\n }\n\n private refreshAriaStatus(): void {\n if (!this.suppressOpenCloseIcons) {\n setAriaExpanded(this.eTitleBar, this.expanded);\n }\n }\n\n private refreshChildDisplay(): void {\n const showIcon = !this.suppressOpenCloseIcons;\n\n setDisplayed(this.eToolbar, this.expanded && !this.suppressEnabledCheckbox);\n setDisplayed(this.eGroupOpenedIcon, showIcon && this.expanded);\n setDisplayed(this.eGroupClosedIcon, showIcon && !this.expanded);\n }\n\n public isExpanded(): boolean {\n return this.expanded;\n }\n\n public setAlignItems(alignment: AgGroupComponentParams['alignItems']): this {\n if (this.alignItems !== alignment) {\n this.removeCssClass(`ag-group-item-alignment-${this.alignItems}`);\n }\n\n this.alignItems = alignment;\n const newCls = `ag-group-item-alignment-${this.alignItems}`;\n\n this.addCssClass(newCls);\n\n return this;\n }\n\n public toggleGroupExpand(expanded?: boolean): this {\n if (this.suppressOpenCloseIcons) {\n this.expanded = true;\n this.refreshChildDisplay();\n setDisplayed(this.eContainer, true);\n\n return this;\n }\n\n expanded = expanded != null ? expanded : !this.expanded;\n\n if (this.expanded === expanded) {\n return this;\n }\n\n this.expanded = expanded;\n this.refreshAriaStatus();\n this.refreshChildDisplay();\n\n setDisplayed(this.eContainer, expanded);\n\n this.dispatchEvent({ type: this.expanded ? AgGroupComponent.EVENT_EXPANDED : AgGroupComponent.EVENT_COLLAPSED });\n\n return this;\n }\n\n public addItems(items: GroupItem[]) {\n items.forEach(item => this.addItem(item));\n }\n\n public addItem(item: GroupItem) {\n const container = this.eContainer;\n const el = item instanceof Component ? item.getGui() : item;\n\n el.classList.add('ag-group-item', `ag-${this.cssIdentifier}-group-item`);\n\n container.appendChild(el);\n this.items.push(el);\n }\n\n public hideItem(hide: boolean, index: number) {\n const itemToHide = this.items[index] as HTMLElement;\n itemToHide.classList.toggle('ag-hidden', hide);\n }\n\n public setTitle(title: string): this {\n this.eTitle.innerText = title;\n return this;\n }\n\n public addCssClassToTitleBar(cssClass: string) {\n this.eTitleBar.classList.add(cssClass);\n }\n\n public setEnabled(enabled: boolean, skipToggle?: boolean): this {\n this.enabled = enabled;\n this.refreshDisabledStyles();\n\n this.toggleGroupExpand(enabled);\n\n if (!skipToggle) {\n this.cbGroupEnabled.setValue(enabled);\n }\n\n return this;\n }\n\n public isEnabled(): boolean {\n return this.enabled;\n }\n\n public onEnableChange(callbackFn: (enabled: boolean) => void): this {\n this.cbGroupEnabled.onValueChange((newSelection: boolean) => {\n this.setEnabled(newSelection, true);\n callbackFn(newSelection);\n });\n\n return this;\n }\n\n public hideEnabledCheckbox(hide: boolean): this {\n this.suppressEnabledCheckbox = hide;\n this.refreshChildDisplay();\n this.refreshDisabledStyles();\n return this;\n }\n\n public hideOpenCloseIcons(hide: boolean): this {\n this.suppressOpenCloseIcons = hide;\n\n if (hide) {\n this.toggleGroupExpand(true);\n }\n\n return this;\n }\n\n private refreshDisabledStyles() {\n this.addOrRemoveCssClass('ag-disabled', !this.enabled);\n\n if (this.suppressEnabledCheckbox && !this.enabled) {\n this.eTitleBar.classList.add('ag-disabled-group-title-bar');\n this.eTitleBar.removeAttribute('tabindex');\n } else {\n this.eTitleBar.classList.remove('ag-disabled-group-title-bar');\n this.eTitleBar.setAttribute('tabindex', '0');\n }\n\n this.eContainer.classList.toggle('ag-disabled-group-container', !this.enabled);\n }\n}\n","import { BeanStub } from \"../context/beanStub\";\nimport { Autowired, PostConstruct } from \"../context/context\";\nimport { FocusService } from \"../focusService\";\nimport { ManagedFocusFeature } from \"./managedFocusFeature\";\n\nexport interface ITabGuard {\n setTabIndex(tabIndex?: string): void;\n}\n\nexport class TabGuardCtrl extends BeanStub {\n\n @Autowired('focusService') private readonly focusService: FocusService;\n\n private readonly comp: ITabGuard;\n private readonly eTopGuard: HTMLElement;\n private readonly eBottomGuard: HTMLElement;\n\n private readonly eFocusableElement: HTMLElement;\n\n private readonly providedFocusInnerElement?: (fromBottom: boolean) => void;\n private readonly providedFocusIn?: (event: FocusEvent) => boolean;\n private readonly providedFocusOut?: (event: FocusEvent) => boolean;\n\n private readonly providedShouldStopEventPropagation?: () => boolean;\n private readonly providedOnTabKeyDown?: (e: KeyboardEvent) => void;\n private readonly providedHandleKeyDown?: (e: KeyboardEvent) => void;\n\n private skipTabGuardFocus: boolean = false;\n\n constructor(params: {\n comp: ITabGuard,\n eTopGuard: HTMLElement,\n eBottomGuard: HTMLElement,\n eFocusableElement: HTMLElement,\n focusInnerElement?: (fromBottom: boolean) => void,\n onFocusIn?: (event: FocusEvent) => boolean,\n onFocusOut?: (event: FocusEvent) => boolean,\n shouldStopEventPropagation?: () => boolean,\n onTabKeyDown?: (e: KeyboardEvent) => void,\n handleKeyDown?: (e: KeyboardEvent) => void\n }) {\n super();\n\n const {\n comp,\n eTopGuard,\n eBottomGuard,\n focusInnerElement,\n onFocusIn,\n onFocusOut,\n shouldStopEventPropagation,\n onTabKeyDown,\n handleKeyDown,\n eFocusableElement\n } = params;\n\n this.comp = comp;\n\n this.eTopGuard = eTopGuard;\n this.eBottomGuard = eBottomGuard;\n this.providedFocusInnerElement = focusInnerElement;\n this.eFocusableElement = eFocusableElement;\n\n this.providedFocusIn = onFocusIn;\n this.providedFocusOut = onFocusOut;\n this.providedShouldStopEventPropagation = shouldStopEventPropagation;\n this.providedOnTabKeyDown = onTabKeyDown;\n this.providedHandleKeyDown = handleKeyDown;\n }\n\n @PostConstruct\n private postConstruct() {\n this.createManagedBean(new ManagedFocusFeature(\n this.eFocusableElement,\n {\n shouldStopEventPropagation: () => this.shouldStopEventPropagation(),\n onTabKeyDown: e => this.onTabKeyDown(e),\n handleKeyDown: e => this.handleKeyDown(e),\n onFocusIn: e => this.onFocusIn(e),\n onFocusOut: e => this.onFocusOut(e)\n }\n ));\n\n this.activateTabGuards();\n\n [this.eTopGuard, this.eBottomGuard].forEach(\n guard => this.addManagedListener(guard, 'focus', this.onFocus.bind(this))\n );\n }\n\n private handleKeyDown(e: KeyboardEvent): void {\n if (this.providedHandleKeyDown) {\n this.providedHandleKeyDown(e);\n }\n }\n\n private tabGuardsAreActive(): boolean {\n return !!this.eTopGuard && this.eTopGuard.hasAttribute('tabIndex');\n }\n\n private shouldStopEventPropagation(): boolean {\n if (this.providedShouldStopEventPropagation) {\n return this.providedShouldStopEventPropagation();\n }\n return false;\n }\n\n private activateTabGuards(): void {\n this.comp.setTabIndex(this.getGridTabIndex());\n }\n\n private deactivateTabGuards(): void {\n this.comp.setTabIndex();\n }\n\n private onFocus(e: FocusEvent): void {\n if (this.skipTabGuardFocus) {\n this.skipTabGuardFocus = false;\n return;\n }\n\n const fromBottom = e.target === this.eBottomGuard;\n if (this.providedFocusInnerElement) {\n this.providedFocusInnerElement(fromBottom);\n } else {\n this.focusInnerElement(fromBottom);\n }\n }\n\n private onFocusIn(e: FocusEvent): void {\n if (this.providedFocusIn && this.providedFocusIn(e)) { return; }\n\n this.deactivateTabGuards();\n }\n\n private onFocusOut(e: FocusEvent): void {\n if (this.providedFocusOut && this.providedFocusOut(e)) { return; }\n\n if (!this.eFocusableElement.contains(e.relatedTarget as HTMLElement)) {\n this.activateTabGuards();\n }\n }\n\n public onTabKeyDown(e: KeyboardEvent): void {\n if (this.providedOnTabKeyDown) {\n this.providedOnTabKeyDown(e);\n return;\n }\n\n if (e.defaultPrevented) { return; }\n\n const tabGuardsAreActive = this.tabGuardsAreActive();\n\n if (tabGuardsAreActive) {\n this.deactivateTabGuards();\n }\n\n const nextRoot = this.getNextFocusableElement(e.shiftKey);\n\n if (tabGuardsAreActive) {\n // ensure the tab guards are only re-instated once the event has finished processing, to avoid the browser\n // tabbing to the tab guard from inside the component\n setTimeout(() => this.activateTabGuards(), 0);\n }\n\n if (!nextRoot) { return; }\n\n nextRoot.focus();\n e.preventDefault();\n }\n\n public getGridTabIndex(): string {\n return this.gridOptionsWrapper.getGridTabIndex();\n }\n\n public focusInnerElement(fromBottom = false): void {\n const focusable = this.focusService.findFocusableElements(this.eFocusableElement);\n\n if (this.tabGuardsAreActive()) {\n // remove tab guards from this component from list of focusable elements\n focusable.splice(0, 1);\n focusable.splice(focusable.length - 1, 1);\n }\n\n if (!focusable.length) { return; }\n\n focusable[fromBottom ? focusable.length - 1 : 0].focus();\n }\n\n public getNextFocusableElement(backwards?: boolean): HTMLElement | null {\n return this.focusService.findNextFocusableElement(this.eFocusableElement, false, backwards);\n }\n\n public forceFocusOutOfContainer(up: boolean = false): void {\n const tabGuardToFocus = up ? this.eTopGuard : this.eBottomGuard;\n\n this.activateTabGuards();\n this.skipTabGuardFocus = true;\n\n tabGuardToFocus.focus();\n }\n\n}","import { Component } from \"./component\";\nimport { isNodeOrElement, clearElement } from \"../utils/dom\";\nimport { TabGuardCtrl, ITabGuard } from \"./tabGuardCtrl\";\nimport { setAriaRole } from \"../utils/aria\";\n\nexport class TabGuardComp extends Component {\n\n private eTopGuard: HTMLElement;\n private eBottomGuard: HTMLElement;\n private eFocusableElement: HTMLElement;\n\n protected tabGuardCtrl: TabGuardCtrl;\n\n protected initialiseTabGuard(params: {\n focusInnerElement?: (fromBottom: boolean) => void;\n shouldStopEventPropagation?: () => boolean;\n /**\n * @return `true` to prevent the default onFocusIn behavior\n */\n onFocusIn?: (e: FocusEvent) => boolean;\n /**\n * @return `true` to prevent the default onFocusOut behavior\n */\n onFocusOut?: (e: FocusEvent) => boolean;\n onTabKeyDown?: (e: KeyboardEvent) => void;\n handleKeyDown?: (e: KeyboardEvent) => void;\n }) {\n this.eTopGuard = this.createTabGuard('top');\n this.eBottomGuard = this.createTabGuard('bottom');\n this.eFocusableElement = this.getFocusableElement();\n\n const tabGuards = [this.eTopGuard, this.eBottomGuard];\n\n const compProxy: ITabGuard = {\n setTabIndex: tabIndex => {\n tabGuards.forEach(tabGuard => tabIndex != null ? tabGuard.setAttribute('tabIndex', tabIndex) : tabGuard.removeAttribute('tabIndex'));\n }\n };\n\n this.addTabGuards(this.eTopGuard, this.eBottomGuard);\n\n this.tabGuardCtrl = this.createManagedBean(new TabGuardCtrl({\n comp: compProxy,\n eTopGuard: this.eTopGuard,\n eBottomGuard: this.eBottomGuard,\n eFocusableElement: this.eFocusableElement,\n onFocusIn: params.onFocusIn,\n onFocusOut: params.onFocusOut,\n focusInnerElement: params.focusInnerElement,\n handleKeyDown: params.handleKeyDown,\n onTabKeyDown: params.onTabKeyDown,\n shouldStopEventPropagation: params.shouldStopEventPropagation\n }));\n }\n\n private createTabGuard(side: 'top' | 'bottom'): HTMLElement {\n const tabGuard = document.createElement('div');\n\n tabGuard.classList.add('ag-tab-guard', `ag-tab-guard-${side}`);\n setAriaRole(tabGuard, 'presentation');\n\n return tabGuard;\n }\n\n private addTabGuards(topTabGuard: HTMLElement, bottomTabGuard: HTMLElement): void {\n this.eFocusableElement.insertAdjacentElement('afterbegin', topTabGuard);\n this.eFocusableElement.insertAdjacentElement('beforeend', bottomTabGuard);\n }\n\n protected removeAllChildrenExceptTabGuards(): void {\n const tabGuards: [HTMLElement, HTMLElement] = [this.eTopGuard, this.eBottomGuard];\n clearElement(this.getFocusableElement());\n this.addTabGuards(...tabGuards);\n }\n\n public forceFocusOutOfContainer(up: boolean = false): void {\n this.tabGuardCtrl.forceFocusOutOfContainer(up);\n }\n\n public appendChild(newChild: HTMLElement | Component, container?: HTMLElement): void {\n if (!isNodeOrElement(newChild)) {\n newChild = (newChild as Component).getGui();\n }\n\n const { eBottomGuard: bottomTabGuard } = this;\n\n if (bottomTabGuard) {\n bottomTabGuard.insertAdjacentElement('beforebegin', newChild as HTMLElement);\n } else {\n super.appendChild(newChild, container);\n }\n }\n}","\nimport { FocusService } from \"../focusService\";\nimport { Autowired, PostConstruct } from \"../context/context\";\nimport { AgMenuItemComponent, MenuItemSelectedEvent, MenuItemActivatedEvent } from \"./agMenuItemComponent\";\nimport { TabGuardComp } from \"./tabGuardComp\";\nimport { KeyCode } from \"../constants/keyCode\";\nimport { MenuItemDef } from \"../entities/gridOptions\";\nimport { loadTemplate } from \"../utils/dom\";\nimport { last } from \"../utils/array\";\nimport { setAriaLevel } from \"../utils/aria\";\n\nexport class AgMenuList extends TabGuardComp {\n\n @Autowired('focusService') private readonly focusService: FocusService;\n\n private menuItems: AgMenuItemComponent[] = [];\n private activeMenuItem: AgMenuItemComponent | null;\n\n constructor(private readonly level = 1) {\n super(/* html */`
`);\n }\n\n @PostConstruct\n private postConstruct() {\n this.initialiseTabGuard({\n onTabKeyDown: e => this.onTabKeyDown(e),\n handleKeyDown: e => this.handleKeyDown(e)\n });\n }\n\n protected onTabKeyDown(e: KeyboardEvent) {\n const parent = this.getParentComponent();\n const parentGui = parent && parent.getGui();\n const isManaged = parentGui && parentGui.classList.contains('ag-focus-managed');\n\n if (!isManaged) {\n e.preventDefault();\n }\n\n if (e.shiftKey) {\n this.closeIfIsChild(e);\n }\n }\n\n protected handleKeyDown(e: KeyboardEvent): void {\n switch (e.key) {\n case KeyCode.UP:\n case KeyCode.RIGHT:\n case KeyCode.DOWN:\n case KeyCode.LEFT:\n e.preventDefault();\n this.handleNavKey(e.key);\n break;\n case KeyCode.ESCAPE:\n const topMenu = this.findTopMenu();\n\n if (topMenu) {\n this.focusService.focusInto(topMenu.getGui());\n }\n\n break;\n }\n }\n\n public clearActiveItem(): void {\n if (this.activeMenuItem) {\n this.activeMenuItem.deactivate();\n this.activeMenuItem = null;\n }\n }\n\n public addMenuItems(menuItems?: (MenuItemDef | string)[]): void {\n if (menuItems == null) { return; }\n\n menuItems.forEach(menuItemOrString => {\n if (menuItemOrString === 'separator') {\n this.addSeparator();\n } else if (typeof menuItemOrString === 'string') {\n console.warn(`AG Grid: unrecognised menu item ${menuItemOrString}`);\n } else {\n this.addItem(menuItemOrString);\n }\n });\n }\n\n public addItem(menuItemDef: MenuItemDef): void {\n const menuItem = this.createManagedBean(new AgMenuItemComponent({\n ...menuItemDef,\n isAnotherSubMenuOpen: () => this.menuItems.some(m => m.isSubMenuOpen())\n }));\n\n menuItem.setParentComponent(this);\n\n setAriaLevel(menuItem.getGui(), this.level);\n\n this.menuItems.push(menuItem);\n this.appendChild(menuItem.getGui());\n\n this.addManagedListener(menuItem, AgMenuItemComponent.EVENT_MENU_ITEM_SELECTED, (event: MenuItemSelectedEvent) => {\n this.dispatchEvent(event);\n });\n\n this.addManagedListener(menuItem, AgMenuItemComponent.EVENT_MENU_ITEM_ACTIVATED, (event: MenuItemActivatedEvent) => {\n if (this.activeMenuItem && this.activeMenuItem !== event.menuItem) {\n this.activeMenuItem.deactivate();\n }\n\n this.activeMenuItem = event.menuItem;\n });\n }\n\n public activateFirstItem(): void {\n const item = this.menuItems.filter(currentItem => !currentItem.isDisabled())[0];\n\n if (!item) { return; }\n\n item.activate();\n }\n\n private addSeparator() {\n const separatorHtml = /* html */`\n
\n
\n
\n
\n
\n
`;\n\n this.appendChild(loadTemplate(separatorHtml));\n }\n\n private findTopMenu(): AgMenuList | undefined {\n let parent = this.getParentComponent();\n\n if (!parent && this instanceof AgMenuList) { return this; }\n\n while (true) {\n const nextParent = parent && parent.getParentComponent && parent.getParentComponent();\n\n if (!nextParent || (!(nextParent instanceof AgMenuList || nextParent instanceof AgMenuItemComponent))) {\n break;\n }\n\n parent = nextParent;\n }\n\n return parent instanceof AgMenuList ? parent : undefined;\n }\n\n private handleNavKey(key: string): void {\n switch (key) {\n case KeyCode.UP:\n case KeyCode.DOWN:\n const nextItem = this.findNextItem(key === KeyCode.UP);\n\n if (nextItem && nextItem !== this.activeMenuItem) {\n nextItem.activate();\n }\n\n return;\n }\n\n const left = this.gridOptionsWrapper.isEnableRtl() ? KeyCode.RIGHT : KeyCode.LEFT;\n\n if (key === left) {\n this.closeIfIsChild();\n } else {\n this.openChild();\n }\n }\n\n private closeIfIsChild(e?: KeyboardEvent): void {\n const parentItem = this.getParentComponent();\n\n if (parentItem && parentItem instanceof AgMenuItemComponent) {\n if (e) { e.preventDefault(); }\n\n parentItem.closeSubMenu();\n parentItem.getGui().focus();\n }\n }\n\n private openChild(): void {\n if (this.activeMenuItem) {\n this.activeMenuItem.openSubMenu(true);\n }\n }\n\n private findNextItem(up?: boolean): AgMenuItemComponent | undefined {\n const items = this.menuItems.filter(item => !item.isDisabled());\n\n if (!items.length) { return; }\n\n if (!this.activeMenuItem) {\n return up ? last(items) : items[0];\n }\n\n if (up) {\n items.reverse();\n }\n\n let nextItem: AgMenuItemComponent;\n let foundCurrent = false;\n\n for (let i = 0; i < items.length; i++) {\n const item = items[i];\n\n if (!foundCurrent) {\n if (item === this.activeMenuItem) {\n foundCurrent = true;\n }\n continue;\n }\n\n nextItem = item;\n break;\n }\n\n return nextItem! || this.activeMenuItem;\n }\n\n protected destroy(): void {\n this.clearActiveItem();\n super.destroy();\n }\n}\n","import { PostConstruct } from '../context/context';\nimport { KeyCode } from '../constants/keyCode';\nimport { AgMenuItemComponent } from './agMenuItemComponent';\nimport { TabGuardComp } from './tabGuardComp';\nimport { IComponent } from '../interfaces/iComponent';\n\nexport class AgMenuPanel extends TabGuardComp {\n constructor(private readonly wrappedComponent: IComponent) {\n super();\n\n this.setTemplateFromElement(wrappedComponent.getGui());\n }\n\n @PostConstruct\n private postConstruct() {\n this.initialiseTabGuard({\n onTabKeyDown: e => this.onTabKeyDown(e),\n handleKeyDown: e => this.handleKeyDown(e)\n });\n }\n\n private handleKeyDown(e: KeyboardEvent): void {\n if (e.key === KeyCode.ESCAPE) {\n this.closePanel();\n }\n }\n\n private onTabKeyDown(e: KeyboardEvent): void {\n if (e.defaultPrevented) { return; }\n\n this.closePanel();\n e.preventDefault();\n }\n\n private closePanel(): void {\n const menuItem = (this.parentComponent as AgMenuItemComponent);\n menuItem.closeSubMenu();\n setTimeout(() => menuItem.getGui().focus(), 0);\n }\n}","\nimport { AgEvent } from '../events';\nimport { IPopupComponent } from '../interfaces/iPopupComponent';\nimport { Autowired } from '../context/context';\nimport { AgMenuList } from './agMenuList';\nimport { AgMenuPanel } from './agMenuPanel';\nimport { Component } from './component';\nimport { PopupService } from './popupService';\nimport { KeyCode } from '../constants/keyCode';\nimport { PostConstruct } from '../context/context';\nimport { MenuItemLeafDef, MenuItemDef } from '../entities/gridOptions';\nimport { ITooltipParams } from '../rendering/tooltipComponent';\nimport { createIconNoSpan } from '../utils/icon';\nimport { isNodeOrElement, loadTemplate } from '../utils/dom';\nimport { CustomTooltipFeature } from './customTooltipFeature';\nimport { getAriaLevel, setAriaDisabled, setAriaExpanded } from '../utils/aria';\nimport { IComponent } from '../interfaces/iComponent';\nimport { WithoutGridCommon } from '../interfaces/iCommon';\n\ninterface MenuItemComponentParams extends MenuItemLeafDef {\n isCompact?: boolean;\n isAnotherSubMenuOpen: () => boolean;\n subMenu?: (MenuItemDef | string)[] | IComponent;\n}\n\nexport interface MenuItemSelectedEvent extends AgEvent {\n name: string;\n disabled?: boolean;\n shortcut?: string;\n action?: () => void;\n checked?: boolean;\n icon?: HTMLElement | string;\n subMenu?: (MenuItemDef | string)[] | IPopupComponent;\n cssClasses?: string[];\n tooltip?: string;\n event: MouseEvent | KeyboardEvent;\n}\n\nexport interface MenuItemActivatedEvent extends AgEvent {\n menuItem: AgMenuItemComponent;\n}\n\nexport class AgMenuItemComponent extends Component {\n @Autowired('popupService') private readonly popupService: PopupService;\n\n public static EVENT_MENU_ITEM_SELECTED = 'menuItemSelected';\n public static EVENT_MENU_ITEM_ACTIVATED = 'menuItemActivated';\n public static ACTIVATION_DELAY = 80;\n\n private isActive = false;\n private tooltip: string;\n private hideSubMenu: (() => void) | null;\n private subMenuIsOpen = false;\n private activateTimeoutId: number;\n private deactivateTimeoutId: number;\n\n constructor(private readonly params: MenuItemComponentParams) {\n super();\n\n this.setTemplate(/* html */`
`);\n }\n\n @PostConstruct\n private init() {\n this.addIcon();\n this.addName();\n this.addShortcut();\n this.addSubMenu();\n this.addTooltip();\n\n const eGui = this.getGui();\n\n if (this.params.disabled) {\n this.addCssClass(this.getClassName('disabled'));\n setAriaDisabled(eGui, true);\n } else {\n this.addGuiEventListener('click', e => this.onItemSelected(e));\n this.addGuiEventListener('keydown', (e: KeyboardEvent) => {\n if (e.key === KeyCode.ENTER || e.key === KeyCode.SPACE) {\n e.preventDefault();\n this.onItemSelected(e);\n }\n });\n this.addGuiEventListener('mousedown', e => {\n // Prevent event bubbling to other event handlers such as PopupService triggering\n // premature closing of any open sub-menu popup.\n e.stopPropagation();\n e.preventDefault();\n });\n\n this.addGuiEventListener('mouseenter', () => this.onMouseEnter());\n this.addGuiEventListener('mouseleave', () => this.onMouseLeave());\n }\n\n if (this.params.cssClasses) {\n this.params.cssClasses.forEach(it => this.addCssClass(it));\n }\n }\n\n public isDisabled(): boolean {\n return !!this.params.disabled;\n }\n\n public openSubMenu(activateFirstItem = false): void {\n this.closeSubMenu();\n\n if (!this.params.subMenu) { return; }\n\n const ePopup = loadTemplate(/* html */`
`);\n let destroySubMenu: () => void;\n\n if (this.params.subMenu instanceof Array) {\n const currentLevel = getAriaLevel(this.getGui());\n const nextLevel = isNaN(currentLevel) ? 1 : (currentLevel + 1);\n const childMenu = this.createBean(new AgMenuList(nextLevel));\n\n childMenu.setParentComponent(this);\n childMenu.addMenuItems(this.params.subMenu);\n ePopup.appendChild(childMenu.getGui());\n\n // bubble menu item selected events\n this.addManagedListener(childMenu, AgMenuItemComponent.EVENT_MENU_ITEM_SELECTED, e => this.dispatchEvent(e));\n childMenu.addGuiEventListener('mouseenter', () => this.cancelDeactivate());\n\n destroySubMenu = () => this.destroyBean(childMenu);\n\n if (activateFirstItem) {\n setTimeout(() => childMenu.activateFirstItem(), 0);\n }\n } else {\n const { subMenu } = this.params;\n\n const menuPanel = this.createBean(new AgMenuPanel(subMenu));\n menuPanel.setParentComponent(this);\n\n const subMenuGui = menuPanel.getGui();\n const mouseEvent = 'mouseenter';\n const mouseEnterListener = () => this.cancelDeactivate();\n\n subMenuGui.addEventListener(mouseEvent, mouseEnterListener);\n\n destroySubMenu = () => subMenuGui.removeEventListener(mouseEvent, mouseEnterListener);\n\n ePopup.appendChild(subMenuGui);\n\n if ((subMenu as any).afterGuiAttached) {\n setTimeout(() => (subMenu as any).afterGuiAttached!(), 0);\n }\n }\n\n const eGui = this.getGui();\n\n const positionCallback = this.popupService.positionPopupForMenu.bind(this.popupService,\n { eventSource: eGui, ePopup });\n\n const translate = this.gridOptionsWrapper.getLocaleTextFunc();\n\n const addPopupRes = this.popupService.addPopup({\n modal: true,\n eChild: ePopup,\n positionCallback: positionCallback,\n anchorToElement: eGui,\n ariaLabel: translate('ariaLabelSubMenu', 'SubMenu')\n });\n\n this.subMenuIsOpen = true;\n setAriaExpanded(eGui, true);\n\n this.hideSubMenu = () => {\n if (addPopupRes) {\n addPopupRes.hideFunc();\n }\n this.subMenuIsOpen = false;\n setAriaExpanded(eGui, false);\n destroySubMenu();\n };\n }\n\n public closeSubMenu(): void {\n if (!this.hideSubMenu) { return; }\n this.hideSubMenu();\n this.hideSubMenu = null;\n setAriaExpanded(this.getGui(), false);\n }\n\n public isSubMenuOpen(): boolean {\n return this.subMenuIsOpen;\n }\n\n public activate(openSubMenu?: boolean): void {\n this.cancelActivate();\n\n if (this.params.disabled) { return; }\n\n this.isActive = true;\n this.addCssClass(this.getClassName('active'));\n this.getGui().focus();\n\n if (openSubMenu && this.params.subMenu) {\n window.setTimeout(() => {\n if (this.isAlive() && this.isActive) {\n this.openSubMenu();\n }\n }, 300);\n }\n\n this.onItemActivated();\n }\n\n public deactivate() {\n this.cancelDeactivate();\n this.removeCssClass(this.getClassName('active'));\n this.isActive = false;\n\n if (this.subMenuIsOpen) {\n this.hideSubMenu!();\n }\n }\n\n private addIcon(): void {\n if (!this.params.checked && !this.params.icon && this.params.isCompact) { return; }\n\n const icon = loadTemplate(/* html */\n ``\n );\n\n if (this.params.checked) {\n icon.appendChild(createIconNoSpan('check', this.gridOptionsWrapper)!);\n } else if (this.params.icon) {\n if (isNodeOrElement(this.params.icon)) {\n icon.appendChild(this.params.icon as HTMLElement);\n } else if (typeof this.params.icon === 'string') {\n icon.innerHTML = this.params.icon;\n } else {\n console.warn('AG Grid: menu item icon must be DOM node or string');\n }\n }\n\n this.getGui().appendChild(icon);\n }\n\n private addName(): void {\n if (!this.params.name && this.params.isCompact) { return; }\n\n const name = loadTemplate(/* html */\n `${this.params.name || ''}`\n );\n\n this.getGui().appendChild(name);\n }\n\n private addTooltip(): void {\n if (!this.params.tooltip) { return; }\n\n this.tooltip = this.params.tooltip;\n\n if (this.gridOptionsWrapper.isEnableBrowserTooltips()) {\n this.getGui().setAttribute('title', this.tooltip);\n } else {\n this.createManagedBean(new CustomTooltipFeature(this));\n }\n }\n\n public getTooltipParams(): WithoutGridCommon {\n return {\n location: 'menu',\n value: this.tooltip\n };\n }\n\n private addShortcut(): void {\n if (!this.params.shortcut && this.params.isCompact) { return; }\n const shortcut = loadTemplate(/* html */\n `${this.params.shortcut || ''}`\n );\n\n this.getGui().appendChild(shortcut);\n }\n\n private addSubMenu(): void {\n if (!this.params.subMenu && this.params.isCompact) { return; }\n\n const pointer = loadTemplate(/* html */\n ``\n );\n\n const eGui = this.getGui();\n\n if (this.params.subMenu) {\n const iconName = this.gridOptionsWrapper.isEnableRtl() ? 'smallLeft' : 'smallRight';\n setAriaExpanded(eGui, false);\n\n pointer.appendChild(createIconNoSpan(iconName, this.gridOptionsWrapper)!);\n }\n\n eGui.appendChild(pointer);\n }\n\n private onItemSelected(event: MouseEvent | KeyboardEvent): void {\n if (this.params.action) {\n this.params.action();\n } else {\n this.openSubMenu(event && event.type === 'keydown');\n }\n\n if (this.params.subMenu && !this.params.action) { return; }\n\n const e: MenuItemSelectedEvent = {\n type: AgMenuItemComponent.EVENT_MENU_ITEM_SELECTED,\n action: this.params.action,\n checked: this.params.checked,\n cssClasses: this.params.cssClasses,\n disabled: this.params.disabled,\n icon: this.params.icon,\n name: this.params.name,\n shortcut: this.params.shortcut,\n subMenu: this.params.subMenu,\n tooltip: this.params.tooltip,\n event\n };\n\n this.dispatchEvent(e);\n }\n\n private onItemActivated(): void {\n const event: MenuItemActivatedEvent = {\n type: AgMenuItemComponent.EVENT_MENU_ITEM_ACTIVATED,\n menuItem: this,\n };\n\n this.dispatchEvent(event);\n }\n\n private cancelActivate(): void {\n if (this.activateTimeoutId) {\n window.clearTimeout(this.activateTimeoutId);\n this.activateTimeoutId = 0;\n }\n }\n\n private cancelDeactivate(): void {\n if (this.deactivateTimeoutId) {\n window.clearTimeout(this.deactivateTimeoutId);\n this.deactivateTimeoutId = 0;\n }\n }\n\n private onMouseEnter(): void {\n this.cancelDeactivate();\n\n if (this.params.isAnotherSubMenuOpen()) {\n // wait to see if the user enters the open sub-menu\n this.activateTimeoutId = window.setTimeout(() => this.activate(true), AgMenuItemComponent.ACTIVATION_DELAY);\n } else {\n // activate immediately\n this.activate(true);\n }\n }\n\n private onMouseLeave(): void {\n this.cancelActivate();\n\n if (this.isSubMenuOpen()) {\n // wait to see if the user enters the sub-menu\n this.deactivateTimeoutId = window.setTimeout(() => this.deactivate(), AgMenuItemComponent.ACTIVATION_DELAY);\n } else {\n // de-activate immediately\n this.deactivate();\n }\n }\n\n private getClassName(suffix?: string) {\n const prefix = this.params.isCompact ? 'ag-compact-menu-option' : 'ag-menu-option';\n\n return suffix ? `${prefix}-${suffix}` : prefix;\n }\n}\n","import { Autowired, Bean, Optional, PostConstruct } from \"./context/context\";\nimport { BeanStub } from \"./context/beanStub\";\nimport { Column } from \"./entities/column\";\nimport { CellFocusedEvent, Events } from \"./events\";\nimport { ColumnApi } from \"./columns/columnApi\";\nimport { ColumnModel } from \"./columns/columnModel\";\nimport { CellPosition } from \"./entities/cellPosition\";\nimport { RowNode } from \"./entities/rowNode\";\nimport { GridApi } from \"./gridApi\";\nimport { HeaderPosition } from \"./headerRendering/common/headerPosition\";\nimport { RowPositionUtils } from \"./entities/rowPosition\";\nimport { IRangeService } from \"./interfaces/IRangeService\";\nimport { RowRenderer } from \"./rendering/rowRenderer\";\nimport { HeaderNavigationService } from \"./headerRendering/common/headerNavigationService\";\nimport { ColumnGroup } from \"./entities/columnGroup\";\nimport { ManagedFocusFeature } from \"./widgets/managedFocusFeature\";\nimport { getTabIndex } from './utils/browser';\nimport { makeNull } from './utils/generic';\nimport { Constants } from \"./constants/constants\";\nimport { GridCtrl } from \"./gridComp/gridCtrl\";\nimport { NavigationService } from \"./gridBodyComp/navigationService\";\nimport { RowCtrl } from \"./rendering/row/rowCtrl\";\nimport { CtrlsService } from \"./ctrlsService\";\nimport { HeaderCellCtrl } from \"./headerRendering/cells/column/headerCellCtrl\";\nimport { AbstractHeaderCellCtrl } from \"./headerRendering/cells/abstractCell/abstractHeaderCellCtrl\";\nimport { last } from \"./utils/array\";\nimport { NavigateToNextHeaderParams, TabToNextHeaderParams } from \"./entities/iCallbackParams\";\nimport { WithoutGridCommon } from \"./interfaces/iCommon\";\n\n@Bean('focusService')\nexport class FocusService extends BeanStub {\n\n @Autowired('eGridDiv') private eGridDiv: HTMLElement;\n @Autowired('columnModel') private readonly columnModel: ColumnModel;\n @Autowired('headerNavigationService') private readonly headerNavigationService: HeaderNavigationService;\n @Autowired('columnApi') private readonly columnApi: ColumnApi;\n @Autowired('gridApi') private readonly gridApi: GridApi;\n @Autowired('rowRenderer') private readonly rowRenderer: RowRenderer;\n @Autowired('rowPositionUtils') private readonly rowPositionUtils: RowPositionUtils;\n @Optional('rangeService') private readonly rangeService: IRangeService;\n @Autowired('navigationService') public navigationService: NavigationService;\n @Autowired('ctrlsService') public ctrlsService: CtrlsService;\n\n public static AG_KEYBOARD_FOCUS: string = 'ag-keyboard-focus';\n\n private gridCtrl: GridCtrl;\n private focusedCellPosition: CellPosition | null;\n private focusedHeaderPosition: HeaderPosition | null;\n\n private static keyboardModeActive: boolean = false;\n private static instancesMonitored: Map = new Map();\n\n /**\n * Adds a gridCore to the list of the gridCores monitoring Keyboard Mode\n * in a specific HTMLDocument.\n *\n * @param doc {Document} - The Document containing the gridCore.\n * @param gridCore {GridComp} - The GridCore to be monitored.\n */\n private static addKeyboardModeEvents(doc: Document, controller: GridCtrl): void {\n const docControllers = FocusService.instancesMonitored.get(doc);\n\n if (docControllers && docControllers.length > 0) {\n if (docControllers.indexOf(controller) === -1) {\n docControllers.push(controller);\n }\n } else {\n FocusService.instancesMonitored.set(doc, [controller]);\n doc.addEventListener('keydown', FocusService.toggleKeyboardMode);\n doc.addEventListener('mousedown', FocusService.toggleKeyboardMode);\n }\n }\n\n /**\n * Removes a gridCore from the list of the gridCores monitoring Keyboard Mode\n * in a specific HTMLDocument.\n *\n * @param doc {Document} - The Document containing the gridCore.\n * @param gridCore {GridComp} - The GridCore to be removed.\n */\n private static removeKeyboardModeEvents(doc: Document, controller: GridCtrl): void {\n const docControllers = FocusService.instancesMonitored.get(doc);\n\n let newControllers: GridCtrl[] = [];\n\n if (docControllers && docControllers.length) {\n newControllers = [...docControllers].filter(\n currentGridCore => currentGridCore !== controller\n );\n FocusService.instancesMonitored.set(doc, newControllers);\n }\n\n if (newControllers.length === 0) {\n doc.removeEventListener('keydown', FocusService.toggleKeyboardMode);\n doc.removeEventListener('mousedown', FocusService.toggleKeyboardMode);\n }\n }\n\n /**\n * This method will be called by `keydown` and `mousedown` events on all Documents monitoring\n * KeyboardMode. It will then fire a KEYBOARD_FOCUS, MOUSE_FOCUS on each gridCore present in\n * the Document allowing each gridCore to maintain a state for KeyboardMode.\n *\n * @param event {KeyboardEvent | MouseEvent | TouchEvent} - The event triggered.\n */\n private static toggleKeyboardMode(event: KeyboardEvent | MouseEvent | TouchEvent): void {\n const isKeyboardActive = FocusService.keyboardModeActive;\n const isKeyboardEvent = event.type === 'keydown';\n\n if (isKeyboardEvent) {\n // the following keys should not toggle keyboard mode.\n if (event.ctrlKey || event.metaKey || event.altKey) { return; }\n }\n\n if (isKeyboardActive && isKeyboardEvent || !isKeyboardActive && !isKeyboardEvent) { return; }\n\n FocusService.keyboardModeActive = isKeyboardEvent;\n const doc = (event.target as HTMLElement).ownerDocument;\n\n if (!doc) { return; }\n\n const controllersForDoc = FocusService.instancesMonitored.get(doc);\n\n if (controllersForDoc) {\n controllersForDoc.forEach(controller => {\n controller.dispatchEvent({ type: isKeyboardEvent ? Events.EVENT_KEYBOARD_FOCUS : Events.EVENT_MOUSE_FOCUS });\n });\n }\n }\n\n @PostConstruct\n private init(): void {\n const clearFocusedCellListener = this.clearFocusedCell.bind(this);\n\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, clearFocusedCellListener);\n this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.onColumnEverythingChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_GROUP_OPENED, clearFocusedCellListener);\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_ROW_GROUP_CHANGED, clearFocusedCellListener);\n\n this.ctrlsService.whenReady(p => {\n this.gridCtrl = p.gridCtrl;\n const doc = this.gridOptionsWrapper.getDocument();\n FocusService.addKeyboardModeEvents(doc, this.gridCtrl);\n this.addDestroyFunc(() => this.unregisterGridCompController(this.gridCtrl));\n });\n }\n\n public unregisterGridCompController(gridCompController: GridCtrl): void {\n const doc = this.gridOptionsWrapper.getDocument();\n\n FocusService.removeKeyboardModeEvents(doc, gridCompController);\n }\n\n public onColumnEverythingChanged(): void {\n // if the columns change, check and see if this column still exists. if it does, then\n // we can keep the focused cell. if it doesn't, then we need to drop the focused cell.\n if (!this.focusedCellPosition) { return; }\n\n const col = this.focusedCellPosition.column;\n const colFromColumnModel = this.columnModel.getGridColumn(col.getId());\n\n if (col !== colFromColumnModel) {\n this.clearFocusedCell();\n }\n }\n\n public isKeyboardMode(): boolean {\n return FocusService.keyboardModeActive;\n }\n\n // we check if the browser is focusing something, and if it is, and\n // it's the cell we think is focused, then return the cell. so this\n // methods returns the cell if a) we think it has focus and b) the\n // browser thinks it has focus. this then returns nothing if we\n // first focus a cell, then second click outside the grid, as then the\n // grid cell will still be focused as far as the grid is concerned,\n // however the browser focus will have moved somewhere else.\n public getFocusCellToUseAfterRefresh(): CellPosition | null {\n const eDocument = this.gridOptionsWrapper.getDocument();\n if (this.gridOptionsWrapper.isSuppressFocusAfterRefresh() || !this.focusedCellPosition) {\n return null;\n }\n\n // we check that the browser is actually focusing on the grid, if it is not, then\n // we have nothing to worry about. we check for ROW data, as this covers both focused Rows (for Full Width Rows)\n // and Cells (covers cells as cells live in rows)\n if (this.isDomDataMissingInHierarchy(eDocument.activeElement, RowCtrl.DOM_DATA_KEY_ROW_CTRL)) {\n return null;\n }\n\n return this.focusedCellPosition;\n }\n\n public getFocusHeaderToUseAfterRefresh(): HeaderPosition | null {\n const eDocument = this.gridOptionsWrapper.getDocument();\n if (this.gridOptionsWrapper.isSuppressFocusAfterRefresh() || !this.focusedHeaderPosition) {\n return null;\n }\n\n // we check that the browser is actually focusing on the grid, if it is not, then\n // we have nothing to worry about\n if (this.isDomDataMissingInHierarchy(eDocument.activeElement, AbstractHeaderCellCtrl.DOM_DATA_KEY_HEADER_CTRL)) {\n return null;\n }\n\n return this.focusedHeaderPosition;\n }\n\n private isDomDataMissingInHierarchy(eBrowserCell: Node | null, key: string): boolean {\n let ePointer = eBrowserCell;\n\n while (ePointer) {\n const data = this.gridOptionsWrapper.getDomData(ePointer, key);\n\n if (data) {\n return false;\n }\n\n ePointer = ePointer.parentNode;\n }\n\n return true;\n }\n\n public clearFocusedCell(): void {\n this.focusedCellPosition = null;\n this.onCellFocused(false);\n }\n\n public getFocusedCell(): CellPosition | null {\n return this.focusedCellPosition;\n }\n\n public setFocusedCell(rowIndex: number, colKey: string | Column, floating: string | null | undefined, forceBrowserFocus = false): void {\n const gridColumn = this.columnModel.getGridColumn(colKey);\n\n // if column doesn't exist, then blank the focused cell and return. this can happen when user sets new columns,\n // and the focused cell is in a column that no longer exists. after columns change, the grid refreshes and tries\n // to re-focus the focused cell.\n if (!gridColumn) {\n this.focusedCellPosition = null;\n return;\n }\n\n this.focusedCellPosition = gridColumn ? { rowIndex, rowPinned: makeNull(floating), column: gridColumn } : null;\n this.onCellFocused(forceBrowserFocus);\n }\n\n public isCellFocused(cellPosition: CellPosition): boolean {\n if (this.focusedCellPosition == null) { return false; }\n\n return this.focusedCellPosition.column === cellPosition.column &&\n this.isRowFocused(cellPosition.rowIndex, cellPosition.rowPinned);\n }\n\n public isRowNodeFocused(rowNode: RowNode): boolean {\n return this.isRowFocused(rowNode.rowIndex!, rowNode.rowPinned);\n }\n\n public isHeaderWrapperFocused(headerCtrl: HeaderCellCtrl): boolean {\n if (this.focusedHeaderPosition == null) { return false; }\n\n const column = headerCtrl.getColumnGroupChild();\n const headerRowIndex = headerCtrl.getRowIndex();\n const pinned = headerCtrl.getPinned();\n\n const { column: focusedColumn, headerRowIndex: focusedHeaderRowIndex } = this.focusedHeaderPosition;\n\n return column === focusedColumn &&\n headerRowIndex === focusedHeaderRowIndex &&\n pinned == focusedColumn.getPinned();\n }\n\n public clearFocusedHeader(): void {\n this.focusedHeaderPosition = null;\n }\n\n public getFocusedHeader(): HeaderPosition | null {\n return this.focusedHeaderPosition;\n }\n\n public setFocusedHeader(headerRowIndex: number, column: ColumnGroup | Column): void {\n this.focusedHeaderPosition = { headerRowIndex, column };\n }\n\n public focusHeaderPosition(params: {\n headerPosition: HeaderPosition | null;\n direction?: 'Before' | 'After' | null;\n fromTab?: boolean;\n allowUserOverride?: boolean;\n event?: KeyboardEvent;\n }): boolean {\n const { direction, fromTab, allowUserOverride, event } = params;\n let { headerPosition } = params;\n\n if (allowUserOverride) {\n const { gridOptionsWrapper } = this;\n const currentPosition = this.getFocusedHeader();\n const headerRowCount = this.headerNavigationService.getHeaderRowCount();\n\n if (fromTab) {\n const userFunc = gridOptionsWrapper.getTabToNextHeaderFunc();\n if (userFunc) {\n const params: WithoutGridCommon = {\n backwards: direction === 'Before',\n previousHeaderPosition: currentPosition,\n nextHeaderPosition: headerPosition,\n headerRowCount,\n };\n headerPosition = userFunc(params);\n }\n } else {\n const userFunc = gridOptionsWrapper.getNavigateToNextHeaderFunc();\n if (userFunc && event) {\n const params: WithoutGridCommon = {\n key: event.key,\n previousHeaderPosition: currentPosition,\n nextHeaderPosition: headerPosition,\n headerRowCount,\n event,\n };\n headerPosition = userFunc(params);\n }\n }\n }\n\n if (!headerPosition) { return false; }\n\n if (headerPosition.headerRowIndex === -1) {\n return this.focusGridView(headerPosition.column as Column);\n }\n\n this.headerNavigationService.scrollToColumn(headerPosition.column, direction);\n\n const headerRowContainerCtrl = this.ctrlsService.getHeaderRowContainerCtrl(headerPosition.column.getPinned());\n\n // this will automatically call the setFocusedHeader method above\n const focusSuccess = headerRowContainerCtrl.focusHeader(headerPosition.headerRowIndex, headerPosition.column, event);\n\n return focusSuccess;\n }\n\n public focusFirstHeader(): boolean {\n let firstColumn: Column | ColumnGroup = this.columnModel.getAllDisplayedColumns()[0];\n if (!firstColumn) { return false; }\n\n if (firstColumn.getParent()) {\n firstColumn = this.columnModel.getColumnGroupAtLevel(firstColumn, 0)!;\n }\n\n return this.focusHeaderPosition({\n headerPosition: { headerRowIndex: 0, column: firstColumn }\n });\n }\n\n public focusLastHeader(event?: KeyboardEvent): boolean {\n const headerRowIndex = this.headerNavigationService.getHeaderRowCount() - 1;\n const column = last(this.columnModel.getAllDisplayedColumns());\n\n return this.focusHeaderPosition({\n headerPosition: { headerRowIndex, column },\n event\n });\n }\n\n public isAnyCellFocused(): boolean {\n return !!this.focusedCellPosition;\n }\n\n public isRowFocused(rowIndex: number, floating?: string | null): boolean {\n if (this.focusedCellPosition == null) { return false; }\n\n return this.focusedCellPosition.rowIndex === rowIndex && this.focusedCellPosition.rowPinned === makeNull(floating);\n }\n\n public findFocusableElements(rootNode: HTMLElement, exclude?: string | null, onlyUnmanaged = false): HTMLElement[] {\n const focusableString = Constants.FOCUSABLE_SELECTOR;\n let excludeString = Constants.FOCUSABLE_EXCLUDE;\n\n if (exclude) {\n excludeString += ', ' + exclude;\n }\n\n if (onlyUnmanaged) {\n excludeString += ', [tabindex=\"-1\"]';\n }\n\n const nodes = Array.prototype.slice.apply(rootNode.querySelectorAll(focusableString)) as HTMLElement[];\n const excludeNodes = Array.prototype.slice.apply(rootNode.querySelectorAll(excludeString)) as HTMLElement[];\n\n if (!excludeNodes.length) {\n return nodes;\n }\n\n const diff = (a: HTMLElement[], b: HTMLElement[]) => a.filter(element => b.indexOf(element) === -1);\n return diff(nodes, excludeNodes);\n }\n\n public focusInto(rootNode: HTMLElement, up = false, onlyUnmanaged = false): boolean {\n const focusableElements = this.findFocusableElements(rootNode, null, onlyUnmanaged);\n const toFocus = up ? last(focusableElements) : focusableElements[0];\n\n if (toFocus) {\n toFocus.focus();\n return true;\n }\n\n return false;\n }\n\n public findNextFocusableElement(rootNode: HTMLElement = this.eGridDiv, onlyManaged?: boolean | null, backwards?: boolean): HTMLElement | null {\n const focusable = this.findFocusableElements(rootNode, onlyManaged ? ':not([tabindex=\"-1\"])' : null);\n const eDocument = this.gridOptionsWrapper.getDocument();\n const activeEl = eDocument.activeElement as HTMLElement;\n let currentIndex: number;\n\n if (onlyManaged) {\n currentIndex = focusable.findIndex(el => el.contains(activeEl));\n } else {\n currentIndex = focusable.indexOf(activeEl);\n }\n\n const nextIndex = currentIndex + (backwards ? -1 : 1);\n\n if (nextIndex < 0 || nextIndex >= focusable.length) {\n return null;\n }\n\n return focusable[nextIndex];\n }\n\n public isFocusUnderManagedComponent(rootNode: HTMLElement): boolean {\n const eDocument = this.gridOptionsWrapper.getDocument();\n const managedContainers = rootNode.querySelectorAll(`.${ManagedFocusFeature.FOCUS_MANAGED_CLASS}`);\n\n if (!managedContainers.length) { return false; }\n\n for (let i = 0; i < managedContainers.length; i++) {\n if (managedContainers[i].contains(eDocument.activeElement)) {\n return true;\n }\n }\n\n return false;\n }\n\n public findTabbableParent(node: HTMLElement | null, limit: number = 5): HTMLElement | null {\n let counter = 0;\n\n while (node && getTabIndex(node) === null && ++counter <= limit) {\n node = node.parentElement;\n }\n\n if (getTabIndex(node) === null) { return null; }\n\n return node;\n }\n\n private onCellFocused(forceBrowserFocus: boolean): void {\n const event: CellFocusedEvent = {\n type: Events.EVENT_CELL_FOCUSED,\n forceBrowserFocus: forceBrowserFocus,\n rowIndex: null,\n column: null,\n floating: null,\n api: this.gridApi,\n columnApi: this.columnApi,\n rowPinned: null,\n isFullWidthCell: false\n };\n\n if (this.focusedCellPosition) {\n const rowIndex = event.rowIndex = this.focusedCellPosition.rowIndex;\n const rowPinned = event.rowPinned = this.focusedCellPosition.rowPinned;\n\n event.column = this.focusedCellPosition.column;\n\n const rowCtrl = this.rowRenderer.getRowByPosition({ rowIndex, rowPinned });\n\n if (rowCtrl) {\n event.isFullWidthCell = rowCtrl.isFullWidth();\n }\n }\n\n this.eventService.dispatchEvent(event);\n }\n\n public focusGridView(column?: Column, backwards?: boolean): boolean {\n // if suppressCellFocus is `true`, it means the user does not want to\n // navigate between the cells using tab. Instead, we put focus on either\n // the header or after the grid, depending on whether tab or shift-tab was pressed.\n if (this.gridOptionsWrapper.isSuppressCellFocus()) {\n\n if (backwards) {\n return this.focusLastHeader();\n }\n\n return this.focusNextGridCoreContainer(false);\n }\n\n const nextRow = backwards\n ? this.rowPositionUtils.getLastRow()\n : this.rowPositionUtils.getFirstRow();\n\n if (!nextRow) { return false; }\n\n const { rowIndex, rowPinned } = nextRow;\n const focusedHeader = this.getFocusedHeader();\n\n if (!column && focusedHeader) {\n column = focusedHeader.column as Column;\n }\n\n if (rowIndex == null || !column) { return false; }\n\n this.navigationService.ensureCellVisible({ rowIndex, column, rowPinned });\n\n this.setFocusedCell(rowIndex, column, makeNull(rowPinned), true);\n\n if (this.rangeService) {\n const cellPosition = { rowIndex, rowPinned, column };\n this.rangeService.setRangeToCell(cellPosition);\n }\n\n return true;\n }\n\n public focusNextGridCoreContainer(backwards: boolean): boolean {\n if (this.gridCtrl.focusNextInnerContainer(backwards)) {\n return true;\n }\n\n if (!backwards && !this.gridCtrl.isDetailGrid()) {\n this.gridCtrl.forceFocusOutOfContainer();\n }\n\n return false;\n }\n}\n","import { Autowired, PostConstruct } from '../../context/context';\nimport { Component } from '../../widgets/component';\nimport { UserComponentFactory } from '../../components/framework/userComponentFactory';\nimport { RefSelector } from '../../widgets/componentAnnotations';\nimport { ILoadingOverlayComp, ILoadingOverlayParams } from './loadingOverlayComponent';\nimport { INoRowsOverlayComp, INoRowsOverlayParams } from './noRowsOverlayComponent';\nimport { AgPromise } from '../../utils';\nimport { clearElement } from '../../utils/dom';\nimport { LayoutCssClasses, LayoutFeature, LayoutView, UpdateLayoutClassesParams } from \"../../styling/layoutFeature\";\nimport { PaginationProxy } from \"../../pagination/paginationProxy\";\nimport { Events } from \"../../eventKeys\";\nimport { GridApi } from \"../../gridApi\";\nimport { ColumnModel } from \"../../columns/columnModel\";\nimport { WithoutGridCommon } from '../../interfaces/iCommon';\n\nenum LoadingType { Loading, NoRows }\n\nexport class OverlayWrapperComponent extends Component implements LayoutView {\n\n // wrapping in outer div, and wrapper, is needed to center the loading icon\n // The idea for centering came from here: http://www.vanseodesign.com/css/vertical-centering/\n private static TEMPLATE = /* html */`\n
\n
\n
\n
\n
`;\n\n @Autowired('userComponentFactory') userComponentFactory: UserComponentFactory;\n @Autowired('paginationProxy') private paginationProxy: PaginationProxy;\n @Autowired('gridApi') private gridApi: GridApi;\n @Autowired('columnModel') private columnModel: ColumnModel;\n\n @RefSelector('eOverlayWrapper') eOverlayWrapper: HTMLElement;\n\n private activeOverlay: ILoadingOverlayComp;\n private inProgress = false;\n private destroyRequested = false;\n private manuallyDisplayed: boolean = false;\n\n constructor() {\n super(OverlayWrapperComponent.TEMPLATE);\n }\n\n public updateLayoutClasses(cssClass: string, params: UpdateLayoutClassesParams): void {\n const overlayWrapperClassList = this.eOverlayWrapper.classList;\n overlayWrapperClassList.toggle(LayoutCssClasses.AUTO_HEIGHT, params.autoHeight);\n overlayWrapperClassList.toggle(LayoutCssClasses.NORMAL, params.normal);\n overlayWrapperClassList.toggle(LayoutCssClasses.PRINT, params.print);\n }\n\n @PostConstruct\n private postConstruct(): void {\n this.createManagedBean(new LayoutFeature(this));\n this.setDisplayed(false);\n\n this.addManagedListener(this.eventService, Events.EVENT_ROW_DATA_CHANGED, this.onRowDataChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_ROW_DATA_UPDATED, this.onRowDataChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.onNewColumnsLoaded.bind(this));\n\n if (this.gridOptionsWrapper.isRowModelDefault() && !this.gridOptionsWrapper.getRowData()) {\n this.showLoadingOverlay();\n }\n\n this.gridApi.registerOverlayWrapperComp(this);\n }\n\n private setWrapperTypeClass(loadingType: LoadingType): void {\n const overlayWrapperClassList = this.eOverlayWrapper.classList;\n overlayWrapperClassList.toggle('ag-overlay-loading-wrapper', loadingType === LoadingType.Loading);\n overlayWrapperClassList.toggle('ag-overlay-no-rows-wrapper', loadingType === LoadingType.NoRows);\n }\n\n public showLoadingOverlay(): void {\n if (this.gridOptionsWrapper.isSuppressLoadingOverlay()) { return; }\n\n const params: WithoutGridCommon = {};\n\n const compDetails = this.userComponentFactory.getLoadingOverlayCompDetails(params);\n const promise = compDetails.newAgStackInstance();\n\n this.showOverlay(promise, LoadingType.Loading);\n }\n\n public showNoRowsOverlay(): void {\n if (this.gridOptionsWrapper.isSuppressNoRowsOverlay()) { return; }\n\n const params: WithoutGridCommon = {};\n\n const compDetails = this.userComponentFactory.getNoRowsOverlayCompDetails(params);\n const promise = compDetails.newAgStackInstance();\n\n this.showOverlay(promise, LoadingType.NoRows);\n }\n\n private showOverlay(workItem: AgPromise | null, type: LoadingType): void {\n if (this.inProgress) {\n return;\n }\n\n this.setWrapperTypeClass(type);\n this.destroyActiveOverlay();\n\n this.inProgress = true;\n\n if (workItem) {\n workItem.then(comp => {\n this.inProgress = false;\n\n this.eOverlayWrapper.appendChild(comp!.getGui());\n this.activeOverlay = comp!;\n\n if (this.destroyRequested) {\n this.destroyRequested = false;\n this.destroyActiveOverlay();\n }\n });\n }\n\n this.manuallyDisplayed = this.columnModel.isReady() && !this.paginationProxy.isEmpty();\n this.setDisplayed(true);\n }\n\n private destroyActiveOverlay(): void {\n if (this.inProgress) {\n this.destroyRequested = true;\n return;\n }\n\n if (!this.activeOverlay) {\n return;\n }\n\n this.activeOverlay = this.getContext().destroyBean(this.activeOverlay)!;\n\n clearElement(this.eOverlayWrapper);\n }\n\n public hideOverlay(): void {\n this.manuallyDisplayed = false;\n this.destroyActiveOverlay();\n this.setDisplayed(false);\n }\n\n public destroy(): void {\n this.destroyActiveOverlay();\n super.destroy();\n }\n\n private showOrHideOverlay(): void {\n const isEmpty = this.paginationProxy.isEmpty();\n const isSuppressNoRowsOverlay = this.gridOptionsWrapper.isSuppressNoRowsOverlay();\n if (isEmpty && !isSuppressNoRowsOverlay) {\n this.showNoRowsOverlay();\n } else {\n this.hideOverlay();\n }\n }\n\n private onRowDataChanged(): void {\n this.showOrHideOverlay();\n }\n\n private onNewColumnsLoaded(): void {\n // hide overlay if columns and rows exist, this can happen if columns are loaded after data.\n // this problem exists before of the race condition between the services (column controller in this case)\n // and the view (grid panel). if the model beans were all initialised first, and then the view beans second,\n // this race condition would not happen.\n if (this.columnModel.isReady() && !this.paginationProxy.isEmpty() && !this.manuallyDisplayed) {\n this.hideOverlay();\n }\n }\n\n}\n","import { Component } from './component';\nimport { Autowired, PostConstruct } from '../context/context';\nimport { RefSelector } from './componentAnnotations';\nimport { getAriaPosInSet, setAriaSetSize, setAriaPosInSet, setAriaSelected, setAriaChecked, setAriaRole, setAriaLabel } from '../utils/aria';\nimport { KeyCode } from '../constants/keyCode';\nimport { ResizeObserverService } from \"../misc/resizeObserverService\";\nimport { waitUntil } from '../utils/function';\nimport { TabGuardComp } from './tabGuardComp';\nimport { FocusService } from '../focusService';\n\nexport interface VirtualListModel {\n getRowCount(): number;\n getRow(index: number): any;\n isRowSelected?(index: number): boolean | undefined;\n}\n\nexport class VirtualList extends TabGuardComp {\n private model: VirtualListModel;\n private renderedRows = new Map();\n private componentCreator: (value: any, listItemElement: HTMLElement) => Component;\n private rowHeight = 20;\n private lastFocusedRowIndex: number | null;\n private isDestroyed = false;\n\n @Autowired('resizeObserverService') private readonly resizeObserverService: ResizeObserverService;\n @Autowired('focusService') private readonly focusService: FocusService;\n @RefSelector('eContainer') private readonly eContainer: HTMLElement;\n\n constructor(\n private readonly cssIdentifier = 'default',\n private readonly ariaRole = 'listbox',\n private listName?: string\n ) {\n super(VirtualList.getTemplate(cssIdentifier));\n }\n\n @PostConstruct\n private postConstruct(): void {\n this.addScrollListener();\n this.rowHeight = this.getItemHeight();\n this.addResizeObserver();\n\n this.initialiseTabGuard({\n onFocusIn: (e: FocusEvent) => this.onFocusIn(e),\n onFocusOut: (e: FocusEvent) => this.onFocusOut(e),\n focusInnerElement: (fromBottom: boolean) => this.focusInnerElement(fromBottom),\n onTabKeyDown: e => this.onTabKeyDown(e),\n handleKeyDown: e => this.handleKeyDown(e)\n });\n\n this.setAriaProperties();\n }\n\n private setAriaProperties(): void {\n const translate = this.gridOptionsWrapper.getLocaleTextFunc();\n const listName = translate('ariaDefaultListName', this.listName || 'List');\n const ariaEl = this.eContainer;\n\n setAriaRole(ariaEl, this.ariaRole);\n setAriaLabel(ariaEl, listName);\n }\n\n private addResizeObserver(): void {\n const listener = this.drawVirtualRows.bind(this);\n const destroyObserver = this.resizeObserverService.observeResize(this.getGui(), listener);\n this.addDestroyFunc(destroyObserver);\n }\n\n protected focusInnerElement(fromBottom: boolean): void {\n this.focusRow(fromBottom ? this.model.getRowCount() - 1 : 0);\n }\n\n protected onFocusIn(e: FocusEvent): boolean {\n const target = e.target as HTMLElement;\n\n if (target.classList.contains('ag-virtual-list-item')) {\n this.lastFocusedRowIndex = getAriaPosInSet(target) - 1;\n }\n\n return false;\n }\n\n protected onFocusOut(e: FocusEvent): boolean {\n if (!this.getFocusableElement().contains(e.relatedTarget as HTMLElement)) {\n this.lastFocusedRowIndex = null;\n }\n\n return false;\n }\n\n protected handleKeyDown(e: KeyboardEvent): void {\n switch (e.key) {\n case KeyCode.UP:\n case KeyCode.DOWN:\n if (this.navigate(e.key === KeyCode.UP)) {\n e.preventDefault();\n }\n\n break;\n }\n }\n\n protected onTabKeyDown(e: KeyboardEvent): void {\n if (this.navigate(e.shiftKey)) {\n e.preventDefault();\n } else {\n // focus on the first or last focusable element to ensure that any other handlers start from there\n this.focusService.focusInto(this.getGui(), !e.shiftKey);\n }\n }\n\n private navigate(up: boolean): boolean {\n if (this.lastFocusedRowIndex == null) { return false; }\n\n const nextRow = this.lastFocusedRowIndex + (up ? -1 : 1);\n\n if (nextRow < 0 || nextRow >= this.model.getRowCount()) { return false; }\n\n this.focusRow(nextRow);\n\n return true;\n }\n\n public getLastFocusedRow(): number | null {\n return this.lastFocusedRowIndex;\n }\n\n public focusRow(rowNumber: number): void {\n this.ensureIndexVisible(rowNumber);\n\n window.setTimeout(() => {\n const renderedRow = this.renderedRows.get(rowNumber);\n\n if (renderedRow) {\n renderedRow.eDiv.focus();\n }\n }, 10);\n }\n\n public getComponentAt(rowIndex: number): Component | undefined {\n const comp = this.renderedRows.get(rowIndex);\n\n return comp && comp.rowComponent;\n }\n\n private static getTemplate(cssIdentifier: string) {\n return /* html */`\n
\n
\n
`;\n }\n\n private getItemHeight(): number {\n return this.gridOptionsWrapper.getListItemHeight();\n }\n\n public ensureIndexVisible(index: number): void {\n const lastRow = this.model.getRowCount();\n\n if (typeof index !== 'number' || index < 0 || index >= lastRow) {\n console.warn('AG Grid: invalid row index for ensureIndexVisible: ' + index);\n return;\n }\n\n const rowTopPixel = index * this.rowHeight;\n const rowBottomPixel = rowTopPixel + this.rowHeight;\n const eGui = this.getGui();\n\n const viewportTopPixel = eGui.scrollTop;\n const viewportHeight = eGui.offsetHeight;\n const viewportBottomPixel = viewportTopPixel + viewportHeight;\n\n const viewportScrolledPastRow = viewportTopPixel > rowTopPixel;\n const viewportScrolledBeforeRow = viewportBottomPixel < rowBottomPixel;\n\n if (viewportScrolledPastRow) {\n // if row is before, scroll up with row at top\n eGui.scrollTop = rowTopPixel;\n } else if (viewportScrolledBeforeRow) {\n // if row is below, scroll down with row at bottom\n const newScrollPosition = rowBottomPixel - viewportHeight;\n eGui.scrollTop = newScrollPosition;\n }\n }\n\n public setComponentCreator(componentCreator: (value: any, listItemElement: HTMLElement) => Component): void {\n this.componentCreator = componentCreator;\n }\n\n public getRowHeight(): number {\n return this.rowHeight;\n }\n\n public getScrollTop(): number {\n return this.getGui().scrollTop;\n }\n\n public setRowHeight(rowHeight: number): void {\n this.rowHeight = rowHeight;\n this.refresh();\n }\n\n public refresh(): void {\n if (this.model == null || this.isDestroyed) { return; }\n\n const rowCount = this.model.getRowCount();\n this.eContainer.style.height = `${rowCount * this.rowHeight}px`;\n\n // ensure height is applied before attempting to redraw rows\n waitUntil(() => this.eContainer.clientHeight >= rowCount * this.rowHeight,\n () => {\n if (this.isDestroyed) { return; }\n\n this.clearVirtualRows();\n this.drawVirtualRows();\n }\n );\n }\n\n private clearVirtualRows() {\n this.renderedRows.forEach((_, rowIndex) => this.removeRow(rowIndex));\n }\n\n private drawVirtualRows() {\n const gui = this.getGui();\n const topPixel = gui.scrollTop;\n const bottomPixel = topPixel + gui.offsetHeight;\n const firstRow = Math.floor(topPixel / this.rowHeight);\n const lastRow = Math.floor(bottomPixel / this.rowHeight);\n\n this.ensureRowsRendered(firstRow, lastRow);\n }\n\n private ensureRowsRendered(start: number, finish: number) {\n // remove any rows that are no longer required\n this.renderedRows.forEach((_, rowIndex) => {\n if ((rowIndex < start || rowIndex > finish) && rowIndex !== this.lastFocusedRowIndex) {\n this.removeRow(rowIndex);\n }\n });\n\n // insert any required new rows\n for (let rowIndex = start; rowIndex <= finish; rowIndex++) {\n if (this.renderedRows.has(rowIndex)) { continue; }\n\n // check this row actually exists (in case overflow buffer window exceeds real data)\n if (rowIndex < this.model.getRowCount()) {\n this.insertRow(rowIndex);\n }\n }\n }\n\n private insertRow(rowIndex: number): void {\n const value = this.model.getRow(rowIndex);\n const eDiv = document.createElement('div');\n\n eDiv.classList.add('ag-virtual-list-item', `ag-${this.cssIdentifier}-virtual-list-item`);\n setAriaRole(eDiv, this.ariaRole === 'tree' ? 'treeitem' : 'option');\n setAriaSetSize(eDiv, this.model.getRowCount());\n setAriaPosInSet(eDiv, rowIndex + 1);\n eDiv.setAttribute('tabindex', '-1');\n\n if (typeof this.model.isRowSelected === 'function') {\n const isSelected = this.model.isRowSelected(rowIndex);\n\n setAriaSelected(eDiv, !!isSelected);\n setAriaChecked(eDiv, isSelected);\n }\n\n eDiv.style.height = `${this.rowHeight}px`;\n eDiv.style.top = `${this.rowHeight * rowIndex}px`;\n\n const rowComponent = this.componentCreator(value, eDiv);\n\n rowComponent.addGuiEventListener('focusin', () => this.lastFocusedRowIndex = rowIndex);\n\n eDiv.appendChild(rowComponent.getGui());\n\n // keep the DOM order consistent with the order of the rows\n if (this.renderedRows.has(rowIndex - 1)) {\n this.renderedRows.get(rowIndex - 1)!.eDiv.insertAdjacentElement('afterend', eDiv);\n } else if (this.renderedRows.has(rowIndex + 1)) {\n this.renderedRows.get(rowIndex + 1)!.eDiv.insertAdjacentElement('beforebegin', eDiv);\n } else {\n this.eContainer.appendChild(eDiv);\n }\n\n this.renderedRows.set(rowIndex, { rowComponent, eDiv });\n }\n\n private removeRow(rowIndex: number) {\n const component = this.renderedRows.get(rowIndex)!;\n\n this.eContainer.removeChild(component.eDiv);\n this.destroyBean(component.rowComponent);\n this.renderedRows.delete(rowIndex);\n }\n\n private addScrollListener() {\n this.addGuiEventListener('scroll', () => this.drawVirtualRows());\n }\n\n public setModel(model: VirtualListModel): void {\n this.model = model;\n }\n\n public destroy(): void {\n if (this.isDestroyed) { return; }\n\n this.clearVirtualRows();\n this.isDestroyed = true;\n\n super.destroy();\n }\n}\n","import { IFrameworkOverrides } from \"./interfaces/iFrameworkOverrides\";\nimport { includes } from \"./utils/array\";\nimport { AgPromise } from \"./utils\";\n\nconst OUTSIDE_ANGULAR_EVENTS = ['mouseover', 'mouseout', 'mouseenter', 'mouseleave'];\nconst PASSIVE_EVENTS = ['touchstart', 'touchend', 'touchmove', 'touchcancel'];\n\n/** The base frameworks, eg React & Angular, override this bean with implementations specific to their requirement. */\nexport class VanillaFrameworkOverrides implements IFrameworkOverrides {\n\n // for Vanilla JS, we use simple timeout\n public setTimeout(action: any, timeout?: any): void {\n window.setTimeout(action, timeout);\n }\n public setInterval(action: any, timeout?: any): AgPromise {\n return new AgPromise(resolve => {\n resolve(window.setInterval(action, timeout));\n });\n }\n\n public isOutsideAngular = (eventType:string) => includes(OUTSIDE_ANGULAR_EVENTS, eventType);\n\n // for Vanilla JS, we just add the event to the element\n public addEventListener(\n element: HTMLElement,\n type: string,\n listener: EventListenerOrEventListenerObject,\n useCapture?: boolean\n ): void {\n const isPassive = includes(PASSIVE_EVENTS, type);\n element.addEventListener(type, listener, { capture: !!useCapture, passive: isPassive });\n }\n\n // for Vanilla JS, we just execute the listener\n dispatchEvent(eventType: string, listener: () => {}, global = false): void {\n listener();\n }\n\n frameworkComponent(name: string): any {\n return null;\n }\n\n isFrameworkComponent(comp: any): boolean {\n return false;\n }\n}\n","import { Autowired, Bean } from \"./context/context\";\nimport { BeanStub } from \"./context/beanStub\";\nimport { Constants } from \"./constants/constants\";\nimport { ColumnModel } from \"./columns/columnModel\";\nimport { IRowModel } from \"./interfaces/iRowModel\";\nimport { CellPosition } from \"./entities/cellPosition\";\nimport { RowNode } from \"./entities/rowNode\";\nimport { Column } from \"./entities/column\";\nimport { RowPosition } from \"./entities/rowPosition\";\nimport { PinnedRowModel } from \"./pinnedRowModel/pinnedRowModel\";\nimport { missing } from \"./utils/generic\";\nimport { last } from \"./utils/array\";\nimport { KeyCode } from './constants/keyCode';\nimport { PaginationProxy } from \"./pagination/paginationProxy\";\n\n@Bean('cellNavigationService')\nexport class CellNavigationService extends BeanStub {\n\n @Autowired('columnModel') private columnModel: ColumnModel;\n @Autowired('rowModel') private rowModel: IRowModel;\n @Autowired('pinnedRowModel') private pinnedRowModel: PinnedRowModel;\n @Autowired('paginationProxy') private paginationProxy: PaginationProxy;\n\n // returns null if no cell to focus on, ie at the end of the grid\n public getNextCellToFocus(key: string, focusedCell: CellPosition, ctrlPressed: boolean = false): CellPosition | null {\n if (ctrlPressed) {\n return this.getNextCellToFocusWithCtrlPressed(key, focusedCell);\n }\n\n return this.getNextCellToFocusWithoutCtrlPressed(key, focusedCell);\n }\n\n private getNextCellToFocusWithCtrlPressed(key: string, focusedCell: CellPosition): CellPosition | null {\n const upKey = key === KeyCode.UP;\n const downKey = key === KeyCode.DOWN;\n const leftKey = key === KeyCode.LEFT;\n\n let column: Column;\n let rowIndex: number;\n\n if (upKey || downKey) {\n rowIndex = upKey ? this.paginationProxy.getPageFirstRow() : this.paginationProxy.getPageLastRow();\n column = focusedCell.column;\n } else {\n const allColumns: Column[] = this.columnModel.getAllDisplayedColumns();\n const isRtl = this.gridOptionsWrapper.isEnableRtl();\n rowIndex = focusedCell.rowIndex;\n column = leftKey !== isRtl ? allColumns[0] : last(allColumns);\n }\n\n return {\n rowIndex,\n rowPinned: null,\n column\n };\n }\n\n private getNextCellToFocusWithoutCtrlPressed(key: string, focusedCell: CellPosition): CellPosition | null {\n // starting with the provided cell, we keep moving until we find a cell we can\n // focus on.\n let pointer: CellPosition | null = focusedCell;\n let finished = false;\n\n // finished will be true when either:\n // a) cell found that we can focus on\n // b) run out of cells (ie the method returns null)\n while (!finished) {\n\n switch (key) {\n case KeyCode.UP:\n pointer = this.getCellAbove(pointer);\n break;\n case KeyCode.DOWN:\n pointer = this.getCellBelow(pointer);\n break;\n case KeyCode.RIGHT:\n if (this.gridOptionsWrapper.isEnableRtl()) {\n pointer = this.getCellToLeft(pointer);\n } else {\n pointer = this.getCellToRight(pointer);\n }\n break;\n case KeyCode.LEFT:\n if (this.gridOptionsWrapper.isEnableRtl()) {\n pointer = this.getCellToRight(pointer);\n } else {\n pointer = this.getCellToLeft(pointer);\n }\n break;\n default:\n pointer = null;\n console.warn('AG Grid: unknown key for navigation ' + key);\n break;\n }\n\n if (pointer) {\n finished = this.isCellGoodToFocusOn(pointer);\n } else {\n finished = true;\n }\n }\n\n return pointer;\n }\n\n private isCellGoodToFocusOn(gridCell: CellPosition): boolean {\n const column: Column = gridCell.column;\n let rowNode: RowNode | undefined;\n\n switch (gridCell.rowPinned) {\n case Constants.PINNED_TOP:\n rowNode = this.pinnedRowModel.getPinnedTopRow(gridCell.rowIndex);\n break;\n case Constants.PINNED_BOTTOM:\n rowNode = this.pinnedRowModel.getPinnedBottomRow(gridCell.rowIndex);\n break;\n default:\n rowNode = this.rowModel.getRow(gridCell.rowIndex);\n break;\n }\n\n if (!rowNode) { return false; }\n\n const suppressNavigable = column.isSuppressNavigable(rowNode);\n return !suppressNavigable;\n }\n\n private getCellToLeft(lastCell: CellPosition | null): CellPosition | null {\n if (!lastCell) { return null; }\n\n const colToLeft = this.columnModel.getDisplayedColBefore(lastCell.column);\n if (!colToLeft) { return null; }\n\n return {\n rowIndex: lastCell.rowIndex,\n column: colToLeft,\n rowPinned: lastCell.rowPinned\n } as CellPosition;\n }\n\n private getCellToRight(lastCell: CellPosition | null): CellPosition | null {\n if (!lastCell) { return null; }\n\n const colToRight = this.columnModel.getDisplayedColAfter(lastCell.column);\n // if already on right, do nothing\n if (!colToRight) { return null; }\n\n return {\n rowIndex: lastCell.rowIndex,\n column: colToRight,\n rowPinned: lastCell.rowPinned\n } as CellPosition;\n }\n\n public getRowBelow(rowPosition: RowPosition): RowPosition | null {\n // if already on top row, do nothing\n const index = rowPosition.rowIndex;\n const pinned = rowPosition.rowPinned;\n if (this.isLastRowInContainer(rowPosition)) {\n switch (pinned) {\n case Constants.PINNED_BOTTOM:\n // never any rows after pinned bottom\n return null;\n case Constants.PINNED_TOP:\n // if on last row of pinned top, then next row is main body (if rows exist),\n // otherwise it's the pinned bottom\n if (this.rowModel.isRowsToRender()) {\n return { rowIndex: this.paginationProxy.getPageFirstRow(), rowPinned: null } as RowPosition;\n }\n\n if (this.pinnedRowModel.isRowsToRender(Constants.PINNED_BOTTOM)) {\n return { rowIndex: 0, rowPinned: Constants.PINNED_BOTTOM } as RowPosition;\n }\n\n return null;\n default:\n // if in the main body, then try pinned bottom, otherwise return nothing\n if (this.pinnedRowModel.isRowsToRender(Constants.PINNED_BOTTOM)) {\n return { rowIndex: 0, rowPinned: Constants.PINNED_BOTTOM } as RowPosition;\n }\n return null;\n }\n }\n\n return { rowIndex: index + 1, rowPinned: pinned } as RowPosition;\n }\n\n private getCellBelow(lastCell: CellPosition | null): CellPosition | null {\n if (!lastCell) { return null; }\n\n const rowBelow = this.getRowBelow(lastCell);\n if (rowBelow) {\n return {\n rowIndex: rowBelow.rowIndex,\n column: lastCell.column,\n rowPinned: rowBelow.rowPinned\n } as CellPosition;\n }\n\n return null;\n }\n\n private isLastRowInContainer(rowPosition: RowPosition): boolean {\n const pinned = rowPosition.rowPinned;\n const index = rowPosition.rowIndex;\n\n if (pinned === Constants.PINNED_TOP) {\n const lastTopIndex = this.pinnedRowModel.getPinnedTopRowData().length - 1;\n return lastTopIndex <= index;\n }\n\n if (pinned === Constants.PINNED_BOTTOM) {\n const lastBottomIndex = this.pinnedRowModel.getPinnedBottomRowData().length - 1;\n return lastBottomIndex <= index;\n }\n\n const lastBodyIndex = this.paginationProxy.getPageLastRow();\n return lastBodyIndex <= index;\n }\n\n public getRowAbove(rowPosition: RowPosition): RowPosition | null {\n // if already on top row, do nothing\n const index = rowPosition.rowIndex;\n const pinned = rowPosition.rowPinned;\n const isFirstRow = pinned ? index === 0 : index === this.paginationProxy.getPageFirstRow();\n\n // if already on top row, do nothing\n if (isFirstRow) {\n if (pinned === Constants.PINNED_TOP) { return null; }\n\n if (!pinned) {\n if (this.pinnedRowModel.isRowsToRender(Constants.PINNED_TOP)) {\n return this.getLastFloatingTopRow();\n }\n return null;\n }\n\n // last floating bottom\n if (this.rowModel.isRowsToRender()) {\n return this.getLastBodyCell();\n }\n\n if (this.pinnedRowModel.isRowsToRender(Constants.PINNED_TOP)) {\n return this.getLastFloatingTopRow();\n }\n\n return null;\n }\n\n return { rowIndex: index - 1, rowPinned: pinned } as RowPosition;\n }\n\n private getCellAbove(lastCell: CellPosition | null): CellPosition | null {\n if (!lastCell) { return null; }\n\n const rowAbove = this.getRowAbove({ rowIndex: lastCell.rowIndex, rowPinned: lastCell.rowPinned });\n\n if (rowAbove) {\n return {\n rowIndex: rowAbove.rowIndex,\n column: lastCell.column,\n rowPinned: rowAbove.rowPinned\n } as CellPosition;\n }\n\n return null;\n }\n\n private getLastBodyCell(): RowPosition {\n const lastBodyRow = this.paginationProxy.getPageLastRow();\n\n return { rowIndex: lastBodyRow, rowPinned: null } as RowPosition;\n }\n\n private getLastFloatingTopRow(): RowPosition {\n const lastFloatingRow = this.pinnedRowModel.getPinnedTopRowData().length - 1;\n\n return { rowIndex: lastFloatingRow, rowPinned: Constants.PINNED_TOP } as RowPosition;\n }\n\n public getNextTabbedCell(gridCell: CellPosition, backwards: boolean): CellPosition | null {\n if (backwards) {\n return this.getNextTabbedCellBackwards(gridCell);\n }\n\n return this.getNextTabbedCellForwards(gridCell);\n }\n\n public getNextTabbedCellForwards(gridCell: CellPosition): CellPosition | null {\n const displayedColumns = this.columnModel.getAllDisplayedColumns();\n\n let newRowIndex: number | null = gridCell.rowIndex;\n let newFloating: string | null | undefined = gridCell.rowPinned;\n\n // move along to the next cell\n let newColumn = this.columnModel.getDisplayedColAfter(gridCell.column);\n\n // check if end of the row, and if so, go forward a row\n if (!newColumn) {\n newColumn = displayedColumns[0];\n\n const rowBelow = this.getRowBelow(gridCell);\n if (missing(rowBelow)) { return null; }\n\n // If we are tabbing and there is a paging panel present, tabbing should go\n // to the paging panel instead of loading the next page.\n if (!rowBelow.rowPinned && !this.paginationProxy.isRowInPage(rowBelow)) {\n return null;\n }\n\n newRowIndex = rowBelow ? rowBelow.rowIndex : null;\n newFloating = rowBelow ? rowBelow.rowPinned : null;\n }\n\n return { rowIndex: newRowIndex, column: newColumn, rowPinned: newFloating } as CellPosition;\n }\n\n public getNextTabbedCellBackwards(gridCell: CellPosition): CellPosition | null {\n\n const displayedColumns = this.columnModel.getAllDisplayedColumns();\n\n let newRowIndex: number | null = gridCell.rowIndex;\n let newFloating: string | null | undefined = gridCell.rowPinned;\n\n // move along to the next cell\n let newColumn = this.columnModel.getDisplayedColBefore(gridCell.column);\n\n // check if end of the row, and if so, go forward a row\n if (!newColumn) {\n newColumn = last(displayedColumns);\n\n const rowAbove = this.getRowAbove({ rowIndex: gridCell.rowIndex, rowPinned: gridCell.rowPinned });\n\n if (missing(rowAbove)) { return null; }\n\n // If we are tabbing and there is a paging panel present, tabbing should go\n // to the paging panel instead of loading the next page.\n if (!rowAbove.rowPinned && !this.paginationProxy.isRowInPage(rowAbove)) {\n return null;\n }\n\n newRowIndex = rowAbove ? rowAbove.rowIndex : null;\n newFloating = rowAbove ? rowAbove.rowPinned : null;\n }\n\n return { rowIndex: newRowIndex, column: newColumn, rowPinned: newFloating } as CellPosition;\n }\n\n}\n","import { ColumnModel } from \"./columns/columnModel\";\nimport { Logger } from \"./logger\";\nimport { LoggerFactory } from \"./logger\";\nimport {\n AgEvent,\n BodyScrollEvent,\n ColumnEvent,\n ColumnGroupOpenedEvent,\n ColumnMovedEvent,\n ColumnPinnedEvent,\n ColumnResizedEvent,\n ColumnVisibleEvent,\n Events\n} from \"./events\";\nimport { GridOptions } from \"./entities/gridOptions\";\nimport { Column } from \"./entities/column\";\nimport { Bean } from \"./context/context\";\nimport { Qualifier } from \"./context/context\";\nimport { Autowired } from \"./context/context\";\nimport { PostConstruct } from \"./context/context\";\nimport { ProvidedColumnGroup } from \"./entities/providedColumnGroup\";\nimport { BeanStub } from \"./context/beanStub\";\nimport { CtrlsService } from \"./ctrlsService\";\n\n@Bean('alignedGridsService')\nexport class AlignedGridsService extends BeanStub {\n\n @Autowired('columnModel') private columnModel: ColumnModel;\n @Autowired('ctrlsService') private ctrlsService: CtrlsService;\n\n private logger: Logger;\n\n // flag to mark if we are consuming. to avoid cyclic events (ie other grid firing back to master\n // while processing a master event) we mark this if consuming an event, and if we are, then\n // we don't fire back any events.\n private consuming = false;\n\n private setBeans(@Qualifier('loggerFactory') loggerFactory: LoggerFactory) {\n this.logger = loggerFactory.create('AlignedGridsService');\n }\n\n @PostConstruct\n private init(): void {\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_MOVED, this.fireColumnEvent.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_VISIBLE, this.fireColumnEvent.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PINNED, this.fireColumnEvent.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_GROUP_OPENED, this.fireColumnEvent.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_RESIZED, this.fireColumnEvent.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_BODY_SCROLL, this.fireScrollEvent.bind(this));\n }\n\n // common logic across all the fire methods\n private fireEvent(callback: (alignedGridService: AlignedGridsService) => void): void {\n // if we are already consuming, then we are acting on an event from a master,\n // so we don't cause a cyclic firing of events\n if (this.consuming) {\n return;\n }\n\n // iterate through the aligned grids, and pass each aligned grid service to the callback\n const otherGrids = this.gridOptionsWrapper.getAlignedGrids();\n if (otherGrids) {\n otherGrids.forEach((otherGridOptions: GridOptions) => {\n if (otherGridOptions.api) {\n const alignedGridService = otherGridOptions.api.__getAlignedGridService();\n callback(alignedGridService);\n }\n });\n }\n }\n\n // common logic across all consume methods. very little common logic, however extracting\n // guarantees consistency across the methods.\n private onEvent(callback: () => void): void {\n this.consuming = true;\n callback();\n this.consuming = false;\n }\n\n private fireColumnEvent(event: ColumnEvent): void {\n this.fireEvent(alignedGridsService => {\n alignedGridsService.onColumnEvent(event);\n });\n }\n\n private fireScrollEvent(event: BodyScrollEvent): void {\n if (event.direction !== 'horizontal') { return; }\n this.fireEvent(alignedGridsService => {\n alignedGridsService.onScrollEvent(event);\n });\n }\n\n private onScrollEvent(event: BodyScrollEvent): void {\n this.onEvent(() => {\n const gridBodyCon = this.ctrlsService.getGridBodyCtrl();\n gridBodyCon.getScrollFeature().setHorizontalScrollPosition(event.left);\n });\n }\n\n public getMasterColumns(event: ColumnEvent): Column[] {\n const result: Column[] = [];\n if (event.columns) {\n event.columns.forEach((column: Column) => {\n result.push(column);\n });\n } else if (event.column) {\n result.push(event.column);\n }\n return result;\n }\n\n public getColumnIds(event: ColumnEvent): string[] {\n const result: string[] = [];\n if (event.columns) {\n event.columns.forEach(column => {\n result.push(column.getColId());\n });\n } else if (event.column) {\n result.push(event.column.getColId());\n }\n return result;\n }\n\n public onColumnEvent(event: AgEvent): void {\n this.onEvent(() => {\n\n switch (event.type) {\n\n case Events.EVENT_COLUMN_MOVED:\n case Events.EVENT_COLUMN_VISIBLE:\n case Events.EVENT_COLUMN_PINNED:\n case Events.EVENT_COLUMN_RESIZED:\n const colEvent = event as ColumnEvent;\n this.processColumnEvent(colEvent);\n break;\n\n case Events.EVENT_COLUMN_GROUP_OPENED:\n const groupOpenedEvent = event as ColumnGroupOpenedEvent;\n this.processGroupOpenedEvent(groupOpenedEvent);\n break;\n\n case Events.EVENT_COLUMN_PIVOT_CHANGED:\n // we cannot support pivoting with aligned grids as the columns will be out of sync as the\n // grids will have columns created based on the row data of the grid.\n console.warn('AG Grid: pivoting is not supported with aligned grids. ' +\n 'You can only use one of these features at a time in a grid.');\n break;\n }\n\n });\n }\n\n private processGroupOpenedEvent(groupOpenedEvent: ColumnGroupOpenedEvent): void {\n // likewise for column group\n const masterColumnGroup = groupOpenedEvent.columnGroup;\n let otherColumnGroup: ProvidedColumnGroup | null = null;\n\n if (masterColumnGroup) {\n const groupId = masterColumnGroup.getGroupId();\n otherColumnGroup = this.columnModel.getProvidedColumnGroup(groupId);\n }\n\n if (masterColumnGroup && !otherColumnGroup) { return; }\n\n this.logger.log('onColumnEvent-> processing ' + groupOpenedEvent + ' expanded = ' + masterColumnGroup.isExpanded());\n this.columnModel.setColumnGroupOpened(otherColumnGroup, masterColumnGroup.isExpanded(), \"alignedGridChanged\");\n }\n\n private processColumnEvent(colEvent: ColumnEvent): void {\n // the column in the event is from the master grid. need to\n // look up the equivalent from this (other) grid\n const masterColumn = colEvent.column;\n let otherColumn: Column | null = null;\n\n if (masterColumn) {\n otherColumn = this.columnModel.getPrimaryColumn(masterColumn.getColId());\n }\n // if event was with respect to a master column, that is not present in this\n // grid, then we ignore the event\n if (masterColumn && !otherColumn) { return; }\n\n // in time, all the methods below should use the column ids, it's a more generic way\n // of handling columns, and also allows for single or multi column events\n const masterColumns = this.getMasterColumns(colEvent);\n\n switch (colEvent.type) {\n case Events.EVENT_COLUMN_MOVED:\n // when the user moves columns via setColumnState, we can't depend on moving specific columns\n // to an index, as there maybe be many indexes columns moved to (as wasn't result of a mouse drag).\n // so only way to be sure is match the order of all columns using Column State.\n {\n const movedEvent = colEvent as ColumnMovedEvent;\n const srcColState = colEvent.columnApi.getColumnState();\n const destColState = srcColState.map(s => ({ colId: s.colId }));\n this.columnModel.applyColumnState(\n {state: destColState, applyOrder: true}, \"alignedGridChanged\");\n this.logger.log(`onColumnEvent-> processing ${colEvent.type} toIndex = ${movedEvent.toIndex}`);\n }\n break;\n case Events.EVENT_COLUMN_VISIBLE:\n // when the user changes visibility via setColumnState, we can't depend on visibility flag in event\n // as there maybe be mix of true/false (as wasn't result of a mouse click to set visiblity).\n // so only way to be sure is match the visibility of all columns using Column State.\n {\n const visibleEvent = colEvent as ColumnVisibleEvent;\n const srcColState = colEvent.columnApi.getColumnState();\n const destColState = srcColState.map(s => ({ colId: s.colId, hide: s.hide }));\n this.columnModel.applyColumnState({state: destColState}, \"alignedGridChanged\");\n this.logger.log(`onColumnEvent-> processing ${colEvent.type} visible = ${visibleEvent.visible}`);\n }\n break;\n case Events.EVENT_COLUMN_PINNED:\n {\n const pinnedEvent = colEvent as ColumnPinnedEvent;\n const srcColState = colEvent.columnApi.getColumnState();\n const destColState = srcColState.map(s => ({ colId: s.colId, pinned: s.pinned }));\n this.columnModel.applyColumnState({state: destColState}, \"alignedGridChanged\");\n this.logger.log(`onColumnEvent-> processing ${colEvent.type} pinned = ${pinnedEvent.pinned}`);\n }\n break;\n case Events.EVENT_COLUMN_RESIZED:\n const resizedEvent = colEvent as ColumnResizedEvent;\n\n masterColumns.forEach((column: Column) => {\n this.logger.log(`onColumnEvent-> processing ${colEvent.type} actualWidth = ${column.getActualWidth()}`);\n const columnWidths = [{key: column.getColId(), newWidth: column.getActualWidth()}];\n this.columnModel.setColumnWidths(columnWidths, false, resizedEvent.finished, \"alignedGridChanged\");\n });\n break;\n }\n const gridBodyCon = this.ctrlsService.getGridBodyCtrl();\n const isVerticalScrollShowing = gridBodyCon.isVerticalScrollShowing();\n const alignedGrids = this.gridOptionsWrapper.getAlignedGrids();\n\n if (alignedGrids) {\n alignedGrids.forEach((grid) => {\n if (grid.api) {\n grid.api.setAlwaysShowVerticalScroll(isVerticalScrollShowing);\n }\n });\n }\n }\n}\n","import { RowNode } from \"./entities/rowNode\";\nimport { Bean } from \"./context/context\";\nimport { BeanStub } from \"./context/beanStub\";\nimport { Qualifier } from \"./context/context\";\nimport { Logger } from \"./logger\";\nimport { LoggerFactory } from \"./logger\";\nimport { Events, SelectionChangedEvent } from \"./events\";\nimport { Autowired } from \"./context/context\";\nimport { IRowModel } from \"./interfaces/iRowModel\";\nimport { PostConstruct } from \"./context/context\";\nimport { Constants } from \"./constants/constants\";\nimport { ColumnApi } from \"./columns/columnApi\";\nimport { GridApi } from \"./gridApi\";\nimport { ChangedPath } from \"./utils/changedPath\";\nimport { IClientSideRowModel } from \"./interfaces/iClientSideRowModel\";\nimport { iterateObject } from \"./utils/object\";\nimport { exists } from \"./utils/generic\";\n\n@Bean('selectionService')\nexport class SelectionService extends BeanStub {\n\n @Autowired('rowModel') private rowModel: IRowModel;\n @Autowired('columnApi') private columnApi: ColumnApi;\n @Autowired('gridApi') private gridApi: GridApi;\n\n private selectedNodes: { [key: string]: RowNode | undefined; };\n private logger: Logger;\n\n // used for shift selection, so we know where to start the range selection from\n private lastSelectedNode: RowNode | null;\n\n private groupSelectsChildren: boolean;\n\n private setBeans(@Qualifier('loggerFactory') loggerFactory: LoggerFactory) {\n this.logger = loggerFactory.create('selectionService');\n this.reset();\n }\n\n @PostConstruct\n private init(): void {\n this.groupSelectsChildren = this.gridOptionsWrapper.isGroupSelectsChildren();\n this.addManagedListener(this.eventService, Events.EVENT_ROW_SELECTED, this.onRowSelected.bind(this));\n }\n\n public setLastSelectedNode(rowNode: RowNode): void {\n this.lastSelectedNode = rowNode;\n }\n\n public getLastSelectedNode(): RowNode | null {\n return this.lastSelectedNode;\n }\n\n public getSelectedNodes() {\n const selectedNodes: RowNode[] = [];\n iterateObject(this.selectedNodes, (key: string, rowNode: RowNode) => {\n if (rowNode) {\n selectedNodes.push(rowNode);\n }\n });\n return selectedNodes;\n }\n\n public getSelectedRows() {\n const selectedRows: any[] = [];\n iterateObject(this.selectedNodes, (key: string, rowNode: RowNode) => {\n if (rowNode && rowNode.data) {\n selectedRows.push(rowNode.data);\n }\n });\n return selectedRows;\n }\n\n public removeGroupsFromSelection(): void {\n iterateObject(this.selectedNodes, (key: string, rowNode: RowNode) => {\n if (rowNode && rowNode.group) {\n this.selectedNodes[rowNode.id!] = undefined;\n }\n });\n }\n\n // should only be called if groupSelectsChildren=true\n public updateGroupsFromChildrenSelections(changedPath?: ChangedPath): void {\n // we only do this when group selection state depends on selected children\n if (!this.gridOptionsWrapper.isGroupSelectsChildren()) {\n return;\n }\n // also only do it if CSRM (code should never allow this anyway)\n if (this.rowModel.getType() !== Constants.ROW_MODEL_TYPE_CLIENT_SIDE) {\n return;\n }\n\n const clientSideRowModel = this.rowModel as IClientSideRowModel;\n const rootNode = clientSideRowModel.getRootNode();\n\n if (!changedPath) {\n changedPath = new ChangedPath(true, rootNode);\n changedPath.setInactive();\n }\n\n changedPath.forEachChangedNodeDepthFirst(rowNode => {\n if (rowNode !== rootNode) {\n rowNode.calculateSelectedFromChildren();\n }\n });\n\n // clientSideRowModel.getTopLevelNodes()!.forEach((rowNode: RowNode) => {\n // rowNode.depthFirstSearch((node) => {\n // if (node.group) {\n // }\n // });\n // });\n\n }\n\n public getNodeForIdIfSelected(id: number): RowNode | undefined {\n return this.selectedNodes[id];\n }\n\n public clearOtherNodes(rowNodeToKeepSelected: RowNode): number {\n const groupsToRefresh: any = {};\n let updatedCount = 0;\n iterateObject(this.selectedNodes, (key: string, otherRowNode: RowNode) => {\n if (otherRowNode && otherRowNode.id !== rowNodeToKeepSelected.id) {\n const rowNode = this.selectedNodes[otherRowNode.id!];\n updatedCount += rowNode!.setSelectedParams({\n newValue: false,\n clearSelection: false,\n suppressFinishActions: true\n });\n if (this.groupSelectsChildren && otherRowNode.parent) {\n groupsToRefresh[otherRowNode.parent.id!] = otherRowNode.parent;\n }\n }\n });\n iterateObject(groupsToRefresh, (key: string, group: RowNode) => {\n group.calculateSelectedFromChildren();\n });\n return updatedCount;\n }\n\n private onRowSelected(event: any): void {\n const rowNode = event.node;\n\n // we do not store the group rows when the groups select children\n if (this.groupSelectsChildren && rowNode.group) {\n return;\n }\n\n if (rowNode.isSelected()) {\n this.selectedNodes[rowNode.id] = rowNode;\n } else {\n this.selectedNodes[rowNode.id] = undefined;\n }\n }\n\n public syncInRowNode(rowNode: RowNode, oldNode: RowNode | null): void {\n this.syncInOldRowNode(rowNode, oldNode);\n this.syncInNewRowNode(rowNode);\n }\n\n // if the id has changed for the node, then this means the rowNode\n // is getting used for a different data item, which breaks\n // our selectedNodes, as the node now is mapped by the old id\n // which is inconsistent. so to keep the old node as selected,\n // we swap in the clone (with the old id and old data). this means\n // the oldNode is effectively a daemon we keep a reference to,\n // so if client calls api.getSelectedNodes(), it gets the daemon\n // in the result. when the client un-selects, the reference to the\n // daemon is removed. the daemon, because it's an oldNode, is not\n // used by the grid for rendering, it's a copy of what the node used\n // to be like before the id was changed.\n private syncInOldRowNode(rowNode: RowNode, oldNode: RowNode | null): void {\n const oldNodeHasDifferentId = exists(oldNode) && (rowNode.id !== oldNode.id);\n if (oldNodeHasDifferentId && oldNode) {\n const id = oldNode.id!;\n const oldNodeSelected = this.selectedNodes[id] == rowNode;\n if (oldNodeSelected) {\n this.selectedNodes[oldNode.id!] = oldNode;\n }\n }\n }\n\n private syncInNewRowNode(rowNode: RowNode): void {\n if (exists(this.selectedNodes[rowNode.id!])) {\n rowNode.setSelectedInitialValue(true);\n this.selectedNodes[rowNode.id!] = rowNode;\n } else {\n rowNode.setSelectedInitialValue(false);\n }\n }\n\n public reset(): void {\n this.logger.log('reset');\n this.selectedNodes = {};\n this.lastSelectedNode = null;\n }\n\n // returns a list of all nodes at 'best cost' - a feature to be used\n // with groups / trees. if a group has all it's children selected,\n // then the group appears in the result, but not the children.\n // Designed for use with 'children' as the group selection type,\n // where groups don't actually appear in the selection normally.\n public getBestCostNodeSelection(): RowNode[] | undefined {\n if (this.rowModel.getType() !== Constants.ROW_MODEL_TYPE_CLIENT_SIDE) {\n console.warn('AG Grid: `getBestCostNodeSelection` is only available when using normal row model');\n return;\n }\n\n const clientSideRowModel = this.rowModel as IClientSideRowModel;\n\n const topLevelNodes = clientSideRowModel.getTopLevelNodes();\n\n if (topLevelNodes === null) {\n console.warn('AG Grid: `selectAll` not available doing `rowModel=virtual`');\n return;\n }\n\n const result: RowNode[] = [];\n\n // recursive function, to find the selected nodes\n function traverse(nodes: RowNode[]) {\n for (let i = 0, l = nodes.length; i < l; i++) {\n const node = nodes[i];\n if (node.isSelected()) {\n result.push(node);\n } else {\n // if not selected, then if it's a group, and the group\n // has children, continue to search for selections\n const maybeGroup = node as any;\n if (maybeGroup.group && maybeGroup.children) {\n traverse(maybeGroup.children);\n }\n }\n }\n }\n\n traverse(topLevelNodes);\n\n return result;\n }\n\n public setRowModel(rowModel: any) {\n this.rowModel = rowModel;\n }\n\n public isEmpty(): boolean {\n let count = 0;\n iterateObject(this.selectedNodes, (nodeId: string, rowNode: RowNode) => {\n if (rowNode) {\n count++;\n }\n });\n return count === 0;\n }\n\n public deselectAllRowNodes(justFiltered = false) {\n const callback = (rowNode: RowNode) => rowNode.selectThisNode(false);\n const rowModelClientSide = this.rowModel.getType() === Constants.ROW_MODEL_TYPE_CLIENT_SIDE;\n\n if (justFiltered) {\n if (!rowModelClientSide) {\n console.error('AG Grid: selecting just filtered only works with In Memory Row Model');\n return;\n }\n const clientSideRowModel = this.rowModel as IClientSideRowModel;\n clientSideRowModel.forEachNodeAfterFilter(callback);\n } else {\n iterateObject(this.selectedNodes, (id: string, rowNode: RowNode) => {\n // remember the reference can be to null, as we never 'delete' from the map\n if (rowNode) {\n callback(rowNode);\n }\n });\n // this clears down the map (whereas above only sets the items in map to 'undefined')\n this.reset();\n }\n\n // the above does not clean up the parent rows if they are selected\n if (rowModelClientSide && this.groupSelectsChildren) {\n this.updateGroupsFromChildrenSelections();\n }\n\n const event: SelectionChangedEvent = {\n type: Events.EVENT_SELECTION_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n\n this.eventService.dispatchEvent(event);\n }\n\n public selectAllRowNodes(justFiltered = false) {\n if (this.rowModel.getType() !== Constants.ROW_MODEL_TYPE_CLIENT_SIDE) {\n throw new Error(`selectAll only available with normal row model, ie not ${this.rowModel.getType()}`);\n }\n\n const clientSideRowModel = this.rowModel as IClientSideRowModel;\n const callback = (rowNode: RowNode) => rowNode.selectThisNode(true);\n\n if (justFiltered) {\n clientSideRowModel.forEachNodeAfterFilter(callback);\n } else {\n clientSideRowModel.forEachNode(callback);\n }\n\n // the above does not clean up the parent rows if they are selected\n if (this.rowModel.getType() === Constants.ROW_MODEL_TYPE_CLIENT_SIDE && this.groupSelectsChildren) {\n this.updateGroupsFromChildrenSelections();\n }\n\n const event: SelectionChangedEvent = {\n type: Events.EVENT_SELECTION_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event);\n }\n\n /**\n * @method\n * @deprecated\n */\n public selectNode(rowNode: RowNode | undefined, tryMulti: boolean) {\n if (rowNode) {\n rowNode.setSelectedParams({ newValue: true, clearSelection: !tryMulti });\n }\n }\n\n /**\n * @method\n * @deprecated\n */\n public deselectIndex(rowIndex: number) {\n const node = this.rowModel.getRow(rowIndex);\n this.deselectNode(node);\n }\n\n /**\n * @method\n * @deprecated\n */\n public deselectNode(rowNode: RowNode | undefined) {\n if (rowNode) {\n rowNode.setSelectedParams({ newValue: false, clearSelection: false });\n }\n }\n\n /**\n * @method\n * @deprecated\n */\n public selectIndex(index: any, tryMulti: boolean) {\n const node = this.rowModel.getRow(index);\n this.selectNode(node, tryMulti);\n }\n\n}\n","import { ColDef, ColGroupDef } from \"../entities/colDef\";\nimport { IHeaderColumn } from \"../entities/iHeaderColumn\";\nimport { ColumnModel, ColumnState, ApplyColumnStateParams } from \"./columnModel\";\nimport { ProvidedColumnGroup } from \"../entities/providedColumnGroup\";\nimport { ColumnGroup } from \"../entities/columnGroup\";\nimport { Column } from \"../entities/column\";\nimport { Autowired, Bean, PreDestroy } from \"../context/context\";\nimport { _ } from \"../utils\";\nimport { ColumnEventType } from \"../events\";\n\n@Bean('columnApi')\nexport class ColumnApi {\n\n @Autowired('columnModel') private columnModel: ColumnModel;\n\n /** Gets the grid to size the columns to the specified width in pixels, e.g. `sizeColumnsToFit(900)`. To have the grid fit the columns to the grid's width, use the Grid API `gridApi.sizeColumnsToFit()` instead. */\n public sizeColumnsToFit(gridWidth: number): void {\n // AG-3403 validate that gridWidth is provided because this method has the same name as\n // a method on the grid API that takes no arguments, and it's easy to confuse the two\n if (typeof gridWidth === \"undefined\") {\n console.error('AG Grid: missing parameter to columnApi.sizeColumnsToFit(gridWidth)');\n }\n this.columnModel.sizeColumnsToFit(gridWidth, 'api');\n }\n /** Call this if you want to open or close a column group. */\n public setColumnGroupOpened(group: ProvidedColumnGroup | string, newValue: boolean): void { this.columnModel.setColumnGroupOpened(group, newValue, 'api'); }\n /** Returns the column group with the given name. */\n public getColumnGroup(name: string, instanceId?: number): ColumnGroup | null { return this.columnModel.getColumnGroup(name, instanceId); }\n /** Returns the provided column group with the given name. */\n public getProvidedColumnGroup(name: string): ProvidedColumnGroup | null { return this.columnModel.getProvidedColumnGroup(name); }\n\n /** Returns the display name for a column. Useful if you are doing your own header rendering and want the grid to work out if `headerValueGetter` is used, or if you are doing your own column management GUI, to know what to show as the column name. */\n public getDisplayNameForColumn(column: Column, location: string | null): string { return this.columnModel.getDisplayNameForColumn(column, location) || ''; }\n /** Returns the display name for a column group (when grouping columns). */\n public getDisplayNameForColumnGroup(columnGroup: ColumnGroup, location: string): string { return this.columnModel.getDisplayNameForColumnGroup(columnGroup, location) || ''; }\n\n /** Returns the column with the given `colKey`, which can either be the `colId` (a string) or the `colDef` (an object). */\n public getColumn(key: any): Column | null { return this.columnModel.getPrimaryColumn(key); }\n /** Applies the state of the columns from a previous state. Returns `false` if one or more columns could not be found. */\n public applyColumnState(params: ApplyColumnStateParams): boolean { return this.columnModel.applyColumnState(params, 'api'); }\n /** Gets the state of the columns. Typically used when saving column state. */\n public getColumnState(): ColumnState[] { return this.columnModel.getColumnState(); }\n /** Sets the state back to match the originally provided column definitions. */\n public resetColumnState(): void { this.columnModel.resetColumnState('api'); }\n /** Gets the state of the column groups. Typically used when saving column group state. */\n public getColumnGroupState(): { groupId: string, open: boolean }[] { return this.columnModel.getColumnGroupState(); }\n /** Sets the state of the column group state from a previous state. */\n public setColumnGroupState(stateItems: ({ groupId: string, open: boolean })[]): void { this.columnModel.setColumnGroupState(stateItems, 'api'); }\n /** Sets the state back to match the originally provided column definitions. */\n public resetColumnGroupState(): void { this.columnModel.resetColumnGroupState('api'); }\n\n /** Returns `true` if pinning left or right, otherwise `false`. */\n public isPinning(): boolean { return this.columnModel.isPinningLeft() || this.columnModel.isPinningRight(); }\n /** Returns `true` if pinning left, otherwise `false`. */\n public isPinningLeft(): boolean { return this.columnModel.isPinningLeft(); }\n /** Returns `true` if pinning right, otherwise `false`. */\n public isPinningRight(): boolean { return this.columnModel.isPinningRight(); }\n /** Returns the column to the right of the provided column, taking into consideration open / closed column groups and visible columns. This is useful if you need to know what column is beside yours e.g. if implementing your own cell navigation. */\n public getDisplayedColAfter(col: Column): Column | null { return this.columnModel.getDisplayedColAfter(col); }\n /** Same as `getVisibleColAfter` except gives column to the left. */\n public getDisplayedColBefore(col: Column): Column | null { return this.columnModel.getDisplayedColBefore(col); }\n /** Sets the visibility of a column. Key can be the column ID or `Column` object. */\n public setColumnVisible(key: string | Column, visible: boolean): void { this.columnModel.setColumnVisible(key, visible, 'api'); }\n /** Same as `setColumnVisible`, but provide a list of column keys. */\n public setColumnsVisible(keys: (string | Column)[], visible: boolean): void { this.columnModel.setColumnsVisible(keys, visible, 'api'); }\n /** Sets the column pinned / unpinned. Key can be the column ID, field, `ColDef` object or `Column` object. */\n public setColumnPinned(key: string | Column, pinned: string): void { this.columnModel.setColumnPinned(key, pinned, 'api'); }\n /** Same as `setColumnPinned`, but provide a list of column keys. */\n public setColumnsPinned(keys: (string | Column)[], pinned: string): void { this.columnModel.setColumnsPinned(keys, pinned, 'api'); }\n\n /** Returns all the columns, regardless of visible or not. */\n public getAllColumns(): Column[] | null { return this.columnModel.getAllPrimaryColumns(); }\n /**\n * Returns all the grid columns, same as `getAllColumns()`, except\n *\n * a) it has the order of the columns that are presented in the grid\n *\n * b) it's after the 'pivot' step, so if pivoting, has the value columns for the pivot.\n */\n public getAllGridColumns(): Column[] { return this.columnModel.getAllGridColumns(); }\n /** Same as `getAllDisplayedColumns` but just for the pinned left portion of the grid. */\n public getDisplayedLeftColumns(): Column[] { return this.columnModel.getDisplayedLeftColumns(); }\n /** Same as `getAllDisplayedColumns` but just for the center portion of the grid. */\n public getDisplayedCenterColumns(): Column[] { return this.columnModel.getDisplayedCenterColumns(); }\n /** Same as `getAllDisplayedColumns` but just for the pinned right portion of the grid. */\n public getDisplayedRightColumns(): Column[] { return this.columnModel.getDisplayedRightColumns(); }\n /** Returns all columns currently displayed (e.g. are visible and if in a group, the group is showing the columns) for the pinned left, centre and pinned right portions of the grid. */\n public getAllDisplayedColumns(): Column[] { return this.columnModel.getAllDisplayedColumns(); }\n /** Same as `getAllGridColumns()`, except only returns rendered columns, i.e. columns that are not within the viewport and therefore not rendered, due to column virtualisation, are not displayed. */\n public getAllDisplayedVirtualColumns(): Column[] { return this.columnModel.getViewportColumns(); }\n\n /** Moves a column to `toIndex`. The column is first removed, then added at the `toIndex` location, thus index locations will change to the right of the column after the removal. */\n public moveColumn(key: string | Column, toIndex: number): void {\n if (typeof key === 'number') {\n // moveColumn used to take indexes, so this is advising user who hasn't moved to new method name\n console.warn('AG Grid: you are using moveColumn(fromIndex, toIndex) - moveColumn takes a column key and a destination index, not two indexes, to move with indexes use moveColumnByIndex(from,to) instead');\n this.columnModel.moveColumnByIndex(key as number, toIndex, 'api');\n } else {\n this.columnModel.moveColumn(key, toIndex, 'api');\n }\n }\n /** Same as `moveColumn` but works on index locations. */\n public moveColumnByIndex(fromIndex: number, toIndex: number): void { this.columnModel.moveColumnByIndex(fromIndex, toIndex, 'api'); }\n /** Same as `moveColumn` but works on list. */\n public moveColumns(columnsToMoveKeys: (string | Column)[], toIndex: number) { this.columnModel.moveColumns(columnsToMoveKeys, toIndex, 'api'); }\n /** Move the column to a new position in the row grouping order. */\n public moveRowGroupColumn(fromIndex: number, toIndex: number): void { this.columnModel.moveRowGroupColumn(fromIndex, toIndex); }\n /** Sets the agg function for a column. `aggFunc` can be one of `'min' | 'max' | 'sum'`. */\n public setColumnAggFunc(key: string | Column, aggFunc: string): void { this.columnModel.setColumnAggFunc(key, aggFunc); }\n /** Sets the column width on a single column. The finished flag gets included in the resulting event and not used internally by the grid. The finished flag is intended for dragging, where a dragging action will produce many `columnWidth` events, so the consumer of events knows when it receives the last event in a stream. The finished parameter is optional, and defaults to `true`. */\n public setColumnWidth(key: string | Column, newWidth: number, finished: boolean = true, source?: ColumnEventType): void {\n this.columnModel.setColumnWidths([{ key, newWidth }], false, finished, source);\n }\n /** Sets the column widths on multiple columns. This method offers better performance than calling `setColumnWidth` multiple times. The finished flag gets included in the resulting event and not used internally by the grid. The finished flag is intended for dragging, where a dragging action will produce many `columnWidth` events, so the consumer of events knows when it receives the last event in a stream. The finished parameter is optional, and defaults to `true`. */\n public setColumnWidths(columnWidths: { key: string | Column, newWidth: number }[], finished: boolean = true, source?: ColumnEventType): void {\n this.columnModel.setColumnWidths(columnWidths, false, finished, source);\n }\n /** Set the pivot mode. */\n public setPivotMode(pivotMode: boolean): void { this.columnModel.setPivotMode(pivotMode); }\n /** Get the pivot mode. */\n public isPivotMode(): boolean { return this.columnModel.isPivotMode(); }\n /** Returns the pivot column for the given `pivotKeys` and `valueColId`. Useful to then call operations on the pivot column. */\n public getSecondaryPivotColumn(pivotKeys: string[], valueColKey: string | Column): Column | null { return this.columnModel.getSecondaryPivotColumn(pivotKeys, valueColKey); }\n\n /** Set the value columns. */\n public setValueColumns(colKeys: (string | Column)[]): void { this.columnModel.setValueColumns(colKeys, 'api'); }\n /** Get value columns. */\n public getValueColumns(): Column[] { return this.columnModel.getValueColumns(); }\n /** Remove a value column. */\n public removeValueColumn(colKey: (string | Column)): void { this.columnModel.removeValueColumn(colKey, 'api'); }\n /** Same as `removeValueColumns` but provide a list. */\n public removeValueColumns(colKeys: (string | Column)[]): void { this.columnModel.removeValueColumns(colKeys, 'api'); }\n /** Add a value column. */\n public addValueColumn(colKey: (string | Column)): void { this.columnModel.addValueColumn(colKey, 'api'); }\n /** Same as `addValueColumn` but provide a list. */\n public addValueColumns(colKeys: (string | Column)[]): void { this.columnModel.addValueColumns(colKeys, 'api'); }\n\n /** Set the row group columns. */\n public setRowGroupColumns(colKeys: (string | Column)[]): void { this.columnModel.setRowGroupColumns(colKeys, 'api'); }\n /** Remove a column from the row groups. */\n public removeRowGroupColumn(colKey: string | Column): void { this.columnModel.removeRowGroupColumn(colKey, 'api'); }\n /** Same as `removeRowGroupColumn` but provide a list of columns. */\n public removeRowGroupColumns(colKeys: (string | Column)[]): void { this.columnModel.removeRowGroupColumns(colKeys, 'api'); }\n /** Add a column to the row groups. */\n public addRowGroupColumn(colKey: string | Column): void { this.columnModel.addRowGroupColumn(colKey, 'api'); }\n /** Same as `addRowGroupColumn` but provide a list of columns. */\n public addRowGroupColumns(colKeys: (string | Column)[]): void { this.columnModel.addRowGroupColumns(colKeys, 'api'); }\n /** Get row group columns. */\n public getRowGroupColumns(): Column[] { return this.columnModel.getRowGroupColumns(); }\n\n /** Set the pivot columns. */\n public setPivotColumns(colKeys: (string | Column)[]): void { this.columnModel.setPivotColumns(colKeys, 'api'); }\n /** Remove a pivot column. */\n public removePivotColumn(colKey: string | Column): void { this.columnModel.removePivotColumn(colKey, 'api'); }\n /** Same as `removePivotColumn` but provide a list of columns. */\n public removePivotColumns(colKeys: (string | Column)[]): void { this.columnModel.removePivotColumns(colKeys, 'api'); }\n /** Add a pivot column. */\n public addPivotColumn(colKey: string | Column): void { this.columnModel.addPivotColumn(colKey, 'api'); }\n /** Same as `addPivotColumn` but provide a list of columns. */\n public addPivotColumns(colKeys: (string | Column)[]): void { this.columnModel.addPivotColumns(colKeys, 'api'); }\n /** Get the pivot columns. */\n public getPivotColumns(): Column[] { return this.columnModel.getPivotColumns(); }\n\n /** Same as `getAllDisplayedColumnGroups` but just for the pinned left portion of the grid. */\n public getLeftDisplayedColumnGroups(): IHeaderColumn[] { return this.columnModel.getDisplayedTreeLeft(); }\n /** Same as `getAllDisplayedColumnGroups` but just for the center portion of the grid. */\n public getCenterDisplayedColumnGroups(): IHeaderColumn[] { return this.columnModel.getDisplayedTreeCentre(); }\n /** Same as `getAllDisplayedColumnGroups` but just for the pinned right portion of the grid. */\n public getRightDisplayedColumnGroups(): IHeaderColumn[] { return this.columnModel.getDisplayedTreeRight(); }\n /** Returns all 'root' column headers. If you are not grouping columns, these return the columns. If you are grouping, these return the top level groups - you can navigate down through each one to get the other lower level headers and finally the columns at the bottom. */\n public getAllDisplayedColumnGroups(): IHeaderColumn[] | null { return this.columnModel.getAllDisplayedTrees(); }\n /** Auto-sizes a column based on its contents. */\n public autoSizeColumn(key: string | Column, skipHeader?: boolean): void { return this.columnModel.autoSizeColumn(key, skipHeader, 'api'); }\n\n /** Same as `autoSizeColumn`, but provide a list of column keys. */\n public autoSizeColumns(keys: (string | Column)[], skipHeader?: boolean): void {\n this.columnModel.autoSizeColumns({ columns: keys, skipHeader: skipHeader });\n }\n\n /** Calls `autoSizeColumns` on all displayed columns. */\n public autoSizeAllColumns(skipHeader?: boolean): void { this.columnModel.autoSizeAllColumns(skipHeader, 'api'); }\n\n /** Set the secondary pivot columns. */\n public setSecondaryColumns(colDefs: (ColDef | ColGroupDef)[]): void { this.columnModel.setSecondaryColumns(colDefs, 'api'); }\n /** Returns the grid's secondary columns. */\n public getSecondaryColumns(): Column[] | null { return this.columnModel.getSecondaryColumns(); }\n /** Returns the grid's primary columns. */\n public getPrimaryColumns(): Column[] | null { return this.columnModel.getAllPrimaryColumns(); }\n\n @PreDestroy\n private cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid(): void {\n // some users were raising support issues with regards memory leaks. the problem was the customers applications\n // were keeping references to the API. trying to educate them all would be difficult, easier to just remove\n // all references in the API so at least the core grid can be garbage collected.\n //\n // wait about 100ms before clearing down the references, in case user has some cleanup to do,\n // and needs to deference the API first\n setTimeout(_.removeAllReferences.bind(window, this, 'Column API'), 100);\n }\n\n // below goes through deprecated items, prints message to user, then calls the new version of the same method\n\n // public getColumnDefs(): (ColDef | ColGroupDef)[] {\n // this.setColumnGroupOpened(group, newValue);\n // return null;\n // }\n\n /** @deprecated columnGroupOpened no longer exists, use setColumnGroupOpened */\n public columnGroupOpened(group: ProvidedColumnGroup | string, newValue: boolean): void {\n console.error('AG Grid: columnGroupOpened no longer exists, use setColumnGroupOpened');\n this.setColumnGroupOpened(group, newValue);\n }\n /** @deprecated hideColumns is deprecated, use setColumnsVisible */\n public hideColumns(colIds: any, hide: any): void {\n console.error('AG Grid: hideColumns is deprecated, use setColumnsVisible');\n this.columnModel.setColumnsVisible(colIds, !hide, 'api');\n }\n /** @deprecated hideColumn is deprecated, use setColumnVisible */\n public hideColumn(colId: any, hide: any): void {\n console.error('AG Grid: hideColumn is deprecated, use setColumnVisible');\n this.columnModel.setColumnVisible(colId, !hide, 'api');\n }\n /** @deprecated setState is deprecated, use setColumnState */\n public setState(columnState: ColumnState[]): boolean {\n console.error('AG Grid: setState is deprecated, use setColumnState');\n return this.setColumnState(columnState);\n }\n /** @deprecated getState is deprecated, use getColumnState */\n public getState(): ColumnState[] {\n console.error('AG Grid: getState is deprecated, use getColumnState');\n return this.getColumnState();\n }\n /** @deprecated resetState is deprecated, use resetColumnState */\n public resetState(): void {\n console.error('AG Grid: resetState is deprecated, use resetColumnState');\n this.resetColumnState();\n }\n\n /** @deprecated getAggregationColumns is deprecated, use getValueColumns */\n public getAggregationColumns(): Column[] {\n console.error('AG Grid: getAggregationColumns is deprecated, use getValueColumns');\n return this.columnModel.getValueColumns();\n }\n\n /** @deprecated removeAggregationColumn is deprecated, use removeValueColumn */\n public removeAggregationColumn(colKey: (string | Column)): void {\n console.error('AG Grid: removeAggregationColumn is deprecated, use removeValueColumn');\n this.columnModel.removeValueColumn(colKey, 'api');\n }\n /** @deprecated removeAggregationColumns is deprecated, use removeValueColumns */\n public removeAggregationColumns(colKeys: (string | Column)[]): void {\n console.error('AG Grid: removeAggregationColumns is deprecated, use removeValueColumns');\n this.columnModel.removeValueColumns(colKeys, 'api');\n }\n /** @deprecated addAggregationColumn is deprecated, use addValueColumn */\n public addAggregationColumn(colKey: (string | Column)): void {\n console.error('AG Grid: addAggregationColumn is deprecated, use addValueColumn');\n this.columnModel.addValueColumn(colKey, 'api');\n }\n /** @deprecated addAggregationColumns is deprecated, use addValueColumns */\n public addAggregationColumns(colKeys: (string | Column)[]): void {\n console.error('AG Grid: addAggregationColumns is deprecated, use addValueColumns');\n this.columnModel.addValueColumns(colKeys, 'api');\n }\n /** @deprecated setColumnAggFunction is deprecated, use setColumnAggFunc */\n public setColumnAggFunction(column: Column, aggFunc: string): void {\n console.error('AG Grid: setColumnAggFunction is deprecated, use setColumnAggFunc');\n this.columnModel.setColumnAggFunc(column, aggFunc, 'api');\n }\n /** @deprecated getDisplayNameForCol is deprecated, use getDisplayNameForColumn */\n public getDisplayNameForCol(column: any): string {\n console.error('AG Grid: getDisplayNameForCol is deprecated, use getDisplayNameForColumn');\n return this.getDisplayNameForColumn(column, null);\n }\n\n /** @deprecated setColumnState is deprecated, use applyColumnState. */\n public setColumnState(columnState: ColumnState[]): boolean {\n console.error('AG Grid: setColumnState is deprecated, use applyColumnState');\n return this.columnModel.applyColumnState({ state: columnState, applyOrder: true }, 'api');\n }\n\n /** @deprecated getOriginalColumnGroup is deprecated, use getProvidedColumnGroup. */\n public getOriginalColumnGroup(name: string): ProvidedColumnGroup | null {\n console.error('AG Grid: getOriginalColumnGroup is deprecated, use getProvidedColumnGroup');\n return this.columnModel.getProvidedColumnGroup(name);\n }\n\n}\n\n\n","import { ExpressionService } from \"./expressionService\";\nimport { ColumnModel } from \"../columns/columnModel\";\nimport { NewValueParams, ValueGetterParams, KeyCreatorParams } from \"../entities/colDef\";\nimport { Autowired, Bean, PostConstruct } from \"../context/context\";\nimport { RowNode } from \"../entities/rowNode\";\nimport { Column } from \"../entities/column\";\nimport { CellValueChangedEvent, Events } from \"../events\";\nimport { ValueCache } from \"./valueCache\";\nimport { BeanStub } from \"../context/beanStub\";\nimport { getValueUsingField } from \"../utils/object\";\nimport { missing, exists } from \"../utils/generic\";\nimport { doOnce } from \"../utils/function\";\n\n@Bean('valueService')\nexport class ValueService extends BeanStub {\n\n @Autowired('expressionService') private expressionService: ExpressionService;\n @Autowired('columnModel') private columnModel: ColumnModel;\n @Autowired('valueCache') private valueCache: ValueCache;\n\n private cellExpressions: boolean;\n\n private initialised = false;\n\n @PostConstruct\n public init(): void {\n this.cellExpressions = this.gridOptionsWrapper.isEnableCellExpressions();\n this.initialised = true;\n\n // We listen to our own event and use it to call the columnSpecific callback,\n // this way the handler calls are correctly interleaved with other global events\n this.eventService.addEventListener(\n Events.EVENT_CELL_VALUE_CHANGED,\n (event: CellValueChangedEvent) => this.callColumnCellValueChangedHandler(event),\n this.gridOptionsWrapper.useAsyncEvents(),\n );\n }\n\n public getValue(column: Column,\n rowNode?: RowNode | null,\n forFilter = false,\n ignoreAggData = false): any {\n\n // hack - the grid is getting refreshed before this bean gets initialised, race condition.\n // really should have a way so they get initialised in the right order???\n if (!this.initialised) {\n this.init();\n }\n\n if (!rowNode) {\n return;\n }\n\n // pull these out to make code below easier to read\n const colDef = column.getColDef();\n const field = colDef.field;\n const colId = column.getId();\n const data = rowNode.data;\n\n let result: any;\n\n // if there is a value getter, this gets precedence over a field\n const groupDataExists = rowNode.groupData && rowNode.groupData[colId] !== undefined;\n const aggDataExists = !ignoreAggData && rowNode.aggData && rowNode.aggData[colId] !== undefined;\n\n if (forFilter && colDef.filterValueGetter) {\n result = this.executeFilterValueGetter(colDef.filterValueGetter, data, column, rowNode);\n } else if (this.gridOptionsWrapper.isTreeData() && aggDataExists) {\n result = rowNode.aggData[colId];\n } else if (this.gridOptionsWrapper.isTreeData() && colDef.valueGetter) {\n result = this.executeValueGetter(colDef.valueGetter, data, column, rowNode);\n } else if (this.gridOptionsWrapper.isTreeData() && (field && data)) {\n result = getValueUsingField(data, field, column.isFieldContainsDots());\n } else if (groupDataExists) {\n result = rowNode.groupData![colId];\n } else if (aggDataExists) {\n result = rowNode.aggData[colId];\n } else if (colDef.valueGetter) {\n result = this.executeValueGetter(colDef.valueGetter, data, column, rowNode);\n } else if (field && data) {\n result = getValueUsingField(data, field, column.isFieldContainsDots());\n }\n\n // the result could be an expression itself, if we are allowing cell values to be expressions\n if (this.cellExpressions && (typeof result === 'string') && result.indexOf('=') === 0) {\n const cellValueGetter = result.substring(1);\n result = this.executeValueGetter(cellValueGetter, data, column, rowNode);\n }\n\n if (result == null) {\n const openedGroup = this.getOpenedGroup(rowNode, column);\n if (openedGroup != null) {\n return openedGroup;\n }\n }\n\n return result;\n }\n\n private getOpenedGroup(rowNode: RowNode, column: Column): any {\n\n if (!this.gridOptionsWrapper.isShowOpenedGroup()) { return; }\n\n const colDef = column.getColDef();\n if (!colDef.showRowGroup) { return; }\n\n const showRowGroup = column.getColDef().showRowGroup;\n\n let pointer = rowNode.parent;\n\n while (pointer != null) {\n if (pointer.rowGroupColumn && (showRowGroup === true || showRowGroup === pointer.rowGroupColumn.getId())) {\n return pointer.key;\n }\n pointer = pointer.parent;\n }\n\n return undefined;\n }\n\n /**\n * Sets the value of a GridCell\n * @param rowNode The `RowNode` to be updated\n * @param colKey The `Column` to be updated\n * @param newValue The new value to be set\n * @param eventSource The event source\n * @returns `True` if the value has been updated, otherwise`False`.\n */\n public setValue(rowNode: RowNode, colKey: string | Column, newValue: any, eventSource?: string): boolean {\n const column = this.columnModel.getPrimaryColumn(colKey);\n\n if (!rowNode || !column) {\n return false;\n }\n // this will only happen if user is trying to paste into a group row, which doesn't make sense\n // the user should not be trying to paste into group rows\n if (missing(rowNode.data)) {\n rowNode.data = {};\n }\n\n // for backwards compatibility we are also retrieving the newValueHandler as well as the valueSetter\n const { field, newValueHandler, valueSetter } = column.getColDef();\n\n // need either a field or a newValueHandler for this to work\n if (missing(field) && missing(newValueHandler) && missing(valueSetter)) {\n // we don't tell user about newValueHandler, as that is deprecated\n console.warn(`AG Grid: you need either field or valueSetter set on colDef for editing to work`);\n return false;\n }\n\n const params: NewValueParams = {\n node: rowNode,\n data: rowNode.data,\n oldValue: this.getValue(column, rowNode),\n newValue: newValue,\n colDef: column.getColDef(),\n column: column,\n api: this.gridOptionsWrapper.getApi()!,\n columnApi: this.gridOptionsWrapper.getColumnApi()!,\n context: this.gridOptionsWrapper.getContext()\n };\n\n params.newValue = newValue;\n\n let valueWasDifferent: boolean;\n\n if (newValueHandler && exists(newValueHandler)) {\n valueWasDifferent = newValueHandler(params);\n } else if (exists(valueSetter)) {\n valueWasDifferent = this.expressionService.evaluate(valueSetter, params);\n } else {\n valueWasDifferent = this.setValueUsingField(rowNode.data, field, newValue, column.isFieldContainsDots());\n }\n\n // in case user forgot to return something (possible if they are not using TypeScript\n // and just forgot, or using an old newValueHandler we didn't always expect a return\n // value here), we default the return value to true, so we always refresh.\n if (valueWasDifferent === undefined) {\n valueWasDifferent = true;\n }\n\n // if no change to the value, then no need to do the updating, or notifying via events.\n // otherwise the user could be tabbing around the grid, and cellValueChange would get called\n // all the time.\n if (!valueWasDifferent) {\n return false;\n }\n\n // reset quick filter on this row\n rowNode.resetQuickFilterAggregateText();\n\n this.valueCache.onDataChanged();\n\n params.newValue = this.getValue(column, rowNode);\n\n const event: CellValueChangedEvent = {\n type: Events.EVENT_CELL_VALUE_CHANGED,\n event: null,\n rowIndex: rowNode.rowIndex!,\n rowPinned: rowNode.rowPinned,\n column: params.column,\n api: params.api!,\n columnApi: params.columnApi!,\n colDef: params.colDef,\n context: params.context,\n data: rowNode.data,\n node: rowNode,\n oldValue: params.oldValue,\n newValue: params.newValue,\n value: params.newValue,\n source: eventSource\n };\n\n this.eventService.dispatchEvent(event);\n\n return true;\n }\n\n private callColumnCellValueChangedHandler(event: CellValueChangedEvent) {\n const onCellValueChanged = event.colDef.onCellValueChanged;\n if (typeof onCellValueChanged === 'function') {\n onCellValueChanged({\n node: event.node,\n data: event.data,\n oldValue: event.oldValue,\n newValue: event.newValue,\n colDef: event.colDef,\n column: event.column,\n api: event.api,\n columnApi: event.columnApi,\n context: event.context\n });\n }\n }\n\n private setValueUsingField(data: any, field: string | undefined, newValue: any, isFieldContainsDots: boolean): boolean {\n if (!field) {\n return false;\n }\n\n // if no '.', then it's not a deep value\n const valuesAreSame: boolean = false;\n if (!isFieldContainsDots) {\n data[field] = newValue;\n } else {\n // otherwise it is a deep value, so need to dig for it\n const fieldPieces = field.split('.');\n let currentObject = data;\n while (fieldPieces.length > 0 && currentObject) {\n const fieldPiece: any = fieldPieces.shift();\n if (fieldPieces.length === 0) {\n currentObject[fieldPiece] = newValue;\n } else {\n currentObject = currentObject[fieldPiece];\n }\n }\n }\n return !valuesAreSame;\n }\n\n private executeFilterValueGetter(valueGetter: string | Function, data: any, column: Column, rowNode: RowNode): any {\n const params: ValueGetterParams = {\n data: data,\n node: rowNode,\n column: column,\n colDef: column.getColDef(),\n api: this.gridOptionsWrapper.getApi()!,\n columnApi: this.gridOptionsWrapper.getColumnApi()!,\n context: this.gridOptionsWrapper.getContext(),\n getValue: this.getValueCallback.bind(this, rowNode)\n };\n\n return this.expressionService.evaluate(valueGetter, params);\n }\n\n private executeValueGetter(valueGetter: string | Function, data: any, column: Column, rowNode: RowNode): any {\n\n const colId = column.getId();\n\n // if inside the same turn, just return back the value we got last time\n const valueFromCache = this.valueCache.getValue(rowNode, colId);\n\n if (valueFromCache !== undefined) {\n return valueFromCache;\n }\n\n const params: ValueGetterParams = {\n data: data,\n node: rowNode,\n column: column,\n colDef: column.getColDef(),\n api: this.gridOptionsWrapper.getApi()!,\n columnApi: this.gridOptionsWrapper.getColumnApi()!,\n context: this.gridOptionsWrapper.getContext(),\n getValue: this.getValueCallback.bind(this, rowNode)\n };\n\n const result = this.expressionService.evaluate(valueGetter, params);\n\n // if a turn is active, store the value in case the grid asks for it again\n this.valueCache.setValue(rowNode, colId, result);\n\n return result;\n }\n\n private getValueCallback(node: RowNode, field: string | Column): any {\n const otherColumn = this.columnModel.getPrimaryColumn(field);\n\n if (otherColumn) {\n return this.getValue(otherColumn, node);\n }\n\n return null;\n }\n\n // used by row grouping and pivot, to get key for a row. col can be a pivot col or a row grouping col\n public getKeyForNode(col: Column, rowNode: RowNode): any {\n const value = this.getValue(col, rowNode);\n const keyCreator = col.getColDef().keyCreator;\n\n let result = value;\n if (keyCreator) {\n const keyParams: KeyCreatorParams = {\n value: value,\n colDef: col.getColDef(),\n column: col,\n node: rowNode,\n data: rowNode.data,\n api: this.gridOptionsWrapper.getApi()!,\n columnApi: this.gridOptionsWrapper.getColumnApi()!,\n context: this.gridOptionsWrapper.getContext()\n };\n result = keyCreator(keyParams);\n }\n\n // if already a string, or missing, just return it\n if (typeof result === 'string' || result == null) {\n return result;\n }\n\n result = String(result);\n\n if (result === '[object Object]') {\n doOnce(() => {\n console.warn('AG Grid: a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (se AG Grid docs) or b) to toString() on the object to return a key');\n }, 'getKeyForNode - warn about [object,object]');\n }\n\n return result;\n }\n}\n","import { Logger, LoggerFactory } from \"../logger\";\nimport { Bean } from \"../context/context\";\nimport { Qualifier } from \"../context/context\";\nimport { BeanStub } from \"../context/beanStub\";\n\n@Bean('expressionService')\nexport class ExpressionService extends BeanStub {\n\n private expressionToFunctionCache = {} as any;\n private logger: Logger;\n\n private setBeans(@Qualifier('loggerFactory') loggerFactory: LoggerFactory) {\n this.logger = loggerFactory.create('ExpressionService');\n }\n\n public evaluate(expressionOrFunc: Function | string | undefined, params: any): any {\n if (typeof expressionOrFunc === 'function') {\n // valueGetter is a function, so just call it\n const func = expressionOrFunc;\n return func(params);\n } else if (typeof expressionOrFunc === 'string') {\n // valueGetter is an expression, so execute the expression\n const expression = expressionOrFunc;\n return this.evaluateExpression(expression, params);\n } else {\n console.error('AG Grid: value should be either a string or a function', expressionOrFunc);\n }\n }\n\n private evaluateExpression(expression: string, params: any): any {\n try {\n const javaScriptFunction = this.createExpressionFunction(expression);\n // the params don't have all these values, rather we add every possible\n // value a params can have, which makes whatever is in the params available.\n const result = javaScriptFunction(params.value, params.context,\n params.oldValue, params.newValue, params.value, params.node,\n params.data, params.colDef, params.rowIndex, params.api, params.columnApi,\n params.getValue, params.column, params.columnGroup);\n return result;\n } catch (e) {\n // the expression failed, which can happen, as it's the client that\n // provides the expression. so print a nice message\n // tslint:disable-next-line\n console.log('Processing of the expression failed');\n // tslint:disable-next-line\n console.log('Expression = ' + expression);\n // tslint:disable-next-line\n console.log('Params =', params);\n // tslint:disable-next-line\n console.log('Exception = ' + e);\n return null;\n }\n }\n\n private createExpressionFunction(expression: any) {\n // check cache first\n if (this.expressionToFunctionCache[expression]) {\n return this.expressionToFunctionCache[expression];\n }\n // if not found in cache, return the function\n const functionBody = this.createFunctionBody(expression);\n const theFunction = new Function('x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, columnApi, getValue, column, columnGroup', functionBody);\n\n // store in cache\n this.expressionToFunctionCache[expression] = theFunction;\n\n return theFunction;\n }\n\n private createFunctionBody(expression: any) {\n // if the expression has the 'return' word in it, then use as is,\n // if not, then wrap it with return and ';' to make a function\n if (expression.indexOf('return') >= 0) {\n return expression;\n } else {\n return 'return ' + expression + ';';\n }\n }\n}\n","import { Autowired } from \"./context/context\";\nimport { Bean } from \"./context/context\";\nimport { BeanStub } from \"./context/beanStub\";\n\n@Bean('templateService')\nexport class TemplateService extends BeanStub {\n\n private templateCache:any = {};\n private waitingCallbacks:any = {};\n\n // returns the template if it is loaded, or null if it is not loaded\n // but will call the callback when it is loaded\n getTemplate(url: any, callback: any) {\n\n const templateFromCache = this.templateCache[url];\n if (templateFromCache) {\n return templateFromCache;\n }\n\n let callbackList = this.waitingCallbacks[url];\n const that = this;\n if (!callbackList) {\n // first time this was called, so need a new list for callbacks\n callbackList = [];\n this.waitingCallbacks[url] = callbackList;\n // and also need to do the http request\n const client = new XMLHttpRequest();\n client.onload = function() {\n that.handleHttpResult(this, url);\n };\n client.open(\"GET\", url);\n client.send();\n }\n\n // add this callback\n if (callback) {\n callbackList.push(callback);\n }\n\n // caller needs to wait for template to load, so return null\n return null;\n }\n\n handleHttpResult(httpResult: any, url: any) {\n\n if (httpResult.status !== 200 || httpResult.response === null) {\n console.warn(`AG Grid: Unable to get template error ${httpResult.status} - ${url}`);\n return;\n }\n\n // response success, so process it\n // in IE9 the response is in - responseText\n this.templateCache[url] = httpResult.response || httpResult.responseText;\n\n // inform all listeners that this is now in the cache\n const callbacks = this.waitingCallbacks[url];\n for (let i = 0; i < callbacks.length; i++) {\n const callback = callbacks[i];\n // we could pass the callback the response, however we know the client of this code\n // is the cell renderer, and it passes the 'cellRefresh' method in as the callback\n // which doesn't take any parameters.\n callback();\n }\n }\n}\n","import { GridOptionsWrapper } from \"./gridOptionsWrapper\";\nimport { Bean } from \"./context/context\";\nimport { Qualifier } from \"./context/context\";\nimport { BeanStub } from \"./context/beanStub\";\n\n@Bean('loggerFactory')\nexport class LoggerFactory extends BeanStub {\n\n private logging: boolean;\n\n private setBeans(@Qualifier('gridOptionsWrapper') gridOptionsWrapper: GridOptionsWrapper): void {\n this.logging = gridOptionsWrapper.isDebug();\n }\n\n public create(name: string) {\n return new Logger(name, this.isLogging.bind(this));\n }\n\n public isLogging(): boolean {\n return this.logging;\n }\n}\n\nexport class Logger {\n\n private isLoggingFunc: () => boolean | undefined;\n private name: string;\n\n constructor(name: string, isLoggingFunc: () => boolean | undefined) {\n this.name = name;\n this.isLoggingFunc = isLoggingFunc;\n }\n\n public isLogging(): boolean | undefined {\n return this.isLoggingFunc();\n }\n\n public log(message: string) {\n if (this.isLoggingFunc()) {\n // tslint:disable-next-line\n console.log('AG Grid.' + this.name + ': ' + message);\n }\n }\n\n}\n","import { Autowired, PostConstruct } from \"../context/context\";\nimport { GridApi } from \"../gridApi\";\nimport { FocusService } from \"../focusService\";\nimport { BeanStub } from \"../context/beanStub\";\nimport { ModuleRegistry } from \"../modules/moduleRegistry\";\nimport { ModuleNames } from \"../modules/moduleNames\";\nimport { LayoutFeature, LayoutView } from \"../styling/layoutFeature\";\nimport { Events } from \"../eventKeys\";\nimport { ResizeObserverService } from \"../misc/resizeObserverService\";\nimport { GridSizeChangedEvent } from \"../events\";\nimport { ColumnApi } from \"../columns/columnApi\";\nimport { ColumnModel } from \"../columns/columnModel\";\nimport { CtrlsService } from \"../ctrlsService\";\nimport { MouseEventService } from \"../gridBodyComp/mouseEventService\";\nimport { last } from \"../utils/array\";\n\nexport interface IGridComp extends LayoutView {\n setRtlClass(cssClass: string): void;\n destroyGridUi(): void;\n forceFocusOutOfContainer(up: boolean): void;\n addOrRemoveKeyboardFocusClass(value: boolean): void;\n getFocusableContainers(): HTMLElement[];\n setCursor(value: string | null): void;\n setUserSelect(value: string | null): void;\n}\n\nexport class GridCtrl extends BeanStub {\n\n @Autowired('columnApi') private readonly columnApi: ColumnApi;\n @Autowired('gridApi') private readonly gridApi: GridApi;\n @Autowired('focusService') protected readonly focusService: FocusService;\n @Autowired('resizeObserverService') private readonly resizeObserverService: ResizeObserverService;\n @Autowired('columnModel') private readonly columnModel: ColumnModel;\n @Autowired('ctrlsService') private readonly ctrlsService: CtrlsService;\n @Autowired('mouseEventService') private readonly mouseEventService: MouseEventService;\n\n private view: IGridComp;\n private eGridHostDiv: HTMLElement;\n private eGui: HTMLElement;\n\n public setComp(view: IGridComp, eGridDiv: HTMLElement, eGui: HTMLElement): void {\n this.view = view;\n this.eGridHostDiv = eGridDiv;\n this.eGui = eGui;\n\n this.mouseEventService.stampTopLevelGridCompWithGridInstance(eGridDiv);\n\n this.createManagedBean(new LayoutFeature(this.view));\n\n // important to set rtl before doLayout, as setting the RTL class impacts the scroll position,\n // which doLayout indirectly depends on\n this.addRtlSupport();\n\n this.addManagedListener(this, Events.EVENT_KEYBOARD_FOCUS, () => {\n this.view.addOrRemoveKeyboardFocusClass(true);\n });\n\n this.addManagedListener(this, Events.EVENT_MOUSE_FOCUS, () => {\n this.view.addOrRemoveKeyboardFocusClass(false);\n });\n\n const unsubscribeFromResize = this.resizeObserverService.observeResize(\n this.eGridHostDiv, this.onGridSizeChanged.bind(this));\n this.addDestroyFunc(() => unsubscribeFromResize());\n\n this.ctrlsService.registerGridCtrl(this);\n }\n\n public isDetailGrid(): boolean {\n const el = this.focusService.findTabbableParent(this.getGui());\n\n return el?.getAttribute('row-id')?.startsWith('detail') || false;\n }\n\n public showDropZones(): boolean {\n return ModuleRegistry.isRegistered(ModuleNames.RowGroupingModule);\n }\n\n public showSideBar(): boolean {\n return ModuleRegistry.isRegistered(ModuleNames.SideBarModule);\n }\n\n public showStatusBar(): boolean {\n return ModuleRegistry.isRegistered(ModuleNames.StatusBarModule);\n }\n\n public showWatermark(): boolean {\n return ModuleRegistry.isRegistered(ModuleNames.EnterpriseCoreModule);\n }\n\n private onGridSizeChanged(): void {\n const event: GridSizeChangedEvent = {\n type: Events.EVENT_GRID_SIZE_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi,\n clientWidth: this.eGridHostDiv.clientWidth,\n clientHeight: this.eGridHostDiv.clientHeight\n };\n this.eventService.dispatchEvent(event);\n }\n\n private addRtlSupport(): void {\n const cssClass = this.gridOptionsWrapper.isEnableRtl() ? 'ag-rtl' : 'ag-ltr';\n this.view.setRtlClass(cssClass);\n }\n\n public destroyGridUi(): void {\n this.view.destroyGridUi();\n }\n\n public getGui(): HTMLElement {\n return this.eGui;\n }\n\n public setResizeCursor(on: boolean): void {\n this.view.setCursor(on ? 'ew-resize' : null);\n }\n\n public disableUserSelect(on: boolean): void {\n this.view.setUserSelect(on ? 'none' : null);\n }\n\n public focusNextInnerContainer(backwards: boolean): boolean {\n const eDocument = this.gridOptionsWrapper.getDocument();\n const focusableContainers = this.view.getFocusableContainers();\n const idxWithFocus = focusableContainers.findIndex(container => container.contains(eDocument.activeElement));\n const nextIdx = idxWithFocus + (backwards ? -1 : 1);\n\n if (nextIdx <= 0 || nextIdx >= focusableContainers.length) {\n return false;\n }\n\n return this.focusService.focusInto(focusableContainers[nextIdx]);\n }\n\n public focusInnerElement(fromBottom?: boolean) {\n const focusableContainers = this.view.getFocusableContainers();\n\n if (fromBottom) {\n if (focusableContainers.length > 1) {\n return this.focusService.focusInto(last(focusableContainers), true);\n }\n\n const lastColumn = last(this.columnModel.getAllDisplayedColumns());\n if (this.focusService.focusGridView(lastColumn, true)) { return true; }\n }\n\n return this.focusService.focusFirstHeader();\n }\n\n public forceFocusOutOfContainer(up = false): void {\n this.view.forceFocusOutOfContainer(up);\n }\n\n}","import { GridBodyComp } from \"../gridBodyComp/gridBodyComp\";\nimport { Logger, LoggerFactory } from \"../logger\";\nimport { Autowired, PostConstruct } from \"../context/context\";\nimport { Component } from \"../widgets/component\";\nimport { ISideBar } from \"../interfaces/iSideBar\";\nimport { RefSelector } from \"../widgets/componentAnnotations\";\nimport { isVisible } from \"../utils/dom\";\nimport { FocusService } from \"../focusService\";\nimport { GridCtrl, IGridComp } from \"./gridCtrl\";\nimport { LayoutCssClasses, UpdateLayoutClassesParams } from \"../styling/layoutFeature\";\nimport { TabGuardComp } from \"../widgets/tabGuardComp\";\n\nexport class GridComp extends TabGuardComp {\n\n @Autowired('loggerFactory') private readonly loggerFactory: LoggerFactory;\n\n @RefSelector('gridBody') private readonly gridBodyComp: GridBodyComp;\n @RefSelector('sideBar') private readonly sideBarComp: ISideBar & Component;\n @RefSelector('rootWrapperBody') private readonly eRootWrapperBody: HTMLElement;\n\n private logger: Logger;\n private eGridDiv: HTMLElement;\n private ctrl: GridCtrl;\n\n constructor(eGridDiv: HTMLElement) {\n super(undefined);\n this.eGridDiv = eGridDiv;\n }\n\n @PostConstruct\n private postConstruct(): void {\n this.logger = this.loggerFactory.create('GridComp');\n\n const compProxy: IGridComp = {\n destroyGridUi:\n () => this.destroyBean(this),\n setRtlClass:\n (cssClass: string) => this.addCssClass(cssClass),\n addOrRemoveKeyboardFocusClass:\n (addOrRemove: boolean) => this.addOrRemoveCssClass(FocusService.AG_KEYBOARD_FOCUS, addOrRemove),\n forceFocusOutOfContainer: this.forceFocusOutOfContainer.bind(this),\n updateLayoutClasses: this.updateLayoutClasses.bind(this),\n getFocusableContainers: this.getFocusableContainers.bind(this),\n setUserSelect: value => {\n this.getGui().style.userSelect = value != null ? value : '';\n this.getGui().style.webkitUserSelect = value != null ? value : '';\n },\n setCursor: value => {\n this.getGui().style.cursor = value != null ? value : '';\n }\n };\n\n this.ctrl = this.createManagedBean(new GridCtrl());\n\n const template = this.createTemplate();\n this.setTemplate(template);\n\n this.ctrl.setComp(compProxy, this.eGridDiv, this.getGui());\n\n this.insertGridIntoDom();\n\n this.initialiseTabGuard({\n // we want to override the default behaviour to do nothing for onTabKeyDown\n onTabKeyDown: () => undefined,\n focusInnerElement: fromBottom => this.ctrl.focusInnerElement(fromBottom)\n });\n }\n\n private insertGridIntoDom(): void {\n const eGui = this.getGui();\n this.eGridDiv.appendChild(eGui);\n this.addDestroyFunc(() => {\n this.eGridDiv.removeChild(eGui);\n this.logger.log('Grid removed from DOM');\n });\n }\n\n private updateLayoutClasses(cssClass: string, params: UpdateLayoutClassesParams): void {\n const eRootWrapperBodyClassList = this.eRootWrapperBody.classList;\n eRootWrapperBodyClassList.toggle(LayoutCssClasses.AUTO_HEIGHT, params.autoHeight);\n eRootWrapperBodyClassList.toggle(LayoutCssClasses.NORMAL, params.normal);\n eRootWrapperBodyClassList.toggle(LayoutCssClasses.PRINT, params.print);\n\n this.addOrRemoveCssClass(LayoutCssClasses.AUTO_HEIGHT, params.autoHeight);\n this.addOrRemoveCssClass(LayoutCssClasses.NORMAL, params.normal);\n this.addOrRemoveCssClass(LayoutCssClasses.PRINT, params.print);\n }\n\n private createTemplate(): string {\n const dropZones = this.ctrl.showDropZones() ? '' : '';\n const sideBar = this.ctrl.showSideBar() ? '' : '';\n const statusBar = this.ctrl.showStatusBar() ? '' : '';\n const watermark = this.ctrl.showWatermark() ? '' : '';\n\n const template = /* html */\n `
\n ${dropZones}\n
\n \n ${sideBar}\n
\n ${statusBar}\n \n ${watermark}\n
`;\n\n return template;\n }\n\n public getFocusableElement(): HTMLElement {\n return this.eRootWrapperBody;\n }\n\n protected getFocusableContainers(): HTMLElement[] {\n const focusableContainers = [\n this.gridBodyComp.getGui()\n ];\n\n if (this.sideBarComp) {\n focusableContainers.push(\n this.sideBarComp.getGui()\n );\n }\n\n return focusableContainers.filter(el => isVisible(el));\n }\n\n}\n","import { Autowired, Bean } from \"./context/context\";\nimport { BeanStub } from \"./context/beanStub\";\nimport { Column } from \"./entities/column\";\nimport { Constants } from \"./constants/constants\";\nimport { ColumnApi } from \"./columns/columnApi\";\nimport { ColumnModel } from \"./columns/columnModel\";\nimport { ColumnEventType, Events, SortChangedEvent } from \"./events\";\nimport { GridApi } from \"./gridApi\";\nimport { SortOption } from \"./rowNodes/rowNodeSorter\";\n\nexport interface SortModelItem {\n /** Column Id to apply the sort to. */\n colId: string;\n /** Sort direction */\n sort: 'asc' | 'desc';\n}\n\n@Bean('sortController')\nexport class SortController extends BeanStub {\n\n private static DEFAULT_SORTING_ORDER = [Constants.SORT_ASC, Constants.SORT_DESC, null];\n\n @Autowired('columnModel') private columnModel: ColumnModel;\n @Autowired('columnApi') private columnApi: ColumnApi;\n @Autowired('gridApi') private gridApi: GridApi;\n\n public progressSort(column: Column, multiSort: boolean, source: ColumnEventType): void {\n const nextDirection = this.getNextSortDirection(column);\n this.setSortForColumn(column, nextDirection, multiSort, source);\n }\n\n public setSortForColumn(column: Column, sort: 'asc' | 'desc' | null, multiSort: boolean, source: ColumnEventType): void {\n // auto correct - if sort not legal value, then set it to 'no sort' (which is null)\n if (sort !== Constants.SORT_ASC && sort !== Constants.SORT_DESC) {\n sort = null;\n }\n\n // update sort on current col\n column.setSort(sort, source);\n\n const doingMultiSort = (multiSort || this.gridOptionsWrapper.isAlwaysMultiSort()) && !this.gridOptionsWrapper.isSuppressMultiSort();\n\n // clear sort on all columns except this one, and update the icons\n if (!doingMultiSort) {\n this.clearSortBarThisColumn(column, source);\n }\n\n // sortIndex used for knowing order of cols when multi-col sort\n this.updateSortIndex(column);\n\n this.dispatchSortChangedEvents(source);\n }\n\n private updateSortIndex(lastColToChange: Column) {\n // update sortIndex on all sorting cols\n const allSortedCols = this.getColumnsWithSortingOrdered();\n let sortIndex = 0;\n allSortedCols.forEach(col => {\n if (col !== lastColToChange) {\n col.setSortIndex(sortIndex);\n sortIndex++;\n }\n });\n // last col to change always gets the last sort index, it's added to the end\n if (lastColToChange.getSort()) {\n lastColToChange.setSortIndex(sortIndex);\n }\n\n // clear sort index on all cols not sorting\n const allCols = this.columnModel.getPrimaryAndSecondaryAndAutoColumns();\n allCols.filter(col => col.getSort() == null).forEach(col => col.setSortIndex());\n }\n\n // gets called by API, so if data changes, use can call this, which will end up\n // working out the sort order again of the rows.\n public onSortChanged(source: string): void {\n this.dispatchSortChangedEvents(source);\n }\n\n public isSortActive(): boolean {\n // pull out all the columns that have sorting set\n const allCols = this.columnModel.getPrimaryAndSecondaryAndAutoColumns();\n const sortedCols = allCols.filter(column => !!column.getSort());\n return sortedCols && sortedCols.length > 0;\n }\n\n public dispatchSortChangedEvents(source: string): void {\n const event: SortChangedEvent = {\n type: Events.EVENT_SORT_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi,\n source\n };\n this.eventService.dispatchEvent(event);\n }\n\n private clearSortBarThisColumn(columnToSkip: Column, source: ColumnEventType): void {\n this.columnModel.getPrimaryAndSecondaryAndAutoColumns().forEach((columnToClear: Column) => {\n // Do not clear if either holding shift, or if column in question was clicked\n if (columnToClear !== columnToSkip) {\n // setting to 'undefined' as null means 'none' rather than cleared, otherwise issue will arise\n // if sort order is: ['desc', null , 'asc'], as it will start at null rather than 'desc'.\n columnToClear.setSort(undefined, source);\n }\n });\n }\n\n private getNextSortDirection(column: Column): 'asc' | 'desc' | null {\n let sortingOrder: ('asc' | 'desc' | null)[] | null | undefined;\n\n if (column.getColDef().sortingOrder) {\n sortingOrder = column.getColDef().sortingOrder;\n } else if (this.gridOptionsWrapper.getSortingOrder()) {\n sortingOrder = this.gridOptionsWrapper.getSortingOrder();\n } else {\n sortingOrder = SortController.DEFAULT_SORTING_ORDER;\n }\n\n if (!Array.isArray(sortingOrder) || sortingOrder.length <= 0) {\n console.warn(`AG Grid: sortingOrder must be an array with at least one element, currently it\\'s ${sortingOrder}`);\n return null;\n }\n\n const currentIndex = sortingOrder.indexOf(column.getSort()!);\n const notInArray = currentIndex < 0;\n const lastItemInArray = currentIndex == sortingOrder.length - 1;\n let result: 'asc' | 'desc' | null;\n\n if (notInArray || lastItemInArray) {\n result = sortingOrder[0];\n } else {\n result = sortingOrder[currentIndex + 1];\n }\n\n // verify the sort type exists, as the user could provide the sortingOrder, need to make sure it's valid\n if (SortController.DEFAULT_SORTING_ORDER.indexOf(result) < 0) {\n console.warn('AG Grid: invalid sort type ' + result);\n return null;\n }\n\n return result;\n }\n\n public getColumnsWithSortingOrdered(): Column[] {\n // pull out all the columns that have sorting set\n const allColumnsIncludingAuto = this.columnModel.getPrimaryAndSecondaryAndAutoColumns();\n const columnsWithSorting = allColumnsIncludingAuto.filter(column => !!column.getSort());\n\n // when both cols are missing sortIndex, we use the position of the col in all cols list.\n // this means if colDefs only have sort, but no sortIndex, we deterministically pick which\n // cols is sorted by first.\n const allColsIndexes: { [id: string]: number } = {};\n allColumnsIncludingAuto.forEach((col: Column, index: number) => allColsIndexes[col.getId()] = index);\n\n // put the columns in order of which one got sorted first\n columnsWithSorting.sort((a: Column, b: Column) => {\n const iA = a.getSortIndex();\n const iB = b.getSortIndex();\n if (iA != null && iB != null) {\n return iA - iB; // both present, normal comparison\n } else if (iA == null && iB == null) {\n // both missing, compare using column positions\n const posA = allColsIndexes[a.getId()];\n const posB = allColsIndexes[b.getId()];\n return posA > posB ? 1 : -1;\n } else if (iB == null) {\n return -1; // iB missing\n } else {\n return 1; // iA missing\n }\n });\n\n return columnsWithSorting;\n }\n\n // used by server side row models, to sent sort to server\n public getSortModel(): SortModelItem[] {\n return this.getColumnsWithSortingOrdered().map(column => ({\n sort: column.getSort()!,\n colId: column.getId()\n }));\n }\n\n public getSortOptions(): SortOption[] {\n return this.getColumnsWithSortingOrdered().map(column => ({\n sort: column.getSort()!,\n column\n }));\n }\n}\n","import { Autowired, Bean, PostConstruct } from \"../context/context\";\nimport { Events, ColumnHoverChangedEvent } from \"../events\";\nimport { Column } from \"../entities/column\";\nimport { BeanStub } from \"../context/beanStub\";\nimport { ColumnApi } from \"../columns/columnApi\";\nimport { GridApi } from \"../gridApi\";\n\n@Bean('columnHoverService')\nexport class ColumnHoverService extends BeanStub {\n\n @Autowired('columnApi') private columnApi: ColumnApi;\n @Autowired('gridApi') private gridApi: GridApi;\n\n private selectedColumns: Column[] | null;\n\n public setMouseOver(columns: Column[]): void {\n this.selectedColumns = columns;\n const event: ColumnHoverChangedEvent = {\n type: Events.EVENT_COLUMN_HOVER_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event);\n }\n\n public clearMouseOver(): void {\n this.selectedColumns = null;\n const event: ColumnHoverChangedEvent = {\n type: Events.EVENT_COLUMN_HOVER_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event);\n }\n\n public isHovered(column: Column): boolean {\n return !!this.selectedColumns && this.selectedColumns.indexOf(column) >= 0;\n }\n}\n","import { Autowired, Bean, PostConstruct } from \"../context/context\";\nimport { BeanStub } from \"../context/beanStub\";\nimport { GridBodyCtrl } from \"../gridBodyComp/gridBodyCtrl\";\nimport { CtrlsService } from \"../ctrlsService\";\n\n@Bean('columnAnimationService')\nexport class ColumnAnimationService extends BeanStub {\n\n @Autowired('ctrlsService') private ctrlsService: CtrlsService;\n\n private gridBodyCtrl: GridBodyCtrl;\n\n private executeNextFuncs: Function[] = [];\n private executeLaterFuncs: Function[] = [];\n\n private active = false;\n\n private animationThreadCount = 0;\n\n @PostConstruct\n private postConstruct(): void {\n this.ctrlsService.whenReady(p => this.gridBodyCtrl = p.gridBodyCtrl);\n }\n\n public isActive(): boolean {\n return this.active;\n }\n\n public start(): void {\n if (this.active) { return; }\n\n if (this.gridOptionsWrapper.isSuppressColumnMoveAnimation()) { return; }\n\n // if doing RTL, we don't animate open / close as due to how the pixels are inverted,\n // the animation moves all the row the the right rather than to the left (ie it's the static\n // columns that actually get their coordinates updated)\n if (this.gridOptionsWrapper.isEnableRtl()) { return; }\n\n this.ensureAnimationCssClassPresent();\n\n this.active = true;\n }\n\n public finish(): void {\n if (!this.active) { return; }\n this.flush();\n this.active = false;\n }\n\n public executeNextVMTurn(func: Function): void {\n if (this.active) {\n this.executeNextFuncs.push(func);\n } else {\n func();\n }\n }\n\n public executeLaterVMTurn(func: Function): void {\n if (this.active) {\n this.executeLaterFuncs.push(func);\n } else {\n func();\n }\n }\n\n private ensureAnimationCssClassPresent(): void {\n // up the count, so we can tell if someone else has updated the count\n // by the time the 'wait' func executes\n this.animationThreadCount++;\n const animationThreadCountCopy = this.animationThreadCount;\n this.gridBodyCtrl.setColumnMovingCss(true);\n\n this.executeLaterFuncs.push(() => {\n // only remove the class if this thread was the last one to update it\n if (this.animationThreadCount === animationThreadCountCopy) {\n this.gridBodyCtrl.setColumnMovingCss(false);\n }\n });\n }\n\n public flush(): void {\n\n const nowFuncs = this.executeNextFuncs;\n this.executeNextFuncs = [];\n\n const waitFuncs = this.executeLaterFuncs;\n this.executeLaterFuncs = [];\n\n if (nowFuncs.length === 0 && waitFuncs.length === 0) { return; }\n\n window.setTimeout(() => nowFuncs.forEach(func => func()), 0);\n window.setTimeout(() => waitFuncs.forEach(func => func()), 300);\n }\n}\n","import { Autowired, Bean } from \"../context/context\";\nimport { Column } from \"../entities/column\";\nimport { ColDef } from \"../entities/colDef\";\nimport { ColumnModel } from \"./columnModel\";\nimport { ColumnFactory } from \"./columnFactory\";\nimport { Constants } from \"../constants/constants\";\nimport { BeanStub } from \"../context/beanStub\";\nimport { mergeDeep } from \"../utils/object\";\nimport { missing } from \"../utils/generic\";\n\n@Bean('autoGroupColService')\nexport class AutoGroupColService extends BeanStub {\n\n public static GROUP_AUTO_COLUMN_BUNDLE_ID = Constants.GROUP_AUTO_COLUMN_ID;\n\n @Autowired('columnModel') private columnModel: ColumnModel;\n @Autowired('columnFactory') private columnFactory: ColumnFactory;\n\n public createAutoGroupColumns(existingCols: Column[], rowGroupColumns: Column[]): Column[] {\n const groupAutoColumns: Column[] = [];\n\n const doingTreeData = this.gridOptionsWrapper.isTreeData();\n let doingMultiAutoColumn = this.gridOptionsWrapper.isGroupMultiAutoColumn();\n\n if (doingTreeData && doingMultiAutoColumn) {\n console.warn('AG Grid: you cannot mix groupMultiAutoColumn with treeData, only one column can be used to display groups when doing tree data');\n doingMultiAutoColumn = false;\n }\n\n // if doing groupMultiAutoColumn, then we call the method multiple times, once\n // for each column we are grouping by\n if (doingMultiAutoColumn) {\n rowGroupColumns.forEach((rowGroupCol: Column, index: number) => {\n groupAutoColumns.push(this.createOneAutoGroupColumn(existingCols, rowGroupCol, index));\n });\n } else {\n groupAutoColumns.push(this.createOneAutoGroupColumn(existingCols));\n }\n\n return groupAutoColumns;\n }\n\n // rowGroupCol and index are missing if groupMultiAutoColumn=false\n private createOneAutoGroupColumn(existingCols: Column[], rowGroupCol?: Column, index?: number): Column {\n // if one provided by user, use it, otherwise create one\n let defaultAutoColDef: ColDef = this.generateDefaultColDef(rowGroupCol);\n // if doing multi, set the field\n let colId: string;\n if (rowGroupCol) {\n colId = `${Constants.GROUP_AUTO_COLUMN_ID}-${rowGroupCol.getId()}`;\n } else {\n colId = AutoGroupColService.GROUP_AUTO_COLUMN_BUNDLE_ID;\n }\n\n const userAutoColDef = this.gridOptionsWrapper.getAutoGroupColumnDef();\n mergeDeep(defaultAutoColDef, userAutoColDef);\n\n defaultAutoColDef = this.columnFactory.mergeColDefs(defaultAutoColDef);\n\n defaultAutoColDef.colId = colId;\n\n // For tree data the filter is always allowed\n if (!this.gridOptionsWrapper.isTreeData()) {\n // we would only allow filter if the user has provided field or value getter. otherwise the filter\n // would not be able to work.\n const noFieldOrValueGetter = missing(defaultAutoColDef.field) && missing(defaultAutoColDef.valueGetter) && missing(defaultAutoColDef.filterValueGetter);\n if (noFieldOrValueGetter) {\n defaultAutoColDef.filter = false;\n }\n }\n\n // if showing many cols, we don't want to show more than one with a checkbox for selection\n if (index && index > 0) {\n defaultAutoColDef.headerCheckboxSelection = false;\n }\n\n const existingCol = existingCols.find( col => col.getId()==colId );\n\n if (existingCol) {\n existingCol.setColDef(defaultAutoColDef, null);\n this.columnFactory.applyColumnState(existingCol, defaultAutoColDef);\n return existingCol;\n }\n\n const newCol = new Column(defaultAutoColDef, null, colId, true);\n this.context.createBean(newCol);\n return newCol;\n }\n\n private generateDefaultColDef(rowGroupCol?: Column): ColDef {\n const userDef = this.gridOptionsWrapper.getAutoGroupColumnDef();\n const localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n\n const res: ColDef = {\n headerName: localeTextFunc('group', 'Group')\n };\n\n const userHasProvidedGroupCellRenderer =\n userDef &&\n (userDef.cellRenderer || userDef.cellRendererFramework || userDef.cellRendererSelector);\n\n // only add the default group cell renderer if user hasn't provided one\n if (!userHasProvidedGroupCellRenderer) {\n res.cellRenderer = 'agGroupCellRenderer';\n }\n\n // we never allow moving the group column\n // defaultAutoColDef.suppressMovable = true;\n\n if (rowGroupCol) {\n const colDef = rowGroupCol.getColDef();\n Object.assign(res, {\n // cellRendererParams.groupKey: colDefToCopy.field;\n headerName: this.columnModel.getDisplayNameForColumn(rowGroupCol, 'header'),\n headerValueGetter: colDef.headerValueGetter\n });\n\n if (colDef.cellRenderer || colDef.cellRendererFramework) {\n Object.assign(res, {\n cellRendererParams: {\n innerRenderer: colDef.cellRenderer,\n innerRendererFramework: colDef.cellRendererFramework,\n innerRendererParams: colDef.cellRendererParams\n }\n });\n }\n res.showRowGroup = rowGroupCol.getColId();\n } else {\n res.showRowGroup = true;\n }\n\n return res;\n }\n\n}\n","import { BeanStub } from \"../context/beanStub\";\nimport { Events } from \"../events\";\nimport { Autowired, Bean, PostConstruct } from \"../context/context\";\nimport { CtrlsService } from \"../ctrlsService\";\nimport { RowContainerCtrl } from \"../gridBodyComp/rowContainer/rowContainerCtrl\";\n\n@Bean('paginationAutoPageSizeService')\nexport class PaginationAutoPageSizeService extends BeanStub {\n\n @Autowired('ctrlsService') private ctrlsService: CtrlsService;\n\n private centerRowContainerCon: RowContainerCtrl;\n\n @PostConstruct\n private postConstruct(): void {\n this.ctrlsService.whenReady(p => {\n this.centerRowContainerCon = p.centerRowContainerCtrl;\n\n this.addManagedListener(this.eventService, Events.EVENT_BODY_HEIGHT_CHANGED, this.onBodyHeightChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_SCROLL_VISIBILITY_CHANGED, this.onScrollVisibilityChanged.bind(this));\n this.checkPageSize();\n });\n }\n\n private notActive(): boolean {\n return !this.gridOptionsWrapper.isPaginationAutoPageSize();\n }\n\n private onScrollVisibilityChanged(): void {\n this.checkPageSize();\n }\n\n private onBodyHeightChanged(): void {\n this.checkPageSize();\n }\n\n private checkPageSize(): void {\n if (this.notActive()) {\n return;\n }\n\n const rowHeight = this.gridOptionsWrapper.getRowHeightAsNumber();\n const bodyHeight = this.centerRowContainerCon.getViewportSizeFeature().getBodyHeight();\n\n if (bodyHeight > 0) {\n const newPageSize = Math.floor(bodyHeight / rowHeight);\n this.gridOptionsWrapper.setProperty('paginationPageSize', newPageSize);\n }\n }\n}\n","import { Bean, PostConstruct } from \"../context/context\";\nimport { RowNode } from \"../entities/rowNode\";\nimport { BeanStub } from \"../context/beanStub\";\n\n@Bean('valueCache')\nexport class ValueCache extends BeanStub {\n\n private cacheVersion = 0;\n private active: boolean;\n private neverExpires: boolean;\n\n @PostConstruct\n public init(): void {\n this.active = this.gridOptionsWrapper.isValueCache();\n this.neverExpires = this.gridOptionsWrapper.isValueCacheNeverExpires();\n }\n\n public onDataChanged(): void {\n if (this.neverExpires) { return; }\n\n this.expire();\n }\n\n public expire(): void {\n this.cacheVersion++;\n }\n\n public setValue(rowNode: RowNode, colId: string, value: any): any {\n if (this.active) {\n if (rowNode.__cacheVersion !== this.cacheVersion) {\n rowNode.__cacheVersion = this.cacheVersion;\n rowNode.__cacheData = {};\n }\n\n rowNode.__cacheData[colId] = value;\n }\n }\n\n public getValue(rowNode: RowNode, colId: string): any {\n if (!this.active || rowNode.__cacheVersion !== this.cacheVersion) {\n return undefined;\n }\n\n return rowNode.__cacheData[colId];\n }\n}\n","import { BeanStub } from \"../context/beanStub\";\nimport { Column } from \"../entities/column\";\nimport { RowNode } from \"../entities/rowNode\";\nimport { Autowired, Bean, PostConstruct } from \"../context/context\";\nimport { ChangedPath } from \"../utils/changedPath\";\nimport { IRowModel } from \"../interfaces/iRowModel\";\nimport { RowRenderer } from \"../rendering/rowRenderer\";\nimport { Constants } from \"../constants/constants\";\nimport { CellValueChangedEvent, Events } from \"../events\";\nimport { IClientSideRowModel } from \"../interfaces/iClientSideRowModel\";\n\n@Bean('changeDetectionService')\nexport class ChangeDetectionService extends BeanStub {\n\n @Autowired('rowModel') private rowModel: IRowModel;\n @Autowired('rowRenderer') private rowRenderer: RowRenderer;\n\n private clientSideRowModel: IClientSideRowModel;\n\n @PostConstruct\n private init(): void {\n if (this.rowModel.getType() === Constants.ROW_MODEL_TYPE_CLIENT_SIDE) {\n this.clientSideRowModel = this.rowModel as IClientSideRowModel;\n }\n\n this.addManagedListener(this.eventService, Events.EVENT_CELL_VALUE_CHANGED, this.onCellValueChanged.bind(this));\n }\n\n private onCellValueChanged(event: CellValueChangedEvent): void {\n\n // Clipboard service manages its own change detection, so no need to do it here.\n // The clipboard manages its own as otherwise this would happen once for every cell\n // that got updated as part of a paste operation, so e.g. if 100 cells in a paste operation,\n // this doChangeDetection would get called 100 times (once for each cell), instead clipboard\n // service executes the logic we have here once (in essence batching up all cell changes\n // into one change detection).\n if (event.source === Constants.SOURCE_PASTE) { return; }\n\n this.doChangeDetection(event.node, event.column);\n }\n\n private doChangeDetection(rowNode: RowNode, column: Column): void {\n if (this.gridOptionsWrapper.isSuppressChangeDetection()) { return; }\n\n // step 1 of change detection is to update the aggregated values\n if (this.clientSideRowModel && !rowNode.isRowPinned()) {\n const onlyChangedColumns = this.gridOptionsWrapper.isAggregateOnlyChangedColumns();\n const changedPath = new ChangedPath(onlyChangedColumns, this.clientSideRowModel.getRootNode());\n changedPath.addParentNode(rowNode.parent, [column]);\n this.clientSideRowModel.doAggregate(changedPath);\n }\n\n // step 2 of change detection is to refresh the cells\n this.rowRenderer.refreshCells();\n }\n}\n","import { Autowired, Bean } from \"../../context/context\";\nimport { IComponent } from \"../../interfaces/iComponent\";\nimport { ComponentMetadata, ComponentMetadataProvider } from \"./componentMetadataProvider\";\nimport { ICellRendererComp, ICellRendererParams } from \"../../rendering/cellRenderers/iCellRenderer\";\nimport { BeanStub } from \"../../context/beanStub\";\nimport { loadTemplate } from \"../../utils/dom\";\n\n@Bean(\"agComponentUtils\")\nexport class AgComponentUtils extends BeanStub {\n\n @Autowired(\"componentMetadataProvider\")\n private componentMetadataProvider: ComponentMetadataProvider;\n\n public adaptFunction(propertyName: string, jsCompFunc: any): any {\n const metadata: ComponentMetadata = this.componentMetadataProvider.retrieve(propertyName);\n if (metadata && metadata.functionAdapter) {\n return metadata.functionAdapter(jsCompFunc);\n }\n return null;\n }\n\n public adaptCellRendererFunction(callback: any): { new(): IComponent; } {\n class Adapter implements ICellRendererComp {\n\n private eGui: HTMLElement;\n\n refresh(params: ICellRendererParams): boolean {\n return false;\n }\n\n getGui(): HTMLElement {\n return this.eGui;\n }\n\n init?(params: ICellRendererParams): void {\n const callbackResult: string | HTMLElement = callback(params);\n const type = typeof callbackResult;\n if (type === 'string' || type === 'number' || type === 'boolean') {\n this.eGui = loadTemplate('' + callbackResult + '');\n return;\n }\n if (callbackResult==null) {\n this.eGui = loadTemplate('');\n return;\n }\n this.eGui = callbackResult as HTMLElement;\n }\n }\n\n return Adapter;\n }\n\n public doesImplementIComponent(candidate: any): boolean {\n if (!candidate) { return false; }\n return (candidate as any).prototype && 'getGui' in (candidate as any).prototype;\n }\n}\n","import { Autowired, Bean, PostConstruct } from \"../../context/context\";\nimport { IComponent } from \"../../interfaces/iComponent\";\nimport { AgComponentUtils } from \"./agComponentUtils\";\nimport { BeanStub } from \"../../context/beanStub\";\n\nexport interface ComponentMetadata {\n mandatoryMethodList: string[];\n optionalMethodList: string[];\n functionAdapter?: (callback: any) => { new(): IComponent };\n}\n\n@Bean(\"componentMetadataProvider\")\nexport class ComponentMetadataProvider extends BeanStub {\n\n private componentMetaData: { [key: string]: ComponentMetadata };\n\n @Autowired(\"agComponentUtils\")\n private agComponentUtils: AgComponentUtils;\n\n @PostConstruct\n public postConstruct() {\n this.componentMetaData = {\n dateComponent: {\n mandatoryMethodList: ['getDate', 'setDate'],\n optionalMethodList: ['afterGuiAttached', 'setInputPlaceholder', 'setInputAriaLabel']\n },\n detailCellRenderer: {\n mandatoryMethodList: [],\n optionalMethodList: ['refresh'],\n functionAdapter: this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)\n },\n headerComponent: {\n mandatoryMethodList: [],\n optionalMethodList: ['refresh']\n },\n headerGroupComponent: {\n mandatoryMethodList: [],\n optionalMethodList: []\n },\n loadingCellRenderer: {\n mandatoryMethodList: [],\n optionalMethodList: []\n },\n loadingOverlayComponent: {\n mandatoryMethodList: [],\n optionalMethodList: []\n },\n noRowsOverlayComponent: {\n mandatoryMethodList: [],\n optionalMethodList: []\n },\n floatingFilterComponent: {\n mandatoryMethodList: ['onParentModelChanged'],\n optionalMethodList: ['afterGuiAttached']\n },\n floatingFilterWrapperComponent: {\n mandatoryMethodList: [],\n optionalMethodList: []\n },\n cellRenderer: {\n mandatoryMethodList: [],\n optionalMethodList: ['refresh', 'afterGuiAttached'],\n functionAdapter: this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)\n },\n cellEditor: {\n mandatoryMethodList: ['getValue'],\n optionalMethodList: ['isPopup', 'isCancelBeforeStart', 'isCancelAfterEnd', 'getPopupPosition', 'focusIn', 'focusOut', 'afterGuiAttached']\n },\n innerRenderer: {\n mandatoryMethodList: [],\n optionalMethodList: ['afterGuiAttached'],\n functionAdapter: this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)\n },\n fullWidthCellRenderer: {\n mandatoryMethodList: [],\n optionalMethodList: ['refresh', 'afterGuiAttached'],\n functionAdapter: this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)\n },\n pinnedRowCellRenderer: {\n mandatoryMethodList: [],\n optionalMethodList: ['refresh', 'afterGuiAttached'],\n functionAdapter: this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)\n },\n groupRowRenderer: {\n mandatoryMethodList: [],\n optionalMethodList: ['afterGuiAttached'],\n functionAdapter: this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)\n },\n filter: {\n mandatoryMethodList: ['isFilterActive', 'doesFilterPass', 'getModel', 'setModel'],\n optionalMethodList: ['afterGuiAttached', 'onNewRowsLoaded', 'getModelAsString', 'onFloatingFilterChanged']\n },\n filterComponent: {\n mandatoryMethodList: ['isFilterActive', 'doesFilterPass', 'getModel', 'setModel'],\n optionalMethodList: ['afterGuiAttached', 'onNewRowsLoaded', 'getModelAsString', 'onFloatingFilterChanged']\n },\n statusPanel: {\n mandatoryMethodList: [],\n optionalMethodList: ['afterGuiAttached'],\n },\n toolPanel: {\n mandatoryMethodList: [],\n optionalMethodList: ['refresh', 'afterGuiAttached']\n },\n tooltipComponent: {\n mandatoryMethodList: [],\n optionalMethodList: []\n }\n };\n }\n\n public retrieve(name: string): ComponentMetadata {\n return this.componentMetaData[name];\n }\n}\n","import { Bean, Autowired } from './context/context';\nimport { BeanStub } from \"./context/beanStub\";\nimport { doOnce } from './utils/function';\n\nexport type SASS_PROPERTIES = 'headerHeight' | 'headerCellMinWidth' | 'listItemHeight' | 'rowHeight' | 'chartMenuPanelWidth';\n\ninterface HardCodedSize {\n [key: string]: {\n [key in SASS_PROPERTIES]?: number;\n };\n}\n\nconst MAT_GRID_SIZE = 8;\nconst BASE_GRID_SIZE = 4;\nconst BALHAM_GRID_SIZE = 4;\nconst ALPINE_GRID_SIZE = 6;\n\nconst HARD_CODED_SIZES: HardCodedSize = {\n // this item is required for custom themes\n 'ag-theme-custom': {\n headerHeight: 25,\n headerCellMinWidth: 24,\n listItemHeight: BASE_GRID_SIZE * 5,\n rowHeight: 25,\n chartMenuPanelWidth: 220\n },\n 'ag-theme-material': {\n headerHeight: MAT_GRID_SIZE * 7,\n headerCellMinWidth: 48,\n listItemHeight: MAT_GRID_SIZE * 4,\n rowHeight: MAT_GRID_SIZE * 6,\n chartMenuPanelWidth: 240\n },\n 'ag-theme-balham': {\n headerHeight: BALHAM_GRID_SIZE * 8,\n headerCellMinWidth: 24,\n listItemHeight: BALHAM_GRID_SIZE * 6,\n rowHeight: BALHAM_GRID_SIZE * 7,\n chartMenuPanelWidth: 220\n },\n 'ag-theme-alpine': {\n headerHeight: ALPINE_GRID_SIZE * 8,\n headerCellMinWidth: 36,\n listItemHeight: ALPINE_GRID_SIZE * 4,\n rowHeight: ALPINE_GRID_SIZE * 7,\n chartMenuPanelWidth: 240\n }\n};\n\n/**\n * this object contains a list of Sass variables and an array\n * of CSS styles required to get the correct value.\n * eg. $virtual-item-height requires a structure, so we can get its height.\n *
\n *
\n *
\n *
\n *
\n */\nconst SASS_PROPERTY_BUILDER: { [key in SASS_PROPERTIES]: string[] } = {\n headerHeight: ['ag-header-row'],\n headerCellMinWidth: ['ag-header-cell'],\n listItemHeight: ['ag-virtual-list-item'],\n rowHeight: ['ag-row'],\n chartMenuPanelWidth: ['ag-chart-docked-container']\n};\n\nconst CALCULATED_SIZES: HardCodedSize = {};\n\n@Bean('environment')\nexport class Environment extends BeanStub {\n\n @Autowired('eGridDiv') private eGridDiv: HTMLElement;\n\n public getSassVariable(theme: string, key: SASS_PROPERTIES): number | undefined {\n const useTheme = 'ag-theme-' + (theme.match('material') ? 'material' : theme.match('balham') ? 'balham' : theme.match('alpine') ? 'alpine' : 'custom');\n const defaultValue = HARD_CODED_SIZES[useTheme][key];\n let calculatedValue = 0;\n\n if (!CALCULATED_SIZES[theme]) {\n CALCULATED_SIZES[theme] = {};\n }\n\n const size = CALCULATED_SIZES[theme][key];\n\n if (size != null) {\n return size;\n }\n\n if (SASS_PROPERTY_BUILDER[key]) {\n const classList = SASS_PROPERTY_BUILDER[key];\n const div = document.createElement('div');\n div.classList.add(theme);\n div.style.position = 'absolute';\n\n const el: HTMLDivElement = classList.reduce((prevEl: HTMLDivElement, currentClass: string) => {\n const currentDiv = document.createElement('div');\n currentDiv.style.position = 'static';\n currentDiv.classList.add(currentClass);\n prevEl.appendChild(currentDiv);\n\n return currentDiv;\n }, div);\n\n if (document.body) {\n document.body.appendChild(div);\n const sizeName = key.toLowerCase().indexOf('height') !== -1 ? 'height' : 'width';\n calculatedValue = parseInt(window.getComputedStyle(el)[sizeName]!, 10);\n document.body.removeChild(div);\n }\n }\n\n CALCULATED_SIZES[theme][key] = calculatedValue || defaultValue;\n\n return CALCULATED_SIZES[theme][key];\n }\n\n public isThemeDark(): boolean {\n const { theme } = this.getTheme();\n return !!theme && theme.indexOf('dark') >= 0;\n }\n\n public chartMenuPanelWidth() {\n const theme = this.getTheme().themeFamily;\n return this.getSassVariable(theme!, 'chartMenuPanelWidth');\n }\n\n public getTheme(): { theme?: string; el?: HTMLElement; themeFamily?: string; } {\n const reg = /\\bag-(material|(?:theme-([\\w\\-]*)))\\b/;\n let el: HTMLElement | undefined = this.eGridDiv;\n let themeMatch: RegExpMatchArray | null = null;\n\n while (el) {\n themeMatch = reg.exec(el.className);\n if (!themeMatch) {\n el = el.parentElement || undefined;\n } else {\n break;\n }\n }\n\n if (!themeMatch) { return {}; }\n\n const theme = themeMatch[0];\n const usingOldTheme = themeMatch[2] === undefined;\n\n if (usingOldTheme) {\n const newTheme = theme.replace('ag-', 'ag-theme-');\n doOnce(() => console.warn(`AG Grid: As of v19 old theme are no longer provided. Please replace ${theme} with ${newTheme}.`), 'using-old-theme');\n }\n\n return { theme, el, themeFamily: theme.replace(/-dark$/, '') };\n }\n}\n","import { BeanStub } from \"../context/beanStub\";\nimport { Autowired, Bean, PostConstruct, Qualifier } from \"../context/context\";\nimport { Events } from \"../eventKeys\";\nimport { getMaxDivHeight } from \"../utils/browser\";\nimport { CtrlsService } from \"../ctrlsService\";\nimport { Logger, LoggerFactory } from \"../logger\";\n\n/**\n * This class solves the 'max height' problem, where the user might want to show more data than\n * the max div height actually allows.\n */\n\n@Bean('rowContainerHeightService')\nexport class RowContainerHeightService extends BeanStub {\n\n @Autowired('ctrlsService') private ctrlsService: CtrlsService;\n\n private maxDivHeight: number;\n\n // if false, then stretching is not active, logic in this class is not used,\n // the pixel height of the row container matches what is actually needed,\n // no scaling applied.\n private stretching: boolean;\n\n private modelHeight: number | null; // how many pixels the model needs\n private uiContainerHeight: number | null; // how many pixels we actually have\n private pixelsToShave: number; // the number of pixels we need to shave\n\n // the number of pixels we add to each rowTop - depends on the scroll position\n private divStretchOffset: number;\n\n // the scrollY position\n private scrollY = 0;\n // how tall the body is\n private uiBodyHeight = 0;\n\n // the max scroll position\n private maxScrollY: number;\n\n private logger: Logger;\n\n public agWire(@Qualifier(\"loggerFactory\") loggerFactory: LoggerFactory) {\n this.logger = loggerFactory.create(\"RowContainerHeightService\");\n }\n\n @PostConstruct\n private postConstruct(): void {\n this.addManagedListener(this.eventService, Events.EVENT_BODY_HEIGHT_CHANGED, this.updateOffset.bind(this));\n this.maxDivHeight = getMaxDivHeight();\n this.logger.log('maxDivHeight = ' + this.maxDivHeight);\n }\n\n public isStretching(): boolean {\n return this.stretching;\n }\n\n public getDivStretchOffset(): number {\n return this.divStretchOffset;\n }\n\n public updateOffset(): void {\n if (!this.stretching) { return; }\n\n const gridBodyCon = this.ctrlsService.getGridBodyCtrl();\n const newScrollY = gridBodyCon.getScrollFeature().getVScrollPosition().top;\n const newBodyHeight = this.getUiBodyHeight();\n\n const atLeastOneChanged = newScrollY !== this.scrollY || newBodyHeight !== this.uiBodyHeight;\n if (atLeastOneChanged) {\n this.scrollY = newScrollY;\n this.uiBodyHeight = newBodyHeight;\n this.calculateOffset();\n }\n }\n\n private calculateOffset(): void {\n this.setUiContainerHeight(this.maxDivHeight);\n this.pixelsToShave = this.modelHeight! - this.uiContainerHeight!;\n\n this.maxScrollY = this.uiContainerHeight! - this.uiBodyHeight;\n const scrollPercent = this.scrollY / this.maxScrollY;\n\n const divStretchOffset = scrollPercent * this.pixelsToShave;\n\n this.logger.log(`Div Stretch Offset = ${divStretchOffset} (${this.pixelsToShave} * ${scrollPercent})`);\n\n this.setDivStretchOffset(divStretchOffset);\n }\n\n private setUiContainerHeight(height: number | null): void {\n if (height !== this.uiContainerHeight) {\n this.uiContainerHeight = height;\n this.eventService.dispatchEvent({type: Events.EVENT_ROW_CONTAINER_HEIGHT_CHANGED});\n }\n }\n\n private clearOffset(): void {\n this.setUiContainerHeight(this.modelHeight);\n this.pixelsToShave = 0;\n this.setDivStretchOffset(0);\n }\n\n private setDivStretchOffset(newOffset: number): void {\n // because we are talking pixels, no point in confusing things with half numbers\n const newOffsetFloor = typeof newOffset === 'number' ? Math.floor(newOffset) : null;\n if (this.divStretchOffset === newOffsetFloor) { return; }\n\n this.divStretchOffset = newOffsetFloor!;\n this.eventService.dispatchEvent({type: Events.EVENT_HEIGHT_SCALE_CHANGED});\n }\n\n public setModelHeight(modelHeight: number | null): void {\n this.modelHeight = modelHeight;\n this.stretching = modelHeight != null // null happens when in print layout\n && this.maxDivHeight > 0\n && modelHeight! > this.maxDivHeight;\n if (this.stretching) {\n this.calculateOffset();\n } else {\n this.clearOffset();\n }\n }\n\n public getUiContainerHeight(): number | null {\n return this.uiContainerHeight;\n }\n\n public getRealPixelPosition(modelPixel: number): number {\n return modelPixel - this.divStretchOffset;\n }\n\n private getUiBodyHeight(): number {\n const gridBodyCon = this.ctrlsService.getGridBodyCtrl();\n const pos = gridBodyCon.getScrollFeature().getVScrollPosition();\n return pos.bottom - pos.top;\n }\n\n public getScrollPositionForPixel(rowTop: number): number {\n if (this.pixelsToShave <= 0) { return rowTop; }\n\n const modelMaxScroll = this.modelHeight! - this.getUiBodyHeight();\n const scrollPercent = rowTop / modelMaxScroll;\n const scrollPixel = this.maxScrollY * scrollPercent;\n return scrollPixel;\n }\n}\n","import { RowNode } from \"../entities/rowNode\";\nimport { Bean, PostConstruct } from \"../context/context\";\nimport { IsRowSelectable } from \"../entities/gridOptions\";\nimport { BeanStub } from \"../context/beanStub\";\nimport { exists } from \"../utils/generic\";\n\n@Bean('selectableService')\nexport class SelectableService extends BeanStub {\n\n private groupSelectsChildren: boolean;\n private isRowSelectableFunc?: IsRowSelectable;\n\n @PostConstruct\n public init(): void {\n this.groupSelectsChildren = this.gridOptionsWrapper.isGroupSelectsChildren();\n this.isRowSelectableFunc = this.gridOptionsWrapper.getIsRowSelectableFunc();\n }\n\n public updateSelectableAfterGrouping(rowNode: RowNode): void {\n if (this.isRowSelectableFunc) {\n const nextChildrenFunc = (node: RowNode) => node.childrenAfterGroup;\n this.recurseDown(rowNode.childrenAfterGroup, nextChildrenFunc);\n }\n }\n\n private recurseDown(children: RowNode[] | null, nextChildrenFunc: ((rowNode: RowNode) => RowNode[] | null)): void {\n if (!children) { return; }\n\n children.forEach((child: RowNode) => {\n\n if (!child.group) { return; } // only interested in groups\n\n if (child.hasChildren()) {\n this.recurseDown(nextChildrenFunc(child), nextChildrenFunc);\n }\n\n let rowSelectable: boolean;\n\n if (this.groupSelectsChildren) {\n // have this group selectable if at least one direct child is selectable\n const firstSelectable = (nextChildrenFunc(child) || []).find(rowNode => rowNode.selectable === true);\n rowSelectable = exists(firstSelectable);\n } else {\n // directly retrieve selectable value from user callback\n rowSelectable = this.isRowSelectableFunc ? this.isRowSelectableFunc(child) : false;\n }\n\n child.setRowSelectable(rowSelectable);\n });\n }\n\n}\n","import { Component } from \"../widgets/component\";\nimport { Autowired, PostConstruct } from \"../context/context\";\nimport { RefSelector } from \"../widgets/componentAnnotations\";\nimport { Events } from \"../events\";\nimport { PaginationProxy } from \"./paginationProxy\";\nimport { createIconNoSpan } from \"../utils/icon\";\nimport { formatNumberCommas } from \"../utils/number\";\nimport { setAriaDisabled } from \"../utils/aria\";\nimport { KeyCode } from '../constants/keyCode';\nimport { RowNodeBlockLoader } from \"../rowNodeCache/rowNodeBlockLoader\";\nimport { PaginationNumberFormatterParams } from \"../entities/iCallbackParams\";\nimport { WithoutGridCommon } from \"../interfaces/iCommon\";\n\nexport class PaginationComp extends Component {\n\n @Autowired('paginationProxy') private paginationProxy: PaginationProxy;\n @Autowired('rowNodeBlockLoader') private rowNodeBlockLoader: RowNodeBlockLoader;\n\n @RefSelector('btFirst') private btFirst: HTMLElement;\n @RefSelector('btPrevious') private btPrevious: HTMLElement;\n @RefSelector('btNext') private btNext: HTMLElement;\n @RefSelector('btLast') private btLast: HTMLElement;\n\n @RefSelector('lbRecordCount') private lbRecordCount: any;\n @RefSelector('lbFirstRowOnPage') private lbFirstRowOnPage: any;\n @RefSelector('lbLastRowOnPage') private lbLastRowOnPage: any;\n @RefSelector('lbCurrent') private lbCurrent: any;\n @RefSelector('lbTotal') private lbTotal: any;\n\n private previousAndFirstButtonsDisabled = false;\n private nextButtonDisabled = false;\n private lastButtonDisabled = false;\n\n constructor() {\n super();\n }\n\n @PostConstruct\n protected postConstruct(): void {\n const isRtl = this.gridOptionsWrapper.isEnableRtl();\n this.setTemplate(this.getTemplate());\n this.btFirst.insertAdjacentElement('afterbegin', createIconNoSpan(isRtl ? 'last' : 'first', this.gridOptionsWrapper)!);\n this.btPrevious.insertAdjacentElement('afterbegin', createIconNoSpan(isRtl ? 'next' : 'previous', this.gridOptionsWrapper)!);\n this.btNext.insertAdjacentElement('afterbegin', createIconNoSpan(isRtl ? 'previous' : 'next', this.gridOptionsWrapper)!);\n this.btLast.insertAdjacentElement('afterbegin', createIconNoSpan(isRtl ? 'first' : 'last', this.gridOptionsWrapper)!);\n\n const isPaging = this.gridOptionsWrapper.isPagination();\n const paginationPanelEnabled = isPaging && !this.gridOptionsWrapper.isSuppressPaginationPanel();\n\n if (!paginationPanelEnabled) {\n this.setDisplayed(false);\n return;\n }\n\n this.addManagedListener(this.eventService, Events.EVENT_PAGINATION_CHANGED, this.onPaginationChanged.bind(this));\n\n [\n { el: this.btFirst, fn: this.onBtFirst.bind(this) },\n { el: this.btPrevious, fn: this.onBtPrevious.bind(this) },\n { el: this.btNext, fn: this.onBtNext.bind(this) },\n { el: this.btLast, fn: this.onBtLast.bind(this) }\n ].forEach(item => {\n const { el, fn } = item;\n this.addManagedListener(el, 'click', fn);\n this.addManagedListener(el, 'keydown', (e: KeyboardEvent) => {\n if (e.key === KeyCode.ENTER || e.key === KeyCode.SPACE) {\n e.preventDefault();\n fn();\n }\n });\n });\n\n this.onPaginationChanged();\n }\n\n private onPaginationChanged(): void {\n this.enableOrDisableButtons();\n this.updateRowLabels();\n this.setCurrentPageLabel();\n this.setTotalLabels();\n }\n\n private onBtFirst() {\n if (!this.previousAndFirstButtonsDisabled) {\n this.paginationProxy.goToFirstPage();\n }\n }\n\n private setCurrentPageLabel(): void {\n const pagesExist = this.paginationProxy.getTotalPages() > 0;\n const currentPage = this.paginationProxy.getCurrentPage();\n const toDisplay = pagesExist ? currentPage + 1 : 0;\n\n this.lbCurrent.innerHTML = this.formatNumber(toDisplay);\n }\n\n private formatNumber(value: number): string {\n const userFunc = this.gridOptionsWrapper.getPaginationNumberFormatterFunc();\n\n if (userFunc) {\n const params: WithoutGridCommon = { value: value };\n return userFunc(params);\n }\n\n const localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n const thousandSeparator = localeTextFunc('thousandSeparator', ',');\n const decimalSeparator = localeTextFunc('decimalSeparator', '.');\n\n return formatNumberCommas(value, thousandSeparator, decimalSeparator);\n }\n\n private getTemplate(): string {\n const localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n\n const strPage = localeTextFunc('page', 'Page');\n const strTo = localeTextFunc('to', 'to');\n const strOf = localeTextFunc('of', 'of');\n const strFirst = localeTextFunc('firstPage', 'First Page');\n const strPrevious = localeTextFunc('previousPage', 'Previous Page');\n const strNext = localeTextFunc('nextPage', 'Next Page');\n const strLast = localeTextFunc('lastPage', 'Last Page');\n const compId = this.getCompId();\n\n return /* html */`
\n \n \n ${strTo}\n \n ${strOf}\n \n \n \n
\n
\n \n ${strPage}\n \n ${strOf}\n \n \n
\n
\n
\n
`;\n }\n\n private onBtNext() {\n if (!this.nextButtonDisabled) {\n this.paginationProxy.goToNextPage();\n }\n }\n\n private onBtPrevious() {\n if (!this.previousAndFirstButtonsDisabled) {\n this.paginationProxy.goToPreviousPage();\n }\n }\n\n private onBtLast() {\n if (!this.lastButtonDisabled) {\n this.paginationProxy.goToLastPage();\n }\n }\n\n private enableOrDisableButtons() {\n const currentPage = this.paginationProxy.getCurrentPage();\n const maxRowFound = this.paginationProxy.isLastPageFound();\n const totalPages = this.paginationProxy.getTotalPages();\n\n this.previousAndFirstButtonsDisabled = currentPage === 0;\n this.toggleButtonDisabled(this.btFirst, this.previousAndFirstButtonsDisabled);\n this.toggleButtonDisabled(this.btPrevious, this.previousAndFirstButtonsDisabled);\n\n const zeroPagesToDisplay = this.isZeroPagesToDisplay();\n const onLastPage = maxRowFound && currentPage === (totalPages - 1);\n\n this.nextButtonDisabled = onLastPage || zeroPagesToDisplay;\n this.lastButtonDisabled = !maxRowFound || zeroPagesToDisplay || currentPage === (totalPages - 1);\n\n this.toggleButtonDisabled(this.btNext, this.nextButtonDisabled);\n this.toggleButtonDisabled(this.btLast, this.lastButtonDisabled);\n }\n\n private toggleButtonDisabled(button: HTMLElement, disabled: boolean) {\n setAriaDisabled(button, disabled);\n button.classList.toggle('ag-disabled', disabled);\n\n if (disabled) {\n button.removeAttribute('tabindex');\n } else {\n button.setAttribute('tabindex', '0');\n }\n }\n\n private updateRowLabels() {\n const currentPage = this.paginationProxy.getCurrentPage();\n const pageSize = this.paginationProxy.getPageSize();\n const maxRowFound = this.paginationProxy.isLastPageFound();\n const rowCount = this.paginationProxy.isLastPageFound() ?\n this.paginationProxy.getMasterRowCount() : null;\n\n let startRow: any;\n let endRow: any;\n\n if (this.isZeroPagesToDisplay()) {\n startRow = endRow = 0;\n } else {\n startRow = (pageSize * currentPage) + 1;\n endRow = startRow + pageSize - 1;\n if (maxRowFound && endRow > rowCount!) {\n endRow = rowCount;\n }\n }\n\n this.lbFirstRowOnPage.innerHTML = this.formatNumber(startRow);\n if (this.rowNodeBlockLoader.isLoading()) {\n this.lbLastRowOnPage.innerHTML = '?';\n } else {\n this.lbLastRowOnPage.innerHTML = this.formatNumber(endRow);\n }\n }\n\n private isZeroPagesToDisplay() {\n const maxRowFound = this.paginationProxy.isLastPageFound();\n const totalPages = this.paginationProxy.getTotalPages();\n return maxRowFound && totalPages === 0;\n }\n\n private setTotalLabels() {\n const lastPageFound = this.paginationProxy.isLastPageFound();\n const totalPages = this.paginationProxy.getTotalPages();\n const rowCount = lastPageFound ? this.paginationProxy.getMasterRowCount() : null;\n\n // When `pivotMode=true` and no grouping or value columns exist, a single 'hidden' group row (root node) is in\n // the grid and the pagination totals will correctly display total = 1. However this is confusing to users as\n // they can't see it. To address this UX issue we simply set the totals to zero in the pagination panel.\n if (rowCount === 1) {\n const firstRow = this.paginationProxy.getRow(0);\n\n // a group node with no group or agg data will not be visible to users\n const hiddenGroupRow = firstRow && firstRow.group && !(firstRow.groupData || firstRow.aggData);\n if (hiddenGroupRow) {\n this.setTotalLabelsToZero();\n return;\n }\n }\n\n if (lastPageFound) {\n this.lbTotal.innerHTML = this.formatNumber(totalPages);\n this.lbRecordCount.innerHTML = this.formatNumber(rowCount!);\n } else {\n const moreText = this.gridOptionsWrapper.getLocaleTextFunc()('more', 'more');\n this.lbTotal.innerHTML = moreText;\n this.lbRecordCount.innerHTML = moreText;\n }\n }\n\n private setTotalLabelsToZero() {\n this.lbFirstRowOnPage.innerHTML = this.formatNumber(0);\n this.lbCurrent.innerHTML = this.formatNumber(0);\n this.lbLastRowOnPage.innerHTML = this.formatNumber(0);\n this.lbTotal.innerHTML = this.formatNumber(0);\n this.lbRecordCount.innerHTML = this.formatNumber(0);\n }\n}\n","import { Autowired, Bean } from \"../context/context\";\nimport { BeanStub } from \"../context/beanStub\";\nimport { Constants } from \"../constants/constants\";\nimport { IRowModel } from \"../interfaces/iRowModel\";\nimport { RowNode } from \"./rowNode\";\nimport { PinnedRowModel } from \"../pinnedRowModel/pinnedRowModel\";\nimport { exists } from \"../utils/generic\";\nimport { PaginationProxy } from \"../pagination/paginationProxy\";\n\nexport interface RowPosition {\n /** A positive number from 0 to n, where n is the last row the grid is rendering\n * or -1 if you want to navigate to the grid header */\n rowIndex: number;\n\n /** Either 'top', 'bottom' or null (for not pinned) */\n rowPinned: string | null;\n}\n\n@Bean('rowPositionUtils')\nexport class RowPositionUtils extends BeanStub {\n\n @Autowired('rowModel') private rowModel: IRowModel;\n @Autowired('pinnedRowModel') private pinnedRowModel: PinnedRowModel;\n @Autowired('paginationProxy') private paginationProxy: PaginationProxy;\n\n public getFirstRow(): RowPosition | null {\n let rowIndex = 0;\n let rowPinned;\n\n if (this.pinnedRowModel.getPinnedTopRowCount()) {\n rowPinned = Constants.PINNED_TOP;\n } else if (this.rowModel.getRowCount()) {\n rowPinned = null;\n rowIndex = this.paginationProxy.getPageFirstRow();\n } else if (this.pinnedRowModel.getPinnedBottomRowCount()) {\n rowPinned = Constants.PINNED_BOTTOM;\n }\n\n return rowPinned === undefined ? null : { rowIndex, rowPinned };\n }\n\n public getLastRow(): RowPosition | null {\n let rowIndex;\n let rowPinned: string | null = null;\n\n const pinnedBottomCount = this.pinnedRowModel.getPinnedBottomRowCount();\n const pinnedTopCount = this.pinnedRowModel.getPinnedTopRowCount();\n\n if (pinnedBottomCount) {\n rowPinned = Constants.PINNED_BOTTOM;\n rowIndex = pinnedBottomCount - 1;\n } else if (this.rowModel.getRowCount()) {\n rowPinned = null;\n rowIndex = this.paginationProxy.getPageLastRow();\n } else if (pinnedTopCount) {\n rowPinned = Constants.PINNED_TOP;\n rowIndex = pinnedTopCount - 1;\n }\n\n return rowIndex === undefined ? null : { rowIndex, rowPinned };\n }\n\n public getRowNode(gridRow: RowPosition): RowNode | undefined {\n switch (gridRow.rowPinned) {\n case Constants.PINNED_TOP:\n return this.pinnedRowModel.getPinnedTopRowData()[gridRow.rowIndex];\n case Constants.PINNED_BOTTOM:\n return this.pinnedRowModel.getPinnedBottomRowData()[gridRow.rowIndex];\n default:\n return this.rowModel.getRow(gridRow.rowIndex);\n }\n }\n\n public sameRow(rowA: RowPosition | undefined, rowB: RowPosition | undefined): boolean {\n // if both missing\n if (!rowA && !rowB) { return true; }\n // if only one missing\n if ((rowA && !rowB) || (!rowA && rowB)) { return false; }\n // otherwise compare (use == to compare rowPinned because it can be null or undefined)\n return rowA!.rowIndex === rowB!.rowIndex && rowA!.rowPinned == rowB!.rowPinned;\n }\n\n // tests if this row selection is before the other row selection\n public before(rowA: RowPosition, rowB: RowPosition): boolean {\n switch (rowA.rowPinned) {\n case Constants.PINNED_TOP:\n // we we are floating top, and other isn't, then we are always before\n if (rowB.rowPinned !== Constants.PINNED_TOP) { return true; }\n break;\n case Constants.PINNED_BOTTOM:\n // if we are floating bottom, and the other isn't, then we are never before\n if (rowB.rowPinned !== Constants.PINNED_BOTTOM) { return false; }\n break;\n default:\n // if we are not floating, but the other one is floating...\n if (exists(rowB.rowPinned)) {\n return rowB.rowPinned !== Constants.PINNED_TOP;\n }\n break;\n }\n return rowA.rowIndex < rowB.rowIndex;\n }\n}\n","import { Bean } from \"../context/context\";\nimport { BeanStub } from \"../context/beanStub\";\nimport { Column } from \"./column\";\nimport { RowPosition } from \"./rowPosition\";\n\n// this is what gets pass into and out of the api, as JavaScript users\nexport interface CellPosition extends RowPosition {\n/** The grid column */\n column: Column;\n}\n\n@Bean('cellPositionUtils')\nexport class CellPositionUtils extends BeanStub {\n\n public createId(cellPosition: CellPosition): string {\n const { rowIndex, rowPinned, column } = cellPosition;\n return this.createIdFromValues(rowIndex, column, rowPinned);\n }\n\n public createIdFromValues(rowIndex: number, column: Column, rowPinned: string | undefined | null): string {\n return `${rowIndex}.${rowPinned == null ? 'null' : rowPinned}.${column.getId()}`;\n }\n\n public equals(cellA: CellPosition, cellB: CellPosition): boolean {\n const colsMatch = cellA.column === cellB.column;\n const floatingMatch = cellA.rowPinned === cellB.rowPinned;\n const indexMatch = cellA.rowIndex === cellB.rowIndex;\n return colsMatch && floatingMatch && indexMatch;\n }\n\n}\n","import { CellRange } from \"../interfaces/IRangeService\";\n\nexport interface CellValueChange {\n rowPinned: string | null;\n rowIndex: number;\n columnId: string;\n oldValue: any;\n newValue: any;\n}\n\nexport interface LastFocusedCell {\n rowPinned?: string | null;\n rowIndex: number;\n columnId: string;\n}\n\nexport class UndoRedoAction {\n cellValueChanges: CellValueChange[];\n\n constructor(cellValueChanges: CellValueChange[]) {\n this.cellValueChanges = cellValueChanges;\n }\n}\n\nexport class FillUndoRedoAction extends UndoRedoAction {\n initialRange: CellRange;\n finalRange: CellRange;\n\n constructor(cellValueChanges: CellValueChange[], initialRange: CellRange, finalRange: CellRange) {\n super(cellValueChanges);\n this.initialRange = initialRange;\n this.finalRange = finalRange;\n }\n}\n\nexport class UndoRedoStack {\n private static DEFAULT_STACK_SIZE = 10;\n\n private readonly maxStackSize: number;\n\n private actionStack: UndoRedoAction[] = [];\n\n constructor(maxStackSize?: number) {\n this.maxStackSize = maxStackSize ? maxStackSize : UndoRedoStack.DEFAULT_STACK_SIZE;\n this.actionStack = new Array(this.maxStackSize);\n }\n\n public pop(): UndoRedoAction | undefined {\n return this.actionStack.pop();\n }\n\n public push(item: UndoRedoAction): void {\n const shouldAddActions = item.cellValueChanges && item.cellValueChanges.length > 0;\n\n if (!shouldAddActions) { return; }\n\n if (this.actionStack.length === this.maxStackSize) {\n this.actionStack.shift();\n }\n\n this.actionStack.push(item);\n }\n\n public clear(): void {\n this.actionStack = [];\n }\n\n public getCurrentStackSize(): number {\n return this.actionStack.length;\n }\n}\n","import { Autowired, Bean, PostConstruct } from \"../context/context\";\nimport { Events } from \"../eventKeys\";\nimport { CellEditingStartedEvent, CellValueChangedEvent, FillEndEvent, RowEditingStartedEvent } from \"../events\";\nimport { FocusService } from \"../focusService\";\nimport { IRowModel } from \"../interfaces/iRowModel\";\nimport { GridApi } from \"../gridApi\";\nimport { PinnedRowModel } from \"../pinnedRowModel/pinnedRowModel\";\nimport { CellValueChange, FillUndoRedoAction, LastFocusedCell, UndoRedoAction, UndoRedoStack } from \"./undoRedoStack\";\nimport { RowPosition, RowPositionUtils } from \"../entities/rowPosition\";\nimport { RowNode } from \"../entities/rowNode\";\nimport { Constants } from \"../constants/constants\";\nimport { ModuleNames } from \"../modules/moduleNames\";\nimport { ModuleRegistry } from \"../modules/moduleRegistry\";\nimport { CellRange, CellRangeParams } from \"../interfaces/IRangeService\";\nimport { BeanStub } from \"../context/beanStub\";\nimport { CellPosition, CellPositionUtils } from \"../entities/cellPosition\";\n\n@Bean('undoRedoService')\nexport class UndoRedoService extends BeanStub {\n\n @Autowired('focusService') private focusService: FocusService;\n @Autowired('gridApi') private gridApi: GridApi;\n @Autowired('rowModel') private rowModel: IRowModel;\n @Autowired('pinnedRowModel') private pinnedRowModel: PinnedRowModel;\n @Autowired('cellPositionUtils') private cellPositionUtils: CellPositionUtils;\n @Autowired('rowPositionUtils') private rowPositionUtils: RowPositionUtils;\n\n private cellValueChanges: CellValueChange[] = [];\n\n private undoStack: UndoRedoStack;\n private redoStack: UndoRedoStack;\n\n private activeCellEdit: CellPosition | null = null;\n private activeRowEdit: RowPosition | null = null;\n\n private isPasting = false;\n private isFilling = false;\n\n @PostConstruct\n public init(): void {\n if (!this.gridOptionsWrapper.isUndoRedoCellEditing()) { return; }\n\n const undoRedoLimit = this.gridOptionsWrapper.getUndoRedoCellEditingLimit();\n\n if (undoRedoLimit! <= 0) { return; }\n\n this.undoStack = new UndoRedoStack(undoRedoLimit);\n this.redoStack = new UndoRedoStack(undoRedoLimit);\n\n this.addRowEditingListeners();\n this.addCellEditingListeners();\n this.addPasteListeners();\n this.addFillListeners();\n\n this.addManagedListener(this.eventService, Events.EVENT_CELL_VALUE_CHANGED, this.onCellValueChanged);\n // undo / redo is restricted to actual editing so we clear the stacks when other operations are\n // performed that change the order of the row / cols.\n this.addManagedListener(this.eventService, Events.EVENT_MODEL_UPDATED, this.clearStacks);\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, this.clearStacks);\n this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.clearStacks);\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_GROUP_OPENED, this.clearStacks);\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_ROW_GROUP_CHANGED, this.clearStacks);\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_MOVED, this.clearStacks);\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PINNED, this.clearStacks);\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_VISIBLE, this.clearStacks);\n this.addManagedListener(this.eventService, Events.EVENT_ROW_DRAG_END, this.clearStacks);\n }\n\n private onCellValueChanged = (event: CellValueChangedEvent): void => {\n const eventCell: CellPosition = { column: event.column, rowIndex: event.rowIndex!, rowPinned: event.rowPinned };\n const isCellEditing = this.activeCellEdit !== null && this.cellPositionUtils.equals(this.activeCellEdit, eventCell);\n const isRowEditing = this.activeRowEdit !== null && this.rowPositionUtils.sameRow(this.activeRowEdit, eventCell);\n\n const shouldCaptureAction = isCellEditing || isRowEditing || this.isPasting || this.isFilling;\n\n if (!shouldCaptureAction) { return; }\n\n const { rowPinned, rowIndex, column, oldValue, value } = event;\n\n const cellValueChange: CellValueChange = {\n rowPinned,\n rowIndex: rowIndex!,\n columnId: column.getColId(),\n newValue: value,\n oldValue\n };\n\n this.cellValueChanges.push(cellValueChange);\n }\n\n private clearStacks = () => {\n this.undoStack.clear();\n this.redoStack.clear();\n }\n\n public getCurrentUndoStackSize(): number {\n return this.undoStack ? this.undoStack.getCurrentStackSize() : 0;\n }\n\n public getCurrentRedoStackSize(): number {\n return this.redoStack ? this.redoStack.getCurrentStackSize() : 0;\n }\n\n public undo() {\n if (!this.undoStack) { return; }\n\n const undoAction: UndoRedoAction | undefined = this.undoStack.pop();\n\n if (!undoAction || !undoAction.cellValueChanges) { return; }\n\n this.processAction(undoAction, (cellValueChange: CellValueChange) => cellValueChange.oldValue);\n\n if (undoAction instanceof FillUndoRedoAction) {\n this.processRangeAndCellFocus(undoAction.cellValueChanges, undoAction.initialRange);\n } else {\n this.processRangeAndCellFocus(undoAction.cellValueChanges);\n }\n\n this.redoStack.push(undoAction);\n }\n\n public redo() {\n if (!this.redoStack) { return; }\n\n const redoAction: UndoRedoAction | undefined = this.redoStack.pop();\n\n if (!redoAction || !redoAction.cellValueChanges) { return; }\n\n this.processAction(redoAction, (cellValueChange: CellValueChange) => cellValueChange.newValue);\n\n if (redoAction instanceof FillUndoRedoAction) {\n this.processRangeAndCellFocus(redoAction.cellValueChanges, redoAction.finalRange);\n } else {\n this.processRangeAndCellFocus(redoAction.cellValueChanges);\n }\n\n this.undoStack.push(redoAction);\n }\n\n private processAction(action: UndoRedoAction, valueExtractor: (cellValueChange: CellValueChange) => any) {\n action.cellValueChanges.forEach(cellValueChange => {\n const { rowIndex, rowPinned, columnId } = cellValueChange;\n const rowPosition: RowPosition = { rowIndex, rowPinned };\n const currentRow = this.getRowNode(rowPosition);\n\n // checks if the row has been filtered out\n if (!currentRow!.displayed) { return; }\n\n currentRow!.setDataValue(columnId, valueExtractor(cellValueChange));\n });\n }\n\n private processRangeAndCellFocus(cellValueChanges: CellValueChange[], range?: CellRange) {\n let lastFocusedCell: LastFocusedCell;\n\n if (range) {\n const startRow = range.startRow;\n const endRow = range.endRow;\n\n lastFocusedCell = {\n rowPinned: startRow!.rowPinned,\n rowIndex: startRow!.rowIndex,\n columnId: range.startColumn.getColId()\n };\n\n this.setLastFocusedCell(lastFocusedCell);\n\n const cellRangeParams: CellRangeParams = {\n rowStartIndex: startRow!.rowIndex,\n rowStartPinned: startRow!.rowPinned,\n rowEndIndex: endRow!.rowIndex,\n rowEndPinned: endRow!.rowPinned,\n columnStart: range.startColumn,\n columns: range.columns\n };\n\n this.gridApi.addCellRange(cellRangeParams);\n\n return;\n }\n\n const cellValueChange = cellValueChanges[0];\n const { rowIndex, rowPinned } = cellValueChange;\n const rowPosition: RowPosition = { rowIndex, rowPinned };\n const row = this.getRowNode(rowPosition);\n\n lastFocusedCell = {\n rowPinned: cellValueChange.rowPinned,\n rowIndex: row!.rowIndex!,\n columnId: cellValueChange.columnId\n };\n\n this.setLastFocusedCell(lastFocusedCell);\n }\n\n private setLastFocusedCell(lastFocusedCell: LastFocusedCell) {\n const { rowIndex, columnId, rowPinned } = lastFocusedCell;\n\n this.gridApi.ensureIndexVisible(rowIndex);\n this.gridApi.ensureColumnVisible(columnId);\n\n if (ModuleRegistry.isRegistered(ModuleNames.RangeSelectionModule)) {\n this.gridApi.clearRangeSelection();\n }\n\n this.focusService.setFocusedCell(rowIndex, columnId, rowPinned, true);\n }\n\n private addRowEditingListeners(): void {\n this.addManagedListener(this.eventService, Events.EVENT_ROW_EDITING_STARTED, (e: RowEditingStartedEvent) => {\n this.activeRowEdit = { rowIndex: e.rowIndex!, rowPinned: e.rowPinned};\n });\n\n this.addManagedListener(this.eventService, Events.EVENT_ROW_EDITING_STOPPED, () => {\n const action = new UndoRedoAction(this.cellValueChanges);\n this.pushActionsToUndoStack(action);\n this.activeRowEdit = null;\n });\n }\n\n private addCellEditingListeners(): void {\n this.addManagedListener(this.eventService, Events.EVENT_CELL_EDITING_STARTED, (e: CellEditingStartedEvent) => {\n this.activeCellEdit = { column: e.column, rowIndex: e.rowIndex!, rowPinned: e.rowPinned };\n });\n\n this.addManagedListener(this.eventService, Events.EVENT_CELL_EDITING_STOPPED, () => {\n this.activeCellEdit = null;\n\n const shouldPushAction = !this.activeRowEdit && !this.isPasting && !this.isFilling;\n\n if (shouldPushAction) {\n const action = new UndoRedoAction(this.cellValueChanges);\n this.pushActionsToUndoStack(action);\n }\n });\n }\n\n private addPasteListeners(): void {\n this.addManagedListener(this.eventService, Events.EVENT_PASTE_START, () => {\n this.isPasting = true;\n });\n\n this.addManagedListener(this.eventService, Events.EVENT_PASTE_END, () => {\n const action = new UndoRedoAction(this.cellValueChanges);\n this.pushActionsToUndoStack(action);\n this.isPasting = false;\n });\n }\n\n private addFillListeners(): void {\n this.addManagedListener(this.eventService, Events.EVENT_FILL_START, () => {\n this.isFilling = true;\n });\n\n this.addManagedListener(this.eventService, Events.EVENT_FILL_END, (event: FillEndEvent) => {\n const action = new FillUndoRedoAction(this.cellValueChanges, event.initialRange, event.finalRange);\n this.pushActionsToUndoStack(action);\n this.isFilling = false;\n });\n }\n\n private pushActionsToUndoStack(action: UndoRedoAction) {\n this.undoStack.push(action);\n\n this.cellValueChanges = [];\n this.redoStack.clear();\n }\n\n private getRowNode(gridRow: RowPosition): RowNode | undefined {\n switch (gridRow.rowPinned) {\n case Constants.PINNED_TOP:\n return this.pinnedRowModel.getPinnedTopRowData()[gridRow.rowIndex];\n case Constants.PINNED_BOTTOM:\n return this.pinnedRowModel.getPinnedBottomRowData()[gridRow.rowIndex];\n default:\n return this.rowModel.getRow(gridRow.rowIndex);\n }\n }\n}\n","import { ColumnModel } from \"../../columns/columnModel\";\nimport { BeanStub } from \"../../context/beanStub\";\nimport { Autowired, Bean } from \"../../context/context\";\nimport { CtrlsService } from \"../../ctrlsService\";\nimport { Column } from \"../../entities/column\";\nimport { ColumnGroup } from \"../../entities/columnGroup\";\nimport { HeaderRowType } from \"../row/headerRowComp\";\n\nexport interface HeaderPosition {\n/** A number from 0 to n, where n is the last header row the grid is rendering */\n headerRowIndex: number;\n/** The grid column or column group */\n column: Column | ColumnGroup;\n}\n\n@Bean('headerPositionUtils')\nexport class HeaderPositionUtils extends BeanStub {\n\n @Autowired('columnModel') private columnModel: ColumnModel;\n @Autowired('ctrlsService') private ctrlsService: CtrlsService;\n\n public findHeader(focusedHeader: HeaderPosition, direction: 'Before' | 'After'): HeaderPosition | undefined {\n let nextColumn: Column | ColumnGroup;\n let getGroupMethod: 'getDisplayedGroupBefore' | 'getDisplayedGroupAfter';\n let getColMethod: 'getDisplayedColBefore' | 'getDisplayedColAfter';\n\n if (focusedHeader.column instanceof ColumnGroup) {\n getGroupMethod = `getDisplayedGroup${direction}` as any;\n nextColumn = this.columnModel[getGroupMethod](focusedHeader.column)!;\n } else {\n getColMethod = `getDisplayedCol${direction}` as any;\n nextColumn = this.columnModel[getColMethod](focusedHeader.column)!;\n }\n\n if (nextColumn) {\n return {\n column: nextColumn,\n headerRowIndex: focusedHeader.headerRowIndex\n };\n }\n }\n\n public findColAtEdgeForHeaderRow(level: number, position: 'start' | 'end'): HeaderPosition | undefined {\n const displayedColumns = this.columnModel.getAllDisplayedColumns();\n const column = displayedColumns[position === 'start' ? 0 : displayedColumns.length - 1];\n\n if (!column) { return; }\n\n const childContainer = this.ctrlsService.getHeaderRowContainerCtrl(column.getPinned());\n const type = childContainer.getRowType(level);\n\n if (type == HeaderRowType.COLUMN_GROUP) {\n const columnGroup = this.columnModel.getColumnGroupAtLevel(column, level);\n return {\n headerRowIndex: level,\n column: columnGroup!\n };\n }\n\n return {\n // if type==null, means the header level didn't exist\n headerRowIndex: type == null ? -1 : level,\n column\n };\n }\n}\n","import { ColDef, ColGroupDef } from \"../entities/colDef\";\nimport { Column } from \"../entities/column\";\nimport { Bean } from \"../context/context\";\nimport { deepCloneDefinition } from \"../utils/object\";\nimport { ProvidedColumnGroup } from \"../entities/providedColumnGroup\";\n\n@Bean('columnDefFactory')\nexport class ColumnDefFactory {\n\n public buildColumnDefs(cols: Column[], rowGroupColumns: Column[], pivotColumns: Column[]): (ColDef | ColGroupDef)[] {\n\n const res: (ColDef | ColGroupDef)[] = [];\n\n const colGroupDefs: {[id: string]: ColGroupDef} = {};\n\n cols.forEach(col => {\n const colDef = this.createDefFromColumn(col, rowGroupColumns, pivotColumns);\n\n let addToResult = true;\n\n let childDef: ColDef | ColGroupDef = colDef;\n\n let pointer = col.getOriginalParent();\n\n while (pointer) {\n\n let parentDef: ColGroupDef | null | undefined = null;\n\n // we don't include padding groups, as the column groups provided\n // by application didn't have these. the whole point of padding groups\n // is to balance the column tree that the user provided.\n if (pointer.isPadding()) {\n pointer = pointer.getOriginalParent();\n continue;\n }\n\n // if colDef for this group already exists, use it\n const existingParentDef = colGroupDefs[pointer.getGroupId()];\n if (existingParentDef) {\n existingParentDef.children.push(childDef);\n // if we added to result, it would be the second time we did it\n addToResult = false;\n // we don't want to continue up the tree, as it has already been\n // done for this group\n break;\n }\n\n parentDef = this.createDefFromGroup(pointer);\n\n if (parentDef) {\n parentDef.children = [childDef];\n colGroupDefs[parentDef.groupId!] = parentDef;\n childDef = parentDef;\n pointer = pointer.getOriginalParent();\n }\n }\n\n if (addToResult) {\n res.push(childDef);\n }\n });\n\n return res;\n }\n\n private createDefFromGroup(group: ProvidedColumnGroup): ColGroupDef | null | undefined {\n const defCloned = deepCloneDefinition(group.getColGroupDef(), ['children']);\n\n if (defCloned) {\n defCloned.groupId = group.getGroupId();\n }\n\n return defCloned;\n }\n\n private createDefFromColumn(col: Column, rowGroupColumns: Column[], pivotColumns: Column[]): ColDef {\n const colDefCloned = deepCloneDefinition(col.getColDef())!;\n\n colDefCloned.colId = col.getColId();\n\n colDefCloned.width = col.getActualWidth();\n colDefCloned.rowGroup = col.isRowGroupActive();\n colDefCloned.rowGroupIndex = col.isRowGroupActive() ? rowGroupColumns.indexOf(col) : null;\n colDefCloned.pivot = col.isPivotActive();\n colDefCloned.pivotIndex = col.isPivotActive() ? pivotColumns.indexOf(col) : null;\n colDefCloned.aggFunc = col.isValueActive() ? col.getAggFunc() : null;\n colDefCloned.hide = col.isVisible() ? undefined : true;\n colDefCloned.pinned = col.isPinned() ? col.getPinned() : null;\n\n colDefCloned.sort = col.getSort() ? col.getSort() : null;\n colDefCloned.sortIndex = col.getSortIndex() != null ? col.getSortIndex() : null;\n\n return colDefCloned;\n }\n\n}","import { exists } from \"../../utils/generic\";\nimport { RowNode } from \"../../entities/rowNode\";\nimport { pushAll } from \"../../utils/array\";\nimport { GridOptionsWrapper } from \"../../gridOptionsWrapper\";\nimport { Autowired, Bean } from \"../../context/context\";\nimport { StylingService } from \"../../styling/stylingService\";\nimport { RowClassParams } from \"../../entities/gridOptions\";\nimport { Constants } from \"../../constants/constants\";\nimport { WithoutGridCommon } from \"../../interfaces/iCommon\";\n\nexport interface RowCssClassCalculatorParams {\n rowNode: RowNode;\n rowIsEven: boolean;\n rowLevel: number;\n fullWidthRow?: boolean;\n firstRowOnPage: boolean;\n lastRowOnPage: boolean;\n printLayout: boolean;\n expandable: boolean;\n\n pinned?: string | null;\n extraCssClass?: string;\n rowFocused?: boolean;\n fadeRowIn?: boolean;\n}\n\n@Bean('rowCssClassCalculator')\nexport class RowCssClassCalculator {\n\n @Autowired('stylingService') public stylingService: StylingService;\n @Autowired('gridOptionsWrapper') public gridOptionsWrapper: GridOptionsWrapper;\n\n public getInitialRowClasses(params: RowCssClassCalculatorParams): string[] {\n\n const classes: string[] = [];\n\n if (exists(params.extraCssClass)) {\n classes.push(params.extraCssClass);\n }\n\n classes.push('ag-row');\n classes.push(params.rowFocused ? 'ag-row-focus' : 'ag-row-no-focus');\n\n if (params.fadeRowIn) {\n classes.push('ag-opacity-zero');\n }\n\n classes.push(params.rowIsEven ? 'ag-row-even' : 'ag-row-odd');\n\n if (params.rowNode.isRowPinned()) {\n classes.push('ag-row-pinned');\n }\n\n if (params.rowNode.isSelected()) {\n classes.push('ag-row-selected');\n }\n\n if (params.rowNode.footer) {\n classes.push('ag-row-footer');\n }\n\n classes.push('ag-row-level-' + params.rowLevel);\n\n if (params.rowNode.stub) {\n classes.push('ag-row-loading');\n }\n\n if (params.fullWidthRow) {\n classes.push('ag-full-width-row');\n }\n\n if (params.expandable) {\n classes.push('ag-row-group');\n classes.push(params.rowNode.expanded ? 'ag-row-group-expanded' : 'ag-row-group-contracted');\n }\n\n if (params.rowNode.dragging) {\n classes.push('ag-row-dragging');\n }\n\n pushAll(classes, this.processClassesFromGridOptions(params.rowNode));\n pushAll(classes, this.preProcessRowClassRules(params.rowNode));\n\n // we use absolute position unless we are doing print layout\n classes.push(params.printLayout ? 'ag-row-position-relative' : 'ag-row-position-absolute');\n\n if (params.firstRowOnPage) {\n classes.push('ag-row-first');\n }\n\n if (params.lastRowOnPage) {\n classes.push('ag-row-last');\n }\n\n if (params.fullWidthRow) {\n if (params.pinned === Constants.PINNED_LEFT) {\n classes.push('ag-cell-last-left-pinned');\n }\n if (params.pinned === Constants.PINNED_RIGHT) {\n classes.push('ag-cell-first-right-pinned');\n }\n }\n\n return classes;\n }\n\n public processClassesFromGridOptions(rowNode: RowNode): string[] {\n const res: string[] = [];\n\n const process = (rowCls: string | string[] | undefined) => {\n if (typeof rowCls === 'string') {\n res.push(rowCls);\n } else if (Array.isArray(rowCls)) {\n rowCls.forEach(e => res.push(e));\n }\n };\n\n // part 1 - rowClass\n const rowClass = this.gridOptionsWrapper.getRowClass();\n if (rowClass) {\n if (typeof rowClass === 'function') {\n console.warn('AG Grid: rowClass should not be a function, please use getRowClass instead');\n return [];\n }\n process(rowClass);\n }\n\n // part 2 - rowClassFunc\n const rowClassFunc = this.gridOptionsWrapper.getRowClassFunc();\n\n if (rowClassFunc) {\n const params: WithoutGridCommon = {\n data: rowNode.data,\n node: rowNode,\n rowIndex: rowNode.rowIndex!\n };\n const rowClassFuncResult = rowClassFunc(params);\n process(rowClassFuncResult);\n }\n\n return res;\n }\n\n private preProcessRowClassRules(rowNode: RowNode): string[] {\n const res: string[] = [];\n\n this.processRowClassRules(rowNode, (className: string) => {\n res.push(className);\n },\n (className: string) => {\n // not catered for, if creating, no need\n // to remove class as it was never there\n }\n );\n\n return res;\n }\n\n public processRowClassRules(rowNode: RowNode, onApplicableClass: (className: string) => void, onNotApplicableClass?: (className: string) => void): void {\n const rowClassParams: RowClassParams = {\n data: rowNode.data,\n node: rowNode,\n rowIndex: rowNode.rowIndex!,\n api: this.gridOptionsWrapper.getApi()!,\n columnApi: this.gridOptionsWrapper.getColumnApi()!,\n context: this.gridOptionsWrapper.getContext()\n };\n\n this.stylingService.processClassRules(\n this.gridOptionsWrapper.rowClassRules(),\n rowClassParams,\n onApplicableClass,\n onNotApplicableClass\n );\n }\n\n public calculateRowLevel(rowNode: RowNode): number {\n if (rowNode.group) {\n return rowNode.level;\n }\n\n // if a leaf, and a parent exists, put a level of the parent, else put level of 0 for top level item\n return rowNode.parent ? (rowNode.parent.level + 1) : 0;\n }\n\n}\n","import { Column } from \"../entities/column\";\nimport { RowNode } from \"../entities/rowNode\";\nimport { Autowired, Bean } from \"../context/context\";\nimport { GridOptionsWrapper } from \"../gridOptionsWrapper\";\nimport { ValueService } from \"../valueService/valueService\";\nimport { _ } from \"../utils\";\nimport { Constants } from \"../constants/constants\";\nimport { ColumnModel } from \"../columns/columnModel\";\n\nexport interface SortOption {\n sort: 'asc' | 'desc';\n column: Column;\n}\n\nexport interface SortedRowNode {\n currentPos: number;\n rowNode: RowNode;\n}\n\n// this logic is used by both SSRM and CSRM\n\n@Bean('rowNodeSorter')\nexport class RowNodeSorter {\n\n @Autowired('gridOptionsWrapper') private gridOptionsWrapper: GridOptionsWrapper;\n @Autowired('valueService') private valueService: ValueService;\n @Autowired('columnModel') private columnModel: ColumnModel;\n\n public doFullSort(rowNodes: RowNode[], sortOptions: SortOption[]): RowNode[] {\n\n const mapper = (rowNode: RowNode, pos: number) => ({ currentPos: pos, rowNode: rowNode });\n const sortedRowNodes: SortedRowNode[] = rowNodes.map(mapper);\n\n sortedRowNodes.sort(this.compareRowNodes.bind(this, sortOptions));\n\n return sortedRowNodes.map(item => item.rowNode);\n }\n\n public compareRowNodes(sortOptions: SortOption[], sortedNodeA: SortedRowNode, sortedNodeB: SortedRowNode): number {\n const nodeA: RowNode = sortedNodeA.rowNode;\n const nodeB: RowNode = sortedNodeB.rowNode;\n\n // Iterate columns, return the first that doesn't match\n for (let i = 0, len = sortOptions.length; i < len; i++) {\n const sortOption = sortOptions[i];\n const isInverted = sortOption.sort === Constants.SORT_DESC;\n\n const valueA: any = this.getValue(nodeA, sortOption.column);\n const valueB: any = this.getValue(nodeB, sortOption.column);\n\n let comparatorResult: number;\n const providedComparator = this.getComparator(sortOption, nodeA);\n if (providedComparator) {\n //if comparator provided, use it\n comparatorResult = providedComparator(valueA, valueB, nodeA, nodeB, isInverted);\n } else {\n //otherwise do our own comparison\n comparatorResult = _.defaultComparator(valueA, valueB, this.gridOptionsWrapper.isAccentedSort());\n }\n\n // user provided comparators can return 'NaN' if they don't correctly handle 'undefined' values, this\n // typically occurs when the comparator is used on a group row\n const validResult = !isNaN(comparatorResult);\n\n if (validResult && comparatorResult !== 0) {\n return sortOption.sort === Constants.SORT_ASC ? comparatorResult : comparatorResult * -1;\n }\n }\n // All matched, we make is so that the original sort order is kept:\n return sortedNodeA.currentPos - sortedNodeB.currentPos;\n }\n\n private getComparator(sortOption: SortOption, rowNode: RowNode):\n ((valueA: any, valueB: any, nodeA: RowNode, nodeB: RowNode, isInverted: boolean) => number) | undefined {\n\n const column = sortOption.column;\n\n // comparator on col get preference over everything else\n const comparatorOnCol = column.getColDef().comparator;\n if (comparatorOnCol != null) {\n return comparatorOnCol;\n }\n\n // if no comparator on col, see if we are showing a group, and if we are, get comparator from row group col\n if (rowNode.rowGroupColumn) {\n return rowNode.rowGroupColumn.getColDef().comparator;\n }\n\n if (!column.getColDef().showRowGroup) { return; }\n\n // if a 'field' is supplied on the autoGroupColumnDef we need to use the associated column comparator\n const groupLeafField = !rowNode.group && column.getColDef().field;\n if (!groupLeafField) { return; }\n\n const primaryColumn = this.columnModel.getPrimaryColumn(groupLeafField);\n if (!primaryColumn) { return; }\n\n return primaryColumn.getColDef().comparator;\n }\n\n private getValue(nodeA: RowNode, column: Column): string {\n return this.valueService.getValue(column, nodeA, false, false);\n }\n}","import { GridCtrl } from \"./gridComp/gridCtrl\";\nimport { Bean } from \"./context/context\";\nimport { GridBodyCtrl } from \"./gridBodyComp/gridBodyCtrl\";\nimport { RowContainerCtrl } from \"./gridBodyComp/rowContainer/rowContainerCtrl\";\nimport { FakeHScrollCtrl } from \"./gridBodyComp/fakeHScrollCtrl\";\nimport { BeanStub } from \"./context/beanStub\";\nimport { GridHeaderCtrl } from \"./headerRendering/gridHeaderCtrl\";\nimport { Constants } from \"./constants/constants\";\nimport { HeaderRowContainerCtrl } from \"./headerRendering/rowContainer/headerRowContainerCtrl\";\n\n// for all controllers that are singletons, they can register here so other parts\n// of the application can access them.\n\ninterface ReadyParams {\n gridCtrl: GridCtrl;\n gridBodyCtrl: GridBodyCtrl;\n\n centerRowContainerCtrl: RowContainerCtrl;\n leftRowContainerCtrl: RowContainerCtrl;\n rightRowContainerCtrl: RowContainerCtrl;\n\n bottomCenterRowContainerCtrl: RowContainerCtrl;\n bottomLeftRowContainerCtrl: RowContainerCtrl;\n bottomRightRowContainerCtrl: RowContainerCtrl;\n\n topCenterRowContainerCtrl: RowContainerCtrl;\n topLeftRowContainerCtrl: RowContainerCtrl;\n topRightRowContainerCtrl: RowContainerCtrl;\n\n fakeHScrollCtrl: FakeHScrollCtrl;\n gridHeaderCtrl: GridHeaderCtrl;\n\n centerHeaderRowContainerCtrl: HeaderRowContainerCtrl;\n leftHeaderRowContainerCtrl: HeaderRowContainerCtrl;\n rightHeaderRowContainerCtrl: HeaderRowContainerCtrl;\n}\n\n@Bean(CtrlsService.NAME)\nexport class CtrlsService extends BeanStub {\n\n public static readonly NAME = 'ctrlsService';\n\n private gridCtrl: GridCtrl;\n private gridBodyCtrl: GridBodyCtrl;\n\n private centerRowContainerCtrl: RowContainerCtrl;\n private leftRowContainerCtrl: RowContainerCtrl;\n private rightRowContainerCtrl: RowContainerCtrl;\n\n private bottomCenterRowContainerCtrl: RowContainerCtrl;\n private bottomLeftRowContainerCtrl: RowContainerCtrl;\n private bottomRightRowContainerCtrl: RowContainerCtrl;\n\n private topCenterRowContainerCtrl: RowContainerCtrl;\n private topLeftRowContainerCtrl: RowContainerCtrl;\n private topRightRowContainerCtrl: RowContainerCtrl;\n\n private centerHeaderRowContainerCtrl: HeaderRowContainerCtrl;\n private leftHeaderRowContainerCtrl: HeaderRowContainerCtrl;\n private rightHeaderRowContainerCtrl: HeaderRowContainerCtrl;\n\n private fakeHScrollCtrl: FakeHScrollCtrl;\n\n private gridHeaderCtrl: GridHeaderCtrl;\n\n private ready = false;\n private readyCallbacks: ((p: ReadyParams) => void)[] = [];\n\n private checkReady(): void {\n this.ready =\n this.gridCtrl != null\n && this.gridBodyCtrl != null\n\n && this.centerRowContainerCtrl != null\n && this.leftRowContainerCtrl != null\n && this.rightRowContainerCtrl != null\n\n && this.bottomCenterRowContainerCtrl != null\n && this.bottomLeftRowContainerCtrl != null\n && this.bottomRightRowContainerCtrl != null\n\n && this.topCenterRowContainerCtrl != null\n && this.topLeftRowContainerCtrl != null\n && this.topRightRowContainerCtrl != null\n\n && this.centerHeaderRowContainerCtrl != null\n && this.leftHeaderRowContainerCtrl != null\n && this.rightHeaderRowContainerCtrl != null\n\n && this.fakeHScrollCtrl != null\n && this.gridHeaderCtrl != null;\n\n if (this.ready) {\n const p = this.createReadyParams();\n this.readyCallbacks.forEach(c => c(p));\n this.readyCallbacks.length = 0;\n }\n }\n\n public whenReady(callback: (p: ReadyParams) => void): void {\n if (this.ready) {\n callback(this.createReadyParams());\n } else {\n this.readyCallbacks.push(callback);\n }\n }\n\n private createReadyParams(): ReadyParams {\n return {\n centerRowContainerCtrl: this.centerRowContainerCtrl,\n leftRowContainerCtrl: this.leftRowContainerCtrl,\n rightRowContainerCtrl: this.rightRowContainerCtrl,\n\n bottomCenterRowContainerCtrl: this.bottomCenterRowContainerCtrl,\n bottomLeftRowContainerCtrl: this.bottomLeftRowContainerCtrl,\n bottomRightRowContainerCtrl: this.bottomRightRowContainerCtrl,\n\n topCenterRowContainerCtrl: this.topCenterRowContainerCtrl,\n topLeftRowContainerCtrl: this.topLeftRowContainerCtrl,\n topRightRowContainerCtrl: this.topRightRowContainerCtrl,\n\n centerHeaderRowContainerCtrl: this.centerHeaderRowContainerCtrl,\n leftHeaderRowContainerCtrl: this.leftHeaderRowContainerCtrl,\n rightHeaderRowContainerCtrl: this.rightHeaderRowContainerCtrl,\n\n fakeHScrollCtrl: this.fakeHScrollCtrl,\n gridBodyCtrl: this.gridBodyCtrl,\n gridCtrl: this.gridCtrl,\n gridHeaderCtrl: this.gridHeaderCtrl,\n };\n }\n\n public registerFakeHScrollCtrl(ctrl: FakeHScrollCtrl): void {\n this.fakeHScrollCtrl = ctrl;\n this.checkReady();\n }\n\n public registerGridHeaderCtrl(gridHeaderCtrl: GridHeaderCtrl): void {\n this.gridHeaderCtrl = gridHeaderCtrl;\n this.checkReady();\n }\n\n public registerCenterRowContainerCtrl(ctrl: RowContainerCtrl): void {\n this.centerRowContainerCtrl = ctrl;\n this.checkReady();\n }\n\n public registerLeftRowContainerCtrl(ctrl: RowContainerCtrl): void {\n this.leftRowContainerCtrl = ctrl;\n this.checkReady();\n }\n\n public registerRightRowContainerCtrl(ctrl: RowContainerCtrl): void {\n this.rightRowContainerCtrl = ctrl;\n this.checkReady();\n }\n\n public registerTopCenterRowContainerCtrl(ctrl: RowContainerCtrl): void {\n this.topCenterRowContainerCtrl = ctrl;\n this.checkReady();\n }\n\n public registerTopLeftRowContainerCon(ctrl: RowContainerCtrl): void {\n this.topLeftRowContainerCtrl = ctrl;\n this.checkReady();\n }\n\n public registerTopRightRowContainerCtrl(ctrl: RowContainerCtrl): void {\n this.topRightRowContainerCtrl = ctrl;\n this.checkReady();\n }\n\n public registerBottomCenterRowContainerCtrl(ctrl: RowContainerCtrl): void {\n this.bottomCenterRowContainerCtrl = ctrl;\n this.checkReady();\n }\n\n public registerBottomLeftRowContainerCtrl(ctrl: RowContainerCtrl): void {\n this.bottomLeftRowContainerCtrl = ctrl;\n this.checkReady();\n }\n\n public registerBottomRightRowContainerCtrl(ctrl: RowContainerCtrl): void {\n this.bottomRightRowContainerCtrl = ctrl;\n this.checkReady();\n }\n\n public registerHeaderContainer(ctrl: HeaderRowContainerCtrl, pinned: string | null): void {\n switch (pinned) {\n case Constants.PINNED_LEFT:\n this.leftHeaderRowContainerCtrl = ctrl;\n break;\n case Constants.PINNED_RIGHT:\n this.rightHeaderRowContainerCtrl = ctrl;\n break;\n default: this.centerHeaderRowContainerCtrl = ctrl;\n break;\n }\n this.checkReady();\n }\n\n public registerGridBodyCtrl(ctrl: GridBodyCtrl): void {\n this.gridBodyCtrl = ctrl;\n this.checkReady();\n }\n\n public registerGridCtrl(ctrl: GridCtrl): void {\n this.gridCtrl = ctrl;\n this.checkReady();\n }\n\n public getFakeHScrollCtrl(): FakeHScrollCtrl {\n return this.fakeHScrollCtrl;\n }\n\n public getGridHeaderCtrl(): GridHeaderCtrl {\n return this.gridHeaderCtrl;\n }\n\n public getGridCtrl(): GridCtrl {\n return this.gridCtrl;\n }\n\n public getCenterRowContainerCtrl(): RowContainerCtrl {\n return this.centerRowContainerCtrl;\n }\n\n public getTopCenterRowContainerCtrl(): RowContainerCtrl {\n return this.topCenterRowContainerCtrl;\n }\n\n public getBottomCenterRowContainerCtrl(): RowContainerCtrl {\n return this.bottomCenterRowContainerCtrl;\n }\n\n public getGridBodyCtrl(): GridBodyCtrl {\n return this.gridBodyCtrl;\n }\n\n public getHeaderRowContainerCtrls(): HeaderRowContainerCtrl[] {\n return [this.leftHeaderRowContainerCtrl, this.rightHeaderRowContainerCtrl, this.centerHeaderRowContainerCtrl];\n }\n\n public getHeaderRowContainerCtrl(pinned?: string | null): HeaderRowContainerCtrl {\n switch (pinned) {\n case Constants.PINNED_LEFT: return this.leftHeaderRowContainerCtrl;\n case Constants.PINNED_RIGHT: return this.rightHeaderRowContainerCtrl;\n default: return this.centerHeaderRowContainerCtrl;\n }\n }\n}","import { BeanStub } from \"./context/beanStub\";\nimport { Bean, ControllerMeta } from \"./context/context\";\n\n@Bean('ctrlsFactory')\nexport class CtrlsFactory extends BeanStub {\n\n private registry: {[name: string]: new () => Object} = {};\n\n public register(meta: ControllerMeta): void {\n this.registry[meta.controllerName] = meta.controllerClass;\n }\n\n public getInstance(name: string): any {\n const ControllerClass = this.registry[name];\n\n if (ControllerClass == null) { return undefined; }\n\n return new ControllerClass();\n }\n\n}","import { BeanStub } from \"../context/beanStub\";\nimport { isInvisibleScrollbar } from \"../utils/browser\";\nimport { Autowired, PostConstruct } from \"../context/context\";\nimport { ScrollVisibleService } from \"./scrollVisibleService\";\nimport { Events } from \"../eventKeys\";\nimport { ColumnModel } from \"../columns/columnModel\";\nimport { GridOptionsWrapper } from \"../gridOptionsWrapper\";\nimport { CtrlsService } from \"../ctrlsService\";\nimport { BodyScrollEvent } from \"../events\";\n\nexport interface IFakeHScrollComp {\n setHeight(height: number): void;\n setViewportHeight(height: number): void;\n setContainerHeight(height: number): void;\n setRightSpacerFixedWidth(width: number): void;\n setLeftSpacerFixedWidth(width: number): void;\n\n addOrRemoveCssClass(cssClassName: string, on: boolean): void;\n includeLeftSpacerScrollerCss(cssClass: string, include: boolean): void;\n includeRightSpacerScrollerCss(cssClass: string, include: boolean): void;\n}\n\nexport class FakeHScrollCtrl extends BeanStub {\n\n @Autowired('scrollVisibleService') private scrollVisibleService: ScrollVisibleService;\n @Autowired('columnModel') private columnModel: ColumnModel;\n @Autowired('ctrlsService') public ctrlsService: CtrlsService;\n\n private view: IFakeHScrollComp;\n\n private enableRtl: boolean;\n private invisibleScrollbar: boolean;\n private eViewport: HTMLElement;\n private eContainer: HTMLElement;\n private eGui: HTMLElement;\n\n constructor() {\n super();\n }\n\n public setComp(view: IFakeHScrollComp, eGui: HTMLElement, eViewport: HTMLElement, eContainer: HTMLElement): void {\n this.view = view;\n this.eViewport = eViewport;\n this.eContainer = eContainer;\n this.eGui = eGui;\n\n this.addManagedListener(this.eventService, Events.EVENT_SCROLL_VISIBILITY_CHANGED, this.onScrollVisibilityChanged.bind(this));\n this.onScrollVisibilityChanged();\n\n // When doing printing, this changes whether cols are pinned or not\n const spacerWidthsListener = this.setFakeHScrollSpacerWidths.bind(this);\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, spacerWidthsListener);\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, spacerWidthsListener);\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_DOM_LAYOUT, spacerWidthsListener);\n this.setFakeHScrollSpacerWidths();\n\n if (this.invisibleScrollbar) {\n this.hideAndShowInvisibleScrollAsNeeded();\n this.addActiveListenerToggles();\n }\n\n this.ctrlsService.registerFakeHScrollCtrl(this);\n }\n\n addActiveListenerToggles(): void {\n const activateEvents = ['mouseenter', 'mousedown', 'touchstart'];\n const deactivateEvents = ['mouseleave', 'mouseup', 'touchend'];\n\n activateEvents.forEach(eventName => this.addManagedListener(this.eGui, eventName, () => this.view.addOrRemoveCssClass('ag-scrollbar-active', true)));\n deactivateEvents.forEach(eventName => this.addManagedListener(this.eGui, eventName, () => this.view.addOrRemoveCssClass('ag-scrollbar-active', false)));\n }\n\n @PostConstruct\n private postConstruct(): void {\n this.enableRtl = this.gridOptionsWrapper.isEnableRtl();\n this.invisibleScrollbar = isInvisibleScrollbar();\n }\n\n private onScrollVisibilityChanged(): void {\n this.setScrollVisible();\n this.setFakeHScrollSpacerWidths();\n }\n\n private hideAndShowInvisibleScrollAsNeeded(): void {\n this.addManagedListener(this.eventService, Events.EVENT_BODY_SCROLL, (params: BodyScrollEvent) => {\n if (params.direction === 'horizontal') {\n this.view.addOrRemoveCssClass('ag-scrollbar-scrolling', true);\n }\n });\n this.addManagedListener(this.eventService, Events.EVENT_BODY_SCROLL_END, () => this.view.addOrRemoveCssClass('ag-scrollbar-scrolling', false));\n }\n\n private setFakeHScrollSpacerWidths(): void {\n const vScrollShowing = this.scrollVisibleService.isVerticalScrollShowing();\n\n // we pad the right based on a) if cols are pinned to the right and\n // b) if v scroll is showing on the right (normal position of scroll)\n let rightSpacing = this.columnModel.getDisplayedColumnsRightWidth();\n const scrollOnRight = !this.enableRtl && vScrollShowing;\n const scrollbarWidth = this.gridOptionsWrapper.getScrollbarWidth();\n\n if (scrollOnRight) {\n rightSpacing += scrollbarWidth;\n }\n this.view.setRightSpacerFixedWidth(rightSpacing);\n this.view.includeRightSpacerScrollerCss('ag-scroller-corner', rightSpacing <= scrollbarWidth);\n\n // we pad the left based on a) if cols are pinned to the left and\n // b) if v scroll is showing on the left (happens in LTR layout only)\n let leftSpacing = this.columnModel.getDisplayedColumnsLeftWidth();\n const scrollOnLeft = this.enableRtl && vScrollShowing;\n\n if (scrollOnLeft) {\n leftSpacing += scrollbarWidth;\n }\n\n this.view.setLeftSpacerFixedWidth(leftSpacing);\n this.view.includeLeftSpacerScrollerCss('ag-scroller-corner', leftSpacing <= scrollbarWidth);\n }\n\n private setScrollVisible(): void {\n const hScrollShowing = this.scrollVisibleService.isHorizontalScrollShowing();\n const invisibleScrollbar = this.invisibleScrollbar;\n const isSuppressHorizontalScroll = this.gridOptionsWrapper.isSuppressHorizontalScroll();\n const scrollbarWidth = hScrollShowing ? (this.gridOptionsWrapper.getScrollbarWidth() || 0) : 0;\n const adjustedScrollbarWidth = (scrollbarWidth === 0 && invisibleScrollbar) ? 15 : scrollbarWidth;\n const scrollContainerSize = !isSuppressHorizontalScroll ? adjustedScrollbarWidth : 0;\n\n this.view.addOrRemoveCssClass('ag-scrollbar-invisible', invisibleScrollbar);\n this.view.setHeight(scrollContainerSize);\n this.view.setViewportHeight(scrollContainerSize);\n this.view.setContainerHeight(scrollContainerSize);\n }\n\n public getViewport(): HTMLElement {\n return this.eViewport;\n }\n\n public getContainer(): HTMLElement {\n return this.eContainer;\n }\n}\n","import { Component } from \"../widgets/component\";\nimport { RefSelector } from \"../widgets/componentAnnotations\";\nimport { PostConstruct } from \"../context/context\";\nimport { FakeHScrollCtrl, IFakeHScrollComp } from \"./fakeHScrollCtrl\";\nimport { setFixedHeight, setFixedWidth } from \"../utils/dom\";\nimport { CenterWidthFeature } from \"./centerWidthFeature\";\n\nexport class FakeHScrollComp extends Component {\n\n private static TEMPLATE = /* html */\n `
\n
\n
\n
\n
\n
\n
`;\n\n // fake horizontal scroller\n @RefSelector('eLeftSpacer') private eLeftSpacer: HTMLElement;\n @RefSelector('eRightSpacer') private eRightSpacer: HTMLElement;\n @RefSelector('eViewport') private eViewport: HTMLElement;\n @RefSelector('eContainer') private eContainer: HTMLElement;\n\n constructor() {\n super(FakeHScrollComp.TEMPLATE);\n }\n\n @PostConstruct\n private postConstruct(): void {\n const compProxy: IFakeHScrollComp = {\n addOrRemoveCssClass: (cssClassName, on) => this.addOrRemoveCssClass(cssClassName, on),\n setHeight: height => setFixedHeight(this.getGui(), height),\n setContainerHeight: height => setFixedHeight(this.eContainer, height),\n setViewportHeight: height => setFixedHeight(this.eViewport, height),\n setRightSpacerFixedWidth: width => setFixedWidth(this.eRightSpacer, width),\n setLeftSpacerFixedWidth: width => setFixedWidth(this.eLeftSpacer, width),\n includeLeftSpacerScrollerCss: (cssClass: string, include: boolean) =>\n this.eLeftSpacer.classList.toggle(cssClass, include),\n includeRightSpacerScrollerCss: (cssClass: string, include: boolean) =>\n this.eRightSpacer.classList.toggle(cssClass, include),\n };\n const ctrl = this.createManagedBean(new FakeHScrollCtrl());\n ctrl.setComp(compProxy, this.getGui(), this.eViewport, this.eContainer);\n\n this.createManagedBean(new CenterWidthFeature(width => this.eContainer.style.width = `${width}px`));\n }\n\n}","import { BeanStub } from \"../context/beanStub\";\nimport { Autowired, Bean, PostConstruct } from \"../context/context\";\nimport { GridOptionsWrapper } from \"../gridOptionsWrapper\";\nimport { Events } from \"../eventKeys\";\nimport { ColumnModel } from \"../columns/columnModel\";\nimport { Constants } from \"../constants/constants\";\n\n@Bean('pinnedWidthService')\nexport class PinnedWidthService extends BeanStub {\n\n @Autowired('columnModel') private columnModel: ColumnModel;\n\n private leftWidth: number;\n private rightWidth: number;\n\n @PostConstruct\n private postConstruct(): void {\n const listener = this.checkContainerWidths.bind(this);\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, listener);\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, listener);\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_DOM_LAYOUT, listener);\n }\n\n private checkContainerWidths() {\n\n const printLayout = this.gridOptionsWrapper.getDomLayout() === Constants.DOM_LAYOUT_PRINT;\n\n const newLeftWidth = printLayout ? 0 : this.columnModel.getDisplayedColumnsLeftWidth();\n const newRightWidth = printLayout ? 0 : this.columnModel.getDisplayedColumnsRightWidth();\n\n if (newLeftWidth != this.leftWidth) {\n this.leftWidth = newLeftWidth;\n this.eventService.dispatchEvent({type: Events.EVENT_LEFT_PINNED_WIDTH_CHANGED});\n }\n\n if (newRightWidth != this.rightWidth) {\n this.rightWidth = newRightWidth;\n this.eventService.dispatchEvent({type: Events.EVENT_RIGHT_PINNED_WIDTH_CHANGED});\n }\n }\n\n public getPinnedRightWidth(): number {\n return this.rightWidth;\n }\n\n public getPinnedLeftWidth(): number {\n return this.leftWidth;\n }\n}","import { Constants } from \"../constants/constants\";\nimport { BeanStub } from \"../context/beanStub\";\nimport { Autowired, Bean, PostConstruct } from \"../context/context\";\nimport { RowGroupOpenedEvent } from \"../events\";\nimport { IClientSideRowModel } from \"../interfaces/iClientSideRowModel\";\nimport { IRowModel } from \"../interfaces/iRowModel\";\nimport { AnimationFrameService } from \"../misc/animationFrameService\";\n\n@Bean('rowNodeEventThrottle')\nexport class RowNodeEventThrottle extends BeanStub {\n\n @Autowired('animationFrameService') private animationFrameService: AnimationFrameService;\n @Autowired('rowModel') private rowModel: IRowModel;\n\n private clientSideRowModel: IClientSideRowModel;\n\n private events: RowGroupOpenedEvent[] = [];\n\n private dispatchExpandedDebounced: () => void;\n\n @PostConstruct\n private postConstruct(): void {\n if (this.rowModel.getType() == Constants.ROW_MODEL_TYPE_CLIENT_SIDE) {\n this.clientSideRowModel = this.rowModel as IClientSideRowModel;\n }\n }\n\n // because the user can call rowNode.setExpanded() many times in one VM turn,\n // we throttle the calls to ClientSideRowModel using animationFrameService. this means for 100\n // row nodes getting expanded, we only update the CSRM once, and then we fire all events after\n // CSRM has updated.\n //\n // if we did not do this, then the user could call setExpanded on 100+ rows, causing the grid\n // to re-render 100+ times, which would be a performance lag.\n //\n // we use animationFrameService\n // rather than _.debounce() so this will get done if anyone flushes the animationFrameService\n // (eg user calls api.ensureRowVisible(), which in turn flushes ).\n public dispatchExpanded(event: RowGroupOpenedEvent): void {\n\n // if not using CSRM, we don't debounce. otherwise this breaks the SSRM.\n if (this.clientSideRowModel == null) {\n this.eventService.dispatchEvent(event);\n return;\n }\n\n this.events.push(event);\n\n const func = () => {\n if (this.clientSideRowModel) {\n this.clientSideRowModel.onRowGroupOpened();\n }\n this.events.forEach(e => this.eventService.dispatchEvent(e));\n this.events = [];\n };\n\n if (this.dispatchExpandedDebounced == null) {\n this.dispatchExpandedDebounced = this.animationFrameService.debounce(func);\n }\n\n this.dispatchExpandedDebounced();\n }\n}","import { GridOptions } from \"./entities/gridOptions\";\nimport { GridOptionsWrapper } from \"./gridOptionsWrapper\";\nimport { SelectionService } from \"./selectionService\";\nimport { ColumnApi } from \"./columns/columnApi\";\nimport { ColumnModel } from \"./columns/columnModel\";\nimport { RowRenderer } from \"./rendering/rowRenderer\";\nimport { GridHeaderComp } from \"./headerRendering/gridHeaderComp\";\nimport { FilterManager } from \"./filter/filterManager\";\nimport { ValueService } from \"./valueService/valueService\";\nimport { EventService } from \"./eventService\";\nimport { GridBodyComp } from \"./gridBodyComp/gridBodyComp\";\nimport { GridApi } from \"./gridApi\";\nimport { ColumnFactory } from \"./columns/columnFactory\";\nimport { DisplayedGroupCreator } from \"./columns/displayedGroupCreator\";\nimport { ExpressionService } from \"./valueService/expressionService\";\nimport { TemplateService } from \"./templateService\";\nimport { PopupService } from \"./widgets/popupService\";\nimport { Logger, LoggerFactory } from \"./logger\";\nimport { ColumnUtils } from \"./columns/columnUtils\";\nimport { AutoWidthCalculator } from \"./rendering/autoWidthCalculator\";\nimport { HorizontalResizeService } from \"./headerRendering/common/horizontalResizeService\";\nimport { ComponentMeta, Context, ContextParams } from \"./context/context\";\nimport { GridComp } from \"./gridComp/gridComp\";\nimport { DragAndDropService } from \"./dragAndDrop/dragAndDropService\";\nimport { DragService } from \"./dragAndDrop/dragService\";\nimport { SortController } from \"./sortController\";\nimport { FocusService } from \"./focusService\";\nimport { MouseEventService } from \"./gridBodyComp/mouseEventService\";\nimport { CellNavigationService } from \"./cellNavigationService\";\nimport { Events, GridReadyEvent } from \"./events\";\nimport { ValueFormatterService } from \"./rendering/valueFormatterService\";\nimport { AgCheckbox } from \"./widgets/agCheckbox\";\nimport { AgRadioButton } from \"./widgets/agRadioButton\";\nimport { VanillaFrameworkOverrides } from \"./vanillaFrameworkOverrides\";\nimport { IFrameworkOverrides } from \"./interfaces/iFrameworkOverrides\";\nimport { ScrollVisibleService } from \"./gridBodyComp/scrollVisibleService\";\nimport { StylingService } from \"./styling/stylingService\";\nimport { ColumnHoverService } from \"./rendering/columnHoverService\";\nimport { ColumnAnimationService } from \"./rendering/columnAnimationService\";\nimport { AutoGroupColService } from \"./columns/autoGroupColService\";\nimport { PaginationProxy } from \"./pagination/paginationProxy\";\nimport { PaginationAutoPageSizeService } from \"./pagination/paginationAutoPageSizeService\";\nimport { IRowModel } from \"./interfaces/iRowModel\";\nimport { Constants } from \"./constants/constants\";\nimport { ValueCache } from \"./valueService/valueCache\";\nimport { ChangeDetectionService } from \"./valueService/changeDetectionService\";\nimport { AlignedGridsService } from \"./alignedGridsService\";\nimport { UserComponentFactory } from \"./components/framework/userComponentFactory\";\nimport { UserComponentRegistry } from \"./components/framework/userComponentRegistry\";\nimport { AgComponentUtils } from \"./components/framework/agComponentUtils\";\nimport { ComponentMetadataProvider } from \"./components/framework/componentMetadataProvider\";\nimport { Beans } from \"./rendering/beans\";\nimport { Environment } from \"./environment\";\nimport { AnimationFrameService } from \"./misc/animationFrameService\";\nimport { NavigationService } from \"./gridBodyComp/navigationService\";\nimport { RowContainerHeightService } from \"./rendering/rowContainerHeightService\";\nimport { SelectableService } from \"./rowNodes/selectableService\";\nimport { PaginationComp } from \"./pagination/paginationComp\";\nimport { ResizeObserverService } from \"./misc/resizeObserverService\";\nimport { OverlayWrapperComponent } from \"./rendering/overlays/overlayWrapperComponent\";\nimport { Module } from \"./interfaces/iModule\";\nimport { AgGroupComponent } from \"./widgets/agGroupComponent\";\nimport { AgDialog } from \"./widgets/agDialog\";\nimport { AgPanel } from \"./widgets/agPanel\";\nimport { AgInputTextField } from \"./widgets/agInputTextField\";\nimport { AgInputTextArea } from \"./widgets/agInputTextArea\";\nimport { AgSlider } from \"./widgets/agSlider\";\nimport { AgColorPicker } from \"./widgets/agColorPicker\";\nimport { AgInputNumberField } from \"./widgets/agInputNumberField\";\nimport { AgInputRange } from \"./widgets/agInputRange\";\nimport { AgSelect } from \"./widgets/agSelect\";\nimport { AgAngleSelect } from \"./widgets/agAngleSelect\";\nimport { AgToggleButton } from \"./widgets/agToggleButton\";\nimport { RowPositionUtils } from \"./entities/rowPosition\";\nimport { CellPositionUtils } from \"./entities/cellPosition\";\nimport { PinnedRowModel } from \"./pinnedRowModel/pinnedRowModel\";\nimport { ModuleRegistry } from \"./modules/moduleRegistry\";\nimport { ModuleNames } from \"./modules/moduleNames\";\nimport { UndoRedoService } from \"./undoRedo/undoRedoService\";\nimport { AgStackComponentsRegistry } from \"./components/agStackComponentsRegistry\";\nimport { HeaderPositionUtils } from \"./headerRendering/common/headerPosition\";\nimport { HeaderNavigationService } from \"./headerRendering/common/headerNavigationService\";\nimport { exists, missing } from \"./utils/generic\";\nimport { iterateObject } from \"./utils/object\";\nimport { ColumnDefFactory } from \"./columns/columnDefFactory\";\nimport { RowCssClassCalculator } from \"./rendering/row/rowCssClassCalculator\";\nimport { RowNodeBlockLoader } from \"./rowNodeCache/rowNodeBlockLoader\";\nimport { RowNodeSorter } from \"./rowNodes/rowNodeSorter\";\nimport { CtrlsService } from \"./ctrlsService\";\nimport { CtrlsFactory } from \"./ctrlsFactory\";\nimport { FakeHScrollComp } from \"./gridBodyComp/fakeHScrollComp\";\nimport { PinnedWidthService } from \"./gridBodyComp/pinnedWidthService\";\nimport { RowContainerComp } from \"./gridBodyComp/rowContainer/rowContainerComp\";\nimport { RowNodeEventThrottle } from \"./entities/rowNodeEventThrottle\";\nimport { StandardMenuFactory } from \"./headerRendering/cells/column/standardMenu\";\n\nexport interface GridParams {\n // used by Web Components\n globalEventListener?: Function;\n\n\n // this allows the base frameworks (React, Angular, etc) to provide alternative cellRenderers and cellEditors\n frameworkOverrides?: IFrameworkOverrides;\n\n // bean instances to add to the context\n providedBeanInstances?: { [key: string]: any; };\n\n modules?: Module[];\n}\n\n// creates JavaScript vanilla Grid, including JavaScript (ag-stack) components, which can\n// be wrapped by the framework wrappers\nexport class Grid {\n\n protected logger: Logger;\n\n private readonly gridOptions: GridOptions;\n\n constructor(eGridDiv: HTMLElement, gridOptions: GridOptions, params?: GridParams) {\n\n if (!gridOptions) {\n console.error('AG Grid: no gridOptions provided to the grid');\n return;\n }\n\n this.gridOptions = gridOptions;\n\n new GridCoreCreator().create(eGridDiv, gridOptions, context => {\n const gridComp = new GridComp(eGridDiv);\n context.createBean(gridComp);\n }, undefined, params);\n }\n\n public destroy(): void {\n if (this.gridOptions && this.gridOptions.api) {\n this.gridOptions.api.destroy();\n }\n }\n}\n\n// created services of grid only, no UI, so frameworks can use this if providing\n// their own UI\nexport class GridCoreCreator {\n\n public create(eGridDiv: HTMLElement, gridOptions: GridOptions, createUi: (context: Context) => void, acceptChanges?: (context: Context)=>void, params?: GridParams): void {\n\n const debug = !!gridOptions.debug;\n\n const registeredModules = this.getRegisteredModules(params);\n\n const beanClasses = this.createBeansList(gridOptions.rowModelType, registeredModules);\n const providedBeanInstances = this.createProvidedBeans(eGridDiv, gridOptions, params);\n\n if (!beanClasses) { return; } // happens when no row model found\n\n const contextParams: ContextParams = {\n providedBeanInstances: providedBeanInstances,\n beanClasses: beanClasses,\n debug: debug\n };\n\n const logger = new Logger('AG Grid', () => gridOptions.debug);\n const contextLogger = new Logger('Context', () => contextParams.debug);\n const context = new Context(contextParams, contextLogger);\n const beans = context.getBean('beans') as Beans;\n\n this.registerModuleUserComponents(beans, registeredModules);\n this.registerStackComponents(beans, registeredModules);\n this.registerControllers(beans, registeredModules);\n\n createUi(context);\n\n // we wait until the UI has finished initialising before setting in columns and rows\n beans.ctrlsService.whenReady(() => {\n this.setColumnsAndData(beans);\n this.dispatchGridReadyEvent(beans, gridOptions);\n const isEnterprise = ModuleRegistry.isRegistered(ModuleNames.EnterpriseCoreModule);\n logger.log(`initialised successfully, enterprise = ${isEnterprise}`);\n });\n\n if (acceptChanges) { acceptChanges(context); }\n }\n\n private registerControllers(beans: Beans, registeredModules: Module[]): void {\n registeredModules.forEach(module => {\n if (module.controllers) {\n module.controllers.forEach(meta => beans.ctrlsFactory.register(meta));\n }\n });\n }\n\n private registerStackComponents(beans: Beans, registeredModules: Module[]): void {\n const agStackComponents = this.createAgStackComponentsList(registeredModules);\n beans.agStackComponentsRegistry.setupComponents(agStackComponents);\n }\n\n private getRegisteredModules(params?: GridParams): Module[] {\n const passedViaConstructor: Module[] | undefined | null = params ? params.modules : null;\n const registered = ModuleRegistry.getRegisteredModules();\n\n const allModules: Module[] = [];\n const mapNames: { [name: string]: boolean; } = {};\n\n // adds to list and removes duplicates\n function addModule(moduleBased: boolean, mod: Module) {\n function addIndividualModule(currentModule: Module) {\n if (!mapNames[currentModule.moduleName]) {\n mapNames[currentModule.moduleName] = true;\n allModules.push(currentModule);\n ModuleRegistry.register(currentModule, moduleBased);\n }\n }\n\n addIndividualModule(mod);\n if (mod.dependantModules) {\n mod.dependantModules.forEach(addModule.bind(null, moduleBased));\n }\n }\n\n if (passedViaConstructor) {\n passedViaConstructor.forEach(addModule.bind(null, true));\n }\n\n if (registered) {\n registered.forEach(addModule.bind(null, !ModuleRegistry.isPackageBased()));\n }\n\n return allModules;\n }\n\n private registerModuleUserComponents(beans: Beans, registeredModules: Module[]): void {\n const moduleUserComps: { componentName: string, componentClass: any; }[]\n = this.extractModuleEntity(registeredModules,\n (module) => module.userComponents ? module.userComponents : []);\n\n moduleUserComps.forEach(compMeta => {\n beans.userComponentRegistry.registerDefaultComponent(compMeta.componentName, compMeta.componentClass);\n });\n }\n\n private createProvidedBeans(eGridDiv: HTMLElement, gridOptions: GridOptions, params?: GridParams): any {\n let frameworkOverrides = params ? params.frameworkOverrides : null;\n if (missing(frameworkOverrides)) {\n frameworkOverrides = new VanillaFrameworkOverrides();\n }\n\n const seed = {\n gridOptions: gridOptions,\n eGridDiv: eGridDiv,\n globalEventListener: params ? params.globalEventListener : null,\n frameworkOverrides: frameworkOverrides\n };\n if (params && params.providedBeanInstances) {\n Object.assign(seed, params.providedBeanInstances);\n }\n\n return seed;\n }\n\n private createAgStackComponentsList(registeredModules: Module[]): any[] {\n let components: ComponentMeta[] = [\n { componentName: 'AgCheckbox', componentClass: AgCheckbox },\n { componentName: 'AgRadioButton', componentClass: AgRadioButton },\n { componentName: 'AgToggleButton', componentClass: AgToggleButton },\n { componentName: 'AgInputTextField', componentClass: AgInputTextField },\n { componentName: 'AgInputTextArea', componentClass: AgInputTextArea },\n { componentName: 'AgInputNumberField', componentClass: AgInputNumberField },\n { componentName: 'AgInputRange', componentClass: AgInputRange },\n { componentName: 'AgSelect', componentClass: AgSelect },\n { componentName: 'AgSlider', componentClass: AgSlider },\n { componentName: 'AgAngleSelect', componentClass: AgAngleSelect },\n { componentName: 'AgColorPicker', componentClass: AgColorPicker },\n { componentName: 'AgGridBody', componentClass: GridBodyComp },\n { componentName: 'AgHeaderRoot', componentClass: GridHeaderComp },\n { componentName: 'AgPagination', componentClass: PaginationComp },\n { componentName: 'AgOverlayWrapper', componentClass: OverlayWrapperComponent },\n { componentName: 'AgGroupComponent', componentClass: AgGroupComponent },\n { componentName: 'AgPanel', componentClass: AgPanel },\n { componentName: 'AgDialog', componentClass: AgDialog },\n { componentName: 'AgRowContainer', componentClass: RowContainerComp },\n { componentName: 'AgFakeHorizontalScroll', componentClass: FakeHScrollComp }\n ];\n\n const moduleAgStackComps = this.extractModuleEntity(registeredModules,\n (module) => module.agStackComponents ? module.agStackComponents : []);\n\n components = components.concat(moduleAgStackComps);\n\n return components;\n }\n\n private createBeansList(rowModelType: string | undefined, registeredModules: Module[]): any[] | undefined {\n const rowModelClass = this.getRowModelClass(rowModelType, registeredModules);\n\n if (!rowModelClass) { return; }\n\n // beans should only contain SERVICES, it should NEVER contain COMPONENTS\n\n const beans = [\n rowModelClass, Beans, RowPositionUtils, CellPositionUtils, HeaderPositionUtils,\n PaginationAutoPageSizeService, GridApi, UserComponentRegistry, AgComponentUtils,\n ComponentMetadataProvider, ResizeObserverService, UserComponentFactory,\n RowContainerHeightService, HorizontalResizeService,\n PinnedRowModel, DragService, DisplayedGroupCreator, EventService, GridOptionsWrapper,\n PopupService, SelectionService, FilterManager, ColumnModel, HeaderNavigationService,\n PaginationProxy, RowRenderer, ExpressionService, ColumnFactory, TemplateService,\n AlignedGridsService, NavigationService, ValueCache, ValueService, LoggerFactory,\n ColumnUtils, AutoWidthCalculator, StandardMenuFactory, DragAndDropService, ColumnApi,\n FocusService, MouseEventService, Environment, CellNavigationService, ValueFormatterService,\n StylingService, ScrollVisibleService, SortController, ColumnHoverService, ColumnAnimationService,\n SelectableService, AutoGroupColService, ChangeDetectionService, AnimationFrameService,\n UndoRedoService, AgStackComponentsRegistry, ColumnDefFactory,\n RowCssClassCalculator, RowNodeBlockLoader, RowNodeSorter, CtrlsService,\n PinnedWidthService, RowNodeEventThrottle, CtrlsFactory\n ];\n\n const moduleBeans = this.extractModuleEntity(registeredModules, (module) => module.beans ? module.beans : []);\n beans.push(...moduleBeans);\n\n // check for duplicates, as different modules could include the same beans that\n // they depend on, eg ClientSideRowModel in enterprise, and ClientSideRowModel in community\n const beansNoDuplicates: any[] = [];\n beans.forEach(bean => {\n if (beansNoDuplicates.indexOf(bean) < 0) {\n beansNoDuplicates.push(bean);\n }\n });\n\n return beansNoDuplicates;\n }\n\n private extractModuleEntity(moduleEntities: any[], extractor: (module: any) => any) {\n return [].concat(...moduleEntities.map(extractor));\n }\n\n private setColumnsAndData(beans: Beans): void {\n const columnDefs = beans.gridOptionsWrapper.getColumnDefs();\n beans.columnModel.setColumnDefs(columnDefs || [], \"gridInitializing\");\n beans.rowModel.start();\n }\n\n private dispatchGridReadyEvent(beans: Beans, gridOptions: GridOptions): void {\n const readyEvent: GridReadyEvent = {\n type: Events.EVENT_GRID_READY,\n api: gridOptions.api!,\n columnApi: gridOptions.columnApi!\n };\n beans.eventService.dispatchEvent(readyEvent);\n }\n\n private getRowModelClass(rowModelType: string | undefined, registeredModules: Module[]): any {\n\n // default to client side\n if (!rowModelType) {\n rowModelType = Constants.ROW_MODEL_TYPE_CLIENT_SIDE;\n }\n\n const rowModelClasses: { [name: string]: { new(): IRowModel; }; } = {};\n registeredModules.forEach(module => {\n iterateObject(module.rowModels, (key: string, value: { new(): IRowModel; }) => {\n rowModelClasses[key] = value;\n });\n });\n\n const rowModelClass = rowModelClasses[rowModelType];\n\n if (exists(rowModelClass)) { return rowModelClass; }\n\n\n\n if (ModuleRegistry.isPackageBased()) {\n if ([Constants.ROW_MODEL_TYPE_VIEWPORT, Constants.ROW_MODEL_TYPE_SERVER_SIDE].includes(rowModelType))\n // If package based only the enterprise row models could be missing.\n console.error(`AG Grid: Row Model \"${rowModelType}\" not found. Please ensure the package 'ag-grid-enterprise' is imported. Please see: https://www.ag-grid.com/javascript-grid/packages/`);\n else {\n console.error('AG Grid: could not find row model for rowModelType ' + rowModelType);\n }\n } else {\n if (rowModelType === Constants.ROW_MODEL_TYPE_INFINITE) {\n console.error(`AG Grid: Row Model \"Infinite\" not found. Please ensure the ${ModuleNames.InfiniteRowModelModule} module is registered. Please see: https://www.ag-grid.com/javascript-grid/modules/`);\n } else if (rowModelType === Constants.ROW_MODEL_TYPE_VIEWPORT) {\n console.error(`AG Grid: Row Model \"Viewport\" not found. Please ensure the AG Grid Enterprise Module ${ModuleNames.ViewportRowModelModule} module is registered. Please see: https://www.ag-grid.com/javascript-grid/modules/`);\n } else if (rowModelType === Constants.ROW_MODEL_TYPE_SERVER_SIDE) {\n console.error(`AG Grid: Row Model \"Server Side\" not found. Please ensure the AG Grid Enterprise Module ${ModuleNames.ServerSideRowModelModule} module is registered. Please see: https://www.ag-grid.com/javascript-grid/modules/`);\n } else if (rowModelType === Constants.ROW_MODEL_TYPE_CLIENT_SIDE) {\n console.error(`AG Grid: Row Model \"Client Side\" not found. Please ensure the ${ModuleNames.ClientSideRowModelModule} module is registered. Please see: https://www.ag-grid.com/javascript-grid/modules/`);\n } else {\n console.error('AG Grid: could not find row model for rowModelType ' + rowModelType);\n }\n }\n\n }\n\n}\n","import { RowNode } from \"./entities/rowNode\";\nimport { exists, defaultComparator } from \"./utils/generic\";\n\nexport function defaultGroupComparator(valueA: any, valueB: any, nodeA: RowNode, nodeB: RowNode, accentedCompare: boolean = false): number {\n console.warn('AG Grid: Since ag-grid 11.0.0 defaultGroupComparator is not necessary. You can remove this from your colDef');\n const nodeAIsGroup = exists(nodeA) && nodeA.group;\n const nodeBIsGroup = exists(nodeB) && nodeB.group;\n\n const bothAreGroups = nodeAIsGroup && nodeBIsGroup;\n const bothAreNormal = !nodeAIsGroup && !nodeBIsGroup;\n\n if (bothAreGroups) {\n return defaultComparator(nodeA.key, nodeB.key, accentedCompare);\n }\n\n if (bothAreNormal) {\n return defaultComparator(valueA, valueB, accentedCompare);\n }\n\n if (nodeAIsGroup) {\n return 1;\n }\n\n return -1;\n}\n","import { IComponent } from \"../../interfaces/iComponent\";\nimport { ComponentType } from \"./componentTypes\";\n\n/**\n * B the business interface (ie IHeader)\n * A the agGridComponent interface (ie IHeaderComp). The final object acceptable by ag-grid\n */\nexport interface FrameworkComponentWrapper {\n wrap
>(frameworkComponent: { new(): any } | null,\n methodList: string[],\n optionalMethodList: string[],\n componentType: ComponentType\n ): A;\n}\n\nexport interface WrappableInterface {\n hasMethod(name: string): boolean;\n\n callMethod(name: string, args: IArguments): void;\n\n addMethod(name: string, callback: Function): void;\n}\n\nexport abstract class BaseComponentWrapper implements FrameworkComponentWrapper {\n public wrap>(OriginalConstructor: { new(): any },\n mandatoryMethodList: string[],\n optionalMethodList: string[] = [],\n componentType: ComponentType): A {\n const wrapper: F = this.createWrapper(OriginalConstructor, componentType);\n\n mandatoryMethodList.forEach((methodName => {\n this.createMethod(wrapper, methodName, true);\n }));\n\n optionalMethodList.forEach((methodName => {\n this.createMethod(wrapper, methodName, false);\n }));\n\n return wrapper as any as A;\n\n }\n\n public unwrap(comp: any): any {\n return comp;\n }\n\n abstract createWrapper(OriginalConstructor: { new(): any }, componentType: ComponentType): F;\n\n private createMethod(wrapper: F, methodName: string, mandatory: boolean): void {\n wrapper.addMethod(methodName, this.createMethodProxy(wrapper, methodName, mandatory));\n }\n\n protected createMethodProxy(wrapper: F, methodName: string, mandatory: boolean): Function {\n return function() {\n if (wrapper.hasMethod(methodName)) {\n return wrapper.callMethod(methodName, arguments);\n }\n\n if (mandatory) {\n console.warn('AG Grid: Framework component is missing the method ' + methodName + '()');\n }\n return null;\n };\n }\n}\n","import { ICellRendererParams } from \"../rendering/cellRenderers/iCellRenderer\";\n\nexport interface ISparklineCellRendererParams extends ICellRendererParams {\n sparklineOptions?: SparklineOptions;\n}\n\nexport type SparklineOptions = LineSparklineOptions | AreaSparklineOptions | ColumnSparklineOptions | BarSparklineOptions;\n\nexport interface BaseSparklineOptions {\n /** The key to use to retrieve X values from the data. This will only be used if the data array contains objects with key-value pairs.\n * Default: `'x'`\n */\n xKey?: string;\n /** The key to use to retrieve Y values from the data. This will only be used if the data array contains objects with key-value pairs.\n * Default: `'y'`\n */\n yKey?: string;\n /** Configuration for the padding in pixels shown around the sparklines. */\n padding?: PaddingOptions;\n /** The options for the x-axis in the sparklines. */\n axis?: SparklineAxisOptions;\n /** The configuration for the highlighting used when the items are hovered over. */\n highlightStyle?: HighlightStyleOptions;\n /** Configuration for the tooltips. */\n tooltip?: SparklineTooltipOptions;\n}\n\nexport interface LineSparklineOptions extends BaseSparklineOptions {\n /** The type of sparklines to create, in this case it would be `'line'`. */\n type?: 'line';\n /** The configuration for the line. */\n line?: SparklineLineOptions;\n /** The configuration for the marker styles. */\n marker?: SparklineMarkerOptions;\n /** The configuration for the crosshairs. */\n crosshairs?: SparklineCrosshairsOptions;\n}\n\nexport interface AreaSparklineOptions extends BaseSparklineOptions {\n /** The type of sparklines to create, in this case it would be `'area'`. */\n type?: 'area';\n /** The CSS colour value for the fill of the area.\n * Default: `'rgba(124, 181, 236, 0.25)'`\n */\n fill?: string;\n /** The configuration for the line. */\n line?: SparklineLineOptions;\n /** The configuration for the marker styles. */\n marker?: SparklineMarkerOptions;\n /** The configuration for the crosshairs. */\n crosshairs?: SparklineCrosshairsOptions;\n}\n\nexport interface ColumnSparklineOptions extends BaseSparklineOptions {\n /** The type of sparklines to create, in this case it would be `'column'`. */\n type?: 'column';\n /** The CSS colour value for the fill of the columns.\n * Default: `'rgb(124, 181, 236)'`\n */\n fill?: string;\n /** The CSS colour value for the outline of the columns.\n * Default: `'silver'`\n */\n stroke?: string;\n /** The thickness in pixels for the stroke of the columns.\n * Default: `0`\n */\n strokeWidth?: number;\n /** The size of the gap between the columns as a proportion, between 0 and 1. This value is a fraction of the “step”, which is the interval between the start of a band and the start of the next band.\n * Default: `0.1`\n */\n paddingInner?: number;\n /** The padding on the outside i.e. left and right of the first and last columns, to leave some room for the axis. In association with `paddingInner`, this value can be between 0 and 1.\n * Default: `0.2`\n */\n paddingOuter?: number;\n /** User override for the automatically determined domain (based on data min and max values). Only applied to `number` axes.\n * Used to interpolate the numeric pixel values corresponding to each data value.\n */\n valueAxisDomain?: [number, number];\n /** A callback function to return format styles of type ColumnFormat, based on the data represented by individual columns. */\n formatter?: SparklineColumnFormatter;\n /** Configuration for the labels. */\n label?: SparklineLabelOptions;\n}\n\nexport interface BarSparklineOptions extends BaseSparklineOptions {\n /** The type of sparklines to create, in this case it would be `'bar'`. */\n type?: 'bar';\n /** The CSS colour value for the fill of the bars.\n * Default: `'rgb(124, 181, 236)'`\n */\n fill?: string;\n /** The CSS colour value for the outline of the bars.\n * Default `'silver'`\n */\n stroke?: string;\n /** The thickness in pixels for the stroke of the bars.\n * Default: `0`\n */\n strokeWidth?: number;\n /** The size of the gap between the bars as a proportion, between 0 and 1. This value is a fraction of the “step”, which is the interval between the start of a band and the start of the next band.\n * Default: `0.1`\n */\n paddingInner?: number;\n /** The padding on the outside i.e. left and right of the first and last bars, to leave some room for the axis. In association with `paddingInner`, this value can be between 0 and 1.\n * Default: `0.2`\n */\n paddingOuter?: number;\n /** User override for the automatically determined domain (based on data min and max values). Only applied to `number` axes.\n * Used to interpolate the numeric pixel values corresponding to each data value.\n */\n valueAxisDomain?: [number, number];\n /** A callback function to return format styles of type BarFormat, based on the data represented by individual bars. */\n formatter?: SparklineBarFormatter;\n /** Configuration for the labels. */\n label?: SparklineLabelOptions;\n}\n\nexport interface SparklineLabelOptions {\n /** Set to true to enable labels. */\n enabled?: boolean;\n /** Set size of the font. */\n fontSize?: number;\n /** Specify the font for the label text. */\n fontFamily?: string;\n /** Specify the font style for the label text. */\n fontStyle?: 'normal' | 'italic' | 'oblique';\n /** Set how thick or thin characters in label text should be displayed. */\n fontWeight?: 'normal' | 'bold' | 'bolder' | 'lighter' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';\n /** Set the color of the label text. The color can be specified by a color name, a HEX or an RGB value. */\n color?: string;\n /** A callback function to return the text to be displayed as the label, based on the value represented by the column or bar. By default the values are simply stringified. */\n formatter?: (params: LabelFormatterParams) => string;\n /** Where to render labels relative to the segments.\n * Default: `insideEnd`\n * */\n placement?: BarColumnLabelPlacement;\n}\n\nexport interface LabelFormatterParams {\n /** The Y value of the data point. */\n value: number | undefined;\n}\n\nexport enum BarColumnLabelPlacement {\n InsideBase = 'insideBase',\n InsideEnd = 'insideEnd',\n Center = 'center',\n OutsideEnd = 'outsideEnd',\n}\n\nexport interface PaddingOptions {\n /** The number of pixels of padding at the top of the sparkline area.\n * Default: `3`\n */\n top?: number;\n /** The number of pixels of padding at the right of the sparkline area.\n * Default: `3`\n */\n right?: number;\n /** The number of pixels of padding at the bottom of the sparkline area.\n * Default: `3`\n */\n bottom?: number;\n /** The number of pixels of padding at the left of the sparkline area.\n * Default: `3`\n */\n left?: number;\n}\n\nexport interface SparklineAxisOptions {\n /** The type of x-axis used to plot the data.\n * Default: `'category'`\n */\n type?: AxisType;\n /** The CSS colour value for the outline of the horizontal axis line.\n * Default: `'rgb(204, 214, 235)'`\n */\n stroke?: string;\n /** The thickness in pixels for the stroke of the horizontal axis line.\n * Default: `1`\n */\n strokeWidth?: number;\n}\n\nexport type AxisType = 'number' | 'category' | 'time';\n\nexport interface SparklineTooltipOptions {\n /** Set to false to disable tooltips. */\n enabled?: boolean;\n /** The element to place the tooltip into. This can be used to confine the tooltip to a specific area which may be outside of the sparkline grid cell. */\n container?: HTMLElement;\n /** The horizontal distance in pixels between the cursor and the top left corner of the tooltip.\n * Default: `10`\n */\n xOffset?: number;\n /** The vertical distance in pixels between the cursor and the top left corner of the tooltip.\n * Default: `0`\n */\n yOffset?: number;\n /** A callback function used to create the content for the tooltips. This function should return an object or a HTML string used to render the tooltip. */\n renderer?: SparklineTooltipRenderer;\n}\n\nexport type SparklineTooltipRenderer = (params: TooltipRendererParams) => TooltipRendererResult;\nexport interface TooltipRendererResult {\n /** Set to false to disable individual tooltip. */\n enabled?: boolean;\n /** The content to display in each tooltip. */\n content?: string;\n /** The title of the tooltip. */\n title?: string;\n /** The CSS color for the title text. */\n color?: string;\n /** The CSS color for the background of the tooltip title. */\n backgroundColor?: string;\n /** The opacity of the background for the tooltip title. */\n opacity?: number;\n}\nexport interface TooltipRendererParams {\n /** The grid context, includes row data, giving access to data from other columns in the same row. */\n context?: any;\n /** The raw datum associated with the point. */\n datum: any;\n /** The X value of the data point. */\n xValue: any;\n /** The Y value of the data point. */\n yValue: any;\n}\n\nexport interface SparklineLineOptions {\n /** The CSS colour value for the line.\n * Default: `'rgb(124, 181, 236)'`\n */\n stroke?: string;\n /** The thickness in pixels for the stroke of the line.\n * Default: `1`\n */\n strokeWidth?: number;\n}\n\nexport interface HighlightStyleOptions {\n /** The width in pixels of the markers when hovered over. This is only for the Line and Area sparklines as Column and Bar sparklines do not have markers.\n * Default: `6`\n */\n size?: number;\n /** The fill colour of the markers, columns or bars when hovered over. Use `undefined` for no highlight fill.\n * Default: `'yellow'`\n */\n fill?: string;\n /** The CSS colour value for the outline of the markers, columns or bars when hovered over. Use `undefined` for no highlight stroke.\n * Default: `'silver'`\n */\n stroke?: string;\n /** The thickness in pixels for the stroke of the markers, columns or bars when hovered over.\n * Default: `1`\n */\n strokeWidth?: number;\n}\nexport interface SparklineCrosshairsOptions {\n xLine?: CrosshairLineOptions;\n yLine?: CrosshairLineOptions;\n}\nexport interface CrosshairLineOptions {\n /** Set to true to show crosshair line.\n * Default: false\n */\n enabled?: boolean;\n /** The CSS colour value for the crosshair line.\n * Default: `rgba(0,0,0, 0.54)`\n */\n stroke?: string;\n /** The thickness in pixels for the crosshair line.\n * Default: 1\n */\n strokeWidth?: number;\n /**\n * Defines how the crosshair stroke is rendered. This can be one of the lineDash style options.\n * The default is `solid`, this renders a solid stroke with no gaps.\n */\n lineDash?: 'dash' | 'dashDot' | 'dashDotDot' | 'dot' | 'longDash' | 'longDashDot' | 'longDashDotDot' | 'shortDash' | 'shortDashDot' | 'shortDashDotDot' | 'shortDot' | 'solid';\n /**\n * The shape used to draw the end points of the crosshair line.\n * The options include `butt` (the ends of the line are squared off at the endpoints), `round` (the ends of the line are rounded) and `square` (the ends of the line are squared off by adding a box with width equal to the line's strokeWidth and height equal to half the line's strokeWidth).\n * Default: `butt`\n */\n lineCap?: 'round' | 'square' | 'butt';\n}\n\nexport type SparklineColumnFormatter = (params: ColumnFormatterParams) => ColumnFormat;\nexport type SparklineBarFormatter = (params: BarFormatterParams) => BarFormat;\nexport interface ColumnFormatterParams {\n /** The raw data associated with the specific column. */\n datum: any;\n /** The X value of the data point. */\n xValue: any;\n /** The Y value of the data point. */\n yValue: any;\n /** The width of the column in pixels. */\n width: number;\n /** The height of the column in pixels. */\n height: number;\n /** Whether or not the column is a minimum point. */\n min?: boolean;\n /** Whether or not the column is a maximum point. */\n max?: boolean;\n /** Whether or not the column represents the first data point. */\n first?: boolean;\n /** Whether or not the column represents the last data point. */\n last?: boolean;\n /** The CSS colour value for the fill of the individual column. */\n fill?: string;\n /** The CSS colour value for the outline of the individual column. */\n stroke?: string;\n /** The thickness in pixels for the stroke of the individual column. */\n strokeWidth: number;\n /** Whether or not the column is highlighted. */\n highlighted: boolean;\n}\n\nexport interface ColumnFormat {\n /** The CSS colour value for the fill of the individual column. */\n fill?: string;\n /** The CSS colour value for the outline of the individual column. */\n stroke?: string;\n /** The thickness in pixels for the stroke of the individual column.*/\n strokeWidth?: number;\n}\n\nexport interface BarFormatterParams {\n /** The raw data associated with the specific bar. */\n datum: any;\n /** The X value of the data point. */\n xValue: any;\n /** The Y value of the data point. */\n yValue: any;\n /** The width of the bar in pixels. */\n width: number;\n /** The height of the bar in pixels. */\n height: number;\n /** Whether or not the bar is a minimum point. */\n min?: boolean;\n /** Whether or not the bar is a maximum point. */\n max?: boolean;\n /** Whether or not the bar represents the first data point. */\n first?: boolean;\n /** Whether or not the bar represents the last data point. */\n last?: boolean;\n /** The CSS colour value for the fill of the individual bar. */\n fill?: string;\n /** The CSS colour value for the outline of the individual bar. */\n stroke?: string;\n /** The thickness in pixels for the stroke of the individual bar. */\n strokeWidth: number;\n /** Whether or not the bar is highlighted. */\n highlighted: boolean;\n}\nexport interface BarFormat {\n /** The CSS colour value for the fill of the individual bar. */\n fill?: string;\n /** The CSS colour value for the outline of the individual bar. */\n stroke?: string;\n /** The thickness in pixels for the stroke of the individual bar.*/\n strokeWidth?: number;\n}\n\nexport interface SparklineMarkerOptions {\n /** By default this is set to `true` whilst marker size is set to `0`, which means the markers are present but not visible.\n * Default: `true`\n */\n enabled?: boolean;\n /** The shape of the markers.\n * Default: `'circle'`\n */\n shape?: string;\n /** The width in pixels of markers. By default this is `0`, increase the size to make markers visible.\n * Default: `0`\n */\n size?: number;\n /** The CSS colour value for the fill of the markers.\n * Default: `'rgb(124, 181, 236)'`\n */\n fill?: string;\n /** The CSS colour value for the outline of the markers.\n * Default: `'rgb(124, 181, 236)'`\n */\n stroke?: string;\n /** The thickness in pixels for the stroke of the markers.\n * Default: `1`\n */\n strokeWidth?: number;\n /** A callback function to return format styles for individual markers. */\n formatter?: SparklineMarkerFormatter;\n}\n\nexport type SparklineMarkerFormatter = (params: MarkerFormatterParams) => MarkerFormat;\nexport interface MarkerFormatterParams {\n /** The raw data associated with the specific marker. */\n datum: any;\n /** The X value of the data point. */\n xValue: any;\n /** The Y value of the data point. */\n yValue: any;\n /** Whether or not the marker is a minimum point. */\n min?: boolean;\n /** Whether or not the marker is a maximum point. */\n max?: boolean;\n /** Whether or not the marker represents the first data point. */\n first?: boolean;\n /** Whether or not the marker represents the last data point. */\n last?: boolean;\n /** The CSS colour value for the fill of the individual marker. */\n fill?: string;\n /** The CSS colour value for the outline of the individual marker. */\n stroke?: string;\n /** The thickness in pixels for the stroke of the individual marker. */\n strokeWidth: number;\n /** The width in pixels of the individual marker. */\n size: number;\n /** Whether or not the marker is highlighted. */\n highlighted: boolean;\n}\n\nexport interface MarkerFormat {\n /** Set to false to make marker invisible. */\n enabled?: boolean;\n /** The width in pixels of the individual marker. */\n size?: number;\n /** The CSS colour value for the fill of the individual marker. */\n fill?: string;\n /** The CSS colour value for the outline of the individual marker. */\n stroke?: string;\n /** The thickness in pixels for the stroke of the individual marker.*/\n strokeWidth?: number;\n}","// to satisfy server side compilation\ndeclare let global: any;\nconst globalObj = typeof global === 'undefined' ? {} : global;\nglobalObj.HTMLElement = typeof HTMLElement === 'undefined' ? {} : HTMLElement;\nglobalObj.HTMLButtonElement = typeof HTMLButtonElement === 'undefined' ? {} : HTMLButtonElement;\nglobalObj.HTMLSelectElement = typeof HTMLSelectElement === 'undefined' ? {} : HTMLSelectElement;\nglobalObj.HTMLInputElement = typeof HTMLInputElement === 'undefined' ? {} : HTMLInputElement;\nglobalObj.Node = typeof Node === 'undefined' ? {} : Node;\nglobalObj.MouseEvent = typeof MouseEvent === 'undefined' ? {} : MouseEvent;\n\n// columns\nexport { ColumnFactory } from \"./columns/columnFactory\";\nexport { ColumnModel, ColumnState, ColumnStateParams, ApplyColumnStateParams } from \"./columns/columnModel\";\nexport { ColumnKeyCreator } from \"./columns/columnKeyCreator\";\nexport { ColumnUtils } from \"./columns/columnUtils\";\nexport { DisplayedGroupCreator } from \"./columns/displayedGroupCreator\";\nexport { GroupInstanceIdCreator } from \"./columns/groupInstanceIdCreator\";\n\n// components\nexport { ComponentUtil } from \"./components/componentUtil\";\nexport { AgStackComponentsRegistry } from \"./components/agStackComponentsRegistry\";\n\nexport { ColDefUtil } from \"./components/colDefUtil\";\nexport { UserComponentRegistry } from \"./components/framework/userComponentRegistry\";\nexport { UserComponentFactory, UserCompDetails } from \"./components/framework/userComponentFactory\";\nexport { ComponentType } from \"./components/framework/componentTypes\";\n\n// context\nexport { BeanStub } from \"./context/beanStub\";\nexport {\n Context,\n ComponentMeta,\n Autowired,\n PostConstruct,\n PreConstruct,\n Optional,\n Bean,\n Qualifier,\n PreDestroy\n} from \"./context/context\";\nexport { QuerySelector, RefSelector } from \"./widgets/componentAnnotations\";\n\n// excel\nexport {\n ColumnWidthCallbackParams,\n RowHeightCallbackParams,\n IExcelCreator,\n ExcelAlignment,\n ExcelBorder,\n ExcelBorders,\n ExcelCell,\n ExcelColumn,\n ExcelContentType,\n ExcelData,\n ExcelDataType,\n ExcelExportParams,\n ExcelHeaderFooterConfig,\n ExcelHeaderFooter,\n ExcelHeaderFooterContent,\n ExcelImage,\n ExcelSheetMargin,\n ExcelExportMultipleSheetParams,\n ExcelSheetPageSetup,\n ExcelFont,\n ExcelInterior,\n ExcelNumberFormat,\n ExcelOOXMLDataType,\n ExcelOOXMLTemplate,\n ExcelProtection,\n ExcelRelationship,\n ExcelFactoryMode,\n ExcelRow,\n ExcelStyle,\n ExcelTable,\n ExcelXMLTemplate,\n ExcelWorksheet\n} from \"./interfaces/iExcelCreator\";\n\n// dragAndDrop\nexport {\n DragAndDropService,\n DragSourceType,\n HorizontalDirection,\n VerticalDirection,\n DropTarget,\n DragSource,\n DraggingEvent\n} from \"./dragAndDrop/dragAndDropService\";\nexport { RowDropZoneParams } from \"./gridBodyComp/rowDragFeature\";\nexport { DragService } from \"./dragAndDrop/dragService\";\nexport { IRowDragItem } from \"./rendering/row/rowDragComp\";\n\n// entities\nexport { Column } from \"./entities/column\";\nexport { ColumnGroup } from \"./entities/columnGroup\";\nexport { ProvidedColumnGroup } from \"./entities/providedColumnGroup\";\nexport { RowNode, RowHighlightPosition } from \"./entities/rowNode\";\nexport { SideBarDef, ToolPanelDef } from \"./entities/sideBar\";\n\n// filter\nexport { IFilterDef, IFilterParams, IFilterOptionDef, IDoesFilterPassParams, ProvidedFilterModel, IFilter, IFilterComp, IFilterType, IFloatingFilterType } from \"./interfaces/iFilter\";\nexport { ISetFilter, SetFilterModel, ISetFilterParams, SetFilterValues, SetFilterModelValue, SetFilterValuesFunc, SetFilterValuesFuncParams } from \"./interfaces/iSetFilter\";\nexport { FilterManager, FilterWrapper, FilterRequestSource } from \"./filter/filterManager\";\nexport { IMultiFilter, IMultiFilterModel, IMultiFilterComp, IMultiFilterParams, IMultiFilterDef } from './interfaces/iMultiFilter';\n\nexport { ProvidedFilter, IProvidedFilter, IProvidedFilterParams } from \"./filter/provided/providedFilter\";\nexport { ISimpleFilter, SimpleFilter, ISimpleFilterParams, ISimpleFilterModel, ICombinedSimpleModel, JoinOperator } from \"./filter/provided/simpleFilter\";\nexport { ScalarFilter, IScalarFilterParams } from \"./filter/provided/scalarFilter\";\n\nexport { NumberFilter, INumberFilterParams, NumberFilterModel } from \"./filter/provided/number/numberFilter\";\nexport { TextFilter, ITextFilterParams, TextFilterModel, TextFormatter } from \"./filter/provided/text/textFilter\";\nexport { DateFilter, IDateFilterParams, DateFilterModel } from \"./filter/provided/date/dateFilter\";\n\nexport { IFloatingFilter, IFloatingFilterParams, IFloatingFilterComp, BaseFloatingFilterChange, IFloatingFilterParent, IFloatingFilterParentCallback } from \"./filter/floating/floatingFilter\";\nexport { TextFloatingFilter } from './filter/provided/text/textFloatingFilter';\nexport { HeaderFilterCellComp } from './headerRendering/cells/floatingFilter/headerFilterCellComp';\nexport { FloatingFilterMapper } from './filter/floating/floatingFilterMapper';\n\n// gridPanel\nexport { GridBodyComp } from \"./gridBodyComp/gridBodyComp\";\nexport { GridBodyCtrl, IGridBodyComp, RowAnimationCssClasses } from \"./gridBodyComp/gridBodyCtrl\";\nexport { ScrollVisibleService } from \"./gridBodyComp/scrollVisibleService\";\nexport { MouseEventService } from \"./gridBodyComp/mouseEventService\";\nexport { NavigationService } from \"./gridBodyComp/navigationService\";\n\n// rowContainer\nexport { RowContainerComp } from \"./gridBodyComp/rowContainer/rowContainerComp\";\nexport { RowContainerName, IRowContainerComp, RowContainerCtrl, RowContainerType, getRowContainerTypeForName } from \"./gridBodyComp/rowContainer/rowContainerCtrl\";\n\n// headerRendering\nexport { BodyDropPivotTarget } from \"./headerRendering/columnDrag/bodyDropPivotTarget\";\nexport { BodyDropTarget } from \"./headerRendering/columnDrag/bodyDropTarget\";\nexport { CssClassApplier } from \"./headerRendering/cells/cssClassApplier\";\nexport { HeaderRowContainerComp } from \"./headerRendering/rowContainer/headerRowContainerComp\";\nexport { GridHeaderComp } from \"./headerRendering/gridHeaderComp\";\nexport { GridHeaderCtrl, IGridHeaderComp } from \"./headerRendering/gridHeaderCtrl\";\nexport { HeaderRowComp, HeaderRowType } from \"./headerRendering/row/headerRowComp\";\nexport { HeaderRowCtrl, IHeaderRowComp } from \"./headerRendering/row/headerRowCtrl\";\nexport { HeaderCellCtrl, IHeaderCellComp } from \"./headerRendering/cells/column/headerCellCtrl\";\nexport { HeaderFilterCellCtrl, IHeaderFilterCellComp } from \"./headerRendering/cells/floatingFilter/headerFilterCellCtrl\";\nexport { HeaderGroupCellCtrl, IHeaderGroupCellComp } from \"./headerRendering/cells/columnGroup/headerGroupCellCtrl\";\nexport { AbstractHeaderCellCtrl, IAbstractHeaderCellComp } from \"./headerRendering/cells/abstractCell/abstractHeaderCellCtrl\";\nexport { HeaderRowContainerCtrl, IHeaderRowContainerComp } from \"./headerRendering/rowContainer/headerRowContainerCtrl\";\nexport { HorizontalResizeService } from \"./headerRendering/common/horizontalResizeService\";\nexport { MoveColumnFeature } from \"./headerRendering/columnDrag/moveColumnFeature\";\nexport { StandardMenuFactory } from \"./headerRendering/cells/column/standardMenu\";\n\n// layout\nexport { TabbedLayout, TabbedItem } from \"./layout/tabbedLayout\";\n\n// misc\nexport { simpleHttpRequest } from \"./misc/simpleHttpRequest\";\nexport { ResizeObserverService } from \"./misc/resizeObserverService\";\nexport { IImmutableService } from \"./interfaces/iImmutableService\";\nexport { AnimationFrameService } from \"./misc/animationFrameService\";\n\n// editing / cellEditors\nexport { ICellEditor, ICellEditorComp, ICellEditorParams } from \"./interfaces/iCellEditor\";\nexport { LargeTextCellEditor } from \"./rendering/cellEditors/largeTextCellEditor\";\nexport { PopupEditorWrapper } from \"./rendering/cellEditors/popupEditorWrapper\";\nexport { PopupSelectCellEditor } from \"./rendering/cellEditors/popupSelectCellEditor\";\nexport { PopupTextCellEditor } from \"./rendering/cellEditors/popupTextCellEditor\";\nexport { SelectCellEditor } from \"./rendering/cellEditors/selectCellEditor\";\nexport { TextCellEditor } from \"./rendering/cellEditors/textCellEditor\";\n\n// rendering / cellRenderers\nexport { Beans } from \"./rendering/beans\";\nexport { ICellRenderer, ICellRendererFunc, ICellRendererComp, ICellRendererParams, ISetFilterCellRendererParams } from \"./rendering/cellRenderers/iCellRenderer\";\nexport { AnimateShowChangeCellRenderer } from \"./rendering/cellRenderers/animateShowChangeCellRenderer\";\nexport { AnimateSlideCellRenderer } from \"./rendering/cellRenderers/animateSlideCellRenderer\";\nexport { GroupCellRenderer, } from \"./rendering/cellRenderers/groupCellRenderer\";\nexport { GroupCellRendererParams, FooterValueGetterFunc, IGroupCellRenderer, GroupCellRendererCtrl } from \"./rendering/cellRenderers/groupCellRendererCtrl\";\n\n// status bar components\nexport { StatusPanelDef, IStatusPanel, IStatusPanelComp, IStatusPanelParams } from \"./interfaces/iStatusPanel\";\nexport { IStatusBarService } from \"./interfaces/iStatusBarService\";\n\n// tool panel components\nexport { IToolPanel, IToolPanelComp, IToolPanelParams, IPrimaryColsPanel, ToolPanelColumnCompParams } from \"./interfaces/iToolPanel\";\nexport { IColumnToolPanel } from \"./interfaces/iColumnToolPanel\";\nexport { IFiltersToolPanel } from \"./interfaces/iFiltersToolPanel\";\n\n// overlays\nexport { ILoadingOverlayComp, ILoadingOverlayParams } from \"./rendering/overlays/loadingOverlayComponent\";\nexport { INoRowsOverlayComp, INoRowsOverlayParams } from \"./rendering/overlays/noRowsOverlayComponent\";\n\n// features\nexport { SetLeftFeature } from \"./rendering/features/setLeftFeature\";\nexport { PositionableFeature, ResizableStructure, ResizableSides, PositionableOptions } from \"./rendering/features/positionableFeature\";\n\n// rendering\nexport { AutoWidthCalculator } from \"./rendering/autoWidthCalculator\";\nexport { CheckboxSelectionComponent } from \"./rendering/checkboxSelectionComponent\";\nexport { CellComp } from \"./rendering/cell/cellComp\";\nexport { CellCtrl, ICellComp } from \"./rendering/cell/cellCtrl\";\nexport { RowCtrl, IRowComp } from \"./rendering/row/rowCtrl\";\nexport { RowRenderer } from \"./rendering/rowRenderer\";\nexport { ValueFormatterService } from \"./rendering/valueFormatterService\";\nexport { ILoadingCellRenderer, ILoadingCellRendererComp, ILoadingCellRendererParams } from \"./rendering/cellRenderers/loadingCellRenderer\";\n\n// row models\nexport { PinnedRowModel } from \"./pinnedRowModel/pinnedRowModel\";\nexport { RowNodeTransaction } from \"./interfaces/rowNodeTransaction\";\nexport { RowDataTransaction } from \"./interfaces/rowDataTransaction\";\nexport { ServerSideTransaction, ServerSideTransactionResult, ServerSideTransactionResultStatus } from \"./interfaces/serverSideTransaction\";\nexport { ChangedPath } from \"./utils/changedPath\";\nexport { RowNodeBlock, LoadCompleteEvent, LoadSuccessParams } from \"./rowNodeCache/rowNodeBlock\";\nexport { RowNodeBlockLoader } from \"./rowNodeCache/rowNodeBlockLoader\";\nexport { PaginationProxy } from \"./pagination/paginationProxy\";\nexport { IClientSideRowModel, ClientSideRowModelSteps, RefreshModelParams } from \"./interfaces/iClientSideRowModel\";\nexport { IInfiniteRowModel } from \"./interfaces/iInfiniteRowModel\";\n\nexport { ColumnVO } from \"./interfaces/iColumnVO\";\n\nexport { IServerSideDatasource, IServerSideGetRowsParams, IServerSideGetRowsRequest } from \"./interfaces/iServerSideDatasource\";\nexport { IServerSideRowModel, IServerSideTransactionManager, RefreshStoreParams } from \"./interfaces/iServerSideRowModel\";\nexport { IServerSideStore, StoreRefreshAfterParams, ServerSideStoreState } from \"./interfaces/IServerSideStore\";\n\nexport { ISideBar } from \"./interfaces/iSideBar\";\nexport { IGetRowsParams, IDatasource } from \"./interfaces/iDatasource\";\n\n//styling\nexport { StylingService } from \"./styling/stylingService\";\nexport { UpdateLayoutClassesParams, LayoutCssClasses } from \"./styling/layoutFeature\";\n\n// widgets\nexport { AgAbstractField, FieldElement } from \"./widgets/agAbstractField\";\nexport { AgCheckbox } from \"./widgets/agCheckbox\";\nexport { AgRadioButton } from \"./widgets/agRadioButton\";\nexport { AgToggleButton } from \"./widgets/agToggleButton\";\nexport { AgInputTextField } from \"./widgets/agInputTextField\";\nexport { AgInputTextArea } from \"./widgets/agInputTextArea\";\nexport { AgInputNumberField } from \"./widgets/agInputNumberField\";\nexport { AgInputRange } from \"./widgets/agInputRange\";\nexport { AgSelect } from \"./widgets/agSelect\";\nexport { AgSlider } from \"./widgets/agSlider\";\nexport { AgAngleSelect } from \"./widgets/agAngleSelect\";\nexport { AgColorPicker } from \"./widgets/agColorPicker\";\nexport { AgGroupComponent, AgGroupComponentParams } from \"./widgets/agGroupComponent\";\nexport { AgMenuItemComponent, MenuItemActivatedEvent, MenuItemSelectedEvent } from \"./widgets/agMenuItemComponent\";\nexport { AgMenuList } from \"./widgets/agMenuList\";\nexport { AgMenuPanel } from \"./widgets/agMenuPanel\";\nexport { AgDialog } from \"./widgets/agDialog\";\nexport { AgPanel } from \"./widgets/agPanel\";\nexport { ListOption } from \"./widgets/agList\";\nexport { Component, VisibleChangedEvent, CssClassManager } from \"./widgets/component\";\nexport { ManagedFocusFeature, ManagedFocusCallbacks } from \"./widgets/managedFocusFeature\";\nexport { TabGuardComp } from \"./widgets/tabGuardComp\";\nexport { TabGuardCtrl, ITabGuard } from \"./widgets/tabGuardCtrl\";\nexport { PopupComponent } from \"./widgets/popupComponent\";\nexport { PopupService, AgPopup } from \"./widgets/popupService\";\nexport { TouchListener, TapEvent, LongTapEvent } from \"./widgets/touchListener\";\nexport { VirtualList, VirtualListModel } from \"./widgets/virtualList\";\n\n// range\nexport {\n CellRange, CellRangeParams, CellRangeType, RangeSelection, AddRangeSelectionParams, IRangeService,\n ISelectionHandle, SelectionHandleType, ISelectionHandleFactory\n} from \"./interfaces/IRangeService\";\nexport { IChartService, ChartModel, GetChartImageDataUrlParams, ChartModelType } from \"./interfaces/IChartService\";\n\n// master detail\nexport { IDetailCellRendererParams, GetDetailRowData, GetDetailRowDataParams, IDetailCellRenderer, IDetailCellRendererCtrl } from './interfaces/masterDetail';\n\n// exporter\nexport {\n CsvExportParams, CsvCell, CsvCellData, CsvCustomContent, ExportParams, PackageFileParams,\n ProcessCellForExportParams, ProcessHeaderForExportParams, ProcessGroupHeaderForExportParams,\n ProcessRowGroupForExportParams, ShouldRowBeSkippedParams, BaseExportParams\n} from \"./interfaces/exportParams\";\nexport { HeaderElement, PrefixedXmlAttributes, XmlElement } from \"./interfaces/iXmlFactory\";\nexport { ICsvCreator } from \"./interfaces/iCsvCreator\";\n\n// root\nexport { AutoScrollService } from './autoScrollService';\nexport { VanillaFrameworkOverrides } from \"./vanillaFrameworkOverrides\";\nexport { CellNavigationService } from \"./cellNavigationService\";\nexport { AlignedGridsService } from \"./alignedGridsService\";\nexport { Constants } from \"./constants/constants\";\nexport { KeyCode } from \"./constants/keyCode\";\nexport { Grid, GridParams, GridCoreCreator } from \"./grid\";\nexport { GridApi, RedrawRowsParams, RefreshCellsParams, StartEditingCellParams, DetailGridInfo, CreateRangeChartParams, ChartParamsCellRange, CreatePivotChartParams, CreateCrossFilterChartParams } from \"./gridApi\";\nexport { Events } from \"./eventKeys\";\nexport { FocusService } from \"./focusService\";\nexport { defaultGroupComparator } from \"./functions\";\nexport { GridOptionsWrapper } from \"./gridOptionsWrapper\";\nexport { EventService } from \"./eventService\";\nexport { SelectableService } from \"./rowNodes/selectableService\";\nexport { RowNodeSorter, SortedRowNode, SortOption } from \"./rowNodes/rowNodeSorter\";\nexport { CtrlsService } from \"./ctrlsService\";\nexport { GridComp } from \"./gridComp/gridComp\";\nexport { GridCtrl, IGridComp } from \"./gridComp/gridCtrl\";\nexport { Logger, LoggerFactory } from \"./logger\";\nexport { SelectionService } from \"./selectionService\";\nexport { SortController, SortModelItem } from \"./sortController\";\nexport { TemplateService } from \"./templateService\";\nexport * from \"./utils\";\nexport { ColumnSortState } from \"./utils/aria\";\nexport { ValueService } from \"./valueService/valueService\";\nexport { ValueCache } from \"./valueService/valueCache\";\nexport { ExpressionService } from \"./valueService/expressionService\";\n\n// uncatalogued\nexport { IRowModel, RowBounds } from \"./interfaces/iRowModel\";\nexport { IAggFuncService } from \"./interfaces/iAggFuncService\";\nexport { IClipboardService, IClipboardCopyParams, IClipboardCopyRowsParams } from \"./interfaces/iClipboardService\";\nexport { IMenuFactory } from \"./interfaces/iMenuFactory\";\nexport { CellPosition, CellPositionUtils } from \"./entities/cellPosition\";\nexport { RowPosition, RowPositionUtils } from \"./entities/rowPosition\";\nexport { HeaderPosition, HeaderPositionUtils } from \"./headerRendering/common/headerPosition\";\nexport { HeaderNavigationService, HeaderNavigationDirection } from \"./headerRendering/common/headerNavigationService\";\nexport {\n IAggFunc,\n IAggFuncParams,\n ColGroupDef,\n ColDef,\n AbstractColDef,\n ValueSetterParams,\n ValueParserParams,\n ValueFormatterParams,\n ValueFormatterFunc,\n ValueParserFunc,\n ValueGetterFunc,\n ValueSetterFunc,\n HeaderValueGetterFunc,\n HeaderValueGetterParams,\n ColSpanParams,\n RowSpanParams,\n SuppressKeyboardEventParams,\n SuppressHeaderKeyboardEventParams,\n ValueGetterParams,\n NewValueParams,\n CellClassParams,\n CellClassFunc,\n CellStyleFunc,\n CellStyle,\n CellClassRules,\n CellEditorSelectorFunc,\n CellEditorSelectorResult,\n CellRendererSelectorFunc,\n CellRendererSelectorResult,\n GetQuickFilterTextParams,\n ColumnFunctionCallbackParams,\n CheckboxSelectionCallbackParams,\n CheckboxSelectionCallback,\n RowDragCallback,\n RowDragCallbackParams,\n DndSourceCallback,\n DndSourceCallbackParams,\n DndSourceOnRowDragParams,\n EditableCallbackParams,\n EditableCallback,\n SuppressPasteCallback,\n SuppressPasteCallbackParams,\n SuppressNavigableCallback,\n SuppressNavigableCallbackParams,\n HeaderCheckboxSelectionCallbackParams,\n HeaderCheckboxSelectionCallback,\n ColumnsMenuParams,\n HeaderClassParams,\n HeaderClass,\n ToolPanelClassParams,\n ToolPanelClass,\n KeyCreatorParams,\n // deprecated params\n IsColumnFunc,\n IsColumnFuncParams\n} from \"./entities/colDef\";\nexport {\n GridOptions,\n IsApplyServerSideTransaction,\n GetContextMenuItems,\n GetDataPath,\n IsRowMaster,\n IsRowSelectable,\n IsRowFilterable,\n MenuItemLeafDef,\n MenuItemDef,\n GetMainMenuItems,\n GetRowNodeIdFunc,\n GetRowIdFunc,\n ChartRef,\n ChartRefParams,\n RowClassRules,\n RowStyle,\n RowClassParams,\n ServerSideStoreType,\n ServerSideStoreParams,\n GetServerSideGroupKey,\n IsServerSideGroup,\n GetChartToolbarItems,\n RowGroupingDisplayType,\n TreeDataDisplayType,\n LoadingCellRendererSelectorFunc,\n LoadingCellRendererSelectorResult,\n} from \"./entities/gridOptions\";\n\nexport {\n FillOperationParams,\n RowHeightParams,\n GetRowIdParams,\n ProcessRowParams,\n IsServerSideGroupOpenByDefaultParams,\n IsApplyServerSideTransactionParams,\n IsGroupOpenByDefaultParams,\n GetServerSideStoreParamsParams,\n PaginationNumberFormatterParams,\n ProcessDataFromClipboardParams,\n SendToClipboardParams,\n GetChartToolbarItemsParams,\n NavigateToNextHeaderParams,\n TabToNextHeaderParams,\n NavigateToNextCellParams,\n TabToNextCellParams,\n GetContextMenuItemsParams,\n GetMainMenuItemsParams,\n PostProcessPopupParams,\n IsExternalFilterPresentParams,\n InitialGroupOrderComparatorParams,\n GetGroupRowAggParams,\n IsFullWidthRowParams,\n PostSortRowsParams,\n GetLocaleTextParams,\n GetGroupAggFilteringParams,\n} from \"./entities/iCallbackParams\"\nexport {\n WithoutGridCommon\n} from \"./interfaces/iCommon\";\n\n\nexport * from \"./propertyKeys\";\nexport { IProvidedColumn } from \"./entities/iProvidedColumn\";\nexport { IHeaderColumn } from \"./entities/iHeaderColumn\";\nexport { IViewportDatasource, IViewportDatasourceParams } from \"./interfaces/iViewportDatasource\";\nexport { IContextMenuFactory } from \"./interfaces/iContextMenuFactory\";\nexport { IRowNodeStage, StageExecuteParams } from \"./interfaces/iRowNodeStage\";\nexport { IDateParams, IDate, IDateComp } from \"./rendering/dateComponent\";\nexport { IAfterGuiAttachedParams, ContainerType } from \"./interfaces/iAfterGuiAttachedParams\";\nexport { IComponent } from \"./interfaces/iComponent\";\nexport { IEventEmitter } from \"./interfaces/iEventEmitter\";\nexport { IHeaderParams, IHeaderComp, IHeader } from \"./headerRendering/cells/column/headerComp\";\nexport { IHeaderGroupParams, IHeaderGroup, IHeaderGroupComp } from \"./headerRendering/cells/columnGroup/headerGroupComp\";\nexport { ColumnApi } from \"./columns/columnApi\";\nexport { IRichCellEditorParams } from \"./interfaces/iRichCellEditorParams\";\nexport { WrappableInterface, BaseComponentWrapper, FrameworkComponentWrapper } from \"./components/framework/frameworkComponentWrapper\";\nexport { IFrameworkOverrides } from \"./interfaces/iFrameworkOverrides\";\nexport { Environment } from \"./environment\";\nexport { ITooltipComp, ITooltipParams } from \"./rendering/tooltipComponent\";\nexport { CustomTooltipFeature } from \"./widgets/customTooltipFeature\";\nexport { IAggregationStage } from \"./interfaces/iAggregationStage\";\n\n// charts\nexport * from \"./interfaces/iChartOptions\";\nexport * from \"./interfaces/iAgChartOptions\";\n\n// sparklines\nexport * from \"./interfaces/iSparklineCellRendererParams\";\n\n// modules\nexport { Module } from \"./interfaces/iModule\";\nexport { ModuleNames } from \"./modules/moduleNames\";\nexport { ModuleRegistry } from \"./modules/moduleRegistry\";\n\n// events\nexport * from \"./events\";\n","import React, { Component } from 'react';\nimport { AgGridReactLegacy } from './legacy/agGridReactLegacy';\nimport { AgGridReactUi } from './reactUi/agGridReactUi';\nimport { AgGridReactProps, AgReactUiProps } from './shared/interfaces';\nimport { ColumnApi, GridApi } from '@ag-grid-community/core';\n\n\nexport class AgGridReact extends Component {\n public api!: GridApi;\n public columnApi!: ColumnApi;\n\n private setGridApi = (api: GridApi, columnApi: ColumnApi) => {\n this.api = api;\n this.columnApi = columnApi\n }\n\n render() {\n const ReactComponentToUse = this.props.suppressReactUi ? AgGridReactLegacy : AgGridReactUi;\n return ;\n }\n}\n","import {\n BaseComponentWrapper,\n ColumnApi,\n ComponentType,\n ComponentUtil,\n FrameworkComponentWrapper,\n Grid,\n GridApi,\n GridOptions,\n WrappableInterface, _\n} from '@ag-grid-community/core';\nimport PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { LegacyReactComponent } from './legacyReactComponent';\nimport { AgGridColumn } from '../shared/agGridColumn';\nimport { ChangeDetectionService, ChangeDetectionStrategyType } from '../shared/changeDetectionService';\nimport { AgGridReactProps } from '../shared/interfaces';\nimport { NewReactComponent } from '../shared/newReactComponent';\nimport { PortalManager } from '../shared/portalManager';\nimport { ReactFrameworkOverrides } from '../shared/reactFrameworkOverrides';\n\nexport class AgGridReactLegacy extends Component {\n\n private static MAX_COMPONENT_CREATION_TIME_IN_MS: number = 1000; // a second should be more than enough to instantiate a component\n\n static propTypes: any;\n\n static defaultProps = {\n legacyComponentRendering: false,\n disableStaticMarkup: false,\n maxComponentCreationTimeMs: AgGridReactLegacy.MAX_COMPONENT_CREATION_TIME_IN_MS\n };\n\n gridOptions!: GridOptions;\n\n changeDetectionService = new ChangeDetectionService();\n\n api: GridApi | null = null;\n columnApi!: ColumnApi;\n\n portalManager: PortalManager;\n\n destroyed = false;\n\n protected eGridDiv!: HTMLElement;\n\n readonly SYNCHRONOUS_CHANGE_PROPERTIES = ['context']\n\n constructor(public props: AgGridReactProps) {\n super(props);\n\n this.portalManager = new PortalManager(this, props.componentWrappingElement, props.maxComponentCreationTimeMs);\n }\n\n render() {\n return React.createElement('div', {\n style: this.createStyleForDiv(),\n className: this.props.className,\n ref: (e: HTMLElement) => {\n this.eGridDiv = e;\n }\n }, this.portalManager.getPortals());\n }\n\n createStyleForDiv() {\n return {\n height: '100%',\n ...(this.props.containerStyle || {})\n };\n }\n\n componentDidMount() {\n const modules = this.props.modules || [];\n const gridParams = {\n providedBeanInstances: {\n agGridReact: this,\n frameworkComponentWrapper: new ReactFrameworkComponentWrapper(this, this.portalManager)\n },\n modules,\n frameworkOverrides: new ReactFrameworkOverrides(false)\n };\n\n const gridOptions = this.props.gridOptions || {};\n const {children} = this.props;\n\n if (AgGridColumn.hasChildColumns(children)) {\n gridOptions.columnDefs = AgGridColumn.mapChildColumnDefs(children);\n }\n\n this.gridOptions = ComponentUtil.copyAttributesToGridOptions(gridOptions, this.props);\n\n // don't need the return value\n new Grid(this.eGridDiv, this.gridOptions, gridParams);\n\n this.api = this.gridOptions.api!;\n this.columnApi = this.gridOptions.columnApi!;\n\n this.props.setGridApi!(this.api, this.columnApi);\n }\n\n private getStrategyTypeForProp(propKey: string) {\n if (propKey === 'rowData') {\n if (this.props.rowDataChangeDetectionStrategy) {\n return this.props.rowDataChangeDetectionStrategy;\n } else if (this.isImmutableDataActive()) {\n return ChangeDetectionStrategyType.IdentityCheck;\n }\n }\n\n // all other cases will default to DeepValueCheck\n return ChangeDetectionStrategyType.DeepValueCheck;\n }\n\n private isImmutableDataActive() {\n return (this.props.deltaRowDataMode || this.props.immutableData) || this.props.getRowId != null ||\n (this.props.gridOptions && (\n this.props.gridOptions.deltaRowDataMode\n || this.props.gridOptions.immutableData\n || this.props.gridOptions.getRowId != null));\n }\n\n shouldComponentUpdate(nextProps: any) {\n this.processPropsChanges(this.props, nextProps);\n\n // we want full control of the dom, as AG Grid doesn't use React internally,\n // so for performance reasons we tell React we don't need render called after\n // property changes.\n return false;\n }\n\n componentDidUpdate(prevProps: any) {\n this.processPropsChanges(prevProps, this.props);\n }\n\n processPropsChanges(prevProps: any, nextProps: any) {\n const changes = {};\n\n this.extractGridPropertyChanges(prevProps, nextProps, changes);\n this.extractDeclarativeColDefChanges(nextProps, changes);\n\n this.processSynchronousChanges(changes);\n this.processAsynchronousChanges(changes);\n }\n\n private extractDeclarativeColDefChanges(nextProps: any, changes: any) {\n // if columnDefs are provided on gridOptions we use those - you can't combine both\n // we also skip if columnDefs are provided as a prop directly on AgGridReact\n if ((this.props.gridOptions && this.props.gridOptions.columnDefs) || this.props.columnDefs) {\n return;\n }\n\n const debugLogging = !!nextProps.debug;\n const propKey = 'columnDefs';\n const currentColDefs = this.gridOptions.columnDefs;\n\n if (AgGridColumn.hasChildColumns(nextProps.children)) {\n const detectionStrategy = this.changeDetectionService.getStrategy(this.getStrategyTypeForProp(propKey));\n const newColDefs = AgGridColumn.mapChildColumnDefs(nextProps.children);\n\n if (!detectionStrategy.areEqual(currentColDefs, newColDefs)) {\n if (debugLogging) {\n console.log(`agGridReact: colDefs definitions changed`);\n }\n\n changes[propKey] =\n {\n previousValue: currentColDefs,\n currentValue: newColDefs\n };\n }\n } else if (currentColDefs && currentColDefs.length > 0) {\n changes[propKey] =\n {\n previousValue: currentColDefs,\n currentValue: []\n };\n }\n }\n\n private extractGridPropertyChanges(prevProps: any, nextProps: any, changes: any) {\n const debugLogging = !!nextProps.debug;\n\n Object.keys(nextProps).forEach(propKey => {\n if (_.includes(ComponentUtil.ALL_PROPERTIES, propKey)) {\n const changeDetectionStrategy = this.changeDetectionService.getStrategy(this.getStrategyTypeForProp(propKey));\n\n if (!changeDetectionStrategy.areEqual(prevProps[propKey], nextProps[propKey])) {\n if (debugLogging) {\n console.log(`agGridReact: [${propKey}] property changed`);\n }\n\n changes[propKey] = {\n previousValue: prevProps[propKey],\n currentValue: nextProps[propKey]\n };\n }\n }\n });\n\n ComponentUtil.getEventCallbacks().forEach(funcName => {\n if (prevProps[funcName] !== nextProps[funcName]) {\n if (debugLogging) {\n console.log(`agGridReact: [${funcName}] event callback changed`);\n }\n\n changes[funcName] = {\n previousValue: prevProps[funcName],\n currentValue: nextProps[funcName]\n };\n }\n });\n }\n\n componentWillUnmount() {\n if (this.api) {\n this.api.destroy();\n this.api = null;\n }\n\n this.destroyed = true;\n this.portalManager.destroy();\n }\n\n public isDisableStaticMarkup(): boolean {\n return this.props.disableStaticMarkup === true;\n }\n\n public isLegacyComponentRendering(): boolean {\n return this.props.legacyComponentRendering === true;\n }\n\n private processSynchronousChanges(changes: any): {} {\n const asyncChanges = {...changes};\n if (Object.keys(asyncChanges).length > 0) {\n const synchronousChanges: { [key: string]: any } = {};\n this.SYNCHRONOUS_CHANGE_PROPERTIES.forEach((synchronousChangeProperty: string) => {\n if (asyncChanges[synchronousChangeProperty]) {\n synchronousChanges[synchronousChangeProperty] = asyncChanges[synchronousChangeProperty];\n delete asyncChanges[synchronousChangeProperty];\n }\n })\n\n if(Object.keys(synchronousChanges).length > 0 && !!this.api) {\n ComponentUtil.processOnChange(synchronousChanges, this.gridOptions, this.api, this.columnApi)\n }\n }\n return asyncChanges;\n }\n\n private processAsynchronousChanges(changes: {}) {\n if (Object.keys(changes).length > 0) {\n window.setTimeout(() => {\n // destroyed?\n if (this.api) {\n ComponentUtil.processOnChange(changes, this.gridOptions, this.api, this.columnApi)\n }\n });\n }\n }\n}\n\nAgGridReactLegacy.propTypes = {\n gridOptions: PropTypes.object\n};\n\naddProperties(ComponentUtil.getEventCallbacks(), PropTypes.func);\naddProperties(ComponentUtil.BOOLEAN_PROPERTIES, PropTypes.bool);\naddProperties(ComponentUtil.STRING_PROPERTIES, PropTypes.string);\naddProperties(ComponentUtil.OBJECT_PROPERTIES, PropTypes.object);\naddProperties(ComponentUtil.ARRAY_PROPERTIES, PropTypes.array);\naddProperties(ComponentUtil.NUMBER_PROPERTIES, PropTypes.number);\naddProperties(ComponentUtil.FUNCTION_PROPERTIES, PropTypes.func);\n\nfunction addProperties(listOfProps: string[], propType: any) {\n listOfProps.forEach(propKey => {\n (AgGridReactLegacy as any)[propKey] = propType;\n });\n}\n\nclass ReactFrameworkComponentWrapper extends BaseComponentWrapper implements FrameworkComponentWrapper {\n\n private readonly agGridReact!: AgGridReactLegacy;\n private readonly portalManager!: PortalManager;\n\n constructor(agGridReact: AgGridReactLegacy, portalManager: PortalManager) {\n super();\n this.agGridReact = agGridReact;\n this.portalManager = portalManager;\n }\n\n createWrapper(UserReactComponent: { new(): any; }, componentType: ComponentType): WrappableInterface {\n if (this.agGridReact.isLegacyComponentRendering()) {\n return new LegacyReactComponent(UserReactComponent, this.agGridReact, this.portalManager, componentType);\n } else {\n return new NewReactComponent(UserReactComponent, this.portalManager, componentType);\n }\n }\n}\n","import { createElement, ReactPortal } from 'react';\nimport { createPortal } from 'react-dom';\nimport { AgPromise, ComponentType } from '@ag-grid-community/core';\nimport { ReactComponent } from '../shared/reactComponent';\nimport { renderToStaticMarkup } from 'react-dom/server';\nimport generateNewKey from '../shared/keyGenerator';\nimport { AgGridReactLegacy } from './agGridReactLegacy';\nimport { PortalManager } from '../shared/portalManager';\n\nexport class LegacyReactComponent extends ReactComponent {\n static SLOW_RENDERING_THRESHOLD = 3;\n\n private staticMarkup: HTMLElement | null | string = null;\n private staticRenderTime: number = 0;\n\n private parentComponent: AgGridReactLegacy;\n\n constructor(reactComponent: any, parentComponent: AgGridReactLegacy, portalManager: PortalManager, componentType: ComponentType) {\n super(reactComponent, portalManager, componentType);\n this.parentComponent = parentComponent;\n }\n\n public init(params: any): AgPromise {\n this.eParentElement = this.createParentElement(params);\n this.renderStaticMarkup(params);\n\n return new AgPromise(resolve => this.createReactComponent(params, resolve));\n }\n\n private createReactComponent(params: any, resolve: (value: any) => void) {\n // regular components (ie not functional)\n if (!this.isStatelessComponent()) {\n // grab hold of the actual instance created\n params.ref = (element: any) => {\n this.componentInstance = element;\n this.addParentContainerStyleAndClasses();\n\n this.removeStaticMarkup();\n };\n }\n\n const reactComponent = createElement(this.reactComponent, params);\n const portal: ReactPortal = createPortal(\n reactComponent,\n this.eParentElement as any,\n generateNewKey() // fixed deltaRowModeRefreshCompRenderer\n );\n\n this.portal = portal;\n this.portalManager.mountReactPortal(portal, this, (value: any) => {\n resolve(value);\n\n // functional/stateless components have a slightly different lifecycle (no refs) so we'll clean them up\n // here\n if (this.isStatelessComponent()) {\n if (this.isSlowRenderer()) {\n this.removeStaticMarkup();\n }\n setTimeout(() => {\n this.removeStaticMarkup();\n });\n }\n });\n }\n\n protected fallbackMethodAvailable(name: string): boolean {\n return false;\n }\n\n protected fallbackMethod(name: string, params: any): void { /* no op */ }\n\n private isSlowRenderer() {\n return this.staticRenderTime >= LegacyReactComponent.SLOW_RENDERING_THRESHOLD;\n }\n\n public isNullValue(): boolean {\n return this.staticMarkup === '';\n }\n\n /*\n * Attempt to render the component as static markup if possible\n * What this does is eliminate any visible flicker for the user in the scenario where a component is destroyed and\n * recreated with exactly the same data (ie with force refresh)\n * Note: Some use cases will throw an error (ie when using Context) so if an error occurs just ignore it any move on\n */\n private renderStaticMarkup(params: any) {\n if (this.parentComponent.isDisableStaticMarkup() || !this.componentType.cellRenderer) {\n return;\n }\n\n const originalConsoleError = console.error;\n const reactComponent = createElement(this.reactComponent, params);\n\n try {\n // if a user is doing anything that uses useLayoutEffect (like material ui) then it will throw and we\n // can't do anything to stop it; this is just a warning and has no effect on anything so just suppress it\n // for this single operation\n console.error = () => {\n };\n\n const start = Date.now();\n const staticMarkup = renderToStaticMarkup(reactComponent);\n this.staticRenderTime = Date.now() - start;\n\n console.error = originalConsoleError;\n\n // if the render method returns null the result will be an empty string\n if (staticMarkup === '') {\n this.staticMarkup = staticMarkup;\n } else {\n if (staticMarkup) {\n // we wrap the content as if there is \"trailing\" text etc it's not easy to safely remove\n // the same is true for memoized renderers, renderers that that return simple strings or NaN etc\n this.staticMarkup = document.createElement('span');\n this.staticMarkup.innerHTML = staticMarkup;\n this.eParentElement.appendChild(this.staticMarkup);\n }\n }\n } catch (e) {\n // we tried - this can happen with certain (rare) edge cases\n } finally {\n console.error = originalConsoleError;\n }\n }\n\n private removeStaticMarkup() {\n if (this.parentComponent.isDisableStaticMarkup() || !this.componentType.cellRenderer) {\n return;\n }\n\n if (this.staticMarkup) {\n if ((this.staticMarkup as HTMLElement).remove) {\n // everyone else in the world\n (this.staticMarkup as HTMLElement).remove();\n this.staticMarkup = null;\n } else if (this.eParentElement.removeChild) {\n // ie11...\n this.eParentElement.removeChild(this.staticMarkup as any);\n this.staticMarkup = null;\n }\n }\n }\n\n rendered(): boolean {\n return this.isNullValue() ||\n !!this.staticMarkup || (this.isStatelessComponent() && this.statelessComponentRendered()) ||\n !!(!this.isStatelessComponent() && this.getFrameworkComponentInstance());\n }\n}\n","import { BaseComponentWrapper, CtrlsService, ColumnApi, ComponentType, ComponentUtil, Context, FrameworkComponentWrapper, GridApi, GridCoreCreator, GridOptions, GridParams, WrappableInterface, _ } from '@ag-grid-community/core';\nimport React, { Component } from 'react';\nimport { AgGridColumn } from '../shared/agGridColumn';\nimport { ChangeDetectionService, ChangeDetectionStrategyType } from '../shared/changeDetectionService';\nimport { AgReactUiProps } from '../shared/interfaces';\nimport { NewReactComponent } from '../shared/newReactComponent';\nimport { PortalManager } from '../shared/portalManager';\nimport GridComp from './gridComp';\nimport { ReactFrameworkOverrides } from '../shared/reactFrameworkOverrides';\n\nfunction debug(msg: string, obj?: any) {\n // console.log(msg, obj);\n}\n\nexport class AgGridReactUi extends Component {\n\n public api!: GridApi;\n public columnApi!: ColumnApi;\n\n private gridOptions!: GridOptions;\n\n private destroyFuncs: (() => void)[] = [];\n private changeDetectionService = new ChangeDetectionService();\n private eGui = React.createRef();\n\n private portalManager: PortalManager;\n\n private whenReadyFuncs: (()=>void)[] = [];\n private ready = false;\n\n private renderedAfterMount = false;\n private mounted = false;\n\n constructor(public props: any) {\n super(props);\n debug('AgGridReactUi.constructor');\n this.state = {context: undefined};\n this.portalManager = new PortalManager(this, props.componentWrappingElement, props.maxComponentCreationTimeMs);\n this.destroyFuncs.push(() => this.portalManager.destroy());\n }\n\n public render() {\n debug('AgGridReactUi.render, context = ' + (this.state.context));\n if (this.state.context) {\n this.renderedAfterMount = true;\n }\n\n return (\n
\n { this.state.context && }\n { this.portalManager.getPortals() }\n
\n );\n }\n\n private createStyleForDiv() {\n return {\n height: '100%',\n ...(this.props.containerStyle || {})\n };\n }\n\n public componentDidMount() {\n\n if (this.mounted) {\n debug('AgGridReactUi.componentDidMount - skipping');\n return;\n }\n debug('AgGridReactUi.componentDidMount');\n this.mounted = true;\n\n const modules = this.props.modules || [];\n const gridParams: GridParams = {\n providedBeanInstances: {\n frameworkComponentWrapper: new ReactFrameworkComponentWrapper(this.portalManager)\n },\n modules,\n frameworkOverrides: new ReactFrameworkOverrides(true)\n };\n\n this.gridOptions = this.props.gridOptions || {};\n const {children} = this.props;\n\n if (AgGridColumn.hasChildColumns(children)) {\n this.gridOptions.columnDefs = AgGridColumn.mapChildColumnDefs(children);\n }\n\n this.gridOptions = ComponentUtil.copyAttributesToGridOptions(this.gridOptions, this.props);\n\n const createUiCallback = (context: Context) => {\n this.setState({context: context});\n\n // because React is Async, we need to wait for the UI to be initialised before exposing the API's\n const ctrlsService = context.getBean(CtrlsService.NAME) as CtrlsService;\n ctrlsService.whenReady( ()=> {\n debug('AgGridReactUi.createUiCallback');\n\n this.api = this.gridOptions.api!;\n this.columnApi = this.gridOptions.columnApi!;\n this.props.setGridApi(this.api, this.columnApi);\n this.destroyFuncs.push(() => this.api.destroy());\n });\n };\n\n // this callback adds to ctrlsService.whenReady(), just like above, however because whenReady() executes\n // funcs in the order they were received, we know adding items here will be AFTER the grid has set columns\n // and data. this is because GridCoreCreator sets these between calling createUiCallback and acceptChangesCallback\n const acceptChangesCallback = (context: Context)=> {\n const ctrlsService = context.getBean(CtrlsService.NAME) as CtrlsService;\n ctrlsService.whenReady( ()=> {\n debug('AgGridReactUi.acceptChangesCallback');\n this.whenReadyFuncs.forEach( f => f() );\n this.whenReadyFuncs.length = 0;\n this.ready = true;\n });\n }\n\n // don't need the return value\n const gridCoreCreator = new GridCoreCreator();\n gridCoreCreator.create(this.eGui.current!, this.gridOptions, createUiCallback, acceptChangesCallback, gridParams);\n }\n\n public componentWillUnmount() {\n if (this.renderedAfterMount) {\n debug('AgGridReactUi.componentWillUnmount - executing');\n this.destroyFuncs.forEach(f => f());\n this.destroyFuncs.length = 0;\n } else {\n debug('AgGridReactUi.componentWillUnmount - skipping');\n }\n }\n\n public componentDidUpdate(prevProps: any) {\n this.processPropsChanges(prevProps, this.props);\n }\n\n public processPropsChanges(prevProps: any, nextProps: any) {\n const changes = {};\n\n this.extractGridPropertyChanges(prevProps, nextProps, changes);\n this.extractDeclarativeColDefChanges(nextProps, changes);\n\n this.processChanges(changes);\n }\n\n private extractDeclarativeColDefChanges(nextProps: any, changes: any) {\n // if columnDefs are provided on gridOptions we use those - you can't combine both\n // we also skip if columnDefs are provided as a prop directly on AgGridReact\n if ((this.props.gridOptions && this.props.gridOptions.columnDefs) || this.props.columnDefs) {\n return;\n }\n\n const debugLogging = !!nextProps.debug;\n const propKey = 'columnDefs';\n const currentColDefs = this.gridOptions.columnDefs;\n\n if (AgGridColumn.hasChildColumns(nextProps.children)) {\n const detectionStrategy = this.changeDetectionService.getStrategy(this.getStrategyTypeForProp(propKey));\n const newColDefs = AgGridColumn.mapChildColumnDefs(nextProps.children);\n\n if (!detectionStrategy.areEqual(currentColDefs, newColDefs)) {\n if (debugLogging) {\n console.log(`agGridReact: colDefs definitions changed`);\n }\n\n changes[propKey] =\n {\n previousValue: currentColDefs,\n currentValue: newColDefs\n };\n }\n } else if (currentColDefs && currentColDefs.length > 0) {\n changes[propKey] =\n {\n previousValue: currentColDefs,\n currentValue: []\n };\n }\n }\n\n private extractGridPropertyChanges(prevProps: any, nextProps: any, changes: any) {\n const debugLogging = !!nextProps.debug;\n\n Object.keys(nextProps).forEach(propKey => {\n if (_.includes(ComponentUtil.ALL_PROPERTIES, propKey)) {\n const changeDetectionStrategy = this.changeDetectionService.getStrategy(this.getStrategyTypeForProp(propKey));\n\n if (!changeDetectionStrategy.areEqual(prevProps[propKey], nextProps[propKey])) {\n if (debugLogging) {\n console.log(`agGridReact: [${propKey}] property changed`);\n }\n\n changes[propKey] = {\n previousValue: prevProps[propKey],\n currentValue: nextProps[propKey]\n };\n }\n }\n });\n\n ComponentUtil.getEventCallbacks().forEach(funcName => {\n if (prevProps[funcName] !== nextProps[funcName]) {\n if (debugLogging) {\n console.log(`agGridReact: [${funcName}] event callback changed`);\n }\n\n changes[funcName] = {\n previousValue: prevProps[funcName],\n currentValue: nextProps[funcName]\n };\n }\n });\n }\n\n private processChanges(changes: {}) {\n this.processWhenReady( ()=>\n ComponentUtil.processOnChange(changes, this.gridOptions, this.api, this.columnApi)\n );\n }\n\n private processWhenReady(func: ()=>void): void {\n if (this.ready) {\n debug('AgGridReactUi.processWhenReady sync');\n func();\n } else {\n debug('AgGridReactUi.processWhenReady async');\n this.whenReadyFuncs.push(func);\n }\n }\n\n private getStrategyTypeForProp(propKey: string) {\n if (propKey === 'rowData') {\n if (this.props.rowDataChangeDetectionStrategy) {\n return this.props.rowDataChangeDetectionStrategy;\n }\n if (this.isImmutableDataActive()) {\n return ChangeDetectionStrategyType.IdentityCheck;\n }\n }\n\n // all other cases will default to DeepValueCheck\n return ChangeDetectionStrategyType.DeepValueCheck;\n }\n\n private isImmutableDataActive() {\n return (this.props.deltaRowDataMode || this.props.immutableData || this.props.getRowId != null) ||\n (this.props.gridOptions && (this.props.gridOptions.deltaRowDataMode\n || this.props.gridOptions.immutableData\n || this.props.gridOptions.getRowId != null));\n }\n}\n\nclass ReactFrameworkComponentWrapper extends BaseComponentWrapper implements FrameworkComponentWrapper {\n\n private readonly parent: PortalManager; \n\n constructor(parent: PortalManager) {\n super();\n this.parent = parent;\n }\n\n createWrapper(UserReactComponent: { new(): any; }, componentType: ComponentType): WrappableInterface {\n return new NewReactComponent(UserReactComponent, this.parent, componentType);\n }\n}\n","import React from 'react';\nimport { Beans } from '@ag-grid-community/core';\n\nexport const BeansContext = React.createContext({} as Beans);\n","import React, { useState, useMemo, useRef, useContext, useCallback, forwardRef, useImperativeHandle } from \"react\";\nimport { CssClasses } from \"../utils\";\nimport { IDetailCellRenderer, IDetailCellRendererCtrl, IDetailCellRendererParams, GridOptions, GridApi, ColumnApi } from \"@ag-grid-community/core\";\nimport { BeansContext } from \"../beansContext\";\nimport { AgGridReactUi } from \"../agGridReactUi\";\nimport { useEffectOnce } from \"../useEffectOnce\";\n\nconst DetailCellRenderer = (props: IDetailCellRendererParams, ref: any) => {\n\n const {ctrlsFactory, context, gridOptionsWrapper, resizeObserverService, clientSideRowModel, serverSideRowModel} = useContext(BeansContext);\n\n const [cssClasses, setCssClasses] = useState(new CssClasses());\n const [gridCssClasses, setGridCssClasses] = useState(new CssClasses());\n const [detailGridOptions, setDetailGridOptions] = useState();\n const [detailRowData, setDetailRowData] = useState();\n\n const ctrlRef = useRef();\n const eGuiRef = useRef(null);\n\n const topClassName = useMemo(() => cssClasses.toString() + ' ag-details-row', [cssClasses]);\n const gridClassName = useMemo(() => gridCssClasses.toString() + ' ag-details-grid', [gridCssClasses]);\n\n if (ref) {\n useImperativeHandle(ref, () => ({\n refresh() { return ctrlRef.current!.refresh(); }\n }));\n }\n \n useEffectOnce(() => {\n if (props.template && typeof props.template === 'string') {\n console.warn('AG Grid: detailCellRendererParams.template is not supported by React - this only works with frameworks that work against String templates. To change the template, please provide your own React Detail Cell Renderer.');\n }\n });\n\n useEffectOnce(() => {\n const compProxy: IDetailCellRenderer = {\n addOrRemoveCssClass: (name: string, on: boolean) => setCssClasses(prev => prev.setClass(name, on)),\n addOrRemoveDetailGridCssClass: (name: string, on: boolean) => setGridCssClasses(prev => prev.setClass(name, on)),\n setDetailGrid: gridOptions => setDetailGridOptions(gridOptions),\n setRowData: rowData => setDetailRowData(rowData),\n getGui: () => eGuiRef.current!\n };\n\n const ctrl = ctrlsFactory.getInstance('detailCellRenderer') as IDetailCellRendererCtrl;\n if (!ctrl) { return; } // should never happen, means master/detail module not loaded\n context.createBean(ctrl);\n\n ctrl.init(compProxy, props);\n\n ctrlRef.current = ctrl;\n\n let resizeObserverDestroyFunc: () => void;\n\n if (gridOptionsWrapper.isDetailRowAutoHeight()) {\n const checkRowSizeFunc = () => {\n // when disposed, current is null, so nothing to do, and the resize observer will\n // be disposed of soon\n if (eGuiRef.current==null) { return; }\n\n const clientHeight = eGuiRef.current.clientHeight;\n\n // if the UI is not ready, the height can be 0, which we ignore, as otherwise a flicker will occur\n // as UI goes from the default height, to 0, then to the real height as UI becomes ready. this means\n // it's not possible for have 0 as auto-height, however this is an improbable use case, as even an\n // empty detail grid would still have some styling around it giving at least a few pixels.\n if (clientHeight != null && clientHeight > 0) {\n // we do the update in a timeout, to make sure we are not calling from inside the grid\n // doing another update\n const updateRowHeightFunc = () => {\n props.node.setRowHeight(clientHeight);\n if (clientSideRowModel) {\n clientSideRowModel.onRowHeightChanged();\n } else if (serverSideRowModel) {\n serverSideRowModel.onRowHeightChanged();\n }\n };\n setTimeout(updateRowHeightFunc, 0);\n }\n };\n \n resizeObserverDestroyFunc = resizeObserverService.observeResize(eGuiRef.current!, checkRowSizeFunc);\n checkRowSizeFunc();\n }\n\n return () => {\n context.destroyBean(ctrl);\n if (resizeObserverDestroyFunc) {\n resizeObserverDestroyFunc();\n }\n };\n });\n\n const setGridApi = useCallback( (api: GridApi, columnApi: ColumnApi) => {\n ctrlRef.current!.registerDetailWithMaster(api, columnApi)\n }, []);\n\n return (\n
\n {\n detailGridOptions &&\n \n }\n
\n );\n};\n\nexport default forwardRef(DetailCellRenderer);\n","import { GroupCellRendererCtrl, GroupCellRendererParams, IGroupCellRenderer, UserCompDetails } from \"@ag-grid-community/core\";\nimport React, { useContext, useImperativeHandle, forwardRef, useEffect, useMemo, useRef, useState, memo } from 'react';\nimport { BeansContext } from \"../beansContext\";\nimport { showJsComp } from \"../jsComp\";\nimport { useEffectOnce } from \"../useEffectOnce\";\nimport { CssClasses } from \"../utils\";\n\nconst GroupCellRenderer = forwardRef((props: GroupCellRendererParams, ref) => {\n\n const context = useContext(BeansContext).context!;\n\n const eGui = useRef(null);\n const eValueRef = useRef(null);\n const eCheckboxRef = useRef(null);\n const eExpandedRef = useRef(null);\n const eContractedRef = useRef(null);\n\n const [innerCompDetails, setInnerCompDetails] = useState();\n const [childCount, setChildCount] = useState();\n const [value, setValue] = useState();\n const [cssClasses, setCssClasses] = useState(new CssClasses());\n const [expandedCssClasses, setExpandedCssClasses] = useState(new CssClasses('ag-hidden'));\n const [contractedCssClasses, setContractedCssClasses] = useState(new CssClasses('ag-hidden'));\n const [checkboxCssClasses, setCheckboxCssClasses] = useState(new CssClasses('ag-invisible'));\n\n useImperativeHandle(ref, () => {\n return {\n // force new instance when grid tries to refresh\n refresh() { return false; }\n };\n });\n\n useEffect(() => {\n return showJsComp(innerCompDetails, context, eValueRef.current!);\n }, [innerCompDetails]);\n\n useEffectOnce( ()=> {\n\n const compProxy: IGroupCellRenderer = {\n setInnerRenderer: (details, valueToDisplay) => {\n setInnerCompDetails(details);\n setValue(valueToDisplay);\n },\n setChildCount: count => setChildCount(count),\n addOrRemoveCssClass: (name, on) => setCssClasses(prev => prev.setClass(name, on)),\n setContractedDisplayed: displayed => setContractedCssClasses(prev => prev.setClass('ag-hidden', !displayed)),\n setExpandedDisplayed: displayed => setExpandedCssClasses(prev => prev.setClass('ag-hidden', !displayed)),\n setCheckboxVisible: visible => setCheckboxCssClasses(prev => prev.setClass('ag-invisible', !visible))\n };\n\n const ctrl = context.createBean(new GroupCellRendererCtrl());\n ctrl.init(compProxy, eGui.current!, eCheckboxRef.current!, eExpandedRef.current!, eContractedRef.current!, GroupCellRenderer, props);\n\n return () => { context.destroyBean(ctrl);};\n });\n\n const className = useMemo(() => `ag-cell-wrapper ${cssClasses.toString()}`, [cssClasses]);\n const expandedClassName = useMemo(() => `ag-group-expanded ${expandedCssClasses.toString()}`, [expandedCssClasses]);\n const contractedClassName = useMemo(() => `ag-group-contracted ${contractedCssClasses.toString()}`, [contractedCssClasses]);\n const checkboxClassName = useMemo(() => `ag-group-checkbox ${checkboxCssClasses.toString()}`, [checkboxCssClasses]);\n\n const useFwRenderer = innerCompDetails && innerCompDetails.componentFromFramework;\n const FwRenderer = useFwRenderer ? innerCompDetails!.componentClass : undefined;\n const useValue = innerCompDetails == null && value != null;\n\n return (\n \n \n \n \n \n { useValue && <>{value} }\n { useFwRenderer && }\n \n {childCount}\n \n );\n});\n\n// we do not memo() here, as it would stop the forwardRef working\nexport default GroupCellRenderer;","import { CellCtrl, Component, ICellComp, ICellEditor, ICellRendererComp, UserCompDetails, _, ICellEditorComp } from '@ag-grid-community/core';\nimport React, { MutableRefObject, useCallback, useEffect, useRef, useState, useMemo, memo, useContext } from 'react';\nimport { CssClasses, isComponentStateless } from '../utils';\nimport PopupEditorComp from './popupEditorComp';\nimport useJsCellRenderer from './showJsRenderer';\nimport { BeansContext } from '../beansContext';\nimport { createSyncJsComp } from '../jsComp';\nimport { useEffectOnce } from '../useEffectOnce';\n\nexport enum CellCompState { ShowValue, EditValue }\n\nconst checkCellEditorDeprecations = (popup: boolean, cellEditor: ICellEditor, cellCtrl: CellCtrl) => {\n\n const col = cellCtrl.getColumn();\n\n // cellEditor is written to be a popup editor, however colDef.cellEditorPopup is not set\n if (!popup && cellEditor.isPopup && cellEditor.isPopup()) {\n const msg = `AG Grid: Found an issue in column ${col.getColId()}. If using React, specify an editor is a popup using colDef.cellEditorPopup=true. AG Grid React cannot depend on the editor component specifying if it's in a popup (via the isPopup() method on the editor), as React needs to know this information BEFORE the component is created.`;\n _.doOnce(() => console.warn(msg), 'jsEditorComp-isPopup-' + cellCtrl.getColumn().getColId());\n }\n\n // cellEditor is a popup and is trying to position itself the deprecated way\n if (popup && cellEditor.getPopupPosition && cellEditor.getPopupPosition()!=null) {\n const msg = `AG Grid: Found an issue in column ${col.getColId()}. If using React, specify an editor popup position using colDef.cellEditorPopupPosition=true. AG Grid React cannot depend on the editor component specifying it's position (via the getPopupPosition() method on the editor), as React needs to know this information BEFORE the component is created.`;\n _.doOnce(() => console.warn(msg), 'jsEditorComp-getPopupPosition-' + cellCtrl.getColumn().getColId());\n }\n}\n\nconst jsxEditValue = (\n editDetails: EditDetails, \n setInlineCellEditorRef: (cellEditor: ICellEditor | undefined)=>void,\n setPopupCellEditorRef: (cellEditor: ICellEditor | undefined)=>void,\n eGui: HTMLElement, \n cellCtrl: CellCtrl,\n jsEditorComp: ICellEditorComp | undefined ) => {\n\n const compDetails = editDetails.compDetails;\n const CellEditorClass = compDetails.componentClass;\n\n const reactInlineEditor = compDetails.componentFromFramework && !editDetails.popup;\n const reactPopupEditor = compDetails.componentFromFramework && editDetails.popup;\n const jsPopupEditor = !compDetails.componentFromFramework && editDetails.popup;\n\n return (\n <>\n\n { \n reactInlineEditor \n && \n }\n\n { \n reactPopupEditor \n && \n }/> \n }\n\n { \n jsPopupEditor && jsEditorComp && \n }\n \n )\n}\n\nconst jsxShowValue = (\n showDetails: RenderDetails,\n key: number,\n parentId: string,\n cellRendererRef: MutableRefObject,\n showCellWrapper: boolean,\n reactCellRendererStateless: boolean,\n setECellValue: (ref:any) => void\n) => {\n const {compDetails, value} = showDetails;\n\n const noCellRenderer = !compDetails;\n const reactCellRenderer = compDetails && compDetails.componentFromFramework;\n\n const CellRendererClass = compDetails && compDetails.componentClass;\n\n // if we didn't do this, objects would cause React error. we depend on objects for things\n // like the aggregation functions avg and count, which return objects and depend on toString()\n // getting called.\n const valueForNoCellRenderer = (value && value.toString) ? value.toString() : value;\n\n const bodyJsxFunc = () => (\n <>\n { noCellRenderer && <>{ valueForNoCellRenderer } }\n { reactCellRenderer && !reactCellRendererStateless && }\n { reactCellRenderer && reactCellRendererStateless && }\n \n );\n\n return (\n <>\n { showCellWrapper ?\n \n { bodyJsxFunc() }\n \n :\n bodyJsxFunc()\n }\n \n );\n}\n\nexport interface RenderDetails {\n compDetails: UserCompDetails | undefined;\n value?: any;\n force?: boolean;\n}\nexport interface EditDetails {\n compDetails: UserCompDetails;\n popup?: boolean;\n popupPosition?: string;\n}\n\nconst CellComp = (props: {\n cellCtrl: CellCtrl,\n printLayout: boolean, \n editingRow: boolean\n}) => {\n\n const {context} = useContext(BeansContext);\n\n const { cellCtrl, printLayout, editingRow } = props;\n\n const [renderDetails, setRenderDetails ] = useState();\n const [editDetails, setEditDetails ] = useState();\n const [renderKey, setRenderKey] = useState(1);\n\n const [cssClasses, setCssClasses] = useState(new CssClasses());\n const [userStyles, setUserStyles] = useState();\n\n const [tabIndex, setTabIndex] = useState();\n const [ariaDescribedBy, setAriaDescribedBy] = useState();\n const [role, setRole] = useState();\n const [colId, setColId] = useState();\n const [title, setTitle] = useState();\n const [includeSelection, setIncludeSelection] = useState(false);\n const [includeRowDrag, setIncludeRowDrag] = useState(false);\n const [includeDndSource, setIncludeDndSource] = useState(false);\n\n const [jsEditorComp, setJsEditorComp] = useState();\n\n const forceWrapper = useMemo( ()=> cellCtrl.isForceWrapper(), [] );\n const eGui = useRef(null);\n const cellRendererRef = useRef(null);\n const jsCellRendererRef = useRef();\n const cellEditorRef = useRef();\n\n // when setting the ref, we also update the state item to force a re-render\n const eCellWrapper = useRef();\n const [cellWrapperVersion, setCellWrapperVersion] = useState(0);\n const setCellWrapperRef = useCallback((ref: HTMLDivElement) => {\n eCellWrapper.current = ref;\n setCellWrapperVersion( v => v+1 );\n }, []);\n\n // when setting the ref, we also update the state item to force a re-render\n const eCellValue = useRef();\n const [cellValueVersion, setCellValueVersion] = useState(0);\n const setCellValueRef = useCallback( (ref: HTMLDivElement) => {\n eCellValue.current = ref;\n setCellValueVersion( v => v+1 );\n }, []);\n \n const showTools = renderDetails != null && (includeSelection || includeDndSource || includeRowDrag);\n const showCellWrapper = forceWrapper || showTools;\n\n const setCellEditorRef = useCallback((popup: boolean, cellEditor: ICellEditor | undefined) => {\n cellEditorRef.current = cellEditor;\n if (cellEditor) {\n checkCellEditorDeprecations(popup, cellEditor, cellCtrl);\n const editingCancelledByUserComp = cellEditor.isCancelBeforeStart && cellEditor.isCancelBeforeStart();\n if (editingCancelledByUserComp) {\n // we cannot set state inside render, so hack is to do it in next VM turn\n setTimeout( ()=> cellCtrl.stopEditing(), 0);\n }\n }\n }, []);\n\n const setPopupCellEditorRef = useCallback( \n (cellRenderer: ICellEditor | undefined) => setCellEditorRef(true, cellRenderer),\n []\n );\n\n const setInlineCellEditorRef = useCallback(\n (cellRenderer: ICellEditor | undefined) => setCellEditorRef(false, cellRenderer), \n []\n );\n\n useJsCellRenderer(renderDetails, showCellWrapper, eCellValue.current, cellValueVersion, jsCellRendererRef, eGui);\n\n // if RenderDetails changed, need to call refresh. This is not our preferred way (the preferred\n // way for React is just allow the new props to propagate down to the React Cell Renderer)\n // however we do this for backwards compatibility, as having refresh used to be supported.\n const lastRenderDetails = useRef();\n useEffect( ()=> {\n const oldDetails = lastRenderDetails.current;\n const newDetails = renderDetails;\n lastRenderDetails.current = renderDetails;\n\n // if not updating renderDetails, do nothing\n if (oldDetails==null || oldDetails.compDetails==null \n || newDetails==null || newDetails.compDetails==null) { return; }\n\n const oldCompDetails = oldDetails.compDetails;\n const newCompDetails = newDetails.compDetails;\n // if different Cell Renderer, then do nothing, as renderer will be recreated\n if (oldCompDetails.componentClass!=newCompDetails.componentClass) { return; }\n\n // if no refresh method, do nothing\n if (cellRendererRef.current==null || cellRendererRef.current.refresh==null) { return; }\n\n const result = cellRendererRef.current.refresh(newCompDetails.params);\n if (result!=true) {\n // increasing the render key forces the refresh. this is undocumented (for React users,\n // we don't document the refresh method, instead we tell them to act on new params).\n // however the GroupCellRenderer has this logic in it and would need a small refactor\n // to get it working without using refresh() returning false. so this hack staying in,\n // in React if refresh() is implemented and returns false (or undefined), we force a refresh\n setRenderKey( prev => prev + 1 );\n }\n\n }, [renderDetails]);\n\n useEffect(() => {\n const doingJsEditor = editDetails && !editDetails.compDetails.componentFromFramework;\n if (!doingJsEditor) { return; }\n\n const compDetails = editDetails!.compDetails;\n const isPopup = editDetails!.popup===true;\n \n const cellEditor = createSyncJsComp(compDetails) as ICellEditorComp;\n if (!cellEditor) { return; }\n\n const compGui = cellEditor.getGui();\n\n setCellEditorRef(isPopup, cellEditor);\n\n if (!isPopup) {\n eGui.current!.appendChild(compGui);\n cellEditor.afterGuiAttached && cellEditor.afterGuiAttached();\n }\n\n setJsEditorComp(cellEditor);\n\n return () => {\n context.destroyBean(cellEditor);\n setCellEditorRef(isPopup, undefined);\n setJsEditorComp(undefined);\n if (compGui && compGui.parentElement) {\n compGui.parentElement.removeChild(compGui);\n }\n };\n }, [editDetails]);\n\n // tool widgets effect\n useEffect(() => {\n if (!cellCtrl || !context) { return; }\n\n setAriaDescribedBy(!!eCellWrapper.current ? `cell-${cellCtrl.getInstanceId()}` : undefined);\n\n if (!eCellWrapper.current || !showCellWrapper) { return; }\n\n const destroyFuncs: (()=>void)[] = [];\n\n const addComp = (comp: Component | undefined) => {\n if (comp) {\n const eGui = comp.getGui();\n eCellWrapper.current!.insertAdjacentElement('afterbegin', eGui);\n destroyFuncs.push( ()=> {\n context.destroyBean(comp);\n _.removeFromParent(eGui);\n });\n }\n return comp;\n }\n\n if (includeSelection) {\n addComp(cellCtrl.createSelectionCheckbox());\n }\n\n if (includeDndSource) {\n addComp(cellCtrl.createDndSource());\n }\n\n if (includeRowDrag) {\n addComp(cellCtrl.createRowDragComp());\n }\n\n return () => {\n destroyFuncs.forEach(f => {\n f();\n })\n };\n\n }, [showCellWrapper, includeDndSource, includeRowDrag, includeSelection, cellWrapperVersion]);\n\n useEffectOnce(() => {\n if (!cellCtrl) { return; }\n\n const compProxy: ICellComp = {\n addOrRemoveCssClass: (name, on) => setCssClasses(prev => prev.setClass(name, on)),\n setUserStyles: styles => setUserStyles(styles),\n getFocusableElement: () => eGui.current!,\n setTabIndex: tabIndex => setTabIndex(tabIndex),\n setRole: role => setRole(role),\n setColId: colId => setColId(colId),\n setTitle: title => setTitle(title),\n setIncludeSelection: include => setIncludeSelection(include),\n setIncludeRowDrag: include => setIncludeRowDrag(include),\n setIncludeDndSource: include => setIncludeDndSource(include),\n \n getCellEditor: () => cellEditorRef.current || null,\n getCellRenderer: () => cellRendererRef.current ? cellRendererRef.current : jsCellRendererRef.current,\n getParentOfValue: () => eCellValue.current ? eCellValue.current : eCellWrapper.current ? eCellWrapper.current : eGui.current,\n\n setRenderDetails: (compDetails, value, force) => {\n setRenderDetails({\n value,\n compDetails,\n force\n });\n },\n \n setEditDetails: (compDetails, popup, popupPosition) => {\n if (compDetails) {\n // start editing\n setEditDetails({\n compDetails: compDetails!,\n popup,\n popupPosition\n });\n if (!popup) {\n setRenderDetails(undefined);\n }\n } else {\n // stop editing\n setEditDetails(undefined);\n }\n }\n };\n\n const cellWrapperOrUndefined = eCellWrapper.current || undefined;\n\n cellCtrl.setComp(compProxy, eGui.current!, cellWrapperOrUndefined, printLayout, editingRow);\n\n });\n\n const reactCellRendererStateless = useMemo( ()=> {\n const res = renderDetails && renderDetails.compDetails \n && renderDetails.compDetails.componentFromFramework \n && isComponentStateless(renderDetails.compDetails.componentClass);\n return !!res;\n }, [renderDetails]);\n\n const className = useMemo(() => {\n let res = cssClasses.toString();\n if (!showCellWrapper) {\n res += ' ag-cell-value';\n }\n return res;\n }, [cssClasses, showTools]);\n\n const cellInstanceId = useMemo(() => cellCtrl.getInstanceId(), []);\n\n const showContents = ()=> <>\n { renderDetails != null && jsxShowValue(\n renderDetails,\n renderKey,\n cellInstanceId,\n cellRendererRef,\n showCellWrapper,\n reactCellRendererStateless,\n setCellValueRef) \n }\n { editDetails != null && jsxEditValue(editDetails, setInlineCellEditorRef, setPopupCellEditorRef, eGui.current!, cellCtrl, jsEditorComp) }\n ;\n\n return (\n
\n\n { showCellWrapper ?\n
\n { showContents() }\n
\n :\n showContents()\n }\n\n
\n );\n}\n\nexport default memo(CellComp);\n","import { CellCtrl, PopupEditorWrapper } from '@ag-grid-community/core';\nimport React, { useEffect, useState, memo, useContext } from 'react';\nimport { createPortal } from 'react-dom';\nimport { EditDetails } from './cellComp';\nimport { BeansContext } from '../beansContext';\nimport { useEffectOnce } from '../useEffectOnce';\n\nconst PopupEditorComp = (props: {\n editDetails: EditDetails, \n cellCtrl: CellCtrl, \n eParentCell: HTMLElement,\n wrappedContent?: any,\n jsChildComp?: any\n }) => {\n\n const [popupEditorWrapper, setPopupEditorWrapper] = useState();\n\n const {context, popupService, gridOptionsWrapper} = useContext(BeansContext);\n\n useEffectOnce( () => {\n const {editDetails, cellCtrl, eParentCell} = props;\n const {compDetails} = editDetails;\n\n const useModelPopup = gridOptionsWrapper.isStopEditingWhenCellsLoseFocus();\n \n const wrapper = context.createBean(new PopupEditorWrapper(compDetails.params));\n const ePopupGui = wrapper.getGui();\n\n if (props.jsChildComp) {\n const eChildGui = props.jsChildComp.getGui();\n if (eChildGui) {\n ePopupGui.appendChild(eChildGui);\n }\n }\n\n const positionParams = {\n column: cellCtrl.getColumn(),\n rowNode: cellCtrl.getRowNode(),\n type: 'popupCellEditor',\n eventSource: eParentCell,\n ePopup: ePopupGui,\n keepWithinBounds: true\n };\n \n const positionCallback = editDetails!.popupPosition === 'under' ?\n popupService.positionPopupUnderComponent.bind(popupService, positionParams)\n : popupService.positionPopupOverComponent.bind(popupService, positionParams);\n\n const translate = gridOptionsWrapper.getLocaleTextFunc();\n \n const addPopupRes = popupService.addPopup({\n modal: useModelPopup,\n eChild: ePopupGui,\n closeOnEsc: true,\n closedCallback: () => { cellCtrl.onPopupEditorClosed(); },\n anchorToElement: eParentCell,\n positionCallback,\n ariaLabel: translate('ariaLabelCellEditor', 'Cell Editor')\n });\n \n const hideEditorPopup: (()=>void) | undefined = addPopupRes ? addPopupRes.hideFunc : undefined;\n\n setPopupEditorWrapper(wrapper);\n\n props.jsChildComp && props.jsChildComp.afterGuiAttached && props.jsChildComp.afterGuiAttached();\n\n return ()=> {\n if (hideEditorPopup!=null) {\n hideEditorPopup();\n }\n context.destroyBean(wrapper);\n };\n\n });\n\n return (\n <>\n { popupEditorWrapper && props.wrappedContent \n && createPortal(props.wrappedContent, popupEditorWrapper.getGui()) }\n \n );\n};\n\nexport default memo(PopupEditorComp);\n","import { ICellRendererComp } from '@ag-grid-community/core';\nimport { MutableRefObject, useCallback, useContext, useEffect } from 'react';\nimport { BeansContext } from '../beansContext';\nimport { useEffectOnce } from '../useEffectOnce';\nimport { RenderDetails } from './cellComp';\n\nconst useJsCellRenderer = (\n showDetails: RenderDetails | undefined,\n showTools: boolean,\n eCellValue: HTMLElement | undefined,\n cellValueVersion: number,\n jsCellRendererRef: MutableRefObject,\n eGui: MutableRefObject) => {\n\n const {context, userComponentFactory} = useContext(BeansContext);\n\n const destroyCellRenderer = useCallback(() => {\n const comp = jsCellRendererRef.current;\n if (!comp) { return; }\n\n const compGui = comp.getGui();\n\n if (compGui && compGui.parentElement) {\n compGui.parentElement.removeChild(compGui);\n }\n\n context.destroyBean(comp);\n jsCellRendererRef.current = undefined;\n }, []);\n\n // create or refresh JS cell renderer\n useEffect(() => {\n const showValue = showDetails != null;\n const jsCompDetails = showDetails && showDetails.compDetails && !showDetails.compDetails.componentFromFramework;\n const waitingForToolsSetup = showTools && eCellValue == null;\n const showComp = showValue && jsCompDetails && !waitingForToolsSetup;\n\n // if not showing comp, destroy any existing one and return\n if (!showComp) {\n destroyCellRenderer();\n return;\n }\n\n const compDetails = showDetails!.compDetails;\n\n if (jsCellRendererRef.current) {\n // attempt refresh if refresh method exists\n const comp = jsCellRendererRef.current;\n const attemptRefresh = comp.refresh != null && showDetails!.force == false;\n const refreshResult = attemptRefresh ? comp.refresh(compDetails!.params) : false;\n const refreshWorked = refreshResult === true || refreshResult === undefined;\n\n // if refresh worked, nothing else to do\n if (refreshWorked) { return; }\n\n // if refresh didn't work, we destroy it and continue, so new cell renderer created below\n destroyCellRenderer();\n }\n\n const promise = compDetails!.newAgStackInstance();;\n if (!promise) { return; }\n\n const comp = promise.resolveNow(null, x => x); // js comps are never async\n if (!comp) { return; }\n\n const compGui = comp.getGui();\n if (!compGui) { return; }\n\n const parent = showTools ? eCellValue! : eGui.current!;\n parent.appendChild(compGui);\n\n jsCellRendererRef.current = comp;\n\n }, [showDetails, showTools, cellValueVersion]);\n\n // this effect makes sure destroyCellRenderer gets called when the\n // component is destroyed. as the other effect only updates when there\n // is a change in state\n useEffectOnce(() => {\n return destroyCellRenderer;\n });\n}\n\nexport default useJsCellRenderer;\n","import { GridBodyCtrl, IGridBodyComp, RowContainerName } from '@ag-grid-community/core';\nimport React, { memo, useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport { BeansContext } from './beansContext';\nimport GridHeaderComp from './header/gridHeaderComp';\nimport useReactCommentEffect from './reactComment';\nimport RowContainerComp from './rows/rowContainerComp';\nimport { useEffectOnce } from './useEffectOnce';\nimport { classesList } from './utils';\n\ninterface SectionProperties {\n section: React.RefObject;\n className: string;\n style?: React.CSSProperties;\n}\n\nconst GridBodyComp = () => {\n\n const {context, agStackComponentsRegistry, resizeObserverService} = useContext(BeansContext);\n\n const [rowAnimationClass, setRowAnimationClass] = useState('');\n const [ariaColCount, setAriaColCount] = useState(0);\n const [ariaRowCount, setAriaRowCount] = useState(0);\n const [topHeight, setTopHeight] = useState(0);\n const [bottomHeight, setBottomHeight] = useState(0);\n const [topDisplay, setTopDisplay] = useState('');\n const [bottomDisplay, setBottomDisplay] = useState('');\n const [movingCss, setMovingCss] = useState(null);\n const [forceVerticalScrollClass, setForceVerticalScrollClass] = useState(null);\n const [topAndBottomOverflowY, setTopAndBottomOverflowY] = useState('');\n const [cellSelectableCss, setCellSelectableCss] = useState(null);\n\n // we initialise layoutClass to 'ag-layout-normal', because if we don't, the comp will initially\n // render with no width (as ag-layout-normal sets width to 0, which is needed for flex) which\n // gives the grid a massive width, which then renders a massive amount of columns. this problem\n // is due to React been async, for the non-async version (ie when not using React) this is not a\n // problem as the UI will finish initialising before we set data.\n const [layoutClass, setLayoutClass] = useState('ag-layout-normal');\n\n const eRoot = useRef(null);\n const eTop = useRef(null);\n const eBodyViewport = useRef(null);\n const eBottom = useRef(null);\n\n useReactCommentEffect(' AG Grid Body ', eRoot);\n useReactCommentEffect(' AG Pinned Top ', eTop);\n useReactCommentEffect(' AG Middle ', eBodyViewport);\n useReactCommentEffect(' AG Pinned Bottom ', eBottom);\n\n useEffectOnce( () => {\n const beansToDestroy: any[] = [];\n const destroyFuncs: (() => void)[] = [];\n\n if (!context) { return; }\n\n const newComp = (tag: string) => {\n const CompClass = agStackComponentsRegistry.getComponentClass(tag);\n const comp = context.createBean(new CompClass());\n beansToDestroy.push(comp);\n return comp;\n };\n\n eRoot.current!.appendChild(document.createComment(' AG Fake Horizontal Scroll '));\n eRoot.current!.appendChild(newComp('AG-FAKE-HORIZONTAL-SCROLL').getGui());\n\n eRoot.current!.appendChild(document.createComment(' AG Overlay Wrapper '));\n eRoot.current!.appendChild(newComp('AG-OVERLAY-WRAPPER').getGui());\n\n const compProxy: IGridBodyComp = {\n setRowAnimationCssOnBodyViewport: setRowAnimationClass,\n setColumnCount: setAriaColCount,\n setRowCount: setAriaRowCount,\n setTopHeight: setTopHeight,\n setBottomHeight: setBottomHeight,\n setTopDisplay: setTopDisplay,\n setBottomDisplay: setBottomDisplay,\n setColumnMovingCss: setMovingCss,\n updateLayoutClasses: setLayoutClass,\n setAlwaysVerticalScrollClass: setForceVerticalScrollClass,\n setPinnedTopBottomOverflowY: setTopAndBottomOverflowY,\n setCellSelectableCss: setCellSelectableCss,\n\n registerBodyViewportResizeListener: listener => {\n const unsubscribeFromResize = resizeObserverService.observeResize(eBodyViewport.current!, listener);\n destroyFuncs.push(() => unsubscribeFromResize());\n }\n };\n\n const ctrl = context.createBean(new GridBodyCtrl());\n beansToDestroy.push(ctrl);\n ctrl.setComp(compProxy, eRoot.current!, eBodyViewport.current!, eTop.current!, eBottom.current!);\n\n return () => {\n context.destroyBeans(beansToDestroy);\n destroyFuncs.forEach(f => f());\n };\n\n });\n\n const rootClasses = useMemo( ()=> \n classesList('ag-root','ag-unselectable', movingCss, layoutClass), \n [movingCss, layoutClass]\n );\n const bodyViewportClasses = useMemo( ()=> \n classesList('ag-body-viewport', rowAnimationClass, layoutClass, forceVerticalScrollClass, cellSelectableCss), \n [rowAnimationClass, layoutClass, forceVerticalScrollClass, cellSelectableCss]\n );\n const topClasses = useMemo( ()=> \n classesList('ag-floating-top', cellSelectableCss), \n [cellSelectableCss]\n );\n const bottomClasses = useMemo( ()=> \n classesList('ag-floating-bottom', cellSelectableCss), \n [cellSelectableCss]\n );\n\n const topStyle: React.CSSProperties = useMemo( () => ({\n height: topHeight,\n minHeight: topHeight,\n display: topDisplay,\n overflowY: (topAndBottomOverflowY as any)\n }), [topHeight, topDisplay, topAndBottomOverflowY]);\n\n const bottomStyle: React.CSSProperties = useMemo( ()=> ({\n height: bottomHeight,\n minHeight: bottomHeight,\n display: bottomDisplay,\n overflowY: (topAndBottomOverflowY as any)\n }), [bottomHeight, bottomDisplay, topAndBottomOverflowY]);\n\n const createRowContainer = (container: RowContainerName) => ;\n const createSection = ({\n section, \n children,\n className, \n style\n }: SectionProperties & { children: RowContainerName[] } ) => (\n
\n { children.map(createRowContainer) }\n
\n );\n\n return (\n
\n \n { createSection({ section: eTop, className: topClasses, style: topStyle, children: [\n RowContainerName.TOP_LEFT,\n RowContainerName.TOP_CENTER,\n RowContainerName.TOP_RIGHT,\n RowContainerName.TOP_FULL_WIDTH,\n ]}) }\n { createSection({ section: eBodyViewport, className: bodyViewportClasses, children: [\n RowContainerName.LEFT,\n RowContainerName.CENTER,\n RowContainerName.RIGHT,\n RowContainerName.FULL_WIDTH,\n ]}) }\n { createSection({ section: eBottom, className: bottomClasses, style: bottomStyle, children: [\n RowContainerName.BOTTOM_LEFT,\n RowContainerName.BOTTOM_CENTER,\n RowContainerName.BOTTOM_RIGHT,\n RowContainerName.BOTTOM_FULL_WIDTH,\n ]}) }\n
\n );\n};\n\nexport default memo(GridBodyComp);\n","import {\n Beans, Context,\n FocusService,\n GridCtrl,\n IGridComp\n} from '@ag-grid-community/core';\nimport React, { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { BeansContext } from './beansContext';\nimport GridBodyComp from './gridBodyComp';\nimport useReactCommentEffect from './reactComment';\nimport TabGuardComp, { TabGuardCompCallback } from './tabGuardComp';\nimport { useEffectOnce } from './useEffectOnce';\nimport { classesList } from './utils';\n\ninterface GridCompProps {\n context: Context;\n}\n\nconst GridComp = ({ context }: GridCompProps) => {\n\n const [rtlClass, setRtlClass] = useState('');\n const [keyboardFocusClass, setKeyboardFocusClass] = useState('');\n const [layoutClass, setLayoutClass] = useState('');\n const [cursor, setCursor] = useState(null);\n const [userSelect, setUserSelect] = useState(null);\n const [initialised, setInitialised] = useState(false);\n const [tabGuardReady, setTabGuardReady] = useState();\n\n const gridCtrlRef = useRef(null);\n const eRootWrapperRef = useRef(null);\n const tabGuardRef = useRef();\n const eGridBodyParentRef = useRef(null);\n const focusInnerElementRef = useRef<((fromBottom?: boolean) => void)>(() => undefined);\n\n const onTabKeyDown = useCallback(() => undefined, []);\n\n const beans = useMemo( ()=> context.getBean('beans') as Beans, []);\n\n useReactCommentEffect(' AG Grid ', eRootWrapperRef);\n\n // create shared controller.\n useEffectOnce(() => {\n const currentController = gridCtrlRef.current = context.createBean(new GridCtrl());\n\n return () => {\n context.destroyBean(currentController);\n gridCtrlRef.current = null;\n }\n });\n\n // initialise the UI\n useEffectOnce(() => {\n const gridCtrl = gridCtrlRef.current!;\n\n focusInnerElementRef.current = gridCtrl.focusInnerElement.bind(gridCtrl);\n\n const compProxy: IGridComp = {\n destroyGridUi:\n () => {}, // do nothing, as framework users destroy grid by removing the comp\n setRtlClass: setRtlClass,\n addOrRemoveKeyboardFocusClass:\n (addOrRemove: boolean) => setKeyboardFocusClass(addOrRemove ? FocusService.AG_KEYBOARD_FOCUS : ''),\n forceFocusOutOfContainer: () => {\n tabGuardRef.current!.forceFocusOutOfContainer();\n },\n updateLayoutClasses: setLayoutClass,\n getFocusableContainers: () => {\n const els: HTMLElement[] = [];\n\n const gridBodyCompEl = eRootWrapperRef.current!.querySelector('.ag-root');\n const sideBarEl = eRootWrapperRef.current!.querySelector('.ag-side-bar')\n\n if (gridBodyCompEl) {\n els.push(gridBodyCompEl as HTMLElement);\n }\n\n if (sideBarEl) {\n els.push(sideBarEl as HTMLElement);\n }\n\n return els;\n },\n setCursor,\n setUserSelect\n };\n\n gridCtrl.setComp(compProxy, eRootWrapperRef.current!, eRootWrapperRef.current!);\n\n setInitialised(true);\n });\n\n // initialise the extra components\n useEffect(() => {\n if (!tabGuardReady) { return; }\n\n const gridCtrl = gridCtrlRef.current!;\n const beansToDestroy: any[] = [];\n\n const {agStackComponentsRegistry} = beans;\n\n const HeaderDropZonesClass = agStackComponentsRegistry.getComponentClass('AG-GRID-HEADER-DROP-ZONES');\n const SideBarClass = agStackComponentsRegistry.getComponentClass('AG-SIDE-BAR');\n const StatusBarClass = agStackComponentsRegistry.getComponentClass('AG-STATUS-BAR');\n const WatermarkClass = agStackComponentsRegistry.getComponentClass('AG-WATERMARK');\n const PaginationClass = agStackComponentsRegistry.getComponentClass('AG-PAGINATION');\n const additionalEls: HTMLDivElement[] = [];\n const eRootWrapper = eRootWrapperRef.current!;\n const eGridBodyParent = eGridBodyParentRef.current!;\n\n if (gridCtrl.showDropZones() && HeaderDropZonesClass) {\n const headerDropZonesComp = context.createBean(new HeaderDropZonesClass());\n const eGui = headerDropZonesComp.getGui();\n eRootWrapper.insertAdjacentElement('afterbegin', eGui);\n additionalEls.push(eGui);\n beansToDestroy.push(headerDropZonesComp);\n }\n\n if (gridCtrl.showSideBar() && SideBarClass) {\n const sideBarComp = context.createBean(new SideBarClass());\n const eGui = sideBarComp.getGui();\n const bottomTabGuard = eGridBodyParent.querySelector('.ag-tab-guard-bottom');\n if (bottomTabGuard) {\n bottomTabGuard.insertAdjacentElement('beforebegin', eGui);\n additionalEls.push(eGui);\n }\n\n beansToDestroy.push(sideBarComp);\n }\n\n if (gridCtrl.showStatusBar() && StatusBarClass) {\n const statusBarComp = context.createBean(new StatusBarClass());\n const eGui = statusBarComp.getGui();\n eRootWrapper.insertAdjacentElement('beforeend', eGui);\n additionalEls.push(eGui);\n beansToDestroy.push(statusBarComp);\n }\n\n if (PaginationClass) {\n const paginationComp = context.createBean(new PaginationClass());\n const eGui = paginationComp.getGui();\n eRootWrapper.insertAdjacentElement('beforeend', eGui);\n additionalEls.push(eGui);\n beansToDestroy.push(paginationComp);\n }\n\n if (gridCtrl.showWatermark() && WatermarkClass) {\n const watermarkComp = context.createBean(new WatermarkClass());\n const eGui = watermarkComp.getGui();\n eRootWrapper.insertAdjacentElement('beforeend', eGui);\n additionalEls.push(eGui);\n beansToDestroy.push(watermarkComp);\n }\n\n return () => {\n context.destroyBeans(beansToDestroy);\n additionalEls.forEach(el => {\n if (el.parentElement) {\n el.parentElement.removeChild(el);\n }\n });\n }\n }, [tabGuardReady])\n\n const rootWrapperClasses = useMemo( ()=> classesList('ag-root-wrapper', rtlClass, keyboardFocusClass, layoutClass), [rtlClass, keyboardFocusClass, layoutClass]);\n const rootWrapperBodyClasses = useMemo( () => classesList('ag-root-wrapper-body', 'ag-focus-managed', layoutClass), [layoutClass]);\n\n const topStyle: React.CSSProperties = useMemo(() => ({\n userSelect: userSelect != null ? (userSelect as any) : '',\n WebkitUserSelect: userSelect != null ? (userSelect as any) : '',\n cursor: cursor != null ? cursor : ''\n }), [userSelect, cursor]);\n\n const eGridBodyParent = eGridBodyParentRef.current;\n\n const setTabGuardCompRef = useCallback((ref: TabGuardCompCallback) => {\n tabGuardRef.current = ref;\n setTabGuardReady(true);\n }, []);\n \n return (\n
\n
\n { initialised && eGridBodyParent &&\n \n \n { // we wait for initialised before rending the children, so GridComp has created and registered with it's\n // GridCtrl before we create the child GridBodyComp. Otherwise the GridBodyComp would initialise first,\n // before we have set the the Layout CSS classes, causing the GridBodyComp to render rows to a grid that\n // doesn't have it's height specified, which would result if all the rows getting rendered (and if many rows,\n // hangs the UI)\n \n }\n \n \n }\n
\n
\n );\n};\n\nexport default memo(GridComp);\n","import React, { memo, useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport { BeansContext } from '../beansContext';\nimport {\n IGridHeaderComp, GridHeaderCtrl, Constants\n} from '@ag-grid-community/core';\nimport { CssClasses } from '../utils';\nimport HeaderRowContainerComp from './headerRowContainerComp';\nimport { useEffectOnce } from '../useEffectOnce';\n\n\nconst GridHeaderComp = () => {\n\n const [cssClasses, setCssClasses] = useState(new CssClasses());\n const [height, setHeight] = useState();\n\n const {context} = useContext(BeansContext);\n const eGui = useRef(null);\n\n useEffectOnce(() => {\n\n const compProxy: IGridHeaderComp = {\n addOrRemoveCssClass: (name, on) => setCssClasses(prev => prev.setClass(name, on)),\n setHeightAndMinHeight: height => setHeight(height)\n };\n\n const ctrl = context.createBean(new GridHeaderCtrl());\n ctrl.setComp(compProxy, eGui.current!, eGui.current!);\n\n return () => {\n context.destroyBean(ctrl);\n };\n\n });\n\n const className = useMemo( ()=> {\n let res = cssClasses.toString();\n return 'ag-header ' + res;\n }, [cssClasses]);\n\n const style = useMemo( ()=> ({\n height: height,\n minHeight: height\n }), [height]);\n\n return (\n
\n \n \n \n
\n );\n};\n\nexport default memo(GridHeaderComp);\n","import React, { memo, useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport { BeansContext } from '../beansContext';\nimport { ColumnSortState, CssClassManager, HeaderCellCtrl, IHeader, IHeaderCellComp, UserCompDetails } from '@ag-grid-community/core';\nimport { isComponentStateless } from '../utils';\nimport { showJsComp } from '../jsComp';\nimport { useEffectOnce } from '../useEffectOnce';\n\nconst HeaderCellComp = (props: {ctrl: HeaderCellCtrl}) => {\n\n const { context } = useContext(BeansContext);\n const [width, setWidth] = useState();\n const [title, setTitle] = useState();\n const [colId, setColId] = useState();\n const [ariaSort, setAriaSort] = useState();\n const [ariaDescription, setAriaDescription] = useState();\n const [userCompDetails, setUserCompDetails] = useState();\n\n const eGui = useRef(null);\n const eResize = useRef(null);\n const userCompRef = useRef();\n\n const { ctrl } = props;\n\n const cssClassManager = useMemo(() => new CssClassManager(() => eGui.current!), []);\n\n useEffectOnce(() => {\n const compProxy: IHeaderCellComp = {\n setWidth: width => setWidth(width),\n addOrRemoveCssClass: (name, on) => cssClassManager.addOrRemoveCssClass(name, on),\n setColId: id => setColId(id),\n setTitle: title => setTitle(title),\n\n setAriaDescription: description => setAriaDescription(description),\n setAriaSort: sort => setAriaSort(sort),\n setUserCompDetails: compDetails => setUserCompDetails(compDetails),\n getUserCompInstance: () => userCompRef.current || undefined\n };\n\n ctrl.setComp(compProxy, eGui.current!, eResize.current!);\n\n const selectAllGui = ctrl.getSelectAllGui();\n eResize.current!.insertAdjacentElement('afterend', selectAllGui);\n });\n\n // js comps\n useEffect(() => showJsComp(\n userCompDetails, context, eGui.current!, userCompRef\n ), [userCompDetails]);\n\n // add drag handling, must be done after component is added to the dom\n useEffect(() => {\n let userCompDomElement: HTMLElement | undefined = undefined;\n eGui.current!.childNodes.forEach( node => {\n if (node != null && node !== eResize.current) {\n userCompDomElement = node as HTMLElement;\n }\n });\n\n ctrl.setDragSource(userCompDomElement);\n }, [userCompDetails]);\n\n const style = useMemo(() => ({ width }), [width]);\n\n const userCompStateless = useMemo(() => {\n const res = userCompDetails?.componentFromFramework && isComponentStateless(userCompDetails.componentClass);\n return !!res;\n }, [userCompDetails]);\n\n const reactUserComp = userCompDetails && userCompDetails.componentFromFramework;\n const UserCompClass = userCompDetails && userCompDetails.componentClass;\n\n return (\n \n
\n { reactUserComp && userCompStateless && }\n { reactUserComp && !userCompStateless && }\n
\n );\n};\n\nexport default memo(HeaderCellComp);\n","import React, { memo, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport { BeansContext } from '../beansContext';\nimport { AgPromise, HeaderFilterCellCtrl, ResolveAndRejectCallback, IFloatingFilter, IHeaderFilterCellComp, UserCompDetails } from '@ag-grid-community/core';\nimport { CssClasses, isComponentStateless } from '../utils';\nimport { showJsComp } from '../jsComp';\nimport { useEffectOnce } from '../useEffectOnce';\n\nconst HeaderFilterCellComp = (props: {ctrl: HeaderFilterCellCtrl}) => {\n\n const {context} = useContext(BeansContext);\n\n const [cssClasses, setCssClasses] = useState(new CssClasses());\n const [cssBodyClasses, setBodyCssClasses] = useState(new CssClasses());\n const [cssButtonWrapperClasses, setButtonWrapperCssClasses] = useState(new CssClasses());\n const [width, setWidth] = useState();\n const [userCompDetails, setUserCompDetails] = useState();\n\n const eGui = useRef(null);\n const eFloatingFilterBody = useRef(null);\n const eButtonWrapper = useRef(null);\n const eButtonShowMainFilter = useRef(null);\n\n const alreadyResolved = useRef(false);\n const userCompResolve = useRef<(value: IFloatingFilter)=>void>(); \n const userCompPromise = useRef>();\n useEffectOnce( ()=> {\n userCompPromise.current = new AgPromise( resolve => {\n userCompResolve.current = resolve;\n });\n });\n \n const userCompRef = (value: IFloatingFilter) => {\n // i don't know why, but react was calling this method multiple\n // times, thus un-setting, them immediately setting the reference again.\n // because we are resolving a promise, it's not good to be resolving\n // the promise multiple times, so we only resolve the first time.\n if (alreadyResolved.current) { return; }\n // we also skip when it's un-setting\n if (value==null) { return; }\n\n userCompResolve.current && userCompResolve.current(value);\n alreadyResolved.current = true;\n };\n\n const { ctrl } = props;\n\n useEffectOnce(() => {\n\n const compProxy: IHeaderFilterCellComp = {\n addOrRemoveCssClass: (name, on) => setCssClasses(prev => prev.setClass(name, on)),\n addOrRemoveBodyCssClass: (name, on) => setBodyCssClasses(prev => prev.setClass(name, on)),\n addOrRemoveButtonWrapperCssClass: (name, on) => setButtonWrapperCssClasses(prev => prev.setClass(name, on)),\n setWidth: width => setWidth(width),\n setCompDetails: compDetails => setUserCompDetails(compDetails),\n getFloatingFilterComp: ()=> userCompPromise.current ? userCompPromise.current : null,\n setMenuIcon: eIcon => eButtonShowMainFilter.current!.appendChild(eIcon)\n };\n\n ctrl.setComp(compProxy, eGui.current!, eButtonShowMainFilter.current!, eFloatingFilterBody.current!);\n\n });\n\n // js comps\n useEffect(() => {\n return showJsComp(userCompDetails, context, eFloatingFilterBody.current!, userCompRef);\n }, [userCompDetails]);\n\n const style = useMemo( ()=> ({\n width: width\n }), [width]);\n \n const className = useMemo( ()=> 'ag-header-cell ag-floating-filter ' + cssClasses.toString(), [cssClasses] );\n const bodyClassName = useMemo( ()=> cssBodyClasses.toString(), [cssBodyClasses] );\n const buttonWrapperClassName = useMemo( ()=> 'ag-floating-filter-button ' + cssButtonWrapperClasses.toString(), [cssBodyClasses] );\n\n const userCompStateless = useMemo( ()=> {\n const res = userCompDetails \n && userCompDetails.componentFromFramework \n && isComponentStateless(userCompDetails.componentClass);\n return !!res;\n }, [userCompDetails]);\n\n const reactUserComp = userCompDetails && userCompDetails.componentFromFramework;\n const UserCompClass = userCompDetails && userCompDetails.componentClass;\n\n return (\n
\n
\n { reactUserComp && userCompStateless && }\n { reactUserComp && !userCompStateless && }\n
\n
\n \n
\n
\n );\n};\n\nexport default memo(HeaderFilterCellComp);","import { HeaderGroupCellCtrl, IHeaderGroupCellComp, UserCompDetails } from '@ag-grid-community/core';\nimport React, { memo, useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport { BeansContext } from '../beansContext';\nimport { showJsComp } from '../jsComp';\nimport { useEffectOnce } from '../useEffectOnce';\nimport { CssClasses } from '../utils';\n\nconst HeaderGroupCellComp = (props: {ctrl: HeaderGroupCellCtrl}) => {\n\n const {context} = useContext(BeansContext);\n\n const [cssClasses, setCssClasses] = useState(new CssClasses());\n const [cssResizableClasses, setResizableCssClasses] = useState(new CssClasses());\n const [width, setWidth] = useState();\n const [title, setTitle] = useState();\n const [colId, setColId] = useState();\n const [ariaExpanded, setAriaExpanded] = useState<'true'|'false'|undefined>();\n const [userCompDetails, setUserCompDetails] = useState();\n\n const eGui = useRef(null);\n const eResize = useRef(null);\n\n const { ctrl } = props;\n\n useEffectOnce(() => {\n\n const compProxy: IHeaderGroupCellComp = {\n setWidth: width => setWidth(width),\n addOrRemoveCssClass: (name, on) => setCssClasses(prev => prev.setClass(name, on)),\n setColId: id => setColId(id),\n setTitle: title => setTitle(title),\n setUserCompDetails: compDetails => setUserCompDetails(compDetails),\n addOrRemoveResizableCssClass: (name, on) => setResizableCssClasses(prev => prev.setClass(name, on)),\n setAriaExpanded: expanded => setAriaExpanded(expanded)\n };\n\n ctrl.setComp(compProxy, eGui.current!, eResize.current!);\n\n });\n\n // js comps\n useEffect(() => {\n return showJsComp(userCompDetails, context, eGui.current!);\n }, [userCompDetails]);\n\n // add drag handling, must be done after component is added to the dom\n useEffect(()=> {\n let userCompDomElement: HTMLElement | undefined = undefined;\n eGui.current!.childNodes.forEach( node => {\n if (node!=null && node!==eResize.current) {\n userCompDomElement = node as HTMLElement;\n }\n });\n\n userCompDomElement && ctrl.setDragSource(userCompDomElement);\n }, [userCompDetails]);\n\n const style = useMemo( ()=> ({\n width: width\n }), [width]);\n \n const className = useMemo( ()=> 'ag-header-group-cell ' + cssClasses.toString(), [cssClasses] );\n const resizableClassName = useMemo( ()=> 'ag-header-cell-resize ' + cssResizableClasses.toString(), [cssResizableClasses] );\n\n const reactUserComp = userCompDetails && userCompDetails.componentFromFramework;\n const UserCompClass = userCompDetails && userCompDetails.componentClass;\n\n return (\n
\n { reactUserComp && }\n
\n
\n );\n};\n\nexport default memo(HeaderGroupCellComp);","import { AbstractHeaderCellCtrl, HeaderGroupCellCtrl, HeaderCellCtrl, HeaderFilterCellCtrl, HeaderRowCtrl, HeaderRowType, IHeaderRowComp, _ } from '@ag-grid-community/core';\nimport React, { memo, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport { BeansContext } from '../beansContext';\nimport HeaderCellComp from './headerCellComp';\nimport HeaderGroupCellComp from './headerGroupCellComp';\nimport HeaderFilterCellComp from './headerFilterCellComp';\nimport { useEffectOnce } from '../useEffectOnce';\n\nconst HeaderRowComp = (props: {ctrl: HeaderRowCtrl}) => {\n\n const {gridOptionsWrapper} = useContext(BeansContext);\n\n const [ transform, setTransform ] = useState();\n const [ height, setHeight ] = useState();\n const [ top, setTop ] = useState();\n const [ width, setWidth ] = useState();\n const [ ariaRowIndex, setAriaRowIndex ] = useState();\n const [ cellCtrls, setCellCtrls ] = useState([]);\n\n const eGui = useRef(null);\n\n const { ctrl } = props;\n\n const typeColumn = ctrl.getType() === HeaderRowType.COLUMN;\n const typeGroup = ctrl.getType() === HeaderRowType.COLUMN_GROUP;\n const typeFilter = ctrl.getType() === HeaderRowType.FLOATING_FILTER;\n\n const setCellCtrlsMaintainOrder = useCallback( (prev: AbstractHeaderCellCtrl[], next: AbstractHeaderCellCtrl[]) => {\n\n // if we are ensuring dom order, we set the ctrls into the dom in the same order they appear on screen\n if (gridOptionsWrapper.isEnsureDomOrder()) {\n return next;\n }\n\n // if not maintaining order, we want to keep the dom elements we have and add new ones to the end,\n // otherwise we will loose transition effects as elements are placed in different dom locations\n const prevMap = _.mapById(prev, c => c.getInstanceId());\n const nextMap = _.mapById(next, c => c.getInstanceId());\n\n const oldCtrlsWeAreKeeping = prev.filter( c => nextMap.has(c.getInstanceId()) );\n const newCtrls = next.filter( c => !prevMap.has(c.getInstanceId()) )\n\n return [...oldCtrlsWeAreKeeping, ...newCtrls];\n }, []);\n\n useEffectOnce(() => {\n\n const compProxy: IHeaderRowComp = {\n setTransform: transform => setTransform(transform),\n setHeight: height => setHeight(height),\n setTop: top => setTop(top),\n setHeaderCtrls: ctrls => setCellCtrls(prev => setCellCtrlsMaintainOrder(prev, ctrls)),\n setWidth: width => setWidth(width),\n setAriaRowIndex: rowIndex => setAriaRowIndex(rowIndex)\n };\n\n ctrl.setComp(compProxy);\n\n });\n\n const style = useMemo( ()=> ({\n transform: transform,\n height: height,\n top: top,\n width: width\n }), [transform, height, top, width]);\n\n const className = useMemo( ()=> {\n const res: string[] = [`ag-header-row`];\n \n typeColumn && res.push(`ag-header-row-column`);\n typeGroup && res.push(`ag-header-row-column-group`);\n typeFilter && res.push(`ag-header-row-column-filter`);\n\n return res.join(' ');\n }, []);\n\n const createCellJsx = useCallback( (cellCtrl: AbstractHeaderCellCtrl) => {\n switch (ctrl.getType()) {\n case HeaderRowType.COLUMN_GROUP :\n return ;\n\n case HeaderRowType.FLOATING_FILTER :\n return ;\n \n default :\n return ;\n }\n }, []);\n\n // below, we are not doing floating filters, not yet\n return (\n
\n { cellCtrls.map( createCellJsx ) }\n
\n );\n};\n\nexport default memo(HeaderRowComp);\n","import React, { memo, useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport { BeansContext } from '../beansContext';\nimport {\n IHeaderRowContainerComp, HeaderRowCtrl, HeaderRowContainerCtrl, Constants\n} from '@ag-grid-community/core';\nimport { CssClasses } from '../utils';\nimport HeaderRowComp from './headerRowComp';\nimport { useEffectOnce } from '../useEffectOnce';\n\n\nconst HeaderRowContainerComp = (props: {pinned: string | null}) => {\n\n const [cssClasses, setCssClasses] = useState(new CssClasses());\n const [centerContainerWidth, setCenterContainerWidth] = useState();\n const [centerContainerTransform, setCenterContainerTransform] = useState();\n const [pinnedContainerWidth, setPinnedContainerWidth] = useState();\n const [headerRowCtrls, setHeaderRowCtrls] = useState([]);\n\n const {context} = useContext(BeansContext);\n const eGui = useRef(null);\n\n const pinnedLeft = props.pinned === Constants.PINNED_LEFT;\n const pinnedRight = props.pinned === Constants.PINNED_RIGHT;\n const centre = !pinnedLeft && !pinnedRight;\n\n useEffectOnce(() => {\n\n const compProxy: IHeaderRowContainerComp = {\n addOrRemoveCssClass: (name, on) => setCssClasses(prev => prev.setClass(name, on)),\n setCtrls: ctrls => setHeaderRowCtrls(ctrls),\n\n // centre only\n setCenterWidth: width => setCenterContainerWidth(width),\n setContainerTransform: transform => setCenterContainerTransform(transform),\n\n // pinned only\n setPinnedContainerWidth: width => setPinnedContainerWidth(width)\n };\n\n const ctrl = context.createBean(new HeaderRowContainerCtrl(props.pinned));\n ctrl.setComp(compProxy, eGui.current!);\n\n return () => {\n context.destroyBean(ctrl);\n };\n\n });\n\n const className = useMemo( ()=> cssClasses.toString(), [cssClasses]);\n\n const insertRowsJsx = ()=> headerRowCtrls.map( ctrl => );\n\n const eCenterContainerStyle = useMemo( ()=> ({\n width: centerContainerWidth,\n transform: centerContainerTransform\n }), [centerContainerWidth, centerContainerTransform]);\n\n const ePinnedStyle = useMemo( ()=> ({\n width: pinnedContainerWidth,\n minWidth: pinnedContainerWidth,\n maxWidth: pinnedContainerWidth,\n }), [pinnedContainerWidth]);\n\n return (\n <>\n { \n pinnedLeft && \n
\n { insertRowsJsx() }\n
\n }\n { \n pinnedRight && \n
\n { insertRowsJsx() }\n
\n }\n { \n centre && \n
\n
\n { insertRowsJsx() }\n
\n
\n }\n \n );\n};\n\nexport default memo(HeaderRowContainerComp);\n","import { Context, AgPromise, UserCompDetails, ICellRendererComp } from '@ag-grid-community/core';\nimport { MutableRefObject } from 'react';\n\nexport const showJsComp = (\n compDetails: UserCompDetails | undefined, \n context: Context, eParent: HTMLElement, \n ref?: MutableRefObject | ((ref: any)=>void)\n) => {\n\n const doNothing = !compDetails || compDetails.componentFromFramework;\n if (doNothing) { return; }\n\n const promise = compDetails.newAgStackInstance();\n if (!promise) { return; }\n \n // almost all JS Comps are NOT async, however the Floating Multi Filter is Async as it could\n // be wrapping a React filter, so we need to cater for async comps here.\n\n let comp: any;\n let compGui: HTMLElement;\n let destroyed = false;\n\n promise.then( c => {\n\n if (destroyed) {\n context.destroyBean(c);\n return;\n }\n\n comp = c;\n compGui = comp.getGui();\n eParent.appendChild(compGui);\n setRef(ref, comp); \n });\n\n return () => {\n destroyed = true;\n if (!comp) { return; } // in case we were destroyed before async comp was returned\n\n if (compGui && compGui.parentElement) {\n compGui.parentElement.removeChild(compGui);\n }\n\n context.destroyBean(comp);\n\n if (ref) {\n setRef(ref, undefined);\n }\n };\n}\n\nconst setRef = (ref: MutableRefObject | ((ref: any)=>void) | undefined, value: any) => {\n if (!ref) { return; }\n \n if (ref instanceof Function) {\n const refCallback = ref as (ref: any)=>void;\n refCallback(value);\n } else {\n const refObj = ref as MutableRefObject;\n refObj.current = value;\n }\n};\n\nexport const createSyncJsComp = (compDetails: UserCompDetails): any => {\n const promise = compDetails.newAgStackInstance();\n if (!promise) { return; }\n return promise.resolveNow(null, x => x); // js comps are never async\n};\n","import { RefObject, useEffect } from 'react';\nimport { useEffectOnce } from './useEffectOnce';\n\nconst useReactCommentEffect = (comment: string, eForCommentRef: RefObject) => {\n useEffectOnce( () => {\n const eForComment = eForCommentRef.current!;\n const eParent = eForComment.parentElement;\n if (!eParent) { return; }\n const eComment = document.createComment(comment);\n eParent.insertBefore(eComment, eForComment);\n\n return () => {\n eParent.removeChild(eComment);\n };\n });\n};\n\nexport default useReactCommentEffect;","import React, { useEffect, useRef, useState, useMemo, memo, useContext } from 'react';\nimport { CellCtrl, RowContainerType, IRowComp, RowCtrl, UserCompDetails, ICellRenderer, CssClassManager } from '@ag-grid-community/core';\nimport { showJsComp } from '../jsComp';\nimport { isComponentStateless } from '../utils';\nimport { BeansContext } from '../beansContext';\nimport CellComp from '../cells/cellComp';\nimport { useEffectOnce } from '../useEffectOnce';\n\ninterface CellCtrls {\n list: CellCtrl[],\n instanceIdMap: Map\n}\n\nconst maintainOrderOnColumns = (prev: CellCtrls, next: CellCtrl[], domOrder: boolean): CellCtrls => {\n if (domOrder) {\n const res: CellCtrls = { list: next, instanceIdMap: new Map() };\n next.forEach(c => res.instanceIdMap.set(c.getInstanceId(), c));\n\n return res;\n }\n\n // if dom order not important, we don't want to change the order\n // of the elements in the dom, as this would break transition styles\n const oldCellCtrls: CellCtrl[] = [];\n const newCellCtrls: CellCtrl[] = [];\n const newInstanceIdMap: Map = new Map();\n const tempMap: Map = new Map();\n\n next.forEach(c => tempMap.set(c.getInstanceId(), c));\n\n prev.list.forEach(c => {\n const instanceId = c.getInstanceId();\n if (tempMap.has(instanceId)) {\n oldCellCtrls.push(c);\n newInstanceIdMap.set(instanceId, c);\n }\n });\n\n next.forEach(c => {\n const instanceId = c.getInstanceId();\n if (!prev.instanceIdMap.has(instanceId)) {\n newCellCtrls.push(c);\n newInstanceIdMap.set(instanceId, c);\n }\n });\n\n const res: CellCtrls = {\n list: [...oldCellCtrls, ...newCellCtrls],\n instanceIdMap: newInstanceIdMap\n };\n\n return res;\n}\n\nconst RowComp = (params: {rowCtrl: RowCtrl, containerType: RowContainerType}) => {\n\n const { context } = useContext(BeansContext);\n const { rowCtrl, containerType } = params;\n\n const [rowIndex, setRowIndex] = useState();\n const [rowId, setRowId] = useState();\n const [role, setRole] = useState();\n const [rowBusinessKey, setRowBusinessKey] = useState();\n const [tabIndex, setTabIndex] = useState();\n const [userStyles, setUserStyles] = useState();\n const [cellCtrls, setCellCtrls] = useState({ list: [], instanceIdMap: new Map() });\n const [fullWidthCompDetails, setFullWidthCompDetails] = useState();\n const [domOrder, setDomOrder] = useState(false);\n\n // these styles have initial values, so element is placed into the DOM with them,\n // rather than an transition getting applied.\n const [top, setTop] = useState(rowCtrl.getInitialRowTop());\n const [transform, setTransform] = useState(rowCtrl.getInitialTransform());\n\n const eGui = useRef(null);\n const fullWidthCompRef = useRef();\n\n const autoHeightSetup = useRef(false);\n const [autoHeightSetupAttempt, setAutoHeightSetupAttempt] = useState(0);\n\n // puts autoHeight onto full with detail rows. this needs trickery, as we need\n // the HTMLElement for the provided Detail Cell Renderer, however the Detail Cell Renderer\n // could be a stateless React Func Comp which won't work with useRef, so we need\n // to poll (we limit to 10) looking for the Detail HTMLElement (which will be the only\n // child) after the fullWidthCompDetails is set.\n useEffect(() => {\n if (autoHeightSetup.current) { return; }\n if (!fullWidthCompDetails) { return; }\n if (autoHeightSetupAttempt>10) { return; }\n\n const eChild = eGui.current?.firstChild as HTMLElement;\n if (eChild) {\n rowCtrl.setupDetailRowAutoHeight(eChild);\n autoHeightSetup.current = true;\n } else {\n setAutoHeightSetupAttempt( prev => prev + 1);\n }\n\n }, [fullWidthCompDetails, autoHeightSetupAttempt]);\n\n const cssClassManager = useMemo(() => new CssClassManager(() => eGui.current!), []);\n\n useEffectOnce(() => {\n // because React is asychronous, it's possible the RowCtrl is no longer a valid RowCtrl. This can\n // happen if user calls two API methods one after the other, with the second API invalidating the rows\n // the first call created. Thus the rows for the first call could still get created even though no longer needed.\n if (!rowCtrl.isAlive()) { return; }\n const compProxy: IRowComp = {\n // the rowTop is managed by state, instead of direct style manipulation by rowCtrl (like all the other styles)\n // as we need to have an initial value when it's placed into he DOM for the first time, for animation to work.\n setTop: value => setTop(value),\n setTransform: value => setTransform(value),\n\n // i found using React for managing classes at the row level was to slow, as modifying classes caused a lot of\n // React code to execute, so avoiding React for managing CSS Classes made the grid go much faster.\n addOrRemoveCssClass: (name, on) => cssClassManager.addOrRemoveCssClass(name, on),\n\n setDomOrder: domOrder => setDomOrder(domOrder),\n setRowIndex: value => setRowIndex(value),\n setRowId: value => setRowId(value),\n setRowBusinessKey: value => setRowBusinessKey(value),\n setTabIndex: value => setTabIndex(value),\n setUserStyles: styles => setUserStyles(styles),\n setRole: value => setRole(value),\n // if we don't maintain the order, then cols will be ripped out and into the dom\n // when cols reordered, which would stop the CSS transitions from working\n setCellCtrls: next => setCellCtrls(prev => maintainOrderOnColumns(prev, next, domOrder)),\n showFullWidth: compDetails => setFullWidthCompDetails(compDetails),\n getFullWidthCellRenderer: ()=> fullWidthCompRef.current,\n };\n rowCtrl.setComp(compProxy, eGui.current!, containerType);\n });\n\n useEffect(() => showJsComp(\n fullWidthCompDetails, context, eGui.current!, fullWidthCompRef\n ), [fullWidthCompDetails]);\n\n const rowStyles = useMemo(() => {\n const res = { top, transform };\n\n Object.assign(res, userStyles);\n return res;\n }, [top, transform, userStyles]);\n\n const showFullWidthFramework = fullWidthCompDetails && fullWidthCompDetails.componentFromFramework;\n const showCells = cellCtrls != null;\n \n const reactFullWidthCellRendererStateless = useMemo(() => {\n const res = fullWidthCompDetails?.componentFromFramework && isComponentStateless(fullWidthCompDetails.componentClass);\n return !!res;\n }, [fullWidthCompDetails]);\n\n const showCellsJsx = () => cellCtrls.list.map(cellCtrl => (\n \n ));\n\n const showFullWidthFrameworkJsx = () => {\n const FullWidthComp = fullWidthCompDetails!.componentClass;\n return (\n <>\n {\n reactFullWidthCellRendererStateless \n && \n }\n {\n !reactFullWidthCellRendererStateless \n && \n }\n \n );\n };\n\n return (\n \n { showCells && showCellsJsx() }\n { showFullWidthFramework && showFullWidthFrameworkJsx() }\n
\n );\n};\n\nexport default memo(RowComp);\n","import { getRowContainerTypeForName, IRowContainerComp, RowContainerCtrl, RowContainerName, RowCtrl } from '@ag-grid-community/core';\nimport React, { useEffect, useMemo, useRef, useState, memo, useContext } from 'react';\nimport { classesList } from '../utils';\nimport useReactCommentEffect from '../reactComment';\nimport RowComp from './rowComp';\nimport { BeansContext } from '../beansContext';\nimport { useEffectOnce } from '../useEffectOnce';\n\nconst RowContainerComp = (params: {name: RowContainerName}) => {\n\n const {context} = useContext(BeansContext);\n\n const [viewportHeight, setViewportHeight] = useState('');\n const [rowCtrlsOrdered, setRowCtrlsOrdered] = useState([]);\n const [rowCtrls, setRowCtrls] = useState([]);\n const [domOrder, setDomOrder] = useState(false);\n const [containerWidth, setContainerWidth] = useState('');\n\n const { name } = params;\n const containerType = useMemo(() => getRowContainerTypeForName(name), [name]);\n\n const eWrapper = useRef(null);\n const eViewport = useRef(null);\n const eContainer = useRef(null);\n\n const cssClasses = useMemo(() => RowContainerCtrl.getRowContainerCssClasses(name), [name]);\n const wrapperClasses = useMemo( ()=> classesList(cssClasses.wrapper), []);\n const viewportClasses = useMemo( ()=> classesList(cssClasses.viewport), []);\n const containerClasses = useMemo( ()=> classesList(cssClasses.container), []);\n\n // no need to useMemo for boolean types\n const template1 = name === RowContainerName.CENTER;\n const template2 = name === RowContainerName.TOP_CENTER || name === RowContainerName.BOTTOM_CENTER;\n const template3 = !template1 && !template2;\n\n const topLevelRef = template1 ? eWrapper : template2 ? eViewport : eContainer;\n\n useReactCommentEffect(' AG Row Container ' + name + ' ', topLevelRef);\n\n // if domOrder=true, then we just copy rowCtrls into rowCtrlsOrdered observing order,\n // however if false, then we need to keep the order as they are in the dom, otherwise rowAnimation breaks\n useEffect( () => {\n setRowCtrlsOrdered( prev => {\n if (domOrder) {\n return rowCtrls;\n }\n // if dom order not important, we don't want to change the order\n // of the elements in the dom, as this would break transition styles\n const oldRows = prev.filter(r => rowCtrls.indexOf(r) >= 0);\n const newRows = rowCtrls.filter(r => oldRows.indexOf(r) < 0);\n const next = [...oldRows, ...newRows];\n return next;\n });\n }, [domOrder, rowCtrls]);\n\n useEffectOnce(() => {\n const beansToDestroy: any[] = [];\n\n const compProxy: IRowContainerComp = {\n setViewportHeight: setViewportHeight,\n setRowCtrls: rowCtrls => setRowCtrls(rowCtrls),\n setDomOrder: domOrder => setDomOrder(domOrder),\n setContainerWidth: width => setContainerWidth(width)\n };\n\n const ctrl = context.createBean(new RowContainerCtrl(name));\n beansToDestroy.push(ctrl);\n ctrl.setComp(compProxy, eContainer.current!, eViewport.current!, eWrapper.current!);\n\n return () => {\n context.destroyBeans(beansToDestroy);\n };\n\n });\n\n const viewportStyle = useMemo(() => ({\n height: viewportHeight\n }), [viewportHeight]);\n\n const containerStyle = useMemo(() => ({\n width: containerWidth\n }), [containerWidth]);\n\n const buildContainer = () => (\n \n {\n rowCtrlsOrdered.map(rowCtrl => )\n }\n
\n );\n\n return (\n <>\n {\n template1 &&\n
\n
\n { buildContainer() }\n
\n
\n }\n {\n template2 &&\n
\n { buildContainer() }\n
\n }\n {\n template3 && buildContainer()\n }\n \n );\n};\n\nexport default memo(RowContainerComp);\n","import React, { useRef, useEffect, useState, forwardRef, useImperativeHandle, ForwardRefRenderFunction, memo, useContext } from 'react';\n\nimport {\n TabGuardCtrl, ITabGuard, GridCtrl\n} from '@ag-grid-community/core';\nimport { BeansContext } from './beansContext';\nimport { useEffectOnce } from './useEffectOnce';\n\nexport interface TabGuardCompCallback {\n forceFocusOutOfContainer(): void;\n}\n\ninterface TabGuardProps {\n children: React.ReactNode,\n eFocusableElement: HTMLDivElement,\n onTabKeyDown: (e: KeyboardEvent) => void,\n gridCtrl: GridCtrl,\n}\n\nconst TabGuardCompRef: ForwardRefRenderFunction = (props: any, forwardRef: any) => {\n\n const { children, eFocusableElement, onTabKeyDown, gridCtrl } = props;\n const { context } = useContext(BeansContext);\n\n const topTabGuardRef = useRef(null);\n const bottomTabGuardRef = useRef(null);\n const tabGuardCtrlRef = useRef();\n const [tabIndex, setTabIndex] = useState();\n\n useImperativeHandle(forwardRef, () => ({\n forceFocusOutOfContainer() {\n tabGuardCtrlRef.current!.forceFocusOutOfContainer();\n }\n }));\n\n useEffectOnce(() => {\n const eTopGuard = topTabGuardRef.current!;\n const eBottomGuard = bottomTabGuardRef.current!;\n\n const compProxy: ITabGuard = {\n setTabIndex: value => value == null ? setTabIndex(undefined) : setTabIndex(parseInt(value, 10))\n }\n\n const ctrl = tabGuardCtrlRef.current = context.createBean(new TabGuardCtrl({\n comp: compProxy,\n eTopGuard: eTopGuard,\n eBottomGuard: eBottomGuard,\n eFocusableElement: eFocusableElement,\n \n onTabKeyDown: onTabKeyDown,\n focusInnerElement: fromBottom => gridCtrl.focusInnerElement(fromBottom)\n }));\n\n return () => {\n context.destroyBean(ctrl);\n };\n\n });\n\n const createTabGuard = (side: 'top' | 'bottom') => (\n
\n )\n return (\n <>\n {createTabGuard('top')}\n { children }\n {createTabGuard('bottom')}\n \n )\n};\n\nconst TabGuardComp = forwardRef(TabGuardCompRef);\n\nexport default memo(TabGuardComp);\n","import { useEffect, useRef, useState } from 'react';\n\nexport const useEffectOnce = (effect: () => void | (() => void)) => {\n const destroyFunc = useRef void)>();\n const effectCalled = useRef(false);\n const renderAfterCalled = useRef(false);\n const [val, setVal] = useState(0);\n \n if (effectCalled.current) {\n renderAfterCalled.current = true;\n }\n \n useEffect(() => {\n // only execute the effect first time around\n if (!effectCalled.current) {\n destroyFunc.current = effect();\n effectCalled.current = true;\n }\n \n // this forces one render after the effect is run\n setVal((val) => val + 1);\n \n return () => {\n // if the comp didn't render since the useEffect was called,\n // we know it's the dummy React cycle\n if (!renderAfterCalled.current) { return; }\n\n // otherwise this is not a dummy destroy, so call the destroy func\n if (destroyFunc.current) { destroyFunc.current(); }\n };\n }, []);\n };\n","export const classesList = (...list: (string | null | undefined)[]): string => {\n const filtered = list.filter( s => s != null && s !== '');\n\n return filtered.join(' ');\n}\n\nexport class CssClasses {\n\n private classesMap: {[name: string]: boolean} = {};\n\n constructor(...initialClasses: string[]) {\n initialClasses.forEach(className => {\n this.classesMap[className] = true;\n });\n }\n\n public setClass(className: string, on: boolean): CssClasses {\n // important to not make a copy if nothing has changed, so react\n // won't trigger a render cycle on new object instance\n const nothingHasChanged = !!this.classesMap[className] == on;\n if (nothingHasChanged) { return this; }\n\n const res = new CssClasses();\n res.classesMap = {...this.classesMap};\n res.classesMap[className] = on;\n return res;\n }\n\n public toString(): string {\n const res = Object.keys(this.classesMap).filter(key => this.classesMap[key]).join(' ');\n return res;\n }\n\n}\n\nexport const isComponentStateless = (Component: any) => {\n const hasSymbol = () => typeof Symbol === 'function' && Symbol.for;\n const getMemoType = () => hasSymbol() ? Symbol.for('react.memo') : 0xead3;\n\n return (\n typeof Component === 'function' && !(Component.prototype && Component.prototype.isReactComponent)\n ) || (typeof Component === 'object' && Component.$$typeof === getMemoType());\n}","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport * as AgGrid from '@ag-grid-community/core';\nimport { ColDef, ColGroupDef } from '@ag-grid-community/core';\n\nexport interface AgGridColumnProps extends ColDef {\n}\n\nexport interface AgGridColumnGroupProps extends ColGroupDef {\n}\n\nexport class AgGridColumn extends Component {\n constructor(public props: any) {\n super(props);\n }\n\n render() {\n return null;\n }\n\n public static mapChildColumnDefs(children: any) {\n return React.Children.map(children, child => !!child ? AgGridColumn.toColDef(child.props) : null);\n }\n\n public static toColDef(columnProps: any): ColDef {\n const { children, ...colDef } = columnProps;\n\n if (AgGridColumn.hasChildColumns(children)) {\n colDef.children = AgGridColumn.mapChildColumnDefs(children);\n }\n\n return colDef;\n }\n\n public static hasChildColumns(children: any): boolean {\n return React.Children.count(children) > 0;\n }\n}\n\naddProperties(AgGrid.ColDefUtil.BOOLEAN_PROPERTIES, PropTypes.bool);\naddProperties(AgGrid.ColDefUtil.STRING_PROPERTIES, PropTypes.string);\naddProperties(AgGrid.ColDefUtil.OBJECT_PROPERTIES, PropTypes.object);\naddProperties(AgGrid.ColDefUtil.ARRAY_PROPERTIES, PropTypes.array);\naddProperties(AgGrid.ColDefUtil.NUMBER_PROPERTIES, PropTypes.number);\naddProperties(AgGrid.ColDefUtil.FUNCTION_PROPERTIES, PropTypes.func);\n\nfunction addProperties(listOfProps: string[], propType: any) {\n listOfProps.forEach((propKey: string) => {\n // @ts-ignore\n AgGridColumn[propKey] = propType;\n });\n}\n","export enum ChangeDetectionStrategyType {\n IdentityCheck = 'IdentityCheck',\n DeepValueCheck = 'DeepValueCheck',\n NoCheck = 'NoCheck'\n}\n\nexport interface ChangeDetectionStrategy {\n areEqual(a: any, b: any): boolean;\n}\n\nclass SimpleFunctionalStrategy implements ChangeDetectionStrategy {\n private strategy: (a: any, b: any) => boolean;\n\n constructor(strategy: (a: any, b: any) => boolean) {\n this.strategy = strategy;\n }\n\n areEqual(a: any, b: any): boolean {\n return this.strategy(a, b);\n }\n}\n\nclass DeepValueStrategy implements ChangeDetectionStrategy {\n areEqual(a: any, b: any): boolean {\n return DeepValueStrategy.areEquivalent(DeepValueStrategy.copy(a), DeepValueStrategy.copy(b));\n }\n\n /*\n * deeper object comparison - taken from https://stackoverflow.com/questions/1068834/object-comparison-in-javascript\n */\n static unwrapStringOrNumber(obj: any) {\n return obj instanceof Number || obj instanceof String ? obj.valueOf() : obj;\n }\n\n // sigh, here for ie compatibility\n static copy(value: any): any {\n if (!value) {\n return value;\n }\n\n if (Array.isArray(value)) {\n // shallow copy the array - this will typically be either rowData or columnDefs\n const arrayCopy = [];\n for (let i = 0; i < value.length; i++) {\n arrayCopy.push(this.copy(value[i]));\n }\n return arrayCopy;\n }\n\n // for anything without keys (boolean, string etc).\n // Object.keys - chrome will swallow them\n if (typeof value !== \"object\") {\n return value;\n }\n\n return [{}, value].reduce((r, o) => {\n Object.keys(o).forEach(function (k) {\n r[k] = o[k];\n });\n return r;\n }, {});\n }\n\n static isNaN(value: any) {\n if(Number.isNaN) {\n return Number.isNaN(value);\n }\n // for ie11...\n return typeof(value) === 'number' && isNaN(value);\n }\n /*\n * slightly modified, but taken from https://stackoverflow.com/questions/1068834/object-comparison-in-javascript\n *\n * What we're trying to do here is determine if the property being checked has changed in _value_, not just in reference\n *\n * For eg, if a user updates the columnDefs via property binding, but the actual columns defs are the same before and\n * after, then we don't want the grid to re-render\n */\n static areEquivalent(a: any, b: any) {\n a = DeepValueStrategy.unwrapStringOrNumber(a);\n b = DeepValueStrategy.unwrapStringOrNumber(b);\n if (a === b) return true; //e.g. a and b both null\n if (a === null || b === null || typeof a !== typeof b) return false;\n if(DeepValueStrategy.isNaN(a) && DeepValueStrategy.isNaN(b)) {\n return true;\n }\n if (a instanceof Date) {\n return b instanceof Date && a.valueOf() === b.valueOf();\n }\n if (typeof a === \"function\") {\n // false to allow for callbacks to be reactive...\n return false;\n }\n if (typeof a !== \"object\" ||\n (a.$$typeof && a.$$typeof.toString() === \"Symbol(react.element)\")) {\n return a == b; //for boolean, number, string, function, xml\n }\n if(Object.isFrozen(a) || Object.isFrozen(b)) {\n return a === b;\n }\n\n const newA = a.areEquivPropertyTracking === undefined,\n newB = b.areEquivPropertyTracking === undefined;\n try {\n let prop;\n if (newA) {\n a.areEquivPropertyTracking = [];\n } else if (\n a.areEquivPropertyTracking.some(function (other: any) {\n return other === b;\n })\n )\n return true;\n if (newB) {\n b.areEquivPropertyTracking = [];\n } else if (b.areEquivPropertyTracking.some((other: any) => other === a)) {\n return true;\n }\n a.areEquivPropertyTracking.push(b);\n b.areEquivPropertyTracking.push(a);\n\n const tmp = {};\n for (prop in a)\n if (prop != \"areEquivPropertyTracking\") {\n (tmp as any)[prop] = null;\n }\n for (prop in b)\n if (prop != \"areEquivPropertyTracking\") {\n (tmp as any)[prop] = null;\n }\n\n for (prop in tmp) {\n if (!this.areEquivalent(a[prop], b[prop])) {\n return false;\n }\n }\n return true;\n } finally {\n if (newA) delete a.areEquivPropertyTracking;\n if (newB) delete b.areEquivPropertyTracking;\n }\n }\n}\n\nexport class ChangeDetectionService {\n private strategyMap: { [key in ChangeDetectionStrategyType]: ChangeDetectionStrategy } = {\n [ChangeDetectionStrategyType.DeepValueCheck]: new DeepValueStrategy(),\n [ChangeDetectionStrategyType.IdentityCheck]: new SimpleFunctionalStrategy((a, b) => a === b),\n [ChangeDetectionStrategyType.NoCheck]: new SimpleFunctionalStrategy((a, b) => false)\n };\n\n public getStrategy(changeDetectionStrategy: ChangeDetectionStrategyType): ChangeDetectionStrategy {\n return this.strategyMap[changeDetectionStrategy];\n }\n}","let counter = 0;\nexport default function generateNewKey() {\n return `agPortalKey_${++counter}`;\n}\n","import { ReactPortal, createElement } from 'react';\nimport { createPortal } from 'react-dom';\nimport { ComponentType, AgPromise } from '@ag-grid-community/core';\nimport { ReactComponent } from './reactComponent';\nimport { renderToStaticMarkup } from \"react-dom/server\";\nimport generateNewKey from \"./keyGenerator\";\nimport { PortalManager } from './portalManager';\n\n\nexport class NewReactComponent extends ReactComponent {\n \n private key: string;\n private portalKey: string;\n private oldPortal: ReactPortal | null = null;\n private reactElement: any;\n private params: any;\n\n constructor(reactComponent: any, parentComponent: PortalManager, componentType: ComponentType) {\n super(reactComponent, parentComponent, componentType);\n\n this.key = generateNewKey();\n this.portalKey = generateNewKey();\n }\n\n public init(params: any): AgPromise {\n this.eParentElement = this.createParentElement(params);\n this.params = params;\n\n this.createOrUpdatePortal(params);\n\n return new AgPromise(resolve => this.createReactComponent(resolve));\n }\n\n private createOrUpdatePortal(params: any) {\n if (!this.isStatelessComponent()) {\n // grab hold of the actual instance created\n params.ref = (element: any) => {\n this.componentInstance = element;\n this.addParentContainerStyleAndClasses();\n };\n }\n\n this.reactElement = createElement(this.reactComponent, { ...params, key: this.key });\n\n this.portal = createPortal(\n this.reactElement,\n this.eParentElement as any,\n this.portalKey // fixed deltaRowModeRefreshCompRenderer\n );\n }\n\n private createReactComponent(resolve: (value: any) => void) {\n this.portalManager.mountReactPortal(this.portal!, this, (value: any) => {\n resolve(value);\n });\n }\n\n public isNullValue(): boolean {\n return this.valueRenderedIsNull(this.params);\n }\n\n rendered(): boolean {\n return (this.isStatelessComponent() && this.statelessComponentRendered()) ||\n !!(!this.isStatelessComponent() && this.getFrameworkComponentInstance());\n }\n\n private valueRenderedIsNull(params: any): boolean {\n // we only do this for cellRenderers\n if (!this.componentType.cellRenderer) {\n return false;\n }\n\n // we've no way of knowing if a component returns null without rendering it first\n // so we render it to markup and check the output - if it'll be null we know and won't timeout\n // waiting for a component that will never be created\n\n const originalConsoleError = console.error;\n try {\n // if a user is doing anything that uses useLayoutEffect (like material ui) then it will throw and we\n // can't do anything to stop it; this is just a warning and has no effect on anything so just suppress it\n // for this single operation\n console.error = () => {\n };\n const staticMarkup = renderToStaticMarkup(createElement(this.reactComponent, params));\n return staticMarkup === '';\n } catch (ignore) {\n } finally {\n console.error = originalConsoleError;\n }\n\n return false;\n }\n\n /*\n * fallback methods - these will be invoked if a corresponding instance method is not present\n * for example if refresh is called and is not available on the component instance, then refreshComponent on this\n * class will be invoked instead\n *\n * Currently only refresh is supported\n */\n protected refreshComponent(args: any): void {\n this.oldPortal = this.portal;\n this.createOrUpdatePortal(args);\n this.portalManager.updateReactPortal(this.oldPortal!, this.portal!);\n }\n\n protected fallbackMethod(name: string, params: any): any {\n const method = (this as any)[`${name}Component`];\n if (!!method) {\n return method.bind(this)(params);\n }\n }\n\n protected fallbackMethodAvailable(name: string): boolean {\n const method = (this as any)[`${name}Component`];\n return !!method;\n }\n}\n","import { Component, ReactPortal } from \"react\";\nimport { ReactComponent } from \"./reactComponent\";\n\nexport class PortalManager {\n\n private static MAX_COMPONENT_CREATION_TIME_IN_MS: number = 1000; // a second should be more than enough to instantiate a component\n\n private parent: Component;\n private wrappingElement: string;\n private destroyed = false;\n\n private portals: ReactPortal[] = [];\n private hasPendingPortalUpdate = false;\n\n private maxComponentCreationTimeMs: number;\n\n constructor(parent: Component, wrappingElement?: string, maxComponentCreationTimeMs?: number) {\n this.wrappingElement = wrappingElement ? wrappingElement : 'div';\n this.parent = parent;\n this.maxComponentCreationTimeMs = maxComponentCreationTimeMs ? maxComponentCreationTimeMs : PortalManager.MAX_COMPONENT_CREATION_TIME_IN_MS;\n }\n\n public getPortals(): ReactPortal[] {\n return this.portals;\n }\n\n public destroy(): void {\n this.destroyed = true;\n }\n\n public destroyPortal(portal: ReactPortal): void {\n this.portals = this.portals.filter(curPortal => curPortal !== portal);\n this.batchUpdate();\n }\n\n public getComponentWrappingElement(): string | undefined {\n return this.wrappingElement;\n }\n\n public mountReactPortal(portal: ReactPortal, reactComponent: ReactComponent, resolve: (value: any) => void): void {\n this.portals = [...this.portals, portal];\n this.waitForInstance(reactComponent, resolve);\n this.batchUpdate();\n }\n\n public updateReactPortal(oldPortal: ReactPortal, newPortal: ReactPortal): void {\n this.portals[this.portals.indexOf(oldPortal)] = newPortal;\n this.batchUpdate();\n }\n\n private batchUpdate(): void {\n if (this.hasPendingPortalUpdate) {\n return;\n }\n\n setTimeout(() => {\n if (!this.destroyed) { // destroyed?\n this.parent.forceUpdate(() => {\n this.hasPendingPortalUpdate = false;\n });\n }\n });\n\n this.hasPendingPortalUpdate = true;\n }\n\n waitForInstance(reactComponent: ReactComponent, resolve: (value: any) => void, startTime = Date.now()): void {\n // if the grid has been destroyed in the meantime just resolve\n if (this.destroyed) {\n resolve(null);\n return;\n }\n\n if (reactComponent.rendered()) {\n resolve(reactComponent);\n } else {\n if (Date.now() - startTime >= this.maxComponentCreationTimeMs! && !this.hasPendingPortalUpdate) {\n // last check - we check if this is a null value being rendered - we do this last as using SSR to check the value\n // can mess up contexts\n if (reactComponent.isNullValue()) {\n resolve(reactComponent);\n return;\n }\n\n console.error(`AG Grid: React Component '${reactComponent.getReactComponentName()}' not created within ${this.maxComponentCreationTimeMs}ms`);\n return;\n }\n\n window.setTimeout(() => {\n this.waitForInstance(reactComponent, resolve, startTime);\n });\n }\n }\n}","import { ReactPortal } from 'react';\nimport { ComponentType, IComponent, WrappableInterface } from '@ag-grid-community/core';\nimport { PortalManager } from './portalManager';\n\nabstract class BaseReactComponent implements IComponent, WrappableInterface {\n abstract getGui(): HTMLElement;\n\n abstract getFrameworkComponentInstance(): any;\n\n abstract rendered(): boolean;\n\n abstract getReactComponentName(): string;\n\n abstract hasMethod(name: string): boolean;\n\n abstract callMethod(name: string, args: IArguments): void;\n\n abstract addMethod(name: string, callback: Function): void;\n\n}\n\nexport abstract class ReactComponent extends BaseReactComponent {\n\n protected eParentElement!: HTMLElement;\n protected componentInstance: any;\n protected reactComponent: any;\n protected portalManager: PortalManager;\n protected portal: ReactPortal | null = null;\n protected statelessComponent: boolean;\n protected componentType: ComponentType;\n\n constructor(reactComponent: any, portalManager: PortalManager, componentType: ComponentType) {\n super();\n\n this.reactComponent = reactComponent;\n this.portalManager = portalManager;\n this.componentType = componentType;\n\n this.statelessComponent = this.isStateless(this.reactComponent);\n }\n\n public getGui(): HTMLElement {\n return this.eParentElement;\n }\n\n public destroy(): void {\n if(this.componentInstance && typeof this.componentInstance.destroy == 'function') {\n this.componentInstance.destroy();\n }\n return this.portalManager.destroyPortal(this.portal as ReactPortal);\n }\n\n protected createParentElement(params: any) {\n const componentWrappingElement = this.portalManager.getComponentWrappingElement();\n const eParentElement = document.createElement(componentWrappingElement || 'div');\n\n (eParentElement as HTMLElement).classList.add('ag-react-container');\n\n // DEPRECATED - use componentInstance.getReactContainerStyle or componentInstance.getReactContainerClasses instead\n // so user can have access to the react container, to add css class or style\n params.reactContainer = eParentElement;\n\n return eParentElement;\n }\n\n protected addParentContainerStyleAndClasses() {\n if (!this.componentInstance) {\n return;\n }\n\n if (this.componentInstance.getReactContainerStyle && this.componentInstance.getReactContainerStyle()) {\n Object.assign(this.eParentElement.style, this.componentInstance.getReactContainerStyle());\n }\n\n if (this.componentInstance.getReactContainerClasses && this.componentInstance.getReactContainerClasses()) {\n const parentContainerClasses: string[] = this.componentInstance.getReactContainerClasses();\n parentContainerClasses.forEach(className => this.eParentElement.classList.add(className));\n }\n }\n\n public statelessComponentRendered(): boolean {\n // fixed fragmentsFuncRendererCreateDestroy funcRendererWithNan (changeDetectionService too for NaN)\n return this.eParentElement.childElementCount > 0 || this.eParentElement.childNodes.length > 0;\n }\n\n public getFrameworkComponentInstance(): any {\n return this.componentInstance;\n }\n\n public isStatelessComponent(): boolean {\n return this.statelessComponent;\n }\n\n public getReactComponentName(): string {\n return this.reactComponent.name;\n }\n\n public getMemoType() {\n return this.hasSymbol() ? Symbol.for('react.memo') : 0xead3;\n }\n\n private hasSymbol() {\n return typeof Symbol === 'function' && Symbol.for;\n }\n\n protected isStateless(Component: any) {\n return (typeof Component === 'function' && !(Component.prototype && Component.prototype.isReactComponent))\n || (typeof Component === 'object' && Component.$$typeof === this.getMemoType());\n }\n\n hasMethod(name: string): boolean {\n const frameworkComponentInstance = this.getFrameworkComponentInstance();\n return (!!frameworkComponentInstance && frameworkComponentInstance[name] !== null) ||\n this.fallbackMethodAvailable(name);\n }\n\n callMethod(name: string, args: IArguments): void {\n const frameworkComponentInstance = this.getFrameworkComponentInstance();\n\n if(this.isStatelessComponent()) {\n return this.fallbackMethod(name, !!args && args[0] ? args[0] : {});\n } else if(!(!!frameworkComponentInstance)) {\n // instance not ready yet - wait for it\n setTimeout(() => this.callMethod(name, args));\n return;\n }\n\n const method = frameworkComponentInstance[name];\n\n if (!!method) {\n return method.apply(frameworkComponentInstance, args);\n }\n\n if (this.fallbackMethodAvailable(name)) {\n return this.fallbackMethod(name, !!args && args[0] ? args[0] : {});\n }\n }\n\n addMethod(name: string, callback: Function): void {\n (this as any)[name] = callback;\n }\n\n protected abstract fallbackMethod(name: string, params: any): any;\n\n protected abstract fallbackMethodAvailable(name: string): boolean;\n\n public abstract isNullValue(): boolean;\n}\n","import { VanillaFrameworkOverrides } from \"@ag-grid-community/core\";\nimport GroupCellRenderer from \"../reactUi/cellRenderer/groupCellRenderer\";\nimport DetailCellRenderer from \"../reactUi/cellRenderer/detailCellRenderer\";\n\nexport class ReactFrameworkOverrides extends VanillaFrameworkOverrides {\n\n private readonly reactUi: boolean;\n\n constructor(reactUi: boolean) {\n super();\n this.reactUi = reactUi;\n }\n\n private frameworkComponents: any = {\n agGroupCellRenderer: GroupCellRenderer,\n agGroupRowRenderer: GroupCellRenderer,\n agDetailCellRenderer: DetailCellRenderer\n };\n\n public frameworkComponent(name: string): any {\n if (!this.reactUi) { return; }\n return this.frameworkComponents[name];\n }\n\n isFrameworkComponent(comp: any): boolean {\n if (!comp) { return false; }\n const prototype = comp.prototype;\n const isJsComp = prototype && 'getGui' in prototype;\n return !isJsComp;\n }\n}","exports.AgGridReact = require('./lib/agGridReact').AgGridReact;\nexports.AgGridColumn = require('./lib/shared/agGridColumn').AgGridColumn;\nexports.ChangeDetectionStrategyType = require('./lib/shared/changeDetectionService').ChangeDetectionStrategyType;\nexports.AgGridReactUi = require('./lib/reactUi/agGridReactUi').AgGridReactUi;\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, Bean, BeanStub, ChangedPath, Constants, Events, GridOptionsWrapper, Optional, PostConstruct, ClientSideRowModelSteps, RowNode, RowHighlightPosition } from \"@ag-grid-community/core\";\nimport { ClientSideNodeManager } from \"./clientSideNodeManager\";\nvar RecursionType;\n(function (RecursionType) {\n RecursionType[RecursionType[\"Normal\"] = 0] = \"Normal\";\n RecursionType[RecursionType[\"AfterFilter\"] = 1] = \"AfterFilter\";\n RecursionType[RecursionType[\"AfterFilterAndSort\"] = 2] = \"AfterFilterAndSort\";\n RecursionType[RecursionType[\"PivotNodes\"] = 3] = \"PivotNodes\";\n})(RecursionType || (RecursionType = {}));\nvar ClientSideRowModel = /** @class */ (function (_super) {\n __extends(ClientSideRowModel, _super);\n function ClientSideRowModel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ClientSideRowModel.prototype.init = function () {\n var refreshEverythingFunc = this.refreshModel.bind(this, { step: ClientSideRowModelSteps.EVERYTHING });\n var animate = !this.gridOptionsWrapper.isSuppressAnimationFrame();\n var refreshEverythingAfterColsChangedFunc = this.refreshModel.bind(this, {\n step: ClientSideRowModelSteps.EVERYTHING,\n afterColumnsChanged: true,\n keepRenderedRows: true,\n animate: animate\n });\n this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, refreshEverythingAfterColsChangedFunc);\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_ROW_GROUP_CHANGED, refreshEverythingFunc);\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_VALUE_CHANGED, this.onValueChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PIVOT_CHANGED, this.refreshModel.bind(this, { step: ClientSideRowModelSteps.PIVOT }));\n this.addManagedListener(this.eventService, Events.EVENT_FILTER_CHANGED, this.onFilterChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_SORT_CHANGED, this.onSortChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, refreshEverythingFunc);\n var refreshMapListener = this.refreshModel.bind(this, {\n step: ClientSideRowModelSteps.MAP,\n keepRenderedRows: true,\n animate: animate\n });\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_GROUP_REMOVE_SINGLE_CHILDREN, refreshMapListener);\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_GROUP_REMOVE_LOWEST_SINGLE_CHILDREN, refreshMapListener);\n this.rootNode = new RowNode(this.beans);\n this.nodeManager = new ClientSideNodeManager(this.rootNode, this.gridOptionsWrapper, this.eventService, this.columnModel, this.gridApi, this.columnApi, this.selectionService, this.beans);\n };\n ClientSideRowModel.prototype.start = function () {\n var rowData = this.gridOptionsWrapper.getRowData();\n if (rowData) {\n this.setRowData(rowData);\n }\n };\n ClientSideRowModel.prototype.ensureRowHeightsValid = function (startPixel, endPixel, startLimitIndex, endLimitIndex) {\n var atLeastOneChange;\n var res = false;\n // we do this multiple times as changing the row heights can also change the first and last rows,\n // so the first pass can make lots of rows smaller, which means the second pass we end up changing\n // more rows.\n do {\n atLeastOneChange = false;\n var rowAtStartPixel = this.getRowIndexAtPixel(startPixel);\n var rowAtEndPixel = this.getRowIndexAtPixel(endPixel);\n // keep check to current page if doing pagination\n var firstRow = Math.max(rowAtStartPixel, startLimitIndex);\n var lastRow = Math.min(rowAtEndPixel, endLimitIndex);\n for (var rowIndex = firstRow; rowIndex <= lastRow; rowIndex++) {\n var rowNode = this.getRow(rowIndex);\n if (rowNode.rowHeightEstimated) {\n var rowHeight = this.gridOptionsWrapper.getRowHeightForNode(rowNode);\n rowNode.setRowHeight(rowHeight.height);\n atLeastOneChange = true;\n res = true;\n }\n }\n if (atLeastOneChange) {\n this.setRowTopAndRowIndex();\n }\n } while (atLeastOneChange);\n return res;\n };\n ClientSideRowModel.prototype.setRowTopAndRowIndex = function () {\n var defaultRowHeight = this.gridOptionsWrapper.getDefaultRowHeight();\n var nextRowTop = 0;\n // mapping displayed rows is not needed for this method, however it's used in\n // clearRowTopAndRowIndex(), and given we are looping through this.rowsToDisplay here,\n // we create the map here for performance reasons, so we don't loop a second time\n // in clearRowTopAndRowIndex()\n var displayedRowsMapped = new Set();\n // we don't estimate if doing fullHeight or autoHeight, as all rows get rendered all the time\n // with these two layouts.\n var allowEstimate = this.gridOptionsWrapper.getDomLayout() === Constants.DOM_LAYOUT_NORMAL;\n for (var i = 0; i < this.rowsToDisplay.length; i++) {\n var rowNode = this.rowsToDisplay[i];\n if (rowNode.id != null) {\n displayedRowsMapped.add(rowNode.id);\n }\n if (rowNode.rowHeight == null) {\n var rowHeight = this.gridOptionsWrapper.getRowHeightForNode(rowNode, allowEstimate, defaultRowHeight);\n rowNode.setRowHeight(rowHeight.height, rowHeight.estimated);\n }\n rowNode.setRowTop(nextRowTop);\n rowNode.setRowIndex(i);\n nextRowTop += rowNode.rowHeight;\n }\n return displayedRowsMapped;\n };\n ClientSideRowModel.prototype.clearRowTopAndRowIndex = function (changedPath, displayedRowsMapped) {\n var changedPathActive = changedPath.isActive();\n var clearIfNotDisplayed = function (rowNode) {\n if (rowNode && rowNode.id != null && !displayedRowsMapped.has(rowNode.id)) {\n rowNode.clearRowTopAndRowIndex();\n }\n };\n var recurse = function (rowNode) {\n clearIfNotDisplayed(rowNode);\n clearIfNotDisplayed(rowNode.detailNode);\n clearIfNotDisplayed(rowNode.sibling);\n if (rowNode.hasChildren()) {\n if (rowNode.childrenAfterGroup) {\n // if a changedPath is active, it means we are here because of a transaction update or\n // a change detection. neither of these impacts the open/closed state of groups. so if\n // a group is not open this time, it was not open last time. so we know all closed groups\n // already have their top positions cleared. so there is no need to traverse all the way\n // when changedPath is active and the rowNode is not expanded.\n var isRootNode = rowNode.level == -1; // we need to give special consideration for root node,\n // as expanded=undefined for root node\n var skipChildren = changedPathActive && !isRootNode && !rowNode.expanded;\n if (!skipChildren) {\n rowNode.childrenAfterGroup.forEach(recurse);\n }\n }\n }\n };\n recurse(this.rootNode);\n };\n // returns false if row was moved, otherwise true\n ClientSideRowModel.prototype.ensureRowsAtPixel = function (rowNodes, pixel, increment) {\n var _this = this;\n if (increment === void 0) { increment = 0; }\n var indexAtPixelNow = this.getRowIndexAtPixel(pixel);\n var rowNodeAtPixelNow = this.getRow(indexAtPixelNow);\n var animate = !this.gridOptionsWrapper.isSuppressAnimationFrame();\n if (rowNodeAtPixelNow === rowNodes[0]) {\n return false;\n }\n rowNodes.forEach(function (rowNode) {\n _.removeFromArray(_this.rootNode.allLeafChildren, rowNode);\n });\n rowNodes.forEach(function (rowNode, idx) {\n _.insertIntoArray(_this.rootNode.allLeafChildren, rowNode, Math.max(indexAtPixelNow + increment, 0) + idx);\n });\n this.refreshModel({\n step: ClientSideRowModelSteps.EVERYTHING,\n keepRenderedRows: true,\n keepEditingRows: true,\n animate: animate\n });\n return true;\n };\n ClientSideRowModel.prototype.highlightRowAtPixel = function (rowNode, pixel) {\n var indexAtPixelNow = pixel != null ? this.getRowIndexAtPixel(pixel) : null;\n var rowNodeAtPixelNow = indexAtPixelNow != null ? this.getRow(indexAtPixelNow) : null;\n if (!rowNodeAtPixelNow || !rowNode || rowNodeAtPixelNow === rowNode || pixel == null) {\n if (this.lastHighlightedRow) {\n this.lastHighlightedRow.setHighlighted(null);\n this.lastHighlightedRow = null;\n }\n return;\n }\n var highlight = this.getHighlightPosition(pixel, rowNodeAtPixelNow);\n if (this.lastHighlightedRow && this.lastHighlightedRow !== rowNodeAtPixelNow) {\n this.lastHighlightedRow.setHighlighted(null);\n this.lastHighlightedRow = null;\n }\n rowNodeAtPixelNow.setHighlighted(highlight);\n this.lastHighlightedRow = rowNodeAtPixelNow;\n };\n ClientSideRowModel.prototype.getHighlightPosition = function (pixel, rowNode) {\n if (!rowNode) {\n var index = this.getRowIndexAtPixel(pixel);\n rowNode = this.getRow(index || 0);\n if (!rowNode) {\n return RowHighlightPosition.Below;\n }\n }\n var rowTop = rowNode.rowTop, rowHeight = rowNode.rowHeight;\n return pixel - rowTop < rowHeight / 2 ? RowHighlightPosition.Above : RowHighlightPosition.Below;\n };\n ClientSideRowModel.prototype.getLastHighlightedRowNode = function () {\n return this.lastHighlightedRow;\n };\n ClientSideRowModel.prototype.isLastRowIndexKnown = function () {\n return true;\n };\n ClientSideRowModel.prototype.getRowCount = function () {\n if (this.rowsToDisplay) {\n return this.rowsToDisplay.length;\n }\n return 0;\n };\n ClientSideRowModel.prototype.getTopLevelRowCount = function () {\n var showingRootNode = this.rowsToDisplay && this.rowsToDisplay[0] === this.rootNode;\n if (showingRootNode) {\n return 1;\n }\n var filteredChildren = this.rootNode.childrenAfterAggFilter;\n return filteredChildren ? filteredChildren.length : 0;\n };\n ClientSideRowModel.prototype.getTopLevelRowDisplayedIndex = function (topLevelIndex) {\n var showingRootNode = this.rowsToDisplay && this.rowsToDisplay[0] === this.rootNode;\n if (showingRootNode) {\n return topLevelIndex;\n }\n var rowNode = this.rootNode.childrenAfterSort[topLevelIndex];\n if (this.gridOptionsWrapper.isGroupHideOpenParents()) {\n // if hideOpenParents, and this row open, then this row is now displayed at this index, first child is\n while (rowNode.expanded && rowNode.childrenAfterSort && rowNode.childrenAfterSort.length > 0) {\n rowNode = rowNode.childrenAfterSort[0];\n }\n }\n return rowNode.rowIndex;\n };\n ClientSideRowModel.prototype.getRowBounds = function (index) {\n if (_.missing(this.rowsToDisplay)) {\n return null;\n }\n var rowNode = this.rowsToDisplay[index];\n if (rowNode) {\n return {\n rowTop: rowNode.rowTop,\n rowHeight: rowNode.rowHeight\n };\n }\n return null;\n };\n ClientSideRowModel.prototype.onRowGroupOpened = function () {\n var animate = this.gridOptionsWrapper.isAnimateRows();\n this.refreshModel({ step: ClientSideRowModelSteps.MAP, keepRenderedRows: true, animate: animate });\n };\n ClientSideRowModel.prototype.onFilterChanged = function (event) {\n if (event.afterDataChange) {\n return;\n }\n var animate = this.gridOptionsWrapper.isAnimateRows();\n var primaryOrQuickFilterChanged = event.columns.length === 0 || event.columns.some(function (col) { return col.isPrimary(); });\n var step = primaryOrQuickFilterChanged ? ClientSideRowModelSteps.FILTER : ClientSideRowModelSteps.FILTER_AGGREGATES;\n this.refreshModel({ step: step, keepRenderedRows: true, animate: animate });\n };\n ClientSideRowModel.prototype.onSortChanged = function () {\n var animate = this.gridOptionsWrapper.isAnimateRows();\n this.refreshModel({ step: ClientSideRowModelSteps.SORT, keepRenderedRows: true, animate: animate, keepEditingRows: true });\n };\n ClientSideRowModel.prototype.getType = function () {\n return Constants.ROW_MODEL_TYPE_CLIENT_SIDE;\n };\n ClientSideRowModel.prototype.onValueChanged = function () {\n if (this.columnModel.isPivotActive()) {\n this.refreshModel({ step: ClientSideRowModelSteps.PIVOT });\n }\n else {\n this.refreshModel({ step: ClientSideRowModelSteps.AGGREGATE });\n }\n };\n ClientSideRowModel.prototype.createChangePath = function (rowNodeTransactions) {\n // for updates, if the row is updated at all, then we re-calc all the values\n // in that row. we could compare each value to each old value, however if we\n // did this, we would be calling the valueService twice, once on the old value\n // and once on the new value. so it's less valueGetter calls if we just assume\n // each column is different. that way the changedPath is used so that only\n // the impacted parent rows are recalculated, parents who's children have\n // not changed are not impacted.\n var noTransactions = _.missingOrEmpty(rowNodeTransactions);\n var changedPath = new ChangedPath(false, this.rootNode);\n if (noTransactions || this.gridOptionsWrapper.isTreeData()) {\n changedPath.setInactive();\n }\n return changedPath;\n };\n ClientSideRowModel.prototype.isSuppressModelUpdateAfterUpdateTransaction = function (params) {\n if (!this.gridOptionsWrapper.isSuppressModelUpdateAfterUpdateTransaction()) {\n return false;\n }\n // return true if we are only doing update transactions\n if (params.rowNodeTransactions == null) {\n return false;\n }\n var transWithAddsOrDeletes = params.rowNodeTransactions.filter(function (tx) {\n return (tx.add != null && tx.add.length > 0) || (tx.remove != null && tx.remove.length > 0);\n });\n var transactionsContainUpdatesOnly = transWithAddsOrDeletes == null || transWithAddsOrDeletes.length == 0;\n return transactionsContainUpdatesOnly;\n };\n ClientSideRowModel.prototype.refreshModel = function (params) {\n if (this.isSuppressModelUpdateAfterUpdateTransaction(params)) {\n return;\n }\n // this goes through the pipeline of stages. what's in my head is similar\n // to the diagram on this page:\n // http://commons.apache.org/sandbox/commons-pipeline/pipeline_basics.html\n // however we want to keep the results of each stage, hence we manually call\n // each step rather than have them chain each other.\n // fallthrough in below switch is on purpose,\n // eg if STEP_FILTER, then all steps below this\n // step get done\n // let start: number;\n // console.log('======= start =======');\n var changedPath = this.createChangePath(params.rowNodeTransactions);\n switch (params.step) {\n case ClientSideRowModelSteps.EVERYTHING:\n this.doRowGrouping(params.groupState, params.rowNodeTransactions, params.rowNodeOrder, changedPath, !!params.afterColumnsChanged);\n case ClientSideRowModelSteps.FILTER:\n this.doFilter(changedPath);\n case ClientSideRowModelSteps.PIVOT:\n this.doPivot(changedPath);\n case ClientSideRowModelSteps.AGGREGATE: // depends on agg fields\n this.doAggregate(changedPath);\n case ClientSideRowModelSteps.FILTER_AGGREGATES:\n this.doFilterAggregates(changedPath);\n case ClientSideRowModelSteps.SORT:\n this.doSort(params.rowNodeTransactions, changedPath);\n case ClientSideRowModelSteps.MAP:\n this.doRowsToDisplay();\n }\n // set all row tops to null, then set row tops on all visible rows. if we don't\n // do this, then the algorithm below only sets row tops, old row tops from old rows\n // will still lie around\n var displayedNodesMapped = this.setRowTopAndRowIndex();\n this.clearRowTopAndRowIndex(changedPath, displayedNodesMapped);\n var event = {\n type: Events.EVENT_MODEL_UPDATED,\n api: this.gridApi,\n columnApi: this.columnApi,\n animate: params.animate,\n keepRenderedRows: params.keepRenderedRows,\n newData: params.newData,\n newPage: false\n };\n this.eventService.dispatchEvent(event);\n };\n ClientSideRowModel.prototype.isEmpty = function () {\n var rowsMissing = _.missing(this.rootNode.allLeafChildren) || this.rootNode.allLeafChildren.length === 0;\n return _.missing(this.rootNode) || rowsMissing || !this.columnModel.isReady();\n };\n ClientSideRowModel.prototype.isRowsToRender = function () {\n return _.exists(this.rowsToDisplay) && this.rowsToDisplay.length > 0;\n };\n ClientSideRowModel.prototype.getNodesInRangeForSelection = function (firstInRange, lastInRange) {\n // if lastSelectedNode is missing, we start at the first row\n var firstRowHit = !lastInRange;\n var lastRowHit = false;\n var lastRow;\n var result = [];\n var groupsSelectChildren = this.gridOptionsWrapper.isGroupSelectsChildren();\n this.forEachNodeAfterFilterAndSort(function (rowNode) {\n var lookingForLastRow = firstRowHit && !lastRowHit;\n // check if we need to flip the select switch\n if (!firstRowHit) {\n if (rowNode === lastInRange || rowNode === firstInRange) {\n firstRowHit = true;\n }\n }\n var skipThisGroupNode = rowNode.group && groupsSelectChildren;\n if (!skipThisGroupNode) {\n var inRange = firstRowHit && !lastRowHit;\n var childOfLastRow = rowNode.isParentOfNode(lastRow);\n if (inRange || childOfLastRow) {\n result.push(rowNode);\n }\n }\n if (lookingForLastRow) {\n if (rowNode === lastInRange || rowNode === firstInRange) {\n lastRowHit = true;\n if (rowNode === lastInRange) {\n lastRow = lastInRange;\n }\n else {\n lastRow = firstInRange;\n }\n }\n }\n });\n return result;\n };\n ClientSideRowModel.prototype.setDatasource = function (datasource) {\n console.error('AG Grid: should never call setDatasource on clientSideRowController');\n };\n ClientSideRowModel.prototype.getTopLevelNodes = function () {\n return this.rootNode ? this.rootNode.childrenAfterGroup : null;\n };\n ClientSideRowModel.prototype.getRootNode = function () {\n return this.rootNode;\n };\n ClientSideRowModel.prototype.getRow = function (index) {\n return this.rowsToDisplay[index];\n };\n ClientSideRowModel.prototype.isRowPresent = function (rowNode) {\n return this.rowsToDisplay.indexOf(rowNode) >= 0;\n };\n ClientSideRowModel.prototype.getRowIndexAtPixel = function (pixelToMatch) {\n if (this.isEmpty()) {\n return -1;\n }\n // do binary search of tree\n // http://oli.me.uk/2013/06/08/searching-javascript-arrays-with-a-binary-search/\n var bottomPointer = 0;\n var topPointer = this.rowsToDisplay.length - 1;\n // quick check, if the pixel is out of bounds, then return last row\n if (pixelToMatch <= 0) {\n // if pixel is less than or equal zero, it's always the first row\n return 0;\n }\n var lastNode = _.last(this.rowsToDisplay);\n if (lastNode.rowTop <= pixelToMatch) {\n return this.rowsToDisplay.length - 1;\n }\n while (true) {\n var midPointer = Math.floor((bottomPointer + topPointer) / 2);\n var currentRowNode = this.rowsToDisplay[midPointer];\n if (this.isRowInPixel(currentRowNode, pixelToMatch)) {\n return midPointer;\n }\n if (currentRowNode.rowTop < pixelToMatch) {\n bottomPointer = midPointer + 1;\n }\n else if (currentRowNode.rowTop > pixelToMatch) {\n topPointer = midPointer - 1;\n }\n }\n };\n ClientSideRowModel.prototype.isRowInPixel = function (rowNode, pixelToMatch) {\n var topPixel = rowNode.rowTop;\n var bottomPixel = rowNode.rowTop + rowNode.rowHeight;\n var pixelInRow = topPixel <= pixelToMatch && bottomPixel > pixelToMatch;\n return pixelInRow;\n };\n ClientSideRowModel.prototype.forEachLeafNode = function (callback) {\n if (this.rootNode.allLeafChildren) {\n this.rootNode.allLeafChildren.forEach(function (rowNode, index) { return callback(rowNode, index); });\n }\n };\n ClientSideRowModel.prototype.forEachNode = function (callback) {\n this.recursivelyWalkNodesAndCallback(this.rootNode.childrenAfterGroup, callback, RecursionType.Normal, 0);\n };\n ClientSideRowModel.prototype.forEachNodeAfterFilter = function (callback) {\n this.recursivelyWalkNodesAndCallback(this.rootNode.childrenAfterAggFilter, callback, RecursionType.AfterFilter, 0);\n };\n ClientSideRowModel.prototype.forEachNodeAfterFilterAndSort = function (callback) {\n this.recursivelyWalkNodesAndCallback(this.rootNode.childrenAfterSort, callback, RecursionType.AfterFilterAndSort, 0);\n };\n ClientSideRowModel.prototype.forEachPivotNode = function (callback) {\n this.recursivelyWalkNodesAndCallback([this.rootNode], callback, RecursionType.PivotNodes, 0);\n };\n // iterates through each item in memory, and calls the callback function\n // nodes - the rowNodes to traverse\n // callback - the user provided callback\n // recursion type - need this to know what child nodes to recurse, eg if looking at all nodes, or filtered notes etc\n // index - works similar to the index in forEach in javascript's array function\n ClientSideRowModel.prototype.recursivelyWalkNodesAndCallback = function (nodes, callback, recursionType, index) {\n if (!nodes) {\n return index;\n }\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n callback(node, index++);\n // go to the next level if it is a group\n if (node.hasChildren()) {\n // depending on the recursion type, we pick a difference set of children\n var nodeChildren = null;\n switch (recursionType) {\n case RecursionType.Normal:\n nodeChildren = node.childrenAfterGroup;\n break;\n case RecursionType.AfterFilter:\n nodeChildren = node.childrenAfterAggFilter;\n break;\n case RecursionType.AfterFilterAndSort:\n nodeChildren = node.childrenAfterSort;\n break;\n case RecursionType.PivotNodes:\n // for pivot, we don't go below leafGroup levels\n nodeChildren = !node.leafGroup ? node.childrenAfterSort : null;\n break;\n }\n if (nodeChildren) {\n index = this.recursivelyWalkNodesAndCallback(nodeChildren, callback, recursionType, index);\n }\n }\n }\n return index;\n };\n // it's possible to recompute the aggregate without doing the other parts\n // + gridApi.recomputeAggregates()\n ClientSideRowModel.prototype.doAggregate = function (changedPath) {\n if (this.aggregationStage) {\n this.aggregationStage.execute({ rowNode: this.rootNode, changedPath: changedPath });\n }\n };\n ClientSideRowModel.prototype.doFilterAggregates = function (changedPath) {\n if (this.filterAggregatesStage) {\n this.filterAggregatesStage.execute({ rowNode: this.rootNode, changedPath: changedPath });\n }\n else {\n // If filterAggregatesStage is undefined, then so is the grouping stage, so all children should be on the rootNode.\n this.rootNode.childrenAfterAggFilter = this.rootNode.childrenAfterFilter;\n }\n };\n // + gridApi.expandAll()\n // + gridApi.collapseAll()\n ClientSideRowModel.prototype.expandOrCollapseAll = function (expand) {\n var usingTreeData = this.gridOptionsWrapper.isTreeData();\n var usingPivotMode = this.columnModel.isPivotActive();\n var recursiveExpandOrCollapse = function (rowNodes) {\n if (!rowNodes) {\n return;\n }\n rowNodes.forEach(function (rowNode) {\n var actionRow = function () {\n rowNode.expanded = expand;\n recursiveExpandOrCollapse(rowNode.childrenAfterGroup);\n };\n if (usingTreeData) {\n var hasChildren = _.exists(rowNode.childrenAfterGroup);\n if (hasChildren) {\n actionRow();\n }\n return;\n }\n if (usingPivotMode) {\n var notLeafGroup = !rowNode.leafGroup;\n if (notLeafGroup) {\n actionRow();\n }\n return;\n }\n var isRowGroup = rowNode.group;\n if (isRowGroup) {\n actionRow();\n }\n });\n };\n if (this.rootNode) {\n recursiveExpandOrCollapse(this.rootNode.childrenAfterGroup);\n }\n this.refreshModel({ step: ClientSideRowModelSteps.MAP });\n var eventSource = expand ? 'expandAll' : 'collapseAll';\n var event = {\n api: this.gridApi,\n columnApi: this.columnApi,\n type: Events.EVENT_EXPAND_COLLAPSE_ALL,\n source: eventSource\n };\n this.eventService.dispatchEvent(event);\n };\n ClientSideRowModel.prototype.doSort = function (rowNodeTransactions, changedPath) {\n this.sortStage.execute({\n rowNode: this.rootNode,\n rowNodeTransactions: rowNodeTransactions,\n changedPath: changedPath\n });\n };\n ClientSideRowModel.prototype.doRowGrouping = function (groupState, rowNodeTransactions, rowNodeOrder, changedPath, afterColumnsChanged) {\n if (this.groupStage) {\n if (rowNodeTransactions) {\n this.groupStage.execute({\n rowNode: this.rootNode,\n rowNodeTransactions: rowNodeTransactions,\n rowNodeOrder: rowNodeOrder,\n changedPath: changedPath\n });\n }\n else {\n this.groupStage.execute({\n rowNode: this.rootNode,\n changedPath: changedPath,\n afterColumnsChanged: afterColumnsChanged\n });\n // set open/closed state on groups\n this.restoreGroupState(groupState);\n }\n if (this.gridOptionsWrapper.isGroupSelectsChildren()) {\n this.selectionService.updateGroupsFromChildrenSelections(changedPath);\n }\n }\n else {\n this.rootNode.childrenAfterGroup = this.rootNode.allLeafChildren;\n if (this.rootNode.sibling) {\n this.rootNode.sibling.childrenAfterGroup = this.rootNode.childrenAfterGroup;\n }\n this.rootNode.updateHasChildren();\n }\n };\n ClientSideRowModel.prototype.restoreGroupState = function (groupState) {\n if (!groupState) {\n return;\n }\n _.traverseNodesWithKey(this.rootNode.childrenAfterGroup, function (node, key) {\n // if the group was open last time, then open it this time. however\n // if was not open last time, then don't touch the group, so the 'groupDefaultExpanded'\n // setting will take effect.\n if (typeof groupState[key] === 'boolean') {\n node.expanded = groupState[key];\n }\n });\n };\n ClientSideRowModel.prototype.doFilter = function (changedPath) {\n this.filterStage.execute({ rowNode: this.rootNode, changedPath: changedPath });\n };\n ClientSideRowModel.prototype.doPivot = function (changedPath) {\n if (this.pivotStage) {\n this.pivotStage.execute({ rowNode: this.rootNode, changedPath: changedPath });\n }\n };\n ClientSideRowModel.prototype.getGroupState = function () {\n if (!this.rootNode.childrenAfterGroup || !this.gridOptionsWrapper.isRememberGroupStateWhenNewData()) {\n return null;\n }\n var result = {};\n _.traverseNodesWithKey(this.rootNode.childrenAfterGroup, function (node, key) { return result[key] = node.expanded; });\n return result;\n };\n ClientSideRowModel.prototype.getCopyOfNodesMap = function () {\n return this.nodeManager.getCopyOfNodesMap();\n };\n ClientSideRowModel.prototype.getRowNode = function (id) {\n // although id is typed a string, this could be called by the user, and they could have passed a number\n var idIsGroup = typeof id == 'string' && id.indexOf(RowNode.ID_PREFIX_ROW_GROUP) == 0;\n if (idIsGroup) {\n // only one users complained about getRowNode not working for groups, after years of\n // this working for normal rows. so have done quick implementation. if users complain\n // about performance, then GroupStage should store / manage created groups in a map,\n // which is a chunk of work.\n var res_1 = undefined;\n this.forEachNode(function (node) {\n if (node.id === id) {\n res_1 = node;\n }\n });\n return res_1;\n }\n return this.nodeManager.getRowNode(id);\n };\n // rows: the rows to put into the model\n ClientSideRowModel.prototype.setRowData = function (rowData) {\n // no need to invalidate cache, as the cache is stored on the rowNode,\n // so new rowNodes means the cache is wiped anyway.\n // remember group state, so we can expand groups that should be expanded\n var groupState = this.getGroupState();\n this.nodeManager.setRowData(rowData);\n // - clears selection\n this.selectionService.reset();\n // - updates filters\n this.filterManager.onNewRowsLoaded('rowDataUpdated');\n // this event kicks off:\n // - shows 'no rows' overlay if needed\n var rowDataChangedEvent = {\n type: Events.EVENT_ROW_DATA_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(rowDataChangedEvent);\n this.refreshModel({\n step: ClientSideRowModelSteps.EVERYTHING,\n groupState: groupState,\n newData: true\n });\n };\n ClientSideRowModel.prototype.batchUpdateRowData = function (rowDataTransaction, callback) {\n var _this = this;\n if (this.applyAsyncTransactionsTimeout == null) {\n this.rowDataTransactionBatch = [];\n var waitMillis = this.gridOptionsWrapper.getAsyncTransactionWaitMillis();\n this.applyAsyncTransactionsTimeout = window.setTimeout(function () {\n _this.executeBatchUpdateRowData();\n }, waitMillis);\n }\n this.rowDataTransactionBatch.push({ rowDataTransaction: rowDataTransaction, callback: callback });\n };\n ClientSideRowModel.prototype.flushAsyncTransactions = function () {\n if (this.applyAsyncTransactionsTimeout != null) {\n clearTimeout(this.applyAsyncTransactionsTimeout);\n this.executeBatchUpdateRowData();\n }\n };\n ClientSideRowModel.prototype.executeBatchUpdateRowData = function () {\n var _this = this;\n this.valueCache.onDataChanged();\n var callbackFuncsBound = [];\n var rowNodeTrans = [];\n // The rowGroup stage uses rowNodeOrder if order was provided. if we didn't pass 'true' to\n // commonUpdateRowData, using addIndex would have no effect when grouping.\n var forceRowNodeOrder = false;\n if (this.rowDataTransactionBatch) {\n this.rowDataTransactionBatch.forEach(function (tranItem) {\n var rowNodeTran = _this.nodeManager.updateRowData(tranItem.rowDataTransaction, undefined);\n rowNodeTrans.push(rowNodeTran);\n if (tranItem.callback) {\n callbackFuncsBound.push(tranItem.callback.bind(null, rowNodeTran));\n }\n if (typeof tranItem.rowDataTransaction.addIndex === 'number') {\n forceRowNodeOrder = true;\n }\n });\n }\n this.commonUpdateRowData(rowNodeTrans, undefined, forceRowNodeOrder);\n // do callbacks in next VM turn so it's async\n if (callbackFuncsBound.length > 0) {\n window.setTimeout(function () {\n callbackFuncsBound.forEach(function (func) { return func(); });\n }, 0);\n }\n if (rowNodeTrans.length > 0) {\n var event_1 = {\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi(),\n type: Events.EVENT_ASYNC_TRANSACTIONS_FLUSHED,\n results: rowNodeTrans\n };\n this.eventService.dispatchEvent(event_1);\n }\n this.rowDataTransactionBatch = null;\n this.applyAsyncTransactionsTimeout = undefined;\n };\n ClientSideRowModel.prototype.updateRowData = function (rowDataTran, rowNodeOrder) {\n this.valueCache.onDataChanged();\n var rowNodeTran = this.nodeManager.updateRowData(rowDataTran, rowNodeOrder);\n // if doing immutableData, addIndex is never present. however if doing standard transaction, and user\n // provided addIndex, then this is used in updateRowData. However if doing Enterprise, then the rowGroup\n // stage also uses the\n var forceRowNodeOrder = typeof rowDataTran.addIndex === 'number';\n this.commonUpdateRowData([rowNodeTran], rowNodeOrder, forceRowNodeOrder);\n return rowNodeTran;\n };\n ClientSideRowModel.prototype.createRowNodeOrder = function () {\n var suppressSortOrder = this.gridOptionsWrapper.isSuppressMaintainUnsortedOrder();\n if (suppressSortOrder) {\n return;\n }\n var orderMap = {};\n if (this.rootNode && this.rootNode.allLeafChildren) {\n for (var index = 0; index < this.rootNode.allLeafChildren.length; index++) {\n var node = this.rootNode.allLeafChildren[index];\n orderMap[node.id] = index;\n }\n }\n return orderMap;\n };\n // common to updateRowData and batchUpdateRowData\n ClientSideRowModel.prototype.commonUpdateRowData = function (rowNodeTrans, rowNodeOrder, forceRowNodeOrder) {\n var animate = !this.gridOptionsWrapper.isSuppressAnimationFrame();\n if (forceRowNodeOrder) {\n rowNodeOrder = this.createRowNodeOrder();\n }\n this.refreshModel({\n step: ClientSideRowModelSteps.EVERYTHING,\n rowNodeTransactions: rowNodeTrans,\n rowNodeOrder: rowNodeOrder,\n keepRenderedRows: true,\n keepEditingRows: true,\n animate: animate\n });\n var event = {\n type: Events.EVENT_ROW_DATA_UPDATED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event);\n };\n ClientSideRowModel.prototype.doRowsToDisplay = function () {\n this.rowsToDisplay = this.flattenStage.execute({ rowNode: this.rootNode });\n };\n ClientSideRowModel.prototype.onRowHeightChanged = function () {\n this.refreshModel({ step: ClientSideRowModelSteps.MAP, keepRenderedRows: true, keepEditingRows: true });\n };\n ClientSideRowModel.prototype.resetRowHeights = function () {\n var atLeastOne = false;\n this.forEachNode(function (rowNode) {\n rowNode.setRowHeight(rowNode.rowHeight, true);\n // we keep the height each row is at, however we set estimated=true rather than clear the height.\n // this means the grid will not reset the row heights back to defaults, rather it will re-calc\n // the height for each row as the row is displayed. otherwise the scroll will jump when heights are reset.\n var detailNode = rowNode.detailNode;\n if (detailNode) {\n detailNode.setRowHeight(detailNode.rowHeight, true);\n }\n atLeastOne = true;\n });\n if (atLeastOne) {\n this.onRowHeightChanged();\n }\n };\n __decorate([\n Autowired('columnModel')\n ], ClientSideRowModel.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired('selectionService')\n ], ClientSideRowModel.prototype, \"selectionService\", void 0);\n __decorate([\n Autowired('filterManager')\n ], ClientSideRowModel.prototype, \"filterManager\", void 0);\n __decorate([\n Autowired('valueCache')\n ], ClientSideRowModel.prototype, \"valueCache\", void 0);\n __decorate([\n Autowired('columnApi')\n ], ClientSideRowModel.prototype, \"columnApi\", void 0);\n __decorate([\n Autowired('gridApi')\n ], ClientSideRowModel.prototype, \"gridApi\", void 0);\n __decorate([\n Autowired('animationFrameService')\n ], ClientSideRowModel.prototype, \"animationFrameService\", void 0);\n __decorate([\n Autowired('beans')\n ], ClientSideRowModel.prototype, \"beans\", void 0);\n __decorate([\n Autowired('filterStage')\n ], ClientSideRowModel.prototype, \"filterStage\", void 0);\n __decorate([\n Autowired('sortStage')\n ], ClientSideRowModel.prototype, \"sortStage\", void 0);\n __decorate([\n Autowired('flattenStage')\n ], ClientSideRowModel.prototype, \"flattenStage\", void 0);\n __decorate([\n Optional('groupStage')\n ], ClientSideRowModel.prototype, \"groupStage\", void 0);\n __decorate([\n Optional('aggregationStage')\n ], ClientSideRowModel.prototype, \"aggregationStage\", void 0);\n __decorate([\n Optional('pivotStage')\n ], ClientSideRowModel.prototype, \"pivotStage\", void 0);\n __decorate([\n Optional('filterAggregatesStage')\n ], ClientSideRowModel.prototype, \"filterAggregatesStage\", void 0);\n __decorate([\n PostConstruct\n ], ClientSideRowModel.prototype, \"init\", null);\n ClientSideRowModel = __decorate([\n Bean('rowModel')\n ], ClientSideRowModel);\n return ClientSideRowModel;\n}(BeanStub));\nexport { ClientSideRowModel };\n","var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n};\nimport { Events, RowNode, _ } from \"@ag-grid-community/core\";\nvar ClientSideNodeManager = /** @class */ (function () {\n function ClientSideNodeManager(rootNode, gridOptionsWrapper, eventService, columnModel, gridApi, columnApi, selectionService, beans) {\n this.nextId = 0;\n // when user is provide the id's, we also keep a map of ids to row nodes for convenience\n this.allNodesMap = {};\n this.rootNode = rootNode;\n this.gridOptionsWrapper = gridOptionsWrapper;\n this.eventService = eventService;\n this.columnModel = columnModel;\n this.gridApi = gridApi;\n this.columnApi = columnApi;\n this.beans = beans;\n this.selectionService = selectionService;\n this.rootNode.group = true;\n this.rootNode.level = -1;\n this.rootNode.id = ClientSideNodeManager.ROOT_NODE_ID;\n this.rootNode.allLeafChildren = [];\n this.rootNode.childrenAfterGroup = [];\n this.rootNode.childrenAfterSort = [];\n this.rootNode.childrenAfterAggFilter = [];\n this.rootNode.childrenAfterFilter = [];\n // if we make this class a bean, then can annotate postConstruct\n this.postConstruct();\n }\n // @PostConstruct - this is not a bean, so postConstruct called by constructor\n ClientSideNodeManager.prototype.postConstruct = function () {\n // func below doesn't have 'this' pointer, so need to pull out these bits\n this.suppressParentsInRowNodes = this.gridOptionsWrapper.isSuppressParentsInRowNodes();\n this.isRowMasterFunc = this.gridOptionsWrapper.getIsRowMasterFunc();\n this.doingTreeData = this.gridOptionsWrapper.isTreeData();\n this.doingMasterDetail = this.gridOptionsWrapper.isMasterDetail();\n };\n ClientSideNodeManager.prototype.getCopyOfNodesMap = function () {\n return _.cloneObject(this.allNodesMap);\n };\n ClientSideNodeManager.prototype.getRowNode = function (id) {\n return this.allNodesMap[id];\n };\n ClientSideNodeManager.prototype.setRowData = function (rowData) {\n var _this = this;\n if (typeof rowData === 'string') {\n console.warn('AG Grid: rowData must be an array, however you passed in a string. If you are loading JSON, make sure you convert the JSON string to JavaScript objects first');\n return;\n }\n var rootNode = this.rootNode;\n var sibling = this.rootNode.sibling;\n rootNode.childrenAfterFilter = null;\n rootNode.childrenAfterGroup = null;\n rootNode.childrenAfterAggFilter = null;\n rootNode.childrenAfterSort = null;\n rootNode.childrenMapped = null;\n rootNode.updateHasChildren();\n this.nextId = 0;\n this.allNodesMap = {};\n if (rowData) {\n // we use rootNode as the parent, however if using ag-grid-enterprise, the grouping stage\n // sets the parent node on each row (even if we are not grouping). so setting parent node\n // here is for benefit of ag-grid-community users\n rootNode.allLeafChildren = rowData.map(function (dataItem) { return _this.createNode(dataItem, _this.rootNode, ClientSideNodeManager.TOP_LEVEL); });\n }\n else {\n rootNode.allLeafChildren = [];\n rootNode.childrenAfterGroup = [];\n }\n if (sibling) {\n sibling.childrenAfterFilter = rootNode.childrenAfterFilter;\n sibling.childrenAfterGroup = rootNode.childrenAfterGroup;\n sibling.childrenAfterAggFilter = rootNode.childrenAfterAggFilter;\n sibling.childrenAfterSort = rootNode.childrenAfterSort;\n sibling.childrenMapped = rootNode.childrenMapped;\n sibling.allLeafChildren = rootNode.allLeafChildren;\n }\n };\n ClientSideNodeManager.prototype.updateRowData = function (rowDataTran, rowNodeOrder) {\n var rowNodeTransaction = {\n remove: [],\n update: [],\n add: []\n };\n var nodesToUnselect = [];\n this.executeRemove(rowDataTran, rowNodeTransaction, nodesToUnselect);\n this.executeUpdate(rowDataTran, rowNodeTransaction, nodesToUnselect);\n this.executeAdd(rowDataTran, rowNodeTransaction);\n this.updateSelection(nodesToUnselect);\n if (rowNodeOrder) {\n _.sortRowNodesByOrder(this.rootNode.allLeafChildren, rowNodeOrder);\n }\n return rowNodeTransaction;\n };\n ClientSideNodeManager.prototype.updateSelection = function (nodesToUnselect) {\n var selectionChanged = nodesToUnselect.length > 0;\n if (selectionChanged) {\n nodesToUnselect.forEach(function (rowNode) {\n rowNode.setSelected(false, false, true);\n });\n }\n // we do this regardless of nodes to unselect or not, as it's possible\n // a new node was inserted, so a parent that was previously selected (as all\n // children were selected) should not be tri-state (as new one unselected against\n // all other selected children).\n this.selectionService.updateGroupsFromChildrenSelections();\n if (selectionChanged) {\n var event_1 = {\n type: Events.EVENT_SELECTION_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event_1);\n }\n };\n ClientSideNodeManager.prototype.executeAdd = function (rowDataTran, rowNodeTransaction) {\n var _this = this;\n var add = rowDataTran.add, addIndex = rowDataTran.addIndex;\n if (_.missingOrEmpty(add)) {\n return;\n }\n // create new row nodes for each data item\n var newNodes = add.map(function (item) { return _this.createNode(item, _this.rootNode, ClientSideNodeManager.TOP_LEVEL); });\n // add new row nodes to the root nodes 'allLeafChildren'\n var useIndex = typeof addIndex === 'number' && addIndex >= 0;\n var nodesBeforeIndex;\n var nodesAfterIndex;\n if (useIndex) {\n // new rows are inserted in one go by concatenating them in between the existing rows at the desired index.\n // this is much faster than splicing them individually into 'allLeafChildren' when there are large inserts.\n // allLeafChildren can be out of order, so we loop over all the Nodes to find the correct index that\n // represents the position `addIndex` intended to be.\n var allLeafChildren_1 = this.rootNode.allLeafChildren;\n // if addIndex is 0, it should always be added at the start of the array\n // there is no need to verify the order of node by nodeIndex.\n var normalizedAddIndex = addIndex === 0 ? 0 : (allLeafChildren_1.reduce(function (prevIdx, currNode, currIdx) {\n var _a;\n var rowIndex = currNode.rowIndex;\n var prevValueAtIndex = (_a = allLeafChildren_1[prevIdx]) === null || _a === void 0 ? void 0 : _a.rowIndex;\n var shouldUpdateIndex = rowIndex != null && prevValueAtIndex != null && rowIndex < addIndex && rowIndex > prevValueAtIndex;\n return shouldUpdateIndex ? currIdx : prevIdx;\n }, 0) + 1);\n nodesBeforeIndex = allLeafChildren_1.slice(0, normalizedAddIndex);\n nodesAfterIndex = allLeafChildren_1.slice(normalizedAddIndex, allLeafChildren_1.length);\n }\n else {\n nodesBeforeIndex = this.rootNode.allLeafChildren;\n nodesAfterIndex = [];\n }\n this.rootNode.allLeafChildren = __spread(nodesBeforeIndex, newNodes, nodesAfterIndex);\n if (this.rootNode.sibling) {\n this.rootNode.sibling.allLeafChildren = this.rootNode.allLeafChildren;\n }\n // add new row nodes to the transaction add items\n rowNodeTransaction.add = newNodes;\n };\n ClientSideNodeManager.prototype.executeRemove = function (rowDataTran, rowNodeTransaction, nodesToUnselect) {\n var _this = this;\n var remove = rowDataTran.remove;\n if (_.missingOrEmpty(remove)) {\n return;\n }\n var rowIdsRemoved = {};\n remove.forEach(function (item) {\n var rowNode = _this.lookupRowNode(item);\n if (!rowNode) {\n return;\n }\n // do delete - setting 'suppressFinishActions = true' to ensure EVENT_SELECTION_CHANGED is not raised for\n // each row node updated, instead it is raised once by the calling code if any selected nodes exist.\n if (rowNode.isSelected()) {\n nodesToUnselect.push(rowNode);\n }\n // so row renderer knows to fade row out (and not reposition it)\n rowNode.clearRowTopAndRowIndex();\n // NOTE: were we could remove from allLeaveChildren, however _.removeFromArray() is expensive, especially\n // if called multiple times (eg deleting lots of rows) and if allLeafChildren is a large list\n rowIdsRemoved[rowNode.id] = true;\n // _.removeFromArray(this.rootNode.allLeafChildren, rowNode);\n delete _this.allNodesMap[rowNode.id];\n rowNodeTransaction.remove.push(rowNode);\n });\n this.rootNode.allLeafChildren = this.rootNode.allLeafChildren.filter(function (rowNode) { return !rowIdsRemoved[rowNode.id]; });\n if (this.rootNode.sibling) {\n this.rootNode.sibling.allLeafChildren = this.rootNode.allLeafChildren;\n }\n };\n ClientSideNodeManager.prototype.executeUpdate = function (rowDataTran, rowNodeTransaction, nodesToUnselect) {\n var _this = this;\n var update = rowDataTran.update;\n if (_.missingOrEmpty(update)) {\n return;\n }\n update.forEach(function (item) {\n var rowNode = _this.lookupRowNode(item);\n if (!rowNode) {\n return;\n }\n rowNode.updateData(item);\n if (!rowNode.selectable && rowNode.isSelected()) {\n nodesToUnselect.push(rowNode);\n }\n _this.setMasterForRow(rowNode, item, ClientSideNodeManager.TOP_LEVEL, false);\n rowNodeTransaction.update.push(rowNode);\n });\n };\n ClientSideNodeManager.prototype.lookupRowNode = function (data) {\n var getRowIdFunc = this.gridOptionsWrapper.getRowIdFunc();\n var rowNode;\n if (getRowIdFunc) {\n // find rowNode using id\n var id = getRowIdFunc({ data: data, level: 0 });\n rowNode = this.allNodesMap[id];\n if (!rowNode) {\n console.error(\"AG Grid: could not find row id=\" + id + \", data item was not found for this id\");\n return null;\n }\n }\n else {\n // find rowNode using object references\n rowNode = this.rootNode.allLeafChildren.find(function (node) { return node.data === data; });\n if (!rowNode) {\n console.error(\"AG Grid: could not find data item as object was not found\", data);\n console.error(\"Consider using getRowId to help the Grid find matching row data\");\n return null;\n }\n }\n return rowNode || null;\n };\n ClientSideNodeManager.prototype.createNode = function (dataItem, parent, level) {\n var node = new RowNode(this.beans);\n node.group = false;\n this.setMasterForRow(node, dataItem, level, true);\n if (parent && !this.suppressParentsInRowNodes) {\n node.parent = parent;\n }\n node.level = level;\n node.setDataAndId(dataItem, this.nextId.toString());\n if (this.allNodesMap[node.id]) {\n console.warn(\"AG Grid: duplicate node id '\" + node.id + \"' detected from getRowId callback, this could cause issues in your grid.\");\n }\n this.allNodesMap[node.id] = node;\n this.nextId++;\n return node;\n };\n ClientSideNodeManager.prototype.setMasterForRow = function (rowNode, data, level, setExpanded) {\n if (this.doingTreeData) {\n rowNode.setMaster(false);\n if (setExpanded) {\n rowNode.expanded = false;\n }\n }\n else {\n // this is the default, for when doing grid data\n if (this.doingMasterDetail) {\n // if we are doing master detail, then the\n // default is that everything can be a Master Row.\n if (this.isRowMasterFunc) {\n rowNode.setMaster(this.isRowMasterFunc(data));\n }\n else {\n rowNode.setMaster(true);\n }\n }\n else {\n rowNode.setMaster(false);\n }\n if (setExpanded) {\n var rowGroupColumns = this.columnModel.getRowGroupColumns();\n var numRowGroupColumns = rowGroupColumns ? rowGroupColumns.length : 0;\n // need to take row group into account when determining level\n var masterRowLevel = level + numRowGroupColumns;\n rowNode.expanded = rowNode.master ? this.isExpanded(masterRowLevel) : false;\n }\n }\n };\n ClientSideNodeManager.prototype.isExpanded = function (level) {\n var expandByDefault = this.gridOptionsWrapper.getGroupDefaultExpanded();\n if (expandByDefault === -1) {\n return true;\n }\n return level < expandByDefault;\n };\n ClientSideNodeManager.TOP_LEVEL = 0;\n ClientSideNodeManager.ROOT_NODE_ID = 'ROOT_NODE_ID';\n return ClientSideNodeManager;\n}());\nexport { ClientSideNodeManager };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, Bean, BeanStub, ColumnGroup, Constants, GroupInstanceIdCreator } from \"@ag-grid-community/core\";\nexport var RowType;\n(function (RowType) {\n RowType[RowType[\"HEADER_GROUPING\"] = 0] = \"HEADER_GROUPING\";\n RowType[RowType[\"HEADER\"] = 1] = \"HEADER\";\n RowType[RowType[\"BODY\"] = 2] = \"BODY\";\n})(RowType || (RowType = {}));\nvar GridSerializer = /** @class */ (function (_super) {\n __extends(GridSerializer, _super);\n function GridSerializer() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n GridSerializer.prototype.serialize = function (gridSerializingSession, params) {\n if (params === void 0) { params = {}; }\n var columnsToExport = this.getColumnsToExport(params.allColumns, params.columnKeys);\n var serializeChain = _.compose(\n // first pass, put in the header names of the cols\n this.prepareSession(columnsToExport), this.prependContent(params), this.exportColumnGroups(params, columnsToExport), this.exportHeaders(params, columnsToExport), this.processPinnedTopRows(params, columnsToExport), this.processRows(params, columnsToExport), this.processPinnedBottomRows(params, columnsToExport), this.appendContent(params));\n return serializeChain(gridSerializingSession).parse();\n };\n GridSerializer.prototype.processRow = function (gridSerializingSession, params, columnsToExport, node) {\n var _this = this;\n var rowSkipper = params.shouldRowBeSkipped || (function () { return false; });\n var gridOptionsWrapper = this.gridOptionsWrapper;\n var context = gridOptionsWrapper.getContext();\n var api = gridOptionsWrapper.getApi();\n var columnApi = gridOptionsWrapper.getColumnApi();\n var skipSingleChildrenGroup = gridOptionsWrapper.isGroupRemoveSingleChildren();\n var hideOpenParents = gridOptionsWrapper.isGroupHideOpenParents();\n var skipLowestSingleChildrenGroup = gridOptionsWrapper.isGroupRemoveLowestSingleChildren();\n var isLeafNode = this.columnModel.isPivotMode() ? node.leafGroup : !node.group;\n var skipRowGroups = params.skipGroups || params.skipRowGroups;\n var shouldSkipLowestGroup = skipLowestSingleChildrenGroup && node.leafGroup;\n var shouldSkipCurrentGroup = node.allChildrenCount === 1 && (skipSingleChildrenGroup || shouldSkipLowestGroup);\n if (skipRowGroups && params.skipGroups) {\n _.doOnce(function () { return console.warn('AG Grid: Since v25.2 `skipGroups` has been renamed to `skipRowGroups`.'); }, 'gridSerializer-skipGroups');\n }\n var rowPosition = { rowIndex: node.rowIndex, rowPinned: node.rowPinned };\n if ((!isLeafNode && (params.skipRowGroups || shouldSkipCurrentGroup || hideOpenParents)) ||\n (params.onlySelected && !node.isSelected()) ||\n (params.rowNodes && !params.rowNodes.some(function (position) { return _this.rowPositionUtils.sameRow(position, rowPosition); })) ||\n (params.skipPinnedTop && node.rowPinned === 'top') ||\n (params.skipPinnedBottom && node.rowPinned === 'bottom')) {\n return;\n }\n // if we are in pivotMode, then the grid will show the root node only\n // if it's not a leaf group\n var nodeIsRootNode = node.level === -1;\n if (nodeIsRootNode && !node.leafGroup) {\n return;\n }\n var shouldRowBeSkipped = rowSkipper({ node: node, api: api, columnApi: columnApi, context: context });\n if (shouldRowBeSkipped) {\n return;\n }\n var rowAccumulator = gridSerializingSession.onNewBodyRow();\n columnsToExport.forEach(function (column, index) {\n rowAccumulator.onColumn(column, index, node);\n });\n if (params.getCustomContentBelowRow) {\n var content = params.getCustomContentBelowRow({ node: node, api: api, columnApi: columnApi, context: context });\n if (content) {\n gridSerializingSession.addCustomContent(content);\n }\n }\n };\n GridSerializer.prototype.appendContent = function (params) {\n return function (gridSerializingSession) {\n var appendContent = params.customFooter || params.appendContent;\n if (appendContent) {\n if (params.customFooter) {\n _.doOnce(function () { return console.warn('AG Grid: Since version 25.2.0 the `customFooter` param has been deprecated. Use `appendContent` instead.'); }, 'gridSerializer-customFooter');\n }\n gridSerializingSession.addCustomContent(appendContent);\n }\n return gridSerializingSession;\n };\n };\n GridSerializer.prototype.prependContent = function (params) {\n return function (gridSerializingSession) {\n var prependContent = params.customHeader || params.prependContent;\n if (prependContent) {\n if (params.customHeader) {\n _.doOnce(function () { return console.warn('AG Grid: Since version 25.2.0 the `customHeader` param has been deprecated. Use `prependContent` instead.'); }, 'gridSerializer-customHeader');\n }\n gridSerializingSession.addCustomContent(prependContent);\n }\n return gridSerializingSession;\n };\n };\n GridSerializer.prototype.prepareSession = function (columnsToExport) {\n return function (gridSerializingSession) {\n gridSerializingSession.prepare(columnsToExport);\n return gridSerializingSession;\n };\n };\n GridSerializer.prototype.exportColumnGroups = function (params, columnsToExport) {\n var _this = this;\n return function (gridSerializingSession) {\n if (!params.skipColumnGroupHeaders) {\n var groupInstanceIdCreator = new GroupInstanceIdCreator();\n var displayedGroups = _this.displayedGroupCreator.createDisplayedGroups(columnsToExport, _this.columnModel.getGridBalancedTree(), groupInstanceIdCreator, null);\n _this.recursivelyAddHeaderGroups(displayedGroups, gridSerializingSession, params.processGroupHeaderCallback);\n }\n else if (params.columnGroups) {\n _.doOnce(function () { return console.warn('AG Grid: Since v25.2 the `columnGroups` param has deprecated, and groups are exported by default.'); }, 'gridSerializer-columnGroups');\n }\n return gridSerializingSession;\n };\n };\n GridSerializer.prototype.exportHeaders = function (params, columnsToExport) {\n return function (gridSerializingSession) {\n if (!params.skipHeader && !params.skipColumnHeaders) {\n var gridRowIterator_1 = gridSerializingSession.onNewHeaderRow();\n columnsToExport.forEach(function (column, index) {\n gridRowIterator_1.onColumn(column, index, undefined);\n });\n }\n else if (params.skipHeader) {\n _.doOnce(function () { return console.warn('AG Grid: Since v25.2 the `skipHeader` param has been renamed to `skipColumnHeaders`.'); }, 'gridSerializer-skipHeader');\n }\n return gridSerializingSession;\n };\n };\n GridSerializer.prototype.processPinnedTopRows = function (params, columnsToExport) {\n var _this = this;\n return function (gridSerializingSession) {\n var processRow = _this.processRow.bind(_this, gridSerializingSession, params, columnsToExport);\n _this.pinnedRowModel.forEachPinnedTopRow(processRow);\n return gridSerializingSession;\n };\n };\n GridSerializer.prototype.processRows = function (params, columnsToExport) {\n var _this = this;\n return function (gridSerializingSession) {\n // when in pivot mode, we always render cols on screen, never 'all columns'\n var rowModel = _this.rowModel;\n var rowModelType = rowModel.getType();\n var usingCsrm = rowModelType === Constants.ROW_MODEL_TYPE_CLIENT_SIDE;\n var usingSsrm = rowModelType === Constants.ROW_MODEL_TYPE_SERVER_SIDE;\n var onlySelectedNonStandardModel = !usingCsrm && params.onlySelected;\n var processRow = _this.processRow.bind(_this, gridSerializingSession, params, columnsToExport);\n if (_this.columnModel.isPivotMode()) {\n if (usingCsrm) {\n rowModel.forEachPivotNode(processRow);\n }\n else {\n // must be enterprise, so we can just loop through all the nodes\n rowModel.forEachNode(processRow);\n }\n }\n else {\n // onlySelectedAllPages: user doing pagination and wants selected items from\n // other pages, so cannot use the standard row model as it won't have rows from\n // other pages.\n // onlySelectedNonStandardModel: if user wants selected in non standard row model\n // (eg viewport) then again RowModel cannot be used, so need to use selected instead.\n if (params.onlySelectedAllPages || onlySelectedNonStandardModel) {\n var selectedNodes = _this.selectionService.getSelectedNodes();\n selectedNodes.forEach(processRow);\n }\n else {\n // here is everything else - including standard row model and selected. we don't use\n // the selection model even when just using selected, so that the result is the order\n // of the rows appearing on the screen.\n if (usingCsrm) {\n rowModel.forEachNodeAfterFilterAndSort(processRow);\n }\n else if (usingSsrm) {\n rowModel.forEachNodeAfterFilterAndSort(processRow);\n }\n else {\n rowModel.forEachNode(processRow);\n }\n }\n }\n return gridSerializingSession;\n };\n };\n GridSerializer.prototype.processPinnedBottomRows = function (params, columnsToExport) {\n var _this = this;\n return function (gridSerializingSession) {\n var processRow = _this.processRow.bind(_this, gridSerializingSession, params, columnsToExport);\n _this.pinnedRowModel.forEachPinnedBottomRow(processRow);\n return gridSerializingSession;\n };\n };\n GridSerializer.prototype.getColumnsToExport = function (allColumns, columnKeys) {\n if (allColumns === void 0) { allColumns = false; }\n var isPivotMode = this.columnModel.isPivotMode();\n if (columnKeys && columnKeys.length) {\n return this.columnModel.getGridColumns(columnKeys);\n }\n if (allColumns && !isPivotMode) {\n // add auto group column for tree data\n var columns = this.gridOptionsWrapper.isTreeData()\n ? this.columnModel.getGridColumns([Constants.GROUP_AUTO_COLUMN_ID])\n : [];\n return columns.concat(this.columnModel.getAllPrimaryColumns() || []);\n }\n return this.columnModel.getAllDisplayedColumns();\n };\n GridSerializer.prototype.recursivelyAddHeaderGroups = function (displayedGroups, gridSerializingSession, processGroupHeaderCallback) {\n var directChildrenHeaderGroups = [];\n displayedGroups.forEach(function (columnGroupChild) {\n var columnGroup = columnGroupChild;\n if (!columnGroup.getChildren) {\n return;\n }\n columnGroup.getChildren().forEach(function (it) { return directChildrenHeaderGroups.push(it); });\n });\n if (displayedGroups.length > 0 && displayedGroups[0] instanceof ColumnGroup) {\n this.doAddHeaderHeader(gridSerializingSession, displayedGroups, processGroupHeaderCallback);\n }\n if (directChildrenHeaderGroups && directChildrenHeaderGroups.length > 0) {\n this.recursivelyAddHeaderGroups(directChildrenHeaderGroups, gridSerializingSession, processGroupHeaderCallback);\n }\n };\n GridSerializer.prototype.doAddHeaderHeader = function (gridSerializingSession, displayedGroups, processGroupHeaderCallback) {\n var _this = this;\n var gridRowIterator = gridSerializingSession.onNewHeaderGroupingRow();\n var columnIndex = 0;\n displayedGroups.forEach(function (columnGroupChild) {\n var columnGroup = columnGroupChild;\n var name;\n if (processGroupHeaderCallback) {\n name = processGroupHeaderCallback({\n columnGroup: columnGroup,\n api: _this.gridOptionsWrapper.getApi(),\n columnApi: _this.gridOptionsWrapper.getColumnApi(),\n context: _this.gridOptionsWrapper.getContext()\n });\n }\n else {\n name = _this.columnModel.getDisplayNameForColumnGroup(columnGroup, 'header');\n }\n var collapsibleGroupRanges = columnGroup.getLeafColumns().reduce(function (collapsibleGroups, currentColumn, currentIdx, arr) {\n var lastGroup = _.last(collapsibleGroups);\n var groupShow = currentColumn.getColumnGroupShow() === 'open';\n if (!groupShow) {\n if (lastGroup && lastGroup[1] == null) {\n lastGroup[1] = currentIdx - 1;\n }\n }\n else if (!lastGroup || lastGroup[1] != null) {\n lastGroup = [currentIdx];\n collapsibleGroups.push(lastGroup);\n }\n if (currentIdx === arr.length - 1 && lastGroup && lastGroup[1] == null) {\n lastGroup[1] = currentIdx;\n }\n return collapsibleGroups;\n }, []);\n gridRowIterator.onColumn(name || '', columnIndex++, columnGroup.getLeafColumns().length - 1, collapsibleGroupRanges);\n });\n };\n __decorate([\n Autowired('displayedGroupCreator')\n ], GridSerializer.prototype, \"displayedGroupCreator\", void 0);\n __decorate([\n Autowired('columnModel')\n ], GridSerializer.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired('rowModel')\n ], GridSerializer.prototype, \"rowModel\", void 0);\n __decorate([\n Autowired('pinnedRowModel')\n ], GridSerializer.prototype, \"pinnedRowModel\", void 0);\n __decorate([\n Autowired('selectionService')\n ], GridSerializer.prototype, \"selectionService\", void 0);\n __decorate([\n Autowired('rowPositionUtils')\n ], GridSerializer.prototype, \"rowPositionUtils\", void 0);\n GridSerializer = __decorate([\n Bean(\"gridSerializer\")\n ], GridSerializer);\n return GridSerializer;\n}(BeanStub));\nexport { GridSerializer };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Bean, BeanStub } from \"@ag-grid-community/core\";\nvar FilterStage = /** @class */ (function (_super) {\n __extends(FilterStage, _super);\n function FilterStage() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n FilterStage.prototype.execute = function (params) {\n var changedPath = params.changedPath;\n this.filterService.filter(changedPath);\n };\n __decorate([\n Autowired('filterService')\n ], FilterStage.prototype, \"filterService\", void 0);\n FilterStage = __decorate([\n Bean('filterStage')\n ], FilterStage);\n return FilterStage;\n}(BeanStub));\nexport { FilterStage };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, Bean, BeanStub } from \"@ag-grid-community/core\";\nvar SortStage = /** @class */ (function (_super) {\n __extends(SortStage, _super);\n function SortStage() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SortStage.prototype.execute = function (params) {\n var sortOptions = this.sortController.getSortOptions();\n var sortActive = _.exists(sortOptions) && sortOptions.length > 0;\n var deltaSort = sortActive\n && _.exists(params.rowNodeTransactions)\n // in time we can remove this check, so that delta sort is always\n // on if transactions are present. it's off for now so that we can\n // selectively turn it on and test it with some select users before\n // rolling out to everyone.\n && this.gridOptionsWrapper.isDeltaSort();\n var sortContainsGroupColumns = sortOptions.some(function (opt) { return !!opt.column.getColDef().showRowGroup; });\n this.sortService.sort(sortOptions, sortActive, deltaSort, params.rowNodeTransactions, params.changedPath, sortContainsGroupColumns);\n };\n __decorate([\n Autowired('sortService')\n ], SortStage.prototype, \"sortService\", void 0);\n __decorate([\n Autowired('sortController')\n ], SortStage.prototype, \"sortController\", void 0);\n __decorate([\n Autowired('columnModel')\n ], SortStage.prototype, \"columnModel\", void 0);\n SortStage = __decorate([\n Bean('sortStage')\n ], SortStage);\n return SortStage;\n}(BeanStub));\nexport { SortStage };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, Bean, BeanStub, RowNode } from \"@ag-grid-community/core\";\nvar FlattenStage = /** @class */ (function (_super) {\n __extends(FlattenStage, _super);\n function FlattenStage() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n FlattenStage.prototype.execute = function (params) {\n var rootNode = params.rowNode;\n // even if not doing grouping, we do the mapping, as the client might\n // of passed in data that already has a grouping in it somewhere\n var result = [];\n // putting value into a wrapper so it's passed by reference\n var nextRowTop = { value: 0 };\n var skipLeafNodes = this.columnModel.isPivotMode();\n // if we are reducing, and not grouping, then we want to show the root node, as that\n // is where the pivot values are\n var showRootNode = skipLeafNodes && rootNode.leafGroup;\n var topList = showRootNode ? [rootNode] : rootNode.childrenAfterSort;\n this.recursivelyAddToRowsToDisplay(topList, result, nextRowTop, skipLeafNodes, 0);\n // we do not want the footer total if the gris is empty\n var atLeastOneRowPresent = result.length > 0;\n var includeGroupTotalFooter = !showRootNode\n // don't show total footer when showRootNode is true (i.e. in pivot mode and no groups)\n && atLeastOneRowPresent\n && this.gridOptionsWrapper.isGroupIncludeTotalFooter();\n if (includeGroupTotalFooter) {\n this.ensureFooterNodeExists(rootNode);\n this.addRowNodeToRowsToDisplay(rootNode.sibling, result, nextRowTop, 0);\n }\n return result;\n };\n FlattenStage.prototype.recursivelyAddToRowsToDisplay = function (rowsToFlatten, result, nextRowTop, skipLeafNodes, uiLevel) {\n if (_.missingOrEmpty(rowsToFlatten)) {\n return;\n }\n var hideOpenParents = this.gridOptionsWrapper.isGroupHideOpenParents();\n // these two are mutually exclusive, so if first set, we don't set the second\n var groupRemoveSingleChildren = this.gridOptionsWrapper.isGroupRemoveSingleChildren();\n var groupRemoveLowestSingleChildren = !groupRemoveSingleChildren && this.gridOptionsWrapper.isGroupRemoveLowestSingleChildren();\n for (var i = 0; i < rowsToFlatten.length; i++) {\n var rowNode = rowsToFlatten[i];\n // check all these cases, for working out if this row should be included in the final mapped list\n var isParent = rowNode.hasChildren();\n var isSkippedLeafNode = skipLeafNodes && !isParent;\n var isRemovedSingleChildrenGroup = groupRemoveSingleChildren &&\n isParent &&\n rowNode.childrenAfterGroup.length === 1;\n var isRemovedLowestSingleChildrenGroup = groupRemoveLowestSingleChildren &&\n isParent &&\n rowNode.leafGroup &&\n rowNode.childrenAfterGroup.length === 1;\n // hide open parents means when group is open, we don't show it. we also need to make sure the\n // group is expandable in the first place (as leaf groups are not expandable if pivot mode is on).\n // the UI will never allow expanding leaf groups, however the user might via the API (or menu option 'expand all')\n var neverAllowToExpand = skipLeafNodes && rowNode.leafGroup;\n var isHiddenOpenParent = hideOpenParents && rowNode.expanded && !rowNode.master && (!neverAllowToExpand);\n var thisRowShouldBeRendered = !isSkippedLeafNode && !isHiddenOpenParent &&\n !isRemovedSingleChildrenGroup && !isRemovedLowestSingleChildrenGroup;\n if (thisRowShouldBeRendered) {\n this.addRowNodeToRowsToDisplay(rowNode, result, nextRowTop, uiLevel);\n }\n // if we are pivoting, we never map below the leaf group\n if (skipLeafNodes && rowNode.leafGroup) {\n continue;\n }\n if (isParent) {\n var excludedParent = isRemovedSingleChildrenGroup || isRemovedLowestSingleChildrenGroup;\n // we traverse the group if it is expended, however we always traverse if the parent node\n // was removed (as the group will never be opened if it is not displayed, we show the children instead)\n if (rowNode.expanded || excludedParent) {\n // if the parent was excluded, then ui level is that of the parent\n var uiLevelForChildren = excludedParent ? uiLevel : uiLevel + 1;\n this.recursivelyAddToRowsToDisplay(rowNode.childrenAfterSort, result, nextRowTop, skipLeafNodes, uiLevelForChildren);\n // put a footer in if user is looking for it\n if (this.gridOptionsWrapper.isGroupIncludeFooter()) {\n this.ensureFooterNodeExists(rowNode);\n this.addRowNodeToRowsToDisplay(rowNode.sibling, result, nextRowTop, uiLevel);\n }\n }\n }\n else if (rowNode.master && rowNode.expanded) {\n var detailNode = this.createDetailNode(rowNode);\n this.addRowNodeToRowsToDisplay(detailNode, result, nextRowTop, uiLevel);\n }\n }\n };\n // duplicated method, it's also in floatingRowModel\n FlattenStage.prototype.addRowNodeToRowsToDisplay = function (rowNode, result, nextRowTop, uiLevel) {\n var isGroupMultiAutoColumn = this.gridOptionsWrapper.isGroupMultiAutoColumn();\n result.push(rowNode);\n rowNode.setUiLevel(isGroupMultiAutoColumn ? 0 : uiLevel);\n };\n FlattenStage.prototype.ensureFooterNodeExists = function (groupNode) {\n // only create footer node once, otherwise we have daemons and\n // the animate screws up with the daemons hanging around\n if (_.exists(groupNode.sibling)) {\n return;\n }\n var footerNode = new RowNode(this.beans);\n Object.keys(groupNode).forEach(function (key) {\n footerNode[key] = groupNode[key];\n });\n footerNode.footer = true;\n footerNode.setRowTop(null);\n footerNode.setRowIndex(null);\n // manually set oldRowTop to null so we discard any\n // previous information about its position.\n footerNode.oldRowTop = null;\n if (_.exists(footerNode.id)) {\n footerNode.id = 'rowGroupFooter_' + footerNode.id;\n }\n // get both header and footer to reference each other as siblings. this is never undone,\n // only overwritten. so if a group is expanded, then contracted, it will have a ghost\n // sibling - but that's fine, as we can ignore this if the header is contracted.\n footerNode.sibling = groupNode;\n groupNode.sibling = footerNode;\n };\n FlattenStage.prototype.createDetailNode = function (masterNode) {\n if (_.exists(masterNode.detailNode)) {\n return masterNode.detailNode;\n }\n var detailNode = new RowNode(this.beans);\n detailNode.detail = true;\n detailNode.selectable = false;\n detailNode.parent = masterNode;\n if (_.exists(masterNode.id)) {\n detailNode.id = 'detail_' + masterNode.id;\n }\n detailNode.data = masterNode.data;\n detailNode.level = masterNode.level + 1;\n masterNode.detailNode = detailNode;\n return detailNode;\n };\n __decorate([\n Autowired('columnModel')\n ], FlattenStage.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired('beans')\n ], FlattenStage.prototype, \"beans\", void 0);\n FlattenStage = __decorate([\n Bean('flattenStage')\n ], FlattenStage);\n return FlattenStage;\n}(BeanStub));\nexport { FlattenStage };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, Bean, PostConstruct, BeanStub } from \"@ag-grid-community/core\";\nvar SortService = /** @class */ (function (_super) {\n __extends(SortService, _super);\n function SortService() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SortService.prototype.init = function () {\n this.postSortFunc = this.gridOptionsWrapper.getPostSortFunc();\n };\n SortService.prototype.sort = function (sortOptions, sortActive, useDeltaSort, rowNodeTransactions, changedPath, sortContainsGroupColumns) {\n var _this = this;\n var groupMaintainOrder = this.gridOptionsWrapper.isGroupMaintainOrder();\n var groupColumnsPresent = this.columnModel.getAllGridColumns().some(function (c) { return c.isRowGroupActive(); });\n var allDirtyNodes = {};\n if (useDeltaSort && rowNodeTransactions) {\n allDirtyNodes = this.calculateDirtyNodes(rowNodeTransactions);\n }\n var isPivotMode = this.columnModel.isPivotMode();\n var callback = function (rowNode) {\n // we clear out the 'pull down open parents' first, as the values mix up the sorting\n _this.pullDownGroupDataForHideOpenParents(rowNode.childrenAfterAggFilter, true);\n // It's pointless to sort rows which aren't being displayed. in pivot mode we don't need to sort the leaf group children.\n var skipSortingPivotLeafs = isPivotMode && rowNode.leafGroup;\n // Javascript sort is non deterministic when all the array items are equals, ie Comparator always returns 0,\n // so to ensure the array keeps its order, add an additional sorting condition manually, in this case we\n // are going to inspect the original array position. This is what sortedRowNodes is for.\n var skipSortingGroups = groupMaintainOrder && groupColumnsPresent && !rowNode.leafGroup && !sortContainsGroupColumns;\n if (!sortActive || skipSortingGroups || skipSortingPivotLeafs) {\n // when 'groupMaintainOrder' is enabled we skip sorting groups unless we are sorting on group columns\n var childrenToBeSorted = rowNode.childrenAfterAggFilter.slice(0);\n if (groupMaintainOrder && rowNode.childrenAfterSort) {\n var indexedOrders_1 = rowNode.childrenAfterSort.reduce(function (acc, row, idx) {\n acc[row.id] = idx;\n return acc;\n }, {});\n childrenToBeSorted.sort(function (row1, row2) { return (indexedOrders_1[row1.id] || 0) - (indexedOrders_1[row2.id] || 0); });\n }\n rowNode.childrenAfterSort = childrenToBeSorted;\n }\n else if (useDeltaSort) {\n rowNode.childrenAfterSort = _this.doDeltaSort(rowNode, allDirtyNodes, changedPath, sortOptions);\n }\n else {\n rowNode.childrenAfterSort = _this.rowNodeSorter.doFullSort(rowNode.childrenAfterAggFilter, sortOptions);\n }\n if (rowNode.sibling) {\n rowNode.sibling.childrenAfterSort = rowNode.childrenAfterSort;\n }\n _this.updateChildIndexes(rowNode);\n if (_this.postSortFunc) {\n var params = { nodes: rowNode.childrenAfterSort };\n _this.postSortFunc(params);\n }\n };\n if (changedPath) {\n changedPath.forEachChangedNodeDepthFirst(callback);\n }\n this.updateGroupDataForHideOpenParents(changedPath);\n };\n SortService.prototype.calculateDirtyNodes = function (rowNodeTransactions) {\n var dirtyNodes = {};\n var addNodesFunc = function (rowNodes) {\n if (rowNodes) {\n rowNodes.forEach(function (rowNode) { return dirtyNodes[rowNode.id] = true; });\n }\n };\n // all leaf level nodes in the transaction were impacted\n if (rowNodeTransactions) {\n rowNodeTransactions.forEach(function (tran) {\n addNodesFunc(tran.add);\n addNodesFunc(tran.update);\n addNodesFunc(tran.remove);\n });\n }\n return dirtyNodes;\n };\n SortService.prototype.doDeltaSort = function (rowNode, allTouchedNodes, changedPath, sortOptions) {\n var _this = this;\n var unsortedRows = rowNode.childrenAfterAggFilter;\n var oldSortedRows = rowNode.childrenAfterSort;\n if (!oldSortedRows) {\n return this.rowNodeSorter.doFullSort(unsortedRows, sortOptions);\n }\n var untouchedRowsMap = {};\n var touchedRows = [];\n unsortedRows.forEach(function (row) {\n if (allTouchedNodes[row.id] || !changedPath.canSkip(row)) {\n touchedRows.push(row);\n }\n else {\n untouchedRowsMap[row.id] = true;\n }\n });\n var sortedUntouchedRows = oldSortedRows.filter(function (child) { return untouchedRowsMap[child.id]; });\n var mapNodeToSortedNode = function (rowNode, pos) { return ({ currentPos: pos, rowNode: rowNode }); };\n var sortedChangedRows = touchedRows\n .map(mapNodeToSortedNode)\n .sort(function (a, b) { return _this.rowNodeSorter.compareRowNodes(sortOptions, a, b); });\n return this.mergeSortedArrays(sortOptions, sortedChangedRows, sortedUntouchedRows.map(mapNodeToSortedNode)).map(function (_a) {\n var rowNode = _a.rowNode;\n return rowNode;\n });\n };\n // Merge two sorted arrays into each other\n SortService.prototype.mergeSortedArrays = function (sortOptions, arr1, arr2) {\n var res = [];\n var i = 0;\n var j = 0;\n // Traverse both array, adding them in order\n while (i < arr1.length && j < arr2.length) {\n // Check if current element of first\n // array is smaller than current element\n // of second array. If yes, store first\n // array element and increment first array\n // index. Otherwise do same with second array\n var compareResult = this.rowNodeSorter.compareRowNodes(sortOptions, arr1[i], arr2[j]);\n if (compareResult < 0) {\n res.push(arr1[i++]);\n }\n else {\n res.push(arr2[j++]);\n }\n }\n // add remaining from arr1\n while (i < arr1.length) {\n res.push(arr1[i++]);\n }\n // add remaining from arr2\n while (j < arr2.length) {\n res.push(arr2[j++]);\n }\n return res;\n };\n SortService.prototype.updateChildIndexes = function (rowNode) {\n if (_.missing(rowNode.childrenAfterSort)) {\n return;\n }\n var listToSort = rowNode.childrenAfterSort;\n for (var i = 0; i < listToSort.length; i++) {\n var child = listToSort[i];\n var firstChild = i === 0;\n var lastChild = i === rowNode.childrenAfterSort.length - 1;\n child.setFirstChild(firstChild);\n child.setLastChild(lastChild);\n child.setChildIndex(i);\n }\n };\n SortService.prototype.updateGroupDataForHideOpenParents = function (changedPath) {\n var _this = this;\n if (!this.gridOptionsWrapper.isGroupHideOpenParents()) {\n return;\n }\n if (this.gridOptionsWrapper.isTreeData()) {\n var msg_1 = \"AG Grid: The property hideOpenParents dose not work with Tree Data. This is because Tree Data has values at the group level, it doesn't make sense to hide them (as opposed to Row Grouping, which only has Aggregated Values at the group level).\";\n _.doOnce(function () { return console.warn(msg_1); }, 'sortService.hideOpenParentsWithTreeData');\n return false;\n }\n // recurse breadth first over group nodes after sort to 'pull down' group data to child groups\n var callback = function (rowNode) {\n _this.pullDownGroupDataForHideOpenParents(rowNode.childrenAfterSort, false);\n rowNode.childrenAfterSort.forEach(function (child) {\n if (child.hasChildren()) {\n callback(child);\n }\n });\n };\n if (changedPath) {\n changedPath.executeFromRootNode(function (rowNode) { return callback(rowNode); });\n }\n };\n SortService.prototype.pullDownGroupDataForHideOpenParents = function (rowNodes, clearOperation) {\n var _this = this;\n if (!this.gridOptionsWrapper.isGroupHideOpenParents() || _.missing(rowNodes)) {\n return;\n }\n rowNodes.forEach(function (childRowNode) {\n var groupDisplayCols = _this.columnModel.getGroupDisplayColumns();\n groupDisplayCols.forEach(function (groupDisplayCol) {\n var showRowGroup = groupDisplayCol.getColDef().showRowGroup;\n if (typeof showRowGroup !== 'string') {\n console.error('AG Grid: groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup');\n return;\n }\n var displayingGroupKey = showRowGroup;\n var rowGroupColumn = _this.columnModel.getPrimaryColumn(displayingGroupKey);\n var thisRowNodeMatches = rowGroupColumn === childRowNode.rowGroupColumn;\n if (thisRowNodeMatches) {\n return;\n }\n if (clearOperation) {\n // if doing a clear operation, we clear down the value for every possible group column\n childRowNode.setGroupValue(groupDisplayCol.getId(), undefined);\n }\n else {\n // if doing a set operation, we set only where the pull down is to occur\n var parentToStealFrom = childRowNode.getFirstChildOfFirstChild(rowGroupColumn);\n if (parentToStealFrom) {\n childRowNode.setGroupValue(groupDisplayCol.getId(), parentToStealFrom.key);\n }\n }\n });\n });\n };\n __decorate([\n Autowired('columnModel')\n ], SortService.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired('rowNodeSorter')\n ], SortService.prototype, \"rowNodeSorter\", void 0);\n __decorate([\n PostConstruct\n ], SortService.prototype, \"init\", null);\n SortService = __decorate([\n Bean('sortService')\n ], SortService);\n return SortService;\n}(BeanStub));\nexport { SortService };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Bean, BeanStub } from \"@ag-grid-community/core\";\nvar FilterService = /** @class */ (function (_super) {\n __extends(FilterService, _super);\n function FilterService() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n FilterService.prototype.filter = function (changedPath) {\n var filterActive = this.filterManager.isColumnFilterPresent()\n || this.filterManager.isQuickFilterPresent()\n || this.gridOptionsWrapper.isExternalFilterPresent();\n this.filterNodes(filterActive, changedPath);\n };\n FilterService.prototype.filterNodes = function (filterActive, changedPath) {\n var _this = this;\n var filterCallback = function (rowNode, includeChildNodes) {\n // recursively get all children that are groups to also filter\n if (rowNode.hasChildren()) {\n // result of filter for this node. when filtering tree data, includeChildNodes = true when parent passes\n if (filterActive && !includeChildNodes) {\n rowNode.childrenAfterFilter = rowNode.childrenAfterGroup.filter(function (childNode) {\n // a group is included in the result if it has any children of it's own.\n // by this stage, the child groups are already filtered\n var passBecauseChildren = childNode.childrenAfterFilter && childNode.childrenAfterFilter.length > 0;\n // both leaf level nodes and tree data nodes have data. these get added if\n // the data passes the filter\n var passBecauseDataPasses = childNode.data\n && _this.filterManager.doesRowPassFilter({ rowNode: childNode });\n // note - tree data nodes pass either if a) they pass themselves or b) any children of that node pass\n return passBecauseChildren || passBecauseDataPasses;\n });\n }\n else {\n // if not filtering, the result is the original list\n rowNode.childrenAfterFilter = rowNode.childrenAfterGroup;\n }\n }\n else {\n rowNode.childrenAfterFilter = rowNode.childrenAfterGroup;\n }\n if (rowNode.sibling) {\n rowNode.sibling.childrenAfterFilter = rowNode.childrenAfterFilter;\n }\n };\n if (this.doingTreeDataFiltering()) {\n var treeDataDepthFirstFilter_1 = function (rowNode, alreadyFoundInParent) {\n // tree data filter traverses the hierarchy depth first and includes child nodes if parent passes\n // filter, and parent nodes will be include if any children exist.\n if (rowNode.childrenAfterGroup) {\n for (var i = 0; i < rowNode.childrenAfterGroup.length; i++) {\n var childNode = rowNode.childrenAfterGroup[i];\n // first check if current node passes filter before invoking child nodes\n var foundInParent = alreadyFoundInParent\n || _this.filterManager.doesRowPassFilter({ rowNode: childNode });\n if (childNode.childrenAfterGroup) {\n treeDataDepthFirstFilter_1(rowNode.childrenAfterGroup[i], foundInParent);\n }\n else {\n filterCallback(childNode, foundInParent);\n }\n }\n }\n filterCallback(rowNode, alreadyFoundInParent);\n };\n var treeDataFilterCallback = function (rowNode) { return treeDataDepthFirstFilter_1(rowNode, false); };\n changedPath.executeFromRootNode(treeDataFilterCallback);\n }\n else {\n var defaultFilterCallback = function (rowNode) { return filterCallback(rowNode, false); };\n changedPath.forEachChangedNodeDepthFirst(defaultFilterCallback, true);\n }\n };\n FilterService.prototype.doingTreeDataFiltering = function () {\n return this.gridOptionsWrapper.isTreeData() && !this.gridOptionsWrapper.isExcludeChildrenWhenTreeDataFiltering();\n };\n __decorate([\n Autowired('filterManager')\n ], FilterService.prototype, \"filterManager\", void 0);\n FilterService = __decorate([\n Bean(\"filterService\")\n ], FilterService);\n return FilterService;\n}(BeanStub));\nexport { FilterService };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { Autowired, Bean, BeanStub, Constants, Events, PostConstruct, _ } from \"@ag-grid-community/core\";\nvar ImmutableService = /** @class */ (function (_super) {\n __extends(ImmutableService, _super);\n function ImmutableService() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ImmutableService.prototype.postConstruct = function () {\n if (this.rowModel.getType() === Constants.ROW_MODEL_TYPE_CLIENT_SIDE) {\n this.clientSideRowModel = this.rowModel;\n }\n };\n ImmutableService.prototype.isActive = function () {\n return this.gridOptionsWrapper.isImmutableData();\n };\n ImmutableService.prototype.setRowData = function (rowData) {\n var transactionAndMap = this.createTransactionForRowData(rowData);\n if (!transactionAndMap) {\n return;\n }\n var _a = __read(transactionAndMap, 2), transaction = _a[0], orderIdMap = _a[1];\n var nodeTransaction = this.clientSideRowModel.updateRowData(transaction, orderIdMap);\n // need to force updating of full width rows - note this wouldn't be necessary the full width cell comp listened\n // to the data change event on the row node and refreshed itself.\n if (nodeTransaction) {\n this.rowRenderer.refreshFullWidthRows(nodeTransaction.update);\n }\n // - shows 'no rows' overlay if needed\n var rowDataChangedEvent = {\n type: Events.EVENT_ROW_DATA_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(rowDataChangedEvent);\n };\n // converts the setRowData() command to a transaction\n ImmutableService.prototype.createTransactionForRowData = function (rowData) {\n if (_.missing(this.clientSideRowModel)) {\n console.error('AG Grid: ImmutableService only works with ClientSideRowModel');\n return;\n }\n var getRowIdFunc = this.gridOptionsWrapper.getRowIdFunc();\n if (getRowIdFunc == null) {\n console.error('AG Grid: ImmutableService requires getRowId() callback to be implemented, your row data needs IDs!');\n return;\n }\n // convert the data into a transaction object by working out adds, removes and updates\n var transaction = {\n remove: [],\n update: [],\n add: []\n };\n var existingNodesMap = this.clientSideRowModel.getCopyOfNodesMap();\n var suppressSortOrder = this.gridOptionsWrapper.isSuppressMaintainUnsortedOrder();\n var orderMap = suppressSortOrder ? undefined : {};\n if (_.exists(rowData)) {\n // split all the new data in the following:\n // if new, push to 'add'\n // if update, push to 'update'\n // if not changed, do not include in the transaction\n rowData.forEach(function (data, index) {\n var id = getRowIdFunc({ data: data, level: 0 });\n var existingNode = existingNodesMap[id];\n if (orderMap) {\n orderMap[id] = index;\n }\n if (existingNode) {\n var dataHasChanged = existingNode.data !== data;\n if (dataHasChanged) {\n transaction.update.push(data);\n }\n // otherwise, if data not changed, we just don't include it anywhere, as it's not a delta\n // remove from list, so we know the item is not to be removed\n existingNodesMap[id] = undefined;\n }\n else {\n transaction.add.push(data);\n }\n });\n }\n // at this point, all rows that are left, should be removed\n _.iterateObject(existingNodesMap, function (id, rowNode) {\n if (rowNode) {\n transaction.remove.push(rowNode.data);\n }\n });\n return [transaction, orderMap];\n };\n __decorate([\n Autowired('rowModel')\n ], ImmutableService.prototype, \"rowModel\", void 0);\n __decorate([\n Autowired('rowRenderer')\n ], ImmutableService.prototype, \"rowRenderer\", void 0);\n __decorate([\n Autowired('columnApi')\n ], ImmutableService.prototype, \"columnApi\", void 0);\n __decorate([\n Autowired('gridApi')\n ], ImmutableService.prototype, \"gridApi\", void 0);\n __decorate([\n PostConstruct\n ], ImmutableService.prototype, \"postConstruct\", null);\n ImmutableService = __decorate([\n Bean('immutableService')\n ], ImmutableService);\n return ImmutableService;\n}(BeanStub));\nexport { ImmutableService };\n","import { ModuleNames } from \"@ag-grid-community/core\";\nimport { ClientSideRowModel } from \"./clientSideRowModel/clientSideRowModel\";\nimport { FilterStage } from \"./clientSideRowModel/filterStage\";\nimport { SortStage } from \"./clientSideRowModel/sortStage\";\nimport { FlattenStage } from \"./clientSideRowModel/flattenStage\";\nimport { SortService } from \"./clientSideRowModel/sortService\";\nimport { FilterService } from \"./clientSideRowModel/filterService\";\nimport { ImmutableService } from \"./clientSideRowModel/immutableService\";\nexport var ClientSideRowModelModule = {\n moduleName: ModuleNames.ClientSideRowModelModule,\n beans: [FilterStage, SortStage, FlattenStage, SortService, FilterService, ImmutableService],\n rowModels: { clientSide: ClientSideRowModel }\n};\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, PostConstruct, PreDestroy, RowNode, RowNodeBlock, Autowired } from \"@ag-grid-community/core\";\nvar InfiniteBlock = /** @class */ (function (_super) {\n __extends(InfiniteBlock, _super);\n function InfiniteBlock(id, parentCache, params) {\n var _this = _super.call(this, id) || this;\n _this.parentCache = parentCache;\n _this.params = params;\n // we don't need to calculate these now, as the inputs don't change,\n // however it makes the code easier to read if we work them out up front\n _this.startRow = id * params.blockSize;\n _this.endRow = _this.startRow + params.blockSize;\n return _this;\n }\n InfiniteBlock.prototype.postConstruct = function () {\n this.createRowNodes();\n };\n InfiniteBlock.prototype.getBlockStateJson = function () {\n return {\n id: '' + this.getId(),\n state: {\n blockNumber: this.getId(),\n startRow: this.getStartRow(),\n endRow: this.getEndRow(),\n pageStatus: this.getState()\n }\n };\n };\n InfiniteBlock.prototype.setDataAndId = function (rowNode, data, index) {\n // if there's no id and the rowNode was rendered before, it means this\n // was a placeholder rowNode and should not be recycled. Setting\n // `alreadyRendered` to `false` forces the rowRenderer to flush it.\n if (!rowNode.id && rowNode.alreadyRendered) {\n rowNode.alreadyRendered = false;\n }\n if (_.exists(data)) {\n // this means if the user is not providing id's we just use the\n // index for the row. this will allow selection to work (that is based\n // on index) as long user is not inserting or deleting rows,\n // or wanting to keep selection between server side sorting or filtering\n rowNode.setDataAndId(data, index.toString());\n }\n else {\n rowNode.setDataAndId(undefined, undefined);\n }\n };\n InfiniteBlock.prototype.loadFromDatasource = function () {\n var _this = this;\n var params = this.createLoadParams();\n if (_.missing(this.params.datasource.getRows)) {\n console.warn(\"AG Grid: datasource is missing getRows method\");\n return;\n }\n // put in timeout, to force result to be async\n window.setTimeout(function () {\n _this.params.datasource.getRows(params);\n }, 0);\n };\n InfiniteBlock.prototype.processServerFail = function () {\n // todo - this method has better handling in SSRM\n };\n InfiniteBlock.prototype.createLoadParams = function () {\n // PROBLEM . . . . when the user sets sort via colDef.sort, then this code\n // is executing before the sort is set up, so server is not getting the sort\n // model. need to change with regards order - so the server side request is\n // AFTER thus it gets the right sort model.\n var params = {\n startRow: this.getStartRow(),\n endRow: this.getEndRow(),\n successCallback: this.pageLoaded.bind(this, this.getVersion()),\n failCallback: this.pageLoadFailed.bind(this, this.getVersion()),\n sortModel: this.params.sortModel,\n filterModel: this.params.filterModel,\n context: this.gridOptionsWrapper.getContext()\n };\n return params;\n };\n InfiniteBlock.prototype.forEachNode = function (callback, sequence, rowCount) {\n var _this = this;\n this.rowNodes.forEach(function (rowNode, index) {\n var rowIndex = _this.startRow + index;\n if (rowIndex < rowCount) {\n callback(rowNode, sequence.next());\n }\n });\n };\n InfiniteBlock.prototype.getLastAccessed = function () {\n return this.lastAccessed;\n };\n InfiniteBlock.prototype.getRow = function (rowIndex, dontTouchLastAccessed) {\n if (dontTouchLastAccessed === void 0) { dontTouchLastAccessed = false; }\n if (!dontTouchLastAccessed) {\n this.lastAccessed = this.params.lastAccessedSequence.next();\n }\n var localIndex = rowIndex - this.startRow;\n return this.rowNodes[localIndex];\n };\n InfiniteBlock.prototype.getStartRow = function () {\n return this.startRow;\n };\n InfiniteBlock.prototype.getEndRow = function () {\n return this.endRow;\n };\n // creates empty row nodes, data is missing as not loaded yet\n InfiniteBlock.prototype.createRowNodes = function () {\n this.rowNodes = [];\n for (var i = 0; i < this.params.blockSize; i++) {\n var rowIndex = this.startRow + i;\n var rowNode = new RowNode(this.beans);\n rowNode.setRowHeight(this.params.rowHeight);\n rowNode.uiLevel = 0;\n rowNode.setRowIndex(rowIndex);\n rowNode.setRowTop(this.params.rowHeight * rowIndex);\n this.rowNodes.push(rowNode);\n }\n };\n InfiniteBlock.prototype.processServerResult = function (params) {\n var _this = this;\n this.rowNodes.forEach(function (rowNode, index) {\n var data = params.rowData ? params.rowData[index] : undefined;\n _this.setDataAndId(rowNode, data, _this.startRow + index);\n });\n var finalRowCount = params.rowCount != null && params.rowCount >= 0 ? params.rowCount : undefined;\n this.parentCache.pageLoaded(this, finalRowCount);\n };\n InfiniteBlock.prototype.destroyRowNodes = function () {\n this.rowNodes.forEach(function (rowNode) {\n // this is needed, so row render knows to fade out the row, otherwise it\n // sees row top is present, and thinks the row should be shown.\n rowNode.clearRowTopAndRowIndex();\n });\n };\n __decorate([\n Autowired('beans')\n ], InfiniteBlock.prototype, \"beans\", void 0);\n __decorate([\n PostConstruct\n ], InfiniteBlock.prototype, \"postConstruct\", null);\n __decorate([\n PreDestroy\n ], InfiniteBlock.prototype, \"destroyRowNodes\", null);\n return InfiniteBlock;\n}(RowNodeBlock));\nexport { InfiniteBlock };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport { Autowired, BeanStub, Events, NumberSequence, PreDestroy, Qualifier, _ } from \"@ag-grid-community/core\";\nimport { InfiniteBlock } from \"./infiniteBlock\";\nvar InfiniteCache = /** @class */ (function (_super) {\n __extends(InfiniteCache, _super);\n function InfiniteCache(params) {\n var _this = _super.call(this) || this;\n _this.lastRowIndexKnown = false;\n _this.blocks = {};\n _this.blockCount = 0;\n _this.rowCount = params.initialRowCount;\n _this.params = params;\n return _this;\n }\n InfiniteCache.prototype.setBeans = function (loggerFactory) {\n this.logger = loggerFactory.create('InfiniteCache');\n };\n // the rowRenderer will not pass dontCreatePage, meaning when rendering the grid,\n // it will want new pages in the cache as it asks for rows. only when we are inserting /\n // removing rows via the api is dontCreatePage set, where we move rows between the pages.\n InfiniteCache.prototype.getRow = function (rowIndex, dontCreatePage) {\n if (dontCreatePage === void 0) { dontCreatePage = false; }\n var blockId = Math.floor(rowIndex / this.params.blockSize);\n var block = this.blocks[blockId];\n if (!block) {\n if (dontCreatePage) {\n return undefined;\n }\n block = this.createBlock(blockId);\n }\n return block.getRow(rowIndex);\n };\n InfiniteCache.prototype.createBlock = function (blockNumber) {\n var newBlock = this.createBean(new InfiniteBlock(blockNumber, this, this.params));\n this.blocks[newBlock.getId()] = newBlock;\n this.blockCount++;\n this.purgeBlocksIfNeeded(newBlock);\n this.params.rowNodeBlockLoader.addBlock(newBlock);\n return newBlock;\n };\n // we have this on infinite row model only, not server side row model,\n // because for server side, it would leave the children in inconsistent\n // state - eg if a node had children, but after the refresh it had data\n // for a different row, then the children would be with the wrong row node.\n InfiniteCache.prototype.refreshCache = function () {\n var nothingToRefresh = this.blockCount == 0;\n if (nothingToRefresh) {\n this.purgeCache();\n return;\n }\n this.getBlocksInOrder().forEach(function (block) { return block.setStateWaitingToLoad(); });\n this.params.rowNodeBlockLoader.checkBlockToLoad();\n };\n InfiniteCache.prototype.destroyAllBlocks = function () {\n var _this = this;\n this.getBlocksInOrder().forEach(function (block) { return _this.destroyBlock(block); });\n };\n InfiniteCache.prototype.getRowCount = function () {\n return this.rowCount;\n };\n InfiniteCache.prototype.isLastRowIndexKnown = function () {\n return this.lastRowIndexKnown;\n };\n // block calls this, when page loaded\n InfiniteCache.prototype.pageLoaded = function (block, lastRow) {\n // if we are not active, then we ignore all events, otherwise we could end up getting the\n // grid to refresh even though we are no longer the active cache\n if (!this.isAlive()) {\n return;\n }\n this.logger.log(\"onPageLoaded: page = \" + block.getId() + \", lastRow = \" + lastRow);\n this.checkRowCount(block, lastRow);\n // we fire cacheUpdated even if the row count has not changed, as some items need updating even\n // if no new rows to render. for example the pagination panel has '?' as the total rows when loading\n // is underway, which would need to get updated when loading finishes.\n this.onCacheUpdated();\n };\n InfiniteCache.prototype.purgeBlocksIfNeeded = function (blockToExclude) {\n var _this = this;\n // we exclude checking for the page just created, as this has yet to be accessed and hence\n // the lastAccessed stamp will not be updated for the first time yet\n var blocksForPurging = this.getBlocksInOrder().filter(function (b) { return b != blockToExclude; });\n var lastAccessedComparator = function (a, b) { return b.getLastAccessed() - a.getLastAccessed(); };\n blocksForPurging.sort(lastAccessedComparator);\n // we remove (maxBlocksInCache - 1) as we already excluded the 'just created' page.\n // in other words, after the splice operation below, we have taken out the blocks\n // we want to keep, which means we are left with blocks that we can potentially purge\n var maxBlocksProvided = this.params.maxBlocksInCache > 0;\n var blocksToKeep = maxBlocksProvided ? this.params.maxBlocksInCache - 1 : null;\n var emptyBlocksToKeep = InfiniteCache.MAX_EMPTY_BLOCKS_TO_KEEP - 1;\n blocksForPurging.forEach(function (block, index) {\n var purgeBecauseBlockEmpty = block.getState() === InfiniteBlock.STATE_WAITING_TO_LOAD && index >= emptyBlocksToKeep;\n var purgeBecauseCacheFull = maxBlocksProvided ? index >= blocksToKeep : false;\n if (purgeBecauseBlockEmpty || purgeBecauseCacheFull) {\n // if the block currently has rows been displayed, then don't remove it either.\n // this can happen if user has maxBlocks=2, and blockSize=5 (thus 10 max rows in cache)\n // but the screen is showing 20 rows, so at least 4 blocks are needed.\n if (_this.isBlockCurrentlyDisplayed(block)) {\n return;\n }\n // don't want to loose keyboard focus, so keyboard navigation can continue. so keep focused blocks.\n if (_this.isBlockFocused(block)) {\n return;\n }\n // at this point, block is not needed, so burn baby burn\n _this.removeBlockFromCache(block);\n }\n });\n };\n InfiniteCache.prototype.isBlockFocused = function (block) {\n var focusedCell = this.focusService.getFocusCellToUseAfterRefresh();\n if (!focusedCell) {\n return false;\n }\n if (focusedCell.rowPinned != null) {\n return false;\n }\n var blockIndexStart = block.getStartRow();\n var blockIndexEnd = block.getEndRow();\n var hasFocus = focusedCell.rowIndex >= blockIndexStart && focusedCell.rowIndex < blockIndexEnd;\n return hasFocus;\n };\n InfiniteCache.prototype.isBlockCurrentlyDisplayed = function (block) {\n var startIndex = block.getStartRow();\n var endIndex = block.getEndRow() - 1;\n return this.rowRenderer.isRangeInRenderedViewport(startIndex, endIndex);\n };\n InfiniteCache.prototype.removeBlockFromCache = function (blockToRemove) {\n if (!blockToRemove) {\n return;\n }\n this.destroyBlock(blockToRemove);\n // we do not want to remove the 'loaded' event listener, as the\n // concurrent loads count needs to be updated when the load is complete\n // if the purged page is in loading state\n };\n InfiniteCache.prototype.checkRowCount = function (block, lastRow) {\n // if client provided a last row, we always use it, as it could change between server calls\n // if user deleted data and then called refresh on the grid.\n if (typeof lastRow === 'number' && lastRow >= 0) {\n this.rowCount = lastRow;\n this.lastRowIndexKnown = true;\n }\n else if (!this.lastRowIndexKnown) {\n // otherwise, see if we need to add some virtual rows\n var lastRowIndex = (block.getId() + 1) * this.params.blockSize;\n var lastRowIndexPlusOverflow = lastRowIndex + this.params.overflowSize;\n if (this.rowCount < lastRowIndexPlusOverflow) {\n this.rowCount = lastRowIndexPlusOverflow;\n }\n }\n };\n InfiniteCache.prototype.setRowCount = function (rowCount, lastRowIndexKnown) {\n this.rowCount = rowCount;\n // if undefined is passed, we do not set this value, if one of {true,false}\n // is passed, we do set the value.\n if (_.exists(lastRowIndexKnown)) {\n this.lastRowIndexKnown = lastRowIndexKnown;\n }\n // if we are still searching, then the row count must not end at the end\n // of a particular page, otherwise the searching will not pop into the\n // next page\n if (!this.lastRowIndexKnown) {\n if (this.rowCount % this.params.blockSize === 0) {\n this.rowCount++;\n }\n }\n this.onCacheUpdated();\n };\n InfiniteCache.prototype.forEachNodeDeep = function (callback) {\n var _this = this;\n var sequence = new NumberSequence();\n this.getBlocksInOrder().forEach(function (block) { return block.forEachNode(callback, sequence, _this.rowCount); });\n };\n InfiniteCache.prototype.getBlocksInOrder = function () {\n // get all page id's as NUMBERS (not strings, as we need to sort as numbers) and in descending order\n var blockComparator = function (a, b) { return a.getId() - b.getId(); };\n var blocks = _.getAllValuesInObject(this.blocks).sort(blockComparator);\n return blocks;\n };\n InfiniteCache.prototype.destroyBlock = function (block) {\n delete this.blocks[block.getId()];\n this.destroyBean(block);\n this.blockCount--;\n this.params.rowNodeBlockLoader.removeBlock(block);\n };\n // gets called 1) row count changed 2) cache purged 3) items inserted\n InfiniteCache.prototype.onCacheUpdated = function () {\n if (this.isAlive()) {\n // if the virtualRowCount is shortened, then it's possible blocks exist that are no longer\n // in the valid range. so we must remove these. this can happen if user explicitly sets\n // the virtual row count, or the datasource returns a result and sets lastRow to something\n // less than virtualRowCount (can happen if user scrolls down, server reduces dataset size).\n this.destroyAllBlocksPastVirtualRowCount();\n // this results in both row models (infinite and server side) firing ModelUpdated,\n // however server side row model also updates the row indexes first\n var event_1 = {\n type: Events.EVENT_STORE_UPDATED\n };\n this.eventService.dispatchEvent(event_1);\n }\n };\n InfiniteCache.prototype.destroyAllBlocksPastVirtualRowCount = function () {\n var _this = this;\n var blocksToDestroy = [];\n this.getBlocksInOrder().forEach(function (block) {\n var startRow = block.getId() * _this.params.blockSize;\n if (startRow >= _this.rowCount) {\n blocksToDestroy.push(block);\n }\n });\n if (blocksToDestroy.length > 0) {\n blocksToDestroy.forEach(function (block) { return _this.destroyBlock(block); });\n }\n };\n InfiniteCache.prototype.purgeCache = function () {\n var _this = this;\n this.getBlocksInOrder().forEach(function (block) { return _this.removeBlockFromCache(block); });\n this.lastRowIndexKnown = false;\n // if zero rows in the cache, we need to get the SSRM to start asking for rows again.\n // otherwise if set to zero rows last time, and we don't update the row count, then after\n // the purge there will still be zero rows, meaning the SSRM won't request any rows.\n // to kick things off, at least one row needs to be asked for.\n if (this.rowCount === 0) {\n this.rowCount = this.params.initialRowCount;\n }\n this.onCacheUpdated();\n };\n InfiniteCache.prototype.getRowNodesInRange = function (firstInRange, lastInRange) {\n var _this = this;\n var result = [];\n var lastBlockId = -1;\n var inActiveRange = false;\n var numberSequence = new NumberSequence();\n // if only one node passed, we start the selection at the top\n if (_.missing(firstInRange)) {\n inActiveRange = true;\n }\n var foundGapInSelection = false;\n this.getBlocksInOrder().forEach(function (block) {\n if (foundGapInSelection) {\n return;\n }\n if (inActiveRange && (lastBlockId + 1 !== block.getId())) {\n foundGapInSelection = true;\n return;\n }\n lastBlockId = block.getId();\n block.forEachNode(function (rowNode) {\n var hitFirstOrLast = rowNode === firstInRange || rowNode === lastInRange;\n if (inActiveRange || hitFirstOrLast) {\n result.push(rowNode);\n }\n if (hitFirstOrLast) {\n inActiveRange = !inActiveRange;\n }\n }, numberSequence, _this.rowCount);\n });\n // inActiveRange will be still true if we never hit the second rowNode\n var invalidRange = foundGapInSelection || inActiveRange;\n return invalidRange ? [] : result;\n };\n // this property says how many empty blocks should be in a cache, eg if scrolls down fast and creates 10\n // blocks all for loading, the grid will only load the last 2 - it will assume the blocks the user quickly\n // scrolled over are not needed to be loaded.\n InfiniteCache.MAX_EMPTY_BLOCKS_TO_KEEP = 2;\n __decorate([\n Autowired('rowRenderer')\n ], InfiniteCache.prototype, \"rowRenderer\", void 0);\n __decorate([\n Autowired(\"focusService\")\n ], InfiniteCache.prototype, \"focusService\", void 0);\n __decorate([\n __param(0, Qualifier('loggerFactory'))\n ], InfiniteCache.prototype, \"setBeans\", null);\n __decorate([\n PreDestroy\n ], InfiniteCache.prototype, \"destroyAllBlocks\", null);\n return InfiniteCache;\n}(BeanStub));\nexport { InfiniteCache };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, Bean, BeanStub, Constants, Events, NumberSequence, PostConstruct, PreDestroy } from \"@ag-grid-community/core\";\nimport { InfiniteCache } from \"./infiniteCache\";\nvar InfiniteRowModel = /** @class */ (function (_super) {\n __extends(InfiniteRowModel, _super);\n function InfiniteRowModel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n InfiniteRowModel.prototype.getRowBounds = function (index) {\n return {\n rowHeight: this.rowHeight,\n rowTop: this.rowHeight * index\n };\n };\n // we don't implement as lazy row heights is not supported in this row model\n InfiniteRowModel.prototype.ensureRowHeightsValid = function (startPixel, endPixel, startLimitIndex, endLimitIndex) {\n return false;\n };\n InfiniteRowModel.prototype.init = function () {\n var _this = this;\n if (!this.gridOptionsWrapper.isRowModelInfinite()) {\n return;\n }\n this.rowHeight = this.gridOptionsWrapper.getRowHeightAsNumber();\n this.addEventListeners();\n this.addDestroyFunc(function () { return _this.destroyCache(); });\n this.verifyProps();\n };\n InfiniteRowModel.prototype.verifyProps = function () {\n if (this.gridOptionsWrapper.getInitialGroupOrderComparator() != null) {\n var message_1 = \"AG Grid: initialGroupOrderComparator cannot be used with Infinite Row Model. If using Infinite Row Model, then sorting is done on the server side, nothing to do with the client.\";\n _.doOnce(function () { return console.warn(message_1); }, 'IRM.InitialGroupOrderComparator');\n }\n };\n InfiniteRowModel.prototype.start = function () {\n this.setDatasource(this.gridOptionsWrapper.getDatasource());\n };\n InfiniteRowModel.prototype.destroyDatasource = function () {\n if (this.datasource) {\n this.getContext().destroyBean(this.datasource);\n this.rowRenderer.datasourceChanged();\n this.datasource = null;\n }\n };\n InfiniteRowModel.prototype.addEventListeners = function () {\n this.addManagedListener(this.eventService, Events.EVENT_FILTER_CHANGED, this.onFilterChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_SORT_CHANGED, this.onSortChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.onColumnEverything.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_STORE_UPDATED, this.onCacheUpdated.bind(this));\n };\n InfiniteRowModel.prototype.onFilterChanged = function () {\n this.reset();\n };\n InfiniteRowModel.prototype.onSortChanged = function () {\n this.reset();\n };\n InfiniteRowModel.prototype.onColumnEverything = function () {\n var resetRequired;\n // if cache params, we require reset only if sort model has changed. we don't need to check\n // for filter model, as the filter manager will fire an event when columns change that result\n // in the filter changing.\n if (this.cacheParams) {\n resetRequired = this.isSortModelDifferent();\n }\n else {\n // if no cacheParams, means first time creating the cache, so always create one\n resetRequired = true;\n }\n if (resetRequired) {\n this.reset();\n }\n };\n InfiniteRowModel.prototype.isSortModelDifferent = function () {\n return !_.jsonEquals(this.cacheParams.sortModel, this.sortController.getSortModel());\n };\n InfiniteRowModel.prototype.getType = function () {\n return Constants.ROW_MODEL_TYPE_INFINITE;\n };\n InfiniteRowModel.prototype.setDatasource = function (datasource) {\n this.destroyDatasource();\n this.datasource = datasource;\n // only reset if we have a valid datasource to working with\n if (datasource) {\n this.reset();\n }\n };\n InfiniteRowModel.prototype.isEmpty = function () {\n return !this.infiniteCache;\n };\n InfiniteRowModel.prototype.isRowsToRender = function () {\n return !!this.infiniteCache;\n };\n InfiniteRowModel.prototype.getNodesInRangeForSelection = function (firstInRange, lastInRange) {\n return this.infiniteCache ? this.infiniteCache.getRowNodesInRange(firstInRange, lastInRange) : [];\n };\n InfiniteRowModel.prototype.reset = function () {\n // important to return here, as the user could be setting filter or sort before\n // data-source is set\n if (!this.datasource) {\n return;\n }\n // if user is providing id's, then this means we can keep the selection between datasource hits,\n // as the rows will keep their unique id's even if, for example, server side sorting or filtering\n // is done.\n var getRowIdFunc = this.gridOptionsWrapper.getRowIdFunc();\n var userGeneratingIds = getRowIdFunc != null;\n if (!userGeneratingIds) {\n this.selectionService.reset();\n }\n this.resetCache();\n var event = this.createModelUpdatedEvent();\n this.eventService.dispatchEvent(event);\n };\n InfiniteRowModel.prototype.createModelUpdatedEvent = function () {\n return {\n type: Events.EVENT_MODEL_UPDATED,\n api: this.gridApi,\n columnApi: this.columnApi,\n // not sure if these should all be false - noticed if after implementing,\n // maybe they should be true?\n newPage: false,\n newData: false,\n keepRenderedRows: true,\n animate: false\n };\n };\n InfiniteRowModel.prototype.resetCache = function () {\n // if not first time creating a cache, need to destroy the old one\n this.destroyCache();\n this.cacheParams = {\n // the user provided datasource\n datasource: this.datasource,\n // sort and filter model\n filterModel: this.filterManager.getFilterModel(),\n sortModel: this.sortController.getSortModel(),\n rowNodeBlockLoader: this.rowNodeBlockLoader,\n // properties - this way we take a snapshot of them, so if user changes any, they will be\n // used next time we create a new cache, which is generally after a filter or sort change,\n // or a new datasource is set\n initialRowCount: this.defaultIfInvalid(this.gridOptionsWrapper.getInfiniteInitialRowCount(), 1),\n maxBlocksInCache: this.gridOptionsWrapper.getMaxBlocksInCache(),\n rowHeight: this.gridOptionsWrapper.getRowHeightAsNumber(),\n // if user doesn't provide overflow, we use default overflow of 1, so user can scroll past\n // the current page and request first row of next page\n overflowSize: this.defaultIfInvalid(this.gridOptionsWrapper.getCacheOverflowSize(), 1),\n // page size needs to be 1 or greater. having it at 1 would be silly, as you would be hitting the\n // server for one page at a time. so the default if not specified is 100.\n blockSize: this.defaultIfInvalid(this.gridOptionsWrapper.getCacheBlockSize(), 100),\n // the cache could create this, however it is also used by the pages, so handy to create it\n // here as the settings are also passed to the pages\n lastAccessedSequence: new NumberSequence()\n };\n this.infiniteCache = this.createBean(new InfiniteCache(this.cacheParams));\n };\n InfiniteRowModel.prototype.defaultIfInvalid = function (value, defaultValue) {\n return value > 0 ? value : defaultValue;\n };\n InfiniteRowModel.prototype.destroyCache = function () {\n if (this.infiniteCache) {\n this.infiniteCache = this.destroyBean(this.infiniteCache);\n }\n };\n InfiniteRowModel.prototype.onCacheUpdated = function () {\n var event = this.createModelUpdatedEvent();\n this.eventService.dispatchEvent(event);\n };\n InfiniteRowModel.prototype.getRow = function (rowIndex) {\n if (!this.infiniteCache) {\n return undefined;\n }\n if (rowIndex >= this.infiniteCache.getRowCount()) {\n return undefined;\n }\n return this.infiniteCache.getRow(rowIndex);\n };\n InfiniteRowModel.prototype.getRowNode = function (id) {\n var result;\n this.forEachNode(function (rowNode) {\n if (rowNode.id === id) {\n result = rowNode;\n }\n });\n return result;\n };\n InfiniteRowModel.prototype.forEachNode = function (callback) {\n if (this.infiniteCache) {\n this.infiniteCache.forEachNodeDeep(callback);\n }\n };\n InfiniteRowModel.prototype.getTopLevelRowCount = function () {\n return this.getRowCount();\n };\n InfiniteRowModel.prototype.getTopLevelRowDisplayedIndex = function (topLevelIndex) {\n return topLevelIndex;\n };\n InfiniteRowModel.prototype.getRowIndexAtPixel = function (pixel) {\n if (this.rowHeight !== 0) { // avoid divide by zero error\n var rowIndexForPixel = Math.floor(pixel / this.rowHeight);\n var lastRowIndex = this.getRowCount() - 1;\n if (rowIndexForPixel > lastRowIndex) {\n return lastRowIndex;\n }\n return rowIndexForPixel;\n }\n return 0;\n };\n InfiniteRowModel.prototype.getRowCount = function () {\n return this.infiniteCache ? this.infiniteCache.getRowCount() : 0;\n };\n InfiniteRowModel.prototype.isRowPresent = function (rowNode) {\n var foundRowNode = this.getRowNode(rowNode.id);\n return !!foundRowNode;\n };\n InfiniteRowModel.prototype.refreshCache = function () {\n if (this.infiniteCache) {\n this.infiniteCache.refreshCache();\n }\n };\n InfiniteRowModel.prototype.purgeCache = function () {\n if (this.infiniteCache) {\n this.infiniteCache.purgeCache();\n }\n };\n // for iRowModel\n InfiniteRowModel.prototype.isLastRowIndexKnown = function () {\n if (this.infiniteCache) {\n return this.infiniteCache.isLastRowIndexKnown();\n }\n return false;\n };\n InfiniteRowModel.prototype.setRowCount = function (rowCount, lastRowIndexKnown) {\n if (this.infiniteCache) {\n this.infiniteCache.setRowCount(rowCount, lastRowIndexKnown);\n }\n };\n __decorate([\n Autowired('filterManager')\n ], InfiniteRowModel.prototype, \"filterManager\", void 0);\n __decorate([\n Autowired('sortController')\n ], InfiniteRowModel.prototype, \"sortController\", void 0);\n __decorate([\n Autowired('selectionService')\n ], InfiniteRowModel.prototype, \"selectionService\", void 0);\n __decorate([\n Autowired('gridApi')\n ], InfiniteRowModel.prototype, \"gridApi\", void 0);\n __decorate([\n Autowired('columnApi')\n ], InfiniteRowModel.prototype, \"columnApi\", void 0);\n __decorate([\n Autowired('rowRenderer')\n ], InfiniteRowModel.prototype, \"rowRenderer\", void 0);\n __decorate([\n Autowired('rowNodeBlockLoader')\n ], InfiniteRowModel.prototype, \"rowNodeBlockLoader\", void 0);\n __decorate([\n PostConstruct\n ], InfiniteRowModel.prototype, \"init\", null);\n __decorate([\n PreDestroy\n ], InfiniteRowModel.prototype, \"destroyDatasource\", null);\n InfiniteRowModel = __decorate([\n Bean('rowModel')\n ], InfiniteRowModel);\n return InfiniteRowModel;\n}(BeanStub));\nexport { InfiniteRowModel };\n","import { ModuleNames } from \"@ag-grid-community/core\";\nimport { InfiniteRowModel } from \"./infiniteRowModel/infiniteRowModel\";\nexport var InfiniteRowModelModule = {\n moduleName: ModuleNames.InfiniteRowModelModule,\n rowModels: { infinite: InfiniteRowModel }\n};\n","var BaseCreator = /** @class */ (function () {\n function BaseCreator() {\n }\n BaseCreator.prototype.setBeans = function (beans) {\n this.beans = beans;\n };\n BaseCreator.prototype.getFileName = function (fileName) {\n var extension = this.getDefaultFileExtension();\n if (fileName == null || !fileName.length) {\n fileName = this.getDefaultFileName();\n }\n return fileName.indexOf('.') === -1 ? fileName + \".\" + extension : fileName;\n };\n BaseCreator.prototype.getData = function (params) {\n var serializingSession = this.createSerializingSession(params);\n var data = this.beans.gridSerializer.serialize(serializingSession, params);\n return data;\n };\n return BaseCreator;\n}());\nexport { BaseCreator };\n","var BaseGridSerializingSession = /** @class */ (function () {\n function BaseGridSerializingSession(config) {\n this.groupColumns = [];\n var columnModel = config.columnModel, valueService = config.valueService, gridOptionsWrapper = config.gridOptionsWrapper, processCellCallback = config.processCellCallback, processHeaderCallback = config.processHeaderCallback, processGroupHeaderCallback = config.processGroupHeaderCallback, processRowGroupCallback = config.processRowGroupCallback;\n this.columnModel = columnModel;\n this.valueService = valueService;\n this.gridOptionsWrapper = gridOptionsWrapper;\n this.processCellCallback = processCellCallback;\n this.processHeaderCallback = processHeaderCallback;\n this.processGroupHeaderCallback = processGroupHeaderCallback;\n this.processRowGroupCallback = processRowGroupCallback;\n }\n BaseGridSerializingSession.prototype.prepare = function (columnsToExport) {\n this.groupColumns = columnsToExport.filter(function (col) { return !!col.getColDef().showRowGroup; });\n };\n BaseGridSerializingSession.prototype.extractHeaderValue = function (column) {\n var value = this.getHeaderName(this.processHeaderCallback, column);\n return value != null ? value : '';\n };\n BaseGridSerializingSession.prototype.extractRowCellValue = function (column, index, accumulatedRowIndex, type, node) {\n // we render the group summary text e.g. \"-> Parent -> Child\"...\n var groupIndex = this.gridOptionsWrapper.isGroupMultiAutoColumn() ? node.rowGroupIndex : 0;\n var renderGroupSummaryCell = \n // on group rows\n node && node.group\n && (\n // in the group column if groups appear in regular grid cells\n index === groupIndex && this.groupColumns.indexOf(column) !== -1\n // or the first cell in the row, if we're doing full width rows\n || (index === 0 && this.gridOptionsWrapper.isGroupUseEntireRow(this.columnModel.isPivotMode())));\n var valueForCell;\n if (renderGroupSummaryCell) {\n valueForCell = this.createValueForGroupNode(node);\n }\n else {\n valueForCell = this.valueService.getValue(column, node);\n }\n var value = this.processCell(accumulatedRowIndex, node, column, valueForCell, this.processCellCallback, type);\n return value != null ? value : '';\n };\n BaseGridSerializingSession.prototype.getHeaderName = function (callback, column) {\n if (callback) {\n return callback({\n column: column,\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi(),\n context: this.gridOptionsWrapper.getContext()\n });\n }\n return this.columnModel.getDisplayNameForColumn(column, 'csv', true);\n };\n BaseGridSerializingSession.prototype.createValueForGroupNode = function (node) {\n if (this.processRowGroupCallback) {\n return this.processRowGroupCallback({\n node: node,\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi(),\n context: this.gridOptionsWrapper.getContext(),\n });\n }\n var keys = [node.key];\n if (!this.gridOptionsWrapper.isGroupMultiAutoColumn()) {\n while (node.parent) {\n node = node.parent;\n keys.push(node.key);\n }\n }\n return keys.reverse().join(' -> ');\n };\n BaseGridSerializingSession.prototype.processCell = function (accumulatedRowIndex, rowNode, column, value, processCellCallback, type) {\n if (processCellCallback) {\n return processCellCallback({\n accumulatedRowIndex: accumulatedRowIndex,\n column: column,\n node: rowNode,\n value: value,\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi(),\n context: this.gridOptionsWrapper.getContext(),\n type: type\n });\n }\n return value != null ? value : '';\n };\n return BaseGridSerializingSession;\n}());\nexport { BaseGridSerializingSession };\n","var Downloader = /** @class */ (function () {\n function Downloader() {\n }\n Downloader.download = function (fileName, content) {\n var win = document.defaultView || window;\n if (!win) {\n console.warn('AG Grid: There is no `window` associated with the current `document`');\n return;\n }\n var element = document.createElement('a');\n // @ts-ignore\n var url = win.URL.createObjectURL(content);\n element.setAttribute('href', url);\n element.setAttribute('download', fileName);\n element.style.display = 'none';\n document.body.appendChild(element);\n element.dispatchEvent(new MouseEvent('click', {\n bubbles: false,\n cancelable: true,\n view: win\n }));\n document.body.removeChild(element);\n win.setTimeout(function () {\n // @ts-ignore\n win.URL.revokeObjectURL(url);\n }, 0);\n };\n return Downloader;\n}());\nexport { Downloader };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Constants } from \"@ag-grid-community/core\";\nimport { BaseGridSerializingSession } from \"./baseGridSerializingSession\";\nvar LINE_SEPARATOR = '\\r\\n';\nvar CsvSerializingSession = /** @class */ (function (_super) {\n __extends(CsvSerializingSession, _super);\n function CsvSerializingSession(config) {\n var _this = _super.call(this, config) || this;\n _this.isFirstLine = true;\n _this.result = '';\n var suppressQuotes = config.suppressQuotes, columnSeparator = config.columnSeparator;\n _this.suppressQuotes = suppressQuotes;\n _this.columnSeparator = columnSeparator;\n return _this;\n }\n CsvSerializingSession.prototype.addCustomContent = function (content) {\n var _this = this;\n if (!content) {\n return;\n }\n if (typeof content === 'string') {\n if (!/^\\s*\\n/.test(content)) {\n this.beginNewLine();\n }\n // replace whatever newlines are supplied with the style we're using\n content = content.replace(/\\r?\\n/g, LINE_SEPARATOR);\n this.result += content;\n }\n else {\n content.forEach(function (row) {\n _this.beginNewLine();\n row.forEach(function (cell, index) {\n if (index !== 0) {\n _this.result += _this.columnSeparator;\n }\n _this.result += _this.putInQuotes(cell.data.value || '');\n if (cell.mergeAcross) {\n _this.appendEmptyCells(cell.mergeAcross);\n }\n });\n });\n }\n };\n CsvSerializingSession.prototype.onNewHeaderGroupingRow = function () {\n this.beginNewLine();\n return {\n onColumn: this.onNewHeaderGroupingRowColumn.bind(this)\n };\n };\n CsvSerializingSession.prototype.onNewHeaderGroupingRowColumn = function (header, index, span) {\n if (index != 0) {\n this.result += this.columnSeparator;\n }\n this.result += this.putInQuotes(header);\n this.appendEmptyCells(span);\n };\n CsvSerializingSession.prototype.appendEmptyCells = function (count) {\n for (var i = 1; i <= count; i++) {\n this.result += this.columnSeparator + this.putInQuotes(\"\");\n }\n };\n CsvSerializingSession.prototype.onNewHeaderRow = function () {\n this.beginNewLine();\n return {\n onColumn: this.onNewHeaderRowColumn.bind(this)\n };\n };\n CsvSerializingSession.prototype.onNewHeaderRowColumn = function (column, index) {\n if (index != 0) {\n this.result += this.columnSeparator;\n }\n this.result += this.putInQuotes(this.extractHeaderValue(column));\n };\n CsvSerializingSession.prototype.onNewBodyRow = function () {\n this.beginNewLine();\n return {\n onColumn: this.onNewBodyRowColumn.bind(this)\n };\n };\n CsvSerializingSession.prototype.onNewBodyRowColumn = function (column, index, node) {\n if (index != 0) {\n this.result += this.columnSeparator;\n }\n this.result += this.putInQuotes(this.extractRowCellValue(column, index, index, Constants.EXPORT_TYPE_CSV, node));\n };\n CsvSerializingSession.prototype.putInQuotes = function (value) {\n if (this.suppressQuotes) {\n return value;\n }\n if (value === null || value === undefined) {\n return '\"\"';\n }\n var stringValue;\n if (typeof value === 'string') {\n stringValue = value;\n }\n else if (typeof value.toString === 'function') {\n stringValue = value.toString();\n }\n else {\n console.warn('AG Grid: unknown value type during csv conversion');\n stringValue = '';\n }\n // replace each \" with \"\" (ie two sets of double quotes is how to do double quotes in csv)\n var valueEscaped = stringValue.replace(/\"/g, \"\\\"\\\"\");\n return '\"' + valueEscaped + '\"';\n };\n CsvSerializingSession.prototype.parse = function () {\n return this.result;\n };\n CsvSerializingSession.prototype.beginNewLine = function () {\n if (!this.isFirstLine) {\n this.result += LINE_SEPARATOR;\n }\n this.isFirstLine = false;\n };\n return CsvSerializingSession;\n}(BaseGridSerializingSession));\nexport { CsvSerializingSession };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Bean, PostConstruct } from \"@ag-grid-community/core\";\nimport { BaseCreator } from \"./baseCreator\";\nimport { Downloader } from \"./downloader\";\nimport { CsvSerializingSession } from \"./sessions/csvSerializingSession\";\nvar CsvCreator = /** @class */ (function (_super) {\n __extends(CsvCreator, _super);\n function CsvCreator() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n CsvCreator.prototype.postConstruct = function () {\n this.setBeans({\n gridSerializer: this.gridSerializer,\n gridOptionsWrapper: this.gridOptionsWrapper\n });\n };\n CsvCreator.prototype.getMergedParams = function (params) {\n var baseParams = this.gridOptionsWrapper.getDefaultExportParams('csv');\n return Object.assign({}, baseParams, params);\n };\n CsvCreator.prototype.export = function (userParams) {\n if (this.isExportSuppressed()) {\n console.warn(\"AG Grid: Export cancelled. Export is not allowed as per your configuration.\");\n return '';\n }\n var mergedParams = this.getMergedParams(userParams);\n var data = this.getData(mergedParams);\n var packagedFile = new Blob([\"\\ufeff\", data], { type: 'text/plain' });\n Downloader.download(this.getFileName(mergedParams.fileName), packagedFile);\n return data;\n };\n CsvCreator.prototype.exportDataAsCsv = function (params) {\n return this.export(params);\n };\n CsvCreator.prototype.getDataAsCsv = function (params) {\n var mergedParams = this.getMergedParams(params);\n return this.getData(mergedParams);\n };\n CsvCreator.prototype.getDefaultFileName = function () {\n return 'export.csv';\n };\n CsvCreator.prototype.getDefaultFileExtension = function () {\n return 'csv';\n };\n CsvCreator.prototype.createSerializingSession = function (params) {\n var _a = this, columnModel = _a.columnModel, valueService = _a.valueService, gridOptionsWrapper = _a.gridOptionsWrapper;\n var _b = params, processCellCallback = _b.processCellCallback, processHeaderCallback = _b.processHeaderCallback, processGroupHeaderCallback = _b.processGroupHeaderCallback, processRowGroupCallback = _b.processRowGroupCallback, suppressQuotes = _b.suppressQuotes, columnSeparator = _b.columnSeparator;\n return new CsvSerializingSession({\n columnModel: columnModel,\n valueService: valueService,\n gridOptionsWrapper: gridOptionsWrapper,\n processCellCallback: processCellCallback || undefined,\n processHeaderCallback: processHeaderCallback || undefined,\n processGroupHeaderCallback: processGroupHeaderCallback || undefined,\n processRowGroupCallback: processRowGroupCallback || undefined,\n suppressQuotes: suppressQuotes || false,\n columnSeparator: columnSeparator || ','\n });\n };\n CsvCreator.prototype.isExportSuppressed = function () {\n return this.gridOptionsWrapper.isSuppressCsvExport();\n };\n __decorate([\n Autowired('columnModel')\n ], CsvCreator.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired('valueService')\n ], CsvCreator.prototype, \"valueService\", void 0);\n __decorate([\n Autowired('gridSerializer')\n ], CsvCreator.prototype, \"gridSerializer\", void 0);\n __decorate([\n Autowired('gridOptionsWrapper')\n ], CsvCreator.prototype, \"gridOptionsWrapper\", void 0);\n __decorate([\n PostConstruct\n ], CsvCreator.prototype, \"postConstruct\", null);\n CsvCreator = __decorate([\n Bean('csvCreator')\n ], CsvCreator);\n return CsvCreator;\n}(BaseCreator));\nexport { CsvCreator };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, Events, RefSelector, KeyCode, PostConstruct, Component } from \"@ag-grid-community/core\";\nexport var ExpandState;\n(function (ExpandState) {\n ExpandState[ExpandState[\"EXPANDED\"] = 0] = \"EXPANDED\";\n ExpandState[ExpandState[\"COLLAPSED\"] = 1] = \"COLLAPSED\";\n ExpandState[ExpandState[\"INDETERMINATE\"] = 2] = \"INDETERMINATE\";\n})(ExpandState || (ExpandState = {}));\nvar PrimaryColsHeaderPanel = /** @class */ (function (_super) {\n __extends(PrimaryColsHeaderPanel, _super);\n function PrimaryColsHeaderPanel() {\n return _super.call(this, PrimaryColsHeaderPanel.TEMPLATE) || this;\n }\n PrimaryColsHeaderPanel.prototype.postConstruct = function () {\n var _this = this;\n this.createExpandIcons();\n this.addManagedListener(this.eExpand, 'click', this.onExpandClicked.bind(this));\n this.addManagedListener(this.eExpand, 'keydown', function (e) {\n if (e.key === KeyCode.SPACE) {\n _this.onExpandClicked();\n }\n });\n this.addManagedListener(this.eSelect.getInputElement(), 'click', this.onSelectClicked.bind(this));\n this.eFilterTextField.onValueChange(function () { return _this.onFilterTextChanged(); });\n this.addManagedListener(this.eFilterTextField.getInputElement(), 'keypress', this.onMiniFilterKeyPress.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.showOrHideOptions.bind(this));\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n this.eSelect.setInputAriaLabel(translate('ariaColumnSelectAll', 'Toggle Select All Columns'));\n this.eFilterTextField.setInputAriaLabel(translate('ariaFilterColumnsInput', 'Filter Columns Input'));\n };\n PrimaryColsHeaderPanel.prototype.init = function (params) {\n this.params = params;\n if (this.columnModel.isReady()) {\n this.showOrHideOptions();\n }\n };\n PrimaryColsHeaderPanel.prototype.createExpandIcons = function () {\n this.eExpand.appendChild((this.eExpandChecked = _.createIconNoSpan('columnSelectOpen', this.gridOptionsWrapper)));\n this.eExpand.appendChild((this.eExpandUnchecked = _.createIconNoSpan('columnSelectClosed', this.gridOptionsWrapper)));\n this.eExpand.appendChild((this.eExpandIndeterminate = _.createIconNoSpan('columnSelectIndeterminate', this.gridOptionsWrapper)));\n this.setExpandState(ExpandState.EXPANDED);\n };\n // we only show expand / collapse if we are showing columns\n PrimaryColsHeaderPanel.prototype.showOrHideOptions = function () {\n var showFilter = !this.params.suppressColumnFilter;\n var showSelect = !this.params.suppressColumnSelectAll;\n var showExpand = !this.params.suppressColumnExpandAll;\n var groupsPresent = this.columnModel.isPrimaryColumnGroupsPresent();\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n this.eFilterTextField.setInputPlaceholder(translate('searchOoo', 'Search...'));\n _.setDisplayed(this.eFilterTextField.getGui(), showFilter);\n _.setDisplayed(this.eSelect.getGui(), showSelect);\n _.setDisplayed(this.eExpand, showExpand && groupsPresent);\n };\n PrimaryColsHeaderPanel.prototype.onFilterTextChanged = function () {\n var _this = this;\n if (!this.onFilterTextChangedDebounced) {\n this.onFilterTextChangedDebounced = _.debounce(function () {\n var filterText = _this.eFilterTextField.getValue();\n _this.dispatchEvent({ type: \"filterChanged\", filterText: filterText });\n }, PrimaryColsHeaderPanel.DEBOUNCE_DELAY);\n }\n this.onFilterTextChangedDebounced();\n };\n PrimaryColsHeaderPanel.prototype.onMiniFilterKeyPress = function (e) {\n var _this = this;\n if (e.key === KeyCode.ENTER) {\n // we need to add a delay that corresponds to the filter text debounce delay to ensure\n // the text filtering has happened, otherwise all columns will be deselected\n setTimeout(function () { return _this.onSelectClicked(); }, PrimaryColsHeaderPanel.DEBOUNCE_DELAY);\n }\n };\n PrimaryColsHeaderPanel.prototype.onSelectClicked = function () {\n this.dispatchEvent({ type: this.selectState ? 'unselectAll' : 'selectAll' });\n };\n PrimaryColsHeaderPanel.prototype.onExpandClicked = function () {\n this.dispatchEvent({ type: this.expandState === ExpandState.EXPANDED ? 'collapseAll' : 'expandAll' });\n };\n PrimaryColsHeaderPanel.prototype.setExpandState = function (state) {\n this.expandState = state;\n _.setDisplayed(this.eExpandChecked, this.expandState === ExpandState.EXPANDED);\n _.setDisplayed(this.eExpandUnchecked, this.expandState === ExpandState.COLLAPSED);\n _.setDisplayed(this.eExpandIndeterminate, this.expandState === ExpandState.INDETERMINATE);\n };\n PrimaryColsHeaderPanel.prototype.setSelectionState = function (state) {\n this.selectState = state;\n this.eSelect.setValue(this.selectState);\n };\n PrimaryColsHeaderPanel.DEBOUNCE_DELAY = 300;\n PrimaryColsHeaderPanel.TEMPLATE = \"
\\n
\\n \\n \\n
\";\n __decorate([\n Autowired('columnModel')\n ], PrimaryColsHeaderPanel.prototype, \"columnModel\", void 0);\n __decorate([\n RefSelector('eExpand')\n ], PrimaryColsHeaderPanel.prototype, \"eExpand\", void 0);\n __decorate([\n RefSelector('eSelect')\n ], PrimaryColsHeaderPanel.prototype, \"eSelect\", void 0);\n __decorate([\n RefSelector('eFilterTextField')\n ], PrimaryColsHeaderPanel.prototype, \"eFilterTextField\", void 0);\n __decorate([\n PostConstruct\n ], PrimaryColsHeaderPanel.prototype, \"postConstruct\", null);\n return PrimaryColsHeaderPanel;\n}(Component));\nexport { PrimaryColsHeaderPanel };\n","import { ModuleNames } from \"@ag-grid-community/core\";\nimport { CsvCreator } from \"./csvExport/csvCreator\";\nimport { GridSerializer } from \"./csvExport/gridSerializer\";\nexport var CsvExportModule = {\n moduleName: ModuleNames.CsvExportModule,\n beans: [CsvCreator, GridSerializer]\n};\n","var LINE_SEPARATOR = '\\r\\n';\nvar XmlFactory = /** @class */ (function () {\n function XmlFactory() {\n }\n XmlFactory.createHeader = function (headerElement) {\n if (headerElement === void 0) { headerElement = {}; }\n var headerStart = '';\n var keys = ['version'];\n if (!headerElement.version) {\n headerElement.version = \"1.0\";\n }\n if (headerElement.encoding) {\n keys.push('encoding');\n }\n if (headerElement.standalone) {\n keys.push('standalone');\n }\n var att = keys.map(function (key) { return key + \"=\\\"\" + headerElement[key] + \"\\\"\"; }).join(' ');\n return headerStart + \"xml \" + att + \" \" + headerEnd;\n };\n XmlFactory.createXml = function (xmlElement, booleanTransformer) {\n var _this = this;\n var props = '';\n if (xmlElement.properties) {\n if (xmlElement.properties.prefixedAttributes) {\n xmlElement.properties.prefixedAttributes.forEach(function (prefixedSet) {\n Object.keys(prefixedSet.map).forEach(function (key) {\n props += _this.returnAttributeIfPopulated(prefixedSet.prefix + key, prefixedSet.map[key], booleanTransformer);\n });\n });\n }\n if (xmlElement.properties.rawMap) {\n Object.keys(xmlElement.properties.rawMap).forEach(function (key) {\n props += _this.returnAttributeIfPopulated(key, xmlElement.properties.rawMap[key], booleanTransformer);\n });\n }\n }\n var result = '<' + xmlElement.name + props;\n if (!xmlElement.children && xmlElement.textNode == null) {\n return result + '/>' + LINE_SEPARATOR;\n }\n if (xmlElement.textNode != null) {\n return result + '>' + xmlElement.textNode + '' + LINE_SEPARATOR;\n }\n result += '>' + LINE_SEPARATOR;\n if (xmlElement.children) {\n xmlElement.children.forEach(function (it) {\n result += _this.createXml(it, booleanTransformer);\n });\n }\n return result + '' + LINE_SEPARATOR;\n };\n XmlFactory.returnAttributeIfPopulated = function (key, value, booleanTransformer) {\n if (!value && value !== '' && value !== 0) {\n return '';\n }\n var xmlValue = value;\n if ((typeof (value) === 'boolean')) {\n if (booleanTransformer) {\n xmlValue = booleanTransformer(value);\n }\n }\n return \" \" + key + \"=\\\"\" + xmlValue + \"\\\"\";\n };\n return XmlFactory;\n}());\nexport { XmlFactory };\n","var __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nimport { _ } from \"@ag-grid-community/core\";\n// table for crc calculation\n// from: https://referencesource.microsoft.com/#System/sys/System/IO/compression/Crc32Helper.cs,3b31978c7d7f7246,references\nvar crcTable = new Uint32Array([\n 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,\n 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,\n 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2,\n 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,\n 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,\n 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,\n 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c,\n 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,\n 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423,\n 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,\n 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106,\n 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,\n 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d,\n 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,\n 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,\n 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,\n 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7,\n 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,\n 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa,\n 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,\n 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81,\n 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,\n 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84,\n 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,\n 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,\n 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,\n 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e,\n 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,\n 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55,\n 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,\n 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28,\n 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,\n 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f,\n 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,\n 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,\n 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,\n 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69,\n 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,\n 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc,\n 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,\n 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693,\n 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,\n 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d\n]);\nvar ZipContainer = /** @class */ (function () {\n function ZipContainer() {\n }\n ZipContainer.addFolders = function (paths) {\n paths.forEach(this.addFolder.bind(this));\n };\n ZipContainer.addFolder = function (path) {\n this.folders.push({\n path: path,\n created: new Date(),\n isBase64: false\n });\n };\n ZipContainer.addFile = function (path, content, isBase64) {\n if (isBase64 === void 0) { isBase64 = false; }\n this.files.push({\n path: path,\n created: new Date(),\n content: content,\n isBase64: isBase64\n });\n };\n ZipContainer.getContent = function (mimeType) {\n if (mimeType === void 0) { mimeType = 'application/zip'; }\n var textOutput = this.buildFileStream();\n var uInt8Output = this.buildUint8Array(textOutput);\n this.clearStream();\n return new Blob([uInt8Output], { type: mimeType });\n };\n ZipContainer.clearStream = function () {\n this.folders = [];\n this.files = [];\n };\n ZipContainer.buildFileStream = function (fData) {\n var e_1, _a;\n if (fData === void 0) { fData = ''; }\n var totalFiles = this.folders.concat(this.files);\n var len = totalFiles.length;\n var foData = '';\n var lL = 0;\n var cL = 0;\n try {\n for (var totalFiles_1 = __values(totalFiles), totalFiles_1_1 = totalFiles_1.next(); !totalFiles_1_1.done; totalFiles_1_1 = totalFiles_1.next()) {\n var currentFile = totalFiles_1_1.value;\n var _b = this.getHeader(currentFile, lL), fileHeader = _b.fileHeader, folderHeader = _b.folderHeader, content = _b.content;\n lL += fileHeader.length + content.length;\n cL += folderHeader.length;\n fData += fileHeader + content;\n foData += folderHeader;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (totalFiles_1_1 && !totalFiles_1_1.done && (_a = totalFiles_1.return)) _a.call(totalFiles_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n var foEnd = this.buildFolderEnd(len, cL, lL);\n return fData + foData + foEnd;\n };\n ZipContainer.getHeader = function (currentFile, offset) {\n var content = currentFile.content, path = currentFile.path, created = currentFile.created, isBase64 = currentFile.isBase64;\n var utf8_encode = _.utf8_encode, decToHex = _.decToHex;\n var utfPath = utf8_encode(path);\n var isUTF8 = utfPath !== path;\n var time = this.convertTime(created);\n var dt = this.convertDate(created);\n var extraFields = '';\n if (isUTF8) {\n var uExtraFieldPath = decToHex(1, 1) + decToHex(this.getFromCrc32Table(utfPath), 4) + utfPath;\n extraFields = \"\\x75\\x70\" + decToHex(uExtraFieldPath.length, 2) + uExtraFieldPath;\n }\n var _a = !content ? { size: 0, content: '' } : this.getConvertedContent(content, isBase64), size = _a.size, convertedContent = _a.content;\n var header = '\\x0A\\x00' +\n (isUTF8 ? '\\x00\\x08' : '\\x00\\x00') +\n '\\x00\\x00' +\n decToHex(time, 2) + // last modified time\n decToHex(dt, 2) + // last modified date\n decToHex(size ? this.getFromCrc32Table(convertedContent) : 0, 4) +\n decToHex(size, 4) + // compressed size\n decToHex(size, 4) + // uncompressed size\n decToHex(utfPath.length, 2) + // file name length\n decToHex(extraFields.length, 2); // extra field length\n var fileHeader = 'PK\\x03\\x04' + header + utfPath + extraFields;\n var folderHeader = 'PK\\x01\\x02' + // central header\n '\\x14\\x00' +\n header + // file header\n '\\x00\\x00' +\n '\\x00\\x00' +\n '\\x00\\x00' +\n (content ? '\\x00\\x00\\x00\\x00' : '\\x10\\x00\\x00\\x00') + // external file attributes\n decToHex(offset, 4) + // relative offset of local header\n utfPath + // file name\n extraFields; // extra field\n return { fileHeader: fileHeader, folderHeader: folderHeader, content: convertedContent || '' };\n };\n ZipContainer.getConvertedContent = function (content, isBase64) {\n if (isBase64 === void 0) { isBase64 = false; }\n if (isBase64) {\n content = content.split(';base64,')[1];\n }\n content = isBase64 ? atob(content) : content;\n return {\n size: content.length,\n content: content\n };\n };\n ZipContainer.buildFolderEnd = function (tLen, cLen, lLen) {\n var decToHex = _.decToHex;\n return 'PK\\x05\\x06' + // central folder end\n '\\x00\\x00' +\n '\\x00\\x00' +\n decToHex(tLen, 2) + // total number of entries in the central folder\n decToHex(tLen, 2) + // total number of entries in the central folder\n decToHex(cLen, 4) + // size of the central folder\n decToHex(lLen, 4) + // central folder start offset\n '\\x00\\x00';\n };\n ZipContainer.buildUint8Array = function (content) {\n var uint8 = new Uint8Array(content.length);\n for (var i = 0; i < uint8.length; i++) {\n uint8[i] = content.charCodeAt(i);\n }\n return uint8;\n };\n ZipContainer.getFromCrc32Table = function (content) {\n if (!content.length) {\n return 0;\n }\n var size = content.length;\n var iterable = new Uint8Array(size);\n for (var i = 0; i < size; i++) {\n iterable[i] = content.charCodeAt(i);\n }\n var crc = 0 ^ (-1);\n var j = 0;\n var k = 0;\n var l = 0;\n for (var i = 0; i < size; i++) {\n j = iterable[i];\n k = (crc ^ j) & 0xFF;\n l = crcTable[k];\n crc = (crc >>> 8) ^ l;\n }\n return crc ^ (-1);\n };\n ZipContainer.convertTime = function (date) {\n var time = date.getHours();\n time <<= 6;\n time = time | date.getMinutes();\n time <<= 5;\n time = time | date.getSeconds() / 2;\n return time;\n };\n ZipContainer.convertDate = function (date) {\n var dt = date.getFullYear() - 1980;\n dt <<= 4;\n dt = dt | (date.getMonth() + 1);\n dt <<= 5;\n dt = dt | date.getDate();\n return dt;\n };\n ZipContainer.folders = [];\n ZipContainer.files = [];\n return ZipContainer;\n}());\nexport { ZipContainer };\n","export { ClientSideRowModelModule } from \"./clientSideRowModelModule\";\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { _, Autowired, Bean, BeanStub, PreConstruct } from '@ag-grid-community/core';\nvar LicenseManager = /** @class */ (function (_super) {\n __extends(LicenseManager, _super);\n function LicenseManager() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.watermarkMessage = undefined;\n return _this;\n }\n LicenseManager_1 = LicenseManager;\n LicenseManager.prototype.validateLicense = function () {\n if (_.missingOrEmpty(LicenseManager_1.licenseKey)) {\n this.outputMissingLicenseKey();\n }\n else if (LicenseManager_1.licenseKey.length > 32) {\n var _a = LicenseManager_1.extractLicenseComponents(LicenseManager_1.licenseKey), md5 = _a.md5, license = _a.license, version = _a.version, isTrial = _a.isTrial;\n if (md5 === this.md5.md5(license)) {\n if (_.exists(version) && version) {\n this.validateLicenseKeyForVersion(version, !!isTrial, license);\n }\n else {\n this.validateLegacyKey(license);\n }\n }\n else {\n this.outputInvalidLicenseKey();\n }\n }\n else {\n this.outputInvalidLicenseKey();\n }\n };\n LicenseManager.extractExpiry = function (license) {\n var restrictionHashed = license.substring(license.lastIndexOf('_') + 1, license.length);\n return new Date(parseInt(LicenseManager_1.decode(restrictionHashed), 10));\n };\n LicenseManager.extractLicenseComponents = function (licenseKey) {\n // when users copy the license key from a PDF extra zero width characters are sometimes copied too\n // carriage returns and line feeds are problematic too\n // all of which causes license key validation to fail - strip these out\n var cleanedLicenseKey = licenseKey.replace(/[\\u200B-\\u200D\\uFEFF]/g, '');\n cleanedLicenseKey = cleanedLicenseKey.replace(/\\r?\\n|\\r/g, '');\n var hashStart = cleanedLicenseKey.length - 32;\n var md5 = cleanedLicenseKey.substring(hashStart);\n var license = cleanedLicenseKey.substring(0, hashStart);\n var _a = __read(LicenseManager_1.extractBracketedInformation(cleanedLicenseKey), 2), version = _a[0], isTrial = _a[1];\n return { md5: md5, license: license, version: version, isTrial: isTrial };\n };\n LicenseManager.prototype.getLicenseDetails = function (licenseKey) {\n var _a = LicenseManager_1.extractLicenseComponents(licenseKey), md5 = _a.md5, license = _a.license, version = _a.version, isTrial = _a.isTrial;\n var valid = (md5 === this.md5.md5(license));\n var expiry = null;\n if (valid) {\n expiry = LicenseManager_1.extractExpiry(license);\n valid = !isNaN(expiry.getTime());\n }\n return {\n licenseKey: licenseKey,\n valid: valid,\n expiry: valid ? LicenseManager_1.formatDate(expiry) : null,\n version: version ? version : 'legacy',\n isTrial: isTrial\n };\n };\n LicenseManager.prototype.isDisplayWatermark = function () {\n return !_.missingOrEmpty(this.watermarkMessage);\n };\n LicenseManager.prototype.getWatermarkMessage = function () {\n return this.watermarkMessage || '';\n };\n LicenseManager.formatDate = function (date) {\n var monthNames = [\n 'January', 'February', 'March',\n 'April', 'May', 'June', 'July',\n 'August', 'September', 'October',\n 'November', 'December'\n ];\n var day = date.getDate();\n var monthIndex = date.getMonth();\n var year = date.getFullYear();\n return day + ' ' + monthNames[monthIndex] + ' ' + year;\n };\n LicenseManager.getGridReleaseDate = function () {\n return new Date(parseInt(LicenseManager_1.decode(LicenseManager_1.RELEASE_INFORMATION), 10));\n };\n LicenseManager.decode = function (input) {\n var keystr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n var t = '';\n var n, r, i;\n var s, o, u, a;\n var f = 0;\n var e = input.replace(/[^A-Za-z0-9+/=]/g, '');\n while (f < e.length) {\n s = keystr.indexOf(e.charAt(f++));\n o = keystr.indexOf(e.charAt(f++));\n u = keystr.indexOf(e.charAt(f++));\n a = keystr.indexOf(e.charAt(f++));\n n = s << 2 | o >> 4;\n r = (o & 15) << 4 | u >> 2;\n i = (u & 3) << 6 | a;\n t = t + String.fromCharCode(n);\n if (u != 64) {\n t = t + String.fromCharCode(r);\n }\n if (a != 64) {\n t = t + String.fromCharCode(i);\n }\n }\n t = LicenseManager_1.utf8_decode(t);\n return t;\n };\n LicenseManager.utf8_decode = function (input) {\n input = input.replace(/rn/g, 'n');\n var t = '';\n for (var n = 0; n < input.length; n++) {\n var r = input.charCodeAt(n);\n if (r < 128) {\n t += String.fromCharCode(r);\n }\n else if (r > 127 && r < 2048) {\n t += String.fromCharCode(r >> 6 | 192);\n t += String.fromCharCode(r & 63 | 128);\n }\n else {\n t += String.fromCharCode(r >> 12 | 224);\n t += String.fromCharCode(r >> 6 & 63 | 128);\n t += String.fromCharCode(r & 63 | 128);\n }\n }\n return t;\n };\n LicenseManager.setLicenseKey = function (licenseKey) {\n LicenseManager_1.licenseKey = licenseKey;\n };\n LicenseManager.extractBracketedInformation = function (licenseKey) {\n var matches = licenseKey.split('[')\n .filter(function (v) {\n return v.indexOf(']') > -1;\n })\n .map(function (value) {\n return value.split(']')[0];\n });\n if (!matches || matches.length === 0) {\n return [null, null];\n }\n var isTrial = matches.filter(function (match) { return match === 'TRIAL'; }).length === 1;\n var version = matches.filter(function (match) { return match.indexOf(\"v\") === 0; }).map(function (match) { return match.replace(/^v/, \"\"); })[0];\n return [version, isTrial];\n };\n LicenseManager.prototype.validateLicenseKeyForVersion = function (version, isTrial, license) {\n if (version !== '2') {\n return;\n }\n if (isTrial) {\n this.validateForTrial(license);\n }\n else {\n this.validateLegacyKey(license);\n }\n };\n LicenseManager.prototype.validateLegacyKey = function (license) {\n var gridReleaseDate = LicenseManager_1.getGridReleaseDate();\n var expiry = LicenseManager_1.extractExpiry(license);\n var valid = false;\n var current = false;\n if (!isNaN(expiry.getTime())) {\n valid = true;\n current = (gridReleaseDate < expiry);\n }\n if (!valid) {\n this.outputInvalidLicenseKey();\n }\n else if (!current) {\n var formattedExpiryDate = LicenseManager_1.formatDate(expiry);\n var formattedReleaseDate = LicenseManager_1.formatDate(gridReleaseDate);\n this.outputIncompatibleVersion(formattedExpiryDate, formattedReleaseDate);\n }\n };\n LicenseManager.prototype.validateForTrial = function (license) {\n var expiry = LicenseManager_1.extractExpiry(license);\n var now = new Date();\n var valid = false;\n var current = false;\n if (!isNaN(expiry.getTime())) {\n valid = true;\n current = (expiry > now);\n }\n if (!valid) {\n this.outputInvalidLicenseKey();\n }\n else if (!current) {\n var formattedExpiryDate = LicenseManager_1.formatDate(expiry);\n this.outputExpiredTrialKey(formattedExpiryDate);\n }\n };\n LicenseManager.prototype.outputInvalidLicenseKey = function () {\n console.error('*****************************************************************************************************************');\n console.error('***************************************** AG Grid Enterprise License ********************************************');\n console.error('********************************************* Invalid License ***************************************************');\n console.error('* Your license for AG Grid Enterprise is not valid - please contact info@ag-grid.com to obtain a valid license. *');\n console.error('*****************************************************************************************************************');\n console.error('*****************************************************************************************************************');\n this.watermarkMessage = \"Invalid License\";\n };\n LicenseManager.prototype.outputExpiredTrialKey = function (formattedExpiryDate) {\n console.error('****************************************************************************************************************');\n console.error('***************************************** AG Grid Enterprise License *******************************************');\n console.error('***************************************** Trial Period Expired. *******************************************');\n console.error(\"* Your license for AG Grid Enterprise expired on \" + formattedExpiryDate + \". *\");\n console.error('* Please email info@ag-grid.com to purchase a license. *');\n console.error('****************************************************************************************************************');\n console.error('****************************************************************************************************************');\n this.watermarkMessage = \"Trial Period Expired\";\n };\n LicenseManager.prototype.outputMissingLicenseKey = function () {\n console.error('****************************************************************************************************************');\n console.error('***************************************** AG Grid Enterprise License *******************************************');\n console.error('****************************************** License Key Not Found ***********************************************');\n console.error('* All AG Grid Enterprise features are unlocked. *');\n console.error('* This is an evaluation only version, it is not licensed for development projects intended for production. *');\n console.error('* If you want to hide the watermark, please email info@ag-grid.com for a trial license. *');\n console.error('****************************************************************************************************************');\n console.error('****************************************************************************************************************');\n this.watermarkMessage = \"For Trial Use Only\";\n };\n LicenseManager.prototype.outputIncompatibleVersion = function (formattedExpiryDate, formattedReleaseDate) {\n console.error('****************************************************************************************************************************');\n console.error('****************************************************************************************************************************');\n console.error('* AG Grid Enterprise License *');\n console.error('* License not compatible with installed version of AG Grid Enterprise. *');\n console.error('* *');\n console.error(\"* Your AG Grid License entitles you to all versions of AG Grid that we release within the time covered by your license *\");\n console.error(\"* - typically we provide one year licenses which entitles you to all releases / updates of AG Grid within that year. *\");\n console.error(\"* Your license has an end (expiry) date which stops the license key working with versions of AG Grid released after the *\");\n console.error(\"* license end date. The license key that you have expires on \" + formattedExpiryDate + \", however the version of AG Grid you *\");\n console.error(\"* are trying to use was released on \" + formattedReleaseDate + \". *\");\n console.error('* *');\n console.error('* Please contact info@ag-grid.com to renew your subscription to new versions and get a new license key to work with this *');\n console.error('* version of AG Grid. *');\n console.error('****************************************************************************************************************************');\n console.error('****************************************************************************************************************************');\n this.watermarkMessage = \"License Expired\";\n };\n var LicenseManager_1;\n LicenseManager.RELEASE_INFORMATION = 'MTY1MjQ0MzczMDM1MQ==';\n __decorate([\n Autowired('md5')\n ], LicenseManager.prototype, \"md5\", void 0);\n __decorate([\n PreConstruct\n ], LicenseManager.prototype, \"validateLicense\", null);\n LicenseManager = LicenseManager_1 = __decorate([\n Bean('licenseManager')\n ], LicenseManager);\n return LicenseManager;\n}(BeanStub));\nexport { LicenseManager };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Bean, BeanStub, PostConstruct } from \"@ag-grid-community/core\";\nvar MD5 = /** @class */ (function (_super) {\n __extends(MD5, _super);\n function MD5() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.ieCompatibility = false;\n return _this;\n }\n MD5.prototype.init = function () {\n this.ieCompatibility = (this.md5('hello') != '5d41402abc4b2a76b9719d911017c592');\n };\n MD5.prototype.md5cycle = function (x, k) {\n var a = x[0], b = x[1], c = x[2], d = x[3];\n a = this.ff(a, b, c, d, k[0], 7, -680876936);\n d = this.ff(d, a, b, c, k[1], 12, -389564586);\n c = this.ff(c, d, a, b, k[2], 17, 606105819);\n b = this.ff(b, c, d, a, k[3], 22, -1044525330);\n a = this.ff(a, b, c, d, k[4], 7, -176418897);\n d = this.ff(d, a, b, c, k[5], 12, 1200080426);\n c = this.ff(c, d, a, b, k[6], 17, -1473231341);\n b = this.ff(b, c, d, a, k[7], 22, -45705983);\n a = this.ff(a, b, c, d, k[8], 7, 1770035416);\n d = this.ff(d, a, b, c, k[9], 12, -1958414417);\n c = this.ff(c, d, a, b, k[10], 17, -42063);\n b = this.ff(b, c, d, a, k[11], 22, -1990404162);\n a = this.ff(a, b, c, d, k[12], 7, 1804603682);\n d = this.ff(d, a, b, c, k[13], 12, -40341101);\n c = this.ff(c, d, a, b, k[14], 17, -1502002290);\n b = this.ff(b, c, d, a, k[15], 22, 1236535329);\n a = this.gg(a, b, c, d, k[1], 5, -165796510);\n d = this.gg(d, a, b, c, k[6], 9, -1069501632);\n c = this.gg(c, d, a, b, k[11], 14, 643717713);\n b = this.gg(b, c, d, a, k[0], 20, -373897302);\n a = this.gg(a, b, c, d, k[5], 5, -701558691);\n d = this.gg(d, a, b, c, k[10], 9, 38016083);\n c = this.gg(c, d, a, b, k[15], 14, -660478335);\n b = this.gg(b, c, d, a, k[4], 20, -405537848);\n a = this.gg(a, b, c, d, k[9], 5, 568446438);\n d = this.gg(d, a, b, c, k[14], 9, -1019803690);\n c = this.gg(c, d, a, b, k[3], 14, -187363961);\n b = this.gg(b, c, d, a, k[8], 20, 1163531501);\n a = this.gg(a, b, c, d, k[13], 5, -1444681467);\n d = this.gg(d, a, b, c, k[2], 9, -51403784);\n c = this.gg(c, d, a, b, k[7], 14, 1735328473);\n b = this.gg(b, c, d, a, k[12], 20, -1926607734);\n a = this.hh(a, b, c, d, k[5], 4, -378558);\n d = this.hh(d, a, b, c, k[8], 11, -2022574463);\n c = this.hh(c, d, a, b, k[11], 16, 1839030562);\n b = this.hh(b, c, d, a, k[14], 23, -35309556);\n a = this.hh(a, b, c, d, k[1], 4, -1530992060);\n d = this.hh(d, a, b, c, k[4], 11, 1272893353);\n c = this.hh(c, d, a, b, k[7], 16, -155497632);\n b = this.hh(b, c, d, a, k[10], 23, -1094730640);\n a = this.hh(a, b, c, d, k[13], 4, 681279174);\n d = this.hh(d, a, b, c, k[0], 11, -358537222);\n c = this.hh(c, d, a, b, k[3], 16, -722521979);\n b = this.hh(b, c, d, a, k[6], 23, 76029189);\n a = this.hh(a, b, c, d, k[9], 4, -640364487);\n d = this.hh(d, a, b, c, k[12], 11, -421815835);\n c = this.hh(c, d, a, b, k[15], 16, 530742520);\n b = this.hh(b, c, d, a, k[2], 23, -995338651);\n a = this.ii(a, b, c, d, k[0], 6, -198630844);\n d = this.ii(d, a, b, c, k[7], 10, 1126891415);\n c = this.ii(c, d, a, b, k[14], 15, -1416354905);\n b = this.ii(b, c, d, a, k[5], 21, -57434055);\n a = this.ii(a, b, c, d, k[12], 6, 1700485571);\n d = this.ii(d, a, b, c, k[3], 10, -1894986606);\n c = this.ii(c, d, a, b, k[10], 15, -1051523);\n b = this.ii(b, c, d, a, k[1], 21, -2054922799);\n a = this.ii(a, b, c, d, k[8], 6, 1873313359);\n d = this.ii(d, a, b, c, k[15], 10, -30611744);\n c = this.ii(c, d, a, b, k[6], 15, -1560198380);\n b = this.ii(b, c, d, a, k[13], 21, 1309151649);\n a = this.ii(a, b, c, d, k[4], 6, -145523070);\n d = this.ii(d, a, b, c, k[11], 10, -1120210379);\n c = this.ii(c, d, a, b, k[2], 15, 718787259);\n b = this.ii(b, c, d, a, k[9], 21, -343485551);\n x[0] = this.add32(a, x[0]);\n x[1] = this.add32(b, x[1]);\n x[2] = this.add32(c, x[2]);\n x[3] = this.add32(d, x[3]);\n };\n MD5.prototype.cmn = function (q, a, b, x, s, t) {\n a = this.add32(this.add32(a, q), this.add32(x, t));\n return this.add32((a << s) | (a >>> (32 - s)), b);\n };\n MD5.prototype.ff = function (a, b, c, d, x, s, t) {\n return this.cmn((b & c) | ((~b) & d), a, b, x, s, t);\n };\n MD5.prototype.gg = function (a, b, c, d, x, s, t) {\n return this.cmn((b & d) | (c & (~d)), a, b, x, s, t);\n };\n MD5.prototype.hh = function (a, b, c, d, x, s, t) {\n return this.cmn(b ^ c ^ d, a, b, x, s, t);\n };\n MD5.prototype.ii = function (a, b, c, d, x, s, t) {\n return this.cmn(c ^ (b | (~d)), a, b, x, s, t);\n };\n MD5.prototype.md51 = function (s) {\n var n = s.length;\n var state = [1732584193, -271733879, -1732584194, 271733878];\n var i;\n for (i = 64; i <= s.length; i += 64) {\n this.md5cycle(state, this.md5blk(s.substring(i - 64, i)));\n }\n s = s.substring(i - 64);\n var tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n for (i = 0; i < s.length; i++) {\n tail[i >> 2] |= s.charCodeAt(i) << ((i % 4) << 3);\n }\n tail[i >> 2] |= 0x80 << ((i % 4) << 3);\n if (i > 55) {\n this.md5cycle(state, tail);\n for (i = 0; i < 16; i++) {\n tail[i] = 0;\n }\n }\n tail[14] = n * 8;\n this.md5cycle(state, tail);\n return state;\n };\n /* there needs to be support for Unicode here, * unless we pretend that we can redefine the MD-5\n * algorithm for multi-byte characters (perhaps by adding every four 16-bit characters and\n * shortening the sum to 32 bits). Otherwise I suthis.ggest performing MD-5 as if every character\n * was two bytes--e.g., 0040 0025 = @%--but then how will an ordinary MD-5 sum be matched?\n * There is no way to standardize text to something like UTF-8 before transformation; speed cost is\n * utterly prohibitive. The JavaScript standard itself needs to look at this: it should start\n * providing access to strings as preformed UTF-8 8-bit unsigned value arrays.\n */\n MD5.prototype.md5blk = function (s) {\n var md5blks = [];\n /* Andy King said do it this way. */\n for (var i = 0; i < 64; i += 4) {\n md5blks[i >> 2] = s.charCodeAt(i)\n + (s.charCodeAt(i + 1) << 8)\n + (s.charCodeAt(i + 2) << 16)\n + (s.charCodeAt(i + 3) << 24);\n }\n return md5blks;\n };\n MD5.prototype.rhex = function (n) {\n var hex_chr = '0123456789abcdef'.split('');\n var s = '', j = 0;\n for (; j < 4; j++) {\n s += hex_chr[(n >> (j * 8 + 4)) & 0x0F]\n + hex_chr[(n >> (j * 8)) & 0x0F];\n }\n return s;\n };\n MD5.prototype.hex = function (x) {\n for (var i = 0; i < x.length; i++) {\n x[i] = this.rhex(x[i]);\n }\n return x.join('');\n };\n MD5.prototype.md5 = function (s) {\n return this.hex(this.md51(s));\n };\n MD5.prototype.add32 = function (a, b) {\n return this.ieCompatibility ? this.add32Compat(a, b) : this.add32Std(a, b);\n };\n /* this function is much faster, so if possible we use it. Some IEs are the only ones I know of that\n need the idiotic second function, generated by an if clause. */\n MD5.prototype.add32Std = function (a, b) {\n return (a + b) & 0xFFFFFFFF;\n };\n MD5.prototype.add32Compat = function (x, y) {\n var lsw = (x & 0xFFFF) + (y & 0xFFFF), msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return (msw << 16) | (lsw & 0xFFFF);\n };\n __decorate([\n PostConstruct\n ], MD5.prototype, \"init\", null);\n MD5 = __decorate([\n Bean('md5')\n ], MD5);\n return MD5;\n}(BeanStub));\nexport { MD5 };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Component, PostConstruct, RefSelector } from '@ag-grid-community/core';\nvar WatermarkComp = /** @class */ (function (_super) {\n __extends(WatermarkComp, _super);\n function WatermarkComp() {\n return _super.call(this, \"
\\n
\\n
\") || this;\n }\n WatermarkComp.prototype.postConstruct = function () {\n var _this = this;\n var show = this.shouldDisplayWatermark();\n this.addOrRemoveCssClass('ag-hidden', !show);\n if (show) {\n this.eLicenseTextRef.innerText = this.licenseManager.getWatermarkMessage();\n window.setTimeout(function () { return _this.addCssClass('ag-opacity-zero'); }, 0);\n window.setTimeout(function () { return _this.addCssClass('ag-hidden'); }, 5000);\n }\n };\n WatermarkComp.prototype.shouldDisplayWatermark = function () {\n var eDocument = this.gridOptionsWrapper.getDocument();\n var win = (eDocument.defaultView || window);\n var loc = win.location;\n var _a = loc.hostname, hostname = _a === void 0 ? '' : _a, pathname = loc.pathname;\n var isDisplayWatermark = this.licenseManager.isDisplayWatermark();\n var isWhiteListURL = hostname.match('^(?:127\\.0\\.0\\.1|localhost|(?:\\w+\\.)?ag-grid\\.com)$') != null;\n var isForceWatermark = pathname ? pathname.indexOf('forceWatermark') !== -1 : false;\n return isForceWatermark || (isDisplayWatermark && !isWhiteListURL);\n };\n __decorate([\n Autowired('licenseManager')\n ], WatermarkComp.prototype, \"licenseManager\", void 0);\n __decorate([\n RefSelector('eLicenseTextRef')\n ], WatermarkComp.prototype, \"eLicenseTextRef\", void 0);\n __decorate([\n PostConstruct\n ], WatermarkComp.prototype, \"postConstruct\", null);\n return WatermarkComp;\n}(Component));\nexport { WatermarkComp };\n","import { ModuleNames } from \"@ag-grid-community/core\";\nimport { LicenseManager } from \"./licenseManager\";\nimport { MD5 } from \"./license/md5\";\nimport { WatermarkComp } from \"./license/watermark\";\nexport { LicenseManager } from \"./licenseManager\";\nexport { MD5 } from \"./license/md5\";\nexport { WatermarkComp } from \"./license/watermark\";\nexport var EnterpriseCoreModule = {\n moduleName: ModuleNames.EnterpriseCoreModule,\n beans: [LicenseManager, MD5],\n agStackComponents: [\n { componentName: 'AgWatermark', componentClass: WatermarkComp }\n ]\n};\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n};\nimport { _, Autowired, Bean, BeanStub, ChangedPath, Constants, Events, PostConstruct, Optional, } from \"@ag-grid-community/core\";\nvar ClipboardService = /** @class */ (function (_super) {\n __extends(ClipboardService, _super);\n function ClipboardService() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.navigatorApiFailed = false;\n return _this;\n }\n ClipboardService.prototype.init = function () {\n var _this = this;\n this.logger = this.loggerFactory.create('ClipboardService');\n if (this.rowModel.getType() === Constants.ROW_MODEL_TYPE_CLIENT_SIDE) {\n this.clientSideRowModel = this.rowModel;\n }\n this.ctrlsService.whenReady(function (p) {\n _this.gridCtrl = p.gridCtrl;\n });\n };\n ClipboardService.prototype.pasteFromClipboard = function () {\n var _this = this;\n this.logger.log('pasteFromClipboard');\n // Method 1 - native clipboard API, available in modern chrome browsers\n var allowNavigator = !this.gridOptionsWrapper.isSuppressClipboardApi();\n // Some browsers (Firefox) do not allow Web Applications to read from\n // the clipboard so verify if not only the ClipboardAPI is available,\n // but also if the `readText` method is public.\n if (allowNavigator && !this.navigatorApiFailed && navigator.clipboard && navigator.clipboard.readText) {\n navigator.clipboard.readText()\n .then(this.processClipboardData.bind(this))\n .catch(function (e) {\n _.doOnce(function () {\n console.warn(e);\n console.warn('AG Grid: Unable to use the Clipboard API (navigator.clipboard.readText()). ' +\n 'The reason why it could not be used has been logged in the previous line. ' +\n 'For this reason the grid has defaulted to using a workaround which doesn\\'t perform as well. ' +\n 'Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid ' +\n 'property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API');\n }, 'clipboardApiError');\n _this.navigatorApiFailed = true;\n _this.pasteFromClipboardLegacy();\n });\n }\n else {\n this.pasteFromClipboardLegacy();\n }\n };\n ClipboardService.prototype.pasteFromClipboardLegacy = function () {\n var _this = this;\n // Method 2 - if modern API fails, the old school hack\n this.executeOnTempElement(function (textArea) { return textArea.focus({ preventScroll: true }); }, function (element) {\n var data = element.value;\n _this.processClipboardData(data);\n });\n };\n ClipboardService.prototype.processClipboardData = function (data) {\n var _this = this;\n if (data == null) {\n return;\n }\n var parsedData = _.stringToArray(data, this.gridOptionsWrapper.getClipboardDelimiter());\n var userFunc = this.gridOptionsWrapper.getProcessDataFromClipboardFunc();\n if (userFunc) {\n parsedData = userFunc({ data: parsedData });\n }\n if (parsedData == null) {\n return;\n }\n if (this.gridOptionsWrapper.isSuppressLastEmptyLineOnPaste()) {\n this.removeLastLineIfBlank(parsedData);\n }\n var pasteOperation = function (cellsToFlash, updatedRowNodes, focusedCell, changedPath) {\n var rangeActive = _this.rangeService && _this.rangeService.isMoreThanOneCell();\n var pasteIntoRange = rangeActive && !_this.hasOnlyOneValueToPaste(parsedData);\n if (pasteIntoRange) {\n _this.pasteIntoActiveRange(parsedData, cellsToFlash, updatedRowNodes, changedPath);\n }\n else {\n _this.pasteStartingFromFocusedCell(parsedData, cellsToFlash, updatedRowNodes, focusedCell, changedPath);\n }\n };\n this.doPasteOperation(pasteOperation);\n };\n // common code to paste operations, e.g. paste to cell, paste to range, and copy range down\n ClipboardService.prototype.doPasteOperation = function (pasteOperationFunc) {\n var api = this.gridOptionsWrapper.getApi();\n var columnApi = this.gridOptionsWrapper.getColumnApi();\n var source = 'clipboard';\n this.eventService.dispatchEvent({\n type: Events.EVENT_PASTE_START,\n api: api,\n columnApi: columnApi,\n source: source\n });\n var changedPath;\n if (this.clientSideRowModel) {\n var onlyChangedColumns = this.gridOptionsWrapper.isAggregateOnlyChangedColumns();\n changedPath = new ChangedPath(onlyChangedColumns, this.clientSideRowModel.getRootNode());\n }\n var cellsToFlash = {};\n var updatedRowNodes = [];\n var focusedCell = this.focusService.getFocusedCell();\n pasteOperationFunc(cellsToFlash, updatedRowNodes, focusedCell, changedPath);\n if (changedPath) {\n this.clientSideRowModel.doAggregate(changedPath);\n }\n this.rowRenderer.refreshCells();\n this.dispatchFlashCells(cellsToFlash);\n this.fireRowChanged(updatedRowNodes);\n // if using the clipboard hack with a temp element, then the focus has been lost,\n // so need to put it back. otherwise paste operation loosed focus on cell and keyboard\n // navigation stops.\n if (focusedCell) {\n this.focusService.setFocusedCell(focusedCell.rowIndex, focusedCell.column, focusedCell.rowPinned, true);\n }\n this.eventService.dispatchEvent({\n type: Events.EVENT_PASTE_END,\n api: api,\n columnApi: columnApi,\n source: source\n });\n };\n ClipboardService.prototype.pasteIntoActiveRange = function (clipboardData, cellsToFlash, updatedRowNodes, changedPath) {\n var _this = this;\n // true if clipboard data can be evenly pasted into range, otherwise false\n var abortRepeatingPasteIntoRows = this.getRangeSize() % clipboardData.length != 0;\n var indexOffset = 0;\n var dataRowIndex = 0;\n var rowCallback = function (currentRow, rowNode, columns, index) {\n var atEndOfClipboardData = index - indexOffset >= clipboardData.length;\n if (atEndOfClipboardData) {\n if (abortRepeatingPasteIntoRows) {\n return;\n }\n // increment offset and reset data index to repeat paste of data\n indexOffset += dataRowIndex;\n dataRowIndex = 0;\n }\n var currentRowData = clipboardData[index - indexOffset];\n // otherwise we are not the first row, so copy\n updatedRowNodes.push(rowNode);\n var processCellFromClipboardFunc = _this.gridOptionsWrapper.getProcessCellFromClipboardFunc();\n columns.forEach(function (column, idx) {\n if (!column.isCellEditable(rowNode) || column.isSuppressPaste(rowNode)) {\n return;\n }\n // repeat data for columns we don't have data for - happens when to range is bigger than copied data range\n if (idx >= currentRowData.length) {\n idx = idx % currentRowData.length;\n }\n var newValue = _this.processCell(rowNode, column, currentRowData[idx], Constants.EXPORT_TYPE_DRAG_COPY, processCellFromClipboardFunc);\n rowNode.setDataValue(column, newValue, Constants.SOURCE_PASTE);\n if (changedPath) {\n changedPath.addParentNode(rowNode.parent, [column]);\n }\n var cellId = _this.cellPositionUtils.createIdFromValues(currentRow.rowIndex, column, currentRow.rowPinned);\n cellsToFlash[cellId] = true;\n });\n dataRowIndex++;\n };\n this.iterateActiveRanges(false, rowCallback);\n };\n ClipboardService.prototype.pasteStartingFromFocusedCell = function (parsedData, cellsToFlash, updatedRowNodes, focusedCell, changedPath) {\n if (!focusedCell) {\n return;\n }\n var currentRow = { rowIndex: focusedCell.rowIndex, rowPinned: focusedCell.rowPinned };\n var columnsToPasteInto = this.columnModel.getDisplayedColumnsStartingAt(focusedCell.column);\n if (this.isPasteSingleValueIntoRange(parsedData)) {\n this.pasteSingleValueIntoRange(parsedData, updatedRowNodes, cellsToFlash, changedPath);\n }\n else {\n this.pasteMultipleValues(parsedData, currentRow, updatedRowNodes, columnsToPasteInto, cellsToFlash, Constants.EXPORT_TYPE_CLIPBOARD, changedPath);\n }\n };\n // if range is active, and only one cell, then we paste this cell into all cells in the active range.\n ClipboardService.prototype.isPasteSingleValueIntoRange = function (parsedData) {\n return this.hasOnlyOneValueToPaste(parsedData)\n && this.rangeService != null\n && !this.rangeService.isEmpty();\n };\n ClipboardService.prototype.pasteSingleValueIntoRange = function (parsedData, updatedRowNodes, cellsToFlash, changedPath) {\n var _this = this;\n var value = parsedData[0][0];\n var rowCallback = function (currentRow, rowNode, columns) {\n updatedRowNodes.push(rowNode);\n columns.forEach(function (column) {\n return _this.updateCellValue(rowNode, column, value, cellsToFlash, Constants.EXPORT_TYPE_CLIPBOARD, changedPath);\n });\n };\n this.iterateActiveRanges(false, rowCallback);\n };\n ClipboardService.prototype.hasOnlyOneValueToPaste = function (parsedData) {\n return parsedData.length === 1 && parsedData[0].length === 1;\n };\n ClipboardService.prototype.copyRangeDown = function () {\n var _this = this;\n if (!this.rangeService || this.rangeService.isEmpty()) {\n return;\n }\n var firstRowValues = [];\n var pasteOperation = function (cellsToFlash, updatedRowNodes, focusedCell, changedPath) {\n var processCellForClipboardFunc = _this.gridOptionsWrapper.getProcessCellForClipboardFunc();\n var processCellFromClipboardFunc = _this.gridOptionsWrapper.getProcessCellFromClipboardFunc();\n var rowCallback = function (currentRow, rowNode, columns) {\n // take reference of first row, this is the one we will be using to copy from\n if (!firstRowValues.length) {\n // two reasons for looping through columns\n columns.forEach(function (column) {\n // get the initial values to copy down\n var value = _this.processCell(rowNode, column, _this.valueService.getValue(column, rowNode), Constants.EXPORT_TYPE_DRAG_COPY, processCellForClipboardFunc);\n firstRowValues.push(value);\n });\n }\n else {\n // otherwise we are not the first row, so copy\n updatedRowNodes.push(rowNode);\n columns.forEach(function (column, index) {\n if (!column.isCellEditable(rowNode) || column.isSuppressPaste(rowNode)) {\n return;\n }\n var firstRowValue = _this.processCell(rowNode, column, firstRowValues[index], Constants.EXPORT_TYPE_DRAG_COPY, processCellFromClipboardFunc);\n rowNode.setDataValue(column, firstRowValue, Constants.SOURCE_PASTE);\n if (changedPath) {\n changedPath.addParentNode(rowNode.parent, [column]);\n }\n var cellId = _this.cellPositionUtils.createIdFromValues(currentRow.rowIndex, column, currentRow.rowPinned);\n cellsToFlash[cellId] = true;\n });\n }\n };\n _this.iterateActiveRanges(true, rowCallback);\n };\n this.doPasteOperation(pasteOperation);\n };\n ClipboardService.prototype.removeLastLineIfBlank = function (parsedData) {\n // remove last row if empty, excel puts empty last row in\n var lastLine = _.last(parsedData);\n var lastLineIsBlank = lastLine && lastLine.length === 1 && lastLine[0] === '';\n if (lastLineIsBlank) {\n _.removeFromArray(parsedData, lastLine);\n }\n };\n ClipboardService.prototype.fireRowChanged = function (rowNodes) {\n var _this = this;\n if (!this.gridOptionsWrapper.isFullRowEdit()) {\n return;\n }\n rowNodes.forEach(function (rowNode) {\n var event = {\n type: Events.EVENT_ROW_VALUE_CHANGED,\n node: rowNode,\n data: rowNode.data,\n rowIndex: rowNode.rowIndex,\n rowPinned: rowNode.rowPinned,\n context: _this.gridOptionsWrapper.getContext(),\n api: _this.gridOptionsWrapper.getApi(),\n columnApi: _this.gridOptionsWrapper.getColumnApi()\n };\n _this.eventService.dispatchEvent(event);\n });\n };\n ClipboardService.prototype.pasteMultipleValues = function (clipboardGridData, currentRow, updatedRowNodes, columnsToPasteInto, cellsToFlash, type, changedPath) {\n var _this = this;\n var rowPointer = currentRow;\n // if doing CSRM and NOT tree data, then it means groups are aggregates, which are read only,\n // so we should skip them when doing paste operations.\n var skipGroupRows = this.clientSideRowModel != null && !this.gridOptionsWrapper.isTreeData();\n var getNextGoodRowNode = function () {\n while (true) {\n if (!rowPointer) {\n return null;\n }\n var res = _this.rowPositionUtils.getRowNode(rowPointer);\n // move to next row down for next set of values\n rowPointer = _this.cellNavigationService.getRowBelow({ rowPinned: rowPointer.rowPinned, rowIndex: rowPointer.rowIndex });\n // if no more rows, return null\n if (res == null) {\n return null;\n }\n // skip details rows and footer rows, never paste into them as they don't hold data\n var skipRow = res.detail || res.footer || (skipGroupRows && res.group);\n // skipping row means we go into the next iteration of the while loop\n if (!skipRow) {\n return res;\n }\n }\n };\n clipboardGridData.forEach(function (clipboardRowData) {\n var rowNode = getNextGoodRowNode();\n // if we have come to end of rows in grid, then skip\n if (!rowNode) {\n return;\n }\n clipboardRowData.forEach(function (value, index) {\n return _this.updateCellValue(rowNode, columnsToPasteInto[index], value, cellsToFlash, type, changedPath);\n });\n updatedRowNodes.push(rowNode);\n });\n };\n ClipboardService.prototype.updateCellValue = function (rowNode, column, value, cellsToFlash, type, changedPath) {\n if (!rowNode ||\n !column ||\n !column.isCellEditable(rowNode) ||\n column.isSuppressPaste(rowNode)) {\n return;\n }\n var processedValue = this.processCell(rowNode, column, value, type, this.gridOptionsWrapper.getProcessCellFromClipboardFunc());\n rowNode.setDataValue(column, processedValue, Constants.SOURCE_PASTE);\n var cellId = this.cellPositionUtils.createIdFromValues(rowNode.rowIndex, column, rowNode.rowPinned);\n cellsToFlash[cellId] = true;\n if (changedPath) {\n changedPath.addParentNode(rowNode.parent, [column]);\n }\n };\n ClipboardService.prototype.copyToClipboard = function (params) {\n if (params === void 0) { params = {}; }\n var includeHeaders = params.includeHeaders, includeGroupHeaders = params.includeGroupHeaders;\n this.logger.log(\"copyToClipboard: includeHeaders = \" + includeHeaders);\n // don't override 'includeHeaders' if it has been explicitly set to 'false'\n if (includeHeaders == null) {\n includeHeaders = this.gridOptionsWrapper.isCopyHeadersToClipboard();\n }\n if (includeGroupHeaders == null) {\n includeGroupHeaders = this.gridOptionsWrapper.isCopyGroupHeadersToClipboard();\n }\n var copyParams = { includeHeaders: includeHeaders, includeGroupHeaders: includeGroupHeaders };\n var shouldCopyRows = !this.gridOptionsWrapper.isSuppressCopyRowsToClipboard();\n // Copy priority is Range > Row > Focus\n if (this.rangeService && !this.rangeService.isEmpty() && !this.shouldSkipSingleCellRange()) {\n this.copySelectedRangeToClipboard(copyParams);\n }\n else if (shouldCopyRows && !this.selectionService.isEmpty()) {\n this.copySelectedRowsToClipboard(copyParams);\n }\n else if (this.focusService.isAnyCellFocused()) {\n this.copyFocusedCellToClipboard(copyParams);\n }\n };\n ClipboardService.prototype.shouldSkipSingleCellRange = function () {\n return this.gridOptionsWrapper.isSuppressCopySingleCellRanges() && !this.rangeService.isMoreThanOneCell();\n };\n ClipboardService.prototype.iterateActiveRanges = function (onlyFirst, rowCallback, columnCallback) {\n var _this = this;\n if (!this.rangeService || this.rangeService.isEmpty()) {\n return;\n }\n var cellRanges = this.rangeService.getCellRanges();\n if (onlyFirst) {\n this.iterateActiveRange(cellRanges[0], rowCallback, columnCallback, true);\n }\n else {\n cellRanges.forEach(function (range, idx) { return _this.iterateActiveRange(range, rowCallback, columnCallback, idx === cellRanges.length - 1); });\n }\n };\n ClipboardService.prototype.iterateActiveRange = function (range, rowCallback, columnCallback, isLastRange) {\n if (!this.rangeService) {\n return;\n }\n var currentRow = this.rangeService.getRangeStartRow(range);\n var lastRow = this.rangeService.getRangeEndRow(range);\n if (columnCallback && range.columns) {\n columnCallback(range.columns);\n }\n var rangeIndex = 0;\n var isLastRow = false;\n // the currentRow could be missing if the user sets the active range manually, and sets a range\n // that is outside of the grid (eg. sets range rows 0 to 100, but grid has only 20 rows).\n while (!isLastRow && currentRow != null) {\n var rowNode = this.rowPositionUtils.getRowNode(currentRow);\n isLastRow = this.rowPositionUtils.sameRow(currentRow, lastRow);\n rowCallback(currentRow, rowNode, range.columns, rangeIndex++, isLastRow && isLastRange);\n currentRow = this.cellNavigationService.getRowBelow(currentRow);\n }\n };\n ClipboardService.prototype.copySelectedRangeToClipboard = function (params) {\n if (params === void 0) { params = {}; }\n if (!this.rangeService || this.rangeService.isEmpty()) {\n return;\n }\n var allRangesMerge = this.rangeService.areAllRangesAbleToMerge();\n var _a = allRangesMerge ? this.buildDataFromMergedRanges(params) : this.buildDataFromRanges(params), data = _a.data, cellsToFlash = _a.cellsToFlash;\n this.copyDataToClipboard(data);\n this.dispatchFlashCells(cellsToFlash);\n };\n ClipboardService.prototype.buildDataFromMergedRanges = function (params) {\n var _this = this;\n var columnsSet = new Set();\n var ranges = this.rangeService.getCellRanges();\n var allRowPositions = [];\n var allCellsToFlash = {};\n ranges.forEach(function (range) {\n range.columns.forEach(function (col) { return columnsSet.add(col); });\n var _a = _this.getRangeRowPositionsAndCellsToFlash(range), rowPositions = _a.rowPositions, cellsToFlash = _a.cellsToFlash;\n allRowPositions.push.apply(allRowPositions, __spread(rowPositions));\n Object.assign(allCellsToFlash, cellsToFlash);\n });\n var allColumns = this.columnModel.getAllDisplayedColumns();\n var exportedColumns = Array.from(columnsSet);\n exportedColumns.sort(function (a, b) {\n var posA = allColumns.indexOf(a);\n var posB = allColumns.indexOf(b);\n return posA - posB;\n });\n var data = this.buildExportParams({\n columns: exportedColumns,\n rowPositions: allRowPositions,\n includeHeaders: params.includeHeaders,\n includeGroupHeaders: params.includeGroupHeaders,\n });\n return { data: data, cellsToFlash: allCellsToFlash };\n };\n ClipboardService.prototype.buildDataFromRanges = function (params) {\n var _this = this;\n var ranges = this.rangeService.getCellRanges();\n var data = [];\n var allCellsToFlash = {};\n ranges.forEach(function (range) {\n var _a = _this.getRangeRowPositionsAndCellsToFlash(range), rowPositions = _a.rowPositions, cellsToFlash = _a.cellsToFlash;\n Object.assign(allCellsToFlash, cellsToFlash);\n data.push(_this.buildExportParams({\n columns: range.columns,\n rowPositions: rowPositions,\n includeHeaders: params.includeHeaders,\n includeGroupHeaders: params.includeGroupHeaders,\n }));\n });\n return { data: data.join('\\n'), cellsToFlash: allCellsToFlash };\n };\n ClipboardService.prototype.getRangeRowPositionsAndCellsToFlash = function (range) {\n var _this = this;\n var rowPositions = [];\n var cellsToFlash = {};\n var startRow = this.rangeService.getRangeStartRow(range);\n var lastRow = this.rangeService.getRangeEndRow(range);\n var node = startRow;\n while (node) {\n rowPositions.push(node);\n range.columns.forEach(function (column) {\n var cellId = _this.cellPositionUtils.createIdFromValues(node.rowIndex, column, node.rowPinned);\n cellsToFlash[cellId] = true;\n });\n if (this.rowPositionUtils.sameRow(node, lastRow)) {\n break;\n }\n node = this.cellNavigationService.getRowBelow(node);\n }\n return { rowPositions: rowPositions, cellsToFlash: cellsToFlash };\n };\n ClipboardService.prototype.copyFocusedCellToClipboard = function (params) {\n var _a;\n if (params === void 0) { params = {}; }\n var focusedCell = this.focusService.getFocusedCell();\n if (focusedCell == null) {\n return;\n }\n var cellId = this.cellPositionUtils.createId(focusedCell);\n var currentRow = { rowPinned: focusedCell.rowPinned, rowIndex: focusedCell.rowIndex };\n var column = focusedCell.column;\n var data = this.buildExportParams({\n columns: [column],\n rowPositions: [currentRow],\n includeHeaders: params.includeHeaders,\n includeGroupHeaders: params.includeGroupHeaders\n });\n this.copyDataToClipboard(data);\n this.dispatchFlashCells((_a = {}, _a[cellId] = true, _a));\n };\n ClipboardService.prototype.copySelectedRowsToClipboard = function (params) {\n if (params === void 0) { params = {}; }\n var columnKeys = params.columnKeys, includeHeaders = params.includeHeaders, includeGroupHeaders = params.includeGroupHeaders;\n var data = this.buildExportParams({\n columns: columnKeys,\n includeHeaders: includeHeaders,\n includeGroupHeaders: includeGroupHeaders\n });\n this.copyDataToClipboard(data);\n };\n ClipboardService.prototype.buildExportParams = function (params) {\n var columns = params.columns, rowPositions = params.rowPositions, _a = params.includeHeaders, includeHeaders = _a === void 0 ? false : _a, _b = params.includeGroupHeaders, includeGroupHeaders = _b === void 0 ? false : _b;\n var exportParams = {\n columnKeys: columns,\n rowNodes: rowPositions,\n skipColumnHeaders: !includeHeaders,\n skipColumnGroupHeaders: !includeGroupHeaders,\n suppressQuotes: true,\n columnSeparator: this.gridOptionsWrapper.getClipboardDelimiter(),\n onlySelected: !rowPositions,\n processCellCallback: this.gridOptionsWrapper.getProcessCellForClipboardFunc(),\n processRowGroupCallback: function (params) { return params.node.key; },\n processHeaderCallback: this.gridOptionsWrapper.getProcessHeaderForClipboardFunc(),\n processGroupHeaderCallback: this.gridOptionsWrapper.getProcessGroupHeaderForClipboardFunc()\n };\n return this.csvCreator.getDataAsCsv(exportParams);\n };\n ClipboardService.prototype.dispatchFlashCells = function (cellsToFlash) {\n var _this = this;\n window.setTimeout(function () {\n var event = {\n type: Events.EVENT_FLASH_CELLS,\n cells: cellsToFlash,\n api: _this.gridApi,\n columnApi: _this.columnApi\n };\n _this.eventService.dispatchEvent(event);\n }, 0);\n };\n ClipboardService.prototype.processCell = function (rowNode, column, value, type, func) {\n if (func) {\n var params = {\n column: column,\n node: rowNode,\n value: value,\n type: type,\n };\n return func(params);\n }\n return value;\n };\n ClipboardService.prototype.copyDataToClipboard = function (data) {\n var _this = this;\n var userProvidedFunc = this.gridOptionsWrapper.getSendToClipboardFunc();\n // method 1 - user provided func\n if (userProvidedFunc) {\n userProvidedFunc({ data: data });\n return;\n }\n // method 2 - native clipboard API, available in modern chrome browsers\n var allowNavigator = !this.gridOptionsWrapper.isSuppressClipboardApi();\n if (allowNavigator && navigator.clipboard) {\n navigator.clipboard.writeText(data).catch(function (e) {\n _.doOnce(function () {\n console.warn(e);\n console.warn('AG Grid: Unable to use the Clipboard API (navigator.clipboard.writeText()). ' +\n 'The reason why it could not be used has been logged in the previous line. ' +\n 'For this reason the grid has defaulted to using a workaround which doesn\\'t perform as well. ' +\n 'Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid ' +\n 'property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.');\n }, 'clipboardApiError');\n _this.copyDataToClipboardLegacy(data);\n });\n return;\n }\n this.copyDataToClipboardLegacy(data);\n };\n ClipboardService.prototype.copyDataToClipboardLegacy = function (data) {\n var _this = this;\n // method 3 - if all else fails, the old school hack\n this.executeOnTempElement(function (element) {\n var eDocument = _this.gridOptionsWrapper.getDocument();\n var focusedElementBefore = eDocument.activeElement;\n element.value = data || ' '; // has to be non-empty value or execCommand will not do anything\n element.select();\n element.focus({ preventScroll: true });\n var result = eDocument.execCommand('copy');\n if (!result) {\n console.warn('AG Grid: Browser did not allow document.execCommand(\\'copy\\'). Ensure ' +\n 'api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise ' +\n 'the browser will prevent it for security reasons.');\n }\n if (focusedElementBefore != null && focusedElementBefore.focus != null) {\n focusedElementBefore.focus({ preventScroll: true });\n }\n });\n };\n ClipboardService.prototype.executeOnTempElement = function (callbackNow, callbackAfter) {\n var eDoc = this.gridOptionsWrapper.getDocument();\n var eTempInput = eDoc.createElement('textarea');\n eTempInput.style.width = '1px';\n eTempInput.style.height = '1px';\n // removing items from the DOM causes the document element to scroll to the\n // position where the element was positioned. Here we set scrollTop / scrollLeft\n // to prevent the document element from scrolling when we remove it from the DOM.\n eTempInput.style.top = eDoc.documentElement.scrollTop + 'px';\n eTempInput.style.left = eDoc.documentElement.scrollLeft + 'px';\n eTempInput.style.position = 'absolute';\n eTempInput.style.opacity = '0';\n var guiRoot = this.gridCtrl.getGui();\n guiRoot.appendChild(eTempInput);\n try {\n callbackNow(eTempInput);\n }\n catch (err) {\n console.warn('AG Grid: Browser does not support document.execCommand(\\'copy\\') for clipboard operations');\n }\n //It needs 100 otherwise OS X seemed to not always be able to paste... Go figure...\n if (callbackAfter) {\n window.setTimeout(function () {\n callbackAfter(eTempInput);\n guiRoot.removeChild(eTempInput);\n }, 100);\n }\n else {\n guiRoot.removeChild(eTempInput);\n }\n };\n ClipboardService.prototype.getRangeSize = function () {\n var ranges = this.rangeService.getCellRanges();\n var startRangeIndex = 0;\n var endRangeIndex = 0;\n if (ranges.length > 0) {\n startRangeIndex = this.rangeService.getRangeStartRow(ranges[0]).rowIndex;\n endRangeIndex = this.rangeService.getRangeEndRow(ranges[0]).rowIndex;\n }\n return startRangeIndex - endRangeIndex + 1;\n };\n __decorate([\n Autowired('csvCreator')\n ], ClipboardService.prototype, \"csvCreator\", void 0);\n __decorate([\n Autowired('loggerFactory')\n ], ClipboardService.prototype, \"loggerFactory\", void 0);\n __decorate([\n Autowired('selectionService')\n ], ClipboardService.prototype, \"selectionService\", void 0);\n __decorate([\n Optional('rangeService')\n ], ClipboardService.prototype, \"rangeService\", void 0);\n __decorate([\n Autowired('rowModel')\n ], ClipboardService.prototype, \"rowModel\", void 0);\n __decorate([\n Autowired('ctrlsService')\n ], ClipboardService.prototype, \"ctrlsService\", void 0);\n __decorate([\n Autowired('valueService')\n ], ClipboardService.prototype, \"valueService\", void 0);\n __decorate([\n Autowired('focusService')\n ], ClipboardService.prototype, \"focusService\", void 0);\n __decorate([\n Autowired('rowRenderer')\n ], ClipboardService.prototype, \"rowRenderer\", void 0);\n __decorate([\n Autowired('columnModel')\n ], ClipboardService.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired('cellNavigationService')\n ], ClipboardService.prototype, \"cellNavigationService\", void 0);\n __decorate([\n Autowired('columnApi')\n ], ClipboardService.prototype, \"columnApi\", void 0);\n __decorate([\n Autowired('gridApi')\n ], ClipboardService.prototype, \"gridApi\", void 0);\n __decorate([\n Autowired('cellPositionUtils')\n ], ClipboardService.prototype, \"cellPositionUtils\", void 0);\n __decorate([\n Autowired('rowPositionUtils')\n ], ClipboardService.prototype, \"rowPositionUtils\", void 0);\n __decorate([\n PostConstruct\n ], ClipboardService.prototype, \"init\", null);\n ClipboardService = __decorate([\n Bean('clipboardService')\n ], ClipboardService);\n return ClipboardService;\n}(BeanStub));\nexport { ClipboardService };\n","import { ModuleNames } from \"@ag-grid-community/core\";\nimport { EnterpriseCoreModule } from \"@ag-grid-enterprise/core\";\nimport { CsvExportModule } from \"@ag-grid-community/csv-export\";\nimport { ClipboardService } from \"./clipboard/clipboardService\";\nexport var ClipboardModule = {\n moduleName: ModuleNames.ClipboardModule,\n beans: [ClipboardService],\n dependantModules: [\n EnterpriseCoreModule,\n CsvExportModule\n ]\n};\n","import { EventService } from \"@ag-grid-community/core\";\nvar ColumnModelItem = /** @class */ (function () {\n function ColumnModelItem(displayName, columnOrGroup, dept, group, expanded) {\n if (group === void 0) { group = false; }\n this.eventService = new EventService();\n this.displayName = displayName;\n this.dept = dept;\n this.group = group;\n if (group) {\n this.columnGroup = columnOrGroup;\n this.expanded = expanded;\n this.children = [];\n }\n else {\n this.column = columnOrGroup;\n }\n }\n ColumnModelItem.prototype.isGroup = function () { return this.group; };\n ColumnModelItem.prototype.getDisplayName = function () { return this.displayName; };\n ColumnModelItem.prototype.getColumnGroup = function () { return this.columnGroup; };\n ColumnModelItem.prototype.getColumn = function () { return this.column; };\n ColumnModelItem.prototype.getDept = function () { return this.dept; };\n ColumnModelItem.prototype.isExpanded = function () { return !!this.expanded; };\n ColumnModelItem.prototype.getChildren = function () { return this.children; };\n ColumnModelItem.prototype.isPassesFilter = function () { return this.passesFilter; };\n ColumnModelItem.prototype.setExpanded = function (expanded) {\n if (expanded === this.expanded) {\n return;\n }\n this.expanded = expanded;\n this.eventService.dispatchEvent({ type: ColumnModelItem.EVENT_EXPANDED_CHANGED });\n };\n ColumnModelItem.prototype.setPassesFilter = function (passesFilter) {\n this.passesFilter = passesFilter;\n };\n ColumnModelItem.prototype.addEventListener = function (eventType, listener) {\n this.eventService.addEventListener(eventType, listener);\n };\n ColumnModelItem.prototype.removeEventListener = function (eventType, listener) {\n this.eventService.removeEventListener(eventType, listener);\n };\n ColumnModelItem.EVENT_EXPANDED_CHANGED = 'expandedChanged';\n return ColumnModelItem;\n}());\nexport { ColumnModelItem };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n};\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nimport { AgMenuItemComponent, AgMenuList, Autowired, Column, Component, PostConstruct, ProvidedColumnGroup, _ } from \"@ag-grid-community/core\";\nvar ToolPanelContextMenu = /** @class */ (function (_super) {\n __extends(ToolPanelContextMenu, _super);\n function ToolPanelContextMenu(column, mouseEvent, parentEl) {\n var _this = _super.call(this, /* html */ \"
\") || this;\n _this.column = column;\n _this.mouseEvent = mouseEvent;\n _this.parentEl = parentEl;\n _this.displayName = null;\n return _this;\n }\n ToolPanelContextMenu.prototype.postConstruct = function () {\n this.initializeProperties(this.column);\n this.buildMenuItemMap();\n if (this.column instanceof Column) {\n this.displayName = this.columnModel.getDisplayNameForColumn(this.column, 'columnToolPanel');\n }\n else {\n this.displayName = this.columnModel.getDisplayNameForProvidedColumnGroup(null, this.column, 'columnToolPanel');\n }\n if (this.isActive()) {\n this.mouseEvent.preventDefault();\n this.displayContextMenu();\n }\n };\n ToolPanelContextMenu.prototype.initializeProperties = function (column) {\n if (column instanceof ProvidedColumnGroup) {\n this.columns = column.getLeafColumns();\n }\n else {\n this.columns = [column];\n }\n this.allowGrouping = this.columns.some(function (col) { return col.isPrimary() && col.isAllowRowGroup(); });\n this.allowValues = this.columns.some(function (col) { return col.isPrimary() && col.isAllowValue(); });\n this.allowPivoting = this.columnModel.isPivotMode() && this.columns.some(function (col) { return col.isPrimary() && col.isAllowPivot(); });\n };\n ToolPanelContextMenu.prototype.buildMenuItemMap = function () {\n var _this = this;\n var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n this.menuItemMap = new Map();\n this.menuItemMap.set('rowGroup', {\n allowedFunction: function (col) { return col.isPrimary() && col.isAllowRowGroup(); },\n activeFunction: function (col) { return col.isRowGroupActive(); },\n activateLabel: function () { return localeTextFunc('groupBy', 'Group by') + \" \" + _this.displayName; },\n deactivateLabel: function () { return localeTextFunc('ungroupBy', 'Un-Group by') + \" \" + _this.displayName; },\n activateFunction: function () {\n var groupedColumns = _this.columnModel.getRowGroupColumns();\n _this.columnModel.setRowGroupColumns(_this.addColumnsToList(groupedColumns), \"toolPanelUi\");\n },\n deActivateFunction: function () {\n var groupedColumns = _this.columnModel.getRowGroupColumns();\n _this.columnModel.setRowGroupColumns(_this.removeColumnsFromList(groupedColumns), \"toolPanelUi\");\n },\n addIcon: 'menuAddRowGroup',\n removeIcon: 'menuRemoveRowGroup'\n });\n this.menuItemMap.set('value', {\n allowedFunction: function (col) { return col.isPrimary() && col.isAllowValue(); },\n activeFunction: function (col) { return col.isValueActive(); },\n activateLabel: function () { return localeTextFunc('addToValues', \"Add \" + _this.displayName + \" to values\", [_this.displayName]); },\n deactivateLabel: function () { return localeTextFunc('removeFromValues', \"Remove \" + _this.displayName + \" from values\", [_this.displayName]); },\n activateFunction: function () {\n var valueColumns = _this.columnModel.getValueColumns();\n _this.columnModel.setValueColumns(_this.addColumnsToList(valueColumns), \"toolPanelUi\");\n },\n deActivateFunction: function () {\n var valueColumns = _this.columnModel.getValueColumns();\n _this.columnModel.setValueColumns(_this.removeColumnsFromList(valueColumns), \"toolPanelUi\");\n },\n addIcon: 'valuePanel',\n removeIcon: 'valuePanel'\n });\n this.menuItemMap.set('pivot', {\n allowedFunction: function (col) { return _this.columnModel.isPivotMode() && col.isPrimary() && col.isAllowPivot(); },\n activeFunction: function (col) { return col.isPivotActive(); },\n activateLabel: function () { return localeTextFunc('addToLabels', \"Add \" + _this.displayName + \" to labels\", [_this.displayName]); },\n deactivateLabel: function () { return localeTextFunc('removeFromLabels', \"Remove \" + _this.displayName + \" from labels\", [_this.displayName]); },\n activateFunction: function () {\n var pivotColumns = _this.columnModel.getPivotColumns();\n _this.columnModel.setPivotColumns(_this.addColumnsToList(pivotColumns), \"toolPanelUi\");\n },\n deActivateFunction: function () {\n var pivotColumns = _this.columnModel.getPivotColumns();\n _this.columnModel.setPivotColumns(_this.removeColumnsFromList(pivotColumns), \"toolPanelUi\");\n },\n addIcon: 'pivotPanel',\n removeIcon: 'pivotPanel'\n });\n };\n ToolPanelContextMenu.prototype.addColumnsToList = function (columnList) {\n return __spread(columnList).concat(this.columns.filter(function (col) { return columnList.indexOf(col) === -1; }));\n };\n ToolPanelContextMenu.prototype.removeColumnsFromList = function (columnList) {\n var _this = this;\n return columnList.filter(function (col) { return _this.columns.indexOf(col) === -1; });\n };\n ToolPanelContextMenu.prototype.displayContextMenu = function () {\n var _this = this;\n var eGui = this.getGui();\n var menuList = this.createBean(new AgMenuList());\n var menuItemsMapped = this.getMappedMenuItems();\n var hideFunc = function () { };\n eGui.appendChild(menuList.getGui());\n menuList.addMenuItems(menuItemsMapped);\n menuList.addManagedListener(menuList, AgMenuItemComponent.EVENT_MENU_ITEM_SELECTED, function () {\n _this.parentEl.focus();\n hideFunc();\n });\n var addPopupRes = this.popupService.addPopup({\n modal: true,\n eChild: eGui,\n closeOnEsc: true,\n afterGuiAttached: function () { return _this.focusService.focusInto(menuList.getGui()); },\n ariaLabel: 'Foo',\n closedCallback: function (e) {\n if (e instanceof KeyboardEvent) {\n _this.parentEl.focus();\n }\n _this.destroyBean(menuList);\n }\n });\n if (addPopupRes) {\n hideFunc = addPopupRes.hideFunc;\n }\n this.popupService.positionPopupUnderMouseEvent({\n type: 'columnContextMenu',\n mouseEvent: this.mouseEvent,\n ePopup: eGui\n });\n };\n ToolPanelContextMenu.prototype.isActive = function () {\n return this.allowGrouping || this.allowValues || this.allowPivoting;\n };\n ToolPanelContextMenu.prototype.getMappedMenuItems = function () {\n var e_1, _a;\n var ret = [];\n var _loop_1 = function (val) {\n var isInactive = this_1.columns.some(function (col) { return val.allowedFunction(col) && !val.activeFunction(col); });\n var isActive = this_1.columns.some(function (col) { return val.allowedFunction(col) && val.activeFunction(col); });\n if (isInactive) {\n ret.push({\n name: val.activateLabel(this_1.displayName),\n icon: _.createIconNoSpan(val.addIcon, this_1.gridOptionsWrapper, null),\n action: function () { return val.activateFunction(); }\n });\n }\n if (isActive) {\n ret.push({\n name: val.deactivateLabel(this_1.displayName),\n icon: _.createIconNoSpan(val.removeIcon, this_1.gridOptionsWrapper, null),\n action: function () { return val.deActivateFunction(); }\n });\n }\n };\n var this_1 = this;\n try {\n for (var _b = __values(this.menuItemMap.values()), _c = _b.next(); !_c.done; _c = _b.next()) {\n var val = _c.value;\n _loop_1(val);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return ret;\n };\n __decorate([\n Autowired('columnModel')\n ], ToolPanelContextMenu.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired('popupService')\n ], ToolPanelContextMenu.prototype, \"popupService\", void 0);\n __decorate([\n Autowired('focusService')\n ], ToolPanelContextMenu.prototype, \"focusService\", void 0);\n __decorate([\n PostConstruct\n ], ToolPanelContextMenu.prototype, \"postConstruct\", null);\n return ToolPanelContextMenu;\n}(Component));\nexport { ToolPanelContextMenu };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, AgCheckbox, Autowired, Column, Component, CssClassApplier, DragSourceType, Events, KeyCode, PostConstruct, RefSelector, TouchListener } from \"@ag-grid-community/core\";\nimport { ColumnModelItem } from \"./columnModelItem\";\nimport { ToolPanelContextMenu } from \"./toolPanelContextMenu\";\nvar ToolPanelColumnGroupComp = /** @class */ (function (_super) {\n __extends(ToolPanelColumnGroupComp, _super);\n function ToolPanelColumnGroupComp(modelItem, allowDragging, eventType, focusWrapper) {\n var _this = _super.call(this) || this;\n _this.modelItem = modelItem;\n _this.allowDragging = allowDragging;\n _this.eventType = eventType;\n _this.focusWrapper = focusWrapper;\n _this.processingColumnStateChange = false;\n _this.modelItem = modelItem;\n _this.columnGroup = modelItem.getColumnGroup();\n _this.columnDept = modelItem.getDept();\n _this.allowDragging = allowDragging;\n return _this;\n }\n ToolPanelColumnGroupComp.prototype.init = function () {\n var _this = this;\n this.setTemplate(ToolPanelColumnGroupComp.TEMPLATE);\n this.eDragHandle = _.createIconNoSpan('columnDrag', this.gridOptionsWrapper);\n this.eDragHandle.classList.add('ag-drag-handle', 'ag-column-select-column-group-drag-handle');\n var checkboxGui = this.cbSelect.getGui();\n var checkboxInput = this.cbSelect.getInputElement();\n checkboxGui.insertAdjacentElement('afterend', this.eDragHandle);\n checkboxInput.setAttribute('tabindex', '-1');\n this.displayName = this.columnModel.getDisplayNameForProvidedColumnGroup(null, this.columnGroup, this.eventType);\n if (_.missing(this.displayName)) {\n this.displayName = '>>';\n }\n this.eLabel.innerHTML = this.displayName ? this.displayName : '';\n this.setupExpandContract();\n this.addCssClass('ag-column-select-indent-' + this.columnDept);\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, this.onColumnStateChanged.bind(this));\n this.addManagedListener(this.eLabel, 'click', this.onLabelClicked.bind(this));\n this.addManagedListener(this.cbSelect, AgCheckbox.EVENT_CHANGED, this.onCheckboxChanged.bind(this));\n this.addManagedListener(this.modelItem, ColumnModelItem.EVENT_EXPANDED_CHANGED, this.onExpandChanged.bind(this));\n this.addManagedListener(this.focusWrapper, 'keydown', this.handleKeyDown.bind(this));\n this.addManagedListener(this.focusWrapper, 'contextmenu', this.onContextMenu.bind(this));\n this.setOpenClosedIcons();\n this.setupDragging();\n this.onColumnStateChanged();\n this.addVisibilityListenersToAllChildren();\n this.refreshAriaExpanded();\n this.refreshAriaLabel();\n this.setupTooltip();\n var classes = CssClassApplier.getToolPanelClassesFromColDef(this.columnGroup.getColGroupDef(), this.gridOptionsWrapper, null, this.columnGroup);\n classes.forEach(function (c) { return _this.addOrRemoveCssClass(c, true); });\n };\n ToolPanelColumnGroupComp.prototype.getColumns = function () {\n return this.columnGroup.getLeafColumns();\n };\n ToolPanelColumnGroupComp.prototype.setupTooltip = function () {\n var _this = this;\n var colGroupDef = this.columnGroup.getColGroupDef();\n if (!colGroupDef) {\n return;\n }\n var refresh = function () {\n var newTooltipText = colGroupDef.headerTooltip;\n _this.setTooltip(newTooltipText);\n };\n refresh();\n this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, refresh);\n };\n ToolPanelColumnGroupComp.prototype.getTooltipParams = function () {\n var res = _super.prototype.getTooltipParams.call(this);\n res.location = 'columnToolPanelColumnGroup';\n return res;\n };\n ToolPanelColumnGroupComp.prototype.handleKeyDown = function (e) {\n switch (e.key) {\n case KeyCode.LEFT:\n e.preventDefault();\n this.modelItem.setExpanded(false);\n break;\n case KeyCode.RIGHT:\n e.preventDefault();\n this.modelItem.setExpanded(true);\n break;\n case KeyCode.SPACE:\n e.preventDefault();\n if (this.isSelectable()) {\n this.onSelectAllChanged(!this.isSelected());\n }\n break;\n }\n };\n ToolPanelColumnGroupComp.prototype.onContextMenu = function (e) {\n var _this = this;\n var _a = this, columnGroup = _a.columnGroup, gridOptionsWrapper = _a.gridOptionsWrapper;\n if (gridOptionsWrapper.isFunctionsReadOnly()) {\n return;\n }\n var contextMenu = this.createBean(new ToolPanelContextMenu(columnGroup, e, this.focusWrapper));\n this.addDestroyFunc(function () {\n if (contextMenu.isAlive()) {\n _this.destroyBean(contextMenu);\n }\n });\n };\n ToolPanelColumnGroupComp.prototype.addVisibilityListenersToAllChildren = function () {\n var _this = this;\n this.columnGroup.getLeafColumns().forEach(function (column) {\n _this.addManagedListener(column, Column.EVENT_VISIBLE_CHANGED, _this.onColumnStateChanged.bind(_this));\n _this.addManagedListener(column, Column.EVENT_VALUE_CHANGED, _this.onColumnStateChanged.bind(_this));\n _this.addManagedListener(column, Column.EVENT_PIVOT_CHANGED, _this.onColumnStateChanged.bind(_this));\n _this.addManagedListener(column, Column.EVENT_ROW_GROUP_CHANGED, _this.onColumnStateChanged.bind(_this));\n });\n };\n ToolPanelColumnGroupComp.prototype.setupDragging = function () {\n var _this = this;\n if (!this.allowDragging) {\n _.setDisplayed(this.eDragHandle, false);\n return;\n }\n var dragSource = {\n type: DragSourceType.ToolPanel,\n eElement: this.eDragHandle,\n dragItemName: this.displayName,\n getDragItem: function () { return _this.createDragItem(); },\n onDragStarted: function () {\n var event = {\n type: Events.EVENT_COLUMN_PANEL_ITEM_DRAG_START,\n column: _this.columnGroup\n };\n _this.eventService.dispatchEvent(event);\n },\n onDragStopped: function () {\n var event = {\n type: Events.EVENT_COLUMN_PANEL_ITEM_DRAG_END\n };\n _this.eventService.dispatchEvent(event);\n }\n };\n this.dragAndDropService.addDragSource(dragSource, true);\n this.addDestroyFunc(function () { return _this.dragAndDropService.removeDragSource(dragSource); });\n };\n ToolPanelColumnGroupComp.prototype.createDragItem = function () {\n var visibleState = {};\n this.columnGroup.getLeafColumns().forEach(function (col) {\n visibleState[col.getId()] = col.isVisible();\n });\n return {\n columns: this.columnGroup.getLeafColumns(),\n visibleState: visibleState\n };\n };\n ToolPanelColumnGroupComp.prototype.setupExpandContract = function () {\n this.eGroupClosedIcon.appendChild(_.createIcon('columnSelectClosed', this.gridOptionsWrapper, null));\n this.eGroupOpenedIcon.appendChild(_.createIcon('columnSelectOpen', this.gridOptionsWrapper, null));\n this.addManagedListener(this.eGroupClosedIcon, 'click', this.onExpandOrContractClicked.bind(this));\n this.addManagedListener(this.eGroupOpenedIcon, 'click', this.onExpandOrContractClicked.bind(this));\n var touchListener = new TouchListener(this.eColumnGroupIcons, true);\n this.addManagedListener(touchListener, TouchListener.EVENT_TAP, this.onExpandOrContractClicked.bind(this));\n this.addDestroyFunc(touchListener.destroy.bind(touchListener));\n };\n ToolPanelColumnGroupComp.prototype.onLabelClicked = function () {\n var nextState = !this.cbSelect.getValue();\n this.onChangeCommon(nextState);\n };\n ToolPanelColumnGroupComp.prototype.onCheckboxChanged = function (event) {\n this.onChangeCommon(event.selected);\n };\n ToolPanelColumnGroupComp.prototype.getVisibleLeafColumns = function () {\n var childColumns = [];\n var extractCols = function (children) {\n children.forEach(function (child) {\n if (!child.isPassesFilter()) {\n return;\n }\n if (child.isGroup()) {\n extractCols(child.getChildren());\n }\n else {\n childColumns.push(child.getColumn());\n }\n });\n };\n extractCols(this.modelItem.getChildren());\n return childColumns;\n };\n ToolPanelColumnGroupComp.prototype.onChangeCommon = function (nextState) {\n this.refreshAriaLabel();\n if (this.processingColumnStateChange) {\n return;\n }\n this.modelItemUtils.selectAllChildren(this.modelItem.getChildren(), nextState, this.eventType);\n };\n ToolPanelColumnGroupComp.prototype.refreshAriaLabel = function () {\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n var columnLabel = translate('ariaColumnGroup', 'Column Group');\n var state = this.cbSelect.getValue() ? translate('ariaVisible', 'visible') : translate('ariaHidden', 'hidden');\n var visibilityLabel = translate('ariaToggleVisibility', 'Press SPACE to toggle visibility');\n _.setAriaLabel(this.focusWrapper, this.displayName + \" \" + columnLabel);\n this.cbSelect.setInputAriaLabel(visibilityLabel + \" (\" + state + \")\");\n _.setAriaDescribedBy(this.focusWrapper, this.cbSelect.getInputElement().id);\n };\n ToolPanelColumnGroupComp.prototype.onColumnStateChanged = function () {\n var selectedValue = this.workOutSelectedValue();\n var readOnlyValue = this.workOutReadOnlyValue();\n this.processingColumnStateChange = true;\n this.cbSelect.setValue(selectedValue);\n this.cbSelect.setReadOnly(readOnlyValue);\n this.addOrRemoveCssClass('ag-column-select-column-group-readonly', readOnlyValue);\n this.processingColumnStateChange = false;\n };\n ToolPanelColumnGroupComp.prototype.workOutSelectedValue = function () {\n var _this = this;\n var pivotMode = this.columnModel.isPivotMode();\n var visibleLeafColumns = this.getVisibleLeafColumns();\n var checkedCount = 0;\n var uncheckedCount = 0;\n visibleLeafColumns.forEach(function (column) {\n if (!pivotMode && column.getColDef().lockVisible) {\n return;\n }\n if (_this.isColumnChecked(column, pivotMode)) {\n checkedCount++;\n }\n else {\n uncheckedCount++;\n }\n });\n if (checkedCount > 0 && uncheckedCount > 0) {\n return undefined;\n }\n return checkedCount > 0;\n };\n ToolPanelColumnGroupComp.prototype.workOutReadOnlyValue = function () {\n var pivotMode = this.columnModel.isPivotMode();\n var colsThatCanAction = 0;\n this.columnGroup.getLeafColumns().forEach(function (col) {\n if (pivotMode) {\n if (col.isAnyFunctionAllowed()) {\n colsThatCanAction++;\n }\n }\n else {\n if (!col.getColDef().lockVisible) {\n colsThatCanAction++;\n }\n }\n });\n return colsThatCanAction === 0;\n };\n ToolPanelColumnGroupComp.prototype.isColumnChecked = function (column, pivotMode) {\n if (pivotMode) {\n var pivoted = column.isPivotActive();\n var grouped = column.isRowGroupActive();\n var aggregated = column.isValueActive();\n return pivoted || grouped || aggregated;\n }\n return column.isVisible();\n };\n ToolPanelColumnGroupComp.prototype.onExpandOrContractClicked = function () {\n var oldState = this.modelItem.isExpanded();\n this.modelItem.setExpanded(!oldState);\n };\n ToolPanelColumnGroupComp.prototype.onExpandChanged = function () {\n this.setOpenClosedIcons();\n this.refreshAriaExpanded();\n };\n ToolPanelColumnGroupComp.prototype.setOpenClosedIcons = function () {\n var folderOpen = this.modelItem.isExpanded();\n _.setDisplayed(this.eGroupClosedIcon, !folderOpen);\n _.setDisplayed(this.eGroupOpenedIcon, folderOpen);\n };\n ToolPanelColumnGroupComp.prototype.refreshAriaExpanded = function () {\n _.setAriaExpanded(this.focusWrapper, this.modelItem.isExpanded());\n };\n ToolPanelColumnGroupComp.prototype.getDisplayName = function () {\n return this.displayName;\n };\n ToolPanelColumnGroupComp.prototype.onSelectAllChanged = function (value) {\n var cbValue = this.cbSelect.getValue();\n var readOnly = this.cbSelect.isReadOnly();\n if (!readOnly && ((value && !cbValue) || (!value && cbValue))) {\n this.cbSelect.toggle();\n }\n };\n ToolPanelColumnGroupComp.prototype.isSelected = function () {\n return this.cbSelect.getValue();\n };\n ToolPanelColumnGroupComp.prototype.isSelectable = function () {\n return !this.cbSelect.isReadOnly();\n };\n ToolPanelColumnGroupComp.prototype.setSelected = function (selected) {\n this.cbSelect.setValue(selected, true);\n };\n ToolPanelColumnGroupComp.TEMPLATE = \"
\\n \\n \\n \\n \\n \\n \\n
\";\n __decorate([\n Autowired('columnModel')\n ], ToolPanelColumnGroupComp.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired('dragAndDropService')\n ], ToolPanelColumnGroupComp.prototype, \"dragAndDropService\", void 0);\n __decorate([\n Autowired('modelItemUtils')\n ], ToolPanelColumnGroupComp.prototype, \"modelItemUtils\", void 0);\n __decorate([\n RefSelector('cbSelect')\n ], ToolPanelColumnGroupComp.prototype, \"cbSelect\", void 0);\n __decorate([\n RefSelector('eLabel')\n ], ToolPanelColumnGroupComp.prototype, \"eLabel\", void 0);\n __decorate([\n RefSelector('eGroupOpenedIcon')\n ], ToolPanelColumnGroupComp.prototype, \"eGroupOpenedIcon\", void 0);\n __decorate([\n RefSelector('eGroupClosedIcon')\n ], ToolPanelColumnGroupComp.prototype, \"eGroupClosedIcon\", void 0);\n __decorate([\n RefSelector('eColumnGroupIcons')\n ], ToolPanelColumnGroupComp.prototype, \"eColumnGroupIcons\", void 0);\n __decorate([\n PostConstruct\n ], ToolPanelColumnGroupComp.prototype, \"init\", null);\n return ToolPanelColumnGroupComp;\n}(Component));\nexport { ToolPanelColumnGroupComp };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AutoScrollService, Autowired, BeanStub, DragAndDropService, DragSourceType, Events, ProvidedColumnGroup, PostConstruct, _ } from \"@ag-grid-community/core\";\nimport { ToolPanelColumnGroupComp } from \"./toolPanelColumnGroupComp\";\nvar PRIMARY_COLS_LIST_ITEM_HOVERED = 'ag-list-item-hovered';\nvar PrimaryColsListPanelItemDragFeature = /** @class */ (function (_super) {\n __extends(PrimaryColsListPanelItemDragFeature, _super);\n function PrimaryColsListPanelItemDragFeature(comp, virtualList) {\n var _this = _super.call(this) || this;\n _this.comp = comp;\n _this.virtualList = virtualList;\n _this.currentDragColumn = null;\n _this.lastHoveredColumnItem = null;\n return _this;\n }\n PrimaryColsListPanelItemDragFeature.prototype.postConstruct = function () {\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PANEL_ITEM_DRAG_START, this.columnPanelItemDragStart.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PANEL_ITEM_DRAG_END, this.columnPanelItemDragEnd.bind(this));\n this.createDropTarget();\n this.createAutoScrollService();\n };\n PrimaryColsListPanelItemDragFeature.prototype.columnPanelItemDragStart = function (_a) {\n var column = _a.column;\n this.currentDragColumn = column;\n var currentColumns = this.getCurrentColumns();\n var hasNotMovable = currentColumns.find(function (col) {\n var colDef = col.getColDef();\n return !!colDef.suppressMovable || !!colDef.lockPosition;\n });\n if (hasNotMovable) {\n this.moveBlocked = true;\n }\n };\n PrimaryColsListPanelItemDragFeature.prototype.columnPanelItemDragEnd = function () {\n var _this = this;\n window.setTimeout(function () {\n _this.currentDragColumn = null;\n _this.moveBlocked = false;\n }, 10);\n };\n PrimaryColsListPanelItemDragFeature.prototype.createDropTarget = function () {\n var _this = this;\n var dropTarget = {\n isInterestedIn: function (type) { return type === DragSourceType.ToolPanel; },\n getIconName: function () { return DragAndDropService[_this.moveBlocked ? 'ICON_NOT_ALLOWED' : 'ICON_MOVE']; },\n getContainer: function () { return _this.comp.getGui(); },\n onDragging: function (e) { return _this.onDragging(e); },\n onDragStop: function () { return _this.onDragStop(); },\n onDragLeave: function () { return _this.onDragLeave(); }\n };\n this.dragAndDropService.addDropTarget(dropTarget);\n };\n PrimaryColsListPanelItemDragFeature.prototype.createAutoScrollService = function () {\n var virtualListGui = this.virtualList.getGui();\n this.autoScrollService = new AutoScrollService({\n scrollContainer: virtualListGui,\n scrollAxis: 'y',\n getVerticalPosition: function () { return virtualListGui.scrollTop; },\n setVerticalPosition: function (position) { return virtualListGui.scrollTop = position; }\n });\n };\n PrimaryColsListPanelItemDragFeature.prototype.onDragging = function (e) {\n if (!this.currentDragColumn || this.moveBlocked) {\n return;\n }\n var hoveredColumnItem = this.getDragColumnItem(e);\n var comp = this.virtualList.getComponentAt(hoveredColumnItem.rowIndex);\n if (!comp) {\n return;\n }\n var el = comp.getGui().parentElement;\n if (this.lastHoveredColumnItem &&\n this.lastHoveredColumnItem.rowIndex === hoveredColumnItem.rowIndex &&\n this.lastHoveredColumnItem.position === hoveredColumnItem.position) {\n return;\n }\n this.autoScrollService.check(e.event);\n this.clearHoveredItems();\n this.lastHoveredColumnItem = hoveredColumnItem;\n _.radioCssClass(el, \"\" + PRIMARY_COLS_LIST_ITEM_HOVERED);\n _.radioCssClass(el, \"ag-item-highlight-\" + hoveredColumnItem.position);\n };\n PrimaryColsListPanelItemDragFeature.prototype.getDragColumnItem = function (e) {\n var virtualListGui = this.virtualList.getGui();\n var paddingTop = parseFloat(window.getComputedStyle(virtualListGui).paddingTop);\n var rowHeight = this.virtualList.getRowHeight();\n var scrollTop = this.virtualList.getScrollTop();\n var rowIndex = Math.max(0, (e.y - paddingTop + scrollTop) / rowHeight);\n var maxLen = this.comp.getDisplayedColsList().length - 1;\n var normalizedRowIndex = Math.min(maxLen, rowIndex) | 0;\n return {\n rowIndex: normalizedRowIndex,\n position: (Math.round(rowIndex) > rowIndex || rowIndex > maxLen) ? 'bottom' : 'top',\n component: this.virtualList.getComponentAt(normalizedRowIndex)\n };\n };\n PrimaryColsListPanelItemDragFeature.prototype.onDragStop = function () {\n if (this.moveBlocked) {\n return;\n }\n var targetIndex = this.getTargetIndex();\n var columnsToMove = this.getCurrentColumns();\n if (targetIndex != null) {\n this.columnModel.moveColumns(columnsToMove, targetIndex);\n }\n this.clearHoveredItems();\n this.autoScrollService.ensureCleared();\n };\n PrimaryColsListPanelItemDragFeature.prototype.getMoveDiff = function (end) {\n var allColumns = this.columnModel.getAllGridColumns();\n var currentColumns = this.getCurrentColumns();\n var currentColumn = currentColumns[0];\n var span = currentColumns.length;\n var currentIndex = allColumns.indexOf(currentColumn);\n if (currentIndex < end) {\n return span;\n }\n return 0;\n };\n PrimaryColsListPanelItemDragFeature.prototype.getCurrentColumns = function () {\n if (this.currentDragColumn instanceof ProvidedColumnGroup) {\n return this.currentDragColumn.getLeafColumns();\n }\n return [this.currentDragColumn];\n };\n PrimaryColsListPanelItemDragFeature.prototype.getTargetIndex = function () {\n if (!this.lastHoveredColumnItem) {\n return null;\n }\n var columnItemComponent = this.lastHoveredColumnItem.component;\n var isBefore = this.lastHoveredColumnItem.position === 'top';\n var targetColumn;\n if (columnItemComponent instanceof ToolPanelColumnGroupComp) {\n var columns = columnItemComponent.getColumns();\n targetColumn = columns[0];\n isBefore = true;\n }\n else {\n targetColumn = columnItemComponent.getColumn();\n }\n var targetColumnIndex = this.columnModel.getAllGridColumns().indexOf(targetColumn);\n var adjustedTarget = isBefore ? targetColumnIndex : targetColumnIndex + 1;\n var diff = this.getMoveDiff(adjustedTarget);\n return adjustedTarget - diff;\n };\n PrimaryColsListPanelItemDragFeature.prototype.onDragLeave = function () {\n this.clearHoveredItems();\n this.autoScrollService.ensureCleared();\n };\n PrimaryColsListPanelItemDragFeature.prototype.clearHoveredItems = function () {\n var virtualListGui = this.virtualList.getGui();\n virtualListGui.querySelectorAll(\".\" + PRIMARY_COLS_LIST_ITEM_HOVERED).forEach(function (el) {\n [\n PRIMARY_COLS_LIST_ITEM_HOVERED,\n 'ag-item-highlight-top',\n 'ag-item-highlight-bottom'\n ].forEach(function (cls) {\n el.classList.remove(cls);\n });\n });\n this.lastHoveredColumnItem = null;\n };\n __decorate([\n Autowired('columnModel')\n ], PrimaryColsListPanelItemDragFeature.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired('dragAndDropService')\n ], PrimaryColsListPanelItemDragFeature.prototype, \"dragAndDropService\", void 0);\n __decorate([\n PostConstruct\n ], PrimaryColsListPanelItemDragFeature.prototype, \"postConstruct\", null);\n return PrimaryColsListPanelItemDragFeature;\n}(BeanStub));\nexport { PrimaryColsListPanelItemDragFeature };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, AgCheckbox, Autowired, Column, Component, CssClassApplier, DragSourceType, Events, KeyCode, PostConstruct, RefSelector } from \"@ag-grid-community/core\";\nimport { ToolPanelContextMenu } from \"./toolPanelContextMenu\";\nvar ToolPanelColumnComp = /** @class */ (function (_super) {\n __extends(ToolPanelColumnComp, _super);\n function ToolPanelColumnComp(column, columnDept, allowDragging, groupsExist, focusWrapper) {\n var _this = _super.call(this) || this;\n _this.column = column;\n _this.columnDept = columnDept;\n _this.allowDragging = allowDragging;\n _this.groupsExist = groupsExist;\n _this.focusWrapper = focusWrapper;\n _this.processingColumnStateChange = false;\n return _this;\n }\n ToolPanelColumnComp.prototype.init = function () {\n var _this = this;\n this.setTemplate(ToolPanelColumnComp.TEMPLATE);\n this.eDragHandle = _.createIconNoSpan('columnDrag', this.gridOptionsWrapper);\n this.eDragHandle.classList.add('ag-drag-handle', 'ag-column-select-column-drag-handle');\n var checkboxGui = this.cbSelect.getGui();\n var checkboxInput = this.cbSelect.getInputElement();\n checkboxGui.insertAdjacentElement('afterend', this.eDragHandle);\n checkboxInput.setAttribute('tabindex', '-1');\n this.displayName = this.columnModel.getDisplayNameForColumn(this.column, 'columnToolPanel');\n var displayNameSanitised = _.escapeString(this.displayName);\n this.eLabel.innerHTML = displayNameSanitised;\n // if grouping, we add an extra level of indent, to cater for expand/contract icons we need to indent for\n var indent = this.columnDept;\n if (this.groupsExist) {\n this.addCssClass('ag-column-select-add-group-indent');\n }\n this.addCssClass(\"ag-column-select-indent-\" + indent);\n this.setupDragging();\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, this.onColumnStateChanged.bind(this));\n this.addManagedListener(this.column, Column.EVENT_VALUE_CHANGED, this.onColumnStateChanged.bind(this));\n this.addManagedListener(this.column, Column.EVENT_PIVOT_CHANGED, this.onColumnStateChanged.bind(this));\n this.addManagedListener(this.column, Column.EVENT_ROW_GROUP_CHANGED, this.onColumnStateChanged.bind(this));\n this.addManagedListener(this.column, Column.EVENT_VISIBLE_CHANGED, this.onColumnStateChanged.bind(this));\n this.addManagedListener(this.focusWrapper, 'keydown', this.handleKeyDown.bind(this));\n this.addManagedListener(this.focusWrapper, 'contextmenu', this.onContextMenu.bind(this));\n this.addManagedListener(this.gridOptionsWrapper, 'functionsReadOnly', this.onColumnStateChanged.bind(this));\n this.addManagedListener(this.cbSelect, AgCheckbox.EVENT_CHANGED, this.onCheckboxChanged.bind(this));\n this.addManagedListener(this.eLabel, 'click', this.onLabelClicked.bind(this));\n this.onColumnStateChanged();\n this.refreshAriaLabel();\n this.setupTooltip();\n var classes = CssClassApplier.getToolPanelClassesFromColDef(this.column.getColDef(), this.gridOptionsWrapper, this.column, null);\n classes.forEach(function (c) { return _this.addOrRemoveCssClass(c, true); });\n };\n ToolPanelColumnComp.prototype.getColumn = function () {\n return this.column;\n };\n ToolPanelColumnComp.prototype.setupTooltip = function () {\n var _this = this;\n var refresh = function () {\n var newTooltipText = _this.column.getColDef().headerTooltip;\n _this.setTooltip(newTooltipText);\n };\n refresh();\n this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, refresh);\n };\n ToolPanelColumnComp.prototype.getTooltipParams = function () {\n var res = _super.prototype.getTooltipParams.call(this);\n res.location = 'columnToolPanelColumn';\n res.colDef = this.column.getColDef();\n return res;\n };\n ToolPanelColumnComp.prototype.onContextMenu = function (e) {\n var _this = this;\n var _a = this, column = _a.column, gridOptionsWrapper = _a.gridOptionsWrapper;\n if (gridOptionsWrapper.isFunctionsReadOnly()) {\n return;\n }\n var contextMenu = this.createBean(new ToolPanelContextMenu(column, e, this.focusWrapper));\n this.addDestroyFunc(function () {\n if (contextMenu.isAlive()) {\n _this.destroyBean(contextMenu);\n }\n });\n };\n ToolPanelColumnComp.prototype.handleKeyDown = function (e) {\n if (e.key === KeyCode.SPACE) {\n e.preventDefault();\n if (this.isSelectable()) {\n this.onSelectAllChanged(!this.isSelected());\n }\n }\n };\n ToolPanelColumnComp.prototype.onLabelClicked = function () {\n if (this.gridOptionsWrapper.isFunctionsReadOnly()) {\n return;\n }\n var nextState = !this.cbSelect.getValue();\n this.onChangeCommon(nextState);\n };\n ToolPanelColumnComp.prototype.onCheckboxChanged = function (event) {\n this.onChangeCommon(event.selected);\n };\n ToolPanelColumnComp.prototype.onChangeCommon = function (nextState) {\n // ignore lock visible columns\n if (this.cbSelect.isReadOnly()) {\n return;\n }\n this.refreshAriaLabel();\n // only want to action if the user clicked the checkbox, not if we are setting the checkbox because\n // of a change in the model\n if (this.processingColumnStateChange) {\n return;\n }\n this.modelItemUtils.setColumn(this.column, nextState, 'toolPanelUi');\n };\n ToolPanelColumnComp.prototype.refreshAriaLabel = function () {\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n var columnLabel = translate('ariaColumn', 'Column');\n var state = this.cbSelect.getValue() ? translate('ariaVisible', 'visible') : translate('ariaHidden', 'hidden');\n var visibilityLabel = translate('ariaToggleVisibility', 'Press SPACE to toggle visibility');\n _.setAriaLabel(this.focusWrapper, this.displayName + \" \" + columnLabel);\n this.cbSelect.setInputAriaLabel(visibilityLabel + \" (\" + state + \")\");\n _.setAriaDescribedBy(this.focusWrapper, this.cbSelect.getInputElement().id);\n };\n ToolPanelColumnComp.prototype.setupDragging = function () {\n var _this = this;\n if (!this.allowDragging) {\n _.setDisplayed(this.eDragHandle, false);\n return;\n }\n var dragSource = {\n type: DragSourceType.ToolPanel,\n eElement: this.eDragHandle,\n dragItemName: this.displayName,\n getDragItem: function () { return _this.createDragItem(); },\n onDragStarted: function () {\n var event = {\n type: Events.EVENT_COLUMN_PANEL_ITEM_DRAG_START,\n column: _this.column\n };\n _this.eventService.dispatchEvent(event);\n },\n onDragStopped: function () {\n var event = {\n type: Events.EVENT_COLUMN_PANEL_ITEM_DRAG_END\n };\n _this.eventService.dispatchEvent(event);\n }\n };\n this.dragAndDropService.addDragSource(dragSource, true);\n this.addDestroyFunc(function () { return _this.dragAndDropService.removeDragSource(dragSource); });\n };\n ToolPanelColumnComp.prototype.createDragItem = function () {\n var visibleState = {};\n visibleState[this.column.getId()] = this.column.isVisible();\n return {\n columns: [this.column],\n visibleState: visibleState\n };\n };\n ToolPanelColumnComp.prototype.onColumnStateChanged = function () {\n this.processingColumnStateChange = true;\n var isPivotMode = this.columnModel.isPivotMode();\n if (isPivotMode) {\n // if reducing, checkbox means column is one of pivot, value or group\n var anyFunctionActive = this.column.isAnyFunctionActive();\n this.cbSelect.setValue(anyFunctionActive);\n }\n else {\n // if not reducing, the checkbox tells us if column is visible or not\n this.cbSelect.setValue(this.column.isVisible());\n }\n var canBeToggled = true;\n var canBeDragged = true;\n if (isPivotMode) {\n // when in pivot mode, the item should be read only if:\n // a) gui is not allowed make any changes\n var functionsReadOnly = this.gridOptionsWrapper.isFunctionsReadOnly();\n // b) column is not allow any functions on it\n var noFunctionsAllowed = !this.column.isAnyFunctionAllowed();\n canBeToggled = !functionsReadOnly && !noFunctionsAllowed;\n canBeDragged = canBeToggled;\n }\n else {\n var _a = this.column.getColDef(), enableRowGroup = _a.enableRowGroup, enableValue = _a.enableValue, lockPosition = _a.lockPosition, suppressMovable = _a.suppressMovable, lockVisible = _a.lockVisible;\n var forceDraggable = !!enableRowGroup || !!enableValue;\n var disableDraggable = !!lockPosition || !!suppressMovable;\n canBeToggled = !lockVisible;\n canBeDragged = forceDraggable || !disableDraggable;\n }\n this.cbSelect.setReadOnly(!canBeToggled);\n this.eDragHandle.classList.toggle('ag-column-select-column-readonly', !canBeDragged);\n this.addOrRemoveCssClass('ag-column-select-column-readonly', !canBeDragged && !canBeToggled);\n var checkboxPassive = isPivotMode && this.gridOptionsWrapper.isFunctionsPassive();\n this.cbSelect.setPassive(checkboxPassive);\n this.processingColumnStateChange = false;\n };\n ToolPanelColumnComp.prototype.getDisplayName = function () {\n return this.displayName;\n };\n ToolPanelColumnComp.prototype.onSelectAllChanged = function (value) {\n if (value !== this.cbSelect.getValue()) {\n if (!this.cbSelect.isReadOnly()) {\n this.cbSelect.toggle();\n }\n }\n };\n ToolPanelColumnComp.prototype.isSelected = function () {\n return this.cbSelect.getValue();\n };\n ToolPanelColumnComp.prototype.isSelectable = function () {\n return !this.cbSelect.isReadOnly();\n };\n ToolPanelColumnComp.prototype.isExpandable = function () {\n return false;\n };\n ToolPanelColumnComp.prototype.setExpanded = function (value) {\n console.warn('AG Grid: can not expand a column item that does not represent a column group header');\n };\n ToolPanelColumnComp.TEMPLATE = \"
\\n \\n \\n
\";\n __decorate([\n Autowired('columnModel')\n ], ToolPanelColumnComp.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired('dragAndDropService')\n ], ToolPanelColumnComp.prototype, \"dragAndDropService\", void 0);\n __decorate([\n Autowired('modelItemUtils')\n ], ToolPanelColumnComp.prototype, \"modelItemUtils\", void 0);\n __decorate([\n RefSelector('eLabel')\n ], ToolPanelColumnComp.prototype, \"eLabel\", void 0);\n __decorate([\n RefSelector('cbSelect')\n ], ToolPanelColumnComp.prototype, \"cbSelect\", void 0);\n __decorate([\n PostConstruct\n ], ToolPanelColumnComp.prototype, \"init\", null);\n return ToolPanelColumnComp;\n}(Component));\nexport { ToolPanelColumnComp };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, Component, Events, ProvidedColumnGroup, VirtualList, PreDestroy } from \"@ag-grid-community/core\";\nimport { PrimaryColsListPanelItemDragFeature } from './primaryColsListPanelItemDragFeature';\nimport { ToolPanelColumnGroupComp } from \"./toolPanelColumnGroupComp\";\nimport { ToolPanelColumnComp } from \"./toolPanelColumnComp\";\nimport { ExpandState } from \"./primaryColsHeaderPanel\";\nimport { ColumnModelItem } from \"./columnModelItem\";\nvar UIColumnModel = /** @class */ (function () {\n function UIColumnModel(items) {\n this.items = items;\n }\n UIColumnModel.prototype.getRowCount = function () {\n return this.items.length;\n };\n UIColumnModel.prototype.getRow = function (index) {\n return this.items[index];\n };\n return UIColumnModel;\n}());\nvar PRIMARY_COLS_LIST_PANEL_CLASS = 'ag-column-select-list';\nvar PrimaryColsListPanel = /** @class */ (function (_super) {\n __extends(PrimaryColsListPanel, _super);\n function PrimaryColsListPanel() {\n var _this = _super.call(this, PrimaryColsListPanel.TEMPLATE) || this;\n _this.destroyColumnItemFuncs = [];\n return _this;\n }\n PrimaryColsListPanel.prototype.destroyColumnTree = function () {\n this.allColsTree = [];\n this.destroyColumnItemFuncs.forEach(function (f) { return f(); });\n this.destroyColumnItemFuncs = [];\n };\n PrimaryColsListPanel.prototype.init = function (params, allowDragging, eventType) {\n var _this = this;\n this.params = params;\n this.allowDragging = allowDragging;\n this.eventType = eventType;\n if (!this.params.suppressSyncLayoutWithGrid) {\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_MOVED, this.onColumnsChanged.bind(this));\n }\n this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.onColumnsChanged.bind(this));\n var eventsImpactingCheckedState = [\n Events.EVENT_COLUMN_PIVOT_CHANGED,\n Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,\n Events.EVENT_COLUMN_ROW_GROUP_CHANGED,\n Events.EVENT_COLUMN_VALUE_CHANGED,\n Events.EVENT_COLUMN_VISIBLE,\n Events.EVENT_NEW_COLUMNS_LOADED\n ];\n eventsImpactingCheckedState.forEach(function (event) {\n // update header select all checkbox with current selection state\n _this.addManagedListener(_this.eventService, event, _this.fireSelectionChangedEvent.bind(_this));\n });\n this.expandGroupsByDefault = !this.params.contractColumnSelection;\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n var columnListName = translate('ariaColumnList', 'Column List');\n this.virtualList = this.createManagedBean(new VirtualList('column-select', 'tree', columnListName));\n this.appendChild(this.virtualList.getGui());\n this.virtualList.setComponentCreator(function (item, listItemElement) {\n _.setAriaLevel(listItemElement, (item.getDept() + 1));\n return _this.createComponentFromItem(item, listItemElement);\n });\n if (this.columnModel.isReady()) {\n this.onColumnsChanged();\n }\n if (!params.suppressColumnMove && !this.gridOptionsWrapper.isSuppressMovableColumns()) {\n this.createManagedBean(new PrimaryColsListPanelItemDragFeature(this, this.virtualList));\n }\n };\n PrimaryColsListPanel.prototype.createComponentFromItem = function (item, listItemElement) {\n if (item.isGroup()) {\n var renderedGroup = new ToolPanelColumnGroupComp(item, this.allowDragging, this.eventType, listItemElement);\n this.getContext().createBean(renderedGroup);\n return renderedGroup;\n }\n var columnComp = new ToolPanelColumnComp(item.getColumn(), item.getDept(), this.allowDragging, this.groupsExist, listItemElement);\n this.getContext().createBean(columnComp);\n return columnComp;\n };\n PrimaryColsListPanel.prototype.onColumnsChanged = function () {\n var expandedStates = this.getExpandedStates();\n var pivotModeActive = this.columnModel.isPivotMode();\n var shouldSyncColumnLayoutWithGrid = !this.params.suppressSyncLayoutWithGrid && !pivotModeActive;\n if (shouldSyncColumnLayoutWithGrid) {\n this.buildTreeFromWhatGridIsDisplaying();\n }\n else {\n this.buildTreeFromProvidedColumnDefs();\n }\n this.setExpandedStates(expandedStates);\n this.markFilteredColumns();\n this.flattenAndFilterModel();\n };\n PrimaryColsListPanel.prototype.getDisplayedColsList = function () {\n return this.displayedColsList;\n };\n PrimaryColsListPanel.prototype.getExpandedStates = function () {\n if (!this.allColsTree) {\n return {};\n }\n var res = {};\n this.forEachItem(function (item) {\n if (!item.isGroup()) {\n return;\n }\n var colGroup = item.getColumnGroup();\n if (colGroup) { // group should always exist, this is defensive\n res[colGroup.getId()] = item.isExpanded();\n }\n });\n return res;\n };\n PrimaryColsListPanel.prototype.setExpandedStates = function (states) {\n if (!this.allColsTree) {\n return;\n }\n this.forEachItem(function (item) {\n if (!item.isGroup()) {\n return;\n }\n var colGroup = item.getColumnGroup();\n if (colGroup) { // group should always exist, this is defensive\n var expanded = states[colGroup.getId()];\n var groupExistedLastTime = expanded != null;\n if (groupExistedLastTime) {\n item.setExpanded(expanded);\n }\n }\n });\n };\n PrimaryColsListPanel.prototype.buildTreeFromWhatGridIsDisplaying = function () {\n this.colDefService.syncLayoutWithGrid(this.setColumnLayout.bind(this));\n };\n PrimaryColsListPanel.prototype.setColumnLayout = function (colDefs) {\n var columnTree = this.colDefService.createColumnTree(colDefs);\n this.buildListModel(columnTree);\n // using col defs to check if groups exist as it could be a custom layout\n this.groupsExist = colDefs.some(function (colDef) {\n return colDef && typeof colDef.children !== 'undefined';\n });\n this.markFilteredColumns();\n this.flattenAndFilterModel();\n };\n PrimaryColsListPanel.prototype.buildTreeFromProvidedColumnDefs = function () {\n // add column / group comps to tool panel\n this.buildListModel(this.columnModel.getPrimaryColumnTree());\n this.groupsExist = this.columnModel.isPrimaryColumnGroupsPresent();\n };\n PrimaryColsListPanel.prototype.buildListModel = function (columnTree) {\n var _this = this;\n var columnExpandedListener = this.onColumnExpanded.bind(this);\n var addListeners = function (item) {\n item.addEventListener(ColumnModelItem.EVENT_EXPANDED_CHANGED, columnExpandedListener);\n var removeFunc = item.removeEventListener.bind(item, ColumnModelItem.EVENT_EXPANDED_CHANGED, columnExpandedListener);\n _this.destroyColumnItemFuncs.push(removeFunc);\n };\n var recursivelyBuild = function (tree, dept, parentList) {\n tree.forEach(function (child) {\n if (child instanceof ProvidedColumnGroup) {\n createGroupItem(child, dept, parentList);\n }\n else {\n createColumnItem(child, dept, parentList);\n }\n });\n };\n var createGroupItem = function (columnGroup, dept, parentList) {\n var columnGroupDef = columnGroup.getColGroupDef();\n var skipThisGroup = columnGroupDef && columnGroupDef.suppressColumnsToolPanel;\n if (skipThisGroup) {\n return;\n }\n if (columnGroup.isPadding()) {\n recursivelyBuild(columnGroup.getChildren(), dept, parentList);\n return;\n }\n var displayName = _this.columnModel.getDisplayNameForProvidedColumnGroup(null, columnGroup, _this.eventType);\n var item = new ColumnModelItem(displayName, columnGroup, dept, true, _this.expandGroupsByDefault);\n parentList.push(item);\n addListeners(item);\n recursivelyBuild(columnGroup.getChildren(), dept + 1, item.getChildren());\n };\n var createColumnItem = function (column, dept, parentList) {\n var skipThisColumn = column.getColDef() && column.getColDef().suppressColumnsToolPanel;\n if (skipThisColumn) {\n return;\n }\n var displayName = _this.columnModel.getDisplayNameForColumn(column, 'columnToolPanel');\n parentList.push(new ColumnModelItem(displayName, column, dept));\n };\n this.destroyColumnTree();\n recursivelyBuild(columnTree, 0, this.allColsTree);\n };\n PrimaryColsListPanel.prototype.onColumnExpanded = function () {\n this.flattenAndFilterModel();\n };\n PrimaryColsListPanel.prototype.flattenAndFilterModel = function () {\n var _this = this;\n this.displayedColsList = [];\n var recursiveFunc = function (item) {\n if (!item.isPassesFilter()) {\n return;\n }\n _this.displayedColsList.push(item);\n if (item.isGroup() && item.isExpanded()) {\n item.getChildren().forEach(recursiveFunc);\n }\n };\n this.allColsTree.forEach(recursiveFunc);\n this.virtualList.setModel(new UIColumnModel(this.displayedColsList));\n var focusedRow = this.virtualList.getLastFocusedRow();\n this.virtualList.refresh();\n if (focusedRow != null) {\n this.focusRowIfAlive(focusedRow);\n }\n this.notifyListeners();\n };\n PrimaryColsListPanel.prototype.focusRowIfAlive = function (rowIndex) {\n var _this = this;\n window.setTimeout(function () {\n if (_this.isAlive()) {\n _this.virtualList.focusRow(rowIndex);\n }\n }, 0);\n };\n PrimaryColsListPanel.prototype.forEachItem = function (callback) {\n var recursiveFunc = function (items) {\n items.forEach(function (item) {\n callback(item);\n if (item.isGroup()) {\n recursiveFunc(item.getChildren());\n }\n });\n };\n recursiveFunc(this.allColsTree);\n };\n PrimaryColsListPanel.prototype.doSetExpandedAll = function (value) {\n this.forEachItem(function (item) {\n if (item.isGroup()) {\n item.setExpanded(value);\n }\n });\n };\n PrimaryColsListPanel.prototype.setGroupsExpanded = function (expand, groupIds) {\n if (!groupIds) {\n this.doSetExpandedAll(expand);\n return;\n }\n var expandedGroupIds = [];\n this.forEachItem(function (item) {\n if (!item.isGroup()) {\n return;\n }\n var groupId = item.getColumnGroup().getId();\n if (groupIds.indexOf(groupId) >= 0) {\n item.setExpanded(expand);\n expandedGroupIds.push(groupId);\n }\n });\n var unrecognisedGroupIds = groupIds.filter(function (groupId) { return !_.includes(expandedGroupIds, groupId); });\n if (unrecognisedGroupIds.length > 0) {\n console.warn('AG Grid: unable to find group(s) for supplied groupIds:', unrecognisedGroupIds);\n }\n };\n PrimaryColsListPanel.prototype.getExpandState = function () {\n var expandedCount = 0;\n var notExpandedCount = 0;\n this.forEachItem(function (item) {\n if (!item.isGroup()) {\n return;\n }\n if (item.isExpanded()) {\n expandedCount++;\n }\n else {\n notExpandedCount++;\n }\n });\n if (expandedCount > 0 && notExpandedCount > 0) {\n return ExpandState.INDETERMINATE;\n }\n if (notExpandedCount > 0) {\n return ExpandState.COLLAPSED;\n }\n return ExpandState.EXPANDED;\n };\n PrimaryColsListPanel.prototype.doSetSelectedAll = function (selectAllChecked) {\n this.modelItemUtils.selectAllChildren(this.allColsTree, selectAllChecked, this.eventType);\n };\n PrimaryColsListPanel.prototype.getSelectionState = function () {\n var checkedCount = 0;\n var uncheckedCount = 0;\n var pivotMode = this.columnModel.isPivotMode();\n this.forEachItem(function (item) {\n if (item.isGroup()) {\n return;\n }\n if (!item.isPassesFilter()) {\n return;\n }\n var column = item.getColumn();\n var colDef = column.getColDef();\n var checked;\n if (pivotMode) {\n var noPivotModeOptionsAllowed = !column.isAllowPivot() && !column.isAllowRowGroup() && !column.isAllowValue();\n if (noPivotModeOptionsAllowed) {\n return;\n }\n checked = column.isValueActive() || column.isPivotActive() || column.isRowGroupActive();\n }\n else {\n if (colDef.lockVisible) {\n return;\n }\n checked = column.isVisible();\n }\n checked ? checkedCount++ : uncheckedCount++;\n });\n if (checkedCount > 0 && uncheckedCount > 0) {\n return undefined;\n }\n return !(checkedCount === 0 || uncheckedCount > 0);\n };\n PrimaryColsListPanel.prototype.setFilterText = function (filterText) {\n this.filterText = _.exists(filterText) ? filterText.toLowerCase() : null;\n this.markFilteredColumns();\n this.flattenAndFilterModel();\n };\n PrimaryColsListPanel.prototype.markFilteredColumns = function () {\n var _this = this;\n var passesFilter = function (item) {\n if (!_.exists(_this.filterText)) {\n return true;\n }\n var displayName = item.getDisplayName();\n return displayName == null || displayName.toLowerCase().indexOf(_this.filterText) !== -1;\n };\n var recursivelyCheckFilter = function (item, parentPasses) {\n var atLeastOneChildPassed = false;\n if (item.isGroup()) {\n var groupPasses_1 = passesFilter(item);\n item.getChildren().forEach(function (child) {\n var childPasses = recursivelyCheckFilter(child, groupPasses_1 || parentPasses);\n if (childPasses) {\n atLeastOneChildPassed = childPasses;\n }\n });\n }\n var filterPasses = (parentPasses || atLeastOneChildPassed) ? true : passesFilter(item);\n item.setPassesFilter(filterPasses);\n return filterPasses;\n };\n this.allColsTree.forEach(function (item) { return recursivelyCheckFilter(item, false); });\n };\n PrimaryColsListPanel.prototype.notifyListeners = function () {\n this.fireGroupExpandedEvent();\n this.fireSelectionChangedEvent();\n };\n PrimaryColsListPanel.prototype.fireGroupExpandedEvent = function () {\n var expandState = this.getExpandState();\n this.dispatchEvent({ type: 'groupExpanded', state: expandState });\n };\n PrimaryColsListPanel.prototype.fireSelectionChangedEvent = function () {\n var selectionState = this.getSelectionState();\n this.dispatchEvent({ type: 'selectionChanged', state: selectionState });\n };\n PrimaryColsListPanel.TEMPLATE = \"
\";\n __decorate([\n Autowired('columnModel')\n ], PrimaryColsListPanel.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired('toolPanelColDefService')\n ], PrimaryColsListPanel.prototype, \"colDefService\", void 0);\n __decorate([\n Autowired('modelItemUtils')\n ], PrimaryColsListPanel.prototype, \"modelItemUtils\", void 0);\n __decorate([\n PreDestroy\n ], PrimaryColsListPanel.prototype, \"destroyColumnTree\", null);\n return PrimaryColsListPanel;\n}(Component));\nexport { PrimaryColsListPanel };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AgCheckbox, Autowired, Component, Events, PreConstruct, RefSelector } from \"@ag-grid-community/core\";\nvar PivotModePanel = /** @class */ (function (_super) {\n __extends(PivotModePanel, _super);\n function PivotModePanel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n PivotModePanel.prototype.createTemplate = function () {\n return /* html */ \"
\\n \\n
\";\n };\n PivotModePanel.prototype.init = function () {\n this.setTemplate(this.createTemplate());\n this.cbPivotMode.setValue(this.columnModel.isPivotMode());\n var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n this.cbPivotMode.setLabel(localeTextFunc('pivotMode', 'Pivot Mode'));\n this.addManagedListener(this.cbPivotMode, AgCheckbox.EVENT_CHANGED, this.onBtPivotMode.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.onPivotModeChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, this.onPivotModeChanged.bind(this));\n };\n PivotModePanel.prototype.onBtPivotMode = function () {\n var newValue = !!this.cbPivotMode.getValue();\n if (newValue !== this.columnModel.isPivotMode()) {\n this.columnModel.setPivotMode(newValue, \"toolPanelUi\");\n var api = this.gridOptionsWrapper.getApi();\n if (api) {\n api.refreshHeader();\n }\n }\n };\n PivotModePanel.prototype.onPivotModeChanged = function () {\n var pivotModeActive = this.columnModel.isPivotMode();\n this.cbPivotMode.setValue(pivotModeActive);\n };\n __decorate([\n Autowired('columnModel')\n ], PivotModePanel.prototype, \"columnModel\", void 0);\n __decorate([\n RefSelector('cbPivotMode')\n ], PivotModePanel.prototype, \"cbPivotMode\", void 0);\n __decorate([\n PreConstruct\n ], PivotModePanel.prototype, \"init\", null);\n return PivotModePanel;\n}(Component));\nexport { PivotModePanel };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Bean, BeanStub, Autowired, _ } from \"@ag-grid-community/core\";\nvar AggregationStage = /** @class */ (function (_super) {\n __extends(AggregationStage, _super);\n function AggregationStage() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n // it's possible to recompute the aggregate without doing the other parts\n // + gridApi.recomputeAggregates()\n AggregationStage.prototype.execute = function (params) {\n // if changed path is active, it means we came from a) change detection or b) transaction update.\n // for both of these, if no value columns are present, it means there is nothing to aggregate now\n // and there is no cleanup to be done (as value columns don't change between transactions or change\n // detections). if no value columns and no changed path, means we have to go through all nodes in\n // case we need to clean up agg data from before.\n var noValueColumns = _.missingOrEmpty(this.columnModel.getValueColumns());\n var noUserAgg = !this.gridOptionsWrapper.getGroupRowAggFunc();\n var changedPathActive = params.changedPath && params.changedPath.isActive();\n if (noValueColumns && noUserAgg && changedPathActive) {\n return;\n }\n var aggDetails = this.createAggDetails(params);\n this.recursivelyCreateAggData(aggDetails);\n };\n AggregationStage.prototype.createAggDetails = function (params) {\n var pivotActive = this.columnModel.isPivotActive();\n var measureColumns = this.columnModel.getValueColumns();\n var pivotColumns = pivotActive ? this.columnModel.getPivotColumns() : [];\n var aggDetails = {\n changedPath: params.changedPath,\n valueColumns: measureColumns,\n pivotColumns: pivotColumns\n };\n return aggDetails;\n };\n AggregationStage.prototype.recursivelyCreateAggData = function (aggDetails) {\n var _this = this;\n // update prop, in case changed since last time\n this.filteredOnly = !this.gridOptionsWrapper.isSuppressAggFilteredOnly();\n var callback = function (rowNode) {\n var hasNoChildren = !rowNode.hasChildren();\n if (hasNoChildren) {\n // this check is needed for TreeData, in case the node is no longer a child,\n // but it was a child previously.\n if (rowNode.aggData) {\n rowNode.setAggData(null);\n }\n // never agg data for leaf nodes\n return;\n }\n //Optionally prevent the aggregation at the root Node\n //https://ag-grid.atlassian.net/browse/AG-388\n var isRootNode = rowNode.level === -1;\n if (isRootNode) {\n var notPivoting = !_this.columnModel.isPivotMode();\n var suppressAggAtRootLevel = _this.gridOptionsWrapper.isSuppressAggAtRootLevel();\n if (suppressAggAtRootLevel && notPivoting) {\n return;\n }\n }\n _this.aggregateRowNode(rowNode, aggDetails);\n };\n aggDetails.changedPath.forEachChangedNodeDepthFirst(callback, true);\n };\n AggregationStage.prototype.aggregateRowNode = function (rowNode, aggDetails) {\n var measureColumnsMissing = aggDetails.valueColumns.length === 0;\n var pivotColumnsMissing = aggDetails.pivotColumns.length === 0;\n var userFunc = this.gridOptionsWrapper.getGroupRowAggFunc();\n var aggResult;\n if (userFunc) {\n var params = { nodes: rowNode.childrenAfterFilter };\n aggResult = userFunc(params);\n }\n else if (measureColumnsMissing) {\n aggResult = null;\n }\n else if (pivotColumnsMissing) {\n aggResult = this.aggregateRowNodeUsingValuesOnly(rowNode, aggDetails);\n }\n else {\n aggResult = this.aggregateRowNodeUsingValuesAndPivot(rowNode);\n }\n rowNode.setAggData(aggResult);\n // if we are grouping, then it's possible there is a sibling footer\n // to the group, so update the data here also if there is one\n if (rowNode.sibling) {\n rowNode.sibling.setAggData(aggResult);\n }\n };\n AggregationStage.prototype.aggregateRowNodeUsingValuesAndPivot = function (rowNode) {\n var _this = this;\n var result = {};\n var pivotColumnDefs = this.pivotStage.getPivotColumnDefs();\n // Step 1: process value columns\n pivotColumnDefs\n .filter(function (v) { return !_.exists(v.pivotTotalColumnIds); }) // only process pivot value columns\n .forEach(function (valueColDef) {\n var keys = valueColDef.pivotKeys || [];\n var values;\n var valueColumn = valueColDef.pivotValueColumn;\n var colId = valueColDef.colId;\n if (rowNode.leafGroup) {\n // lowest level group, get the values from the mapped set\n values = _this.getValuesFromMappedSet(rowNode.childrenMapped, keys, valueColumn);\n }\n else {\n // value columns and pivot columns, non-leaf group\n values = _this.getValuesPivotNonLeaf(rowNode, colId);\n }\n result[colId] = _this.aggregateValues(values, valueColumn.getAggFunc(), valueColumn, rowNode);\n });\n // Step 2: process total columns\n pivotColumnDefs\n .filter(function (v) { return _.exists(v.pivotTotalColumnIds); }) // only process pivot total columns\n .forEach(function (totalColDef) {\n var aggResults = [];\n var pivotValueColumn = totalColDef.pivotValueColumn, pivotTotalColumnIds = totalColDef.pivotTotalColumnIds, colId = totalColDef.colId;\n //retrieve results for colIds associated with this pivot total column\n if (!pivotTotalColumnIds || !pivotTotalColumnIds.length) {\n return;\n }\n pivotTotalColumnIds.forEach(function (currentColId) {\n aggResults.push(result[currentColId]);\n });\n result[colId] = _this.aggregateValues(aggResults, pivotValueColumn.getAggFunc(), pivotValueColumn, rowNode);\n });\n return result;\n };\n AggregationStage.prototype.aggregateRowNodeUsingValuesOnly = function (rowNode, aggDetails) {\n var _this = this;\n var result = {};\n var changedValueColumns = aggDetails.changedPath.isActive() ?\n aggDetails.changedPath.getValueColumnsForNode(rowNode, aggDetails.valueColumns)\n : aggDetails.valueColumns;\n var notChangedValueColumns = aggDetails.changedPath.isActive() ?\n aggDetails.changedPath.getNotValueColumnsForNode(rowNode, aggDetails.valueColumns)\n : null;\n var values2d = this.getValuesNormal(rowNode, changedValueColumns);\n var oldValues = rowNode.aggData;\n changedValueColumns.forEach(function (valueColumn, index) {\n result[valueColumn.getId()] = _this.aggregateValues(values2d[index], valueColumn.getAggFunc(), valueColumn, rowNode);\n });\n if (notChangedValueColumns && oldValues) {\n notChangedValueColumns.forEach(function (valueColumn) {\n result[valueColumn.getId()] = oldValues[valueColumn.getId()];\n });\n }\n return result;\n };\n AggregationStage.prototype.getValuesPivotNonLeaf = function (rowNode, colId) {\n var values = [];\n rowNode.childrenAfterFilter.forEach(function (node) {\n var value = node.aggData[colId];\n values.push(value);\n });\n return values;\n };\n AggregationStage.prototype.getValuesFromMappedSet = function (mappedSet, keys, valueColumn) {\n var _this = this;\n var mapPointer = mappedSet;\n keys.forEach(function (key) { return (mapPointer = mapPointer ? mapPointer[key] : null); });\n if (!mapPointer) {\n return [];\n }\n var values = [];\n mapPointer.forEach(function (rowNode) {\n var value = _this.valueService.getValue(valueColumn, rowNode);\n values.push(value);\n });\n return values;\n };\n AggregationStage.prototype.getValuesNormal = function (rowNode, valueColumns) {\n // create 2d array, of all values for all valueColumns\n var values = [];\n valueColumns.forEach(function () { return values.push([]); });\n var valueColumnCount = valueColumns.length;\n var nodeList = this.filteredOnly ? rowNode.childrenAfterFilter : rowNode.childrenAfterGroup;\n var rowCount = nodeList.length;\n for (var i = 0; i < rowCount; i++) {\n var childNode = nodeList[i];\n for (var j = 0; j < valueColumnCount; j++) {\n var valueColumn = valueColumns[j];\n // if the row is a group, then it will only have an agg result value,\n // which means valueGetter is never used.\n var value = this.valueService.getValue(valueColumn, childNode);\n values[j].push(value);\n }\n }\n return values;\n };\n AggregationStage.prototype.aggregateValues = function (values, aggFuncOrString, column, rowNode) {\n var aggFunc = typeof aggFuncOrString === 'string' ?\n this.aggFuncService.getAggFunc(aggFuncOrString) :\n aggFuncOrString;\n if (typeof aggFunc !== 'function') {\n console.error(\"AG Grid: unrecognised aggregation function \" + aggFuncOrString);\n return null;\n }\n var deprecationWarning = function () {\n _.doOnce(function () {\n console.warn('AG Grid: since v24.0, custom aggregation functions take a params object. Please alter your aggregation function to use params.values');\n }, 'aggregationStage.aggregateValues Deprecation');\n };\n var aggFuncAny = aggFunc;\n var params = {\n values: values,\n column: column,\n colDef: column ? column.getColDef() : undefined,\n rowNode: rowNode,\n data: rowNode ? rowNode.data : undefined,\n api: this.gridApi,\n columnApi: this.columnApi,\n context: this.gridOptionsWrapper.getContext(),\n // the three things below are for logging warning messages in case anyone is treating\n // the params object as an array. in previous grid versions, we didn't pass params object,\n // but passed values array instead.\n forEach: function (callback, thisArg) {\n deprecationWarning();\n return values.forEach(callback, thisArg);\n },\n get length() {\n deprecationWarning();\n return values.length;\n },\n set length(val) {\n deprecationWarning();\n values.length = val;\n }\n }; // the \"as any\" is needed to allow the deprecation warning messages\n return aggFuncAny(params);\n };\n __decorate([\n Autowired('columnModel')\n ], AggregationStage.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired('valueService')\n ], AggregationStage.prototype, \"valueService\", void 0);\n __decorate([\n Autowired('pivotStage')\n ], AggregationStage.prototype, \"pivotStage\", void 0);\n __decorate([\n Autowired('aggFuncService')\n ], AggregationStage.prototype, \"aggFuncService\", void 0);\n __decorate([\n Autowired('gridApi')\n ], AggregationStage.prototype, \"gridApi\", void 0);\n __decorate([\n Autowired('columnApi')\n ], AggregationStage.prototype, \"columnApi\", void 0);\n AggregationStage = __decorate([\n Bean('aggregationStage')\n ], AggregationStage);\n return AggregationStage;\n}(BeanStub));\nexport { AggregationStage };\n","var BatchRemover = /** @class */ (function () {\n function BatchRemover() {\n this.allSets = {};\n this.allParents = [];\n }\n BatchRemover.prototype.removeFromChildrenAfterGroup = function (parent, child) {\n var set = this.getSet(parent);\n set.removeFromChildrenAfterGroup[child.id] = true;\n };\n BatchRemover.prototype.removeFromAllLeafChildren = function (parent, child) {\n var set = this.getSet(parent);\n set.removeFromAllLeafChildren[child.id] = true;\n };\n BatchRemover.prototype.getSet = function (parent) {\n if (!this.allSets[parent.id]) {\n this.allSets[parent.id] = {\n removeFromAllLeafChildren: {},\n removeFromChildrenAfterGroup: {}\n };\n this.allParents.push(parent);\n }\n return this.allSets[parent.id];\n };\n BatchRemover.prototype.getAllParents = function () {\n return this.allParents;\n };\n BatchRemover.prototype.flush = function () {\n var _this = this;\n this.allParents.forEach(function (parent) {\n var nodeDetails = _this.allSets[parent.id];\n parent.childrenAfterGroup = parent.childrenAfterGroup.filter(function (child) { return !nodeDetails.removeFromChildrenAfterGroup[child.id]; });\n parent.allLeafChildren = parent.allLeafChildren.filter(function (child) { return !nodeDetails.removeFromAllLeafChildren[child.id]; });\n parent.updateHasChildren();\n if (parent.sibling) {\n parent.sibling.childrenAfterGroup = parent.childrenAfterGroup;\n parent.sibling.allLeafChildren = parent.allLeafChildren;\n }\n });\n this.allSets = {};\n this.allParents.length = 0;\n };\n return BatchRemover;\n}());\nexport { BatchRemover };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n};\nimport { _, Autowired, Bean, BeanStub, NumberSequence, PostConstruct, RowNode } from \"@ag-grid-community/core\";\nimport { BatchRemover } from \"./batchRemover\";\nvar GroupStage = /** @class */ (function (_super) {\n __extends(GroupStage, _super);\n function GroupStage() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n // we use a sequence variable so that each time we do a grouping, we don't\n // reuse the ids - otherwise the rowRenderer will confuse rowNodes between redraws\n // when it tries to animate between rows.\n _this.groupIdSequence = new NumberSequence();\n return _this;\n }\n GroupStage.prototype.postConstruct = function () {\n this.usingTreeData = this.gridOptionsWrapper.isTreeData();\n if (this.usingTreeData) {\n this.getDataPath = this.gridOptionsWrapper.getDataPathFunc();\n }\n };\n GroupStage.prototype.execute = function (params) {\n var details = this.createGroupingDetails(params);\n if (details.transactions) {\n this.handleTransaction(details);\n }\n else {\n var afterColsChanged = params.afterColumnsChanged === true;\n this.shotgunResetEverything(details, afterColsChanged);\n }\n this.positionLeafsAboveGroups(params.changedPath);\n this.orderGroups(details.rootNode);\n this.selectableService.updateSelectableAfterGrouping(details.rootNode);\n };\n GroupStage.prototype.positionLeafsAboveGroups = function (changedPath) {\n // we don't do group sorting for tree data\n if (this.usingTreeData) {\n return;\n }\n changedPath.forEachChangedNodeDepthFirst(function (group) {\n if (group.childrenAfterGroup) {\n var leafNodes_1 = [];\n var groupNodes_1 = [];\n group.childrenAfterGroup.forEach(function (row) {\n var _a;\n if (!((_a = row.childrenAfterGroup) === null || _a === void 0 ? void 0 : _a.length)) {\n leafNodes_1.push(row);\n }\n else {\n groupNodes_1.push(row);\n }\n });\n group.childrenAfterGroup = __spread(leafNodes_1, groupNodes_1);\n }\n }, false);\n };\n GroupStage.prototype.createGroupingDetails = function (params) {\n var rowNode = params.rowNode, changedPath = params.changedPath, rowNodeTransactions = params.rowNodeTransactions, rowNodeOrder = params.rowNodeOrder;\n var groupedCols = this.usingTreeData ? null : this.columnModel.getRowGroupColumns();\n var details = {\n // someone complained that the parent attribute was causing some change detection\n // to break is some angular add-on - which i never used. taking the parent out breaks\n // a cyclic dependency, hence this flag got introduced.\n includeParents: !this.gridOptionsWrapper.isSuppressParentsInRowNodes(),\n expandByDefault: this.gridOptionsWrapper.getGroupDefaultExpanded(),\n groupedCols: groupedCols,\n rootNode: rowNode,\n pivotMode: this.columnModel.isPivotMode(),\n groupedColCount: this.usingTreeData || !groupedCols ? 0 : groupedCols.length,\n rowNodeOrder: rowNodeOrder,\n transactions: rowNodeTransactions,\n // if no transaction, then it's shotgun, changed path would be 'not active' at this point anyway\n changedPath: changedPath\n };\n return details;\n };\n GroupStage.prototype.handleTransaction = function (details) {\n var _this = this;\n details.transactions.forEach(function (tran) {\n // we don't allow batch remover for tree data as tree data uses Filler Nodes,\n // and creating/deleting filler nodes needs to be done alongside the node deleting\n // and moving. if we want to Batch Remover working with tree data then would need\n // to consider how Filler Nodes would be impacted (it's possible that it can be easily\n // modified to work, however for now I don't have the brain energy to work it all out).\n var batchRemover = !_this.usingTreeData ? new BatchRemover() : undefined;\n // the order here of [add, remove, update] needs to be the same as in ClientSideNodeManager,\n // as the order is important when a record with the same id is added and removed in the same\n // transaction.\n if (_.existsAndNotEmpty(tran.remove)) {\n _this.removeNodes(tran.remove, details, batchRemover);\n }\n if (_.existsAndNotEmpty(tran.update)) {\n _this.moveNodesInWrongPath(tran.update, details, batchRemover);\n }\n if (_.existsAndNotEmpty(tran.add)) {\n _this.insertNodes(tran.add, details, false);\n }\n // must flush here, and not allow another transaction to be applied,\n // as each transaction must finish leaving the data in a consistent state.\n if (batchRemover) {\n var parentsWithChildrenRemoved = batchRemover.getAllParents().slice();\n batchRemover.flush();\n _this.removeEmptyGroups(parentsWithChildrenRemoved, details);\n }\n });\n if (details.rowNodeOrder) {\n this.sortChildren(details);\n }\n };\n // this is used when doing delta updates, eg Redux, keeps nodes in right order\n GroupStage.prototype.sortChildren = function (details) {\n details.changedPath.forEachChangedNodeDepthFirst(function (rowNode) {\n _.sortRowNodesByOrder(rowNode.childrenAfterGroup, details.rowNodeOrder);\n });\n };\n GroupStage.prototype.orderGroups = function (rootNode) {\n // we don't do group sorting for tree data\n if (this.usingTreeData) {\n return;\n }\n var comparator = this.gridOptionsWrapper.getInitialGroupOrderComparator();\n if (_.exists(comparator)) {\n recursiveSort(rootNode);\n }\n function recursiveSort(rowNode) {\n var doSort = _.exists(rowNode.childrenAfterGroup) &&\n // we only want to sort groups, so we do not sort leafs (a leaf group has leafs as children)\n !rowNode.leafGroup;\n if (doSort) {\n rowNode.childrenAfterGroup.sort(function (nodeA, nodeB) { return comparator({ nodeA: nodeA, nodeB: nodeB }); });\n rowNode.childrenAfterGroup.forEach(function (childNode) { return recursiveSort(childNode); });\n }\n }\n };\n GroupStage.prototype.getExistingPathForNode = function (node, details) {\n var res = [];\n // when doing tree data, the node is part of the path,\n // but when doing grid grouping, the node is not part of the path so we start with the parent.\n var pointer = this.usingTreeData ? node : node.parent;\n while (pointer && pointer !== details.rootNode) {\n res.push({\n key: pointer.key,\n rowGroupColumn: pointer.rowGroupColumn,\n field: pointer.field\n });\n pointer = pointer.parent;\n }\n res.reverse();\n return res;\n };\n GroupStage.prototype.moveNodesInWrongPath = function (childNodes, details, batchRemover) {\n var _this = this;\n childNodes.forEach(function (childNode) {\n // we add node, even if parent has not changed, as the data could have\n // changed, hence aggregations will be wrong\n if (details.changedPath.isActive()) {\n details.changedPath.addParentNode(childNode.parent);\n }\n var infoToKeyMapper = function (item) { return item.key; };\n var oldPath = _this.getExistingPathForNode(childNode, details).map(infoToKeyMapper);\n var newPath = _this.getGroupInfo(childNode, details).map(infoToKeyMapper);\n var nodeInCorrectPath = _.areEqual(oldPath, newPath);\n if (!nodeInCorrectPath) {\n _this.moveNode(childNode, details, batchRemover);\n }\n });\n };\n GroupStage.prototype.moveNode = function (childNode, details, batchRemover) {\n this.removeNodesInStages([childNode], details, batchRemover);\n this.insertOneNode(childNode, details, true);\n // hack - if we didn't do this, then renaming a tree item (ie changing rowNode.key) wouldn't get\n // refreshed into the gui.\n // this is needed to kick off the event that rowComp listens to for refresh. this in turn\n // then will get each cell in the row to refresh - which is what we need as we don't know which\n // columns will be displaying the rowNode.key info.\n childNode.setData(childNode.data);\n // we add both old and new parents to changed path, as both will need to be refreshed.\n // we already added the old parent (in calling method), so just add the new parent here\n if (details.changedPath.isActive()) {\n var newParent = childNode.parent;\n details.changedPath.addParentNode(newParent);\n }\n };\n GroupStage.prototype.removeNodes = function (leafRowNodes, details, batchRemover) {\n this.removeNodesInStages(leafRowNodes, details, batchRemover);\n if (details.changedPath.isActive()) {\n leafRowNodes.forEach(function (rowNode) { return details.changedPath.addParentNode(rowNode.parent); });\n }\n };\n GroupStage.prototype.removeNodesInStages = function (leafRowNodes, details, batchRemover) {\n this.removeNodesFromParents(leafRowNodes, details, batchRemover);\n if (this.usingTreeData) {\n this.postRemoveCreateFillerNodes(leafRowNodes, details);\n // When not TreeData, then removeEmptyGroups is called just before the BatchRemover is flushed.\n // However for TreeData, there is no BatchRemover, so we have to call removeEmptyGroups here.\n var nodeParents = leafRowNodes.map(function (n) { return n.parent; });\n this.removeEmptyGroups(nodeParents, details);\n }\n };\n GroupStage.prototype.forEachParentGroup = function (details, group, callback) {\n var pointer = group;\n while (pointer && pointer !== details.rootNode) {\n callback(pointer);\n pointer = pointer.parent;\n }\n };\n GroupStage.prototype.removeNodesFromParents = function (nodesToRemove, details, provided) {\n var _this = this;\n // this method can be called with BatchRemover as optional. if it is missed, we created a local version\n // and flush it at the end. if one is provided, we add to the provided one and it gets flushed elsewhere.\n var batchRemoverIsLocal = provided == null;\n var batchRemoverToUse = provided ? provided : new BatchRemover();\n nodesToRemove.forEach(function (nodeToRemove) {\n _this.removeFromParent(nodeToRemove, batchRemoverToUse);\n // remove from allLeafChildren. we clear down all parents EXCEPT the Root Node, as\n // the ClientSideNodeManager is responsible for the Root Node.\n _this.forEachParentGroup(details, nodeToRemove.parent, function (parentNode) {\n batchRemoverToUse.removeFromAllLeafChildren(parentNode, nodeToRemove);\n });\n });\n if (batchRemoverIsLocal) {\n batchRemoverToUse.flush();\n }\n };\n GroupStage.prototype.postRemoveCreateFillerNodes = function (nodesToRemove, details) {\n var _this = this;\n nodesToRemove.forEach(function (nodeToRemove) {\n // if not group, and children are present, need to move children to a group.\n // otherwise if no children, we can just remove without replacing.\n var replaceWithGroup = nodeToRemove.hasChildren();\n if (replaceWithGroup) {\n var oldPath = _this.getExistingPathForNode(nodeToRemove, details);\n // because we just removed the userGroup, this will always return new support group\n var newGroupNode_1 = _this.findParentForNode(nodeToRemove, oldPath, details);\n // these properties are the ones that will be incorrect in the newly created group,\n // so copy them from the old childNode\n newGroupNode_1.expanded = nodeToRemove.expanded;\n newGroupNode_1.allLeafChildren = nodeToRemove.allLeafChildren;\n newGroupNode_1.childrenAfterGroup = nodeToRemove.childrenAfterGroup;\n newGroupNode_1.childrenMapped = nodeToRemove.childrenMapped;\n newGroupNode_1.updateHasChildren();\n newGroupNode_1.childrenAfterGroup.forEach(function (rowNode) { return rowNode.parent = newGroupNode_1; });\n }\n });\n };\n GroupStage.prototype.removeEmptyGroups = function (possibleEmptyGroups, details) {\n var _this = this;\n // we do this multiple times, as when we remove groups, that means the parent of just removed\n // group can then be empty. to get around this, if we remove, then we check everything again for\n // newly emptied groups. the max number of times this will execute is the depth of the group tree.\n var checkAgain = true;\n var groupShouldBeRemoved = function (rowNode) {\n // because of the while loop below, it's possible we already moved the node,\n // so double check before trying to remove again.\n var mapKey = _this.getChildrenMappedKey(rowNode.key, rowNode.rowGroupColumn);\n var parentRowNode = rowNode.parent;\n var groupAlreadyRemoved = (parentRowNode && parentRowNode.childrenMapped) ?\n !parentRowNode.childrenMapped[mapKey] : true;\n if (groupAlreadyRemoved) {\n // if not linked, then group was already removed\n return false;\n }\n // if still not removed, then we remove if this group is empty\n return !!rowNode.isEmptyRowGroupNode();\n };\n var _loop_1 = function () {\n checkAgain = false;\n var batchRemover = new BatchRemover();\n possibleEmptyGroups.forEach(function (possibleEmptyGroup) {\n // remove empty groups\n _this.forEachParentGroup(details, possibleEmptyGroup, function (rowNode) {\n if (groupShouldBeRemoved(rowNode)) {\n checkAgain = true;\n _this.removeFromParent(rowNode, batchRemover);\n // we remove selection on filler nodes here, as the selection would not be removed\n // from the RowNodeManager, as filler nodes don't exist on the RowNodeManager\n rowNode.setSelected(false);\n }\n });\n });\n batchRemover.flush();\n };\n while (checkAgain) {\n _loop_1();\n }\n };\n // removes the node from the parent by:\n // a) removing from childrenAfterGroup (using batchRemover if present, otherwise immediately)\n // b) removing from childrenMapped (immediately)\n // c) setRowTop(null) - as the rowRenderer uses this to know the RowNode is no longer needed\n // d) setRowIndex(null) - as the rowNode will no longer be displayed.\n GroupStage.prototype.removeFromParent = function (child, batchRemover) {\n if (child.parent) {\n if (batchRemover) {\n batchRemover.removeFromChildrenAfterGroup(child.parent, child);\n }\n else {\n _.removeFromArray(child.parent.childrenAfterGroup, child);\n child.parent.updateHasChildren();\n }\n }\n var mapKey = this.getChildrenMappedKey(child.key, child.rowGroupColumn);\n if (child.parent && child.parent.childrenMapped) {\n child.parent.childrenMapped[mapKey] = undefined;\n }\n // this is important for transition, see rowComp removeFirstPassFuncs. when doing animation and\n // remove, if rowTop is still present, the rowComp thinks it's just moved position.\n child.setRowTop(null);\n child.setRowIndex(null);\n };\n GroupStage.prototype.addToParent = function (child, parent) {\n var mapKey = this.getChildrenMappedKey(child.key, child.rowGroupColumn);\n if (parent) {\n var children = parent.childrenMapped != null;\n if (children) {\n parent.childrenMapped[mapKey] = child;\n }\n parent.childrenAfterGroup.push(child);\n parent.updateHasChildren();\n }\n };\n GroupStage.prototype.areGroupColsEqual = function (d1, d2) {\n if (d1 == null || d2 == null || d1.pivotMode !== d2.pivotMode) {\n return false;\n }\n return _.areEqual(d1.groupedCols, d2.groupedCols);\n };\n GroupStage.prototype.checkAllGroupDataAfterColsChanged = function (details) {\n var _this = this;\n var recurse = function (rowNodes) {\n if (!rowNodes) {\n return;\n }\n rowNodes.forEach(function (rowNode) {\n var isLeafNode = !_this.usingTreeData && !rowNode.group;\n if (isLeafNode) {\n return;\n }\n var groupInfo = {\n field: rowNode.field,\n key: rowNode.key,\n rowGroupColumn: rowNode.rowGroupColumn\n };\n _this.setGroupData(rowNode, groupInfo);\n recurse(rowNode.childrenAfterGroup);\n });\n };\n recurse(details.rootNode.childrenAfterGroup);\n };\n GroupStage.prototype.shotgunResetEverything = function (details, afterColumnsChanged) {\n if (this.noChangeInGroupingColumns(details, afterColumnsChanged)) {\n return;\n }\n // groups are about to get disposed, so need to deselect any that are selected\n this.selectionService.removeGroupsFromSelection();\n var rootNode = details.rootNode, groupedCols = details.groupedCols;\n // because we are not creating the root node each time, we have the logic\n // here to change leafGroup once.\n // we set .leafGroup to false for tree data, as .leafGroup is only used when pivoting, and pivoting\n // isn't allowed with treeData, so the grid never actually use .leafGroup when doing treeData.\n rootNode.leafGroup = this.usingTreeData ? false : groupedCols.length === 0;\n // we are doing everything from scratch, so reset childrenAfterGroup and childrenMapped from the rootNode\n rootNode.childrenAfterGroup = [];\n rootNode.childrenMapped = {};\n rootNode.updateHasChildren();\n var sibling = rootNode.sibling;\n if (sibling) {\n sibling.childrenAfterGroup = rootNode.childrenAfterGroup;\n sibling.childrenMapped = rootNode.childrenMapped;\n }\n this.insertNodes(rootNode.allLeafChildren, details, false);\n };\n GroupStage.prototype.noChangeInGroupingColumns = function (details, afterColumnsChanged) {\n var noFurtherProcessingNeeded = false;\n var groupDisplayColumns = this.columnModel.getGroupDisplayColumns();\n var newGroupDisplayColIds = groupDisplayColumns ?\n groupDisplayColumns.map(function (c) { return c.getId(); }).join('-') : '';\n if (afterColumnsChanged) {\n // we only need to redo grouping if doing normal grouping (ie not tree data)\n // and the group cols have changed.\n noFurtherProcessingNeeded = this.usingTreeData || this.areGroupColsEqual(details, this.oldGroupingDetails);\n // if the group display cols have changed, then we need to update rowNode.groupData\n // (regardless of tree data or row grouping)\n if (this.oldGroupDisplayColIds !== newGroupDisplayColIds) {\n this.checkAllGroupDataAfterColsChanged(details);\n }\n }\n this.oldGroupingDetails = details;\n this.oldGroupDisplayColIds = newGroupDisplayColIds;\n return noFurtherProcessingNeeded;\n };\n GroupStage.prototype.insertNodes = function (newRowNodes, details, isMove) {\n var _this = this;\n newRowNodes.forEach(function (rowNode) {\n _this.insertOneNode(rowNode, details, isMove);\n if (details.changedPath.isActive()) {\n details.changedPath.addParentNode(rowNode.parent);\n }\n });\n };\n GroupStage.prototype.insertOneNode = function (childNode, details, isMove) {\n var path = this.getGroupInfo(childNode, details);\n var parentGroup = this.findParentForNode(childNode, path, details);\n if (!parentGroup.group) {\n console.warn(\"AG Grid: duplicate group keys for row data, keys should be unique\", [parentGroup.data, childNode.data]);\n }\n if (this.usingTreeData) {\n this.swapGroupWithUserNode(parentGroup, childNode, isMove);\n }\n else {\n childNode.parent = parentGroup;\n childNode.level = path.length;\n parentGroup.childrenAfterGroup.push(childNode);\n parentGroup.updateHasChildren();\n }\n };\n GroupStage.prototype.findParentForNode = function (childNode, path, details) {\n var _this = this;\n var nextNode = details.rootNode;\n path.forEach(function (groupInfo, level) {\n nextNode = _this.getOrCreateNextNode(nextNode, groupInfo, level, details);\n // node gets added to all group nodes.\n // note: we do not add to rootNode here, as the rootNode is the master list of rowNodes\n nextNode.allLeafChildren.push(childNode);\n });\n return nextNode;\n };\n GroupStage.prototype.swapGroupWithUserNode = function (fillerGroup, userGroup, isMove) {\n userGroup.parent = fillerGroup.parent;\n userGroup.key = fillerGroup.key;\n userGroup.field = fillerGroup.field;\n userGroup.groupData = fillerGroup.groupData;\n userGroup.level = fillerGroup.level;\n // AG-3441 - preserve the existing expanded status of the node if we're moving it, so that\n // you can drag a sub tree from one parent to another without changing its expansion\n if (!isMove) {\n userGroup.expanded = fillerGroup.expanded;\n }\n // we set .leafGroup to false for tree data, as .leafGroup is only used when pivoting, and pivoting\n // isn't allowed with treeData, so the grid never actually use .leafGroup when doing treeData.\n userGroup.leafGroup = fillerGroup.leafGroup;\n // always null for userGroups, as row grouping is not allowed when doing tree data\n userGroup.rowGroupIndex = fillerGroup.rowGroupIndex;\n userGroup.allLeafChildren = fillerGroup.allLeafChildren;\n userGroup.childrenAfterGroup = fillerGroup.childrenAfterGroup;\n userGroup.childrenMapped = fillerGroup.childrenMapped;\n userGroup.updateHasChildren();\n this.removeFromParent(fillerGroup);\n userGroup.childrenAfterGroup.forEach(function (rowNode) { return rowNode.parent = userGroup; });\n this.addToParent(userGroup, fillerGroup.parent);\n };\n GroupStage.prototype.getOrCreateNextNode = function (parentGroup, groupInfo, level, details) {\n var key = this.getChildrenMappedKey(groupInfo.key, groupInfo.rowGroupColumn);\n var nextNode = parentGroup.childrenMapped ? parentGroup.childrenMapped[key] : undefined;\n if (!nextNode) {\n nextNode = this.createGroup(groupInfo, parentGroup, level, details);\n // attach the new group to the parent\n this.addToParent(nextNode, parentGroup);\n }\n return nextNode;\n };\n GroupStage.prototype.createGroup = function (groupInfo, parent, level, details) {\n var groupNode = new RowNode(this.beans);\n groupNode.group = true;\n groupNode.field = groupInfo.field;\n groupNode.rowGroupColumn = groupInfo.rowGroupColumn;\n this.setGroupData(groupNode, groupInfo);\n // we put 'row-group-' before the group id, so it doesn't clash with standard row id's. we also use 't-' and 'b-'\n // for top pinned and bottom pinned rows.\n groupNode.id = RowNode.ID_PREFIX_ROW_GROUP + this.groupIdSequence.next();\n groupNode.key = groupInfo.key;\n groupNode.level = level;\n groupNode.leafGroup = this.usingTreeData ? false : level === (details.groupedColCount - 1);\n groupNode.allLeafChildren = [];\n // why is this done here? we are not updating the children count as we go,\n // i suspect this is updated in the filter stage\n groupNode.setAllChildrenCount(0);\n groupNode.rowGroupIndex = this.usingTreeData ? null : level;\n groupNode.childrenAfterGroup = [];\n groupNode.childrenMapped = {};\n groupNode.updateHasChildren();\n groupNode.parent = details.includeParents ? parent : null;\n this.setExpandedInitialValue(details, groupNode);\n return groupNode;\n };\n GroupStage.prototype.setGroupData = function (groupNode, groupInfo) {\n var _this = this;\n groupNode.groupData = {};\n var groupDisplayCols = this.columnModel.getGroupDisplayColumns();\n groupDisplayCols.forEach(function (col) {\n // newGroup.rowGroupColumn=null when working off GroupInfo, and we always display the group in the group column\n // if rowGroupColumn is present, then it's grid row grouping and we only include if configuration says so\n var displayGroupForCol = _this.usingTreeData || (groupNode.rowGroupColumn ? col.isRowGroupDisplayed(groupNode.rowGroupColumn.getId()) : false);\n if (displayGroupForCol) {\n groupNode.groupData[col.getColId()] = groupInfo.key;\n }\n });\n };\n GroupStage.prototype.getChildrenMappedKey = function (key, rowGroupColumn) {\n if (rowGroupColumn) {\n // grouping by columns\n return rowGroupColumn.getId() + '-' + key;\n }\n // tree data - we don't have rowGroupColumns\n return key;\n };\n GroupStage.prototype.setExpandedInitialValue = function (details, groupNode) {\n // if pivoting the leaf group is never expanded as we do not show leaf rows\n if (details.pivotMode && groupNode.leafGroup) {\n groupNode.expanded = false;\n return;\n }\n // use callback if exists\n var userCallback = this.gridOptionsWrapper.getIsGroupOpenByDefaultFunc();\n if (userCallback) {\n var params = {\n rowNode: groupNode,\n field: groupNode.field,\n key: groupNode.key,\n level: groupNode.level,\n rowGroupColumn: groupNode.rowGroupColumn\n };\n groupNode.expanded = userCallback(params) == true;\n return;\n }\n // use expandByDefault if exists\n var expandByDefault = details.expandByDefault;\n if (details.expandByDefault === -1) {\n groupNode.expanded = true;\n return;\n }\n // otherwise\n groupNode.expanded = groupNode.level < expandByDefault;\n };\n GroupStage.prototype.getGroupInfo = function (rowNode, details) {\n if (this.usingTreeData) {\n return this.getGroupInfoFromCallback(rowNode);\n }\n return this.getGroupInfoFromGroupColumns(rowNode, details);\n };\n GroupStage.prototype.getGroupInfoFromCallback = function (rowNode) {\n var keys = this.getDataPath ? this.getDataPath(rowNode.data) : null;\n if (keys === null || keys === undefined || keys.length === 0) {\n _.doOnce(function () { return console.warn(\"AG Grid: getDataPath() should not return an empty path for data\", rowNode.data); }, 'groupStage.getGroupInfoFromCallback');\n }\n var groupInfoMapper = function (key) { return ({ key: key, field: null, rowGroupColumn: null }); };\n return keys ? keys.map(groupInfoMapper) : [];\n };\n GroupStage.prototype.getGroupInfoFromGroupColumns = function (rowNode, details) {\n var _this = this;\n var res = [];\n details.groupedCols.forEach(function (groupCol) {\n var key = _this.valueService.getKeyForNode(groupCol, rowNode);\n var keyExists = key !== null && key !== undefined;\n // unbalanced tree and pivot mode don't work together - not because of the grid, it doesn't make\n // mathematical sense as you are building up a cube. so if pivot mode, we put in a blank key where missing.\n // this keeps the tree balanced and hence can be represented as a group.\n if (details.pivotMode && !keyExists) {\n key = ' ';\n keyExists = true;\n }\n if (keyExists) {\n var item = {\n key: key,\n field: groupCol.getColDef().field,\n rowGroupColumn: groupCol\n };\n res.push(item);\n }\n });\n return res;\n };\n __decorate([\n Autowired('columnModel')\n ], GroupStage.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired('selectableService')\n ], GroupStage.prototype, \"selectableService\", void 0);\n __decorate([\n Autowired('valueService')\n ], GroupStage.prototype, \"valueService\", void 0);\n __decorate([\n Autowired('beans')\n ], GroupStage.prototype, \"beans\", void 0);\n __decorate([\n Autowired('selectionService')\n ], GroupStage.prototype, \"selectionService\", void 0);\n __decorate([\n PostConstruct\n ], GroupStage.prototype, \"postConstruct\", null);\n GroupStage = __decorate([\n Bean('groupStage')\n ], GroupStage);\n return GroupStage;\n}(BeanStub));\nexport { GroupStage };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n};\nimport { Autowired, Bean, BeanStub, _ } from \"@ag-grid-community/core\";\nvar PivotColDefService = /** @class */ (function (_super) {\n __extends(PivotColDefService, _super);\n function PivotColDefService() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n PivotColDefService_1 = PivotColDefService;\n PivotColDefService.prototype.createPivotColumnDefs = function (uniqueValues) {\n // this is passed to the columnModel, to configure the columns and groups we show\n var pivotColumns = this.columnModel.getPivotColumns();\n var valueColumns = this.columnModel.getValueColumns();\n var levelsDeep = pivotColumns.length;\n var pivotColumnGroupDefs = this.recursiveBuildGroup(0, uniqueValues, [], levelsDeep, pivotColumns);\n function extractColDefs(input, arr) {\n if (arr === void 0) { arr = []; }\n input.forEach(function (def) {\n if (def.children !== undefined) {\n extractColDefs(def.children, arr);\n }\n else {\n arr.push(def);\n }\n });\n return arr;\n }\n var pivotColumnDefs = extractColDefs(pivotColumnGroupDefs);\n // additional columns that contain the aggregated total for each value column per row\n this.addRowGroupTotals(pivotColumnGroupDefs, pivotColumnDefs, valueColumns);\n // additional group columns that contain child totals for each collapsed child column / group\n this.addExpandablePivotGroups(pivotColumnGroupDefs, pivotColumnDefs);\n // additional group columns that contain an aggregated total across all child columns\n this.addPivotTotalsToGroups(pivotColumnGroupDefs, pivotColumnDefs);\n // we clone, so the colDefs in pivotColumnsGroupDefs and pivotColumnDefs are not shared. this is so that\n // any changes the user makes (via processSecondaryColumnDefinitions) don't impact the internal aggregations,\n // as these use the col defs also\n var pivotColumnDefsClone = pivotColumnDefs.map(function (colDef) { return _.cloneObject(colDef); });\n return {\n pivotColumnGroupDefs: pivotColumnGroupDefs,\n pivotColumnDefs: pivotColumnDefsClone\n };\n };\n PivotColDefService.prototype.recursiveBuildGroup = function (index, uniqueValue, pivotKeys, maxDepth, primaryPivotColumns) {\n var _this = this;\n var measureColumns = this.columnModel.getValueColumns();\n if (index >= maxDepth) { // Base case - build the measure columns\n return this.buildMeasureCols(pivotKeys);\n }\n // sort by either user provided comparator, or our own one\n var primaryPivotColumnDefs = primaryPivotColumns[index].getColDef();\n var comparator = this.headerNameComparator.bind(this, primaryPivotColumnDefs.pivotComparator);\n // Base case for the compact layout, instead of recursing build the last layer of groups as measure columns instead\n if (measureColumns.length === 1 && this.gridOptionsWrapper.isRemovePivotHeaderRowWhenSingleValueColumn() && index === maxDepth - 1) {\n var leafCols_1 = [];\n _.iterateObject(uniqueValue, function (key) {\n var newPivotKeys = __spread(pivotKeys, [key]);\n leafCols_1.push(__assign(__assign({}, _this.createColDef(measureColumns[0], key, newPivotKeys)), { columnGroupShow: 'open' }));\n });\n leafCols_1.sort(comparator);\n return leafCols_1;\n }\n // Recursive case\n var groups = [];\n _.iterateObject(uniqueValue, function (key, value) {\n var newPivotKeys = __spread(pivotKeys, [key]);\n groups.push({\n children: _this.recursiveBuildGroup(index + 1, value, newPivotKeys, maxDepth, primaryPivotColumns),\n headerName: key,\n pivotKeys: newPivotKeys,\n columnGroupShow: 'open',\n groupId: _this.generateColumnGroupId(newPivotKeys),\n });\n });\n groups.sort(comparator);\n return groups;\n };\n PivotColDefService.prototype.buildMeasureCols = function (pivotKeys) {\n var _this = this;\n var measureColumns = this.columnModel.getValueColumns();\n if (measureColumns.length === 0) {\n // if no value columns selected, then we insert one blank column, so the user at least sees columns\n // rendered. otherwise the grid would render with no columns (just empty groups) which would give the\n // impression that the grid is broken\n return [this.createColDef(null, '-', pivotKeys)];\n }\n return measureColumns.map(function (measureCol) {\n var columnName = _this.columnModel.getDisplayNameForColumn(measureCol, 'header');\n return __assign(__assign({}, _this.createColDef(measureCol, columnName, pivotKeys)), { columnGroupShow: 'open' });\n });\n };\n ;\n PivotColDefService.prototype.addExpandablePivotGroups = function (pivotColumnGroupDefs, pivotColumnDefs) {\n var _this = this;\n if (this.gridOptionsWrapper.isSuppressExpandablePivotGroups() ||\n this.gridOptionsWrapper.getPivotColumnGroupTotals()) {\n return;\n }\n var recursivelyAddSubTotals = function (groupDef, currentPivotColumnDefs, acc) {\n var group = groupDef;\n if (group.children) {\n var childAcc_1 = new Map();\n group.children.forEach(function (grp) {\n recursivelyAddSubTotals(grp, currentPivotColumnDefs, childAcc_1);\n });\n var firstGroup_1 = !group.children.some(function (child) { return child.children; });\n _this.columnModel.getValueColumns().forEach(function (valueColumn) {\n var columnName = _this.columnModel.getDisplayNameForColumn(valueColumn, 'header');\n var totalColDef = _this.createColDef(valueColumn, columnName, groupDef.pivotKeys);\n totalColDef.pivotTotalColumnIds = childAcc_1.get(valueColumn.getColId());\n totalColDef.columnGroupShow = 'closed';\n totalColDef.aggFunc = valueColumn.getAggFunc();\n if (!firstGroup_1) {\n // add total colDef to group and pivot colDefs array\n var children = groupDef.children;\n children.push(totalColDef);\n currentPivotColumnDefs.push(totalColDef);\n }\n });\n _this.merge(acc, childAcc_1);\n }\n else {\n var def = groupDef;\n // check that value column exists, i.e. aggFunc is supplied\n if (!def.pivotValueColumn) {\n return;\n }\n var pivotValueColId = def.pivotValueColumn.getColId();\n var arr = acc.has(pivotValueColId) ? acc.get(pivotValueColId) : [];\n arr.push(def.colId);\n acc.set(pivotValueColId, arr);\n }\n };\n pivotColumnGroupDefs.forEach(function (groupDef) {\n recursivelyAddSubTotals(groupDef, pivotColumnDefs, new Map());\n });\n };\n PivotColDefService.prototype.addPivotTotalsToGroups = function (pivotColumnGroupDefs, pivotColumnDefs) {\n var _this = this;\n if (!this.gridOptionsWrapper.getPivotColumnGroupTotals()) {\n return;\n }\n var insertAfter = this.gridOptionsWrapper.getPivotColumnGroupTotals() === 'after';\n var valueCols = this.columnModel.getValueColumns();\n var aggFuncs = valueCols.map(function (valueCol) { return valueCol.getAggFunc(); });\n // don't add pivot totals if there is less than 1 aggFunc or they are not all the same\n if (!aggFuncs || aggFuncs.length < 1 || !this.sameAggFuncs(aggFuncs)) {\n // console.warn('AG Grid: aborting adding pivot total columns - value columns require same aggFunc');\n return;\n }\n // arbitrarily select a value column to use as a template for pivot columns\n var valueColumn = valueCols[0];\n pivotColumnGroupDefs.forEach(function (groupDef) {\n _this.recursivelyAddPivotTotal(groupDef, pivotColumnDefs, valueColumn, insertAfter);\n });\n };\n PivotColDefService.prototype.recursivelyAddPivotTotal = function (groupDef, pivotColumnDefs, valueColumn, insertAfter) {\n var _this = this;\n var group = groupDef;\n if (!group.children) {\n var def = groupDef;\n return def.colId ? [def.colId] : null;\n }\n var colIds = [];\n // need to recurse children first to obtain colIds used in the aggregation stage\n group.children\n .forEach(function (grp) {\n var childColIds = _this.recursivelyAddPivotTotal(grp, pivotColumnDefs, valueColumn, insertAfter);\n if (childColIds) {\n colIds = colIds.concat(childColIds);\n }\n });\n // only add total colDef if there is more than 1 child node\n if (group.children.length > 1) {\n var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n var headerName = localeTextFunc('pivotColumnGroupTotals', 'Total');\n //create total colDef using an arbitrary value column as a template\n var totalColDef = this.createColDef(valueColumn, headerName, groupDef.pivotKeys, true);\n totalColDef.pivotTotalColumnIds = colIds;\n totalColDef.aggFunc = valueColumn.getAggFunc();\n // add total colDef to group and pivot colDefs array\n var children = groupDef.children;\n insertAfter ? children.push(totalColDef) : children.unshift(totalColDef);\n pivotColumnDefs.push(totalColDef);\n }\n return colIds;\n };\n PivotColDefService.prototype.addRowGroupTotals = function (pivotColumnGroupDefs, pivotColumnDefs, valueColumns) {\n var _this = this;\n if (!this.gridOptionsWrapper.getPivotRowTotals()) {\n return;\n }\n var insertAfter = this.gridOptionsWrapper.getPivotRowTotals() === 'after';\n // order of row group totals depends on position\n var valueCols = insertAfter ? valueColumns.slice() : valueColumns.slice().reverse();\n var _loop_1 = function (i) {\n var valueCol = valueCols[i];\n var colIds = [];\n pivotColumnGroupDefs.forEach(function (groupDef) {\n colIds = colIds.concat(_this.extractColIdsForValueColumn(groupDef, valueCol));\n });\n this_1.createRowGroupTotal(pivotColumnGroupDefs, pivotColumnDefs, valueCol, colIds, insertAfter);\n };\n var this_1 = this;\n for (var i = 0; i < valueCols.length; i++) {\n _loop_1(i);\n }\n };\n PivotColDefService.prototype.extractColIdsForValueColumn = function (groupDef, valueColumn) {\n var _this = this;\n var group = groupDef;\n if (!group.children) {\n var colDef = group;\n return colDef.pivotValueColumn === valueColumn && colDef.colId ? [colDef.colId] : [];\n }\n var colIds = [];\n group.children\n .forEach(function (grp) {\n _this.extractColIdsForValueColumn(grp, valueColumn);\n var childColIds = _this.extractColIdsForValueColumn(grp, valueColumn);\n colIds = colIds.concat(childColIds);\n });\n return colIds;\n };\n PivotColDefService.prototype.createRowGroupTotal = function (parentChildren, pivotColumnDefs, valueColumn, colIds, insertAfter) {\n var measureColumns = this.columnModel.getValueColumns();\n var colDef;\n if (measureColumns.length === 0) {\n colDef = this.createColDef(null, '-', []);\n }\n else {\n var columnName = this.columnModel.getDisplayNameForColumn(valueColumn, 'header');\n colDef = this.createColDef(valueColumn, columnName, []);\n colDef.pivotTotalColumnIds = colIds;\n }\n colDef.colId = PivotColDefService_1.PIVOT_ROW_TOTAL_PREFIX + colDef.colId;\n pivotColumnDefs.push(colDef);\n insertAfter ? parentChildren.push(colDef) : parentChildren.unshift(colDef);\n };\n PivotColDefService.prototype.createColDef = function (valueColumn, headerName, pivotKeys, totalColumn) {\n if (totalColumn === void 0) { totalColumn = false; }\n var colDef = {};\n // This is null when there are no measure columns and we're creating placeholder columns\n if (valueColumn) {\n var colDefToCopy = valueColumn.getColDef();\n Object.assign(colDef, colDefToCopy);\n // even if original column was hidden, we always show the pivot value column, otherwise it would be\n // very confusing for people thinking the pivot is broken\n colDef.hide = false;\n }\n colDef.headerName = headerName;\n colDef.colId = this.generateColumnId(pivotKeys || [], valueColumn && !totalColumn ? valueColumn.getColId() : '');\n // pivot columns repeat over field, so it makes sense to use the unique id instead. For example if you want to\n // assign values to pinned bottom rows using setPinnedBottomRowData the value service will use this colId.\n colDef.field = colDef.colId;\n colDef.pivotKeys = pivotKeys;\n colDef.pivotValueColumn = valueColumn;\n if (colDef.filter === true) {\n colDef.filter = 'agNumberColumnFilter';\n }\n return colDef;\n };\n PivotColDefService.prototype.sameAggFuncs = function (aggFuncs) {\n if (aggFuncs.length == 1) {\n return true;\n }\n //check if all aggFunc's match\n for (var i = 1; i < aggFuncs.length; i++) {\n if (aggFuncs[i] !== aggFuncs[0]) {\n return false;\n }\n }\n return true;\n };\n PivotColDefService.prototype.headerNameComparator = function (userComparator, a, b) {\n if (userComparator) {\n return userComparator(a.headerName, b.headerName);\n }\n else {\n if (a.headerName && !b.headerName) {\n return 1;\n }\n else if (!a.headerName && b.headerName) {\n return -1;\n }\n // slightly naff here - just to satify typescript\n // really should be &&, but if so ts complains\n // the above if/else checks would deal with either being falsy, so at this stage if either are falsy, both are\n // ..still naff though\n if (!a.headerName || !b.headerName) {\n return 0;\n }\n if (a.headerName < b.headerName) {\n return -1;\n }\n if (a.headerName > b.headerName) {\n return 1;\n }\n return 0;\n }\n };\n PivotColDefService.prototype.merge = function (m1, m2) {\n m2.forEach(function (value, key, map) {\n var existingList = m1.has(key) ? m1.get(key) : [];\n var updatedList = __spread(existingList, value);\n m1.set(key, updatedList);\n });\n };\n PivotColDefService.prototype.generateColumnGroupId = function (pivotKeys) {\n var pivotCols = this.columnModel.getPivotColumns().map(function (col) { return col.getColId(); });\n return \"pivotGroup_\" + pivotCols.join('-') + \"_\" + pivotKeys.join('-');\n };\n PivotColDefService.prototype.generateColumnId = function (pivotKeys, measureColumnId) {\n var pivotCols = this.columnModel.getPivotColumns().map(function (col) { return col.getColId(); });\n return \"pivot_\" + pivotCols.join('-') + \"_\" + pivotKeys.join('-') + \"_\" + measureColumnId;\n };\n var PivotColDefService_1;\n PivotColDefService.PIVOT_ROW_TOTAL_PREFIX = 'PivotRowTotal_';\n __decorate([\n Autowired('columnModel')\n ], PivotColDefService.prototype, \"columnModel\", void 0);\n PivotColDefService = PivotColDefService_1 = __decorate([\n Bean('pivotColDefService')\n ], PivotColDefService);\n return PivotColDefService;\n}(BeanStub));\nexport { PivotColDefService };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Bean, BeanStub, _ } from \"@ag-grid-community/core\";\nvar PivotStage = /** @class */ (function (_super) {\n __extends(PivotStage, _super);\n function PivotStage() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.uniqueValues = {};\n return _this;\n }\n PivotStage.prototype.execute = function (params) {\n var rootNode = params.rowNode;\n var changedPath = params.changedPath;\n if (this.columnModel.isPivotActive()) {\n this.executePivotOn(rootNode, changedPath);\n }\n else {\n this.executePivotOff(changedPath);\n }\n };\n PivotStage.prototype.executePivotOff = function (changedPath) {\n this.aggregationColumnsHashLastTime = null;\n this.uniqueValues = {};\n if (this.columnModel.isSecondaryColumnsPresent()) {\n this.columnModel.setSecondaryColumns(null, \"rowModelUpdated\");\n if (changedPath) {\n changedPath.setInactive();\n }\n }\n };\n PivotStage.prototype.executePivotOn = function (rootNode, changedPath) {\n var uniqueValues = this.bucketUpRowNodes(rootNode);\n var uniqueValuesChanged = this.setUniqueValues(uniqueValues);\n var aggregationColumns = this.columnModel.getValueColumns();\n var aggregationColumnsHash = aggregationColumns.map(function (column) { return column.getId() + \"-\" + column.getColDef().headerName; }).join('#');\n var aggregationFuncsHash = aggregationColumns.map(function (column) { return column.getAggFunc().toString(); }).join('#');\n var aggregationColumnsChanged = this.aggregationColumnsHashLastTime !== aggregationColumnsHash;\n var aggregationFuncsChanged = this.aggregationFuncsHashLastTime !== aggregationFuncsHash;\n this.aggregationColumnsHashLastTime = aggregationColumnsHash;\n this.aggregationFuncsHashLastTime = aggregationFuncsHash;\n if (uniqueValuesChanged || aggregationColumnsChanged || aggregationFuncsChanged) {\n var _a = this.pivotColDefService.createPivotColumnDefs(this.uniqueValues), pivotColumnGroupDefs = _a.pivotColumnGroupDefs, pivotColumnDefs = _a.pivotColumnDefs;\n this.pivotColumnDefs = pivotColumnDefs;\n this.columnModel.setSecondaryColumns(pivotColumnGroupDefs, \"rowModelUpdated\");\n // because the secondary columns have changed, then the aggregation needs to visit the whole\n // tree again, so we make the changedPath not active, to force aggregation to visit all paths.\n if (changedPath) {\n changedPath.setInactive();\n }\n }\n };\n PivotStage.prototype.setUniqueValues = function (newValues) {\n var json1 = JSON.stringify(newValues);\n var json2 = JSON.stringify(this.uniqueValues);\n var uniqueValuesChanged = json1 !== json2;\n // we only continue the below if the unique values are different, as otherwise\n // the result will be the same as the last time we did it\n if (uniqueValuesChanged) {\n this.uniqueValues = newValues;\n return true;\n }\n else {\n return false;\n }\n };\n // returns true if values were different\n PivotStage.prototype.bucketUpRowNodes = function (rootNode) {\n var _this = this;\n // accessed from inside inner function\n var uniqueValues = {};\n // finds all leaf groups and calls mapRowNode with it\n var recursivelySearchForLeafNodes = function (rowNode) {\n if (rowNode.leafGroup) {\n _this.bucketRowNode(rowNode, uniqueValues);\n }\n else {\n rowNode.childrenAfterFilter.forEach(function (child) {\n recursivelySearchForLeafNodes(child);\n });\n }\n };\n recursivelySearchForLeafNodes(rootNode);\n return uniqueValues;\n };\n PivotStage.prototype.bucketRowNode = function (rowNode, uniqueValues) {\n var pivotColumns = this.columnModel.getPivotColumns();\n if (pivotColumns.length === 0) {\n rowNode.childrenMapped = null;\n }\n else {\n rowNode.childrenMapped = this.bucketChildren(rowNode.childrenAfterFilter, pivotColumns, 0, uniqueValues);\n }\n if (rowNode.sibling) {\n rowNode.sibling.childrenMapped = rowNode.childrenMapped;\n }\n };\n PivotStage.prototype.bucketChildren = function (children, pivotColumns, pivotIndex, uniqueValues) {\n var _this = this;\n var mappedChildren = {};\n var pivotColumn = pivotColumns[pivotIndex];\n // map the children out based on the pivot column\n children.forEach(function (child) {\n var key = _this.valueService.getKeyForNode(pivotColumn, child);\n if (_.missing(key)) {\n key = '';\n }\n if (!uniqueValues[key]) {\n uniqueValues[key] = {};\n }\n if (!mappedChildren[key]) {\n mappedChildren[key] = [];\n }\n mappedChildren[key].push(child);\n });\n // if it's the last pivot column, return as is, otherwise go one level further in the map\n if (pivotIndex === pivotColumns.length - 1) {\n return mappedChildren;\n }\n else {\n var result_1 = {};\n _.iterateObject(mappedChildren, function (key, value) {\n result_1[key] = _this.bucketChildren(value, pivotColumns, pivotIndex + 1, uniqueValues[key]);\n });\n return result_1;\n }\n };\n PivotStage.prototype.getPivotColumnDefs = function () {\n return this.pivotColumnDefs;\n };\n __decorate([\n Autowired('valueService')\n ], PivotStage.prototype, \"valueService\", void 0);\n __decorate([\n Autowired('columnModel')\n ], PivotStage.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired('pivotColDefService')\n ], PivotStage.prototype, \"pivotColDefService\", void 0);\n PivotStage = __decorate([\n Bean('pivotStage')\n ], PivotStage);\n return PivotStage;\n}(BeanStub));\nexport { PivotStage };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Bean, BeanStub, PostConstruct, _ } from '@ag-grid-community/core';\n// @ts-ignore\nvar AGBigInt = typeof BigInt === 'undefined' ? null : BigInt;\nvar AggFuncService = /** @class */ (function (_super) {\n __extends(AggFuncService, _super);\n function AggFuncService() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.aggFuncsMap = {};\n _this.initialised = false;\n return _this;\n }\n AggFuncService_1 = AggFuncService;\n AggFuncService.prototype.init = function () {\n if (this.initialised) {\n return;\n }\n this.initialiseWithDefaultAggregations();\n this.addAggFuncs(this.gridOptionsWrapper.getAggFuncs());\n };\n AggFuncService.prototype.initialiseWithDefaultAggregations = function () {\n this.aggFuncsMap[AggFuncService_1.AGG_SUM] = aggSum;\n this.aggFuncsMap[AggFuncService_1.AGG_FIRST] = aggFirst;\n this.aggFuncsMap[AggFuncService_1.AGG_LAST] = aggLast;\n this.aggFuncsMap[AggFuncService_1.AGG_MIN] = aggMin;\n this.aggFuncsMap[AggFuncService_1.AGG_MAX] = aggMax;\n this.aggFuncsMap[AggFuncService_1.AGG_COUNT] = aggCount;\n this.aggFuncsMap[AggFuncService_1.AGG_AVG] = aggAvg;\n this.initialised = true;\n };\n AggFuncService.prototype.isAggFuncPossible = function (column, func) {\n var allKeys = this.getFuncNames(column);\n var allowed = _.includes(allKeys, func);\n var funcExists = _.exists(this.aggFuncsMap[func]);\n return allowed && funcExists;\n };\n AggFuncService.prototype.getDefaultAggFunc = function (column) {\n var defaultAgg = column.getColDef().defaultAggFunc;\n if (_.exists(defaultAgg) && this.isAggFuncPossible(column, defaultAgg)) {\n return defaultAgg;\n }\n if (this.isAggFuncPossible(column, AggFuncService_1.AGG_SUM)) {\n return AggFuncService_1.AGG_SUM;\n }\n var allKeys = this.getFuncNames(column);\n return _.existsAndNotEmpty(allKeys) ? allKeys[0] : null;\n };\n AggFuncService.prototype.addAggFuncs = function (aggFuncs) {\n _.iterateObject(aggFuncs, this.addAggFunc.bind(this));\n };\n AggFuncService.prototype.addAggFunc = function (key, aggFunc) {\n this.init();\n this.aggFuncsMap[key] = aggFunc;\n };\n AggFuncService.prototype.getAggFunc = function (name) {\n this.init();\n return this.aggFuncsMap[name];\n };\n AggFuncService.prototype.getFuncNames = function (column) {\n var userAllowedFuncs = column.getColDef().allowedAggFuncs;\n return userAllowedFuncs == null ? Object.keys(this.aggFuncsMap).sort() : userAllowedFuncs;\n };\n AggFuncService.prototype.clear = function () {\n this.aggFuncsMap = {};\n };\n var AggFuncService_1;\n AggFuncService.AGG_SUM = 'sum';\n AggFuncService.AGG_FIRST = 'first';\n AggFuncService.AGG_LAST = 'last';\n AggFuncService.AGG_MIN = 'min';\n AggFuncService.AGG_MAX = 'max';\n AggFuncService.AGG_COUNT = 'count';\n AggFuncService.AGG_AVG = 'avg';\n __decorate([\n PostConstruct\n ], AggFuncService.prototype, \"init\", null);\n AggFuncService = AggFuncService_1 = __decorate([\n Bean('aggFuncService')\n ], AggFuncService);\n return AggFuncService;\n}(BeanStub));\nexport { AggFuncService };\nfunction aggSum(params) {\n var values = params.values;\n var result = null; // the logic ensures that we never combine bigint arithmetic with numbers, but TS is hard to please\n // for optimum performance, we use a for loop here rather than calling any helper methods or using functional code\n for (var i = 0; i < values.length; i++) {\n var value = values[i];\n if (typeof value === 'number') {\n if (result === null) {\n result = value;\n }\n else {\n if (AGBigInt) {\n result += typeof result === 'number' ? value : AGBigInt(value);\n }\n else {\n result += value;\n }\n }\n }\n else if (typeof value === 'bigint') {\n if (result === null) {\n result = value;\n }\n else {\n result = (typeof result === 'bigint' ? result : AGBigInt(result)) + value;\n }\n }\n }\n return result;\n}\nfunction aggFirst(params) {\n return params.values.length > 0 ? params.values[0] : null;\n}\nfunction aggLast(params) {\n return params.values.length > 0 ? _.last(params.values) : null;\n}\nfunction aggMin(params) {\n var values = params.values;\n var result = null;\n // for optimum performance, we use a for loop here rather than calling any helper methods or using functional code\n for (var i = 0; i < values.length; i++) {\n var value = values[i];\n if ((typeof value === 'number' || typeof value === 'bigint') && (result === null || result > value)) {\n result = value;\n }\n }\n return result;\n}\nfunction aggMax(params) {\n var values = params.values;\n var result = null;\n // for optimum performance, we use a for loop here rather than calling any helper methods or using functional code\n for (var i = 0; i < values.length; i++) {\n var value = values[i];\n if ((typeof value === 'number' || typeof value === 'bigint') && (result === null || result < value)) {\n result = value;\n }\n }\n return result;\n}\nfunction aggCount(params) {\n var values = params.values;\n var result = 0;\n // for optimum performance, we use a for loop here rather than calling any helper methods or using functional code\n for (var i = 0; i < values.length; i++) {\n var value = values[i];\n // check if the value is from a group, in which case use the group's count\n result += value != null && typeof value.value === 'number' ? value.value : 1;\n }\n return {\n value: result,\n toString: function () {\n return this.value.toString();\n },\n // used for sorting\n toNumber: function () {\n return this.value;\n }\n };\n}\n// the average function is tricky as the multiple levels require weighted averages\n// for the non-leaf node aggregations.\nfunction aggAvg(params) {\n var values = params.values;\n var sum = 0; // the logic ensures that we never combine bigint arithmetic with numbers, but TS is hard to please\n var count = 0;\n // for optimum performance, we use a for loop here rather than calling any helper methods or using functional code\n for (var i = 0; i < values.length; i++) {\n var currentValue = values[i];\n var valueToAdd = null;\n if (typeof currentValue === 'number' || typeof currentValue === 'bigint') {\n valueToAdd = currentValue;\n count++;\n }\n else if (currentValue != null && (typeof currentValue.value === 'number' || typeof currentValue.value === 'bigint') && typeof currentValue.count === 'number') {\n // we are aggregating groups, so we take the aggregated values to calculated a weighted average\n if (AGBigInt) {\n valueToAdd = currentValue.value * (typeof currentValue.value === 'number' ? currentValue.count : AGBigInt(currentValue.count));\n }\n else {\n valueToAdd = currentValue.value * currentValue.count;\n }\n count += currentValue.count;\n }\n if (typeof valueToAdd === 'number') {\n if (AGBigInt) {\n sum += typeof sum === 'number' ? valueToAdd : AGBigInt(valueToAdd);\n }\n else {\n sum += valueToAdd;\n }\n }\n else if (typeof valueToAdd === 'bigint') {\n sum = (typeof sum === 'bigint' ? sum : AGBigInt(sum)) + valueToAdd;\n }\n }\n var value = null;\n // avoid divide by zero error\n if (count > 0) {\n if (AGBigInt) {\n value = sum / (typeof sum === 'number' ? count : AGBigInt(count));\n }\n else {\n value = sum / count;\n }\n }\n // the result will be an object. when this cell is rendered, only the avg is shown.\n // however when this cell is part of another aggregation, the count is also needed\n // to create a weighted average for the next level.\n return {\n count: count,\n value: value,\n // the grid by default uses toString to render values for an object, so this\n // is a trick to get the default cellRenderer to display the avg value\n toString: function () {\n return typeof this.value === 'number' || typeof this.value === 'bigint' ? this.value.toString() : '';\n },\n // used for sorting\n toNumber: function () {\n return this.value;\n }\n };\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { DragSourceType, Component, Autowired, Events, TouchListener, DragAndDropService, PostConstruct, RefSelector, Optional, VirtualList, KeyCode, _, } from \"@ag-grid-community/core\";\nvar DropZoneColumnComp = /** @class */ (function (_super) {\n __extends(DropZoneColumnComp, _super);\n function DropZoneColumnComp(column, dragSourceDropTarget, ghost, valueColumn, horizontal) {\n var _this = _super.call(this) || this;\n _this.column = column;\n _this.dragSourceDropTarget = dragSourceDropTarget;\n _this.ghost = ghost;\n _this.valueColumn = valueColumn;\n _this.horizontal = horizontal;\n _this.popupShowing = false;\n return _this;\n }\n DropZoneColumnComp.prototype.init = function () {\n this.setTemplate(DropZoneColumnComp.TEMPLATE);\n var eGui = this.getGui();\n var isFunctionsReadOnly = this.gridOptionsWrapper.isFunctionsReadOnly();\n this.addElementClasses(eGui);\n this.addElementClasses(this.eDragHandle, 'drag-handle');\n this.addElementClasses(this.eText, 'text');\n this.addElementClasses(this.eButton, 'button');\n this.eDragHandle.appendChild(_.createIconNoSpan('columnDrag', this.gridOptionsWrapper));\n this.eButton.appendChild(_.createIconNoSpan('cancel', this.gridOptionsWrapper));\n this.displayName = this.columnModel.getDisplayNameForColumn(this.column, 'columnDrop');\n this.setupComponents();\n if (!this.ghost && !isFunctionsReadOnly) {\n this.addDragSource();\n }\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n var label = translate('ariaDropZoneColumnComponentDescription', 'Press DELETE to remove');\n var _a = this.getColumnAndAggFuncName(), name = _a.name, aggFuncName = _a.aggFuncName;\n var extraDescription = '';\n if (this.valueColumn && !isFunctionsReadOnly) {\n extraDescription = translate('ariaDropZoneColumnValueItemDescription', 'Press ENTER to change the aggregation type');\n }\n _.setAriaLabel(eGui, aggFuncName + \" \" + name + \" \" + label + \" \" + extraDescription);\n this.setupTooltip();\n };\n DropZoneColumnComp.prototype.setupTooltip = function () {\n var _this = this;\n var refresh = function () {\n var newTooltipText = _this.column.getColDef().headerTooltip;\n _this.setTooltip(newTooltipText);\n };\n refresh();\n this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, refresh);\n };\n DropZoneColumnComp.prototype.addDragSource = function () {\n var _this = this;\n var dragSource = {\n type: DragSourceType.ToolPanel,\n eElement: this.eDragHandle,\n defaultIconName: DragAndDropService.ICON_HIDE,\n getDragItem: function () { return _this.createDragItem(); },\n dragItemName: this.displayName,\n dragSourceDropTarget: this.dragSourceDropTarget\n };\n this.dragAndDropService.addDragSource(dragSource, true);\n this.addDestroyFunc(function () { return _this.dragAndDropService.removeDragSource(dragSource); });\n };\n DropZoneColumnComp.prototype.createDragItem = function () {\n var visibleState = {};\n visibleState[this.column.getId()] = this.column.isVisible();\n return {\n columns: [this.column],\n visibleState: visibleState\n };\n };\n DropZoneColumnComp.prototype.setupComponents = function () {\n this.setTextValue();\n this.setupRemove();\n if (this.ghost) {\n this.addCssClass('ag-column-drop-cell-ghost');\n }\n if (this.valueColumn && !this.gridOptionsWrapper.isFunctionsReadOnly()) {\n this.addGuiEventListener('click', this.onShowAggFuncSelection.bind(this));\n }\n };\n DropZoneColumnComp.prototype.setupRemove = function () {\n var _this = this;\n _.setDisplayed(this.eButton, !this.gridOptionsWrapper.isFunctionsReadOnly());\n var agEvent = { type: DropZoneColumnComp.EVENT_COLUMN_REMOVE };\n this.addGuiEventListener('keydown', function (e) {\n var isEnter = e.key === KeyCode.ENTER;\n var isDelete = e.key === KeyCode.DELETE;\n if (isDelete) {\n e.preventDefault();\n _this.dispatchEvent(agEvent);\n }\n if (isEnter && _this.valueColumn && !_this.gridOptionsWrapper.isFunctionsReadOnly()) {\n e.preventDefault();\n _this.onShowAggFuncSelection();\n }\n });\n this.addManagedListener(this.eButton, 'click', function (mouseEvent) {\n _this.dispatchEvent(agEvent);\n mouseEvent.stopPropagation();\n });\n var touchListener = new TouchListener(this.eButton);\n this.addManagedListener(touchListener, TouchListener.EVENT_TAP, function () {\n _this.dispatchEvent(agEvent);\n });\n this.addDestroyFunc(touchListener.destroy.bind(touchListener));\n };\n DropZoneColumnComp.prototype.getColumnAndAggFuncName = function () {\n var name = this.displayName;\n var aggFuncName = '';\n if (this.valueColumn) {\n var aggFunc = this.column.getAggFunc();\n // if aggFunc is a string, we can use it, but if it's a function, then we swap with 'func'\n var aggFuncString = typeof aggFunc === 'string' ? aggFunc : 'agg';\n var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n aggFuncName = localeTextFunc(aggFuncString, aggFuncString);\n }\n return { name: name, aggFuncName: aggFuncName };\n };\n DropZoneColumnComp.prototype.setTextValue = function () {\n var _a = this.getColumnAndAggFuncName(), name = _a.name, aggFuncName = _a.aggFuncName;\n var displayValue = this.valueColumn ? aggFuncName + \"(\" + name + \")\" : name;\n var displayValueSanitised = _.escapeString(displayValue);\n this.eText.innerHTML = displayValueSanitised;\n };\n DropZoneColumnComp.prototype.onShowAggFuncSelection = function () {\n var _this = this;\n if (this.popupShowing) {\n return;\n }\n this.popupShowing = true;\n var virtualList = new VirtualList('select-agg-func');\n var rows = this.aggFuncService.getFuncNames(this.column);\n var eGui = this.getGui();\n var virtualListGui = virtualList.getGui();\n virtualList.setModel({\n getRow: function (index) { return rows[index]; },\n getRowCount: function () { return rows.length; }\n });\n this.getContext().createBean(virtualList);\n var ePopup = _.loadTemplate(/* html*/ \"
\");\n ePopup.style.top = '0px';\n ePopup.style.left = '0px';\n ePopup.appendChild(virtualListGui);\n // ePopup.style.height = this.gridOptionsWrapper.getAggFuncPopupHeight() + 'px';\n ePopup.style.width = eGui.clientWidth + \"px\";\n var popupHiddenFunc = function () {\n _this.destroyBean(virtualList);\n _this.popupShowing = false;\n eGui.focus();\n };\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n var addPopupRes = this.popupService.addPopup({\n modal: true,\n eChild: ePopup,\n closeOnEsc: true,\n closedCallback: popupHiddenFunc,\n ariaLabel: translate('ariaLabelAggregationFunction', 'Aggregation Function')\n });\n if (addPopupRes) {\n virtualList.setComponentCreator(this.createAggSelect.bind(this, addPopupRes.hideFunc));\n }\n virtualList.addGuiEventListener('keydown', function (e) {\n if (e.key === KeyCode.ENTER || e.key === KeyCode.SPACE) {\n var row = virtualList.getLastFocusedRow();\n if (row == null) {\n return;\n }\n var comp = virtualList.getComponentAt(row);\n if (comp) {\n comp.selectItem();\n }\n }\n });\n this.popupService.positionPopupUnderComponent({\n type: 'aggFuncSelect',\n eventSource: eGui,\n ePopup: ePopup,\n keepWithinBounds: true,\n column: this.column\n });\n virtualList.refresh();\n var rowToFocus = rows.findIndex(function (r) { return r === _this.column.getAggFunc(); });\n if (rowToFocus === -1) {\n rowToFocus = 0;\n }\n virtualList.focusRow(rowToFocus);\n };\n DropZoneColumnComp.prototype.createAggSelect = function (hidePopup, value) {\n var _this = this;\n var itemSelected = function () {\n hidePopup();\n if (_this.gridOptionsWrapper.isFunctionsPassive()) {\n var event_1 = {\n type: Events.EVENT_COLUMN_AGG_FUNC_CHANGE_REQUEST,\n columns: [_this.column],\n aggFunc: value,\n api: _this.gridApi,\n columnApi: _this.columnApi\n };\n _this.eventService.dispatchEvent(event_1);\n }\n else {\n _this.columnModel.setColumnAggFunc(_this.column, value, \"toolPanelDragAndDrop\");\n }\n };\n var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n var aggFuncString = value.toString();\n var aggFuncStringTranslated = localeTextFunc(aggFuncString, aggFuncString);\n var comp = new AggItemComp(itemSelected, aggFuncStringTranslated);\n return comp;\n };\n DropZoneColumnComp.prototype.addElementClasses = function (el, suffix) {\n suffix = suffix ? \"-\" + suffix : '';\n var direction = this.horizontal ? 'horizontal' : 'vertical';\n el.classList.add(\"ag-column-drop-cell\" + suffix, \"ag-column-drop-\" + direction + \"-cell\" + suffix);\n };\n DropZoneColumnComp.EVENT_COLUMN_REMOVE = 'columnRemove';\n DropZoneColumnComp.TEMPLATE = \"\\n \\n \\n \\n \";\n __decorate([\n Autowired('dragAndDropService')\n ], DropZoneColumnComp.prototype, \"dragAndDropService\", void 0);\n __decorate([\n Autowired('columnModel')\n ], DropZoneColumnComp.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired('popupService')\n ], DropZoneColumnComp.prototype, \"popupService\", void 0);\n __decorate([\n Optional('aggFuncService')\n ], DropZoneColumnComp.prototype, \"aggFuncService\", void 0);\n __decorate([\n Autowired('columnApi')\n ], DropZoneColumnComp.prototype, \"columnApi\", void 0);\n __decorate([\n Autowired('gridApi')\n ], DropZoneColumnComp.prototype, \"gridApi\", void 0);\n __decorate([\n RefSelector('eText')\n ], DropZoneColumnComp.prototype, \"eText\", void 0);\n __decorate([\n RefSelector('eDragHandle')\n ], DropZoneColumnComp.prototype, \"eDragHandle\", void 0);\n __decorate([\n RefSelector('eButton')\n ], DropZoneColumnComp.prototype, \"eButton\", void 0);\n __decorate([\n PostConstruct\n ], DropZoneColumnComp.prototype, \"init\", null);\n return DropZoneColumnComp;\n}(Component));\nexport { DropZoneColumnComp };\nvar AggItemComp = /** @class */ (function (_super) {\n __extends(AggItemComp, _super);\n function AggItemComp(itemSelected, value) {\n var _this = _super.call(this, /* html */ \"
\") || this;\n _this.selectItem = itemSelected;\n _this.getGui().innerText = value;\n _this.addGuiEventListener('click', _this.selectItem);\n return _this;\n }\n return AggItemComp;\n}(Component));\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Component, DragSourceType, Events, HorizontalDirection, KeyCode, ManagedFocusFeature, PositionableFeature, VerticalDirection, _ } from \"@ag-grid-community/core\";\nimport { DropZoneColumnComp } from \"./dropZoneColumnComp\";\nvar BaseDropZonePanel = /** @class */ (function (_super) {\n __extends(BaseDropZonePanel, _super);\n function BaseDropZonePanel(horizontal, valueColumn) {\n var _this = _super.call(this, /* html */ \"
\") || this;\n _this.horizontal = horizontal;\n _this.valueColumn = valueColumn;\n _this.state = BaseDropZonePanel.STATE_NOT_DRAGGING;\n _this.guiDestroyFunctions = [];\n _this.childColumnComponents = [];\n _this.resizeEnabled = false;\n _this.addElementClasses(_this.getGui());\n _this.eColumnDropList = document.createElement('div');\n _this.addElementClasses(_this.eColumnDropList, 'list');\n _.setAriaRole(_this.eColumnDropList, 'listbox');\n return _this;\n }\n BaseDropZonePanel.prototype.isHorizontal = function () {\n return this.horizontal;\n };\n BaseDropZonePanel.prototype.toggleResizable = function (resizable) {\n this.positionableFeature.setResizable(resizable ? { bottom: true } : false);\n this.resizeEnabled = resizable;\n };\n BaseDropZonePanel.prototype.setBeans = function (beans) {\n this.beans = beans;\n };\n BaseDropZonePanel.prototype.destroy = function () {\n this.destroyGui();\n _super.prototype.destroy.call(this);\n };\n BaseDropZonePanel.prototype.destroyGui = function () {\n this.guiDestroyFunctions.forEach(function (func) { return func(); });\n this.guiDestroyFunctions.length = 0;\n this.childColumnComponents.length = 0;\n _.clearElement(this.getGui());\n _.clearElement(this.eColumnDropList);\n };\n BaseDropZonePanel.prototype.init = function (params) {\n this.params = params;\n this.createManagedBean(new ManagedFocusFeature(this.getFocusableElement(), {\n handleKeyDown: this.handleKeyDown.bind(this)\n }));\n this.addManagedListener(this.beans.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.refreshGui.bind(this));\n this.addManagedListener(this.beans.gridOptionsWrapper, 'functionsReadOnly', this.refreshGui.bind(this));\n this.setupDropTarget();\n this.positionableFeature = new PositionableFeature(this.getGui(), { minHeight: 100 });\n this.createManagedBean(this.positionableFeature);\n // we don't know if this bean will be initialised before columnModel.\n // if columnModel first, then below will work\n // if columnModel second, then below will put blank in, and then above event gets first when columnModel is set up\n this.refreshGui();\n _.setAriaLabel(this.eColumnDropList, this.getAriaLabel());\n };\n BaseDropZonePanel.prototype.handleKeyDown = function (e) {\n var isVertical = !this.horizontal;\n var isNext = e.key === KeyCode.DOWN;\n var isPrevious = e.key === KeyCode.UP;\n if (!isVertical) {\n var isRtl = this.gridOptionsWrapper.isEnableRtl();\n isNext = (!isRtl && e.key === KeyCode.RIGHT) || (isRtl && e.key === KeyCode.LEFT);\n isPrevious = (!isRtl && e.key === KeyCode.LEFT) || (isRtl && e.key === KeyCode.RIGHT);\n }\n if (!isNext && !isPrevious) {\n return;\n }\n var el = this.focusService.findNextFocusableElement(this.getFocusableElement(), false, isPrevious);\n if (el) {\n e.preventDefault();\n el.focus();\n }\n };\n BaseDropZonePanel.prototype.addElementClasses = function (el, suffix) {\n suffix = suffix ? \"-\" + suffix : '';\n var direction = this.horizontal ? 'horizontal' : 'vertical';\n el.classList.add(\"ag-column-drop\" + suffix, \"ag-column-drop-\" + direction + suffix);\n };\n BaseDropZonePanel.prototype.setupDropTarget = function () {\n this.dropTarget = {\n getContainer: this.getGui.bind(this),\n getIconName: this.getIconName.bind(this),\n onDragging: this.onDragging.bind(this),\n onDragEnter: this.onDragEnter.bind(this),\n onDragLeave: this.onDragLeave.bind(this),\n onDragStop: this.onDragStop.bind(this),\n isInterestedIn: this.isInterestedIn.bind(this)\n };\n this.beans.dragAndDropService.addDropTarget(this.dropTarget);\n };\n BaseDropZonePanel.prototype.isInterestedIn = function (type) {\n // not interested in row drags\n return type === DragSourceType.HeaderCell || type === DragSourceType.ToolPanel;\n };\n BaseDropZonePanel.prototype.checkInsertIndex = function (draggingEvent) {\n var newIndex = this.horizontal ? this.getNewHorizontalInsertIndex(draggingEvent) : this.getNewVerticalInsertIndex(draggingEvent);\n // <0 happens when drag is no a direction we are interested in, eg drag is up/down but in horizontal panel\n if (newIndex < 0) {\n return false;\n }\n var changed = newIndex !== this.insertIndex;\n if (changed) {\n this.insertIndex = newIndex;\n }\n return changed;\n };\n BaseDropZonePanel.prototype.getNewHorizontalInsertIndex = function (draggingEvent) {\n if (_.missing(draggingEvent.hDirection)) {\n return -1;\n }\n var newIndex = 0;\n var mouseEvent = draggingEvent.event;\n var enableRtl = this.beans.gridOptionsWrapper.isEnableRtl();\n var goingLeft = draggingEvent.hDirection === HorizontalDirection.Left;\n var mouseX = mouseEvent.clientX;\n this.childColumnComponents.forEach(function (childColumn) {\n var rect = childColumn.getGui().getBoundingClientRect();\n var rectX = goingLeft ? rect.right : rect.left;\n var horizontalFit = enableRtl ? mouseX <= rectX : mouseX >= rectX;\n if (horizontalFit) {\n newIndex++;\n }\n });\n return newIndex;\n };\n BaseDropZonePanel.prototype.getNewVerticalInsertIndex = function (draggingEvent) {\n if (_.missing(draggingEvent.vDirection)) {\n return -1;\n }\n var newIndex = 0;\n var mouseEvent = draggingEvent.event;\n this.childColumnComponents.forEach(function (childColumn) {\n var rect = childColumn.getGui().getBoundingClientRect();\n var verticalFit = mouseEvent.clientY >= (draggingEvent.vDirection === VerticalDirection.Down ? rect.top : rect.bottom);\n if (verticalFit) {\n newIndex++;\n }\n });\n return newIndex;\n };\n BaseDropZonePanel.prototype.checkDragStartedBySelf = function (draggingEvent) {\n if (this.state !== BaseDropZonePanel.STATE_NOT_DRAGGING) {\n return;\n }\n this.state = BaseDropZonePanel.STATE_REARRANGE_COLUMNS;\n this.potentialDndColumns = draggingEvent.dragSource.getDragItem().columns || [];\n this.refreshGui();\n this.checkInsertIndex(draggingEvent);\n this.refreshGui();\n };\n BaseDropZonePanel.prototype.onDragging = function (draggingEvent) {\n this.checkDragStartedBySelf(draggingEvent);\n if (this.checkInsertIndex(draggingEvent)) {\n this.refreshGui();\n }\n };\n BaseDropZonePanel.prototype.onDragEnter = function (draggingEvent) {\n // this will contain all columns that are potential drops\n var dragColumns = draggingEvent.dragSource.getDragItem().columns || [];\n this.state = BaseDropZonePanel.STATE_NEW_COLUMNS_IN;\n // take out columns that are not droppable\n var goodDragColumns = dragColumns.filter(this.isColumnDroppable.bind(this));\n if (goodDragColumns.length > 0) {\n this.potentialDndColumns = goodDragColumns;\n this.checkInsertIndex(draggingEvent);\n this.refreshGui();\n }\n };\n BaseDropZonePanel.prototype.isPotentialDndColumns = function () {\n return _.existsAndNotEmpty(this.potentialDndColumns);\n };\n BaseDropZonePanel.prototype.onDragLeave = function (draggingEvent) {\n // if the dragging started from us, we remove the group, however if it started\n // some place else, then we don't, as it was only 'asking'\n if (this.state === BaseDropZonePanel.STATE_REARRANGE_COLUMNS) {\n var columns = draggingEvent.dragSource.getDragItem().columns || [];\n this.removeColumns(columns);\n }\n if (this.isPotentialDndColumns()) {\n this.potentialDndColumns = [];\n this.refreshGui();\n }\n this.state = BaseDropZonePanel.STATE_NOT_DRAGGING;\n };\n BaseDropZonePanel.prototype.onDragStop = function () {\n if (this.isPotentialDndColumns()) {\n var success = false;\n if (this.state === BaseDropZonePanel.STATE_NEW_COLUMNS_IN) {\n this.addColumns(this.potentialDndColumns);\n success = true;\n }\n else {\n success = this.rearrangeColumns(this.potentialDndColumns);\n }\n this.potentialDndColumns = [];\n // If the function is passive, then we don't refresh, as we assume the client application\n // is going to call setRowGroups / setPivots / setValues at a later point which will then\n // cause a refresh. This gives a nice GUI where the ghost stays until the app has caught\n // up with the changes. However, if there was no change in the order, then we do need to\n // refresh to reset the columns\n if (!this.beans.gridOptionsWrapper.isFunctionsPassive() || !success) {\n this.refreshGui();\n }\n }\n this.state = BaseDropZonePanel.STATE_NOT_DRAGGING;\n };\n BaseDropZonePanel.prototype.removeColumns = function (columnsToRemove) {\n var newColumnList = this.getExistingColumns().filter(function (col) { return !_.includes(columnsToRemove, col); });\n this.updateColumns(newColumnList);\n };\n BaseDropZonePanel.prototype.addColumns = function (columnsToAdd) {\n if (!columnsToAdd) {\n return;\n }\n var newColumnList = this.getExistingColumns().slice();\n var colsToAddNoDuplicates = columnsToAdd.filter(function (col) { return newColumnList.indexOf(col) < 0; });\n _.insertArrayIntoArray(newColumnList, colsToAddNoDuplicates, this.insertIndex);\n this.updateColumns(newColumnList);\n };\n BaseDropZonePanel.prototype.rearrangeColumns = function (columnsToAdd) {\n var newColumnList = this.getNonGhostColumns().slice();\n _.insertArrayIntoArray(newColumnList, columnsToAdd, this.insertIndex);\n if (_.areEqual(newColumnList, this.getExistingColumns())) {\n return false;\n }\n this.updateColumns(newColumnList);\n return true;\n };\n BaseDropZonePanel.prototype.refreshGui = function () {\n // we reset the scroll position after the refresh.\n // if we don't do this, then the list will always scroll to the top\n // each time we refresh it. this is because part of the refresh empties\n // out the list which sets scroll to zero. so the user could be just\n // reordering the list - we want to prevent the resetting of the scroll.\n // this is relevant for vertical display only (as horizontal has no scroll)\n var scrollTop = this.eColumnDropList.scrollTop;\n var resizeEnabled = this.resizeEnabled;\n var focusedIndex = this.getFocusedItem();\n var alternateElement = this.focusService.findNextFocusableElement();\n if (!alternateElement) {\n alternateElement = this.focusService.findNextFocusableElement(undefined, false, true);\n }\n this.toggleResizable(false);\n this.destroyGui();\n this.addIconAndTitleToGui();\n this.addEmptyMessageToGui();\n this.addColumnsToGui();\n if (!this.isHorizontal()) {\n this.eColumnDropList.scrollTop = scrollTop;\n }\n if (resizeEnabled) {\n this.toggleResizable(resizeEnabled);\n }\n this.restoreFocus(focusedIndex, alternateElement);\n };\n BaseDropZonePanel.prototype.getFocusedItem = function () {\n var eGui = this.getGui();\n var activeElement = this.gridOptionsWrapper.getDocument().activeElement;\n if (!eGui.contains(activeElement)) {\n return -1;\n }\n var items = Array.from(eGui.querySelectorAll('.ag-column-drop-cell'));\n return items.indexOf(activeElement);\n };\n BaseDropZonePanel.prototype.restoreFocus = function (index, alternateElement) {\n var eGui = this.getGui();\n var items = Array.from(eGui.querySelectorAll('.ag-column-drop-cell'));\n if (index === -1) {\n return;\n }\n if (items.length === 0) {\n alternateElement.focus();\n }\n var indexToFocus = Math.min(items.length - 1, index);\n var el = items[indexToFocus];\n if (el) {\n el.focus();\n }\n };\n BaseDropZonePanel.prototype.getNonGhostColumns = function () {\n var _this = this;\n var existingColumns = this.getExistingColumns();\n if (this.isPotentialDndColumns()) {\n return existingColumns.filter(function (column) { return !_.includes(_this.potentialDndColumns, column); });\n }\n return existingColumns;\n };\n BaseDropZonePanel.prototype.addColumnsToGui = function () {\n var _this = this;\n var nonGhostColumns = this.getNonGhostColumns();\n var addingGhosts = this.isPotentialDndColumns();\n var itemsToAddToGui = [];\n nonGhostColumns.forEach(function (column, index) {\n if (addingGhosts && index >= _this.insertIndex) {\n return;\n }\n var columnComponent = _this.createColumnComponent(column, false);\n itemsToAddToGui.push(columnComponent);\n });\n if (this.isPotentialDndColumns()) {\n this.potentialDndColumns.forEach(function (column) {\n var columnComponent = _this.createColumnComponent(column, true);\n itemsToAddToGui.push(columnComponent);\n });\n nonGhostColumns.forEach(function (column, index) {\n if (index < _this.insertIndex) {\n return;\n }\n var columnComponent = _this.createColumnComponent(column, false);\n itemsToAddToGui.push(columnComponent);\n });\n }\n this.appendChild(this.eColumnDropList);\n itemsToAddToGui.forEach(function (columnComponent, index) {\n if (index > 0) {\n _this.addArrow(_this.eColumnDropList);\n }\n _this.eColumnDropList.appendChild(columnComponent.getGui());\n });\n this.addAriaLabelsToComponents();\n };\n BaseDropZonePanel.prototype.addAriaLabelsToComponents = function () {\n var _this = this;\n this.childColumnComponents.forEach(function (comp, idx) {\n var eGui = comp.getGui();\n _.setAriaPosInSet(eGui, idx + 1);\n _.setAriaSetSize(eGui, _this.childColumnComponents.length);\n });\n };\n BaseDropZonePanel.prototype.createColumnComponent = function (column, ghost) {\n var _this = this;\n var columnComponent = new DropZoneColumnComp(column, this.dropTarget, ghost, this.valueColumn, this.horizontal);\n columnComponent.addEventListener(DropZoneColumnComp.EVENT_COLUMN_REMOVE, this.removeColumns.bind(this, [column]));\n this.beans.context.createBean(columnComponent);\n this.guiDestroyFunctions.push(function () { return _this.destroyBean(columnComponent); });\n if (!ghost) {\n this.childColumnComponents.push(columnComponent);\n }\n return columnComponent;\n };\n BaseDropZonePanel.prototype.addIconAndTitleToGui = function () {\n var eGroupIcon = this.params.icon;\n var eTitleBar = document.createElement('div');\n eTitleBar.setAttribute('aria-hidden', 'true');\n this.addElementClasses(eTitleBar, 'title-bar');\n this.addElementClasses(eGroupIcon, 'icon');\n this.addOrRemoveCssClass('ag-column-drop-empty', this.isExistingColumnsEmpty());\n eTitleBar.appendChild(eGroupIcon);\n if (!this.horizontal) {\n var eTitle = document.createElement('span');\n this.addElementClasses(eTitle, 'title');\n eTitle.innerHTML = this.params.title;\n eTitleBar.appendChild(eTitle);\n }\n this.appendChild(eTitleBar);\n };\n BaseDropZonePanel.prototype.isExistingColumnsEmpty = function () {\n return this.getExistingColumns().length === 0;\n };\n BaseDropZonePanel.prototype.addEmptyMessageToGui = function () {\n if (!this.isExistingColumnsEmpty() || this.isPotentialDndColumns()) {\n return;\n }\n var eMessage = document.createElement('span');\n eMessage.innerHTML = this.params.emptyMessage;\n this.addElementClasses(eMessage, 'empty-message');\n this.eColumnDropList.appendChild(eMessage);\n };\n BaseDropZonePanel.prototype.addArrow = function (eParent) {\n // only add the arrows if the layout is horizontal\n if (this.horizontal) {\n // for RTL it's a left arrow, otherwise it's a right arrow\n var enableRtl = this.beans.gridOptionsWrapper.isEnableRtl();\n var icon = _.createIconNoSpan(enableRtl ? 'smallLeft' : 'smallRight', this.beans.gridOptionsWrapper);\n this.addElementClasses(icon, 'cell-separator');\n eParent.appendChild(icon);\n }\n };\n BaseDropZonePanel.STATE_NOT_DRAGGING = 'notDragging';\n BaseDropZonePanel.STATE_NEW_COLUMNS_IN = 'newColumnsIn';\n BaseDropZonePanel.STATE_REARRANGE_COLUMNS = 'rearrangeColumns';\n __decorate([\n Autowired('focusService')\n ], BaseDropZonePanel.prototype, \"focusService\", void 0);\n return BaseDropZonePanel;\n}(Component));\nexport { BaseDropZonePanel };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, DragAndDropService, Events, PostConstruct } from \"@ag-grid-community/core\";\nimport { BaseDropZonePanel } from \"./baseDropZonePanel\";\nvar RowGroupDropZonePanel = /** @class */ (function (_super) {\n __extends(RowGroupDropZonePanel, _super);\n function RowGroupDropZonePanel(horizontal) {\n return _super.call(this, horizontal, false) || this;\n }\n RowGroupDropZonePanel.prototype.passBeansUp = function () {\n _super.prototype.setBeans.call(this, {\n gridOptionsWrapper: this.gridOptionsWrapper,\n eventService: this.eventService,\n context: this.getContext(),\n loggerFactory: this.loggerFactory,\n dragAndDropService: this.dragAndDropService\n });\n var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n var emptyMessage = localeTextFunc('rowGroupColumnsEmptyMessage', 'Drag here to set row groups');\n var title = localeTextFunc('groups', 'Row Groups');\n _super.prototype.init.call(this, {\n dragAndDropIcon: DragAndDropService.ICON_GROUP,\n icon: _.createIconNoSpan('rowGroupPanel', this.gridOptionsWrapper, null),\n emptyMessage: emptyMessage,\n title: title\n });\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_ROW_GROUP_CHANGED, this.refreshGui.bind(this));\n };\n RowGroupDropZonePanel.prototype.getAriaLabel = function () {\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n var label = translate('ariaRowGroupDropZonePanelLabel', 'Row Groups');\n return label;\n };\n RowGroupDropZonePanel.prototype.getTooltipParams = function () {\n var res = _super.prototype.getTooltipParams.call(this);\n res.location = 'rowGroupColumnsList';\n return res;\n };\n RowGroupDropZonePanel.prototype.isColumnDroppable = function (column) {\n // we never allow grouping of secondary columns\n if (this.gridOptionsWrapper.isFunctionsReadOnly() || !column.isPrimary()) {\n return false;\n }\n return column.isAllowRowGroup() && !column.isRowGroupActive();\n };\n RowGroupDropZonePanel.prototype.updateColumns = function (columns) {\n if (this.gridOptionsWrapper.isFunctionsPassive()) {\n var event_1 = {\n type: Events.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST,\n columns: columns,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event_1);\n }\n else {\n this.columnModel.setRowGroupColumns(columns, \"toolPanelUi\");\n }\n };\n RowGroupDropZonePanel.prototype.getIconName = function () {\n return this.isPotentialDndColumns() ? DragAndDropService.ICON_GROUP : DragAndDropService.ICON_NOT_ALLOWED;\n };\n RowGroupDropZonePanel.prototype.getExistingColumns = function () {\n return this.columnModel.getRowGroupColumns();\n };\n __decorate([\n Autowired('columnModel')\n ], RowGroupDropZonePanel.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired('loggerFactory')\n ], RowGroupDropZonePanel.prototype, \"loggerFactory\", void 0);\n __decorate([\n Autowired('dragAndDropService')\n ], RowGroupDropZonePanel.prototype, \"dragAndDropService\", void 0);\n __decorate([\n Autowired('columnApi')\n ], RowGroupDropZonePanel.prototype, \"columnApi\", void 0);\n __decorate([\n Autowired('gridApi')\n ], RowGroupDropZonePanel.prototype, \"gridApi\", void 0);\n __decorate([\n PostConstruct\n ], RowGroupDropZonePanel.prototype, \"passBeansUp\", null);\n return RowGroupDropZonePanel;\n}(BaseDropZonePanel));\nexport { RowGroupDropZonePanel };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, DragAndDropService, Events, PostConstruct } from \"@ag-grid-community/core\";\nimport { BaseDropZonePanel } from \"./baseDropZonePanel\";\nvar PivotDropZonePanel = /** @class */ (function (_super) {\n __extends(PivotDropZonePanel, _super);\n function PivotDropZonePanel(horizontal) {\n return _super.call(this, horizontal, false) || this;\n }\n PivotDropZonePanel.prototype.passBeansUp = function () {\n _super.prototype.setBeans.call(this, {\n gridOptionsWrapper: this.gridOptionsWrapper,\n eventService: this.eventService,\n context: this.getContext(),\n loggerFactory: this.loggerFactory,\n dragAndDropService: this.dragAndDropService\n });\n var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n var emptyMessage = localeTextFunc('pivotColumnsEmptyMessage', 'Drag here to set column labels');\n var title = localeTextFunc('pivots', 'Column Labels');\n _super.prototype.init.call(this, {\n dragAndDropIcon: DragAndDropService.ICON_GROUP,\n icon: _.createIconNoSpan('pivotPanel', this.gridOptionsWrapper, null),\n emptyMessage: emptyMessage,\n title: title\n });\n this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.refresh.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PIVOT_CHANGED, this.refresh.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, this.checkVisibility.bind(this));\n this.refresh();\n };\n PivotDropZonePanel.prototype.getAriaLabel = function () {\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n var label = translate('ariaPivotDropZonePanelLabel', 'Column Labels');\n return label;\n };\n PivotDropZonePanel.prototype.getTooltipParams = function () {\n var res = _super.prototype.getTooltipParams.call(this);\n res.location = 'pivotColumnsList';\n return res;\n };\n PivotDropZonePanel.prototype.refresh = function () {\n this.checkVisibility();\n this.refreshGui();\n };\n PivotDropZonePanel.prototype.checkVisibility = function () {\n var pivotMode = this.columnModel.isPivotMode();\n if (this.isHorizontal()) {\n // what we do for horizontal (ie the pivot panel at the top) depends\n // on the user property as well as pivotMode.\n switch (this.gridOptionsWrapper.getPivotPanelShow()) {\n case 'always':\n this.setDisplayed(pivotMode);\n break;\n case 'onlyWhenPivoting':\n var pivotActive = this.columnModel.isPivotActive();\n this.setDisplayed(pivotMode && pivotActive);\n break;\n default:\n // never show it\n this.setDisplayed(false);\n break;\n }\n }\n else {\n // in toolPanel, the pivot panel is always shown when pivot mode is on\n this.setDisplayed(pivotMode);\n }\n };\n PivotDropZonePanel.prototype.isColumnDroppable = function (column) {\n // we never allow grouping of secondary columns\n if (this.gridOptionsWrapper.isFunctionsReadOnly() || !column.isPrimary()) {\n return false;\n }\n return column.isAllowPivot() && !column.isPivotActive();\n };\n PivotDropZonePanel.prototype.updateColumns = function (columns) {\n if (this.gridOptionsWrapper.isFunctionsPassive()) {\n var event_1 = {\n type: Events.EVENT_COLUMN_PIVOT_CHANGE_REQUEST,\n columns: columns,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event_1);\n }\n else {\n this.columnModel.setPivotColumns(columns, \"toolPanelUi\");\n }\n };\n PivotDropZonePanel.prototype.getIconName = function () {\n return this.isPotentialDndColumns() ? DragAndDropService.ICON_PIVOT : DragAndDropService.ICON_NOT_ALLOWED;\n };\n PivotDropZonePanel.prototype.getExistingColumns = function () {\n return this.columnModel.getPivotColumns();\n };\n __decorate([\n Autowired('columnModel')\n ], PivotDropZonePanel.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired('loggerFactory')\n ], PivotDropZonePanel.prototype, \"loggerFactory\", void 0);\n __decorate([\n Autowired('dragAndDropService')\n ], PivotDropZonePanel.prototype, \"dragAndDropService\", void 0);\n __decorate([\n Autowired('columnApi')\n ], PivotDropZonePanel.prototype, \"columnApi\", void 0);\n __decorate([\n Autowired('gridApi')\n ], PivotDropZonePanel.prototype, \"gridApi\", void 0);\n __decorate([\n PostConstruct\n ], PivotDropZonePanel.prototype, \"passBeansUp\", null);\n return PivotDropZonePanel;\n}(BaseDropZonePanel));\nexport { PivotDropZonePanel };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Component, Constants, Events, PostConstruct, _ } from \"@ag-grid-community/core\";\nimport { RowGroupDropZonePanel } from \"./rowGroupDropZonePanel\";\nimport { PivotDropZonePanel } from \"./pivotDropZonePanel\";\nvar GridHeaderDropZones = /** @class */ (function (_super) {\n __extends(GridHeaderDropZones, _super);\n function GridHeaderDropZones() {\n return _super.call(this) || this;\n }\n GridHeaderDropZones.prototype.postConstruct = function () {\n this.setGui(this.createNorthPanel());\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_ROW_GROUP_CHANGED, this.onRowGroupChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.onRowGroupChanged.bind(this));\n this.onRowGroupChanged();\n };\n GridHeaderDropZones.prototype.createNorthPanel = function () {\n var topPanelGui = document.createElement('div');\n var dropPanelVisibleListener = this.onDropPanelVisible.bind(this);\n topPanelGui.classList.add('ag-column-drop-wrapper');\n _.setAriaRole(topPanelGui, 'presentation');\n this.rowGroupComp = new RowGroupDropZonePanel(true);\n this.createManagedBean(this.rowGroupComp);\n this.pivotComp = new PivotDropZonePanel(true);\n this.createManagedBean(this.pivotComp);\n topPanelGui.appendChild(this.rowGroupComp.getGui());\n topPanelGui.appendChild(this.pivotComp.getGui());\n this.addManagedListener(this.rowGroupComp, Component.EVENT_DISPLAYED_CHANGED, dropPanelVisibleListener);\n this.addManagedListener(this.pivotComp, Component.EVENT_DISPLAYED_CHANGED, dropPanelVisibleListener);\n this.onDropPanelVisible();\n return topPanelGui;\n };\n GridHeaderDropZones.prototype.onDropPanelVisible = function () {\n var bothDisplayed = this.rowGroupComp.isDisplayed() && this.pivotComp.isDisplayed();\n this.rowGroupComp.addOrRemoveCssClass('ag-column-drop-horizontal-half-width', bothDisplayed);\n this.pivotComp.addOrRemoveCssClass('ag-column-drop-horizontal-half-width', bothDisplayed);\n };\n GridHeaderDropZones.prototype.onRowGroupChanged = function () {\n if (!this.rowGroupComp) {\n return;\n }\n var rowGroupPanelShow = this.gridOptionsWrapper.getRowGroupPanelShow();\n if (rowGroupPanelShow === Constants.ALWAYS) {\n this.rowGroupComp.setDisplayed(true);\n }\n else if (rowGroupPanelShow === Constants.ONLY_WHEN_GROUPING) {\n var grouping = !this.columnModel.isRowGroupEmpty();\n this.rowGroupComp.setDisplayed(grouping);\n }\n else {\n this.rowGroupComp.setDisplayed(false);\n }\n };\n __decorate([\n Autowired('columnModel')\n ], GridHeaderDropZones.prototype, \"columnModel\", void 0);\n __decorate([\n PostConstruct\n ], GridHeaderDropZones.prototype, \"postConstruct\", null);\n return GridHeaderDropZones;\n}(Component));\nexport { GridHeaderDropZones };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Bean, BeanStub, } from \"@ag-grid-community/core\";\nvar FilterAggregatesStage = /** @class */ (function (_super) {\n __extends(FilterAggregatesStage, _super);\n function FilterAggregatesStage() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n FilterAggregatesStage.prototype.execute = function (params) {\n var _this = this;\n var isPivotMode = this.columnModel.isPivotMode();\n var isAggFilterActive = this.filterManager.isAggregateFilterPresent();\n // This is the default filter for applying only to leaf nodes, realistically this should not apply as primary agg columns,\n // should not be applied by the filterManager if getGroupAggFiltering is missing. Predicate will apply filters to leaf level.\n var defaultPrimaryColumnPredicate = function (params) { return !params.node.group; };\n // Default secondary column predicate, selecting only leaf level groups.\n var defaultSecondaryColumnPredicate = (function (params) { return params.node.leafGroup; });\n // The predicate to determine whether filters should apply to this row. Either defined by the user in groupAggFiltering or a default depending\n // on current pivot mode status.\n var applyFilterToNode = this.gridOptionsWrapper.getGroupAggFiltering()\n || (isPivotMode ? defaultSecondaryColumnPredicate : defaultPrimaryColumnPredicate);\n var changedPath = params.changedPath;\n var preserveChildren = function (node, recursive) {\n if (recursive === void 0) { recursive = false; }\n if (node.childrenAfterFilter) {\n node.childrenAfterAggFilter = node.childrenAfterFilter;\n if (recursive) {\n node.childrenAfterAggFilter.forEach(function (child) { return preserveChildren(child, recursive); });\n }\n _this.setAllChildrenCount(node);\n }\n if (node.sibling) {\n node.sibling.childrenAfterAggFilter = node.childrenAfterAggFilter;\n }\n };\n var filterChildren = function (node) {\n var _a;\n node.childrenAfterAggFilter = ((_a = node.childrenAfterFilter) === null || _a === void 0 ? void 0 : _a.filter(function (child) {\n var _a;\n var shouldFilterRow = applyFilterToNode({ node: child });\n if (shouldFilterRow) {\n var doesNodePassFilter = _this.filterManager.doesRowPassAggregateFilters({ rowNode: child });\n if (doesNodePassFilter) {\n // Node has passed, so preserve children\n preserveChildren(child, true);\n return true;\n }\n }\n var hasChildPassed = (_a = child.childrenAfterAggFilter) === null || _a === void 0 ? void 0 : _a.length;\n return hasChildPassed;\n })) || null;\n _this.setAllChildrenCount(node);\n if (node.sibling) {\n node.sibling.childrenAfterAggFilter = node.childrenAfterAggFilter;\n }\n };\n changedPath.forEachChangedNodeDepthFirst(isAggFilterActive ? filterChildren : preserveChildren, true);\n };\n FilterAggregatesStage.prototype.setAllChildrenCountTreeData = function (rowNode) {\n // for tree data, we include all children, groups and leafs\n var allChildrenCount = 0;\n rowNode.childrenAfterAggFilter.forEach(function (child) {\n // include child itself\n allChildrenCount++;\n // include children of children\n allChildrenCount += child.allChildrenCount;\n });\n rowNode.setAllChildrenCount(allChildrenCount);\n };\n FilterAggregatesStage.prototype.setAllChildrenCountGridGrouping = function (rowNode) {\n // for grid data, we only count the leafs\n var allChildrenCount = 0;\n rowNode.childrenAfterAggFilter.forEach(function (child) {\n if (child.group) {\n allChildrenCount += child.allChildrenCount;\n }\n else {\n allChildrenCount++;\n }\n });\n rowNode.setAllChildrenCount(allChildrenCount);\n };\n FilterAggregatesStage.prototype.setAllChildrenCount = function (rowNode) {\n if (!rowNode.hasChildren()) {\n rowNode.setAllChildrenCount(null);\n return;\n }\n if (this.gridOptionsWrapper.isTreeData()) {\n this.setAllChildrenCountTreeData(rowNode);\n }\n else {\n this.setAllChildrenCountGridGrouping(rowNode);\n }\n };\n __decorate([\n Autowired('filterManager')\n ], FilterAggregatesStage.prototype, \"filterManager\", void 0);\n __decorate([\n Autowired('columnModel')\n ], FilterAggregatesStage.prototype, \"columnModel\", void 0);\n FilterAggregatesStage = __decorate([\n Bean('filterAggregatesStage')\n ], FilterAggregatesStage);\n return FilterAggregatesStage;\n}(BeanStub));\nexport { FilterAggregatesStage };\n","import { ModuleNames } from \"@ag-grid-community/core\";\nimport { EnterpriseCoreModule } from \"@ag-grid-enterprise/core\";\nimport { AggregationStage } from \"./rowGrouping/aggregationStage\";\nimport { GroupStage } from \"./rowGrouping/groupStage\";\nimport { PivotColDefService } from \"./rowGrouping/pivotColDefService\";\nimport { PivotStage } from \"./rowGrouping/pivotStage\";\nimport { AggFuncService } from \"./rowGrouping/aggFuncService\";\nimport { GridHeaderDropZones } from \"./rowGrouping/columnDropZones/gridHeaderDropZones\";\nimport { FilterAggregatesStage } from \"./rowGrouping/filterAggregatesStage\";\nexport var RowGroupingModule = {\n moduleName: ModuleNames.RowGroupingModule,\n beans: [AggregationStage, FilterAggregatesStage, GroupStage, PivotColDefService, PivotStage, AggFuncService],\n agStackComponents: [\n { componentName: 'AgGridHeaderDropZones', componentClass: GridHeaderDropZones }\n ],\n dependantModules: [\n EnterpriseCoreModule\n ]\n};\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, DragAndDropService, Events, PostConstruct } from \"@ag-grid-community/core\";\nimport { BaseDropZonePanel } from \"./baseDropZonePanel\";\nvar ValuesDropZonePanel = /** @class */ (function (_super) {\n __extends(ValuesDropZonePanel, _super);\n function ValuesDropZonePanel(horizontal) {\n return _super.call(this, horizontal, true) || this;\n }\n ValuesDropZonePanel.prototype.passBeansUp = function () {\n _super.prototype.setBeans.call(this, {\n gridOptionsWrapper: this.gridOptionsWrapper,\n eventService: this.eventService,\n context: this.getContext(),\n loggerFactory: this.loggerFactory,\n dragAndDropService: this.dragAndDropService\n });\n var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n var emptyMessage = localeTextFunc('valueColumnsEmptyMessage', 'Drag here to aggregate');\n var title = localeTextFunc('values', 'Values');\n _super.prototype.init.call(this, {\n dragAndDropIcon: DragAndDropService.ICON_AGGREGATE,\n icon: _.createIconNoSpan('valuePanel', this.gridOptionsWrapper, null),\n emptyMessage: emptyMessage,\n title: title\n });\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_VALUE_CHANGED, this.refreshGui.bind(this));\n };\n ValuesDropZonePanel.prototype.getAriaLabel = function () {\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n var label = translate('ariaValuesDropZonePanelLabel', 'Values');\n return label;\n };\n ValuesDropZonePanel.prototype.getTooltipParams = function () {\n var res = _super.prototype.getTooltipParams.call(this);\n res.location = 'valueColumnsList';\n return res;\n };\n ValuesDropZonePanel.prototype.getIconName = function () {\n return this.isPotentialDndColumns() ? DragAndDropService.ICON_AGGREGATE : DragAndDropService.ICON_NOT_ALLOWED;\n };\n ValuesDropZonePanel.prototype.isColumnDroppable = function (column) {\n // we never allow grouping of secondary columns\n if (this.gridOptionsWrapper.isFunctionsReadOnly() || !column.isPrimary()) {\n return false;\n }\n return column.isAllowValue() && !column.isValueActive();\n };\n ValuesDropZonePanel.prototype.updateColumns = function (columns) {\n if (this.gridOptionsWrapper.isFunctionsPassive()) {\n var event_1 = {\n type: Events.EVENT_COLUMN_VALUE_CHANGE_REQUEST,\n columns: columns,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event_1);\n }\n else {\n this.columnModel.setValueColumns(columns, \"toolPanelUi\");\n }\n };\n ValuesDropZonePanel.prototype.getExistingColumns = function () {\n return this.columnModel.getValueColumns();\n };\n __decorate([\n Autowired('columnModel')\n ], ValuesDropZonePanel.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired('loggerFactory')\n ], ValuesDropZonePanel.prototype, \"loggerFactory\", void 0);\n __decorate([\n Autowired('dragAndDropService')\n ], ValuesDropZonePanel.prototype, \"dragAndDropService\", void 0);\n __decorate([\n Autowired('columnApi')\n ], ValuesDropZonePanel.prototype, \"columnApi\", void 0);\n __decorate([\n Autowired('gridApi')\n ], ValuesDropZonePanel.prototype, \"gridApi\", void 0);\n __decorate([\n PostConstruct\n ], ValuesDropZonePanel.prototype, \"passBeansUp\", null);\n return ValuesDropZonePanel;\n}(BaseDropZonePanel));\nexport { ValuesDropZonePanel };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { RefSelector, TabGuardComp, PositionableFeature, PostConstruct } from \"@ag-grid-community/core\";\nvar PrimaryColsPanel = /** @class */ (function (_super) {\n __extends(PrimaryColsPanel, _super);\n function PrimaryColsPanel() {\n return _super.call(this, PrimaryColsPanel.TEMPLATE) || this;\n }\n PrimaryColsPanel.prototype.postConstruct = function () {\n this.initialiseTabGuard({});\n };\n // we allow dragging in the toolPanel, but not when this component appears in the column menu\n PrimaryColsPanel.prototype.init = function (allowDragging, params, eventType) {\n this.allowDragging = allowDragging;\n this.params = params;\n this.eventType = eventType;\n this.primaryColsHeaderPanel.init(this.params);\n var hideFilter = this.params.suppressColumnFilter;\n var hideSelect = this.params.suppressColumnSelectAll;\n var hideExpand = this.params.suppressColumnExpandAll;\n if (hideExpand && hideFilter && hideSelect) {\n this.primaryColsHeaderPanel.setDisplayed(false);\n }\n this.addManagedListener(this.primaryColsListPanel, 'groupExpanded', this.onGroupExpanded.bind(this));\n this.addManagedListener(this.primaryColsListPanel, 'selectionChanged', this.onSelectionChange.bind(this));\n this.primaryColsListPanel.init(this.params, this.allowDragging, this.eventType);\n this.addManagedListener(this.primaryColsHeaderPanel, 'expandAll', this.onExpandAll.bind(this));\n this.addManagedListener(this.primaryColsHeaderPanel, 'collapseAll', this.onCollapseAll.bind(this));\n this.addManagedListener(this.primaryColsHeaderPanel, 'selectAll', this.onSelectAll.bind(this));\n this.addManagedListener(this.primaryColsHeaderPanel, 'unselectAll', this.onUnselectAll.bind(this));\n this.addManagedListener(this.primaryColsHeaderPanel, 'filterChanged', this.onFilterChanged.bind(this));\n this.positionableFeature = new PositionableFeature(this.getGui(), { minHeight: 100 });\n this.createManagedBean(this.positionableFeature);\n };\n PrimaryColsPanel.prototype.toggleResizable = function (resizable) {\n this.positionableFeature.setResizable(resizable ? { bottom: true } : false);\n };\n PrimaryColsPanel.prototype.onExpandAll = function () {\n this.primaryColsListPanel.doSetExpandedAll(true);\n };\n PrimaryColsPanel.prototype.onCollapseAll = function () {\n this.primaryColsListPanel.doSetExpandedAll(false);\n };\n PrimaryColsPanel.prototype.expandGroups = function (groupIds) {\n this.primaryColsListPanel.setGroupsExpanded(true, groupIds);\n };\n PrimaryColsPanel.prototype.collapseGroups = function (groupIds) {\n this.primaryColsListPanel.setGroupsExpanded(false, groupIds);\n };\n PrimaryColsPanel.prototype.setColumnLayout = function (colDefs) {\n this.primaryColsListPanel.setColumnLayout(colDefs);\n };\n PrimaryColsPanel.prototype.onFilterChanged = function (event) {\n this.primaryColsListPanel.setFilterText(event.filterText);\n };\n PrimaryColsPanel.prototype.syncLayoutWithGrid = function () {\n this.primaryColsListPanel.onColumnsChanged();\n };\n PrimaryColsPanel.prototype.onSelectAll = function () {\n this.primaryColsListPanel.doSetSelectedAll(true);\n };\n PrimaryColsPanel.prototype.onUnselectAll = function () {\n this.primaryColsListPanel.doSetSelectedAll(false);\n };\n PrimaryColsPanel.prototype.onGroupExpanded = function (event) {\n this.primaryColsHeaderPanel.setExpandState(event.state);\n };\n PrimaryColsPanel.prototype.onSelectionChange = function (event) {\n this.primaryColsHeaderPanel.setSelectionState(event.state);\n };\n PrimaryColsPanel.TEMPLATE = \"
\\n \\n \\n
\";\n __decorate([\n RefSelector('primaryColsHeaderPanel')\n ], PrimaryColsPanel.prototype, \"primaryColsHeaderPanel\", void 0);\n __decorate([\n RefSelector('primaryColsListPanel')\n ], PrimaryColsPanel.prototype, \"primaryColsListPanel\", void 0);\n __decorate([\n PostConstruct\n ], PrimaryColsPanel.prototype, \"postConstruct\", null);\n return PrimaryColsPanel;\n}(TabGuardComp));\nexport { PrimaryColsPanel };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, Component, Events, ModuleNames, ModuleRegistry } from \"@ag-grid-community/core\";\nimport { PivotModePanel } from \"./pivotModePanel\";\nimport { PivotDropZonePanel, RowGroupDropZonePanel, ValuesDropZonePanel } from \"@ag-grid-enterprise/row-grouping\";\nimport { PrimaryColsPanel } from \"./primaryColsPanel\";\nvar ColumnToolPanel = /** @class */ (function (_super) {\n __extends(ColumnToolPanel, _super);\n function ColumnToolPanel() {\n var _this = _super.call(this, ColumnToolPanel.TEMPLATE) || this;\n _this.initialised = false;\n _this.childDestroyFuncs = [];\n return _this;\n }\n // lazy initialise the panel\n ColumnToolPanel.prototype.setVisible = function (visible) {\n _super.prototype.setDisplayed.call(this, visible);\n if (visible && !this.initialised) {\n this.init(this.params);\n }\n };\n ColumnToolPanel.prototype.init = function (params) {\n var _this = this;\n var defaultParams = {\n suppressColumnMove: false,\n suppressColumnSelectAll: false,\n suppressColumnFilter: false,\n suppressColumnExpandAll: false,\n contractColumnSelection: false,\n suppressPivotMode: false,\n suppressRowGroups: false,\n suppressValues: false,\n suppressPivots: false,\n suppressSyncLayoutWithGrid: false,\n api: this.gridApi,\n columnApi: this.columnApi,\n context: this.gridOptionsWrapper.getContext()\n };\n _.mergeDeep(defaultParams, params);\n this.params = defaultParams;\n if (this.isRowGroupingModuleLoaded() && !this.params.suppressPivotMode) {\n this.pivotModePanel = this.createBean(new PivotModePanel()); // DO NOT CHANGE TO createManagedBean\n this.childDestroyFuncs.push(function () { return _this.destroyBean(_this.pivotModePanel); });\n this.appendChild(this.pivotModePanel);\n }\n this.primaryColsPanel = this.createBean(new PrimaryColsPanel()); // DO NOT CHANGE TO createManagedBean\n this.childDestroyFuncs.push(function () { return _this.destroyBean(_this.primaryColsPanel); });\n this.primaryColsPanel.init(true, this.params, \"toolPanelUi\");\n this.primaryColsPanel.addCssClass('ag-column-panel-column-select');\n this.appendChild(this.primaryColsPanel);\n if (this.isRowGroupingModuleLoaded()) {\n if (!this.params.suppressRowGroups) {\n this.rowGroupDropZonePanel = this.createBean(new RowGroupDropZonePanel(false)); // DO NOT CHANGE TO createManagedBean\n this.childDestroyFuncs.push(function () { return _this.destroyBean(_this.rowGroupDropZonePanel); });\n this.appendChild(this.rowGroupDropZonePanel);\n }\n if (!this.params.suppressValues) {\n this.valuesDropZonePanel = this.createBean(new ValuesDropZonePanel(false)); // DO NOT CHANGE TO createManagedBean\n this.childDestroyFuncs.push(function () { return _this.destroyBean(_this.valuesDropZonePanel); });\n this.appendChild(this.valuesDropZonePanel);\n }\n if (!this.params.suppressPivots) {\n this.pivotDropZonePanel = this.createBean(new PivotDropZonePanel(false)); // DO NOT CHANGE TO createManagedBean\n this.childDestroyFuncs.push(function () { return _this.destroyBean(_this.pivotDropZonePanel); });\n this.appendChild(this.pivotDropZonePanel);\n }\n this.setLastVisible();\n var pivotModeListener_1 = this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, function () {\n _this.resetChildrenHeight();\n _this.setLastVisible();\n });\n this.childDestroyFuncs.push(function () { return pivotModeListener_1(); });\n }\n this.initialised = true;\n };\n ColumnToolPanel.prototype.setPivotModeSectionVisible = function (visible) {\n var _this = this;\n if (!this.isRowGroupingModuleLoaded()) {\n return;\n }\n if (this.pivotModePanel) {\n this.pivotModePanel.setDisplayed(visible);\n }\n else if (visible) {\n this.pivotModePanel = this.createBean(new PivotModePanel());\n // ensure pivot mode panel is positioned at the top of the columns tool panel\n this.getGui().insertBefore(this.pivotModePanel.getGui(), this.getGui().firstChild);\n this.childDestroyFuncs.push(function () { return _this.destroyBean(_this.pivotModePanel); });\n }\n this.setLastVisible();\n };\n ColumnToolPanel.prototype.setRowGroupsSectionVisible = function (visible) {\n if (!this.isRowGroupingModuleLoaded()) {\n return;\n }\n if (this.rowGroupDropZonePanel) {\n this.rowGroupDropZonePanel.setDisplayed(visible);\n }\n else if (visible) {\n this.rowGroupDropZonePanel = this.createManagedBean(new RowGroupDropZonePanel(false));\n this.appendChild(this.rowGroupDropZonePanel);\n }\n this.setLastVisible();\n };\n ColumnToolPanel.prototype.setValuesSectionVisible = function (visible) {\n if (!this.isRowGroupingModuleLoaded()) {\n return;\n }\n if (this.valuesDropZonePanel) {\n this.valuesDropZonePanel.setDisplayed(visible);\n }\n else if (visible) {\n this.valuesDropZonePanel = this.createManagedBean(new ValuesDropZonePanel(false));\n this.appendChild(this.valuesDropZonePanel);\n }\n this.setLastVisible();\n };\n ColumnToolPanel.prototype.setPivotSectionVisible = function (visible) {\n if (!this.isRowGroupingModuleLoaded()) {\n return;\n }\n if (this.pivotDropZonePanel) {\n this.pivotDropZonePanel.setDisplayed(visible);\n }\n else if (visible) {\n this.pivotDropZonePanel = this.createManagedBean(new PivotDropZonePanel(false));\n this.appendChild(this.pivotDropZonePanel);\n this.pivotDropZonePanel.setDisplayed(visible);\n }\n this.setLastVisible();\n };\n ColumnToolPanel.prototype.setResizers = function () {\n [\n this.primaryColsPanel,\n this.rowGroupDropZonePanel,\n this.valuesDropZonePanel,\n this.pivotDropZonePanel\n ].forEach(function (panel) {\n if (!panel) {\n return;\n }\n var eGui = panel.getGui();\n panel.toggleResizable(!eGui.classList.contains('ag-last-column-drop') && !eGui.classList.contains('ag-hidden'));\n });\n };\n ColumnToolPanel.prototype.setLastVisible = function () {\n var eGui = this.getGui();\n var columnDrops = Array.prototype.slice.call(eGui.querySelectorAll('.ag-column-drop'));\n columnDrops.forEach(function (columnDrop) { return columnDrop.classList.remove('ag-last-column-drop'); });\n var columnDropEls = eGui.querySelectorAll('.ag-column-drop:not(.ag-hidden)');\n var lastVisible = _.last(columnDropEls);\n if (lastVisible) {\n lastVisible.classList.add('ag-last-column-drop');\n }\n this.setResizers();\n };\n ColumnToolPanel.prototype.resetChildrenHeight = function () {\n var eGui = this.getGui();\n var children = eGui.children;\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n child.style.removeProperty('height');\n child.style.removeProperty('flex');\n }\n };\n ColumnToolPanel.prototype.isRowGroupingModuleLoaded = function () {\n return ModuleRegistry.assertRegistered(ModuleNames.RowGroupingModule, 'Row Grouping');\n };\n ColumnToolPanel.prototype.expandColumnGroups = function (groupIds) {\n this.primaryColsPanel.expandGroups(groupIds);\n };\n ColumnToolPanel.prototype.collapseColumnGroups = function (groupIds) {\n this.primaryColsPanel.collapseGroups(groupIds);\n };\n ColumnToolPanel.prototype.setColumnLayout = function (colDefs) {\n this.primaryColsPanel.setColumnLayout(colDefs);\n };\n ColumnToolPanel.prototype.syncLayoutWithGrid = function () {\n this.primaryColsPanel.syncLayoutWithGrid();\n };\n ColumnToolPanel.prototype.destroyChildren = function () {\n this.childDestroyFuncs.forEach(function (func) { return func(); });\n this.childDestroyFuncs.length = 0;\n _.clearElement(this.getGui());\n };\n ColumnToolPanel.prototype.refresh = function () {\n this.destroyChildren();\n this.init(this.params);\n };\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so this must be public.\n ColumnToolPanel.prototype.destroy = function () {\n this.destroyChildren();\n _super.prototype.destroy.call(this);\n };\n ColumnToolPanel.TEMPLATE = \"
\";\n __decorate([\n Autowired(\"gridApi\")\n ], ColumnToolPanel.prototype, \"gridApi\", void 0);\n __decorate([\n Autowired(\"columnApi\")\n ], ColumnToolPanel.prototype, \"columnApi\", void 0);\n return ColumnToolPanel;\n}(Component));\nexport { ColumnToolPanel };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Component, PostConstruct } from \"@ag-grid-community/core\";\nvar HorizontalResizeComp = /** @class */ (function (_super) {\n __extends(HorizontalResizeComp, _super);\n function HorizontalResizeComp() {\n var _this = _super.call(this, /* html */ \"
\") || this;\n _this.minWidth = 100;\n _this.maxWidth = null;\n return _this;\n }\n HorizontalResizeComp.prototype.setElementToResize = function (elementToResize) {\n this.elementToResize = elementToResize;\n };\n HorizontalResizeComp.prototype.postConstruct = function () {\n var finishedWithResizeFunc = this.horizontalResizeService.addResizeBar({\n eResizeBar: this.getGui(),\n dragStartPixels: 1,\n onResizeStart: this.onResizeStart.bind(this),\n onResizing: this.onResizing.bind(this),\n onResizeEnd: this.onResizing.bind(this)\n });\n this.addDestroyFunc(finishedWithResizeFunc);\n this.setInverted(this.gridOptionsWrapper.isEnableRtl());\n };\n HorizontalResizeComp.prototype.onResizeStart = function () {\n this.startingWidth = this.elementToResize.offsetWidth;\n };\n HorizontalResizeComp.prototype.onResizing = function (delta) {\n var direction = this.inverted ? -1 : 1;\n var newWidth = Math.max(this.minWidth, Math.floor(this.startingWidth - (delta * direction)));\n if (this.maxWidth != null) {\n newWidth = Math.min(this.maxWidth, newWidth);\n }\n this.elementToResize.style.width = newWidth + \"px\";\n };\n HorizontalResizeComp.prototype.setInverted = function (inverted) {\n this.inverted = inverted;\n };\n HorizontalResizeComp.prototype.setMaxWidth = function (value) {\n this.maxWidth = value;\n };\n HorizontalResizeComp.prototype.setMinWidth = function (value) {\n if (value != null) {\n this.minWidth = value;\n }\n else {\n this.minWidth = 100;\n }\n };\n __decorate([\n Autowired('horizontalResizeService')\n ], HorizontalResizeComp.prototype, \"horizontalResizeService\", void 0);\n __decorate([\n PostConstruct\n ], HorizontalResizeComp.prototype, \"postConstruct\", null);\n return HorizontalResizeComp;\n}(Component));\nexport { HorizontalResizeComp };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Component, PostConstruct, RefSelector, _, } from \"@ag-grid-community/core\";\nvar SideBarButtonComp = /** @class */ (function (_super) {\n __extends(SideBarButtonComp, _super);\n function SideBarButtonComp(toolPanelDef) {\n var _this = _super.call(this) || this;\n _this.toolPanelDef = toolPanelDef;\n return _this;\n }\n SideBarButtonComp.prototype.getToolPanelId = function () {\n return this.toolPanelDef.id;\n };\n SideBarButtonComp.prototype.postConstruct = function () {\n var template = this.createTemplate();\n this.setTemplate(template);\n this.eIconWrapper.insertAdjacentElement('afterbegin', _.createIconNoSpan(this.toolPanelDef.iconKey, this.gridOptionsWrapper));\n this.addManagedListener(this.eToggleButton, 'click', this.onButtonPressed.bind(this));\n };\n SideBarButtonComp.prototype.createTemplate = function () {\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n var def = this.toolPanelDef;\n var label = translate(def.labelKey, def.labelDefault);\n var res = /* html */ \"
\\n \\n
\";\n return res;\n };\n SideBarButtonComp.prototype.onButtonPressed = function () {\n this.dispatchEvent({ type: SideBarButtonComp.EVENT_TOGGLE_BUTTON_CLICKED });\n };\n SideBarButtonComp.prototype.setSelected = function (selected) {\n this.addOrRemoveCssClass('ag-selected', selected);\n };\n SideBarButtonComp.EVENT_TOGGLE_BUTTON_CLICKED = 'toggleButtonClicked';\n __decorate([\n RefSelector('eToggleButton')\n ], SideBarButtonComp.prototype, \"eToggleButton\", void 0);\n __decorate([\n RefSelector('eIconWrapper')\n ], SideBarButtonComp.prototype, \"eIconWrapper\", void 0);\n __decorate([\n PostConstruct\n ], SideBarButtonComp.prototype, \"postConstruct\", null);\n return SideBarButtonComp;\n}(Component));\nexport { SideBarButtonComp };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Component, PostConstruct, PreDestroy, _, KeyCode } from \"@ag-grid-community/core\";\nimport { SideBarButtonComp } from \"./sideBarButtonComp\";\nvar SideBarButtonsComp = /** @class */ (function (_super) {\n __extends(SideBarButtonsComp, _super);\n function SideBarButtonsComp() {\n var _this = _super.call(this, SideBarButtonsComp.TEMPLATE) || this;\n _this.buttonComps = [];\n return _this;\n }\n SideBarButtonsComp.prototype.postConstruct = function () {\n this.addManagedListener(this.getFocusableElement(), 'keydown', this.handleKeyDown.bind(this));\n };\n SideBarButtonsComp.prototype.handleKeyDown = function (e) {\n if (e.key !== KeyCode.TAB || !e.shiftKey) {\n return;\n }\n var lastColumn = _.last(this.columnModel.getAllDisplayedColumns());\n if (this.focusService.focusGridView(lastColumn, true)) {\n e.preventDefault();\n }\n };\n SideBarButtonsComp.prototype.setToolPanelDefs = function (toolPanelDefs) {\n toolPanelDefs.forEach(this.addButtonComp.bind(this));\n };\n SideBarButtonsComp.prototype.setActiveButton = function (id) {\n this.buttonComps.forEach(function (comp) {\n comp.setSelected(id === comp.getToolPanelId());\n });\n };\n SideBarButtonsComp.prototype.addButtonComp = function (def) {\n var _this = this;\n var buttonComp = this.createBean(new SideBarButtonComp(def));\n this.buttonComps.push(buttonComp);\n this.appendChild(buttonComp);\n buttonComp.addEventListener(SideBarButtonComp.EVENT_TOGGLE_BUTTON_CLICKED, function () {\n _this.dispatchEvent({\n type: SideBarButtonsComp.EVENT_SIDE_BAR_BUTTON_CLICKED,\n toolPanelId: def.id\n });\n });\n };\n SideBarButtonsComp.prototype.clearButtons = function () {\n this.buttonComps = this.destroyBeans(this.buttonComps);\n _.clearElement(this.getGui());\n };\n SideBarButtonsComp.EVENT_SIDE_BAR_BUTTON_CLICKED = 'sideBarButtonClicked';\n SideBarButtonsComp.TEMPLATE = \"
\";\n __decorate([\n Autowired('focusService')\n ], SideBarButtonsComp.prototype, \"focusService\", void 0);\n __decorate([\n Autowired('columnModel')\n ], SideBarButtonsComp.prototype, \"columnModel\", void 0);\n __decorate([\n PostConstruct\n ], SideBarButtonsComp.prototype, \"postConstruct\", null);\n __decorate([\n PreDestroy\n ], SideBarButtonsComp.prototype, \"clearButtons\", null);\n return SideBarButtonsComp;\n}(Component));\nexport { SideBarButtonsComp };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Component, PostConstruct } from \"@ag-grid-community/core\";\nimport { HorizontalResizeComp } from \"./horizontalResizeComp\";\nvar ToolPanelWrapper = /** @class */ (function (_super) {\n __extends(ToolPanelWrapper, _super);\n function ToolPanelWrapper() {\n return _super.call(this, ToolPanelWrapper.TEMPLATE) || this;\n }\n ToolPanelWrapper.prototype.setupResize = function () {\n var eGui = this.getGui();\n var resizeBar = this.resizeBar = new HorizontalResizeComp();\n this.getContext().createBean(resizeBar);\n resizeBar.setElementToResize(eGui);\n this.appendChild(resizeBar);\n };\n ToolPanelWrapper.prototype.getToolPanelId = function () {\n return this.toolPanelId;\n };\n ToolPanelWrapper.prototype.setToolPanelDef = function (toolPanelDef) {\n var id = toolPanelDef.id, minWidth = toolPanelDef.minWidth, maxWidth = toolPanelDef.maxWidth, width = toolPanelDef.width;\n this.toolPanelId = id;\n this.width = width;\n var params = {};\n var compDetails = this.userComponentFactory.getToolPanelCompDetails(toolPanelDef, params);\n var componentPromise = compDetails.newAgStackInstance();\n if (componentPromise == null) {\n console.warn(\"AG Grid: error processing tool panel component \" + id + \". You need to specify either 'toolPanel' or 'toolPanelFramework'\");\n return;\n }\n componentPromise.then(this.setToolPanelComponent.bind(this));\n if (minWidth != null) {\n this.resizeBar.setMinWidth(minWidth);\n }\n if (maxWidth != null) {\n this.resizeBar.setMaxWidth(maxWidth);\n }\n };\n ToolPanelWrapper.prototype.setToolPanelComponent = function (compInstance) {\n var _this = this;\n this.toolPanelCompInstance = compInstance;\n this.appendChild(compInstance.getGui());\n this.addDestroyFunc(function () {\n _this.destroyBean(compInstance);\n });\n if (this.width) {\n this.getGui().style.width = this.width + \"px\";\n }\n };\n ToolPanelWrapper.prototype.getToolPanelInstance = function () {\n return this.toolPanelCompInstance;\n };\n ToolPanelWrapper.prototype.setResizerSizerSide = function (side) {\n var isRtl = this.gridOptionsWrapper.isEnableRtl();\n var isLeft = side === 'left';\n var inverted = isRtl ? isLeft : !isLeft;\n this.resizeBar.setInverted(inverted);\n };\n ToolPanelWrapper.prototype.refresh = function () {\n this.toolPanelCompInstance.refresh();\n };\n ToolPanelWrapper.TEMPLATE = \"
\";\n __decorate([\n Autowired(\"userComponentFactory\")\n ], ToolPanelWrapper.prototype, \"userComponentFactory\", void 0);\n __decorate([\n PostConstruct\n ], ToolPanelWrapper.prototype, \"setupResize\", null);\n return ToolPanelWrapper;\n}(Component));\nexport { ToolPanelWrapper };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Component, Events, ModuleNames, ModuleRegistry, PostConstruct, RefSelector, Autowired, ManagedFocusFeature, KeyCode } from \"@ag-grid-community/core\";\nimport { SideBarButtonsComp } from \"./sideBarButtonsComp\";\nimport { ToolPanelWrapper } from \"./toolPanelWrapper\";\nvar SideBarComp = /** @class */ (function (_super) {\n __extends(SideBarComp, _super);\n function SideBarComp() {\n var _this = _super.call(this, SideBarComp.TEMPLATE) || this;\n _this.toolPanelWrappers = [];\n return _this;\n }\n SideBarComp.prototype.postConstruct = function () {\n var _this = this;\n this.sideBarButtonsComp.addEventListener(SideBarButtonsComp.EVENT_SIDE_BAR_BUTTON_CLICKED, this.onToolPanelButtonClicked.bind(this));\n this.setSideBarDef();\n this.gridOptionsWrapper.addEventListener('sideBar', function () {\n _this.clearDownUi();\n _this.setSideBarDef();\n });\n this.gridApi.registerSideBarComp(this);\n this.createManagedBean(new ManagedFocusFeature(this.getFocusableElement(), {\n onTabKeyDown: this.onTabKeyDown.bind(this),\n handleKeyDown: this.handleKeyDown.bind(this)\n }));\n };\n SideBarComp.prototype.onTabKeyDown = function (e) {\n if (e.defaultPrevented) {\n return;\n }\n var _a = this, focusService = _a.focusService, sideBarButtonsComp = _a.sideBarButtonsComp;\n var eGui = this.getGui();\n var sideBarGui = sideBarButtonsComp.getGui();\n var eDocument = this.gridOptionsWrapper.getDocument();\n var activeElement = eDocument.activeElement;\n var openPanel = eGui.querySelector('.ag-tool-panel-wrapper:not(.ag-hidden)');\n if (!openPanel) {\n return;\n }\n if (sideBarGui.contains(activeElement)) {\n if (focusService.focusInto(openPanel, e.shiftKey)) {\n e.preventDefault();\n }\n }\n else {\n if (!focusService.isFocusUnderManagedComponent(openPanel) && e.shiftKey) {\n var firstFocusableEl = focusService.findFocusableElements(openPanel)[0];\n var eDocument_1 = this.gridOptionsWrapper.getDocument();\n if (eDocument_1.activeElement === firstFocusableEl) {\n var selectedButton = sideBarGui.querySelector('.ag-selected button');\n if (selectedButton) {\n e.preventDefault();\n selectedButton.focus();\n }\n }\n }\n }\n };\n SideBarComp.prototype.handleKeyDown = function (e) {\n var eDocument = this.gridOptionsWrapper.getDocument();\n if (!this.sideBarButtonsComp.getGui().contains(eDocument.activeElement)) {\n return;\n }\n var sideBarGui = this.sideBarButtonsComp.getGui();\n var buttons = Array.prototype.slice.call(sideBarGui.querySelectorAll('.ag-side-button'));\n var currentButton = eDocument.activeElement;\n var currentPos = buttons.findIndex(function (button) { return button.contains(currentButton); });\n var nextPos = null;\n switch (e.key) {\n case KeyCode.LEFT:\n case KeyCode.UP:\n nextPos = Math.max(0, currentPos - 1);\n break;\n case KeyCode.RIGHT:\n case KeyCode.DOWN:\n nextPos = Math.min(currentPos + 1, buttons.length - 1);\n break;\n }\n if (nextPos === null) {\n return;\n }\n var innerButton = buttons[nextPos].querySelector('button');\n if (innerButton) {\n innerButton.focus();\n e.preventDefault();\n }\n };\n SideBarComp.prototype.onToolPanelButtonClicked = function (event) {\n var id = event.toolPanelId;\n var openedItem = this.openedItem();\n // if item was already open, we close it\n if (openedItem === id) {\n this.openToolPanel(undefined); // passing undefined closes\n }\n else {\n this.openToolPanel(id);\n }\n };\n SideBarComp.prototype.clearDownUi = function () {\n this.sideBarButtonsComp.clearButtons();\n this.destroyToolPanelWrappers();\n };\n SideBarComp.prototype.setSideBarDef = function () {\n // initially hide side bar\n this.setDisplayed(false);\n var sideBar = this.gridOptionsWrapper.getSideBar();\n var sideBarExists = !!sideBar && !!sideBar.toolPanels;\n if (!sideBarExists) {\n return;\n }\n var shouldDisplaySideBar = sideBarExists && !sideBar.hiddenByDefault;\n this.setDisplayed(shouldDisplaySideBar);\n var toolPanelDefs = sideBar.toolPanels;\n this.sideBarButtonsComp.setToolPanelDefs(toolPanelDefs);\n this.setupToolPanels(toolPanelDefs);\n this.setSideBarPosition(sideBar.position);\n if (!sideBar.hiddenByDefault) {\n this.openToolPanel(sideBar.defaultToolPanel);\n }\n };\n SideBarComp.prototype.setSideBarPosition = function (position) {\n if (!position) {\n position = 'right';\n }\n var isLeft = position === 'left';\n var resizerSide = isLeft ? 'right' : 'left';\n this.addOrRemoveCssClass('ag-side-bar-left', isLeft);\n this.addOrRemoveCssClass('ag-side-bar-right', !isLeft);\n this.toolPanelWrappers.forEach(function (wrapper) {\n wrapper.setResizerSizerSide(resizerSide);\n });\n return this;\n };\n SideBarComp.prototype.setupToolPanels = function (defs) {\n var _this = this;\n defs.forEach(function (def) {\n if (def.id == null) {\n console.warn(\"AG Grid: please review all your toolPanel components, it seems like at least one of them doesn't have an id\");\n return;\n }\n // helpers, in case user doesn't have the right module loaded\n if (def.toolPanel === 'agColumnsToolPanel') {\n var moduleMissing = !ModuleRegistry.assertRegistered(ModuleNames.ColumnToolPanelModule, 'Column Tool Panel');\n if (moduleMissing) {\n return;\n }\n }\n if (def.toolPanel === 'agFiltersToolPanel') {\n var moduleMissing = !ModuleRegistry.assertRegistered(ModuleNames.FiltersToolPanelModule, 'Filters Tool Panel');\n if (moduleMissing) {\n return;\n }\n }\n var wrapper = new ToolPanelWrapper();\n _this.getContext().createBean(wrapper);\n wrapper.setToolPanelDef(def);\n wrapper.setDisplayed(false);\n _this.getGui().appendChild(wrapper.getGui());\n _this.toolPanelWrappers.push(wrapper);\n });\n };\n SideBarComp.prototype.refresh = function () {\n this.toolPanelWrappers.forEach(function (wrapper) { return wrapper.refresh(); });\n };\n SideBarComp.prototype.openToolPanel = function (key) {\n var currentlyOpenedKey = this.openedItem();\n if (currentlyOpenedKey === key) {\n return;\n }\n this.toolPanelWrappers.forEach(function (wrapper) {\n var show = key === wrapper.getToolPanelId();\n wrapper.setDisplayed(show);\n });\n var newlyOpenedKey = this.openedItem();\n var openToolPanelChanged = currentlyOpenedKey !== newlyOpenedKey;\n if (openToolPanelChanged) {\n this.sideBarButtonsComp.setActiveButton(key);\n this.raiseToolPanelVisibleEvent(key);\n }\n };\n SideBarComp.prototype.getToolPanelInstance = function (key) {\n var toolPanelWrapper = this.toolPanelWrappers.filter(function (toolPanel) { return toolPanel.getToolPanelId() === key; })[0];\n if (!toolPanelWrapper) {\n console.warn(\"AG Grid: unable to lookup Tool Panel as invalid key supplied: \" + key);\n return;\n }\n return toolPanelWrapper.getToolPanelInstance();\n };\n SideBarComp.prototype.raiseToolPanelVisibleEvent = function (key) {\n var event = {\n type: Events.EVENT_TOOL_PANEL_VISIBLE_CHANGED,\n source: key,\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi()\n };\n this.eventService.dispatchEvent(event);\n };\n SideBarComp.prototype.close = function () {\n this.openToolPanel(undefined);\n };\n SideBarComp.prototype.isToolPanelShowing = function () {\n return !!this.openedItem();\n };\n SideBarComp.prototype.openedItem = function () {\n var activeToolPanel = null;\n this.toolPanelWrappers.forEach(function (wrapper) {\n if (wrapper.isDisplayed()) {\n activeToolPanel = wrapper.getToolPanelId();\n }\n });\n return activeToolPanel;\n };\n SideBarComp.prototype.destroyToolPanelWrappers = function () {\n var _this = this;\n this.toolPanelWrappers.forEach(function (wrapper) {\n _.removeFromParent(wrapper.getGui());\n _this.destroyBean(wrapper);\n });\n this.toolPanelWrappers.length = 0;\n };\n SideBarComp.prototype.destroy = function () {\n this.destroyToolPanelWrappers();\n _super.prototype.destroy.call(this);\n };\n SideBarComp.TEMPLATE = \"
\\n \\n
\";\n __decorate([\n Autowired('gridApi')\n ], SideBarComp.prototype, \"gridApi\", void 0);\n __decorate([\n Autowired('focusService')\n ], SideBarComp.prototype, \"focusService\", void 0);\n __decorate([\n RefSelector('sideBarButtons')\n ], SideBarComp.prototype, \"sideBarButtonsComp\", void 0);\n __decorate([\n PostConstruct\n ], SideBarComp.prototype, \"postConstruct\", null);\n return SideBarComp;\n}(Component));\nexport { SideBarComp };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, Bean, BeanStub, ProvidedColumnGroup } from \"@ag-grid-community/core\";\nvar ToolPanelColDefService = /** @class */ (function (_super) {\n __extends(ToolPanelColDefService, _super);\n function ToolPanelColDefService() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.isColGroupDef = function (colDef) { return colDef && typeof colDef.children !== 'undefined'; };\n _this.getId = function (colDef) {\n return _this.isColGroupDef(colDef) ? colDef.groupId : colDef.colId;\n };\n return _this;\n }\n ToolPanelColDefService.prototype.createColumnTree = function (colDefs) {\n var _this = this;\n var invalidColIds = [];\n var createDummyColGroup = function (abstractColDef, depth) {\n if (_this.isColGroupDef(abstractColDef)) {\n // creating 'dummy' group which is not associated with grid column group\n var groupDef = abstractColDef;\n var groupId = (typeof groupDef.groupId !== 'undefined') ? groupDef.groupId : groupDef.headerName;\n var group = new ProvidedColumnGroup(groupDef, groupId, false, depth);\n var children_1 = [];\n groupDef.children.forEach(function (def) {\n var child = createDummyColGroup(def, depth + 1);\n // check column exists in case invalid colDef is supplied for primary column\n if (child) {\n children_1.push(child);\n }\n });\n group.setChildren(children_1);\n return group;\n }\n else {\n var colDef = abstractColDef;\n var key = colDef.colId ? colDef.colId : colDef.field;\n var column = _this.columnModel.getPrimaryColumn(key);\n if (!column) {\n invalidColIds.push(colDef);\n }\n return column;\n }\n };\n var mappedResults = [];\n colDefs.forEach(function (colDef) {\n var result = createDummyColGroup(colDef, 0);\n if (result) {\n // only return correctly mapped colDef results\n mappedResults.push(result);\n }\n });\n if (invalidColIds.length > 0) {\n console.warn('AG Grid: unable to find grid columns for the supplied colDef(s):', invalidColIds);\n }\n return mappedResults;\n };\n ToolPanelColDefService.prototype.syncLayoutWithGrid = function (syncLayoutCallback) {\n // extract ordered list of leaf path trees (column group hierarchy for each individual leaf column)\n var leafPathTrees = this.getLeafPathTrees();\n // merge leaf path tree taking split column groups into account\n var mergedColumnTrees = this.mergeLeafPathTrees(leafPathTrees);\n // sync layout with merged column trees\n syncLayoutCallback(mergedColumnTrees);\n };\n ToolPanelColDefService.prototype.getLeafPathTrees = function () {\n // leaf tree paths are obtained by walking up the tree starting at a column until we reach the top level group.\n var getLeafPathTree = function (node, childDef) {\n var leafPathTree;\n // build up tree in reverse order\n if (node instanceof ProvidedColumnGroup) {\n if (node.isPadding()) {\n // skip over padding groups\n leafPathTree = childDef;\n }\n else {\n var groupDef = Object.assign({}, node.getColGroupDef());\n // ensure group contains groupId\n groupDef.groupId = node.getGroupId();\n groupDef.children = [childDef];\n leafPathTree = groupDef;\n }\n }\n else {\n var colDef = Object.assign({}, node.getColDef());\n // ensure col contains colId\n colDef.colId = node.getColId();\n leafPathTree = colDef;\n }\n // walk tree\n var parent = node.getOriginalParent();\n if (parent) {\n // keep walking up the tree until we reach the root\n return getLeafPathTree(parent, leafPathTree);\n }\n else {\n // we have reached the root - exit with resulting leaf path tree\n return leafPathTree;\n }\n };\n // obtain a sorted list of all grid columns\n var allGridColumns = this.columnModel.getAllGridColumns();\n // only primary columns and non row group columns should appear in the tool panel\n var allPrimaryGridColumns = allGridColumns.filter(function (column) {\n var colDef = column.getColDef();\n return column.isPrimary() && !colDef.showRowGroup;\n });\n // construct a leaf path tree for each column\n return allPrimaryGridColumns.map(function (col) { return getLeafPathTree(col, col.getColDef()); });\n };\n ToolPanelColDefService.prototype.mergeLeafPathTrees = function (leafPathTrees) {\n var _this = this;\n var getLeafPathString = function (leafPath) {\n var group = leafPath;\n return group.children ? group.groupId + getLeafPathString(group.children[0]) : '';\n };\n var matchingRootGroupIds = function (pathA, pathB) {\n var bothPathsAreGroups = _this.isColGroupDef(pathA) && _this.isColGroupDef(pathB);\n return bothPathsAreGroups && _this.getId(pathA) === _this.getId(pathB);\n };\n var mergeTrees = function (treeA, treeB) {\n if (!_this.isColGroupDef(treeB)) {\n return treeA;\n }\n var mergeResult = treeA;\n var groupToMerge = treeB;\n if (groupToMerge.children && groupToMerge.groupId) {\n var added = _this.addChildrenToGroup(mergeResult, groupToMerge.groupId, groupToMerge.children[0]);\n if (added) {\n return mergeResult;\n }\n }\n groupToMerge.children.forEach(function (child) { return mergeTrees(mergeResult, child); });\n return mergeResult;\n };\n // we can't just merge the leaf path trees as groups can be split apart - instead only merge if leaf\n // path groups with the same root group id are contiguous.\n var mergeColDefs = [];\n for (var i = 1; i <= leafPathTrees.length; i++) {\n var first = leafPathTrees[i - 1];\n var second = leafPathTrees[i];\n if (matchingRootGroupIds(first, second)) {\n leafPathTrees[i] = mergeTrees(first, second);\n }\n else {\n mergeColDefs.push(first);\n }\n }\n return mergeColDefs;\n };\n ToolPanelColDefService.prototype.addChildrenToGroup = function (tree, groupId, colDef) {\n var _this = this;\n var subGroupIsSplit = function (currentSubGroup, currentSubGroupToAdd) {\n var existingChildIds = currentSubGroup.children.map(_this.getId);\n var childGroupAlreadyExists = _.includes(existingChildIds, _this.getId(currentSubGroupToAdd));\n var lastChild = _.last(currentSubGroup.children);\n var lastChildIsDifferent = lastChild && _this.getId(lastChild) !== _this.getId(currentSubGroupToAdd);\n return childGroupAlreadyExists && lastChildIsDifferent;\n };\n if (!this.isColGroupDef(tree)) {\n return true;\n }\n var currentGroup = tree;\n var groupToAdd = colDef;\n if (subGroupIsSplit(currentGroup, groupToAdd)) {\n currentGroup.children.push(groupToAdd);\n return true;\n }\n if (currentGroup.groupId === groupId) {\n // add children that don't already exist to group\n var existingChildIds = currentGroup.children.map(this.getId);\n var colDefAlreadyPresent = _.includes(existingChildIds, this.getId(groupToAdd));\n if (!colDefAlreadyPresent) {\n currentGroup.children.push(groupToAdd);\n return true;\n }\n }\n // recurse until correct group is found to add children\n currentGroup.children.forEach(function (subGroup) { return _this.addChildrenToGroup(subGroup, groupId, colDef); });\n return false;\n };\n __decorate([\n Autowired('columnModel')\n ], ToolPanelColDefService.prototype, \"columnModel\", void 0);\n ToolPanelColDefService = __decorate([\n Bean('toolPanelColDefService')\n ], ToolPanelColDefService);\n return ToolPanelColDefService;\n}(BeanStub));\nexport { ToolPanelColDefService };\n","import { ModuleNames } from \"@ag-grid-community/core\";\nimport { EnterpriseCoreModule } from \"@ag-grid-enterprise/core\";\nimport { HorizontalResizeComp } from \"./sideBar/horizontalResizeComp\";\nimport { SideBarComp } from \"./sideBar/sideBarComp\";\nimport { SideBarButtonsComp } from \"./sideBar/sideBarButtonsComp\";\nimport { ToolPanelColDefService } from \"./sideBar/common/toolPanelColDefService\";\nexport var SideBarModule = {\n moduleName: ModuleNames.SideBarModule,\n beans: [ToolPanelColDefService],\n agStackComponents: [\n { componentName: 'AgHorizontalResize', componentClass: HorizontalResizeComp },\n { componentName: 'AgSideBar', componentClass: SideBarComp },\n { componentName: 'AgSideBarButtons', componentClass: SideBarButtonsComp },\n ],\n dependantModules: [\n EnterpriseCoreModule\n ]\n};\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Events, Bean, Autowired, _ } from \"@ag-grid-community/core\";\nvar ModelItemUtils = /** @class */ (function () {\n function ModelItemUtils() {\n }\n ModelItemUtils.prototype.selectAllChildren = function (colTree, selectAllChecked, eventType) {\n var cols = this.extractAllLeafColumns(colTree);\n this.setAllColumns(cols, selectAllChecked, eventType);\n };\n ModelItemUtils.prototype.setColumn = function (col, selectAllChecked, eventType) {\n this.setAllColumns([col], selectAllChecked, eventType);\n };\n ModelItemUtils.prototype.setAllColumns = function (cols, selectAllChecked, eventType) {\n if (this.columnModel.isPivotMode()) {\n this.setAllPivot(cols, selectAllChecked, eventType);\n }\n else {\n this.setAllVisible(cols, selectAllChecked, eventType);\n }\n };\n ModelItemUtils.prototype.extractAllLeafColumns = function (allItems) {\n var res = [];\n var recursiveFunc = function (items) {\n items.forEach(function (item) {\n if (!item.isPassesFilter()) {\n return;\n }\n if (item.isGroup()) {\n recursiveFunc(item.getChildren());\n }\n else {\n res.push(item.getColumn());\n }\n });\n };\n recursiveFunc(allItems);\n return res;\n };\n ModelItemUtils.prototype.setAllVisible = function (columns, visible, eventType) {\n var colStateItems = [];\n columns.forEach(function (col) {\n if (col.getColDef().lockVisible) {\n return;\n }\n if (col.isVisible() != visible) {\n colStateItems.push({\n colId: col.getId(),\n hide: !visible\n });\n }\n });\n if (colStateItems.length > 0) {\n this.columnModel.applyColumnState({ state: colStateItems }, eventType);\n }\n };\n ModelItemUtils.prototype.setAllPivot = function (columns, value, eventType) {\n if (this.gridOptionsWrapper.isFunctionsPassive()) {\n this.setAllPivotPassive(columns, value);\n }\n else {\n this.setAllPivotActive(columns, value, eventType);\n }\n };\n ModelItemUtils.prototype.setAllPivotPassive = function (columns, value) {\n var copyOfPivotColumns = this.columnModel.getPivotColumns().slice();\n var copyOfValueColumns = this.columnModel.getValueColumns().slice();\n var copyOfRowGroupColumns = this.columnModel.getRowGroupColumns().slice();\n var pivotChanged = false;\n var valueChanged = false;\n var rowGroupChanged = false;\n var turnOnAction = function (col) {\n // don't change any column that's already got a function active\n if (col.isAnyFunctionActive()) {\n return;\n }\n if (col.isAllowValue()) {\n copyOfValueColumns.push(col);\n valueChanged = true;\n }\n else if (col.isAllowRowGroup()) {\n copyOfRowGroupColumns.push(col);\n pivotChanged = true;\n }\n else if (col.isAllowPivot()) {\n copyOfPivotColumns.push(col);\n rowGroupChanged = true;\n }\n };\n var turnOffAction = function (col) {\n if (!col.isAnyFunctionActive()) {\n return;\n }\n if (copyOfPivotColumns.indexOf(col) >= 0) {\n _.removeFromArray(copyOfPivotColumns, col);\n pivotChanged = true;\n }\n if (copyOfValueColumns.indexOf(col) >= 0) {\n _.removeFromArray(copyOfValueColumns, col);\n valueChanged = true;\n }\n if (copyOfRowGroupColumns.indexOf(col) >= 0) {\n _.removeFromArray(copyOfRowGroupColumns, col);\n rowGroupChanged = true;\n }\n };\n var action = value ? turnOnAction : turnOffAction;\n columns.forEach(action);\n if (pivotChanged) {\n var event_1 = {\n type: Events.EVENT_COLUMN_PIVOT_CHANGE_REQUEST,\n columns: copyOfPivotColumns,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event_1);\n }\n if (rowGroupChanged) {\n var event_2 = {\n type: Events.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST,\n columns: copyOfRowGroupColumns,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event_2);\n }\n if (valueChanged) {\n var event_3 = {\n type: Events.EVENT_COLUMN_VALUE_CHANGE_REQUEST,\n columns: copyOfRowGroupColumns,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event_3);\n }\n };\n ModelItemUtils.prototype.setAllPivotActive = function (columns, value, eventType) {\n var _this = this;\n var colStateItems = [];\n var turnOnAction = function (col) {\n // don't change any column that's already got a function active\n if (col.isAnyFunctionActive()) {\n return;\n }\n if (col.isAllowValue()) {\n var aggFunc = typeof col.getAggFunc() === 'string'\n ? col.getAggFunc()\n : _this.aggFuncService.getDefaultAggFunc(col);\n colStateItems.push({\n colId: col.getId(),\n aggFunc: aggFunc\n });\n }\n else if (col.isAllowRowGroup()) {\n colStateItems.push({\n colId: col.getId(),\n rowGroup: true\n });\n }\n else if (col.isAllowPivot()) {\n colStateItems.push({\n colId: col.getId(),\n pivot: true\n });\n }\n };\n var turnOffAction = function (col) {\n var isActive = col.isPivotActive() || col.isRowGroupActive() || col.isValueActive();\n if (isActive) {\n colStateItems.push({\n colId: col.getId(),\n pivot: false,\n rowGroup: false,\n aggFunc: null\n });\n }\n };\n var action = value ? turnOnAction : turnOffAction;\n columns.forEach(action);\n if (colStateItems.length > 0) {\n this.columnModel.applyColumnState({ state: colStateItems }, eventType);\n }\n };\n __decorate([\n Autowired('aggFuncService')\n ], ModelItemUtils.prototype, \"aggFuncService\", void 0);\n __decorate([\n Autowired('columnModel')\n ], ModelItemUtils.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired('gridOptionsWrapper')\n ], ModelItemUtils.prototype, \"gridOptionsWrapper\", void 0);\n __decorate([\n Autowired('columnApi')\n ], ModelItemUtils.prototype, \"columnApi\", void 0);\n __decorate([\n Autowired('gridApi')\n ], ModelItemUtils.prototype, \"gridApi\", void 0);\n __decorate([\n Autowired('eventService')\n ], ModelItemUtils.prototype, \"eventService\", void 0);\n ModelItemUtils = __decorate([\n Bean('modelItemUtils')\n ], ModelItemUtils);\n return ModelItemUtils;\n}());\nexport { ModelItemUtils };\n","import { ModuleNames } from \"@ag-grid-community/core\";\nimport { EnterpriseCoreModule } from \"@ag-grid-enterprise/core\";\nimport { PrimaryColsHeaderPanel } from \"./columnToolPanel/primaryColsHeaderPanel\";\nimport { PrimaryColsListPanel } from \"./columnToolPanel/primaryColsListPanel\";\nimport { ColumnToolPanel } from \"./columnToolPanel/columnToolPanel\";\nimport { PrimaryColsPanel } from \"./columnToolPanel/primaryColsPanel\";\nimport { RowGroupingModule } from \"@ag-grid-enterprise/row-grouping\";\nimport { SideBarModule } from \"@ag-grid-enterprise/side-bar\";\nimport { ModelItemUtils } from \"./columnToolPanel/modelItemUtils\";\nexport var ColumnsToolPanelModule = {\n moduleName: ModuleNames.ColumnToolPanelModule,\n beans: [ModelItemUtils],\n agStackComponents: [\n { componentName: 'AgPrimaryColsHeader', componentClass: PrimaryColsHeaderPanel },\n { componentName: 'AgPrimaryColsList', componentClass: PrimaryColsListPanel },\n { componentName: 'AgPrimaryCols', componentClass: PrimaryColsPanel }\n ],\n userComponents: [\n { componentName: 'agColumnsToolPanel', componentClass: ColumnToolPanel },\n ],\n dependantModules: [\n EnterpriseCoreModule,\n RowGroupingModule,\n SideBarModule\n ]\n};\n","var workbook = {\n getTemplate: function () {\n return {\n name: \"Workbook\",\n properties: {\n prefixedAttributes: [{\n prefix: \"xmlns:\",\n map: {\n o: \"urn:schemas-microsoft-com:office:office\",\n x: \"urn:schemas-microsoft-com:office:excel\",\n ss: \"urn:schemas-microsoft-com:office:spreadsheet\",\n html: \"http://www.w3.org/TR/REC-html40\"\n },\n }],\n rawMap: {\n xmlns: \"urn:schemas-microsoft-com:office:spreadsheet\"\n }\n }\n };\n }\n};\nexport default workbook;\n","var excelWorkbook = {\n getTemplate: function () {\n return {\n name: \"ExcelWorkbook\",\n properties: {\n rawMap: {\n xmlns: \"urn:schemas-microsoft-com:office:excel\"\n }\n },\n children: [{\n name: \"WindowHeight\",\n textNode: \"8130\"\n }, {\n name: \"WindowWidth\",\n textNode: \"15135\"\n }, {\n name: \"WindowHeight\",\n textNode: \"8130\"\n }, {\n name: \"WindowTopX\",\n textNode: \"120\"\n }, {\n name: \"WindowTopY\",\n textNode: \"45\"\n }, {\n name: \"ProtectStructure\",\n textNode: \"False\"\n }, {\n name: \"ProtectWindow\",\n textNode: \"False\"\n }]\n };\n }\n};\nexport default excelWorkbook;\n","var column = {\n getTemplate: function (c) {\n var width = c.width;\n return {\n name: \"Column\",\n properties: {\n prefixedAttributes: [{\n prefix: \"ss:\",\n map: {\n Width: width\n }\n }]\n }\n };\n }\n};\nexport default column;\n","var cell = {\n getTemplate: function (c) {\n var mergeAcross = c.mergeAcross, styleId = c.styleId, data = c.data;\n var properties = {};\n if (mergeAcross) {\n properties.MergeAcross = mergeAcross;\n }\n if (styleId) {\n properties.StyleID = styleId;\n }\n return {\n name: \"Cell\",\n properties: {\n prefixedAttributes: [{\n prefix: \"ss:\",\n map: properties\n }]\n },\n children: [{\n name: \"Data\",\n properties: {\n prefixedAttributes: [{\n prefix: \"ss:\",\n map: {\n Type: data.type\n }\n }]\n },\n textNode: data.value\n }]\n };\n }\n};\nexport default cell;\n","import cell from './cell';\nvar row = {\n getTemplate: function (r) {\n var cells = r.cells;\n return {\n name: \"Row\",\n children: cells.map(function (it) { return cell.getTemplate(it); })\n };\n }\n};\nexport default row;\n","import column from './column';\nimport row from './row';\nvar worksheet = {\n getTemplate: function (ws) {\n var table = ws.table, name = ws.name;\n var columns = table.columns, rows = table.rows;\n var c = columns.map(function (it) { return column.getTemplate(it); });\n var r = rows.map(function (it) { return row.getTemplate(it); });\n return {\n name: \"Worksheet\",\n children: [{\n name: \"Table\",\n children: c.concat(r)\n }],\n properties: {\n prefixedAttributes: [{\n prefix: \"ss:\",\n map: {\n Name: name\n }\n }]\n }\n };\n }\n};\nexport default worksheet;\n","var documentProperties = {\n getTemplate: function () {\n return {\n name: \"DocumentProperties\",\n properties: {\n rawMap: {\n xmlns: \"urn:schemas-microsoft-com:office:office\"\n }\n },\n children: [{\n name: \"Version\",\n textNode: \"12.00\"\n }]\n };\n }\n};\nexport default documentProperties;\n","var alignment = {\n getTemplate: function (styleProperties) {\n var _a = styleProperties.alignment, vertical = _a.vertical, horizontal = _a.horizontal, indent = _a.indent, readingOrder = _a.readingOrder, rotate = _a.rotate, shrinkToFit = _a.shrinkToFit, verticalText = _a.verticalText, wrapText = _a.wrapText;\n return {\n name: 'Alignment',\n properties: {\n prefixedAttributes: [{\n prefix: \"ss:\",\n map: {\n Vertical: vertical,\n Horizontal: horizontal,\n Indent: indent,\n ReadingOrder: readingOrder,\n Rotate: rotate,\n ShrinkToFit: shrinkToFit,\n VerticalText: verticalText,\n WrapText: wrapText\n }\n }]\n }\n };\n }\n};\nexport default alignment;\n","var borders = {\n getTemplate: function (styleProperties) {\n var _a = styleProperties.borders, borderBottom = _a.borderBottom, borderLeft = _a.borderLeft, borderRight = _a.borderRight, borderTop = _a.borderTop;\n return {\n name: 'Borders',\n children: [borderBottom, borderLeft, borderRight, borderTop].map(function (it, index) {\n var current = index == 0 ? \"Bottom\" : index == 1 ? \"Left\" : index == 2 ? \"Right\" : \"Top\";\n return {\n name: 'Border',\n properties: {\n prefixedAttributes: [{\n prefix: 'ss:',\n map: {\n Position: current,\n LineStyle: it.lineStyle,\n Weight: it.weight,\n Color: it.color\n }\n }]\n }\n };\n })\n };\n }\n};\nexport default borders;\n","var font = {\n getTemplate: function (styleProperties) {\n var _a = styleProperties.font, bold = _a.bold, fontName = _a.fontName, italic = _a.italic, color = _a.color, outline = _a.outline, shadow = _a.shadow, size = _a.size, strikeThrough = _a.strikeThrough, underline = _a.underline, verticalAlign = _a.verticalAlign, charSet = _a.charSet, family = _a.family;\n return {\n name: \"Font\",\n properties: {\n prefixedAttributes: [{\n prefix: \"ss:\",\n map: {\n Bold: bold,\n FontName: fontName,\n Italic: italic,\n Color: color,\n Outline: outline,\n Shadow: shadow,\n Size: size,\n StrikeThrough: strikeThrough,\n Underline: underline,\n VerticalAlign: verticalAlign\n }\n }, {\n prefix: \"x:\",\n map: {\n CharSet: charSet,\n Family: family\n }\n }]\n }\n };\n }\n};\nexport default font;\n","var interior = {\n getTemplate: function (styleProperties) {\n var _a = styleProperties.interior, color = _a.color, pattern = _a.pattern, patternColor = _a.patternColor;\n return {\n name: \"Interior\",\n properties: {\n prefixedAttributes: [{\n prefix: \"ss:\",\n map: {\n Color: color,\n Pattern: pattern,\n PatternColor: patternColor\n }\n }]\n }\n };\n }\n};\nexport default interior;\n","var protection = {\n getTemplate: function (styleProperties) {\n return {\n name: \"Protection\",\n properties: {\n prefixedAttributes: [{\n prefix: \"ss:\",\n map: {\n Protected: styleProperties.protection.protected,\n HideFormula: styleProperties.protection.hideFormula\n }\n }]\n }\n };\n }\n};\nexport default protection;\n","var numberFormat = {\n getTemplate: function (styleProperties) {\n var format = styleProperties.numberFormat.format;\n return {\n name: \"NumberFormat\",\n properties: {\n prefixedAttributes: [{\n prefix: \"ss:\",\n map: {\n Format: format\n }\n }]\n }\n };\n }\n};\nexport default numberFormat;\n","var style = {\n getTemplate: function (styleProperties) {\n var id = styleProperties.id, name = styleProperties.name;\n return {\n name: 'Style',\n properties: {\n prefixedAttributes: [{\n prefix: \"ss:\",\n map: {\n ID: id,\n Name: name ? name : id\n }\n }]\n }\n };\n }\n};\nexport default style;\n","import { ExcelFactoryMode, _ } from '@ag-grid-community/core';\nimport workbook from './files/xml/workbook';\nimport excelWorkbook from './files/xml/excelWorkbook';\nimport worksheet from './files/xml/worksheet';\nimport documentProperties from './files/xml/documentProperties';\nimport alignment from './files/xml/styles/alignment';\nimport borders from './files/xml/styles/borders';\nimport font from './files/xml/styles/font';\nimport interior from './files/xml/styles/interior';\nimport protection from './files/xml/styles/protection';\nimport numberFormat from './files/xml/styles/numberFormat';\nimport style from './files/xml/styles/style';\nimport { XmlFactory } from \"@ag-grid-community/csv-export\";\n/**\n * See https://msdn.microsoft.com/en-us/library/aa140066(v=office.10).aspx\n */\nvar ExcelXmlFactory = /** @class */ (function () {\n function ExcelXmlFactory() {\n }\n ExcelXmlFactory.createExcel = function (styles, currentWorksheet) {\n var header = this.excelXmlHeader();\n var docProps = documentProperties.getTemplate();\n var eWorkbook = excelWorkbook.getTemplate();\n var wb = this.workbook(docProps, eWorkbook, styles, currentWorksheet);\n return \"\" + header + XmlFactory.createXml(wb, function (boolean) { return boolean ? '1' : '0'; });\n };\n ExcelXmlFactory.workbook = function (docProperties, eWorkbook, styles, currentWorksheet) {\n var children = [\n docProperties,\n eWorkbook,\n this.stylesXmlElement(styles)\n ].concat(worksheet.getTemplate(currentWorksheet));\n return Object.assign({}, workbook.getTemplate(), { children: children });\n };\n ExcelXmlFactory.excelXmlHeader = function () {\n return \"\\n \\n \";\n };\n ExcelXmlFactory.stylesXmlElement = function (styles) {\n var _this = this;\n return {\n name: 'Styles',\n children: styles ? styles.map(function (it) { return _this.styleXmlElement(it); }) : []\n };\n };\n ExcelXmlFactory.styleXmlElement = function (styleProperties) {\n var children = _.compose(this.addProperty('alignment', styleProperties), this.addProperty('borders', styleProperties), this.addProperty('font', styleProperties), this.addProperty('interior', styleProperties), this.addProperty('protection', styleProperties), this.addProperty('numberFormat', styleProperties))([]);\n return Object.assign({}, style.getTemplate(styleProperties), { children: children });\n };\n ExcelXmlFactory.addProperty = function (property, styleProperties) {\n return function (children) {\n if (!styleProperties[property]) {\n return children;\n }\n var options = {\n alignment: alignment,\n borders: borders,\n font: font,\n interior: interior,\n numberFormat: numberFormat,\n protection: protection\n };\n return children.concat(options[property].getTemplate(styleProperties));\n };\n };\n ExcelXmlFactory.factoryMode = ExcelFactoryMode.SINGLE_SHEET;\n return ExcelXmlFactory;\n}());\nexport { ExcelXmlFactory };\n","export var INCH_TO_EMU = 9525;\nexport var numberFormatMap = {\n '0': 1,\n '0.00': 2,\n '#,##0': 3,\n '#,##0.00': 4,\n '0%': 9,\n '0.00%': 10,\n '0.00E+00': 11,\n '# ?/?': 12,\n '# ??/??': 13,\n 'mm-dd-yy': 14,\n 'd-mmm-yy': 15,\n 'd-mmm': 16,\n 'mmm-yy': 17,\n 'h:mm AM/PM': 18,\n 'h:mm:ss AM/PM': 19,\n 'h:mm': 20,\n 'h:mm:ss': 21,\n 'm/d/yy h:mm': 22,\n '#,##0 ;(#,##0)': 37,\n '#,##0 ;[Red](#,##0)': 38,\n '#,##0.00;(#,##0.00)': 39,\n '#,##0.00;[Red](#,##0.00)': 40,\n 'mm:ss': 45,\n '[h]:mm:ss': 46,\n 'mmss.0': 47,\n '##0.0E+0': 48,\n '@': 49\n};\n","import { XmlFactory } from \"@ag-grid-community/csv-export\";\nimport { INCH_TO_EMU } from \"./excelConstants\";\nexport var pixelsToPoint = function (pixels) {\n return Math.round(pixels * 72 / 96);\n};\nexport var pointsToPixel = function (points) {\n return Math.round(points * 96 / 72);\n};\nexport var pixelsToEMU = function (value) {\n return Math.ceil(value * INCH_TO_EMU);\n};\nexport var getFontFamilyId = function (name) {\n if (name === undefined) {\n return;\n }\n var families = ['Automatic', 'Roman', 'Swiss', 'Modern', 'Script', 'Decorative'];\n var pos = families.indexOf(name || 'Automatic');\n return Math.max(pos, 0);\n};\nexport var getHeightFromProperty = function (rowIndex, height) {\n if (!height) {\n return;\n }\n var finalHeight;\n if (typeof height === 'number') {\n finalHeight = height;\n }\n else {\n var heightFunc = height;\n finalHeight = heightFunc({ rowIndex: rowIndex });\n }\n return pixelsToPoint(finalHeight);\n};\nexport var setExcelImageTotalWidth = function (image, columnsToExport) {\n var _a = image.position, colSpan = _a.colSpan, column = _a.column;\n if (image.width) {\n if (colSpan) {\n var columnsInSpan = columnsToExport.slice(column - 1, column + colSpan - 1);\n var totalWidth = 0;\n for (var i = 0; i < columnsInSpan.length; i++) {\n var colWidth = columnsInSpan[i].getActualWidth();\n if (image.width < totalWidth + colWidth) {\n image.position.colSpan = i + 1;\n image.totalWidth = image.width;\n image.width = image.totalWidth - totalWidth;\n break;\n }\n totalWidth += colWidth;\n }\n }\n else {\n image.totalWidth = image.width;\n }\n }\n};\nexport var setExcelImageTotalHeight = function (image, rowHeight) {\n var _a = image.position, rowSpan = _a.rowSpan, row = _a.row;\n if (image.height) {\n if (rowSpan) {\n var totalHeight = 0;\n var counter = 0;\n for (var i = row; i < row + rowSpan; i++) {\n var nextRowHeight = pointsToPixel(getHeightFromProperty(i, rowHeight) || 20);\n if (image.height < totalHeight + nextRowHeight) {\n image.position.rowSpan = counter + 1;\n image.totalHeight = image.height;\n image.height = image.totalHeight - totalHeight;\n break;\n }\n totalHeight += nextRowHeight;\n counter++;\n }\n }\n else {\n image.totalHeight = image.height;\n }\n }\n};\nexport var createXmlPart = function (body) {\n var header = XmlFactory.createHeader({\n encoding: 'UTF-8',\n standalone: 'yes'\n });\n var xmlBody = XmlFactory.createXml(body);\n return \"\" + header + xmlBody;\n};\nexport var getExcelColumnName = function (colIdx) {\n var startCode = 65;\n var tableWidth = 26;\n var fromCharCode = String.fromCharCode;\n var pos = Math.floor(colIdx / tableWidth);\n var tableIdx = colIdx % tableWidth;\n if (!pos || colIdx === tableWidth) {\n return fromCharCode(startCode + colIdx - 1);\n }\n if (!tableIdx) {\n return getExcelColumnName(pos - 1) + 'Z';\n }\n if (pos < tableWidth) {\n return fromCharCode(startCode + pos - 1) + fromCharCode(startCode + tableIdx - 1);\n }\n return getExcelColumnName(pos) + fromCharCode(startCode + tableIdx - 1);\n};\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n};\nimport { Constants, _ } from \"@ag-grid-community/core\";\nimport { BaseGridSerializingSession, RowType } from \"@ag-grid-community/csv-export\";\nimport { getHeightFromProperty } from \"./assets/excelUtils\";\nvar BaseExcelSerializingSession = /** @class */ (function (_super) {\n __extends(BaseExcelSerializingSession, _super);\n function BaseExcelSerializingSession(config) {\n var _this = _super.call(this, config) || this;\n _this.mixedStyles = {};\n _this.mixedStyleCounter = 0;\n _this.rows = [];\n _this.config = Object.assign({}, config);\n _this.stylesByIds = {};\n _this.config.baseExcelStyles.forEach(function (style) {\n _this.stylesByIds[style.id] = style;\n });\n _this.excelStyles = __spread(_this.config.baseExcelStyles);\n return _this;\n }\n BaseExcelSerializingSession.prototype.addCustomContent = function (customContent) {\n var _this = this;\n customContent.forEach(function (row) {\n var rowLen = _this.rows.length + 1;\n _this.rows.push({\n height: getHeightFromProperty(rowLen, _this.config.rowHeight),\n cells: row.map(function (cell, idx) {\n var image = _this.addImage(rowLen, _this.columnsToExport[idx], cell.data.value);\n var ret = __assign({}, cell);\n if (image) {\n ret.data = {};\n if (image.value != null) {\n ret.data.value = image.value;\n }\n else {\n ret.data.type = 'e';\n ret.data.value = null;\n }\n }\n return ret;\n })\n });\n });\n };\n BaseExcelSerializingSession.prototype.onNewHeaderGroupingRow = function () {\n var _this = this;\n var currentCells = [];\n this.rows.push({\n cells: currentCells,\n height: getHeightFromProperty(this.rows.length + 1, this.config.headerRowHeight)\n });\n return {\n onColumn: function (header, index, span, collapsibleRanges) {\n var styleIds = _this.config.styleLinker(RowType.HEADER_GROUPING, 1, \"grouping-\" + header, undefined, undefined);\n currentCells.push(__assign(__assign({}, _this.createMergedCell(_this.getStyleId(styleIds), _this.getDataTypeForValue('string'), header, span)), { collapsibleRanges: collapsibleRanges }));\n }\n };\n };\n BaseExcelSerializingSession.prototype.onNewHeaderRow = function () {\n return this.onNewRow(this.onNewHeaderColumn, this.config.headerRowHeight);\n };\n BaseExcelSerializingSession.prototype.onNewBodyRow = function () {\n return this.onNewRow(this.onNewBodyColumn, this.config.rowHeight);\n };\n BaseExcelSerializingSession.prototype.prepare = function (columnsToExport) {\n var _this = this;\n _super.prototype.prepare.call(this, columnsToExport);\n this.columnsToExport = __spread(columnsToExport);\n this.cols = columnsToExport.map(function (col, i) { return _this.convertColumnToExcel(col, i); });\n };\n BaseExcelSerializingSession.prototype.parse = function () {\n // adding custom content might have made some rows wider than the grid, so add new columns\n var longestRow = this.rows.reduce(function (a, b) { return Math.max(a, b.cells.length); }, 0);\n while (this.cols.length < longestRow) {\n this.cols.push(this.convertColumnToExcel(null, this.cols.length + 1));\n }\n var data = {\n name: this.config.sheetName,\n table: {\n columns: this.cols,\n rows: this.rows\n }\n };\n return this.createExcel(data);\n };\n BaseExcelSerializingSession.prototype.isFormula = function (value) {\n if (value == null) {\n return false;\n }\n return this.config.autoConvertFormulas && value.toString().startsWith('=');\n };\n BaseExcelSerializingSession.prototype.getStyleById = function (styleId) {\n if (styleId == null) {\n return null;\n }\n return this.stylesByIds[styleId] || null;\n };\n BaseExcelSerializingSession.prototype.convertColumnToExcel = function (column, index) {\n var columnWidth = this.config.columnWidth;\n if (columnWidth) {\n if (typeof columnWidth === 'number') {\n return { width: columnWidth };\n }\n return { width: columnWidth({ column: column, index: index }) };\n }\n if (column) {\n var smallestUsefulWidth = 75;\n return { width: Math.max(column.getActualWidth(), smallestUsefulWidth) };\n }\n return {};\n };\n BaseExcelSerializingSession.prototype.onNewHeaderColumn = function (rowIndex, currentCells) {\n var _this = this;\n return function (column, index) {\n var nameForCol = _this.extractHeaderValue(column);\n var styleIds = _this.config.styleLinker(RowType.HEADER, rowIndex, nameForCol, column, undefined);\n currentCells.push(_this.createCell(_this.getStyleId(styleIds), _this.getDataTypeForValue('string'), nameForCol));\n };\n };\n BaseExcelSerializingSession.prototype.onNewRow = function (onNewColumnAccumulator, height) {\n var currentCells = [];\n this.rows.push({\n cells: currentCells,\n height: getHeightFromProperty(this.rows.length + 1, height)\n });\n return {\n onColumn: onNewColumnAccumulator.bind(this, this.rows.length, currentCells)()\n };\n };\n BaseExcelSerializingSession.prototype.onNewBodyColumn = function (rowIndex, currentCells) {\n var _this = this;\n var skipCols = 0;\n return function (column, index, node) {\n if (skipCols > 0) {\n skipCols -= 1;\n return;\n }\n var valueForCell = _this.extractRowCellValue(column, index, rowIndex, Constants.EXPORT_TYPE_EXCEL, node);\n var styleIds = _this.config.styleLinker(RowType.BODY, rowIndex, valueForCell, column, node);\n var excelStyleId = _this.getStyleId(styleIds);\n var colSpan = column.getColSpan(node);\n var addedImage = _this.addImage(rowIndex, column, valueForCell);\n if (addedImage) {\n currentCells.push(_this.createCell(excelStyleId, _this.getDataTypeForValue(addedImage.value), addedImage.value == null ? '' : addedImage.value));\n }\n else if (colSpan > 1) {\n skipCols = colSpan - 1;\n currentCells.push(_this.createMergedCell(excelStyleId, _this.getDataTypeForValue(valueForCell), valueForCell, colSpan - 1));\n }\n else {\n currentCells.push(_this.createCell(excelStyleId, _this.getDataTypeForValue(valueForCell), valueForCell));\n }\n };\n };\n BaseExcelSerializingSession.prototype.getStyleId = function (styleIds) {\n if (!styleIds || !styleIds.length) {\n return null;\n }\n if (styleIds.length === 1) {\n return styleIds[0];\n }\n var key = styleIds.join(\"-\");\n if (!this.mixedStyles[key]) {\n this.addNewMixedStyle(styleIds);\n }\n return this.mixedStyles[key].excelID;\n };\n BaseExcelSerializingSession.prototype.addNewMixedStyle = function (styleIds) {\n var _this = this;\n this.mixedStyleCounter += 1;\n var excelId = \"mixedStyle\" + this.mixedStyleCounter;\n var resultantStyle = {};\n styleIds.forEach(function (styleId) {\n _this.excelStyles.forEach(function (excelStyle) {\n if (excelStyle.id === styleId) {\n _.mergeDeep(resultantStyle, _.deepCloneObject(excelStyle));\n }\n });\n });\n resultantStyle.id = excelId;\n resultantStyle.name = excelId;\n var key = styleIds.join(\"-\");\n this.mixedStyles[key] = {\n excelID: excelId,\n key: key,\n result: resultantStyle\n };\n this.excelStyles.push(resultantStyle);\n this.stylesByIds[excelId] = resultantStyle;\n };\n return BaseExcelSerializingSession;\n}(BaseGridSerializingSession));\nexport { BaseExcelSerializingSession };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { _ } from '@ag-grid-community/core';\nimport { ExcelXmlFactory } from './excelXmlFactory';\nimport { BaseExcelSerializingSession } from './baseExcelSerializingSession';\nvar ExcelXmlSerializingSession = /** @class */ (function (_super) {\n __extends(ExcelXmlSerializingSession, _super);\n function ExcelXmlSerializingSession() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ExcelXmlSerializingSession.prototype.createExcel = function (data) {\n return ExcelXmlFactory.createExcel(this.excelStyles, data);\n };\n ExcelXmlSerializingSession.prototype.getDataTypeForValue = function (valueForCell) {\n return _.isNumeric(valueForCell) ? 'Number' : 'String';\n };\n ExcelXmlSerializingSession.prototype.getType = function (type, style, value) {\n if (this.isFormula(value)) {\n return 'Formula';\n }\n if (style && style.dataType) {\n switch (style.dataType.toLocaleLowerCase()) {\n case 'string':\n return 'Formula';\n case 'number':\n return 'Number';\n case 'datetime':\n return 'DateTime';\n case 'error':\n return 'Error';\n case 'boolean':\n return 'Boolean';\n default:\n console.warn(\"AG Grid: Unrecognized data type for excel export [\" + style.id + \".dataType=\" + style.dataType + \"]\");\n }\n }\n return type;\n };\n ExcelXmlSerializingSession.prototype.addImage = function () {\n return;\n };\n ExcelXmlSerializingSession.prototype.createCell = function (styleId, type, value) {\n var actualStyle = this.getStyleById(styleId);\n var typeTransformed = (this.getType(type, actualStyle, value) || type);\n return {\n styleId: !!actualStyle ? styleId : undefined,\n data: {\n type: typeTransformed,\n value: this.getValueTransformed(typeTransformed, value)\n }\n };\n };\n ExcelXmlSerializingSession.prototype.getValueTransformed = function (typeTransformed, value) {\n var _this = this;\n var wrapText = function (val) {\n if (_this.config.suppressTextAsCDATA) {\n return _.escapeString(val);\n }\n var cdataStart = '';\n var cdataEndRegex = new RegExp(cdataEnd, \"g\");\n return cdataStart\n // CDATA sections are closed by the character sequence ']]>' and there is no\n // way of escaping this, so if the text contains the offending sequence, emit\n // multiple CDATA sections and split the characters between them.\n + String(val).replace(cdataEndRegex, ']]' + cdataEnd + cdataStart + '>')\n + cdataEnd;\n };\n var convertBoolean = function (val) {\n if (!val || val === '0' || val === 'false') {\n return '0';\n }\n return '1';\n };\n switch (typeTransformed) {\n case 'String':\n return wrapText(value);\n case 'Number':\n return Number(value).valueOf() + '';\n case 'Boolean':\n return convertBoolean(value);\n default:\n return value;\n }\n };\n ExcelXmlSerializingSession.prototype.createMergedCell = function (styleId, type, value, numOfCells) {\n return {\n styleId: !!this.getStyleById(styleId) ? styleId : undefined,\n data: {\n type: type,\n value: value\n },\n mergeAcross: numOfCells\n };\n };\n return ExcelXmlSerializingSession;\n}(BaseExcelSerializingSession));\nexport { ExcelXmlSerializingSession };\n","var coreFactory = {\n getTemplate: function (author) {\n var dt = new Date();\n var jsonDate = dt.toJSON();\n return {\n name: 'cp:coreProperties',\n properties: {\n prefixedAttributes: [{\n prefix: \"xmlns:\",\n map: {\n cp: \"http://schemas.openxmlformats.org/package/2006/metadata/core-properties\",\n dc: 'http://purl.org/dc/elements/1.1/',\n dcterms: 'http://purl.org/dc/terms/',\n dcmitype: 'http://purl.org/dc/dcmitype/',\n xsi: 'http://www.w3.org/2001/XMLSchema-instance'\n }\n }]\n },\n children: [{\n name: 'dc:creator',\n textNode: author\n }, {\n name: 'dc:title',\n textNode: 'Workbook'\n }, {\n name: 'dcterms:created',\n properties: {\n rawMap: {\n 'xsi:type': 'dcterms:W3CDTF'\n }\n },\n textNode: jsonDate\n }, {\n name: 'dcterms:modified',\n properties: {\n rawMap: {\n 'xsi:type': 'dcterms:W3CDTF'\n }\n },\n textNode: jsonDate\n }]\n };\n }\n};\nexport default coreFactory;\n","var contentTypeFactory = {\n getTemplate: function (config) {\n var name = config.name, ContentType = config.ContentType, Extension = config.Extension, PartName = config.PartName;\n return {\n name: name,\n properties: {\n rawMap: {\n Extension: Extension,\n PartName: PartName,\n ContentType: ContentType\n }\n }\n };\n }\n};\nexport default contentTypeFactory;\n","var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n};\nimport { ExcelXlsxFactory } from '../../excelXlsxFactory';\nimport contentTypeFactory from './contentType';\nvar contentTypesFactory = {\n getTemplate: function (sheetLen) {\n var worksheets = new Array(sheetLen).fill(undefined).map(function (v, i) { return ({\n name: 'Override',\n ContentType: 'application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml',\n PartName: \"/xl/worksheets/sheet\" + (i + 1) + \".xml\"\n }); });\n var sheetsWithImages = ExcelXlsxFactory.worksheetImages.size;\n var imageTypesObject = {};\n ExcelXlsxFactory.workbookImageIds.forEach(function (v) {\n imageTypesObject[v.type] = true;\n });\n var imageDocs = new Array(sheetsWithImages).fill(undefined).map(function (v, i) { return ({\n name: 'Override',\n ContentType: 'application/vnd.openxmlformats-officedocument.drawing+xml',\n PartName: \"/xl/drawings/drawing\" + (i + 1) + \".xml\"\n }); });\n var imageTypes = Object.keys(imageTypesObject).map(function (ext) { return ({\n name: 'Default',\n ContentType: \"image/\" + ext,\n Extension: ext\n }); });\n var children = __spread(imageTypes, [\n {\n name: 'Default',\n Extension: 'rels',\n ContentType: 'application/vnd.openxmlformats-package.relationships+xml'\n }, {\n name: 'Default',\n ContentType: 'application/xml',\n Extension: 'xml'\n }, {\n name: 'Override',\n ContentType: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml',\n PartName: \"/xl/workbook.xml\"\n }\n ], worksheets, [\n {\n name: 'Override',\n ContentType: 'application/vnd.openxmlformats-officedocument.theme+xml',\n PartName: '/xl/theme/theme1.xml'\n }, {\n name: 'Override',\n ContentType: 'application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml',\n PartName: '/xl/styles.xml'\n }, {\n name: 'Override',\n ContentType: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml',\n PartName: '/xl/sharedStrings.xml'\n }\n ], imageDocs, [\n {\n name: 'Override',\n ContentType: 'application/vnd.openxmlformats-package.core-properties+xml',\n PartName: '/docProps/core.xml'\n }\n ]).map(function (contentType) { return contentTypeFactory.getTemplate(contentType); });\n return {\n name: \"Types\",\n properties: {\n rawMap: {\n xmlns: \"http://schemas.openxmlformats.org/package/2006/content-types\"\n }\n },\n children: children\n };\n }\n};\nexport default contentTypesFactory;\n","import { ExcelXlsxFactory } from '../../excelXlsxFactory';\nimport { pixelsToEMU } from '../../assets/excelUtils';\nvar getAnchor = function (name, imageAnchor) { return ({\n name: \"xdr:\" + name,\n children: [{\n name: 'xdr:col',\n textNode: (imageAnchor.col).toString()\n }, {\n name: 'xdr:colOff',\n textNode: imageAnchor.offsetX.toString()\n }, {\n name: 'xdr:row',\n textNode: imageAnchor.row.toString()\n }, {\n name: 'xdr:rowOff',\n textNode: imageAnchor.offsetY.toString()\n }]\n}); };\nvar getExt = function (image) {\n var children = [{\n name: 'a:ext',\n properties: {\n rawMap: {\n uri: '{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}'\n }\n },\n children: [{\n name: 'a16:creationId',\n properties: {\n rawMap: {\n 'id': '{822E6D20-D7BC-2841-A643-D49A6EF008A2}',\n 'xmlns:a16': 'http://schemas.microsoft.com/office/drawing/2014/main'\n }\n }\n }]\n }];\n var recolor = image.recolor && image.recolor.toLowerCase();\n switch (recolor) {\n case 'grayscale':\n case 'sepia':\n case 'washout':\n children.push({\n name: 'a:ext',\n properties: {\n rawMap: {\n uri: '{C183D7F6-B498-43B3-948B-1728B52AA6E4}'\n }\n },\n children: [{\n name: 'adec:decorative',\n properties: {\n rawMap: {\n 'val': '0',\n 'xmlns:adec': 'http://schemas.microsoft.com/office/drawing/2017/decorative'\n }\n }\n }]\n });\n }\n return {\n name: 'a:extLst',\n children: children\n };\n};\nvar getNvPicPr = function (image, index) { return ({\n name: 'xdr:nvPicPr',\n children: [{\n name: 'xdr:cNvPr',\n properties: {\n rawMap: {\n id: index,\n name: image.id,\n descr: image.altText != null ? image.altText : undefined\n }\n },\n children: [getExt(image)]\n }, {\n name: 'xdr:cNvPicPr',\n properties: {\n rawMap: {\n preferRelativeResize: '0'\n }\n },\n children: [{\n name: 'a:picLocks'\n }]\n }]\n}); };\nvar getColorDetails = function (color) {\n if (!color.saturation && !color.tint) {\n return;\n }\n var ret = [];\n if (color.saturation) {\n ret.push({\n name: 'a:satMod',\n properties: {\n rawMap: {\n val: color.saturation * 1000\n }\n }\n });\n }\n if (color.tint) {\n ret.push({\n name: 'a:tint',\n properties: {\n rawMap: {\n val: color.tint * 1000\n }\n }\n });\n }\n return ret;\n};\nvar getDuoTone = function (primaryColor, secondaryColor) {\n return ({\n name: 'a:duotone',\n children: [{\n name: 'a:prstClr',\n properties: {\n rawMap: {\n val: primaryColor.color\n }\n },\n children: getColorDetails(primaryColor)\n }, {\n name: 'a:srgbClr',\n properties: {\n rawMap: {\n val: secondaryColor.color\n }\n },\n children: getColorDetails(secondaryColor)\n }]\n });\n};\nvar getBlipFill = function (image, index) {\n var blipChildren;\n if (image.transparency) {\n var transparency = Math.min(Math.max(image.transparency, 0), 100);\n blipChildren = [{\n name: 'a:alphaModFix',\n properties: {\n rawMap: {\n amt: 100000 - Math.round(transparency * 1000),\n }\n }\n }];\n }\n if (image.recolor) {\n if (!blipChildren) {\n blipChildren = [];\n }\n switch (image.recolor.toLocaleLowerCase()) {\n case 'grayscale':\n blipChildren.push({ name: 'a:grayscl' });\n break;\n case 'sepia':\n blipChildren.push(getDuoTone({ color: 'black' }, { color: 'D9C3A5', tint: 50, saturation: 180 }));\n break;\n case 'washout':\n blipChildren.push({\n name: 'a:lum',\n properties: {\n rawMap: {\n bright: '70000',\n contrast: '-70000'\n }\n }\n });\n break;\n default:\n }\n }\n return ({\n name: 'xdr:blipFill',\n children: [{\n name: 'a:blip',\n properties: {\n rawMap: {\n 'cstate': 'print',\n 'r:embed': \"rId\" + index,\n 'xmlns:r': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships'\n }\n },\n children: blipChildren\n }, {\n name: 'a:stretch',\n children: [{\n name: 'a:fillRect'\n }]\n }]\n });\n};\nvar getSpPr = function (image, imageBoxSize) {\n var xfrm = {\n name: 'a:xfrm',\n children: [{\n name: 'a:off',\n properties: {\n rawMap: {\n x: 0,\n y: 0\n }\n }\n }, {\n name: 'a:ext',\n properties: {\n rawMap: {\n cx: imageBoxSize.width,\n cy: imageBoxSize.height\n }\n }\n }]\n };\n if (image.rotation) {\n var rotation = image.rotation;\n xfrm.properties = {\n rawMap: {\n rot: Math.min(Math.max(rotation, 0), 360) * 60000\n }\n };\n }\n var prstGeom = {\n name: 'a:prstGeom',\n properties: {\n rawMap: {\n prst: 'rect'\n }\n },\n children: [{ name: 'a:avLst' }]\n };\n var ret = {\n name: 'xdr:spPr',\n children: [xfrm, prstGeom]\n };\n return ret;\n};\nvar getImageBoxSize = function (image) {\n image.fitCell = !!image.fitCell || (!image.width || !image.height);\n var _a = image.position, position = _a === void 0 ? {} : _a, fitCell = image.fitCell, _b = image.width, width = _b === void 0 ? 0 : _b, _c = image.height, height = _c === void 0 ? 0 : _c, totalHeight = image.totalHeight, totalWidth = image.totalWidth;\n var _d = position.offsetX, offsetX = _d === void 0 ? 0 : _d, _e = position.offsetY, offsetY = _e === void 0 ? 0 : _e, _f = position.row, row = _f === void 0 ? 1 : _f, _g = position.rowSpan, rowSpan = _g === void 0 ? 1 : _g, _h = position.column, column = _h === void 0 ? 1 : _h, _j = position.colSpan, colSpan = _j === void 0 ? 1 : _j;\n return {\n from: {\n row: row - 1,\n col: column - 1,\n offsetX: pixelsToEMU(offsetX),\n offsetY: pixelsToEMU(offsetY)\n },\n to: {\n row: (row - 1) + (fitCell ? 1 : rowSpan - 1),\n col: (column - 1) + (fitCell ? 1 : colSpan - 1),\n offsetX: pixelsToEMU(width + offsetX),\n offsetY: pixelsToEMU(height + offsetY)\n },\n height: pixelsToEMU(totalHeight || height),\n width: pixelsToEMU(totalWidth || width)\n };\n};\nvar getPicture = function (image, currentIndex, worksheetImageIndex, imageBoxSize) {\n return {\n name: 'xdr:pic',\n children: [\n getNvPicPr(image, currentIndex + 1),\n getBlipFill(image, worksheetImageIndex + 1),\n getSpPr(image, imageBoxSize)\n ]\n };\n};\nvar drawingFactory = {\n getTemplate: function (config) {\n var sheetIndex = config.sheetIndex;\n var sheetImages = ExcelXlsxFactory.worksheetImages.get(sheetIndex);\n var sheetImageIds = ExcelXlsxFactory.worksheetImageIds.get(sheetIndex);\n var children = sheetImages.map(function (image, idx) {\n var boxSize = getImageBoxSize(image);\n return ({\n name: 'xdr:twoCellAnchor',\n properties: {\n rawMap: {\n editAs: 'absolute'\n }\n },\n children: [\n getAnchor('from', boxSize.from),\n getAnchor('to', boxSize.to),\n getPicture(image, idx, sheetImageIds.get(image.id).index, boxSize),\n { name: 'xdr:clientData' }\n ]\n });\n });\n return {\n name: 'xdr:wsDr',\n properties: {\n rawMap: {\n 'xmlns:a': 'http://schemas.openxmlformats.org/drawingml/2006/main',\n 'xmlns:xdr': 'http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing'\n }\n },\n children: children\n };\n }\n};\nexport default drawingFactory;\n","var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar getColorChildren = function (props) {\n var _a = __read(props, 4), type = _a[0], innerType = _a[1], val = _a[2], lastClr = _a[3];\n return {\n name: \"a:\" + type,\n children: [{\n name: \"a:\" + innerType,\n properties: {\n rawMap: {\n val: val,\n lastClr: lastClr\n }\n }\n }]\n };\n};\nvar colorScheme = {\n getTemplate: function () {\n return {\n name: \"a:clrScheme\",\n properties: {\n rawMap: {\n name: \"Office\"\n }\n },\n children: [\n getColorChildren(['dk1', 'sysClr', 'windowText', '000000']),\n getColorChildren(['lt1', 'sysClr', 'window', 'FFFFFF']),\n getColorChildren(['dk2', 'srgbClr', '44546A']),\n getColorChildren(['lt2', 'srgbClr', 'E7E6E6']),\n getColorChildren(['accent1', 'srgbClr', '4472C4']),\n getColorChildren(['accent2', 'srgbClr', 'ED7D31']),\n getColorChildren(['accent3', 'srgbClr', 'A5A5A5']),\n getColorChildren(['accent4', 'srgbClr', 'FFC000']),\n getColorChildren(['accent5', 'srgbClr', '5B9BD5']),\n getColorChildren(['accent6', 'srgbClr', '70AD47']),\n getColorChildren(['hlink', 'srgbClr', '0563C1']),\n getColorChildren(['folHlink', 'srgbClr', '954F72'])\n ]\n };\n }\n};\nexport default colorScheme;\n","var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { _ } from '@ag-grid-community/core';\nvar getFont = function (props) {\n var _a = __read(props, 4), type = _a[0], typeface = _a[1], script = _a[2], panose = _a[3];\n return {\n name: \"a:\" + type,\n properties: {\n rawMap: {\n script: script,\n typeface: typeface,\n panose: panose\n }\n }\n };\n};\nvar fontScheme = {\n getTemplate: function () {\n var utf8_encode = _.utf8_encode;\n return {\n name: \"a:fontScheme\",\n properties: {\n rawMap: {\n name: \"Office\"\n }\n },\n children: [{\n name: 'a:majorFont',\n children: [\n getFont(['latin', 'Calibri Light', undefined, '020F0302020204030204']),\n getFont(['ea', '']),\n getFont(['cs', '']),\n getFont(['font', utf8_encode('游ゴシック Light'), 'Jpan']),\n getFont(['font', utf8_encode('맑은 고딕'), 'Hang']),\n getFont(['font', utf8_encode('等线 Light'), 'Hans']),\n getFont(['font', utf8_encode('新細明體'), 'Hant']),\n getFont(['font', 'Times New Roman', 'Arab']),\n getFont(['font', 'Times New Roman', 'Hebr']),\n getFont(['font', 'Tahoma', 'Thai']),\n getFont(['font', 'Nyala', 'Ethi']),\n getFont(['font', 'Vrinda', 'Beng']),\n getFont(['font', 'Shruti', 'Gujr']),\n getFont(['font', 'MoolBoran', 'Khmr']),\n getFont(['font', 'Tunga', 'Knda']),\n getFont(['font', 'Raavi', 'Guru']),\n getFont(['font', 'Euphemia', 'Cans']),\n getFont(['font', 'Plantagenet Cherokee', 'Cher']),\n getFont(['font', 'Microsoft Yi Baiti', 'Yiii']),\n getFont(['font', 'Microsoft Himalaya', 'Tibt']),\n getFont(['font', 'MV Boli', 'Thaa']),\n getFont(['font', 'Mangal', 'Deva']),\n getFont(['font', 'Gautami', 'Telu']),\n getFont(['font', 'Latha', 'Taml']),\n getFont(['font', 'Estrangelo Edessa', 'Syrc']),\n getFont(['font', 'Kalinga', 'Orya']),\n getFont(['font', 'Kartika', 'Mlym']),\n getFont(['font', 'DokChampa', 'Laoo']),\n getFont(['font', 'Iskoola Pota', 'Sinh']),\n getFont(['font', 'Mongolian Baiti', 'Mong']),\n getFont(['font', 'Times New Roman', 'Viet']),\n getFont(['font', 'Microsoft Uighur', 'Uigh']),\n getFont(['font', 'Sylfaen', 'Geor']),\n getFont(['font', 'Arial', 'Armn']),\n getFont(['font', 'Leelawadee UI', 'Bugi']),\n getFont(['font', 'Microsoft JhengHei', 'Bopo']),\n getFont(['font', 'Javanese Text', 'Java']),\n getFont(['font', 'Segoe UI', 'Lisu']),\n getFont(['font', 'Myanmar Text', 'Mymr']),\n getFont(['font', 'Ebrima', 'Nkoo']),\n getFont(['font', 'Nirmala UI', 'Olck']),\n getFont(['font', 'Ebrima', 'Osma']),\n getFont(['font', 'Phagspa', 'Phag']),\n getFont(['font', 'Estrangelo Edessa', 'Syrn']),\n getFont(['font', 'Estrangelo Edessa', 'Syrj']),\n getFont(['font', 'Estrangelo Edessa', 'Syre']),\n getFont(['font', 'Nirmala UI', 'Sora']),\n getFont(['font', 'Microsoft Tai Le', 'Tale']),\n getFont(['font', 'Microsoft New Tai Lue', 'Talu']),\n getFont(['font', 'Ebrima', 'Tfng'])\n ]\n }, {\n name: 'a:minorFont',\n children: [\n getFont(['latin', 'Calibri', undefined, '020F0502020204030204']),\n getFont(['ea', '']),\n getFont(['cs', '']),\n getFont(['font', utf8_encode('游ゴシック'), 'Jpan']),\n getFont(['font', utf8_encode('맑은 고딕'), 'Hang']),\n getFont(['font', utf8_encode('等线'), 'Hans']),\n getFont(['font', utf8_encode('新細明體'), 'Hant']),\n getFont(['font', 'Arial', 'Arab']),\n getFont(['font', 'Arial', 'Hebr']),\n getFont(['font', 'Tahoma', 'Thai']),\n getFont(['font', 'Nyala', 'Ethi']),\n getFont(['font', 'Vrinda', 'Beng']),\n getFont(['font', 'Shruti', 'Gujr']),\n getFont(['font', 'DaunPenh', 'Khmr']),\n getFont(['font', 'Tunga', 'Knda']),\n getFont(['font', 'Raavi', 'Guru']),\n getFont(['font', 'Euphemia', 'Cans']),\n getFont(['font', 'Plantagenet Cherokee', 'Cher']),\n getFont(['font', 'Microsoft Yi Baiti', 'Yiii']),\n getFont(['font', 'Microsoft Himalaya', 'Tibt']),\n getFont(['font', 'MV Boli', 'Thaa']),\n getFont(['font', 'Mangal', 'Deva']),\n getFont(['font', 'Gautami', 'Telu']),\n getFont(['font', 'Latha', 'Taml']),\n getFont(['font', 'Estrangelo Edessa', 'Syrc']),\n getFont(['font', 'Kalinga', 'Orya']),\n getFont(['font', 'Kartika', 'Mlym']),\n getFont(['font', 'DokChampa', 'Laoo']),\n getFont(['font', 'Iskoola Pota', 'Sinh']),\n getFont(['font', 'Mongolian Baiti', 'Mong']),\n getFont(['font', 'Arial', 'Viet']),\n getFont(['font', 'Microsoft Uighur', 'Uigh']),\n getFont(['font', 'Sylfaen', 'Geor']),\n getFont(['font', 'Arial', 'Armn']),\n getFont(['font', 'Leelawadee UI', 'Bugi']),\n getFont(['font', 'Microsoft JhengHei', 'Bopo']),\n getFont(['font', 'Javanese Text', 'Java']),\n getFont(['font', 'Segoe UI', 'Lisu']),\n getFont(['font', 'Myanmar Text', 'Mymr']),\n getFont(['font', 'Ebrima', 'Nkoo']),\n getFont(['font', 'Nirmala UI', 'Olck']),\n getFont(['font', 'Ebrima', 'Osma']),\n getFont(['font', 'Phagspa', 'Phag']),\n getFont(['font', 'Estrangelo Edessa', 'Syrn']),\n getFont(['font', 'Estrangelo Edessa', 'Syrj']),\n getFont(['font', 'Estrangelo Edessa', 'Syre']),\n getFont(['font', 'Nirmala UI', 'Sora']),\n getFont(['font', 'Microsoft Tai Le', 'Tale']),\n getFont(['font', 'Microsoft New Tai Lue', 'Talu']),\n getFont(['font', 'Ebrima', 'Tfng'])\n ]\n }]\n };\n }\n};\nexport default fontScheme;\n","var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar getPropertyVal = function (name, val, children) { return ({\n name: \"a:\" + name,\n properties: {\n rawMap: {\n val: val\n }\n },\n children: children\n}); };\nvar getGs = function (props) {\n var _a = __read(props, 6), pos = _a[0], schemeColor = _a[1], satMod = _a[2], lumMod = _a[3], tint = _a[4], shade = _a[5];\n var children = [];\n children.push(getPropertyVal('satMod', satMod));\n if (lumMod) {\n children.push(getPropertyVal('lumMod', lumMod));\n }\n if (tint) {\n children.push(getPropertyVal('tint', tint));\n }\n if (shade) {\n children.push(getPropertyVal('shade', shade));\n }\n return {\n name: 'a:gs',\n properties: {\n rawMap: {\n pos: pos\n }\n },\n children: [{\n name: 'a:schemeClr',\n properties: {\n rawMap: {\n val: schemeColor\n }\n },\n children: children\n }]\n };\n};\nvar getSolidFill = function (val, children) { return ({\n name: 'a:solidFill',\n children: [getPropertyVal('schemeClr', val, children)]\n}); };\nvar getGradFill = function (props) {\n var _a = __read(props, 5), rotWithShape = _a[0], gs1 = _a[1], gs2 = _a[2], gs3 = _a[3], lin = _a[4];\n var _b = __read(lin, 2), ang = _b[0], scaled = _b[1];\n return {\n name: 'a:gradFill',\n properties: {\n rawMap: {\n rotWithShape: rotWithShape\n }\n },\n children: [{\n name: 'a:gsLst',\n children: [\n getGs(gs1),\n getGs(gs2),\n getGs(gs3)\n ]\n }, {\n name: 'a:lin',\n properties: {\n rawMap: {\n ang: ang,\n scaled: scaled\n }\n }\n }]\n };\n};\nvar getLine = function (props) {\n var _a = __read(props, 4), w = _a[0], cap = _a[1], cmpd = _a[2], algn = _a[3];\n return {\n name: 'a:ln',\n properties: {\n rawMap: { w: w, cap: cap, cmpd: cmpd, algn: algn }\n },\n children: [\n getSolidFill('phClr'),\n getPropertyVal('prstDash', 'solid'),\n {\n name: 'a:miter',\n properties: {\n rawMap: {\n lim: '800000'\n }\n }\n }\n ]\n };\n};\nvar getEffectStyle = function (shadow) {\n var children = [];\n if (shadow) {\n var _a = __read(shadow, 5), blurRad = _a[0], dist = _a[1], dir = _a[2], algn = _a[3], rotWithShape = _a[4];\n children.push({\n name: 'a:outerShdw',\n properties: {\n rawMap: { blurRad: blurRad, dist: dist, dir: dir, algn: algn, rotWithShape: rotWithShape }\n },\n children: [\n getPropertyVal('srgbClr', '000000', [getPropertyVal('alpha', '63000')])\n ]\n });\n }\n return {\n name: 'a:effectStyle',\n children: [Object.assign({}, {\n name: 'a:effectLst'\n }, children.length ? { children: children } : {})]\n };\n};\nvar getFillStyleList = function () { return ({\n name: 'a:fillStyleLst',\n children: [\n getSolidFill('phClr'),\n getGradFill([\n '1',\n ['0', 'phClr', '105000', '110000', '67000'],\n ['50000', 'phClr', '103000', '105000', '73000'],\n ['100000', 'phClr', '109000', '105000', '81000'],\n ['5400000', '0']\n ]),\n getGradFill([\n '1',\n ['0', 'phClr', '103000', '102000', '94000'],\n ['50000', 'phClr', '110000', '100000', undefined, '100000'],\n ['100000', 'phClr', '120000', '99000', undefined, '78000'],\n ['5400000', '0']\n ])\n ]\n}); };\nvar getLineStyleList = function () { return ({\n name: 'a:lnStyleLst',\n children: [\n getLine(['6350', 'flat', 'sng', 'ctr']),\n getLine(['12700', 'flat', 'sng', 'ctr']),\n getLine(['19050', 'flat', 'sng', 'ctr'])\n ]\n}); };\nvar getEffectStyleList = function () { return ({\n name: 'a:effectStyleLst',\n children: [\n getEffectStyle(),\n getEffectStyle(),\n getEffectStyle(['57150', '19050', '5400000', 'ctr', '0'])\n ]\n}); };\nvar getBgFillStyleList = function () { return ({\n name: 'a:bgFillStyleLst',\n children: [\n getSolidFill('phClr'),\n getSolidFill('phClr', [\n getPropertyVal('tint', '95000'),\n getPropertyVal('satMod', '170000'),\n ]),\n getGradFill([\n '1',\n ['0', 'phClr', '150000', '102000', '93000', '98000'],\n ['50000', 'phClr', '130000', '103000', '98000', '90000'],\n ['100000', 'phClr', '120000', undefined, undefined, '63000'],\n ['5400000', '0']\n ])\n ]\n}); };\nvar formatScheme = {\n getTemplate: function () {\n return {\n name: \"a:fmtScheme\",\n properties: {\n rawMap: {\n name: \"Office\"\n }\n },\n children: [\n getFillStyleList(),\n getLineStyleList(),\n getEffectStyleList(),\n getBgFillStyleList()\n ]\n };\n }\n};\nexport default formatScheme;\n","import colorScheme from './colorScheme';\nimport fontScheme from './fontScheme';\nimport formatScheme from './formatScheme';\nvar themeElements = {\n getTemplate: function () {\n return {\n name: \"a:themeElements\",\n children: [\n colorScheme.getTemplate(),\n fontScheme.getTemplate(),\n formatScheme.getTemplate()\n ]\n };\n }\n};\nexport default themeElements;\n","import themeElements from './office/themeElements';\nvar officeTheme = {\n getTemplate: function () {\n return {\n name: \"a:theme\",\n properties: {\n prefixedAttributes: [{\n prefix: \"xmlns:\",\n map: {\n a: \"http://schemas.openxmlformats.org/drawingml/2006/main\"\n },\n }],\n rawMap: {\n name: \"Office Theme\"\n }\n },\n children: [\n themeElements.getTemplate(),\n {\n name: 'a:objectDefaults'\n },\n {\n name: 'a:extraClrSchemeLst'\n }\n ]\n };\n }\n};\nexport default officeTheme;\n","import { _ } from '@ag-grid-community/core';\nvar buildSharedString = function (strMap) {\n var ret = [];\n strMap.forEach(function (val, key) {\n var textNode = key.toString();\n var child = {\n name: 't',\n textNode: _.utf8_encode(_.escapeString(textNode))\n };\n // if we have leading or trailing spaces, instruct Excel not to trim them\n var preserveSpaces = textNode.trim().length !== textNode.length;\n if (preserveSpaces) {\n child.properties = {\n rawMap: {\n \"xml:space\": \"preserve\"\n }\n };\n }\n ret.push({\n name: 'si',\n children: [child]\n });\n });\n return ret;\n};\nvar sharedStrings = {\n getTemplate: function (strings) {\n return {\n name: \"sst\",\n properties: {\n rawMap: {\n xmlns: 'http://schemas.openxmlformats.org/spreadsheetml/2006/main',\n count: strings.size,\n uniqueCount: strings.size\n }\n },\n children: buildSharedString(strings)\n };\n }\n};\nexport default sharedStrings;\n","var numberFormatFactory = {\n getTemplate: function (numberFormat) {\n var formatCode = numberFormat.formatCode, numFmtId = numberFormat.numFmtId;\n return {\n name: \"numFmt\",\n properties: {\n rawMap: {\n formatCode: formatCode,\n numFmtId: numFmtId\n }\n }\n };\n }\n};\nexport default numberFormatFactory;\n","import numberFormatFactory from './numberFormat';\nvar numberFormatsFactory = {\n getTemplate: function (numberFormats) {\n return {\n name: \"numFmts\",\n properties: {\n rawMap: {\n count: numberFormats.length\n }\n },\n children: numberFormats.map(function (numberFormat) { return numberFormatFactory.getTemplate(numberFormat); })\n };\n }\n};\nexport default numberFormatsFactory;\n","var fontFactory = {\n getTemplate: function (font) {\n var size = font.size, colorTheme = font.colorTheme, _a = font.color, color = _a === void 0 ? 'FF000000' : _a, _b = font.fontName, fontName = _b === void 0 ? 'Calibri' : _b, family = font.family, scheme = font.scheme, italic = font.italic, bold = font.bold, strikeThrough = font.strikeThrough, outline = font.outline, shadow = font.shadow, underline = font.underline, verticalAlign = font.verticalAlign;\n var children = [\n { name: 'sz', properties: { rawMap: { val: size } } },\n { name: 'color', properties: { rawMap: { theme: colorTheme, rgb: color } } },\n { name: 'name', properties: { rawMap: { val: fontName } } }\n ];\n if (family) {\n children.push({ name: 'family', properties: { rawMap: { val: family } } });\n }\n if (scheme) {\n children.push({ name: 'scheme', properties: { rawMap: { val: scheme } } });\n }\n if (italic) {\n children.push({ name: 'i' });\n }\n if (bold) {\n children.push({ name: 'b' });\n }\n if (strikeThrough) {\n children.push({ name: 'strike' });\n }\n if (outline) {\n children.push({ name: 'outline' });\n }\n if (shadow) {\n children.push({ name: 'shadow' });\n }\n if (underline) {\n children.push({ name: 'u', properties: { rawMap: { val: underline } } });\n }\n if (verticalAlign) {\n children.push({ name: 'vertAlign', properties: { rawMap: { val: verticalAlign } } });\n }\n return { name: \"font\", children: children };\n }\n};\nexport default fontFactory;\n","import fontFactory from './font';\nvar fontsFactory = {\n getTemplate: function (fonts) {\n return {\n name: \"fonts\",\n properties: {\n rawMap: {\n count: fonts.length\n }\n },\n children: fonts.map(function (font) { return fontFactory.getTemplate(font); })\n };\n }\n};\nexport default fontsFactory;\n","var fillFactory = {\n getTemplate: function (fill) {\n var patternType = fill.patternType, fgTheme = fill.fgTheme, fgTint = fill.fgTint, fgRgb = fill.fgRgb, bgRgb = fill.bgRgb, bgIndexed = fill.bgIndexed;\n var pf = {\n name: 'patternFill',\n properties: {\n rawMap: {\n patternType: patternType\n }\n }\n };\n if (fgTheme || fgTint || fgRgb) {\n pf.children = [{\n name: 'fgColor',\n properties: {\n rawMap: {\n theme: fgTheme,\n tint: fgTint,\n rgb: fgRgb\n }\n }\n }];\n }\n if (bgIndexed || bgRgb) {\n if (!pf.children) {\n pf.children = [];\n }\n pf.children.push({\n name: 'bgColor',\n properties: {\n rawMap: {\n indexed: bgIndexed,\n rgb: bgRgb\n }\n }\n });\n }\n return {\n name: \"fill\",\n children: [pf]\n };\n }\n};\nexport default fillFactory;\n","import fillFactory from './fill';\nvar fillsFactory = {\n getTemplate: function (fills) {\n return {\n name: \"fills\",\n properties: {\n rawMap: {\n count: fills.length\n }\n },\n children: fills.map(function (fill) { return fillFactory.getTemplate(fill); })\n };\n }\n};\nexport default fillsFactory;\n","var getWeightName = function (value) {\n switch (value) {\n case 1: return 'thin';\n case 2: return 'medium';\n case 3: return 'thick';\n default: return 'hair';\n }\n};\nvar mappedBorderNames = {\n None: 'None',\n Dot: 'Dotted',\n Dash: 'Dashed',\n Double: 'Double',\n DashDot: 'DashDot',\n DashDotDot: 'DashDotDot',\n SlantDashDot: 'SlantDashDot'\n};\nvar mediumBorders = ['Dashed', 'DashDot', 'DashDotDot'];\nvar colorMap = {\n None: 'none',\n Solid: 'solid',\n Gray50: 'mediumGray',\n Gray75: 'darkGray',\n Gray25: 'lightGray',\n HorzStripe: 'darkHorizontal',\n VertStripe: 'darkVertical',\n ReverseDiagStripe: 'darkDown',\n DiagStripe: 'darkUp',\n DiagCross: 'darkGrid',\n ThickDiagCross: 'darkTrellis',\n ThinHorzStripe: 'lightHorizontal',\n ThinVertStripe: 'lightVertical',\n ThinReverseDiagStripe: 'lightDown',\n ThinDiagStripe: 'lightUp',\n ThinHorzCross: 'lightGrid',\n ThinDiagCross: 'lightTrellis',\n Gray125: 'gray125',\n Gray0625: 'gray0625'\n};\nvar horizontalAlignmentMap = {\n Automatic: 'general',\n Left: 'left',\n Center: 'center',\n Right: 'right',\n Fill: 'fill',\n Justify: 'justify',\n CenterAcrossSelection: 'centerContinuous',\n Distributed: 'distributed',\n JustifyDistributed: 'justify'\n};\nvar verticalAlignmentMap = {\n Automatic: undefined,\n Top: 'top',\n Bottom: 'bottom',\n Center: 'center',\n Justify: 'justify',\n Distributed: 'distributed',\n JustifyDistributed: 'justify'\n};\nexport var convertLegacyPattern = function (name) {\n if (!name) {\n return 'none';\n }\n return colorMap[name] || name;\n};\nexport var convertLegacyColor = function (color) {\n if (color == undefined) {\n return color;\n }\n if (color.charAt(0) === '#') {\n color = color.substr(1);\n }\n return color.length === 6 ? 'FF' + color : color;\n};\nexport var convertLegacyBorder = function (type, weight) {\n if (!type) {\n return 'thin';\n }\n // Legacy Types are: None, Continuous, Dash, Dot, DashDot, DashDotDot, SlantDashDot, and Double\n // Weight represents: 0—Hairline, 1—Thin , 2—Medium, 3—Thick\n // New types: none, thin, medium, dashed, dotted, thick, double, hair, mediumDashed, dashDot, mediumDashDot,\n // dashDotDot, mediumDashDotDot, slantDashDot\n var namedWeight = getWeightName(weight);\n var mappedName = mappedBorderNames[type];\n if (type === 'Continuous') {\n return namedWeight;\n }\n if (namedWeight === 'medium' && mediumBorders.indexOf(mappedName) !== -1) {\n return \"medium\" + mappedName;\n }\n return mappedName.charAt(0).toLowerCase() + mappedName.substr(1);\n};\nexport var convertLegacyHorizontalAlignment = function (alignment) {\n return horizontalAlignmentMap[alignment] || 'general';\n};\nexport var convertLegacyVerticalAlignment = function (alignment) {\n return verticalAlignmentMap[alignment] || undefined;\n};\n","import { convertLegacyColor } from '../../../assets/excelLegacyConvert';\nvar getBorderColor = function (color) {\n return {\n name: 'color',\n properties: {\n rawMap: {\n rgb: convertLegacyColor(color || '#000000')\n }\n }\n };\n};\nvar borderFactory = {\n getTemplate: function (border) {\n var left = border.left, right = border.right, top = border.top, bottom = border.bottom, diagonal = border.diagonal;\n var leftChildren = left ? [getBorderColor(left.color)] : undefined;\n var rightChildren = right ? [getBorderColor(right.color)] : undefined;\n var topChildren = top ? [getBorderColor(top.color)] : undefined;\n var bottomChildren = bottom ? [getBorderColor(bottom.color)] : undefined;\n var diagonalChildren = diagonal ? [getBorderColor(diagonal.color)] : undefined;\n return {\n name: 'border',\n children: [{\n name: 'left',\n properties: { rawMap: { style: left && left.style } },\n children: leftChildren\n }, {\n name: 'right',\n properties: { rawMap: { style: right && right.style } },\n children: rightChildren\n }, {\n name: 'top',\n properties: { rawMap: { style: top && top.style } },\n children: topChildren\n }, {\n name: 'bottom',\n properties: { rawMap: { style: bottom && bottom.style } },\n children: bottomChildren\n }, {\n name: 'diagonal',\n properties: { rawMap: { style: diagonal && diagonal.style } },\n children: diagonalChildren\n }]\n };\n }\n};\nexport default borderFactory;\n","import borderFactory from './border';\nvar bordersFactory = {\n getTemplate: function (borders) {\n return {\n name: \"borders\",\n properties: {\n rawMap: {\n count: borders.length\n }\n },\n children: borders.map(function (border) { return borderFactory.getTemplate(border); })\n };\n }\n};\nexport default bordersFactory;\n","import { convertLegacyHorizontalAlignment, convertLegacyVerticalAlignment } from '../../../assets/excelLegacyConvert';\nvar getReadingOrderId = function (readingOrder) {\n var order = ['Context', 'LeftToRight', 'RightToLeft'];\n var pos = order.indexOf(readingOrder);\n return Math.max(pos, 0);\n};\nvar alignmentFactory = {\n getTemplate: function (alignment) {\n var horizontal = alignment.horizontal, indent = alignment.indent, readingOrder = alignment.readingOrder, rotate = alignment.rotate, shrinkToFit = alignment.shrinkToFit, vertical = alignment.vertical, wrapText = alignment.wrapText;\n return {\n name: 'alignment',\n properties: {\n rawMap: {\n horizontal: horizontal && convertLegacyHorizontalAlignment(horizontal),\n indent: indent,\n readingOrder: readingOrder && getReadingOrderId(readingOrder),\n textRotation: rotate,\n shrinkToFit: shrinkToFit,\n vertical: vertical && convertLegacyVerticalAlignment(vertical),\n wrapText: wrapText\n }\n }\n };\n }\n};\nexport default alignmentFactory;\n","var protectionFactory = {\n getTemplate: function (protection) {\n var locked = protection.protected === false ? 0 : 1;\n var hidden = protection.hideFormula === true ? 1 : 0;\n return {\n name: 'protection',\n properties: {\n rawMap: {\n hidden: hidden,\n locked: locked\n }\n }\n };\n }\n};\nexport default protectionFactory;\n","import alignmentFactory from './alignment';\nimport protectionFactory from './protection';\nvar xfFactory = {\n getTemplate: function (xf) {\n var alignment = xf.alignment, borderId = xf.borderId, fillId = xf.fillId, fontId = xf.fontId, numFmtId = xf.numFmtId, protection = xf.protection, xfId = xf.xfId;\n var children = [];\n if (alignment) {\n children.push(alignmentFactory.getTemplate(alignment));\n }\n if (protection) {\n children.push(protectionFactory.getTemplate(protection));\n }\n return {\n name: \"xf\",\n properties: {\n rawMap: {\n applyAlignment: alignment ? 1 : undefined,\n applyProtection: protection ? 1 : undefined,\n applyBorder: borderId ? 1 : undefined,\n applyFill: fillId ? 1 : undefined,\n borderId: borderId,\n fillId: fillId,\n applyFont: fontId ? 1 : undefined,\n fontId: fontId,\n applyNumberFormat: numFmtId ? 1 : undefined,\n numFmtId: numFmtId,\n xfId: xfId\n }\n },\n children: children.length ? children : undefined\n };\n }\n};\nexport default xfFactory;\n","import xfFactory from './xf';\nvar cellStylesXfsFactory = {\n getTemplate: function (xfs) {\n return {\n name: \"cellStyleXfs\",\n properties: {\n rawMap: {\n count: xfs.length\n }\n },\n children: xfs.map(function (xf) { return xfFactory.getTemplate(xf); })\n };\n }\n};\nexport default cellStylesXfsFactory;\n","import xfFactory from './xf';\nvar cellXfsFactory = {\n getTemplate: function (xfs) {\n return {\n name: \"cellXfs\",\n properties: {\n rawMap: {\n count: xfs.length\n }\n },\n children: xfs.map(function (xf) { return xfFactory.getTemplate(xf); })\n };\n }\n};\nexport default cellXfsFactory;\n","var borderFactory = {\n getTemplate: function (cellStyle) {\n var builtinId = cellStyle.builtinId, name = cellStyle.name, xfId = cellStyle.xfId;\n return {\n name: \"cellStyle\",\n properties: {\n rawMap: {\n builtinId: builtinId,\n name: name,\n xfId: xfId\n }\n }\n };\n }\n};\nexport default borderFactory;\n","import cellStyleFactory from './cellStyle';\nvar cellStylesFactory = {\n getTemplate: function (cellStyles) {\n return {\n name: \"cellStyles\",\n properties: {\n rawMap: {\n count: cellStyles.length\n }\n },\n children: cellStyles.map(function (cellStyle) { return cellStyleFactory.getTemplate(cellStyle); })\n };\n }\n};\nexport default cellStylesFactory;\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { _ } from '@ag-grid-community/core';\nimport numberFormatsFactory from './numberFormats';\nimport fontsFactory from './fonts';\nimport fillsFactory from './fills';\nimport bordersFactory from './borders';\nimport cellStylesXfsFactory from './cellStyleXfs';\nimport cellXfsFactory from './cellXfs';\nimport cellStylesFactory from './cellStyles';\nimport { convertLegacyBorder, convertLegacyColor, convertLegacyPattern } from '../../../assets/excelLegacyConvert';\nimport { numberFormatMap } from '../../../assets/excelConstants';\nimport { getFontFamilyId } from '../../../assets/excelUtils';\nvar stylesMap;\nvar registeredNumberFmts;\nvar registeredFonts;\nvar registeredFills;\nvar registeredBorders;\nvar registeredCellStyleXfs;\nvar registeredCellXfs;\nvar registeredCellStyles;\nvar currentSheet;\nvar getStyleName = function (name, currentSheet) {\n if (name.indexOf('mixedStyle') !== -1 && currentSheet > 1) {\n name += \"_\" + currentSheet;\n }\n return name;\n};\nvar resetStylesheetValues = function () {\n stylesMap = { base: 0 };\n registeredNumberFmts = [];\n registeredFonts = [{ fontName: 'Calibri', colorTheme: '1', family: '2', scheme: 'minor' }];\n registeredFills = [{ patternType: 'none', }, { patternType: 'gray125' }];\n registeredBorders = [{ left: undefined, right: undefined, top: undefined, bottom: undefined, diagonal: undefined }];\n registeredCellStyleXfs = [{ borderId: 0, fillId: 0, fontId: 0, numFmtId: 0 }];\n registeredCellXfs = [{ borderId: 0, fillId: 0, fontId: 0, numFmtId: 0, xfId: 0 }];\n registeredCellStyles = [{ builtinId: 0, name: 'Normal', xfId: 0 }];\n};\nvar registerFill = function (fill) {\n var convertedPattern = convertLegacyPattern(fill.pattern);\n var convertedFillColor = convertLegacyColor(fill.color);\n var convertedPatternColor = convertLegacyColor(fill.patternColor);\n var pos = registeredFills.findIndex(function (currentFill) {\n var patternType = currentFill.patternType, fgRgb = currentFill.fgRgb, bgRgb = currentFill.bgRgb;\n if (patternType != convertedPattern ||\n fgRgb != convertedFillColor ||\n bgRgb != convertedPatternColor) {\n return false;\n }\n return true;\n });\n if (pos === -1) {\n pos = registeredFills.length;\n registeredFills.push({ patternType: convertedPattern, fgRgb: convertedFillColor, bgRgb: convertedPatternColor });\n }\n return pos;\n};\nvar registerNumberFmt = function (format) {\n format = _.utf8_encode(format);\n if (numberFormatMap[format]) {\n return numberFormatMap[format];\n }\n var pos = registeredNumberFmts.findIndex(function (currentFormat) { return currentFormat.formatCode === format; });\n if (pos === -1) {\n pos = registeredNumberFmts.length + 164;\n registeredNumberFmts.push({ formatCode: format, numFmtId: pos });\n }\n else {\n pos = registeredNumberFmts[pos].numFmtId;\n }\n return pos;\n};\nvar registerBorders = function (borders) {\n var borderBottom = borders.borderBottom, borderTop = borders.borderTop, borderLeft = borders.borderLeft, borderRight = borders.borderRight;\n var bottomStyle;\n var topStyle;\n var leftStyle;\n var rightStyle;\n var bottomColor;\n var topColor;\n var leftColor;\n var rightColor;\n if (borderLeft) {\n leftStyle = convertLegacyBorder(borderLeft.lineStyle, borderLeft.weight);\n leftColor = convertLegacyColor(borderLeft.color);\n }\n if (borderRight) {\n rightStyle = convertLegacyBorder(borderRight.lineStyle, borderRight.weight);\n rightColor = convertLegacyColor(borderRight.color);\n }\n if (borderBottom) {\n bottomStyle = convertLegacyBorder(borderBottom.lineStyle, borderBottom.weight);\n bottomColor = convertLegacyColor(borderBottom.color);\n }\n if (borderTop) {\n topStyle = convertLegacyBorder(borderTop.lineStyle, borderTop.weight);\n topColor = convertLegacyColor(borderTop.color);\n }\n var pos = registeredBorders.findIndex(function (currentBorder) {\n var left = currentBorder.left, right = currentBorder.right, top = currentBorder.top, bottom = currentBorder.bottom;\n if (!left && (leftStyle || leftColor)) {\n return false;\n }\n if (!right && (rightStyle || rightColor)) {\n return false;\n }\n if (!top && (topStyle || topColor)) {\n return false;\n }\n if (!bottom && (bottomStyle || bottomColor)) {\n return false;\n }\n var _a = left || {}, clS = _a.style, clC = _a.color;\n var _b = right || {}, crS = _b.style, crC = _b.color;\n var _c = top || {}, ctS = _c.style, ctC = _c.color;\n var _d = bottom || {}, cbS = _d.style, cbC = _d.color;\n if (clS != leftStyle || clC != leftColor) {\n return false;\n }\n if (crS != rightStyle || crC != rightColor) {\n return false;\n }\n if (ctS != topStyle || ctC != topColor) {\n return false;\n }\n if (cbS != bottomStyle || cbC != bottomColor) {\n return false;\n }\n return true;\n });\n if (pos === -1) {\n pos = registeredBorders.length;\n registeredBorders.push({\n left: {\n style: leftStyle, color: leftColor\n },\n right: {\n style: rightStyle, color: rightColor\n },\n top: {\n style: topStyle, color: topColor\n },\n bottom: {\n style: bottomStyle, color: bottomColor\n },\n diagonal: {\n style: undefined,\n color: undefined\n }\n });\n }\n return pos;\n};\nvar registerFont = function (font) {\n var _a = font.fontName, name = _a === void 0 ? 'Calibri' : _a, color = font.color, size = font.size, bold = font.bold, italic = font.italic, outline = font.outline, shadow = font.shadow, strikeThrough = font.strikeThrough, underline = font.underline, family = font.family, verticalAlign = font.verticalAlign;\n var utf8Name = name ? _.utf8_encode(name) : name;\n var convertedColor = convertLegacyColor(color);\n var familyId = getFontFamilyId(family);\n var convertedUnderline = underline ? underline.toLocaleLowerCase() : undefined;\n var convertedVerticalAlign = verticalAlign ? verticalAlign.toLocaleLowerCase() : undefined;\n var pos = registeredFonts.findIndex(function (currentFont) {\n if (currentFont.fontName != utf8Name ||\n currentFont.color != convertedColor ||\n currentFont.size != size ||\n currentFont.bold != bold ||\n currentFont.italic != italic ||\n currentFont.outline != outline ||\n currentFont.shadow != shadow ||\n currentFont.strikeThrough != strikeThrough ||\n currentFont.underline != convertedUnderline ||\n currentFont.verticalAlign != convertedVerticalAlign ||\n // @ts-ignore\n currentFont.family != familyId) {\n return false;\n }\n return true;\n });\n if (pos === -1) {\n pos = registeredFonts.length;\n registeredFonts.push({\n fontName: utf8Name,\n color: convertedColor,\n size: size,\n bold: bold,\n italic: italic,\n outline: outline,\n shadow: shadow,\n strikeThrough: strikeThrough,\n underline: convertedUnderline,\n verticalAlign: convertedVerticalAlign,\n family: familyId != null ? familyId.toString() : undefined\n });\n }\n return pos;\n};\nvar registerStyle = function (config) {\n var alignment = config.alignment, borders = config.borders, font = config.font, interior = config.interior, numberFormat = config.numberFormat, protection = config.protection;\n var id = config.id;\n var currentFill = 0;\n var currentBorder = 0;\n var currentFont = 0;\n var currentNumberFmt = 0;\n if (!id) {\n return;\n }\n id = getStyleName(id, currentSheet);\n if (stylesMap[id] != undefined) {\n return;\n }\n if (interior) {\n currentFill = registerFill(interior);\n }\n if (borders) {\n currentBorder = registerBorders(borders);\n }\n if (font) {\n currentFont = registerFont(font);\n }\n if (numberFormat) {\n currentNumberFmt = registerNumberFmt(numberFormat.format);\n }\n stylesMap[id] = registeredCellXfs.length;\n registeredCellXfs.push({\n alignment: alignment,\n borderId: currentBorder || 0,\n fillId: currentFill || 0,\n fontId: currentFont || 0,\n numFmtId: currentNumberFmt || 0,\n protection: protection,\n xfId: 0\n });\n};\nvar stylesheetFactory = {\n getTemplate: function (defaultFontSize) {\n var numberFormats = numberFormatsFactory.getTemplate(registeredNumberFmts);\n var fonts = fontsFactory.getTemplate(registeredFonts.map(function (font) { return (__assign(__assign({}, font), { size: font.size != null ? font.size : defaultFontSize })); }));\n var fills = fillsFactory.getTemplate(registeredFills);\n var borders = bordersFactory.getTemplate(registeredBorders);\n var cellStylesXfs = cellStylesXfsFactory.getTemplate(registeredCellStyleXfs);\n var cellXfs = cellXfsFactory.getTemplate(registeredCellXfs);\n var cellStyles = cellStylesFactory.getTemplate(registeredCellStyles);\n resetStylesheetValues();\n return {\n name: 'styleSheet',\n properties: {\n rawMap: {\n 'mc:Ignorable': 'x14ac x16r2 xr',\n 'xmlns': 'http://schemas.openxmlformats.org/spreadsheetml/2006/main',\n 'xmlns:mc': 'http://schemas.openxmlformats.org/markup-compatibility/2006',\n 'xmlns:x14ac': 'http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac',\n 'xmlns:x16r2': 'http://schemas.microsoft.com/office/spreadsheetml/2015/02/main',\n 'xmlns:xr': 'http://schemas.microsoft.com/office/spreadsheetml/2014/revision'\n }\n },\n children: [\n numberFormats,\n fonts,\n fills,\n borders,\n cellStylesXfs,\n cellXfs,\n cellStyles,\n {\n name: 'tableStyles',\n properties: {\n rawMap: {\n count: 0,\n defaultPivotStyle: 'PivotStyleLight16',\n defaultTableStyle: 'TableStyleMedium2'\n }\n }\n }\n ]\n };\n }\n};\nexport var getStyleId = function (name, currentSheet) {\n return stylesMap[getStyleName(name, currentSheet)] || 0;\n};\nexport var registerStyles = function (styles, _currentSheet) {\n currentSheet = _currentSheet;\n if (currentSheet === 1) {\n resetStylesheetValues();\n }\n styles.forEach(registerStyle);\n};\nexport default stylesheetFactory;\n","var sheetFactory = {\n getTemplate: function (name, idx) {\n var sheetId = (idx + 1).toString();\n return {\n name: \"sheet\",\n properties: {\n rawMap: {\n \"name\": name,\n \"sheetId\": sheetId,\n \"r:id\": \"rId\" + sheetId\n }\n }\n };\n }\n};\nexport default sheetFactory;\n","import sheetFactory from './sheet';\nvar sheetsFactory = {\n getTemplate: function (names) {\n return {\n name: \"sheets\",\n children: names.map(function (sheet, idx) { return sheetFactory.getTemplate(sheet, idx); })\n };\n }\n};\nexport default sheetsFactory;\n","import sheetsFactory from './sheets';\nvar workbookFactory = {\n getTemplate: function (names) {\n return {\n name: \"workbook\",\n properties: {\n prefixedAttributes: [{\n prefix: \"xmlns:\",\n map: {\n r: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships\"\n },\n }],\n rawMap: {\n xmlns: \"http://schemas.openxmlformats.org/spreadsheetml/2006/main\"\n }\n },\n children: [sheetsFactory.getTemplate(names)]\n };\n }\n};\nexport default workbookFactory;\n","// https://docs.microsoft.com/en-us/office/troubleshoot/excel/determine-column-widths\nvar getExcelCellWidth = function (width) { return Math.ceil((width - 12) / 7 + 1); };\nvar columnFactory = {\n getTemplate: function (config) {\n var min = config.min, max = config.max, outlineLevel = config.outlineLevel, s = config.s, width = config.width, hidden = config.hidden, bestFit = config.bestFit;\n var excelWidth = 1;\n var customWidth = '0';\n if (width > 1) {\n excelWidth = getExcelCellWidth(width);\n customWidth = '1';\n }\n return {\n name: 'col',\n properties: {\n rawMap: {\n min: min,\n max: max,\n outlineLevel: outlineLevel != null ? outlineLevel : undefined,\n width: excelWidth,\n style: s,\n hidden: hidden ? '1' : '0',\n bestFit: bestFit ? '1' : '0',\n customWidth: customWidth\n }\n }\n };\n }\n};\nexport default columnFactory;\n","import { _ } from '@ag-grid-community/core';\nimport { getStyleId } from './styles/stylesheet';\nvar convertLegacyType = function (type) {\n var t = type.charAt(0).toLowerCase();\n return t === 's' ? 'inlineStr' : t;\n};\nvar cellFactory = {\n getTemplate: function (config, idx, currentSheet) {\n var ref = config.ref, data = config.data, styleId = config.styleId;\n var type = data.type, value = data.value;\n var convertedType = type;\n if (type === 'f') {\n convertedType = 'str';\n }\n else if (type.charAt(0) === type.charAt(0).toUpperCase()) {\n convertedType = convertLegacyType(type);\n }\n var obj = {\n name: 'c',\n properties: {\n rawMap: {\n r: ref,\n t: convertedType === 'empty' ? undefined : convertedType,\n s: styleId ? getStyleId(styleId, currentSheet) : undefined\n }\n }\n };\n if (convertedType === 'empty') {\n return obj;\n }\n var children;\n if (convertedType === 'str' && type === 'f') {\n children = [{\n name: 'f',\n textNode: _.escapeString(_.utf8_encode(value))\n }];\n }\n else if (convertedType === 'inlineStr') {\n children = [{\n name: 'is',\n children: [{\n name: 't',\n textNode: _.escapeString(_.utf8_encode(value))\n }]\n }];\n }\n else {\n children = [{\n name: 'v',\n textNode: value\n }];\n }\n return Object.assign({}, obj, { children: children });\n }\n};\nexport default cellFactory;\n","var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n};\nimport { getExcelColumnName } from '../../assets/excelUtils';\nimport cellFactory from './cell';\nvar addEmptyCells = function (cells, rowIdx) {\n var mergeMap = [];\n var posCounter = 0;\n for (var i = 0; i < cells.length; i++) {\n var cell = cells[i];\n if (cell.mergeAcross) {\n mergeMap.push({\n pos: i,\n excelPos: posCounter\n });\n posCounter += cell.mergeAcross;\n }\n posCounter++;\n }\n if (mergeMap.length) {\n for (var i = mergeMap.length - 1; i >= 0; i--) {\n var mergedCells = [];\n var cell = cells[mergeMap[i].pos];\n for (var j = 1; j <= cell.mergeAcross; j++) {\n mergedCells.push({\n ref: \"\" + getExcelColumnName(mergeMap[i].excelPos + 1 + j) + (rowIdx + 1),\n styleId: cell.styleId,\n data: { type: 'empty', value: null }\n });\n }\n if (mergedCells.length) {\n cells.splice.apply(cells, __spread([mergeMap[i].pos + 1, 0], mergedCells));\n }\n }\n }\n};\nvar shouldDisplayCell = function (cell) { return cell.data.value !== '' || cell.styleId !== undefined; };\nvar rowFactory = {\n getTemplate: function (config, idx, currentSheet) {\n var index = config.index, collapsed = config.collapsed, hidden = config.hidden, height = config.height, s = config.s, _a = config.cells, cells = _a === void 0 ? [] : _a;\n addEmptyCells(cells, idx);\n var children = cells.filter(shouldDisplayCell).map(function (cell, idx) { return cellFactory.getTemplate(cell, idx, currentSheet); });\n return {\n name: \"row\",\n properties: {\n rawMap: {\n r: index,\n collapsed: collapsed,\n hidden: hidden ? '1' : '0',\n ht: height,\n customHeight: height != null ? '1' : '0',\n s: s,\n customFormat: s != null ? '1' : '0'\n }\n },\n children: children\n };\n }\n};\nexport default rowFactory;\n","var mergeCellFactory = {\n getTemplate: function (ref) {\n return {\n name: 'mergeCell',\n properties: {\n rawMap: {\n ref: ref\n }\n }\n };\n }\n};\nexport default mergeCellFactory;\n","import { _ } from '@ag-grid-community/core';\nimport columnFactory from './column';\nimport rowFactory from './row';\nimport mergeCellFactory from './mergeCell';\nimport { ExcelXlsxFactory } from '../../excelXlsxFactory';\nimport { getExcelColumnName } from '../../assets/excelUtils';\nvar getMergedCellsAndAddColumnGroups = function (rows, cols) {\n var mergedCells = [];\n var cellsWithCollapsibleGroups = [];\n rows.forEach(function (currentRow, rowIdx) {\n var cells = currentRow.cells;\n var merges = 0;\n currentRow.index = rowIdx + 1;\n var lastCol;\n cells.forEach(function (currentCell, cellIdx) {\n var min = cellIdx + merges + 1;\n var start = getExcelColumnName(min);\n var outputRow = rowIdx + 1;\n if (currentCell.mergeAcross) {\n merges += currentCell.mergeAcross;\n var end = getExcelColumnName(cellIdx + merges + 1);\n mergedCells.push(\"\" + start + outputRow + \":\" + end + outputRow);\n }\n if (!cols[min - 1]) {\n cols[min - 1] = {};\n }\n var collapsibleRanges = currentCell.collapsibleRanges;\n if (collapsibleRanges) {\n collapsibleRanges.forEach(function (range) {\n cellsWithCollapsibleGroups.push([min + range[0], min + range[1]]);\n });\n }\n lastCol = cols[min - 1];\n lastCol.min = min;\n lastCol.max = min;\n currentCell.ref = \"\" + start + outputRow;\n });\n });\n cellsWithCollapsibleGroups.sort(function (a, b) {\n if (a[0] !== b[0]) {\n return a[0] - b[0];\n }\n return b[1] - a[1];\n });\n var rangeMap = new Map();\n var outlineLevel = new Map();\n cellsWithCollapsibleGroups.filter(function (currentRange) {\n var rangeString = currentRange.toString();\n var inMap = rangeMap.get(rangeString);\n if (inMap) {\n return false;\n }\n rangeMap.set(rangeString, true);\n return true;\n }).forEach(function (range) {\n var refCol = cols.find(function (col) { return col.min == range[0] && col.max == range[1]; });\n var currentOutlineLevel = outlineLevel.get(range[0]);\n cols.push({\n min: range[0],\n max: range[1],\n outlineLevel: currentOutlineLevel || 1,\n width: (refCol || { width: 100 }).width\n });\n outlineLevel.set(range[0], (currentOutlineLevel || 0) + 1);\n });\n return mergedCells;\n};\nvar getPageOrientation = function (orientation) {\n if (!orientation || (orientation !== 'Portrait' && orientation !== 'Landscape')) {\n return 'portrait';\n }\n return orientation.toLocaleLowerCase();\n};\nvar getPageSize = function (pageSize) {\n if (pageSize == null) {\n return 1;\n }\n var positions = ['Letter', 'Letter Small', 'Tabloid', 'Ledger', 'Legal', 'Statement', 'Executive', 'A3', 'A4', 'A4 Small', 'A5', 'A6', 'B4', 'B5', 'Folio', 'Envelope', 'Envelope DL', 'Envelope C5', 'Envelope B5', 'Envelope C3', 'Envelope C4', 'Envelope C6', 'Envelope Monarch', 'Japanese Postcard', 'Japanese Double Postcard'];\n var pos = positions.indexOf(pageSize);\n return pos === -1 ? 1 : (pos + 1);\n};\nvar addColumns = function (columns) {\n return function (children) {\n if (columns.length) {\n children.push({\n name: 'cols',\n children: columns.map(function (column) { return columnFactory.getTemplate(column); })\n });\n }\n return children;\n };\n};\nvar addSheetData = function (rows, sheetNumber) {\n return function (children) {\n if (rows.length) {\n children.push({\n name: 'sheetData',\n children: rows.map(function (row, idx) { return rowFactory.getTemplate(row, idx, sheetNumber); })\n });\n }\n return children;\n };\n};\nvar addMergeCells = function (mergeCells) {\n return function (children) {\n if (mergeCells.length) {\n children.push({\n name: 'mergeCells',\n properties: {\n rawMap: {\n count: mergeCells.length\n }\n },\n children: mergeCells.map(function (mergedCell) { return mergeCellFactory.getTemplate(mergedCell); })\n });\n }\n return children;\n };\n};\nvar addPageMargins = function (margins) {\n return function (children) {\n var _a = margins.top, top = _a === void 0 ? 0.75 : _a, _b = margins.right, right = _b === void 0 ? 0.7 : _b, _c = margins.bottom, bottom = _c === void 0 ? 0.75 : _c, _d = margins.left, left = _d === void 0 ? 0.7 : _d, _e = margins.header, header = _e === void 0 ? 0.3 : _e, _f = margins.footer, footer = _f === void 0 ? 0.3 : _f;\n children.push({\n name: 'pageMargins',\n properties: {\n rawMap: { bottom: bottom, footer: footer, header: header, left: left, right: right, top: top }\n }\n });\n return children;\n };\n};\nvar addPageSetup = function (pageSetup) {\n return function (children) {\n if (pageSetup) {\n children.push({\n name: 'pageSetup',\n properties: {\n rawMap: {\n horizontalDpi: 0,\n verticalDpi: 0,\n orientation: getPageOrientation(pageSetup.orientation),\n paperSize: getPageSize(pageSetup.pageSize)\n }\n }\n });\n }\n return children;\n };\n};\nvar replaceHeaderFooterTokens = function (value) {\n var map = {\n '&[Page]': '&P',\n '&[Pages]': '&N',\n '&[Date]': '&D',\n '&[Time]': '&T',\n '&[Tab]': '&A',\n '&[Path]': '&Z',\n '&[File]': '&F'\n };\n _.iterateObject(map, function (key, val) {\n value = value.replace(key, val);\n });\n return value;\n};\nvar getHeaderPosition = function (position) {\n if (position === 'Center') {\n return 'C';\n }\n if (position === 'Right') {\n return 'R';\n }\n return 'L';\n};\nvar applyHeaderFontStyle = function (headerString, font) {\n if (!font) {\n return headerString;\n }\n headerString += '&"';\n headerString += font.fontName || 'Calibri';\n if (font.bold !== font.italic) {\n headerString += font.bold ? ',Bold' : ',Italic';\n }\n else if (font.bold) {\n headerString += ',Bold Italic';\n }\n else {\n headerString += ',Regular';\n }\n headerString += '"';\n if (font.size) {\n headerString += \"&\" + font.size;\n }\n if (font.strikeThrough) {\n headerString += '&S';\n }\n if (font.underline) {\n headerString += \"&\" + (font.underline === 'Double' ? 'E' : 'U');\n }\n if (font.color) {\n headerString += \"&K\" + font.color.replace('#', '').toUpperCase();\n }\n return headerString;\n};\nvar processHeaderFooterContent = function (content) {\n return content.reduce(function (prev, curr) {\n var pos = getHeaderPosition(curr.position);\n var output = applyHeaderFontStyle(prev + \"&\" + pos, curr.font);\n return \"\" + output + _.escapeString(replaceHeaderFooterTokens(curr.value));\n }, '');\n};\nvar buildHeaderFooter = function (headerFooterConfig) {\n var rules = ['all', 'first', 'even'];\n var headersAndFooters = [];\n rules.forEach(function (rule) {\n var headerFooter = headerFooterConfig[rule];\n var namePrefix = rule === 'all' ? 'odd' : rule;\n if (!headerFooter || (!headerFooter.header && !headerFooter.footer)) {\n return;\n }\n _.iterateObject(headerFooter, function (key, value) {\n var nameSuffix = \"\" + key.charAt(0).toUpperCase() + key.slice(1);\n if (value) {\n headersAndFooters.push({\n name: \"\" + namePrefix + nameSuffix,\n properties: {\n rawMap: {\n 'xml:space': 'preserve'\n }\n },\n textNode: processHeaderFooterContent(value)\n });\n }\n });\n });\n return headersAndFooters;\n};\nvar addHeaderFooter = function (headerFooterConfig) {\n return function (children) {\n if (!headerFooterConfig) {\n return children;\n }\n var differentFirst = headerFooterConfig.first != null ? 1 : 0;\n var differentOddEven = headerFooterConfig.even != null ? 1 : 0;\n children.push({\n name: 'headerFooter',\n properties: {\n rawMap: {\n differentFirst: differentFirst,\n differentOddEven: differentOddEven\n }\n },\n children: buildHeaderFooter(headerFooterConfig)\n });\n return children;\n };\n};\nvar addDrawingRel = function (currentSheet) {\n return function (children) {\n if (ExcelXlsxFactory.worksheetImages.get(currentSheet)) {\n children.push({\n name: 'drawing',\n properties: {\n rawMap: {\n 'r:id': 'rId1'\n }\n }\n });\n }\n return children;\n };\n};\nvar worksheetFactory = {\n getTemplate: function (params) {\n var worksheet = params.worksheet, currentSheet = params.currentSheet, _a = params.margins, margins = _a === void 0 ? {} : _a, pageSetup = params.pageSetup, headerFooterConfig = params.headerFooterConfig;\n var table = worksheet.table;\n var rows = table.rows, columns = table.columns;\n var mergedCells = (columns && columns.length) ? getMergedCellsAndAddColumnGroups(rows, columns) : [];\n var createWorksheetChildren = _.compose(addColumns(columns), addSheetData(rows, currentSheet + 1), addMergeCells(mergedCells), addPageMargins(margins), addPageSetup(pageSetup), addHeaderFooter(headerFooterConfig), addDrawingRel(currentSheet));\n var children = createWorksheetChildren([]);\n return {\n name: \"worksheet\",\n properties: {\n prefixedAttributes: [{\n prefix: \"xmlns:\",\n map: {\n r: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships\"\n }\n }],\n rawMap: {\n xmlns: \"http://schemas.openxmlformats.org/spreadsheetml/2006/main\"\n }\n },\n children: children\n };\n }\n};\nexport default worksheetFactory;\n","var relationshipFactory = {\n getTemplate: function (config) {\n var Id = config.Id, Type = config.Type, Target = config.Target;\n return {\n name: \"Relationship\",\n properties: {\n rawMap: {\n Id: Id,\n Type: Type,\n Target: Target\n }\n }\n };\n }\n};\nexport default relationshipFactory;\n","import relationshipFactory from './relationship';\nvar relationshipsFactory = {\n getTemplate: function (c) {\n var children = c.map(function (relationship) { return relationshipFactory.getTemplate(relationship); });\n return {\n name: \"Relationships\",\n properties: {\n rawMap: {\n xmlns: \"http://schemas.openxmlformats.org/package/2006/relationships\"\n }\n },\n children: children\n };\n }\n};\nexport default relationshipsFactory;\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, Component, Events, PostConstruct, PreConstruct, RefSelector } from \"@ag-grid-community/core\";\nexport var EXPAND_STATE;\n(function (EXPAND_STATE) {\n EXPAND_STATE[EXPAND_STATE[\"EXPANDED\"] = 0] = \"EXPANDED\";\n EXPAND_STATE[EXPAND_STATE[\"COLLAPSED\"] = 1] = \"COLLAPSED\";\n EXPAND_STATE[EXPAND_STATE[\"INDETERMINATE\"] = 2] = \"INDETERMINATE\";\n})(EXPAND_STATE || (EXPAND_STATE = {}));\nvar FiltersToolPanelHeaderPanel = /** @class */ (function (_super) {\n __extends(FiltersToolPanelHeaderPanel, _super);\n function FiltersToolPanelHeaderPanel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n FiltersToolPanelHeaderPanel.prototype.preConstruct = function () {\n this.setTemplate(/* html */ \"
\\n
\\n \\n
\");\n };\n FiltersToolPanelHeaderPanel.prototype.postConstruct = function () {\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n this.eFilterTextField.onValueChange(this.onSearchTextChanged.bind(this));\n this.eFilterTextField.setInputAriaLabel(translate('ariaFilterColumnsInput', 'Filter Columns Input'));\n this.createExpandIcons();\n this.setExpandState(EXPAND_STATE.EXPANDED);\n this.addManagedListener(this.eExpand, 'click', this.onExpandClicked.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.showOrHideOptions.bind(this));\n };\n FiltersToolPanelHeaderPanel.prototype.init = function (params) {\n this.params = params;\n if (this.columnModel.isReady()) {\n this.showOrHideOptions();\n }\n };\n FiltersToolPanelHeaderPanel.prototype.createExpandIcons = function () {\n this.eExpand.appendChild(this.eExpandChecked = _.createIconNoSpan('columnSelectOpen', this.gridOptionsWrapper));\n this.eExpand.appendChild(this.eExpandUnchecked = _.createIconNoSpan('columnSelectClosed', this.gridOptionsWrapper));\n this.eExpand.appendChild(this.eExpandIndeterminate = _.createIconNoSpan('columnSelectIndeterminate', this.gridOptionsWrapper));\n };\n // we only show expand / collapse if we are showing filters\n FiltersToolPanelHeaderPanel.prototype.showOrHideOptions = function () {\n var showFilterSearch = !this.params.suppressFilterSearch;\n var showExpand = !this.params.suppressExpandAll;\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n this.eFilterTextField.setInputPlaceholder(translate('searchOoo', 'Search...'));\n var isFilterGroupPresent = function (col) { return col.getOriginalParent() && col.isFilterAllowed(); };\n var filterGroupsPresent = this.columnModel.getAllGridColumns().some(isFilterGroupPresent);\n _.setDisplayed(this.eFilterTextField.getGui(), showFilterSearch);\n _.setDisplayed(this.eExpand, showExpand && filterGroupsPresent);\n };\n FiltersToolPanelHeaderPanel.prototype.onSearchTextChanged = function () {\n var _this = this;\n if (!this.onSearchTextChangedDebounced) {\n this.onSearchTextChangedDebounced = _.debounce(function () {\n _this.dispatchEvent({ type: 'searchChanged', searchText: _this.eFilterTextField.getValue() });\n }, 300);\n }\n this.onSearchTextChangedDebounced();\n };\n FiltersToolPanelHeaderPanel.prototype.onExpandClicked = function () {\n var event = this.currentExpandState === EXPAND_STATE.EXPANDED ? { type: 'collapseAll' } : { type: 'expandAll' };\n this.dispatchEvent(event);\n };\n FiltersToolPanelHeaderPanel.prototype.setExpandState = function (state) {\n this.currentExpandState = state;\n _.setDisplayed(this.eExpandChecked, this.currentExpandState === EXPAND_STATE.EXPANDED);\n _.setDisplayed(this.eExpandUnchecked, this.currentExpandState === EXPAND_STATE.COLLAPSED);\n _.setDisplayed(this.eExpandIndeterminate, this.currentExpandState === EXPAND_STATE.INDETERMINATE);\n };\n __decorate([\n Autowired('columnModel')\n ], FiltersToolPanelHeaderPanel.prototype, \"columnModel\", void 0);\n __decorate([\n RefSelector('eExpand')\n ], FiltersToolPanelHeaderPanel.prototype, \"eExpand\", void 0);\n __decorate([\n RefSelector('eFilterTextField')\n ], FiltersToolPanelHeaderPanel.prototype, \"eFilterTextField\", void 0);\n __decorate([\n PreConstruct\n ], FiltersToolPanelHeaderPanel.prototype, \"preConstruct\", null);\n __decorate([\n PostConstruct\n ], FiltersToolPanelHeaderPanel.prototype, \"postConstruct\", null);\n return FiltersToolPanelHeaderPanel;\n}(Component));\nexport { FiltersToolPanelHeaderPanel };\n","var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n};\nimport { ExcelFactoryMode, _ } from '@ag-grid-community/core';\nimport coreFactory from './files/ooxml/core';\nimport contentTypesFactory from './files/ooxml/contentTypes';\nimport drawingFactory from './files/ooxml/drawing';\nimport officeThemeFactory from './files/ooxml/themes/office';\nimport sharedStringsFactory from './files/ooxml/sharedStrings';\nimport stylesheetFactory, { registerStyles } from './files/ooxml/styles/stylesheet';\nimport workbookFactory from './files/ooxml/workbook';\nimport worksheetFactory from './files/ooxml/worksheet';\nimport relationshipsFactory from './files/ooxml/relationships';\nimport { setExcelImageTotalHeight, setExcelImageTotalWidth, createXmlPart } from './assets/excelUtils';\n/**\n * See https://www.ecma-international.org/news/TC45_current_work/OpenXML%20White%20Paper.pdf\n */\nvar ExcelXlsxFactory = /** @class */ (function () {\n function ExcelXlsxFactory() {\n }\n ExcelXlsxFactory.createExcel = function (styles, worksheet, margins, pageSetup, headerFooterConfig) {\n this.addSheetName(worksheet);\n registerStyles(styles, this.sheetNames.length);\n return this.createWorksheet(worksheet, margins, pageSetup, headerFooterConfig);\n };\n ExcelXlsxFactory.buildImageMap = function (image, rowIndex, col, columnsToExport, rowHeight) {\n var currentSheetIndex = this.sheetNames.length;\n var registeredImage = this.images.get(image.id);\n if (!image.position || !image.position.row || !image.position.column) {\n if (!image.position) {\n image.position = {};\n }\n image.position = Object.assign({}, image.position, {\n row: rowIndex,\n column: columnsToExport.indexOf(col) + 1\n });\n }\n var calculatedImage = image;\n setExcelImageTotalWidth(calculatedImage, columnsToExport);\n setExcelImageTotalHeight(calculatedImage, rowHeight);\n if (registeredImage) {\n var currentSheetImages = registeredImage.find(function (currentImage) { return currentImage.sheetId === currentSheetIndex; });\n if (currentSheetImages) {\n currentSheetImages.image.push(calculatedImage);\n }\n else {\n registeredImage.push({\n sheetId: currentSheetIndex,\n image: [calculatedImage]\n });\n }\n }\n else {\n this.images.set(calculatedImage.id, [{ sheetId: currentSheetIndex, image: [calculatedImage] }]);\n this.workbookImageIds.set(calculatedImage.id, { type: calculatedImage.imageType, index: this.workbookImageIds.size });\n }\n this.buildSheetImageMap(currentSheetIndex, calculatedImage);\n };\n ExcelXlsxFactory.buildSheetImageMap = function (sheetIndex, image) {\n var worksheetImageIdMap = this.worksheetImageIds.get(sheetIndex);\n if (!worksheetImageIdMap) {\n worksheetImageIdMap = new Map();\n this.worksheetImageIds.set(sheetIndex, worksheetImageIdMap);\n }\n var sheetImages = this.worksheetImages.get(sheetIndex);\n if (!sheetImages) {\n this.worksheetImages.set(sheetIndex, [image]);\n worksheetImageIdMap.set(image.id, { index: 0, type: image.imageType });\n }\n else {\n sheetImages.push(image);\n if (!worksheetImageIdMap.get(image.id)) {\n worksheetImageIdMap.set(image.id, { index: worksheetImageIdMap.size, type: image.imageType });\n }\n }\n };\n ExcelXlsxFactory.addSheetName = function (worksheet) {\n var name = _.escapeString(worksheet.name) || '';\n var append = '';\n while (this.sheetNames.indexOf(\"\" + name + append) !== -1) {\n if (append === '') {\n append = '_1';\n }\n else {\n var curr = parseInt(append.slice(1), 10);\n append = \"_\" + (curr + 1);\n }\n }\n worksheet.name = \"\" + name + append;\n this.sheetNames.push(worksheet.name);\n };\n ExcelXlsxFactory.getStringPosition = function (str) {\n if (this.sharedStrings.has(str)) {\n return this.sharedStrings.get(str);\n }\n this.sharedStrings.set(str, this.sharedStrings.size);\n return this.sharedStrings.size - 1;\n };\n ExcelXlsxFactory.resetFactory = function () {\n this.sharedStrings = new Map();\n this.images = new Map();\n this.worksheetImages = new Map();\n this.workbookImageIds = new Map();\n this.worksheetImageIds = new Map();\n this.sheetNames = [];\n this.factoryMode = ExcelFactoryMode.SINGLE_SHEET;\n };\n ExcelXlsxFactory.createWorkbook = function () {\n return createXmlPart(workbookFactory.getTemplate(this.sheetNames));\n };\n ExcelXlsxFactory.createStylesheet = function (defaultFontSize) {\n return createXmlPart(stylesheetFactory.getTemplate(defaultFontSize));\n };\n ExcelXlsxFactory.createSharedStrings = function () {\n return createXmlPart(sharedStringsFactory.getTemplate(this.sharedStrings));\n };\n ExcelXlsxFactory.createCore = function (author) {\n return createXmlPart(coreFactory.getTemplate(author));\n };\n ExcelXlsxFactory.createContentTypes = function (sheetLen) {\n return createXmlPart(contentTypesFactory.getTemplate(sheetLen));\n };\n ExcelXlsxFactory.createRels = function () {\n var rs = relationshipsFactory.getTemplate([{\n Id: 'rId1',\n Type: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument',\n Target: 'xl/workbook.xml'\n }, {\n Id: 'rId2',\n Type: 'http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties',\n Target: 'docProps/core.xml'\n }]);\n return createXmlPart(rs);\n };\n ExcelXlsxFactory.createTheme = function () {\n return createXmlPart(officeThemeFactory.getTemplate());\n };\n ExcelXlsxFactory.createWorkbookRels = function (sheetLen) {\n var worksheets = new Array(sheetLen).fill(undefined).map(function (v, i) { return ({\n Id: \"rId\" + (i + 1),\n Type: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet',\n Target: \"worksheets/sheet\" + (i + 1) + \".xml\"\n }); });\n var rs = relationshipsFactory.getTemplate(__spread(worksheets, [\n {\n Id: \"rId\" + (sheetLen + 1),\n Type: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme',\n Target: 'theme/theme1.xml'\n }, {\n Id: \"rId\" + (sheetLen + 2),\n Type: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles',\n Target: 'styles.xml'\n }, {\n Id: \"rId\" + (sheetLen + 3),\n Type: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings',\n Target: 'sharedStrings.xml'\n }\n ]));\n return createXmlPart(rs);\n };\n ExcelXlsxFactory.createDrawing = function (sheetIndex) {\n return createXmlPart(drawingFactory.getTemplate({ sheetIndex: sheetIndex }));\n };\n ExcelXlsxFactory.createDrawingRel = function (sheetIndex) {\n var _this = this;\n var worksheetImageIds = this.worksheetImageIds.get(sheetIndex);\n var XMLArr = [];\n worksheetImageIds.forEach(function (value, key) {\n XMLArr.push({\n Id: \"rId\" + (value.index + 1),\n Type: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image',\n Target: \"../media/image\" + (_this.workbookImageIds.get(key).index + 1) + \".\" + value.type\n });\n });\n return createXmlPart(relationshipsFactory.getTemplate(XMLArr));\n };\n ExcelXlsxFactory.createWorksheetDrawingRel = function (currentRelationIndex) {\n var rs = relationshipsFactory.getTemplate([{\n Id: 'rId1',\n Type: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing',\n Target: \"../drawings/drawing\" + (currentRelationIndex + 1) + \".xml\"\n }]);\n return createXmlPart(rs);\n };\n ExcelXlsxFactory.createWorksheet = function (worksheet, margins, pageSetup, headerFooterConfig) {\n return createXmlPart(worksheetFactory.getTemplate({\n worksheet: worksheet,\n currentSheet: this.sheetNames.length - 1,\n margins: margins,\n pageSetup: pageSetup,\n headerFooterConfig: headerFooterConfig\n }));\n };\n ExcelXlsxFactory.sharedStrings = new Map();\n ExcelXlsxFactory.sheetNames = [];\n /** Maps images to sheet */\n ExcelXlsxFactory.images = new Map();\n /** Maps sheets to images */\n ExcelXlsxFactory.worksheetImages = new Map();\n /** Maps all workbook images to a global Id */\n ExcelXlsxFactory.workbookImageIds = new Map();\n /** Maps all sheet images to unique Ids */\n ExcelXlsxFactory.worksheetImageIds = new Map();\n ExcelXlsxFactory.factoryMode = ExcelFactoryMode.SINGLE_SHEET;\n return ExcelXlsxFactory;\n}());\nexport { ExcelXlsxFactory };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { _ } from '@ag-grid-community/core';\nimport { ExcelXlsxFactory } from './excelXlsxFactory';\nimport { BaseExcelSerializingSession } from './baseExcelSerializingSession';\nvar ExcelXlsxSerializingSession = /** @class */ (function (_super) {\n __extends(ExcelXlsxSerializingSession, _super);\n function ExcelXlsxSerializingSession() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ExcelXlsxSerializingSession.prototype.createExcel = function (data) {\n var _a = this, excelStyles = _a.excelStyles, config = _a.config;\n var margins = config.margins, pageSetup = config.pageSetup, headerFooterConfig = config.headerFooterConfig;\n return ExcelXlsxFactory.createExcel(excelStyles, data, margins, pageSetup, headerFooterConfig);\n };\n ExcelXlsxSerializingSession.prototype.getDataTypeForValue = function (valueForCell) {\n if (valueForCell === undefined) {\n return 'empty';\n }\n return _.isNumeric(valueForCell) ? 'n' : 's';\n };\n ExcelXlsxSerializingSession.prototype.getType = function (type, style, value) {\n if (this.isFormula(value)) {\n return 'f';\n }\n if (style && style.dataType) {\n switch (style.dataType.toLocaleLowerCase()) {\n case 'formula':\n return 'f';\n case 'string':\n return 's';\n case 'number':\n return 'n';\n case 'datetime':\n return 'd';\n case 'error':\n return 'e';\n case 'boolean':\n return 'b';\n default:\n console.warn(\"AG Grid: Unrecognized data type for excel export [\" + style.id + \".dataType=\" + style.dataType + \"]\");\n }\n }\n return type;\n };\n ExcelXlsxSerializingSession.prototype.addImage = function (rowIndex, column, value) {\n if (!this.config.addImageToCell) {\n return;\n }\n var addedImage = this.config.addImageToCell(rowIndex, column, value);\n if (!addedImage) {\n return;\n }\n ExcelXlsxFactory.buildImageMap(addedImage.image, rowIndex, column, this.columnsToExport, this.config.rowHeight);\n return addedImage;\n };\n ExcelXlsxSerializingSession.prototype.createCell = function (styleId, type, value) {\n var actualStyle = this.getStyleById(styleId);\n var typeTransformed = this.getType(type, actualStyle, value) || type;\n return {\n styleId: actualStyle ? styleId : undefined,\n data: {\n type: typeTransformed,\n value: this.getCellValue(typeTransformed, value)\n }\n };\n };\n ExcelXlsxSerializingSession.prototype.createMergedCell = function (styleId, type, value, numOfCells) {\n var valueToUse = value == null ? '' : value;\n return {\n styleId: !!this.getStyleById(styleId) ? styleId : undefined,\n data: {\n type: type,\n value: type === 's' ? ExcelXlsxFactory.getStringPosition(valueToUse).toString() : value\n },\n mergeAcross: numOfCells\n };\n };\n ExcelXlsxSerializingSession.prototype.getCellValue = function (type, value) {\n if (value == null) {\n return ExcelXlsxFactory.getStringPosition('').toString();\n }\n switch (type) {\n case 's':\n return value === '' ? '' : ExcelXlsxFactory.getStringPosition(value).toString();\n case 'f':\n return value.slice(1);\n case 'n':\n return Number(value).toString();\n default:\n return value;\n }\n };\n return ExcelXlsxSerializingSession;\n}(BaseExcelSerializingSession));\nexport { ExcelXlsxSerializingSession };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, Bean, PostConstruct, } from '@ag-grid-community/core';\nimport { ExcelXmlSerializingSession } from './excelXmlSerializingSession';\nimport { ExcelXlsxSerializingSession } from './excelXlsxSerializingSession';\nimport { ExcelXlsxFactory } from './excelXlsxFactory';\nimport { BaseCreator, Downloader, RowType, ZipContainer } from \"@ag-grid-community/csv-export\";\nimport { ExcelXmlFactory } from './excelXmlFactory';\nexport var getMultipleSheetsAsExcel = function (params) {\n var data = params.data, _a = params.fontSize, fontSize = _a === void 0 ? 11 : _a, _b = params.author, author = _b === void 0 ? 'AG Grid' : _b;\n var hasImages = ExcelXlsxFactory.images.size > 0;\n ZipContainer.addFolders([\n '_rels/',\n 'docProps/',\n 'xl/',\n 'xl/theme/',\n 'xl/_rels/',\n 'xl/worksheets/'\n ]);\n if (hasImages) {\n ZipContainer.addFolders([\n 'xl/worksheets/_rels',\n 'xl/drawings/',\n 'xl/drawings/_rels',\n 'xl/media/',\n ]);\n var imgCounter_1 = 0;\n ExcelXlsxFactory.images.forEach(function (value) {\n var firstImage = value[0].image[0];\n var ext = firstImage.imageType;\n ZipContainer.addFile(\"xl/media/image\" + ++imgCounter_1 + \".\" + ext, firstImage.base64, true);\n });\n }\n if (!data || data.length === 0) {\n console.warn(\"AG Grid: Invalid params supplied to getMultipleSheetsAsExcel() - `ExcelExportParams.data` is empty.\");\n ExcelXlsxFactory.resetFactory();\n return;\n }\n var sheetLen = data.length;\n var imageRelationCounter = 0;\n data.forEach(function (value, idx) {\n ZipContainer.addFile(\"xl/worksheets/sheet\" + (idx + 1) + \".xml\", value);\n if (hasImages && ExcelXlsxFactory.worksheetImages.get(idx)) {\n createImageRelationsForSheet(idx, imageRelationCounter++);\n }\n });\n ZipContainer.addFile('xl/workbook.xml', ExcelXlsxFactory.createWorkbook());\n ZipContainer.addFile('xl/styles.xml', ExcelXlsxFactory.createStylesheet(fontSize));\n ZipContainer.addFile('xl/sharedStrings.xml', ExcelXlsxFactory.createSharedStrings());\n ZipContainer.addFile('xl/theme/theme1.xml', ExcelXlsxFactory.createTheme());\n ZipContainer.addFile('xl/_rels/workbook.xml.rels', ExcelXlsxFactory.createWorkbookRels(sheetLen));\n ZipContainer.addFile('docProps/core.xml', ExcelXlsxFactory.createCore(author));\n ZipContainer.addFile('[Content_Types].xml', ExcelXlsxFactory.createContentTypes(sheetLen));\n ZipContainer.addFile('_rels/.rels', ExcelXlsxFactory.createRels());\n ExcelXlsxFactory.resetFactory();\n var mimeType = params.mimeType || 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';\n return ZipContainer.getContent(mimeType);\n};\nexport var exportMultipleSheetsAsExcel = function (params) {\n var _a = params.fileName, fileName = _a === void 0 ? 'export.xlsx' : _a;\n var contents = getMultipleSheetsAsExcel(params);\n if (contents) {\n Downloader.download(fileName, contents);\n }\n};\nvar createImageRelationsForSheet = function (sheetIndex, currentRelationIndex) {\n var drawingFolder = 'xl/drawings';\n var drawingFileName = drawingFolder + \"/drawing\" + (currentRelationIndex + 1) + \".xml\";\n var relFileName = drawingFolder + \"/_rels/drawing\" + (currentRelationIndex + 1) + \".xml.rels\";\n var worksheetRelFile = \"xl/worksheets/_rels/sheet\" + (sheetIndex + 1) + \".xml.rels\";\n ZipContainer.addFile(relFileName, ExcelXlsxFactory.createDrawingRel(sheetIndex));\n ZipContainer.addFile(drawingFileName, ExcelXlsxFactory.createDrawing(sheetIndex));\n ZipContainer.addFile(worksheetRelFile, ExcelXlsxFactory.createWorksheetDrawingRel(currentRelationIndex));\n};\nvar ExcelCreator = /** @class */ (function (_super) {\n __extends(ExcelCreator, _super);\n function ExcelCreator() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.exportMode = 'xlsx';\n return _this;\n }\n ExcelCreator.prototype.postConstruct = function () {\n this.setBeans({\n gridSerializer: this.gridSerializer,\n gridOptionsWrapper: this.gridOptionsWrapper\n });\n };\n ExcelCreator.prototype.getMergedParams = function (params) {\n var baseParams = this.gridOptionsWrapper.getDefaultExportParams('excel');\n return Object.assign({}, baseParams, params);\n };\n ExcelCreator.prototype.getData = function (params) {\n this.setExportMode(params.exportMode || 'xlsx');\n return _super.prototype.getData.call(this, params);\n };\n ExcelCreator.prototype.export = function (userParams) {\n if (this.isExportSuppressed()) {\n console.warn(\"AG Grid: Export cancelled. Export is not allowed as per your configuration.\");\n return '';\n }\n var mergedParams = this.getMergedParams(userParams);\n var data = this.getData(mergedParams);\n var exportParams = {\n data: [data],\n fontSize: mergedParams.fontSize,\n author: mergedParams.author,\n mimeType: mergedParams.mimeType\n };\n var packageFile = this.packageFile(exportParams);\n if (packageFile) {\n Downloader.download(this.getFileName(mergedParams.fileName), packageFile);\n }\n return data;\n };\n ExcelCreator.prototype.exportDataAsExcel = function (params) {\n return this.export(params);\n };\n ExcelCreator.prototype.getDataAsExcel = function (params) {\n var mergedParams = this.getMergedParams(params);\n var data = this.getData(mergedParams);\n if (params && params.exportMode === 'xml') {\n return data;\n }\n var exportParams = {\n data: [data],\n fontSize: mergedParams.fontSize,\n author: mergedParams.author,\n mimeType: mergedParams.mimeType\n };\n return this.packageFile(exportParams);\n };\n ExcelCreator.prototype.setFactoryMode = function (factoryMode, exportMode) {\n if (exportMode === void 0) { exportMode = 'xlsx'; }\n var factory = exportMode === 'xlsx' ? ExcelXlsxFactory : ExcelXmlFactory;\n factory.factoryMode = factoryMode;\n };\n ExcelCreator.prototype.getFactoryMode = function (exportMode) {\n var factory = exportMode === 'xlsx' ? ExcelXlsxFactory : ExcelXmlFactory;\n return factory.factoryMode;\n };\n ExcelCreator.prototype.getSheetDataForExcel = function (params) {\n var mergedParams = this.getMergedParams(params);\n var data = this.getData(mergedParams);\n return data;\n };\n ExcelCreator.prototype.getMultipleSheetsAsExcel = function (params) {\n return getMultipleSheetsAsExcel(params);\n };\n ExcelCreator.prototype.exportMultipleSheetsAsExcel = function (params) {\n return exportMultipleSheetsAsExcel(params);\n };\n ExcelCreator.prototype.getDefaultFileName = function () {\n return \"export.\" + this.getExportMode();\n };\n ExcelCreator.prototype.getDefaultFileExtension = function () {\n return this.getExportMode();\n };\n ExcelCreator.prototype.createSerializingSession = function (params) {\n var _a = this, columnModel = _a.columnModel, valueService = _a.valueService, gridOptionsWrapper = _a.gridOptionsWrapper;\n var isXlsx = this.getExportMode() === 'xlsx';\n var sheetName = 'ag-grid';\n if (params.sheetName != null) {\n sheetName = _.utf8_encode(params.sheetName.toString().substr(0, 31));\n }\n var config = __assign(__assign({}, params), { sheetName: sheetName,\n columnModel: columnModel,\n valueService: valueService,\n gridOptionsWrapper: gridOptionsWrapper, headerRowHeight: params.headerRowHeight || params.rowHeight, baseExcelStyles: this.gridOptions.excelStyles || [], styleLinker: this.styleLinker.bind(this) });\n return new (isXlsx ? ExcelXlsxSerializingSession : ExcelXmlSerializingSession)(config);\n };\n ExcelCreator.prototype.styleLinker = function (rowType, rowIndex, value, column, node) {\n if (rowType === RowType.HEADER) {\n return [\"header\"];\n }\n if (rowType === RowType.HEADER_GROUPING) {\n return [\"header\", \"headerGroup\"];\n }\n var styles = this.gridOptions.excelStyles;\n var applicableStyles = [\"cell\"];\n if (!styles || !styles.length) {\n return applicableStyles;\n }\n var styleIds = styles.map(function (it) {\n return it.id;\n });\n this.stylingService.processAllCellClasses(column.getColDef(), {\n value: value,\n data: node.data,\n node: node,\n colDef: column.getColDef(),\n rowIndex: rowIndex,\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi(),\n context: this.gridOptionsWrapper.getContext()\n }, function (className) {\n if (styleIds.indexOf(className) > -1) {\n applicableStyles.push(className);\n }\n });\n return applicableStyles.sort(function (left, right) {\n return (styleIds.indexOf(left) < styleIds.indexOf(right)) ? -1 : 1;\n });\n };\n ExcelCreator.prototype.isExportSuppressed = function () {\n return this.gridOptionsWrapper.isSuppressExcelExport();\n };\n ExcelCreator.prototype.setExportMode = function (exportMode) {\n this.exportMode = exportMode;\n };\n ExcelCreator.prototype.getExportMode = function () {\n return this.exportMode;\n };\n ExcelCreator.prototype.packageFile = function (params) {\n if (this.getExportMode() === 'xml') {\n var mimeType = params.mimeType || 'application/vnd.ms-excel';\n return new Blob([\"\\ufeff\", params.data[0]], { type: mimeType });\n }\n return getMultipleSheetsAsExcel(params);\n };\n __decorate([\n Autowired('columnModel')\n ], ExcelCreator.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired('valueService')\n ], ExcelCreator.prototype, \"valueService\", void 0);\n __decorate([\n Autowired('gridOptions')\n ], ExcelCreator.prototype, \"gridOptions\", void 0);\n __decorate([\n Autowired('stylingService')\n ], ExcelCreator.prototype, \"stylingService\", void 0);\n __decorate([\n Autowired('gridSerializer')\n ], ExcelCreator.prototype, \"gridSerializer\", void 0);\n __decorate([\n Autowired('gridOptionsWrapper')\n ], ExcelCreator.prototype, \"gridOptionsWrapper\", void 0);\n __decorate([\n PostConstruct\n ], ExcelCreator.prototype, \"postConstruct\", null);\n ExcelCreator = __decorate([\n Bean('excelCreator')\n ], ExcelCreator);\n return ExcelCreator;\n}(BaseCreator));\nexport { ExcelCreator };\n","import { ModuleNames } from \"@ag-grid-community/core\";\nimport { EnterpriseCoreModule } from \"@ag-grid-enterprise/core\";\nimport { ExcelCreator } from \"./excelExport/excelCreator\";\nimport { CsvCreator, GridSerializer } from \"@ag-grid-community/csv-export\";\nimport { CsvExportModule } from \"@ag-grid-community/csv-export\";\nexport var ExcelExportModule = {\n moduleName: ModuleNames.ExcelExportModule,\n beans: [\n // beans in this module\n ExcelCreator,\n // these beans are part of CSV Export module\n GridSerializer, CsvCreator\n ],\n dependantModules: [\n CsvExportModule,\n EnterpriseCoreModule\n ]\n};\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, Column, Component, Events, KeyCode, PostConstruct, RefSelector } from \"@ag-grid-community/core\";\nvar ToolPanelFilterComp = /** @class */ (function (_super) {\n __extends(ToolPanelFilterComp, _super);\n function ToolPanelFilterComp(hideHeader) {\n if (hideHeader === void 0) { hideHeader = false; }\n var _this = _super.call(this, ToolPanelFilterComp.TEMPLATE) || this;\n _this.expanded = false;\n _this.hideHeader = hideHeader;\n return _this;\n }\n ToolPanelFilterComp.prototype.postConstruct = function () {\n this.eExpandChecked = _.createIconNoSpan('columnSelectOpen', this.gridOptionsWrapper);\n this.eExpandUnchecked = _.createIconNoSpan('columnSelectClosed', this.gridOptionsWrapper);\n this.eExpand.appendChild(this.eExpandChecked);\n this.eExpand.appendChild(this.eExpandUnchecked);\n };\n ToolPanelFilterComp.prototype.setColumn = function (column) {\n var _this = this;\n this.column = column;\n this.eFilterName.innerText = this.columnModel.getDisplayNameForColumn(this.column, 'filterToolPanel', false) || '';\n this.addManagedListener(this.eFilterToolPanelHeader, 'click', this.toggleExpanded.bind(this));\n this.addManagedListener(this.eFilterToolPanelHeader, 'keydown', function (e) {\n if (e.key === KeyCode.ENTER) {\n _this.toggleExpanded();\n }\n });\n this.addManagedListener(this.eventService, Events.EVENT_FILTER_OPENED, this.onFilterOpened.bind(this));\n this.addInIcon('filter', this.eFilterIcon, this.column);\n this.eFilterIcon.classList.toggle('ag-hidden', !this.isFilterActive());\n this.eExpandChecked.classList.add('ag-hidden');\n if (this.hideHeader) {\n this.eFilterToolPanelHeader.classList.toggle('ag-hidden', true);\n this.eFilterToolPanelHeader.removeAttribute('tabindex');\n }\n else {\n this.eFilterToolPanelHeader.setAttribute('tabindex', '0');\n }\n this.addManagedListener(this.column, Column.EVENT_FILTER_CHANGED, this.onFilterChanged.bind(this));\n };\n ToolPanelFilterComp.prototype.getColumn = function () {\n return this.column;\n };\n ToolPanelFilterComp.prototype.getColumnFilterName = function () {\n return this.columnModel.getDisplayNameForColumn(this.column, 'filterToolPanel', false);\n };\n ToolPanelFilterComp.prototype.addCssClassToTitleBar = function (cssClass) {\n this.eFilterToolPanelHeader.classList.add(cssClass);\n };\n ToolPanelFilterComp.prototype.addInIcon = function (iconName, eParent, column) {\n if (eParent == null) {\n return;\n }\n var eIcon = _.createIconNoSpan(iconName, this.gridOptionsWrapper, column);\n eParent.appendChild(eIcon);\n };\n ToolPanelFilterComp.prototype.isFilterActive = function () {\n return this.filterManager.isFilterActive(this.column);\n };\n ToolPanelFilterComp.prototype.onFilterChanged = function () {\n this.eFilterIcon.classList.toggle('ag-hidden', !this.isFilterActive());\n this.dispatchEvent({ type: Column.EVENT_FILTER_CHANGED });\n };\n ToolPanelFilterComp.prototype.toggleExpanded = function () {\n this.expanded ? this.collapse() : this.expand();\n };\n ToolPanelFilterComp.prototype.expand = function () {\n var _this = this;\n var _a;\n if (this.expanded) {\n return;\n }\n this.expanded = true;\n _.setAriaExpanded(this.eFilterToolPanelHeader, true);\n var container = _.loadTemplate(/* html */ \"
\");\n var filterPromise = (_a = this.filterManager.getOrCreateFilterWrapper(this.column, 'TOOLBAR')) === null || _a === void 0 ? void 0 : _a.filterPromise;\n if (filterPromise) {\n filterPromise.then(function (filter) {\n _this.underlyingFilter = filter;\n if (!filter) {\n return;\n }\n container.appendChild(filter.getGui());\n _this.agFilterToolPanelBody.appendChild(container);\n if (filter.afterGuiAttached) {\n filter.afterGuiAttached({ container: 'toolPanel' });\n }\n });\n }\n _.setDisplayed(this.eExpandChecked, true);\n _.setDisplayed(this.eExpandUnchecked, false);\n };\n ToolPanelFilterComp.prototype.collapse = function () {\n if (!this.expanded) {\n return;\n }\n this.expanded = false;\n _.setAriaExpanded(this.eFilterToolPanelHeader, false);\n this.agFilterToolPanelBody.removeChild(this.agFilterToolPanelBody.children[0]);\n _.setDisplayed(this.eExpandChecked, false);\n _.setDisplayed(this.eExpandUnchecked, true);\n };\n ToolPanelFilterComp.prototype.refreshFilter = function () {\n if (!this.expanded) {\n return;\n }\n var filter = this.underlyingFilter;\n if (!filter) {\n return;\n }\n // set filters should be updated when the filter has been changed elsewhere, i.e. via api. Note that we can't\n // use 'afterGuiAttached' to refresh the virtual list as it also focuses on the mini filter which changes the\n // scroll position in the filter list panel\n if (typeof filter.refreshVirtualList === 'function') {\n filter.refreshVirtualList();\n }\n };\n ToolPanelFilterComp.prototype.onFilterOpened = function (event) {\n if (event.source !== 'COLUMN_MENU') {\n return;\n }\n if (event.column !== this.column) {\n return;\n }\n if (!this.expanded) {\n return;\n }\n this.collapse();\n };\n ToolPanelFilterComp.TEMPLATE = \"\\n
\\n
\\n
\\n \\n \\n
\\n
\\n
\";\n __decorate([\n RefSelector('eFilterToolPanelHeader')\n ], ToolPanelFilterComp.prototype, \"eFilterToolPanelHeader\", void 0);\n __decorate([\n RefSelector('eFilterName')\n ], ToolPanelFilterComp.prototype, \"eFilterName\", void 0);\n __decorate([\n RefSelector('agFilterToolPanelBody')\n ], ToolPanelFilterComp.prototype, \"agFilterToolPanelBody\", void 0);\n __decorate([\n RefSelector('eFilterIcon')\n ], ToolPanelFilterComp.prototype, \"eFilterIcon\", void 0);\n __decorate([\n RefSelector('eExpand')\n ], ToolPanelFilterComp.prototype, \"eExpand\", void 0);\n __decorate([\n Autowired('filterManager')\n ], ToolPanelFilterComp.prototype, \"filterManager\", void 0);\n __decorate([\n Autowired('columnModel')\n ], ToolPanelFilterComp.prototype, \"columnModel\", void 0);\n __decorate([\n PostConstruct\n ], ToolPanelFilterComp.prototype, \"postConstruct\", null);\n return ToolPanelFilterComp;\n}(Component));\nexport { ToolPanelFilterComp };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, AgGroupComponent, Autowired, Column, Component, Events, ProvidedColumnGroup, PostConstruct, PreConstruct, RefSelector } from \"@ag-grid-community/core\";\nimport { ToolPanelFilterComp } from \"./toolPanelFilterComp\";\nvar ToolPanelFilterGroupComp = /** @class */ (function (_super) {\n __extends(ToolPanelFilterGroupComp, _super);\n function ToolPanelFilterGroupComp(columnGroup, childFilterComps, expandedCallback, depth, showingColumn) {\n var _this = _super.call(this) || this;\n _this.columnGroup = columnGroup;\n _this.childFilterComps = childFilterComps;\n _this.depth = depth;\n _this.expandedCallback = expandedCallback;\n _this.showingColumn = showingColumn;\n return _this;\n }\n ToolPanelFilterGroupComp.prototype.preConstruct = function () {\n var groupParams = {\n cssIdentifier: 'filter-toolpanel',\n direction: 'vertical'\n };\n this.setTemplate(ToolPanelFilterGroupComp.TEMPLATE, { filterGroupComp: groupParams });\n };\n ToolPanelFilterGroupComp.prototype.init = function () {\n var _this = this;\n this.setGroupTitle();\n this.filterGroupComp.setAlignItems('stretch');\n this.filterGroupComp.addCssClass(\"ag-filter-toolpanel-group-level-\" + this.depth);\n this.filterGroupComp.addCssClassToTitleBar(\"ag-filter-toolpanel-group-level-\" + this.depth + \"-header\");\n this.childFilterComps.forEach(function (filterComp) {\n _this.filterGroupComp.addItem(filterComp);\n filterComp.addCssClassToTitleBar(\"ag-filter-toolpanel-group-level-\" + (_this.depth + 1) + \"-header\");\n });\n this.refreshFilterClass();\n this.addExpandCollapseListeners();\n this.addFilterChangedListeners();\n this.setupTooltip();\n };\n ToolPanelFilterGroupComp.prototype.setupTooltip = function () {\n var _this = this;\n // we don't show tooltips for groups, as when the group expands, it's div contains the columns which also\n // have tooltips, so the tooltips would clash. Eg mouse over group, tooltip shows, mouse over column, another\n // tooltip shows but cos we didn't leave the group the group tooltip remains. this should be fixed in the future,\n // maybe the group shouldn't contain the children form a DOM perspective.\n if (!this.showingColumn) {\n return;\n }\n var refresh = function () {\n var newTooltipText = _this.columnGroup.getColDef().headerTooltip;\n _this.setTooltip(newTooltipText);\n };\n refresh();\n this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, refresh);\n };\n ToolPanelFilterGroupComp.prototype.getTooltipParams = function () {\n var res = _super.prototype.getTooltipParams.call(this);\n res.location = 'filterToolPanelColumnGroup';\n return res;\n };\n ToolPanelFilterGroupComp.prototype.addCssClassToTitleBar = function (cssClass) {\n this.filterGroupComp.addCssClassToTitleBar(cssClass);\n };\n ToolPanelFilterGroupComp.prototype.refreshFilters = function () {\n this.childFilterComps.forEach(function (filterComp) {\n if (filterComp instanceof ToolPanelFilterGroupComp) {\n filterComp.refreshFilters();\n }\n else {\n filterComp.refreshFilter();\n }\n });\n };\n ToolPanelFilterGroupComp.prototype.isColumnGroup = function () {\n return this.columnGroup instanceof ProvidedColumnGroup;\n };\n ToolPanelFilterGroupComp.prototype.isExpanded = function () {\n return this.filterGroupComp.isExpanded();\n };\n ToolPanelFilterGroupComp.prototype.getChildren = function () {\n return this.childFilterComps;\n };\n ToolPanelFilterGroupComp.prototype.getFilterGroupName = function () {\n return this.filterGroupName ? this.filterGroupName : '';\n };\n ToolPanelFilterGroupComp.prototype.getFilterGroupId = function () {\n return this.columnGroup.getId();\n };\n ToolPanelFilterGroupComp.prototype.hideGroupItem = function (hide, index) {\n this.filterGroupComp.hideItem(hide, index);\n };\n ToolPanelFilterGroupComp.prototype.hideGroup = function (hide) {\n this.addOrRemoveCssClass('ag-hidden', hide);\n };\n ToolPanelFilterGroupComp.prototype.forEachToolPanelFilterChild = function (action) {\n this.childFilterComps.forEach(function (filterComp) {\n if (filterComp instanceof ToolPanelFilterComp) {\n action(filterComp);\n }\n });\n };\n ToolPanelFilterGroupComp.prototype.addExpandCollapseListeners = function () {\n var _this = this;\n var expandListener = this.isColumnGroup() ?\n function () { return _this.expandedCallback(); } :\n function () { return _this.forEachToolPanelFilterChild(function (filterComp) { return filterComp.expand(); }); };\n var collapseListener = this.isColumnGroup() ?\n function () { return _this.expandedCallback(); } :\n function () { return _this.forEachToolPanelFilterChild(function (filterComp) { return filterComp.collapse(); }); };\n this.addManagedListener(this.filterGroupComp, AgGroupComponent.EVENT_EXPANDED, expandListener);\n this.addManagedListener(this.filterGroupComp, AgGroupComponent.EVENT_COLLAPSED, collapseListener);\n };\n ToolPanelFilterGroupComp.prototype.getColumns = function () {\n if (this.columnGroup instanceof ProvidedColumnGroup) {\n return this.columnGroup.getLeafColumns();\n }\n return [this.columnGroup];\n };\n ToolPanelFilterGroupComp.prototype.addFilterChangedListeners = function () {\n var _this = this;\n this.getColumns().forEach(function (column) {\n _this.addManagedListener(column, Column.EVENT_FILTER_CHANGED, function () { return _this.refreshFilterClass(); });\n });\n if (!(this.columnGroup instanceof ProvidedColumnGroup)) {\n this.addManagedListener(this.eventService, Events.EVENT_FILTER_OPENED, this.onFilterOpened.bind(this));\n }\n };\n ToolPanelFilterGroupComp.prototype.refreshFilterClass = function () {\n var columns = this.getColumns();\n var anyChildFiltersActive = function () { return columns.some(function (col) { return col.isFilterActive(); }); };\n this.filterGroupComp.addOrRemoveCssClass('ag-has-filter', anyChildFiltersActive());\n };\n ToolPanelFilterGroupComp.prototype.onFilterOpened = function (event) {\n // when a filter is opened elsewhere, i.e. column menu we close the filter comp so we also need to collapse\n // the column group. This approach means we don't need to try and sync filter models on the same column.\n if (event.source !== 'COLUMN_MENU') {\n return;\n }\n if (event.column !== this.columnGroup) {\n return;\n }\n if (!this.isExpanded()) {\n return;\n }\n this.collapse();\n };\n ToolPanelFilterGroupComp.prototype.expand = function () {\n this.filterGroupComp.toggleGroupExpand(true);\n };\n ToolPanelFilterGroupComp.prototype.collapse = function () {\n this.filterGroupComp.toggleGroupExpand(false);\n };\n ToolPanelFilterGroupComp.prototype.setGroupTitle = function () {\n this.filterGroupName = (this.columnGroup instanceof ProvidedColumnGroup) ?\n this.getColumnGroupName(this.columnGroup) : this.getColumnName(this.columnGroup);\n this.filterGroupComp.setTitle(this.filterGroupName || '');\n };\n ToolPanelFilterGroupComp.prototype.getColumnGroupName = function (columnGroup) {\n return this.columnModel.getDisplayNameForProvidedColumnGroup(null, columnGroup, 'filterToolPanel');\n };\n ToolPanelFilterGroupComp.prototype.getColumnName = function (column) {\n return this.columnModel.getDisplayNameForColumn(column, 'filterToolPanel', false);\n };\n ToolPanelFilterGroupComp.prototype.destroyFilters = function () {\n this.childFilterComps = this.destroyBeans(this.childFilterComps);\n _.clearElement(this.getGui());\n };\n ToolPanelFilterGroupComp.prototype.destroy = function () {\n this.destroyFilters();\n _super.prototype.destroy.call(this);\n };\n ToolPanelFilterGroupComp.TEMPLATE = \"
\\n \\n
\";\n __decorate([\n RefSelector('filterGroupComp')\n ], ToolPanelFilterGroupComp.prototype, \"filterGroupComp\", void 0);\n __decorate([\n Autowired('columnModel')\n ], ToolPanelFilterGroupComp.prototype, \"columnModel\", void 0);\n __decorate([\n PreConstruct\n ], ToolPanelFilterGroupComp.prototype, \"preConstruct\", null);\n __decorate([\n PostConstruct\n ], ToolPanelFilterGroupComp.prototype, \"init\", null);\n return ToolPanelFilterGroupComp;\n}(Component));\nexport { ToolPanelFilterGroupComp };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, Component, Events, ProvidedColumnGroup } from \"@ag-grid-community/core\";\nimport { ToolPanelFilterComp } from \"./toolPanelFilterComp\";\nimport { ToolPanelFilterGroupComp } from \"./toolPanelFilterGroupComp\";\nimport { EXPAND_STATE } from \"./filtersToolPanelHeaderPanel\";\nvar FiltersToolPanelListPanel = /** @class */ (function (_super) {\n __extends(FiltersToolPanelListPanel, _super);\n function FiltersToolPanelListPanel() {\n var _this = _super.call(this, FiltersToolPanelListPanel.TEMPLATE) || this;\n _this.initialised = false;\n _this.filterGroupComps = [];\n return _this;\n }\n FiltersToolPanelListPanel.prototype.init = function (params) {\n var _this = this;\n this.initialised = true;\n var defaultParams = {\n suppressExpandAll: false,\n suppressFilterSearch: false,\n suppressSyncLayoutWithGrid: false,\n api: this.gridApi,\n columnApi: this.columnApi,\n context: this.gridOptionsWrapper.getContext()\n };\n _.mergeDeep(defaultParams, params);\n this.params = defaultParams;\n if (!this.params.suppressSyncLayoutWithGrid) {\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_MOVED, function () { return _this.onColumnsChanged(); });\n }\n this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, function () { return _this.onColumnsChanged(); });\n this.addManagedListener(this.eventService, Events.EVENT_TOOL_PANEL_VISIBLE_CHANGED, function (event) {\n // when re-entering the filters tool panel we need to refresh the virtual lists in the set filters in case\n // filters have been changed elsewhere, i.e. via an api call.\n if (event.source === 'filters') {\n _this.refreshFilters();\n }\n });\n if (this.columnModel.isReady()) {\n this.onColumnsChanged();\n }\n };\n FiltersToolPanelListPanel.prototype.onColumnsChanged = function () {\n var pivotModeActive = this.columnModel.isPivotMode();\n var shouldSyncColumnLayoutWithGrid = !this.params.suppressSyncLayoutWithGrid && !pivotModeActive;\n shouldSyncColumnLayoutWithGrid ? this.syncFilterLayout() : this.buildTreeFromProvidedColumnDefs();\n };\n FiltersToolPanelListPanel.prototype.syncFilterLayout = function () {\n this.toolPanelColDefService.syncLayoutWithGrid(this.setFiltersLayout.bind(this));\n };\n FiltersToolPanelListPanel.prototype.buildTreeFromProvidedColumnDefs = function () {\n var _this = this;\n this.destroyFilters();\n var columnTree = this.columnModel.getPrimaryColumnTree();\n this.filterGroupComps = this.recursivelyAddComps(columnTree, 0);\n var len = this.filterGroupComps.length;\n if (len) {\n this.filterGroupComps.forEach(function (comp) { return _this.appendChild(comp); });\n this.setFirstAndLastVisible(0, len - 1);\n }\n // perform search if searchFilterText exists\n if (_.exists(this.searchFilterText)) {\n this.searchFilters(this.searchFilterText);\n }\n // notify header of expand\n this.fireExpandedEvent();\n };\n FiltersToolPanelListPanel.prototype.setFiltersLayout = function (colDefs) {\n var _this = this;\n this.destroyFilters();\n var columnTree = this.toolPanelColDefService.createColumnTree(colDefs);\n this.filterGroupComps = this.recursivelyAddComps(columnTree, 0);\n var len = this.filterGroupComps.length;\n if (len) {\n this.filterGroupComps.forEach(function (comp) { return _this.appendChild(comp); });\n this.setFirstAndLastVisible(0, len - 1);\n }\n // perform search if searchFilterText exists\n if (_.exists(this.searchFilterText)) {\n this.searchFilters(this.searchFilterText);\n }\n // notify header of expand\n this.fireExpandedEvent();\n };\n FiltersToolPanelListPanel.prototype.recursivelyAddComps = function (tree, depth) {\n var _this = this;\n return _.flatten(tree.map(function (child) {\n if (child instanceof ProvidedColumnGroup) {\n return _.flatten(_this.recursivelyAddFilterGroupComps(child, depth));\n }\n var column = child;\n if (!_this.shouldDisplayFilter(column)) {\n return [];\n }\n var hideFilterCompHeader = depth === 0;\n var filterComp = new ToolPanelFilterComp(hideFilterCompHeader);\n _this.getContext().createBean(filterComp);\n filterComp.setColumn(column);\n if (depth > 0) {\n return filterComp;\n }\n var filterGroupComp = _this.createBean(new ToolPanelFilterGroupComp(column, [filterComp], _this.onGroupExpanded.bind(_this), depth, true));\n filterGroupComp.addCssClassToTitleBar('ag-filter-toolpanel-header');\n filterGroupComp.collapse();\n return filterGroupComp;\n }));\n };\n FiltersToolPanelListPanel.prototype.recursivelyAddFilterGroupComps = function (columnGroup, depth) {\n if (!this.filtersExistInChildren(columnGroup.getChildren())) {\n return;\n }\n var colGroupDef = columnGroup.getColGroupDef();\n if (colGroupDef && colGroupDef.suppressFiltersToolPanel) {\n return [];\n }\n var newDepth = columnGroup.isPadding() ? depth : depth + 1;\n var childFilterComps = _.flatten(this.recursivelyAddComps(columnGroup.getChildren(), newDepth));\n if (columnGroup.isPadding()) {\n return childFilterComps;\n }\n var filterGroupComp = new ToolPanelFilterGroupComp(columnGroup, childFilterComps, this.onGroupExpanded.bind(this), depth, false);\n this.getContext().createBean(filterGroupComp);\n filterGroupComp.addCssClassToTitleBar('ag-filter-toolpanel-header');\n return [filterGroupComp];\n };\n FiltersToolPanelListPanel.prototype.filtersExistInChildren = function (tree) {\n var _this = this;\n return tree.some(function (child) {\n if (child instanceof ProvidedColumnGroup) {\n return _this.filtersExistInChildren(child.getChildren());\n }\n return _this.shouldDisplayFilter(child);\n });\n };\n FiltersToolPanelListPanel.prototype.shouldDisplayFilter = function (column) {\n var suppressFiltersToolPanel = column.getColDef() && column.getColDef().suppressFiltersToolPanel;\n return column.isFilterAllowed() && !suppressFiltersToolPanel;\n };\n // we don't support refreshing, but must implement because it's on the tool panel interface\n FiltersToolPanelListPanel.prototype.refresh = function () { };\n // lazy initialise the panel\n FiltersToolPanelListPanel.prototype.setVisible = function (visible) {\n _super.prototype.setDisplayed.call(this, visible);\n if (visible && !this.initialised) {\n this.init(this.params);\n }\n };\n FiltersToolPanelListPanel.prototype.expandFilterGroups = function (expand, groupIds) {\n var updatedGroupIds = [];\n var updateGroupExpandState = function (filterGroup) {\n var groupId = filterGroup.getFilterGroupId();\n var shouldExpandOrCollapse = !groupIds || _.includes(groupIds, groupId);\n if (shouldExpandOrCollapse) {\n // don't expand 'column groups', i.e. top level columns wrapped in a group\n if (expand && filterGroup.isColumnGroup()) {\n filterGroup.expand();\n }\n else {\n filterGroup.collapse();\n }\n updatedGroupIds.push(groupId);\n }\n // recursively look for more groups to expand / collapse\n filterGroup.getChildren().forEach(function (child) {\n if (child instanceof ToolPanelFilterGroupComp) {\n updateGroupExpandState(child);\n }\n });\n };\n this.filterGroupComps.forEach(updateGroupExpandState);\n // update header expand / collapse icon\n this.onGroupExpanded();\n if (groupIds) {\n var unrecognisedGroupIds = groupIds.filter(function (groupId) { return updatedGroupIds.indexOf(groupId) < 0; });\n if (unrecognisedGroupIds.length > 0) {\n console.warn('AG Grid: unable to find groups for these supplied groupIds:', unrecognisedGroupIds);\n }\n }\n };\n FiltersToolPanelListPanel.prototype.expandFilters = function (expand, colIds) {\n var updatedColIds = [];\n var updateGroupExpandState = function (filterComp) {\n if (filterComp instanceof ToolPanelFilterGroupComp) {\n var anyChildrenChanged_1 = false;\n filterComp.getChildren().forEach(function (child) {\n var childUpdated = updateGroupExpandState(child);\n if (childUpdated) {\n if (expand) {\n filterComp.expand();\n anyChildrenChanged_1 = true;\n }\n else if (!filterComp.isColumnGroup()) {\n // we only collapse columns wrapped in groups\n filterComp.collapse();\n }\n }\n });\n return anyChildrenChanged_1;\n }\n var colId = filterComp.getColumn().getColId();\n var updateFilterExpandState = !colIds || _.includes(colIds, colId);\n if (updateFilterExpandState) {\n expand ? filterComp.expand() : filterComp.collapse();\n updatedColIds.push(colId);\n }\n return updateFilterExpandState;\n };\n this.filterGroupComps.forEach(updateGroupExpandState);\n // update header expand / collapse icon\n this.onGroupExpanded();\n if (colIds) {\n var unrecognisedColIds = colIds.filter(function (colId) { return updatedColIds.indexOf(colId) < 0; });\n if (unrecognisedColIds.length > 0) {\n console.warn('AG Grid: unable to find columns for these supplied colIds:', unrecognisedColIds);\n }\n }\n };\n FiltersToolPanelListPanel.prototype.onGroupExpanded = function () {\n this.fireExpandedEvent();\n };\n FiltersToolPanelListPanel.prototype.fireExpandedEvent = function () {\n var expandedCount = 0;\n var notExpandedCount = 0;\n var updateExpandCounts = function (filterGroup) {\n if (!filterGroup.isColumnGroup()) {\n return;\n }\n filterGroup.isExpanded() ? expandedCount++ : notExpandedCount++;\n filterGroup.getChildren().forEach(function (child) {\n if (child instanceof ToolPanelFilterGroupComp) {\n updateExpandCounts(child);\n }\n });\n };\n this.filterGroupComps.forEach(updateExpandCounts);\n var state;\n if (expandedCount > 0 && notExpandedCount > 0) {\n state = EXPAND_STATE.INDETERMINATE;\n }\n else if (notExpandedCount > 0) {\n state = EXPAND_STATE.COLLAPSED;\n }\n else {\n state = EXPAND_STATE.EXPANDED;\n }\n this.dispatchEvent({ type: 'groupExpanded', state: state });\n };\n FiltersToolPanelListPanel.prototype.performFilterSearch = function (searchText) {\n this.searchFilterText = _.exists(searchText) ? searchText.toLowerCase() : null;\n this.searchFilters(this.searchFilterText);\n };\n FiltersToolPanelListPanel.prototype.searchFilters = function (searchFilter) {\n var passesFilter = function (groupName) {\n return !_.exists(searchFilter) || groupName.toLowerCase().indexOf(searchFilter) !== -1;\n };\n var recursivelySearch = function (filterItem, parentPasses) {\n if (!(filterItem instanceof ToolPanelFilterGroupComp)) {\n return passesFilter(filterItem.getColumnFilterName() || '');\n }\n var children = filterItem.getChildren();\n var groupNamePasses = passesFilter(filterItem.getFilterGroupName());\n // if group or parent already passed - ensure this group and all children are visible\n var alreadyPassed = parentPasses || groupNamePasses;\n if (alreadyPassed) {\n // ensure group visible\n filterItem.hideGroup(false);\n // ensure all children are visible\n for (var i = 0; i < children.length; i++) {\n recursivelySearch(children[i], alreadyPassed);\n filterItem.hideGroupItem(false, i);\n }\n return true;\n }\n // hide group item filters\n var anyChildPasses = false;\n children.forEach(function (child, index) {\n var childPasses = recursivelySearch(child, parentPasses);\n filterItem.hideGroupItem(!childPasses, index);\n if (childPasses) {\n anyChildPasses = true;\n }\n });\n // hide group if no children pass\n filterItem.hideGroup(!anyChildPasses);\n return anyChildPasses;\n };\n var firstVisible;\n var lastVisible;\n this.filterGroupComps.forEach(function (filterGroup, idx) {\n recursivelySearch(filterGroup, false);\n if (firstVisible === undefined) {\n if (!filterGroup.containsCssClass('ag-hidden')) {\n firstVisible = idx;\n lastVisible = idx;\n }\n }\n else if (!filterGroup.containsCssClass('ag-hidden') && lastVisible !== idx) {\n lastVisible = idx;\n }\n });\n this.setFirstAndLastVisible(firstVisible, lastVisible);\n };\n FiltersToolPanelListPanel.prototype.setFirstAndLastVisible = function (firstIdx, lastIdx) {\n this.filterGroupComps.forEach(function (filterGroup, idx) {\n filterGroup.removeCssClass('ag-first-group-visible');\n filterGroup.removeCssClass('ag-last-group-visible');\n if (idx === firstIdx) {\n filterGroup.addCssClass('ag-first-group-visible');\n }\n if (idx === lastIdx) {\n filterGroup.addCssClass('ag-last-group-visible');\n }\n });\n };\n FiltersToolPanelListPanel.prototype.refreshFilters = function () {\n this.filterGroupComps.forEach(function (filterGroupComp) { return filterGroupComp.refreshFilters(); });\n };\n FiltersToolPanelListPanel.prototype.destroyFilters = function () {\n this.filterGroupComps = this.destroyBeans(this.filterGroupComps);\n _.clearElement(this.getGui());\n };\n FiltersToolPanelListPanel.prototype.destroy = function () {\n this.destroyFilters();\n _super.prototype.destroy.call(this);\n };\n FiltersToolPanelListPanel.TEMPLATE = \"
\";\n __decorate([\n Autowired(\"gridApi\")\n ], FiltersToolPanelListPanel.prototype, \"gridApi\", void 0);\n __decorate([\n Autowired(\"columnApi\")\n ], FiltersToolPanelListPanel.prototype, \"columnApi\", void 0);\n __decorate([\n Autowired('toolPanelColDefService')\n ], FiltersToolPanelListPanel.prototype, \"toolPanelColDefService\", void 0);\n __decorate([\n Autowired('columnModel')\n ], FiltersToolPanelListPanel.prototype, \"columnModel\", void 0);\n return FiltersToolPanelListPanel;\n}(Component));\nexport { FiltersToolPanelListPanel };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, Component, RefSelector } from \"@ag-grid-community/core\";\nvar FiltersToolPanel = /** @class */ (function (_super) {\n __extends(FiltersToolPanel, _super);\n function FiltersToolPanel() {\n var _this = _super.call(this, FiltersToolPanel.TEMPLATE) || this;\n _this.initialised = false;\n _this.listenerDestroyFuncs = [];\n return _this;\n }\n FiltersToolPanel.prototype.init = function (params) {\n // if initialised is true, means this is a refresh\n if (this.initialised) {\n this.listenerDestroyFuncs.forEach(function (func) { return func(); });\n this.listenerDestroyFuncs = [];\n }\n this.initialised = true;\n var defaultParams = {\n suppressExpandAll: false,\n suppressFilterSearch: false,\n suppressSyncLayoutWithGrid: false,\n api: this.gridApi,\n columnApi: this.columnApi,\n context: this.gridOptionsWrapper.getContext()\n };\n _.mergeDeep(defaultParams, params);\n this.params = defaultParams;\n this.filtersToolPanelHeaderPanel.init(this.params);\n this.filtersToolPanelListPanel.init(this.params);\n var hideExpand = this.params.suppressExpandAll;\n var hideSearch = this.params.suppressFilterSearch;\n if (hideExpand && hideSearch) {\n this.filtersToolPanelHeaderPanel.setDisplayed(false);\n }\n // this is necessary to prevent a memory leak while refreshing the tool panel\n this.listenerDestroyFuncs.push(this.addManagedListener(this.filtersToolPanelHeaderPanel, 'expandAll', this.onExpandAll.bind(this)), this.addManagedListener(this.filtersToolPanelHeaderPanel, 'collapseAll', this.onCollapseAll.bind(this)), this.addManagedListener(this.filtersToolPanelHeaderPanel, 'searchChanged', this.onSearchChanged.bind(this)), this.addManagedListener(this.filtersToolPanelListPanel, 'groupExpanded', this.onGroupExpanded.bind(this)));\n };\n // lazy initialise the panel\n FiltersToolPanel.prototype.setVisible = function (visible) {\n _super.prototype.setDisplayed.call(this, visible);\n if (visible && !this.initialised) {\n this.init(this.params);\n }\n };\n FiltersToolPanel.prototype.onExpandAll = function () {\n this.filtersToolPanelListPanel.expandFilterGroups(true);\n };\n FiltersToolPanel.prototype.onCollapseAll = function () {\n this.filtersToolPanelListPanel.expandFilterGroups(false);\n };\n FiltersToolPanel.prototype.onSearchChanged = function (event) {\n this.filtersToolPanelListPanel.performFilterSearch(event.searchText);\n };\n FiltersToolPanel.prototype.setFilterLayout = function (colDefs) {\n this.filtersToolPanelListPanel.setFiltersLayout(colDefs);\n };\n FiltersToolPanel.prototype.onGroupExpanded = function (event) {\n this.filtersToolPanelHeaderPanel.setExpandState(event.state);\n };\n FiltersToolPanel.prototype.expandFilterGroups = function (groupIds) {\n this.filtersToolPanelListPanel.expandFilterGroups(true, groupIds);\n };\n FiltersToolPanel.prototype.collapseFilterGroups = function (groupIds) {\n this.filtersToolPanelListPanel.expandFilterGroups(false, groupIds);\n };\n FiltersToolPanel.prototype.expandFilters = function (colIds) {\n this.filtersToolPanelListPanel.expandFilters(true, colIds);\n };\n FiltersToolPanel.prototype.collapseFilters = function (colIds) {\n this.filtersToolPanelListPanel.expandFilters(false, colIds);\n };\n FiltersToolPanel.prototype.syncLayoutWithGrid = function () {\n this.filtersToolPanelListPanel.syncFilterLayout();\n };\n FiltersToolPanel.prototype.refresh = function () {\n this.init(this.params);\n };\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n FiltersToolPanel.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n FiltersToolPanel.TEMPLATE = \"
\\n \\n \\n
\";\n __decorate([\n RefSelector('filtersToolPanelHeaderPanel')\n ], FiltersToolPanel.prototype, \"filtersToolPanelHeaderPanel\", void 0);\n __decorate([\n RefSelector('filtersToolPanelListPanel')\n ], FiltersToolPanel.prototype, \"filtersToolPanelListPanel\", void 0);\n __decorate([\n Autowired('gridApi')\n ], FiltersToolPanel.prototype, \"gridApi\", void 0);\n __decorate([\n Autowired('columnApi')\n ], FiltersToolPanel.prototype, \"columnApi\", void 0);\n return FiltersToolPanel;\n}(Component));\nexport { FiltersToolPanel };\n","import { ModuleNames } from \"@ag-grid-community/core\";\nimport { EnterpriseCoreModule } from \"@ag-grid-enterprise/core\";\nimport { FiltersToolPanelHeaderPanel } from \"./filterToolPanel/filtersToolPanelHeaderPanel\";\nimport { FiltersToolPanelListPanel } from \"./filterToolPanel/filtersToolPanelListPanel\";\nimport { FiltersToolPanel } from \"./filterToolPanel/filtersToolPanel\";\nimport { SideBarModule } from \"@ag-grid-enterprise/side-bar\";\nexport var FiltersToolPanelModule = {\n moduleName: ModuleNames.FiltersToolPanelModule,\n beans: [],\n agStackComponents: [\n { componentName: 'AgFiltersToolPanelHeader', componentClass: FiltersToolPanelHeaderPanel },\n { componentName: 'AgFiltersToolPanelList', componentClass: FiltersToolPanelListPanel }\n ],\n userComponents: [\n { componentName: 'agFiltersToolPanel', componentClass: FiltersToolPanel },\n ],\n dependantModules: [\n SideBarModule,\n EnterpriseCoreModule\n ]\n};\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, BeanStub, ModuleNames, ModuleRegistry, Optional, } from \"@ag-grid-community/core\";\nimport { ChartDataModel } from \"./chartDataModel\";\nvar ChartDatasource = /** @class */ (function (_super) {\n __extends(ChartDatasource, _super);\n function ChartDatasource() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ChartDatasource.prototype.getData = function (params) {\n if (params.crossFiltering) {\n if (params.grouping) {\n console.warn(\"AG Grid: crossing filtering with row grouping is not supported.\");\n return { chartData: [], columnNames: {} };\n }\n if (!this.gridOptionsWrapper.isRowModelDefault()) {\n console.warn(\"AG Grid: crossing filtering is only supported in the client side row model.\");\n return { chartData: [], columnNames: {} };\n }\n }\n var isServerSide = this.gridOptionsWrapper.isRowModelServerSide();\n if (isServerSide && params.pivoting) {\n this.updatePivotKeysForSSRM();\n }\n var result = this.extractRowsFromGridRowModel(params);\n result.chartData = this.aggregateRowsByDimension(params, result.chartData);\n return result;\n };\n ChartDatasource.prototype.extractRowsFromGridRowModel = function (params) {\n var _this = this;\n var extractedRowData = [];\n var columnNames = {};\n // maps used to keep track of expanded groups that need to be removed\n var groupNodeIndexes = {};\n var groupsToRemove = {};\n // only used when cross filtering\n var filteredNodes = {};\n var allRowNodes = [];\n var numRows;\n if (params.crossFiltering) {\n filteredNodes = this.getFilteredRowNodes();\n allRowNodes = this.getAllRowNodes();\n numRows = allRowNodes.length;\n }\n else {\n // make sure enough rows in range to chart. if user filters and less rows, then end row will be\n // the last displayed row, not where the range ends.\n var modelLastRow = this.gridRowModel.getRowCount() - 1;\n var rangeLastRow = params.endRow >= 0 ? Math.min(params.endRow, modelLastRow) : modelLastRow;\n numRows = rangeLastRow - params.startRow + 1;\n }\n var _loop_1 = function (i) {\n var data = {};\n var rowNode = params.crossFiltering ? allRowNodes[i] : this_1.gridRowModel.getRow(i + params.startRow);\n // first get data for dimensions columns\n params.dimensionCols.forEach(function (col) {\n var colId = col.colId;\n var column = _this.columnModel.getGridColumn(colId);\n if (column) {\n var valueObject = _this.valueService.getValue(column, rowNode);\n // when grouping we also need to build up multi category labels for charts\n if (params.grouping) {\n var valueString = valueObject && valueObject.toString ? String(valueObject.toString()) : '';\n // traverse parents to extract group label path\n var labels = ChartDatasource.getGroupLabels(rowNode, valueString);\n data[colId] = {\n labels: labels, toString: function () {\n return this.labels.filter(function (l) { return !!l; }).reverse().join(' - ');\n }\n };\n // keep track of group node indexes, so they can be padded when other groups are expanded\n if (rowNode.group) {\n groupNodeIndexes[labels.toString()] = i;\n }\n // if node (group or leaf) has parents then it is expanded and should be removed\n var groupKey = labels.slice(1, labels.length).toString();\n if (groupKey) {\n groupsToRemove[groupKey] = groupNodeIndexes[groupKey];\n }\n }\n else {\n // leaf nodes can be directly added to dimension columns\n data[colId] = valueObject;\n }\n }\n else {\n // introduce a default category when no dimensions exist with a value based off row index (+1)\n data[ChartDataModel.DEFAULT_CATEGORY] = i + 1;\n }\n });\n // then get data for value columns\n params.valueCols.forEach(function (col) {\n var columnNamesArr = [];\n // pivot keys should be added first\n var pivotKeys = col.getColDef().pivotKeys;\n if (pivotKeys) {\n columnNamesArr = pivotKeys.slice();\n }\n // then add column header name to results\n var headerName = col.getColDef().headerName;\n if (headerName) {\n columnNamesArr.push(headerName);\n }\n // add array of column names to results\n if (columnNamesArr.length > 0) {\n columnNames[col.getId()] = columnNamesArr;\n }\n var colId = col.getColId();\n if (params.crossFiltering) {\n var filteredOutColId = colId + '-filtered-out';\n // add data value to value column\n var value = _this.valueService.getValue(col, rowNode);\n var actualValue = value != null && typeof value.toNumber === 'function' ? value.toNumber() : value;\n if (filteredNodes[rowNode.id]) {\n data[colId] = actualValue;\n data[filteredOutColId] = params.aggFunc || params.isScatter ? undefined : 0;\n }\n else {\n data[colId] = params.aggFunc || params.isScatter ? undefined : 0;\n data[filteredOutColId] = actualValue;\n }\n }\n else {\n // add data value to value column\n var value = _this.valueService.getValue(col, rowNode);\n data[colId] = value != null && typeof value.toNumber === 'function' ? value.toNumber() : value;\n }\n });\n // row data from footer nodes should not be included in charts\n if (rowNode.footer) {\n // 'stamping' data as footer to avoid impacting previously calculated `groupIndexesToRemove` and will\n // be removed from the results along with any expanded group nodes\n data.footer = true;\n }\n // add data to results\n extractedRowData.push(data);\n };\n var this_1 = this;\n for (var i = 0; i < numRows; i++) {\n _loop_1(i);\n }\n if (params.grouping) {\n var groupIndexesToRemove_1 = _.values(groupsToRemove);\n var filterFunc = function (data, index) { return !data.footer && !_.includes(groupIndexesToRemove_1, index); };\n extractedRowData = extractedRowData.filter(filterFunc);\n }\n return { chartData: extractedRowData, columnNames: columnNames };\n };\n ChartDatasource.prototype.aggregateRowsByDimension = function (params, dataFromGrid) {\n var _this = this;\n var dimensionCols = params.dimensionCols;\n if (!params.aggFunc || dimensionCols.length === 0) {\n return dataFromGrid;\n }\n var lastCol = _.last(dimensionCols);\n var lastColId = lastCol && lastCol.colId;\n var map = {};\n var dataAggregated = [];\n dataFromGrid.forEach(function (data) {\n var currentMap = map;\n dimensionCols.forEach(function (col) {\n var colId = col.colId;\n var key = data[colId];\n if (colId === lastColId) {\n var groupItem_1 = currentMap[key];\n if (!groupItem_1) {\n groupItem_1 = { __children: [] };\n dimensionCols.forEach(function (dimCol) {\n var dimColId = dimCol.colId;\n groupItem_1[dimColId] = data[dimColId];\n });\n currentMap[key] = groupItem_1;\n dataAggregated.push(groupItem_1);\n }\n groupItem_1.__children.push(data);\n }\n else {\n // map of maps\n if (!currentMap[key]) {\n currentMap[key] = {};\n }\n currentMap = currentMap[key];\n }\n });\n });\n if (ModuleRegistry.assertRegistered(ModuleNames.RowGroupingModule, 'Charting Aggregation')) {\n dataAggregated.forEach(function (groupItem) { return params.valueCols.forEach(function (col) {\n if (params.crossFiltering) {\n params.valueCols.forEach(function (valueCol) {\n var colId = valueCol.getColId();\n // filtered data\n var dataToAgg = groupItem.__children\n .filter(function (child) { return typeof child[colId] !== 'undefined'; })\n .map(function (child) { return child[colId]; });\n var aggResult = _this.aggregationStage.aggregateValues(dataToAgg, params.aggFunc);\n groupItem[valueCol.getId()] = aggResult && typeof aggResult.value !== 'undefined' ? aggResult.value : aggResult;\n // filtered out data\n var filteredOutColId = colId + \"-filtered-out\";\n var dataToAggFiltered = groupItem.__children\n .filter(function (child) { return typeof child[filteredOutColId] !== 'undefined'; })\n .map(function (child) { return child[filteredOutColId]; });\n var aggResultFiltered = _this.aggregationStage.aggregateValues(dataToAggFiltered, params.aggFunc);\n groupItem[filteredOutColId] = aggResultFiltered && typeof aggResultFiltered.value !== 'undefined' ? aggResultFiltered.value : aggResultFiltered;\n });\n }\n else {\n var dataToAgg = groupItem.__children.map(function (child) { return child[col.getId()]; });\n var aggResult = 0;\n if (ModuleRegistry.assertRegistered(ModuleNames.RowGroupingModule, 'Charting Aggregation')) {\n aggResult = _this.aggregationStage.aggregateValues(dataToAgg, params.aggFunc);\n }\n groupItem[col.getId()] = aggResult && typeof aggResult.value !== 'undefined' ? aggResult.value : aggResult;\n }\n }); });\n }\n return dataAggregated;\n };\n ChartDatasource.prototype.updatePivotKeysForSSRM = function () {\n var secondaryColumns = this.columnModel.getSecondaryColumns();\n if (!secondaryColumns) {\n return;\n }\n // we don't know what the application will use for the pivot key separator (i.e. '_' or '|' ) as the\n // secondary columns are provided to grid by the application via columnApi.setSecondaryColumns()\n var pivotKeySeparator = this.extractPivotKeySeparator(secondaryColumns);\n // `pivotKeys` is not used by the SSRM for pivoting, so it is safe to reuse this colDef property. This way\n // the same logic can be used for CSRM and SSRM to extract legend names in extractRowsFromGridRowModel()\n secondaryColumns.forEach(function (col) {\n var keys = col.getColId().split(pivotKeySeparator);\n col.getColDef().pivotKeys = keys.slice(0, keys.length - 1);\n });\n };\n ChartDatasource.prototype.extractPivotKeySeparator = function (secondaryColumns) {\n if (secondaryColumns.length === 0) {\n return \"\";\n }\n var extractSeparator = function (columnGroup, childId) {\n var groupId = columnGroup.getGroupId();\n if (!columnGroup.getParent()) {\n // removing groupId ('2000') from childId ('2000|Swimming') yields '|Swimming' so first char is separator\n return childId.split(groupId)[1][0];\n }\n return extractSeparator(columnGroup.getParent(), groupId);\n };\n var firstSecondaryCol = secondaryColumns[0];\n return extractSeparator(firstSecondaryCol.getParent(), firstSecondaryCol.getColId());\n };\n ChartDatasource.getGroupLabels = function (rowNode, initialLabel) {\n var labels = [initialLabel];\n while (rowNode && rowNode.level !== 0) {\n rowNode = rowNode.parent;\n if (rowNode) {\n labels.push(rowNode.key);\n }\n }\n return labels;\n };\n ChartDatasource.prototype.getFilteredRowNodes = function () {\n var filteredNodes = {};\n this.gridRowModel.forEachNodeAfterFilterAndSort(function (rowNode) {\n filteredNodes[rowNode.id] = rowNode;\n });\n return filteredNodes;\n };\n ChartDatasource.prototype.getAllRowNodes = function () {\n var allRowNodes = [];\n this.gridRowModel.forEachNode(function (rowNode) {\n allRowNodes.push(rowNode);\n });\n return this.sortRowNodes(allRowNodes);\n };\n ChartDatasource.prototype.sortRowNodes = function (rowNodes) {\n var sortOptions = this.sortController.getSortOptions();\n var noSort = !sortOptions || sortOptions.length == 0;\n if (noSort)\n return rowNodes;\n return this.rowNodeSorter.doFullSort(rowNodes, sortOptions);\n };\n __decorate([\n Autowired('rowModel')\n ], ChartDatasource.prototype, \"gridRowModel\", void 0);\n __decorate([\n Autowired('valueService')\n ], ChartDatasource.prototype, \"valueService\", void 0);\n __decorate([\n Autowired('columnModel')\n ], ChartDatasource.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired('rowNodeSorter')\n ], ChartDatasource.prototype, \"rowNodeSorter\", void 0);\n __decorate([\n Autowired('sortController')\n ], ChartDatasource.prototype, \"sortController\", void 0);\n __decorate([\n Optional('aggregationStage')\n ], ChartDatasource.prototype, \"aggregationStage\", void 0);\n return ChartDatasource;\n}(BeanStub));\nexport { ChartDatasource };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n};\nimport { _, Autowired, BeanStub, CellRangeType, Constants, PostConstruct } from \"@ag-grid-community/core\";\nimport { ChartDatasource } from \"./chartDatasource\";\nvar ChartDataModel = /** @class */ (function (_super) {\n __extends(ChartDataModel, _super);\n function ChartDataModel(params) {\n var _this = _super.call(this) || this;\n _this.unlinked = false;\n _this.chartData = [];\n _this.valueColState = [];\n _this.dimensionColState = [];\n _this.columnNames = {};\n _this.grouping = false;\n _this.crossFiltering = false;\n // this control flag is used to only log warning for the initial user config\n _this.suppressComboChartWarnings = false;\n _this.chartId = params.chartId;\n _this.chartType = params.chartType;\n _this.pivotChart = params.pivotChart;\n _this.chartThemeName = params.chartThemeName;\n _this.aggFunc = params.aggFunc;\n _this.referenceCellRange = params.cellRange;\n _this.suppliedCellRange = params.cellRange;\n _this.suppressChartRanges = params.suppressChartRanges;\n _this.unlinked = !!params.unlinkChart;\n _this.crossFiltering = !!params.crossFiltering;\n _this.seriesChartTypes = params.seriesChartTypes || [];\n _this.initComboCharts(params);\n return _this;\n }\n ChartDataModel.prototype.initComboCharts = function (params) {\n var seriesChartTypesExist = this.seriesChartTypes && this.seriesChartTypes.length > 0;\n var customCombo = params.chartType === 'customCombo' || seriesChartTypesExist;\n if (customCombo) {\n // it is not necessary to supply a chart type for combo charts when `seriesChartTypes` is supplied\n this.chartType = 'customCombo';\n // cache supplied `seriesChartTypes` to allow switching between different chart types in the settings panel\n this.savedCustomSeriesChartTypes = this.seriesChartTypes || [];\n }\n };\n ChartDataModel.prototype.init = function () {\n this.datasource = this.createManagedBean(new ChartDatasource());\n this.updateCellRanges();\n };\n ChartDataModel.prototype.updateCellRanges = function (updatedColState) {\n if (this.valueCellRange) {\n this.referenceCellRange = this.valueCellRange;\n }\n var _a = this.getAllChartColumns(), dimensionCols = _a.dimensionCols, valueCols = _a.valueCols;\n var allColsFromRanges = this.getAllColumnsFromRanges();\n if (updatedColState) {\n this.updateColumnState(updatedColState);\n }\n this.setDimensionCellRange(dimensionCols, allColsFromRanges, updatedColState);\n this.setValueCellRange(valueCols, allColsFromRanges, updatedColState);\n if (!updatedColState) {\n this.resetColumnState();\n // dimension / category cell range could be out of sync after resetting column state when row grouping\n this.syncDimensionCellRange();\n }\n this.updateSeriesChartTypes();\n this.updateData();\n };\n ChartDataModel.prototype.updateSeriesChartTypes = function () {\n if (!this.isComboChart()) {\n return;\n }\n // ensure primary only chart types are not placed on secondary axis\n this.seriesChartTypes = this.seriesChartTypes.map(function (seriesChartType) {\n var primaryOnly = ['groupedColumn', 'stackedColumn', 'stackedArea'].includes(seriesChartType.chartType);\n seriesChartType.secondaryAxis = primaryOnly ? false : seriesChartType.secondaryAxis;\n return seriesChartType;\n });\n // note that when seriesChartTypes are supplied the chart type is also changed to 'customCombo'\n if (this.chartType === 'customCombo') {\n this.updateSeriesChartTypesForCustomCombo();\n return;\n }\n this.updateChartSeriesTypesForBuiltInCombos();\n };\n ChartDataModel.prototype.updateSeriesChartTypesForCustomCombo = function () {\n var _this = this;\n var seriesChartTypesSupplied = this.seriesChartTypes && this.seriesChartTypes.length > 0;\n if (!seriesChartTypesSupplied && !this.suppressComboChartWarnings) {\n console.warn(\"AG Grid: 'seriesChartTypes' are required when the 'customCombo' chart type is specified.\");\n }\n // ensure correct chartTypes are supplied\n this.seriesChartTypes = this.seriesChartTypes.map(function (s) {\n if (!ChartDataModel.SUPPORTED_COMBO_CHART_TYPES.includes(s.chartType)) {\n console.warn(\"AG Grid: invalid chartType '\" + s.chartType + \"' supplied in 'seriesChartTypes', converting to 'line' instead.\");\n s.chartType = 'line';\n }\n return s;\n });\n var getSeriesChartType = function (valueCol) {\n if (!_this.savedCustomSeriesChartTypes || _this.savedCustomSeriesChartTypes.length === 0) {\n _this.savedCustomSeriesChartTypes = _this.seriesChartTypes;\n }\n var providedSeriesChartType = _this.savedCustomSeriesChartTypes.find(function (s) { return s.colId === valueCol.colId; });\n if (!providedSeriesChartType) {\n if (valueCol.selected && !_this.suppressComboChartWarnings) {\n console.warn(\"AG Grid: no 'seriesChartType' found for colId = '\" + valueCol.colId + \"', defaulting to 'line'.\");\n }\n return {\n colId: valueCol.colId,\n chartType: 'line',\n secondaryAxis: false\n };\n }\n return providedSeriesChartType;\n };\n var updatedSeriesChartTypes = this.valueColState.map(getSeriesChartType);\n this.seriesChartTypes = updatedSeriesChartTypes;\n // also cache custom `seriesChartTypes` to allow for switching between different chart types\n this.savedCustomSeriesChartTypes = updatedSeriesChartTypes;\n // turn off warnings as first combo chart attempt has completed\n this.suppressComboChartWarnings = true;\n };\n ChartDataModel.prototype.updateChartSeriesTypesForBuiltInCombos = function () {\n var primaryChartType = this.chartType === 'columnLineCombo' ? 'groupedColumn' : 'stackedArea';\n var secondaryChartType = this.chartType === 'columnLineCombo' ? 'line' : 'groupedColumn';\n var selectedCols = this.valueColState.filter(function (cs) { return cs.selected; });\n var lineIndex = Math.ceil(selectedCols.length / 2);\n this.seriesChartTypes = selectedCols.map(function (valueCol, i) {\n var seriesType = (i >= lineIndex) ? secondaryChartType : primaryChartType;\n return { colId: valueCol.colId, chartType: seriesType, secondaryAxis: false };\n });\n };\n ChartDataModel.prototype.updateData = function () {\n var _a = this.getRowIndexes(), startRow = _a.startRow, endRow = _a.endRow;\n if (this.pivotChart) {\n this.resetColumnState();\n }\n this.grouping = this.isGrouping();\n var params = {\n aggFunc: this.aggFunc,\n dimensionCols: [this.getSelectedDimension()],\n grouping: this.grouping,\n pivoting: this.isPivotActive(),\n crossFiltering: this.crossFiltering,\n valueCols: this.getSelectedValueCols(),\n startRow: startRow,\n endRow: endRow,\n isScatter: _.includes(['scatter', 'bubble'], this.chartType)\n };\n var _b = this.datasource.getData(params), chartData = _b.chartData, columnNames = _b.columnNames;\n this.chartData = chartData;\n this.columnNames = columnNames;\n };\n ChartDataModel.prototype.isGrouping = function () {\n var usingTreeData = this.gridOptionsWrapper.isTreeData();\n var groupedCols = usingTreeData ? null : this.columnModel.getRowGroupColumns();\n var isGroupActive = usingTreeData || (groupedCols && groupedCols.length > 0);\n // charts only group when the selected category is a group column\n var colId = this.getSelectedDimension().colId;\n var displayedGroupCols = this.columnModel.getGroupDisplayColumns();\n var groupDimensionSelected = displayedGroupCols.map(function (col) { return col.getColId(); }).some(function (id) { return id === colId; });\n return !!isGroupActive && groupDimensionSelected;\n };\n ChartDataModel.prototype.getSelectedValueCols = function () {\n return this.valueColState.filter(function (cs) { return cs.selected; }).map(function (cs) { return cs.column; });\n };\n ChartDataModel.prototype.getSelectedDimension = function () {\n return this.dimensionColState.filter(function (cs) { return cs.selected; })[0];\n };\n ChartDataModel.prototype.getColDisplayName = function (col) {\n return this.columnModel.getDisplayNameForColumn(col, 'chart');\n };\n ChartDataModel.prototype.isPivotMode = function () {\n return this.columnModel.isPivotMode();\n };\n ChartDataModel.prototype.isPivotActive = function () {\n return this.columnModel.isPivotActive();\n };\n ChartDataModel.prototype.createCellRange = function (type) {\n var columns = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n columns[_i - 1] = arguments[_i];\n }\n return {\n id: this.chartId,\n startRow: this.referenceCellRange.startRow,\n endRow: this.referenceCellRange.endRow,\n columns: columns,\n startColumn: type === CellRangeType.DIMENSION ? columns[0] : this.referenceCellRange.startColumn,\n type: type\n };\n };\n ChartDataModel.prototype.getAllColumnsFromRanges = function () {\n if (this.pivotChart) {\n return _.convertToSet(this.columnModel.getAllDisplayedColumns());\n }\n var columns = this.dimensionCellRange || this.valueCellRange ? [] : this.referenceCellRange.columns;\n if (this.dimensionCellRange) {\n columns.push.apply(columns, __spread(this.dimensionCellRange.columns));\n }\n if (this.valueCellRange) {\n columns.push.apply(columns, __spread(this.valueCellRange.columns));\n }\n return _.convertToSet(columns);\n };\n ChartDataModel.prototype.getRowIndexes = function () {\n var startRow = 0, endRow = 0;\n var rangeService = this.rangeService;\n var range = this.valueCellRange;\n if (rangeService && range) {\n startRow = rangeService.getRangeStartRow(range).rowIndex;\n // when the last row the cell range is a pinned 'bottom' row, the `endRow` index is set to -1 which results\n // in the ChartDatasource processing all non pinned rows from the `startRow` index.\n var endRowPosition = rangeService.getRangeEndRow(range);\n endRow = endRowPosition.rowPinned === Constants.PINNED_BOTTOM ? -1 : endRowPosition.rowIndex;\n }\n return { startRow: startRow, endRow: endRow };\n };\n ChartDataModel.prototype.getAllChartColumns = function () {\n var _this = this;\n var displayedCols = this.columnModel.getAllDisplayedColumns();\n var dimensionCols = new Set();\n var valueCols = new Set();\n displayedCols.forEach(function (col) {\n var colDef = col.getColDef();\n var chartDataType = colDef.chartDataType;\n if (chartDataType) {\n // chart data type was specified explicitly\n switch (chartDataType) {\n case 'category':\n case 'time':\n dimensionCols.add(col);\n return;\n case 'series':\n valueCols.add(col);\n return;\n case 'excluded':\n return;\n default:\n console.warn(\"AG Grid: unexpected chartDataType value '\" + chartDataType + \"' supplied, instead use 'category', 'series' or 'excluded'\");\n break;\n }\n }\n if (colDef.colId === 'ag-Grid-AutoColumn') {\n dimensionCols.add(col);\n return;\n }\n if (!col.isPrimary()) {\n valueCols.add(col);\n return;\n }\n // if 'chartDataType' is not provided then infer type based data contained in first row\n (_this.isNumberCol(col) ? valueCols : dimensionCols).add(col);\n });\n return { dimensionCols: dimensionCols, valueCols: valueCols };\n };\n ChartDataModel.prototype.isNumberCol = function (col) {\n if (col.getColId() === 'ag-Grid-AutoColumn') {\n return false;\n }\n var row = this.rowRenderer.getRowNode({ rowIndex: 0, rowPinned: null });\n if (!row) {\n return false;\n }\n var cellValue = this.valueService.getValue(col, row);\n if (cellValue == null) {\n cellValue = this.extractLeafData(row, col);\n }\n if (cellValue != null && typeof cellValue.toNumber === 'function') {\n cellValue = cellValue.toNumber();\n }\n return typeof cellValue === 'number';\n };\n ChartDataModel.prototype.extractLeafData = function (row, col) {\n if (!row.allLeafChildren) {\n return null;\n }\n for (var i = 0; i < row.allLeafChildren.length; i++) {\n var childRow = row.allLeafChildren[i];\n var value = this.valueService.getValue(col, childRow);\n if (value != null) {\n return value;\n }\n }\n return null;\n };\n ChartDataModel.prototype.resetColumnState = function () {\n var _this = this;\n var _a = this.getAllChartColumns(), dimensionCols = _a.dimensionCols, valueCols = _a.valueCols;\n var allCols = this.getAllColumnsFromRanges();\n var isInitialising = this.valueColState.length < 1;\n this.dimensionColState = [];\n this.valueColState = [];\n var hasSelectedDimension = false;\n var order = 1;\n var aggFuncDimension = this.suppliedCellRange.columns[0]; //TODO\n dimensionCols.forEach(function (column) {\n var isAutoGroupCol = column.getColId() === 'ag-Grid-AutoColumn';\n var selected = false;\n if (_this.crossFiltering && _this.aggFunc) {\n if (aggFuncDimension.getColId() === column.getColId()) {\n selected = true;\n }\n }\n else {\n selected = isAutoGroupCol ? true : !hasSelectedDimension && allCols.has(column);\n }\n _this.dimensionColState.push({\n column: column,\n colId: column.getColId(),\n displayName: _this.getColDisplayName(column),\n selected: selected,\n order: order++\n });\n if (selected) {\n hasSelectedDimension = true;\n }\n });\n var defaultCategory = {\n colId: ChartDataModel.DEFAULT_CATEGORY,\n displayName: this.chartTranslationService.translate('defaultCategory'),\n selected: !hasSelectedDimension,\n order: 0\n };\n this.dimensionColState.unshift(defaultCategory);\n var valueColumnsFromReferenceRange = this.referenceCellRange.columns.filter(function (c) { return valueCols.has(c); });\n valueCols.forEach(function (column) {\n // first time the value cell range is set, preserve the column order from the supplied range\n if (isInitialising && _.includes(_this.referenceCellRange.columns, column)) {\n column = valueColumnsFromReferenceRange.shift();\n }\n _this.valueColState.push({\n column: column,\n colId: column.getColId(),\n displayName: _this.getColDisplayName(column),\n selected: allCols.has(column),\n order: order++\n });\n });\n };\n ChartDataModel.prototype.updateColumnState = function (updatedCol) {\n var idsMatch = function (cs) { return cs.colId === updatedCol.colId; };\n var _a = this, dimensionColState = _a.dimensionColState, valueColState = _a.valueColState;\n if (dimensionColState.filter(idsMatch).length > 0) {\n // only one dimension should be selected\n dimensionColState.forEach(function (cs) { return cs.selected = idsMatch(cs); });\n }\n else {\n // just update the selected value on the supplied value column\n valueColState.filter(idsMatch).forEach(function (cs) { return cs.selected = updatedCol.selected; });\n }\n var allColumns = __spread(dimensionColState, valueColState);\n var orderedColIds = [];\n // calculate new order\n allColumns.forEach(function (col, i) {\n if (i === updatedCol.order) {\n orderedColIds.push(updatedCol.colId);\n }\n if (col.colId !== updatedCol.colId) {\n orderedColIds.push(col.colId);\n }\n });\n // update col state with new order\n allColumns.forEach(function (col) {\n var order = orderedColIds.indexOf(col.colId);\n col.order = order >= 0 ? orderedColIds.indexOf(col.colId) : allColumns.length - 1;\n });\n this.reorderColState();\n };\n ChartDataModel.prototype.reorderColState = function () {\n var ascColStateOrder = function (a, b) { return a.order - b.order; };\n this.dimensionColState.sort(ascColStateOrder);\n this.valueColState.sort(ascColStateOrder);\n };\n ChartDataModel.prototype.setDimensionCellRange = function (dimensionCols, colsInRange, updatedColState) {\n var _this = this;\n this.dimensionCellRange = undefined;\n if (!updatedColState && !this.dimensionColState.length) {\n // use first dimension column in range by default\n dimensionCols.forEach(function (col) {\n if (_this.dimensionCellRange || !colsInRange.has(col)) {\n return;\n }\n _this.dimensionCellRange = _this.createCellRange(CellRangeType.DIMENSION, col);\n });\n return;\n }\n var selectedDimensionColState = updatedColState;\n if (this.crossFiltering && this.aggFunc) {\n var aggFuncDimension_1 = this.suppliedCellRange.columns[0]; //TODO\n selectedDimensionColState = this.dimensionColState.filter(function (cs) { return cs.colId === aggFuncDimension_1.getColId(); })[0];\n }\n else if (!selectedDimensionColState || !dimensionCols.has(selectedDimensionColState.column)) {\n selectedDimensionColState = this.dimensionColState.filter(function (cs) { return cs.selected; })[0];\n }\n if (selectedDimensionColState && selectedDimensionColState.colId !== ChartDataModel.DEFAULT_CATEGORY) {\n this.dimensionCellRange = this.createCellRange(CellRangeType.DIMENSION, selectedDimensionColState.column);\n }\n };\n ChartDataModel.prototype.setValueCellRange = function (valueCols, colsInRange, updatedColState) {\n this.valueCellRange = undefined;\n var selectedValueCols = [];\n valueCols.forEach(function (col) {\n if (updatedColState && updatedColState.colId === col.getColId()) {\n if (updatedColState.selected) {\n selectedValueCols.push(updatedColState.column);\n }\n }\n else if (colsInRange.has(col)) {\n selectedValueCols.push(col);\n }\n });\n if (selectedValueCols.length > 0) {\n var orderedColIds_1 = [];\n if (this.valueColState.length > 0) {\n orderedColIds_1 = this.valueColState.map(function (c) { return c.colId; });\n }\n else {\n colsInRange.forEach(function (c) { return orderedColIds_1.push(c.getColId()); });\n }\n selectedValueCols.sort(function (a, b) { return orderedColIds_1.indexOf(a.getColId()) - orderedColIds_1.indexOf(b.getColId()); });\n this.valueCellRange = this.createCellRange.apply(this, __spread([CellRangeType.VALUE], selectedValueCols));\n }\n };\n ChartDataModel.prototype.syncDimensionCellRange = function () {\n var selectedDimension = this.getSelectedDimension();\n if (selectedDimension && selectedDimension.column) {\n this.dimensionCellRange = this.createCellRange(CellRangeType.DIMENSION, selectedDimension.column);\n }\n };\n ChartDataModel.prototype.isComboChart = function () {\n return ['columnLineCombo', 'areaColumnCombo', 'customCombo'].includes(this.chartType);\n };\n ChartDataModel.DEFAULT_CATEGORY = 'AG-GRID-DEFAULT-CATEGORY';\n ChartDataModel.SUPPORTED_COMBO_CHART_TYPES = ['line', 'groupedColumn', 'stackedColumn', 'area', 'stackedArea'];\n __decorate([\n Autowired('columnModel')\n ], ChartDataModel.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired('valueService')\n ], ChartDataModel.prototype, \"valueService\", void 0);\n __decorate([\n Autowired('rangeService')\n ], ChartDataModel.prototype, \"rangeService\", void 0);\n __decorate([\n Autowired('rowRenderer')\n ], ChartDataModel.prototype, \"rowRenderer\", void 0);\n __decorate([\n Autowired('chartTranslationService')\n ], ChartDataModel.prototype, \"chartTranslationService\", void 0);\n __decorate([\n PostConstruct\n ], ChartDataModel.prototype, \"init\", null);\n return ChartDataModel;\n}(BeanStub));\nexport { ChartDataModel };\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar Observable = /** @class */ (function () {\n function Observable() {\n // Note that these maps can't be specified generically, so they are kept untyped.\n // Some methods in this class only need generics in their signatures, the generics inside the methods\n // are just for clarity. The generics in signatures allow for static type checking of user provided\n // listeners and for type inference, so that the users wouldn't have to specify the type of parameters\n // of their inline lambdas.\n this.allPropertyListeners = new Map(); // property name => property change listener => scopes\n this.allEventListeners = new Map(); // event type => event listener => scopes\n }\n Observable.prototype.addPropertyListener = function (name, listener, scope) {\n if (scope === void 0) { scope = this; }\n var allPropertyListeners = this.allPropertyListeners;\n var propertyListeners = allPropertyListeners.get(name);\n if (!propertyListeners) {\n propertyListeners = new Map();\n allPropertyListeners.set(name, propertyListeners);\n }\n if (!propertyListeners.has(listener)) {\n var scopes_1 = new Set();\n propertyListeners.set(listener, scopes_1);\n }\n var scopes = propertyListeners.get(listener);\n if (scopes) {\n scopes.add(scope);\n }\n };\n Observable.prototype.removePropertyListener = function (name, listener, scope) {\n if (scope === void 0) { scope = this; }\n var allPropertyListeners = this.allPropertyListeners;\n var propertyListeners = allPropertyListeners.get(name);\n if (propertyListeners) {\n if (listener) {\n var scopes = propertyListeners.get(listener);\n if (scopes) {\n scopes.delete(scope);\n if (!scopes.size) {\n propertyListeners.delete(listener);\n }\n }\n }\n else {\n propertyListeners.clear();\n }\n }\n };\n Observable.prototype.notifyPropertyListeners = function (name, oldValue, value) {\n var _this = this;\n var allPropertyListeners = this.allPropertyListeners;\n var propertyListeners = allPropertyListeners.get(name);\n if (propertyListeners) {\n propertyListeners.forEach(function (scopes, listener) {\n scopes.forEach(function (scope) { return listener.call(scope, { type: name, source: _this, value: value, oldValue: oldValue }); });\n });\n }\n };\n Observable.prototype.addEventListener = function (type, listener, scope) {\n if (scope === void 0) { scope = this; }\n var allEventListeners = this.allEventListeners;\n var eventListeners = allEventListeners.get(type);\n if (!eventListeners) {\n eventListeners = new Map();\n allEventListeners.set(type, eventListeners);\n }\n if (!eventListeners.has(listener)) {\n var scopes_2 = new Set();\n eventListeners.set(listener, scopes_2);\n }\n var scopes = eventListeners.get(listener);\n if (scopes) {\n scopes.add(scope);\n }\n };\n Observable.prototype.removeEventListener = function (type, listener, scope) {\n if (scope === void 0) { scope = this; }\n var allEventListeners = this.allEventListeners;\n var eventListeners = allEventListeners.get(type);\n if (eventListeners) {\n if (listener) {\n var scopes = eventListeners.get(listener);\n if (scopes) {\n scopes.delete(scope);\n if (!scopes.size) {\n eventListeners.delete(listener);\n }\n }\n }\n else {\n eventListeners.clear();\n }\n }\n };\n Observable.prototype.notifyEventListeners = function (types) {\n var _this = this;\n var allEventListeners = this.allEventListeners;\n types.forEach(function (type) {\n var listeners = allEventListeners.get(type);\n if (listeners) {\n listeners.forEach(function (scopes, listener) {\n scopes.forEach(function (scope) { return listener.call(scope, { type: type, source: _this }); });\n });\n }\n });\n };\n // 'source' is added automatically and is always the object this method belongs to.\n Observable.prototype.fireEvent = function (event) {\n var _this = this;\n var listeners = this.allEventListeners.get(event.type);\n if (listeners) {\n listeners.forEach(function (scopes, listener) {\n scopes.forEach(function (scope) { return listener.call(scope, __assign(__assign({}, event), { source: _this })); });\n });\n }\n };\n Observable.privateKeyPrefix = '_';\n return Observable;\n}());\nexport { Observable };\nexport function reactive() {\n var events = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n events[_i] = arguments[_i];\n }\n var debug = events.indexOf('debugger') >= 0;\n return function (target, key) {\n // `target` is either a constructor (static member) or prototype (instance member)\n var privateKey = Observable.privateKeyPrefix + key;\n var privateKeyEvents = privateKey + 'Events';\n if (!target[key]) {\n if (events) {\n target[privateKeyEvents] = events;\n }\n Object.defineProperty(target, key, {\n set: function (value) {\n var oldValue = this[privateKey];\n // This is a way to stop inside the setter by adding the special\n // 'debugger' event to a reactive property, for example:\n // @reactive('layoutChange', 'debugger') title?: Caption;\n if (debug) { // DO NOT REMOVE\n debugger;\n }\n if (value !== oldValue || (typeof value === 'object' && value !== null)) {\n this[privateKey] = value;\n this.notifyPropertyListeners(key, oldValue, value);\n var events_1 = this[privateKeyEvents];\n if (events_1) {\n this.notifyEventListeners(events_1);\n }\n }\n },\n get: function () {\n return this[privateKey];\n },\n enumerable: true,\n configurable: true\n });\n }\n };\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Observable, reactive } from \"./observable\";\nvar Padding = /** @class */ (function (_super) {\n __extends(Padding, _super);\n function Padding(top, right, bottom, left) {\n if (top === void 0) { top = 0; }\n if (right === void 0) { right = top; }\n if (bottom === void 0) { bottom = top; }\n if (left === void 0) { left = right; }\n var _this = _super.call(this) || this;\n _this.top = top;\n _this.right = right;\n _this.bottom = bottom;\n _this.left = left;\n return _this;\n }\n Padding.prototype.clear = function () {\n this.top = this.right = this.bottom = this.left = 0;\n };\n __decorate([\n reactive('layoutChange')\n ], Padding.prototype, \"top\", void 0);\n __decorate([\n reactive('layoutChange')\n ], Padding.prototype, \"right\", void 0);\n __decorate([\n reactive('layoutChange')\n ], Padding.prototype, \"bottom\", void 0);\n __decorate([\n reactive('layoutChange')\n ], Padding.prototype, \"left\", void 0);\n return Padding;\n}(Observable));\nexport { Padding };\n","// For small data structs like a bounding box, objects are superior to arrays\n// in terms of performance (by 3-4% in Chrome 71, Safari 12 and by 20% in Firefox 64).\n// They are also self descriptive and harder to abuse.\n// For example, one has to do:\n// `ctx.strokeRect(bbox.x, bbox.y, bbox.width, bbox.height);`\n// rather than become enticed by the much slower:\n// `ctx.strokeRect(...bbox);`\n// https://jsperf.com/array-vs-object-create-access\nvar BBox = /** @class */ (function () {\n function BBox(x, y, width, height) {\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n }\n BBox.prototype.isValid = function () {\n return isFinite(this.x) && isFinite(this.y) && isFinite(this.width) && isFinite(this.height);\n };\n BBox.prototype.dilate = function (value) {\n this.x -= value;\n this.y -= value;\n this.width += value * 2;\n this.height += value * 2;\n };\n BBox.prototype.containsPoint = function (x, y) {\n return x >= this.x && x <= (this.x + this.width)\n && y >= this.y && y <= (this.y + this.height);\n };\n BBox.prototype.render = function (ctx, params) {\n if (params === void 0) { params = BBox.noParams; }\n ctx.save();\n if (params.resetTransform) {\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n }\n ctx.strokeStyle = params.strokeStyle || 'cyan';\n ctx.lineWidth = params.lineWidth || 1;\n ctx.strokeRect(this.x, this.y, this.width, this.height);\n if (params.label) {\n ctx.fillStyle = params.fillStyle || 'black';\n ctx.textBaseline = 'bottom';\n ctx.fillText(params.label, this.x, this.y);\n }\n ctx.restore();\n };\n BBox.noParams = {};\n return BBox;\n}());\nexport { BBox };\n","var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { BBox } from \"./bbox\";\n/**\n * As of Jan 8, 2019, Firefox still doesn't implement\n * `getTransform(): DOMMatrix;`\n * `setTransform(transform?: DOMMatrix2DInit)`\n * in the `CanvasRenderingContext2D`.\n * Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=928150\n * IE11 and Edge 44 also don't have the support.\n * Thus this class, to keep track of the current transform and\n * combine transformations.\n * Standards:\n * https://html.spec.whatwg.org/dev/canvas.html\n * https://www.w3.org/TR/geometry-1/\n */\nvar Matrix = /** @class */ (function () {\n function Matrix(elements) {\n if (elements === void 0) { elements = [1, 0, 0, 1, 0, 0]; }\n this.elements = elements;\n }\n Matrix.prototype.setElements = function (elements) {\n var e = this.elements;\n // `this.elements = elements.slice()` is 4-5 times slower\n // (in Chrome 71 and FF 64) than manually copying elements,\n // since slicing allocates new memory.\n // The performance of passing parameters individually\n // vs as an array is about the same in both browsers, so we\n // go with a single (array of elements) parameter, because\n // `setElements(elements)` and `setElements([a, b, c, d, e, f])`\n // calls give us roughly the same performance, versus\n // `setElements(...elements)` and `setElements(a, b, c, d, e, f)`,\n // where the spread operator causes a 20-30x performance drop\n // (30x when compiled to ES5's `.apply(this, elements)`\n // 20x when used natively).\n e[0] = elements[0];\n e[1] = elements[1];\n e[2] = elements[2];\n e[3] = elements[3];\n e[4] = elements[4];\n e[5] = elements[5];\n return this;\n };\n Matrix.prototype.setIdentityElements = function () {\n var e = this.elements;\n e[0] = 1;\n e[1] = 0;\n e[2] = 0;\n e[3] = 1;\n e[4] = 0;\n e[5] = 0;\n return this;\n };\n Object.defineProperty(Matrix.prototype, \"identity\", {\n get: function () {\n var e = this.elements;\n return e[0] === 1 && e[1] === 0 && e[2] === 0 &&\n e[3] === 1 && e[4] === 0 && e[5] === 0;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Matrix.prototype, \"a\", {\n get: function () {\n return this.elements[0];\n },\n set: function (value) {\n this.elements[0] = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Matrix.prototype, \"b\", {\n get: function () {\n return this.elements[1];\n },\n set: function (value) {\n this.elements[1] = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Matrix.prototype, \"c\", {\n get: function () {\n return this.elements[2];\n },\n set: function (value) {\n this.elements[2] = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Matrix.prototype, \"d\", {\n get: function () {\n return this.elements[3];\n },\n set: function (value) {\n this.elements[3] = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Matrix.prototype, \"e\", {\n get: function () {\n return this.elements[4];\n },\n set: function (value) {\n this.elements[4] = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Matrix.prototype, \"f\", {\n get: function () {\n return this.elements[5];\n },\n set: function (value) {\n this.elements[5] = value;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Performs the AxB matrix multiplication and saves the result\n * to `C`, if given, or to `A` otherwise.\n */\n Matrix.prototype.AxB = function (A, B, C) {\n var _a = __read(A, 6), m11 = _a[0], m12 = _a[1], m21 = _a[2], m22 = _a[3], m31 = _a[4], m32 = _a[5];\n var _b = __read(B, 6), o11 = _b[0], o12 = _b[1], o21 = _b[2], o22 = _b[3], o31 = _b[4], o32 = _b[5];\n C = C || A;\n C[0] = m11 * o11 + m21 * o12;\n C[1] = m12 * o11 + m22 * o12;\n C[2] = m11 * o21 + m21 * o22;\n C[3] = m12 * o21 + m22 * o22;\n C[4] = m11 * o31 + m21 * o32 + m31;\n C[5] = m12 * o31 + m22 * o32 + m32;\n };\n /**\n * The `other` matrix gets post-multiplied to the current matrix.\n * Returns the current matrix.\n * @param other\n */\n Matrix.prototype.multiplySelf = function (other) {\n this.AxB(this.elements, other.elements);\n return this;\n };\n /**\n * The `other` matrix gets post-multiplied to the current matrix.\n * Returns a new matrix.\n * @param other\n */\n Matrix.prototype.multiply = function (other) {\n var elements = new Array(6);\n this.AxB(this.elements, other.elements, elements);\n return new Matrix(elements);\n };\n Matrix.prototype.preMultiplySelf = function (other) {\n this.AxB(other.elements, this.elements, this.elements);\n return this;\n };\n /**\n * Returns the inverse of this matrix as a new matrix.\n */\n Matrix.prototype.inverse = function () {\n var _a = __read(this.elements, 6), a = _a[0], b = _a[1], c = _a[2], d = _a[3], e = _a[4], f = _a[5];\n var rD = 1 / (a * d - b * c); // reciprocal of determinant\n a *= rD;\n b *= rD;\n c *= rD;\n d *= rD;\n return new Matrix([d, -b, -c, a, c * f - d * e, b * e - a * f]);\n };\n /**\n * Save the inverse of this matrix to the given matrix.\n */\n Matrix.prototype.inverseTo = function (other) {\n var _a = __read(this.elements, 6), a = _a[0], b = _a[1], c = _a[2], d = _a[3], e = _a[4], f = _a[5];\n var rD = 1 / (a * d - b * c); // reciprocal of determinant\n a *= rD;\n b *= rD;\n c *= rD;\n d *= rD;\n other.setElements([d, -b, -c, a, c * f - d * e, b * e - a * f]);\n return this;\n };\n Matrix.prototype.invertSelf = function () {\n var elements = this.elements;\n var _a = __read(elements, 6), a = _a[0], b = _a[1], c = _a[2], d = _a[3], e = _a[4], f = _a[5];\n var rD = 1 / (a * d - b * c); // reciprocal of determinant\n a *= rD;\n b *= rD;\n c *= rD;\n d *= rD;\n elements[0] = d;\n elements[1] = -b;\n elements[2] = -c;\n elements[3] = a;\n elements[4] = c * f - d * e;\n elements[5] = b * e - a * f;\n return this;\n };\n Matrix.prototype.clone = function () {\n return new Matrix(this.elements.slice());\n };\n Matrix.prototype.transformPoint = function (x, y) {\n var e = this.elements;\n return {\n x: x * e[0] + y * e[2] + e[4],\n y: x * e[1] + y * e[3] + e[5]\n };\n };\n Matrix.prototype.transformBBox = function (bbox, radius, target) {\n if (radius === void 0) { radius = 0; }\n var elements = this.elements;\n var xx = elements[0];\n var xy = elements[1];\n var yx = elements[2];\n var yy = elements[3];\n var h_w = bbox.width * 0.5;\n var h_h = bbox.height * 0.5;\n var cx = bbox.x + h_w;\n var cy = bbox.y + h_h;\n var w, h;\n if (radius) {\n h_w -= radius;\n h_h -= radius;\n var sx = Math.sqrt(xx * xx + yx * yx);\n var sy = Math.sqrt(xy * xy + yy * yy);\n w = Math.abs(h_w * xx) + Math.abs(h_h * yx) + Math.abs(sx * radius);\n h = Math.abs(h_w * xy) + Math.abs(h_h * yy) + Math.abs(sy * radius);\n }\n else {\n w = Math.abs(h_w * xx) + Math.abs(h_h * yx);\n h = Math.abs(h_w * xy) + Math.abs(h_h * yy);\n }\n if (!target) {\n target = new BBox(0, 0, 0, 0);\n }\n target.x = cx * xx + cy * yx + elements[4] - w;\n target.y = cx * xy + cy * yy + elements[5] - h;\n target.width = w + w;\n target.height = h + h;\n return target;\n };\n Matrix.prototype.toContext = function (ctx) {\n // It's fair to say that matrix multiplications are not cheap.\n // However, updating path definitions on every frame isn't either, so\n // it may be cheaper to just translate paths. It's also fair to\n // say, that most paths will have to be re-rendered anyway, say\n // rectangle paths in a bar chart, where an animation would happen when\n // the data set changes and existing bars are morphed into new ones.\n // Or a pie chart, where old sectors are also morphed into new ones.\n // Same for the line chart. The only plausible case where translating\n // existing paths would be enough, is the scatter chart, where marker\n // icons, typically circles, stay the same size. But if circle radii\n // are bound to some data points, even circle paths would have to be\n // updated. And thus it makes sense to optimize for fewer matrix\n // transforms, where transform matrices of paths are mostly identity\n // matrices and `x`/`y`, `centerX`/`centerY` and similar properties\n // are used to define a path at specific coordinates. And only groups\n // are used to collectively apply a transform to a set of nodes.\n // If the matrix is mostly identity (95% of the time),\n // the `if (this.isIdentity)` check can make this call 3-4 times\n // faster on average: https://jsperf.com/matrix-check-first-vs-always-set\n if (this.identity) {\n return;\n }\n var e = this.elements;\n ctx.transform(e[0], e[1], e[2], e[3], e[4], e[5]);\n };\n Matrix.flyweight = function (elements) {\n if (elements) {\n if (elements instanceof Matrix) {\n Matrix.matrix.setElements(elements.elements);\n }\n else {\n Matrix.matrix.setElements(elements);\n }\n }\n else {\n Matrix.matrix.setIdentityElements();\n }\n return Matrix.matrix;\n };\n Matrix.matrix = new Matrix();\n return Matrix;\n}());\nexport { Matrix };\n","export function createId(instance) {\n var constructor = instance.constructor;\n var className = constructor.className;\n if (!className) {\n throw new Error(\"The \" + constructor + \" is missing the 'className' property.\");\n }\n return className + '-' + (constructor.id = (constructor.id || 0) + 1);\n}\n","var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { Matrix } from \"./matrix\";\nimport { createId } from \"../util/id\";\nexport var PointerEvents;\n(function (PointerEvents) {\n PointerEvents[PointerEvents[\"All\"] = 0] = \"All\";\n PointerEvents[PointerEvents[\"None\"] = 1] = \"None\";\n})(PointerEvents || (PointerEvents = {}));\n/**\n * Abstract scene graph node.\n * Each node can have zero or one parent and belong to zero or one scene.\n */\nvar Node = /** @class */ (function () {\n function Node() {\n /**\n * Unique node ID in the form `ClassName-NaturalNumber`.\n */\n this.id = createId(this);\n /**\n * Some number to identify this node, typically within a `Group` node.\n * Usually this will be some enum value used as a selector.\n */\n this.tag = NaN;\n /**\n * To simplify the type system (especially in Selections) we don't have the `Parent` node\n * (one that has children). Instead, we mimic HTML DOM, where any node can have children.\n * But we still need to distinguish regular leaf nodes from container leafs somehow.\n */\n this.isContainerNode = false;\n this._children = [];\n // Used to check for duplicate nodes.\n this.childSet = {}; // new Set()\n // These matrices may need to have package level visibility\n // for performance optimization purposes.\n this.matrix = new Matrix();\n this.inverseMatrix = new Matrix();\n this._dirtyTransform = false;\n this._scalingX = 1;\n this._scalingY = 1;\n /**\n * The center of scaling.\n * The default value of `null` means the scaling center will be\n * determined automatically, as the center of the bounding box\n * of a node.\n */\n this._scalingCenterX = null;\n this._scalingCenterY = null;\n this._rotationCenterX = null;\n this._rotationCenterY = null;\n /**\n * Rotation angle in radians.\n * The value is set as is. No normalization to the [-180, 180) or [0, 360)\n * interval is performed.\n */\n this._rotation = 0;\n this._translationX = 0;\n this._translationY = 0;\n /**\n * Each time a property of the node that effects how it renders changes\n * the `dirty` property of the node should be set to `true`. The change\n * to the `dirty` property of the node will propagate up to its parents\n * and eventually to the scene, at which point an animation frame callback\n * will be scheduled to rerender the scene and its nodes and reset the `dirty`\n * flags of all nodes and the {@link Scene._dirty | Scene} back to `false`.\n * Since changes to node properties are not rendered immediately, it's possible\n * to change as many properties on as many nodes as needed and the rendering\n * will still only happen once in the next animation frame callback.\n * The animation frame callback is only scheduled if it hasn't been already.\n */\n this._dirty = true;\n this._visible = true;\n this.dirtyZIndex = false;\n this._zIndex = 0;\n this.pointerEvents = PointerEvents.All;\n }\n /**\n * This is meaningfully faster than `instanceof` and should be the preferred way\n * of checking inside loops.\n * @param node\n */\n Node.isNode = function (node) {\n return node ? node.matrix !== undefined : false;\n };\n Node.prototype._setScene = function (value) {\n this._scene = value;\n var children = this.children;\n var n = children.length;\n for (var i = 0; i < n; i++) {\n children[i]._setScene(value);\n }\n };\n Object.defineProperty(Node.prototype, \"scene\", {\n get: function () {\n return this._scene;\n },\n enumerable: true,\n configurable: true\n });\n Node.prototype._setParent = function (value) {\n this._parent = value;\n };\n Object.defineProperty(Node.prototype, \"parent\", {\n get: function () {\n return this._parent;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Node.prototype, \"children\", {\n get: function () {\n return this._children;\n },\n enumerable: true,\n configurable: true\n });\n Node.prototype.countChildren = function (depth) {\n if (depth === void 0) { depth = Node.MAX_SAFE_INTEGER; }\n if (depth <= 0) {\n return 0;\n }\n var children = this.children;\n var n = children.length;\n var size = n;\n for (var i = 0; i < n; i++) {\n size += children[i].countChildren(depth - 1);\n }\n return size;\n };\n /**\n * Appends one or more new node instances to this parent.\n * If one needs to:\n * - move a child to the end of the list of children\n * - move a child from one parent to another (including parents in other scenes)\n * one should use the {@link insertBefore} method instead.\n * @param nodes A node or nodes to append.\n */\n Node.prototype.append = function (nodes) {\n // Passing a single parameter to an open-ended version of `append`\n // would be 30-35% slower than this.\n if (Node.isNode(nodes)) {\n nodes = [nodes];\n }\n // The function takes an array rather than having open-ended\n // arguments like `...nodes: Node[]` because the latter is\n // transpiled to a function where the `arguments` object\n // is copied to a temporary array inside a loop.\n // So an array is created either way. And if we already have\n // an array of nodes we want to add, we have to use the prohibitively\n // expensive spread operator to pass it to the function,\n // and, on top of that, the copy of the `arguments` is still made.\n var n = nodes.length;\n for (var i = 0; i < n; i++) {\n var node = nodes[i];\n if (node.parent) {\n throw new Error(node + \" already belongs to another parent: \" + node.parent + \".\");\n }\n if (node.scene) {\n throw new Error(node + \" already belongs a scene: \" + node.scene + \".\");\n }\n if (this.childSet[node.id]) {\n // Cast to `any` to avoid `Property 'name' does not exist on type 'Function'`.\n throw new Error(\"Duplicate \" + node.constructor.name + \" node: \" + node);\n }\n this._children.push(node);\n this.childSet[node.id] = true;\n node._setParent(this);\n node._setScene(this.scene);\n }\n this.dirty = true;\n };\n Node.prototype.appendChild = function (node) {\n if (node.parent) {\n throw new Error(node + \" already belongs to another parent: \" + node.parent + \".\");\n }\n if (node.scene) {\n throw new Error(node + \" already belongs to a scene: \" + node.scene + \".\");\n }\n if (this.childSet[node.id]) {\n // Cast to `any` to avoid `Property 'name' does not exist on type 'Function'`.\n throw new Error(\"Duplicate \" + node.constructor.name + \" node: \" + node);\n }\n this._children.push(node);\n this.childSet[node.id] = true;\n node._setParent(this);\n node._setScene(this.scene);\n this.dirty = true;\n return node;\n };\n Node.prototype.removeChild = function (node) {\n if (node.parent === this) {\n var i = this.children.indexOf(node);\n if (i >= 0) {\n this._children.splice(i, 1);\n delete this.childSet[node.id];\n node._setParent();\n node._setScene();\n this.dirty = true;\n return node;\n }\n }\n throw new Error(\"The node to be removed is not a child of this node.\");\n };\n /**\n * Inserts the node `node` before the existing child node `nextNode`.\n * If `nextNode` is null, insert `node` at the end of the list of children.\n * If the `node` belongs to another parent, it is first removed.\n * Returns the `node`.\n * @param node\n * @param nextNode\n */\n Node.prototype.insertBefore = function (node, nextNode) {\n var parent = node.parent;\n if (node.parent) {\n node.parent.removeChild(node);\n }\n if (nextNode && nextNode.parent === this) {\n var i = this.children.indexOf(nextNode);\n if (i >= 0) {\n this._children.splice(i, 0, node);\n this.childSet[node.id] = true;\n node._setParent(this);\n node._setScene(this.scene);\n }\n else {\n throw new Error(nextNode + \" has \" + parent + \" as the parent, \"\n + \"but is not in its list of children.\");\n }\n this.dirty = true;\n }\n else {\n this.append(node);\n }\n return node;\n };\n Object.defineProperty(Node.prototype, \"nextSibling\", {\n get: function () {\n var parent = this.parent;\n if (parent) {\n var children = parent.children;\n var index = children.indexOf(this);\n if (index >= 0 && index <= children.length - 1) {\n return children[index + 1];\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Node.prototype.transformPoint = function (x, y) {\n var matrix = Matrix.flyweight(this.matrix);\n var parent = this.parent;\n while (parent) {\n matrix.preMultiplySelf(parent.matrix);\n parent = parent.parent;\n }\n return matrix.invertSelf().transformPoint(x, y);\n };\n Node.prototype.inverseTransformPoint = function (x, y) {\n var matrix = Matrix.flyweight(this.matrix);\n var parent = this.parent;\n while (parent) {\n matrix.preMultiplySelf(parent.matrix);\n parent = parent.parent;\n }\n return matrix.transformPoint(x, y);\n };\n Object.defineProperty(Node.prototype, \"dirtyTransform\", {\n get: function () {\n return this._dirtyTransform;\n },\n set: function (value) {\n this._dirtyTransform = value;\n if (value) {\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Node.prototype, \"scalingX\", {\n get: function () {\n return this._scalingX;\n },\n set: function (value) {\n if (this._scalingX !== value) {\n this._scalingX = value;\n this.dirtyTransform = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Node.prototype, \"scalingY\", {\n get: function () {\n return this._scalingY;\n },\n set: function (value) {\n if (this._scalingY !== value) {\n this._scalingY = value;\n this.dirtyTransform = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Node.prototype, \"scalingCenterX\", {\n get: function () {\n return this._scalingCenterX;\n },\n set: function (value) {\n if (this._scalingCenterX !== value) {\n this._scalingCenterX = value;\n this.dirtyTransform = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Node.prototype, \"scalingCenterY\", {\n get: function () {\n return this._scalingCenterY;\n },\n set: function (value) {\n if (this._scalingCenterY !== value) {\n this._scalingCenterY = value;\n this.dirtyTransform = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Node.prototype, \"rotationCenterX\", {\n get: function () {\n return this._rotationCenterX;\n },\n set: function (value) {\n if (this._rotationCenterX !== value) {\n this._rotationCenterX = value;\n this.dirtyTransform = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Node.prototype, \"rotationCenterY\", {\n get: function () {\n return this._rotationCenterY;\n },\n set: function (value) {\n if (this._rotationCenterY !== value) {\n this._rotationCenterY = value;\n this.dirtyTransform = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Node.prototype, \"rotation\", {\n get: function () {\n return this._rotation;\n },\n set: function (value) {\n if (this._rotation !== value) {\n this._rotation = value;\n this.dirtyTransform = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Node.prototype, \"rotationDeg\", {\n get: function () {\n return this.rotation / Math.PI * 180;\n },\n /**\n * For performance reasons the rotation angle's internal representation\n * is in radians. Therefore, don't expect to get the same number you set.\n * Even with integer angles about a quarter of them from 0 to 359 cannot\n * be converted to radians and back without precision loss.\n * For example:\n *\n * node.rotationDeg = 11;\n * console.log(node.rotationDeg); // 10.999999999999998\n *\n * @param value Rotation angle in degrees.\n */\n set: function (value) {\n this.rotation = value / 180 * Math.PI;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Node.prototype, \"translationX\", {\n get: function () {\n return this._translationX;\n },\n set: function (value) {\n if (this._translationX !== value) {\n this._translationX = value;\n this.dirtyTransform = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Node.prototype, \"translationY\", {\n get: function () {\n return this._translationY;\n },\n set: function (value) {\n if (this._translationY !== value) {\n this._translationY = value;\n this.dirtyTransform = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Node.prototype.containsPoint = function (x, y) {\n return false;\n };\n /**\n * Hit testing method.\n * Recursively checks if the given point is inside this node or any of its children.\n * Returns the first matching node or `undefined`.\n * Nodes that render later (show on top) are hit tested first.\n * @param x\n * @param y\n */\n Node.prototype.pickNode = function (x, y) {\n if (!this.visible || this.pointerEvents === PointerEvents.None || !this.containsPoint(x, y)) {\n return;\n }\n var children = this.children;\n if (children.length) {\n // Nodes added later should be hit-tested first,\n // as they are rendered on top of the previously added nodes.\n for (var i = children.length - 1; i >= 0; i--) {\n var hit = children[i].pickNode(x, y);\n if (hit) {\n return hit;\n }\n }\n }\n else if (!this.isContainerNode) { // a leaf node, but not a container leaf\n return this;\n }\n };\n Node.prototype.computeBBox = function () { return; };\n Node.prototype.computeBBoxCenter = function () {\n var bbox = this.computeBBox && this.computeBBox();\n if (bbox) {\n return [\n bbox.x + bbox.width * 0.5,\n bbox.y + bbox.height * 0.5\n ];\n }\n return [0, 0];\n };\n Node.prototype.computeTransformMatrix = function () {\n // TODO: transforms without center of scaling and rotation correspond directly\n // to `setAttribute('transform', 'translate(tx, ty) rotate(rDeg) scale(sx, sy)')`\n // in SVG. Our use cases will mostly require positioning elements (rects, circles)\n // within a group, rotating groups at right angles (e.g. for axis) and translating\n // groups. We shouldn't even need `scale(1, -1)` (invert vertically), since this\n // can be done using D3-like scales already by inverting the output range.\n // So for now, just assume that centers of scaling and rotation are at the origin.\n // const [bbcx, bbcy] = this.computeBBoxCenter();\n var _a = __read([0, 0], 2), bbcx = _a[0], bbcy = _a[1];\n var sx = this.scalingX;\n var sy = this.scalingY;\n var scx;\n var scy;\n if (sx === 1 && sy === 1) {\n scx = 0;\n scy = 0;\n }\n else {\n scx = this.scalingCenterX === null ? bbcx : this.scalingCenterX;\n scy = this.scalingCenterY === null ? bbcy : this.scalingCenterY;\n }\n var r = this.rotation;\n var cos = Math.cos(r);\n var sin = Math.sin(r);\n var rcx;\n var rcy;\n if (r === 0) {\n rcx = 0;\n rcy = 0;\n }\n else {\n rcx = this.rotationCenterX === null ? bbcx : this.rotationCenterX;\n rcy = this.rotationCenterY === null ? bbcy : this.rotationCenterY;\n }\n var tx = this.translationX;\n var ty = this.translationY;\n // The transform matrix `M` is a result of the following transformations:\n // 1) translate the center of scaling to the origin\n // 2) scale\n // 3) translate back\n // 4) translate the center of rotation to the origin\n // 5) rotate\n // 6) translate back\n // 7) translate\n // (7) (6) (5) (4) (3) (2) (1)\n // | 1 0 tx | | 1 0 rcx | | cos -sin 0 | | 1 0 -rcx | | 1 0 scx | | sx 0 0 | | 1 0 -scx |\n // M = | 0 1 ty | * | 0 1 rcy | * | sin cos 0 | * | 0 1 -rcy | * | 0 1 scy | * | 0 sy 0 | * | 0 1 -scy |\n // | 0 0 1 | | 0 0 1 | | 0 0 1 | | 0 0 1 | | 0 0 1 | | 0 0 0 | | 0 0 1 |\n // Translation after steps 1-4 above:\n var tx4 = scx * (1 - sx) - rcx;\n var ty4 = scy * (1 - sy) - rcy;\n this.dirtyTransform = false;\n this.matrix.setElements([\n cos * sx, sin * sx,\n -sin * sy, cos * sy,\n cos * tx4 - sin * ty4 + rcx + tx,\n sin * tx4 + cos * ty4 + rcy + ty\n ]).inverseTo(this.inverseMatrix);\n };\n Object.defineProperty(Node.prototype, \"dirty\", {\n get: function () {\n return this._dirty;\n },\n set: function (value) {\n // TODO: check if we are already dirty (e.g. if (this._dirty !== value))\n // if we are, then all parents and the scene have been\n // notified already, and we are doing redundant work\n // (but test if this is indeed the case)\n this._dirty = value;\n if (value) {\n if (this.parent) {\n this.parent.dirty = true;\n }\n else if (this.scene) {\n this.scene.dirty = true;\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Node.prototype, \"visible\", {\n get: function () {\n return this._visible;\n },\n set: function (value) {\n if (this._visible !== value) {\n this._visible = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Node.prototype, \"zIndex\", {\n get: function () {\n return this._zIndex;\n },\n set: function (value) {\n if (this._zIndex !== value) {\n this._zIndex = value;\n if (this.parent) {\n this.parent.dirtyZIndex = true;\n }\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Node.MAX_SAFE_INTEGER = Math.pow(2, 53) - 1; // Number.MAX_SAFE_INTEGER\n return Node;\n}());\nexport { Node };\n","/**\n * Creates a new object with a `parent` as its prototype\n * and copies properties from the `child` into it.\n * @param parent\n * @param child\n */\nexport function chainObjects(parent, child) {\n var obj = Object.create(parent);\n for (var prop in child) {\n if (child.hasOwnProperty(prop)) {\n obj[prop] = child[prop];\n }\n }\n return obj;\n}\nexport function getValue(object, path, defaultValue) {\n var parts = Array.isArray(path) ? path : path.split('.');\n var value = object;\n try {\n parts.forEach(function (part) {\n value = value[part];\n });\n }\n catch (e) {\n if (arguments.length === 3) {\n value = defaultValue;\n }\n else {\n throw e;\n }\n }\n return value;\n}\nfunction emptyTarget(value) {\n return Array.isArray(value) ? [] : {};\n}\nexport function cloneUnlessOtherwiseSpecified(value, options) {\n return (options.clone !== false && options.isMergeableObject(value))\n ? deepMerge(emptyTarget(value), value, options)\n : value;\n}\nexport function defaultArrayMerge(target, source, options) {\n return target.concat(source).map(function (element) {\n return cloneUnlessOtherwiseSpecified(element, options);\n });\n}\nfunction getMergeFunction(key, options) {\n if (!options.customMerge) {\n return deepMerge;\n }\n var customMerge = options.customMerge(key);\n return typeof customMerge === 'function' ? customMerge : deepMerge;\n}\nfunction getEnumerableOwnPropertySymbols(target) {\n return Object.getOwnPropertySymbols\n ? Object.getOwnPropertySymbols(target).filter(function (symbol) {\n return target.propertyIsEnumerable(symbol);\n })\n : [];\n}\nfunction getKeys(target) {\n return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));\n}\nfunction propertyIsOnObject(object, property) {\n try {\n return property in object;\n }\n catch (_) {\n return false;\n }\n}\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n && !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n && Object.propertyIsEnumerable.call(target, key)); // and also unsafe if they're nonenumerable.\n}\nfunction mergeObject(target, source, options) {\n var destination = {};\n if (options.isMergeableObject(target)) {\n getKeys(target).forEach(function (key) {\n destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n });\n }\n getKeys(source).forEach(function (key) {\n if (propertyIsUnsafe(target, key)) {\n return;\n }\n if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n destination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n }\n else {\n destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n }\n });\n return destination;\n}\nexport function defaultIsMergeableObject(value) {\n return isNonNullObject(value) && !isSpecial(value);\n}\nfunction isNonNullObject(value) {\n return !!value && typeof value === 'object';\n}\nfunction isSpecial(value) {\n var stringValue = Object.prototype.toString.call(value);\n return stringValue === '[object RegExp]' || stringValue === '[object Date]';\n}\nexport function deepMerge(target, source, options) {\n options = options || {};\n options.arrayMerge = options.arrayMerge || defaultArrayMerge;\n options.isMergeableObject = options.isMergeableObject || defaultIsMergeableObject;\n // cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n // implementations can use it. The caller may not replace it.\n options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n var sourceIsArray = Array.isArray(source);\n var targetIsArray = Array.isArray(target);\n var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n if (!sourceAndTargetTypesMatch) {\n return cloneUnlessOtherwiseSpecified(source, options);\n }\n else if (sourceIsArray) {\n return options.arrayMerge(target, source, options);\n }\n else {\n return mergeObject(target, source, options);\n }\n}\nexport function isObject(value) {\n return typeof value === 'object' && !Array.isArray(value);\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Node } from \"../node\";\nimport { chainObjects } from \"../../util/object\";\nvar Shape = /** @class */ (function (_super) {\n __extends(Shape, _super);\n function Shape() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.lastInstanceId = 0;\n _this._fillOpacity = 1;\n _this._strokeOpacity = 1;\n _this._fill = Shape.defaultStyles.fill;\n /**\n * Note that `strokeStyle = null` means invisible stroke,\n * while `lineWidth = 0` means no stroke, and sometimes this can mean different things.\n * For example, a rect shape with an invisible stroke may not align to the pixel grid\n * properly because the stroke affects the rules of alignment, and arc shapes forming\n * a pie chart will have a gap between them if they have an invisible stroke, whereas\n * there would be not gap if there was no stroke at all.\n * The preferred way of making the stroke invisible is setting the `lineWidth` to zero,\n * unless specific looks that is achieved by having an invisible stroke is desired.\n */\n _this._stroke = Shape.defaultStyles.stroke;\n _this._strokeWidth = Shape.defaultStyles.strokeWidth;\n _this._lineDash = Shape.defaultStyles.lineDash;\n _this._lineDashOffset = Shape.defaultStyles.lineDashOffset;\n _this._lineCap = Shape.defaultStyles.lineCap;\n _this._lineJoin = Shape.defaultStyles.lineJoin;\n _this._opacity = Shape.defaultStyles.opacity;\n _this.onShadowChange = function () {\n _this.dirty = true;\n };\n _this._fillShadow = Shape.defaultStyles.fillShadow;\n _this._strokeShadow = Shape.defaultStyles.strokeShadow;\n return _this;\n }\n /**\n * Creates a light-weight instance of the given shape (that serves as a template).\n * The created instance only stores the properites set on the instance itself\n * and the rest of the properties come via the prototype chain from the template.\n * This can greatly reduce memory usage in cases where one has many simular shapes,\n * for example, circles of different size, position and color. The exact memory usage\n * reduction will depend on the size of the template and the number of own properties\n * set on its lightweight instances, but will typically be around an order of magnitude\n * or more.\n *\n * Note: template shapes are not supposed to be part of the scene graph (they should not\n * have a parent).\n *\n * @param template\n */\n Shape.createInstance = function (template) {\n var shape = Object.create(template);\n shape._setParent(undefined);\n shape.id = template.id + '-Instance-' + String(++template.lastInstanceId);\n return shape;\n };\n /**\n * Restores the default styles introduced by this subclass.\n */\n Shape.prototype.restoreOwnStyles = function () {\n var styles = this.constructor.defaultStyles;\n var keys = Object.getOwnPropertyNames(styles);\n // getOwnPropertyNames is about 2.5 times faster than\n // for..in with the hasOwnProperty check and in this\n // case, where most properties are inherited, can be\n // more then an order of magnitude faster.\n for (var i = 0, n = keys.length; i < n; i++) {\n var key = keys[i];\n this[key] = styles[key];\n }\n };\n Shape.prototype.restoreAllStyles = function () {\n var styles = this.constructor.defaultStyles;\n for (var property in styles) {\n this[property] = styles[property];\n }\n };\n /**\n * Restores the base class default styles that have been overridden by this subclass.\n */\n Shape.prototype.restoreOverriddenStyles = function () {\n var styles = this.constructor.defaultStyles;\n var protoStyles = Object.getPrototypeOf(styles);\n for (var property in styles) {\n if (styles.hasOwnProperty(property) && protoStyles.hasOwnProperty(property)) {\n this[property] = styles[property];\n }\n }\n };\n Object.defineProperty(Shape.prototype, \"fillOpacity\", {\n get: function () {\n return this._fillOpacity;\n },\n set: function (value) {\n if (this._fillOpacity !== value) {\n this._fillOpacity = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Shape.prototype, \"strokeOpacity\", {\n get: function () {\n return this._strokeOpacity;\n },\n set: function (value) {\n if (this._strokeOpacity !== value) {\n this._strokeOpacity = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Shape.prototype, \"fill\", {\n get: function () {\n return this._fill;\n },\n set: function (value) {\n if (this._fill !== value) {\n this._fill = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Shape.prototype, \"stroke\", {\n get: function () {\n return this._stroke;\n },\n set: function (value) {\n if (this._stroke !== value) {\n this._stroke = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Shape.prototype, \"strokeWidth\", {\n get: function () {\n return this._strokeWidth;\n },\n set: function (value) {\n if (this._strokeWidth !== value) {\n this._strokeWidth = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Shape.prototype, \"alignment\", {\n // An offset value to align to the pixel grid.\n get: function () {\n return Math.floor(this.strokeWidth) % 2 / 2;\n },\n enumerable: true,\n configurable: true\n });\n // Returns the aligned `start` or `length` value.\n // For example: `start` could be `y` and `length` could be `height` of a rectangle.\n Shape.prototype.align = function (alignment, start, length) {\n if (length != undefined) {\n return Math.floor(length) + Math.floor(start % 1 + length % 1);\n }\n return Math.floor(start) + alignment;\n };\n Object.defineProperty(Shape.prototype, \"lineDash\", {\n get: function () {\n return this._lineDash;\n },\n set: function (value) {\n var oldValue = this._lineDash;\n if (oldValue !== value) {\n if (oldValue && value && oldValue.length === value.length) {\n var identical = true;\n var n = value.length;\n for (var i = 0; i < n; i++) {\n if (oldValue[i] !== value[i]) {\n identical = false;\n break;\n }\n }\n if (identical) {\n return;\n }\n }\n this._lineDash = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Shape.prototype, \"lineDashOffset\", {\n get: function () {\n return this._lineDashOffset;\n },\n set: function (value) {\n if (this._lineDashOffset !== value) {\n this._lineDashOffset = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Shape.prototype, \"lineCap\", {\n get: function () {\n return this._lineCap;\n },\n set: function (value) {\n if (this._lineCap !== value) {\n this._lineCap = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Shape.prototype, \"lineJoin\", {\n get: function () {\n return this._lineJoin;\n },\n set: function (value) {\n if (this._lineJoin !== value) {\n this._lineJoin = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Shape.prototype, \"opacity\", {\n get: function () {\n return this._opacity;\n },\n set: function (value) {\n value = Math.min(1, Math.max(0, value));\n if (this._opacity !== value) {\n this._opacity = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Shape.prototype, \"fillShadow\", {\n get: function () {\n return this._fillShadow;\n },\n set: function (value) {\n var oldValue = this._fillShadow;\n if (oldValue !== value) {\n if (oldValue) {\n oldValue.removeEventListener('change', this.onShadowChange);\n }\n if (value) {\n value.addEventListener('change', this.onShadowChange);\n }\n this._fillShadow = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Shape.prototype, \"strokeShadow\", {\n get: function () {\n return this._strokeShadow;\n },\n set: function (value) {\n var oldValue = this._strokeShadow;\n if (oldValue !== value) {\n if (oldValue) {\n oldValue.removeEventListener('change', this.onShadowChange);\n }\n if (value) {\n value.addEventListener('change', this.onShadowChange);\n }\n this._strokeShadow = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Shape.prototype.fillStroke = function (ctx) {\n if (!this.scene) {\n return;\n }\n var pixelRatio = this.scene.canvas.pixelRatio || 1;\n var globalAlpha = ctx.globalAlpha;\n if (this.fill) {\n ctx.fillStyle = this.fill;\n ctx.globalAlpha = globalAlpha * this.opacity * this.fillOpacity;\n // The canvas context scaling (depends on the device's pixel ratio)\n // has no effect on shadows, so we have to account for the pixel ratio\n // manually here.\n var fillShadow = this.fillShadow;\n if (fillShadow && fillShadow.enabled) {\n ctx.shadowColor = fillShadow.color;\n ctx.shadowOffsetX = fillShadow.xOffset * pixelRatio;\n ctx.shadowOffsetY = fillShadow.yOffset * pixelRatio;\n ctx.shadowBlur = fillShadow.blur * pixelRatio;\n }\n ctx.fill();\n }\n ctx.shadowColor = 'rgba(0, 0, 0, 0)';\n if (this.stroke && this.strokeWidth) {\n ctx.strokeStyle = this.stroke;\n ctx.globalAlpha = globalAlpha * this.opacity * this.strokeOpacity;\n ctx.lineWidth = this.strokeWidth;\n if (this.lineDash) {\n ctx.setLineDash(this.lineDash);\n }\n if (this.lineDashOffset) {\n ctx.lineDashOffset = this.lineDashOffset;\n }\n if (this.lineCap) {\n ctx.lineCap = this.lineCap;\n }\n if (this.lineJoin) {\n ctx.lineJoin = this.lineJoin;\n }\n var strokeShadow = this.strokeShadow;\n if (strokeShadow && strokeShadow.enabled) {\n ctx.shadowColor = strokeShadow.color;\n ctx.shadowOffsetX = strokeShadow.xOffset * pixelRatio;\n ctx.shadowOffsetY = strokeShadow.yOffset * pixelRatio;\n ctx.shadowBlur = strokeShadow.blur * pixelRatio;\n }\n ctx.stroke();\n }\n };\n Shape.prototype.containsPoint = function (x, y) {\n return this.isPointInPath(x, y);\n };\n /**\n * Defaults for style properties. Note that properties that affect the position\n * and shape of the node are not considered style properties, for example:\n * `x`, `y`, `width`, `height`, `radius`, `rotation`, etc.\n * Can be used to reset to the original styling after some custom styling\n * has been applied (using the `restoreOwnStyles` and `restoreAllStyles` methods).\n * These static defaults are meant to be inherited by subclasses.\n */\n Shape.defaultStyles = chainObjects({}, {\n fill: 'black',\n stroke: undefined,\n strokeWidth: 0,\n lineDash: undefined,\n lineDashOffset: 0,\n lineCap: undefined,\n lineJoin: undefined,\n opacity: 1,\n fillShadow: undefined,\n strokeShadow: undefined\n });\n return Shape;\n}(Node));\nexport { Shape };\n","/**\n * Wraps the native Canvas element and overrides its CanvasRenderingContext2D to\n * provide resolution independent rendering based on `window.devicePixelRatio`.\n */\nvar HdpiCanvas = /** @class */ (function () {\n // The width/height attributes of the Canvas element default to\n // 300/150 according to w3.org.\n function HdpiCanvas(document, width, height) {\n if (document === void 0) { document = window.document; }\n if (width === void 0) { width = 600; }\n if (height === void 0) { height = 300; }\n this._container = undefined;\n // `NaN` is deliberate here, so that overrides are always applied\n // and the `resetTransform` inside the `resize` method works in IE11.\n this._pixelRatio = NaN;\n this._width = 0;\n this._height = 0;\n this.document = document;\n this.element = document.createElement('canvas');\n this.context = this.element.getContext('2d');\n this.element.style.userSelect = 'none';\n this.element.style.display = 'block';\n this.setPixelRatio();\n this.resize(width, height);\n }\n Object.defineProperty(HdpiCanvas.prototype, \"container\", {\n get: function () {\n return this._container;\n },\n set: function (value) {\n if (this._container !== value) {\n this.remove();\n if (value) {\n value.appendChild(this.element);\n }\n this._container = value;\n }\n },\n enumerable: true,\n configurable: true\n });\n HdpiCanvas.prototype.remove = function () {\n var parentNode = this.element.parentNode;\n if (parentNode != null) {\n parentNode.removeChild(this.element);\n }\n };\n HdpiCanvas.prototype.destroy = function () {\n this.element.remove();\n this._canvas = undefined;\n Object.freeze(this);\n };\n HdpiCanvas.prototype.toImage = function () {\n var img = this.document.createElement('img');\n img.src = this.getDataURL();\n return img;\n };\n HdpiCanvas.prototype.getDataURL = function (type) {\n return this.element.toDataURL(type);\n };\n /**\n * @param fileName The name of the file upon save. The `.png` extension is going to be added automatically.\n */\n HdpiCanvas.prototype.download = function (fileName) {\n fileName = ((fileName || '').trim() || 'image') + '.png';\n // Chart images saved as JPEG are a few times larger at 50% quality than PNG images,\n // so we don't support saving to JPEG.\n var type = 'image/png';\n var dataUrl = this.getDataURL(type);\n var document = this.document;\n var a = document.createElement('a');\n a.href = dataUrl;\n a.download = fileName;\n a.style.display = 'none';\n document.body.appendChild(a); // required for the `click` to work in Firefox\n a.click();\n document.body.removeChild(a);\n };\n Object.defineProperty(HdpiCanvas.prototype, \"pixelRatio\", {\n get: function () {\n return this._pixelRatio;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Changes the pixel ratio of the Canvas element to the given value,\n * or uses the window.devicePixelRatio (default), then resizes the Canvas\n * element accordingly (default).\n */\n HdpiCanvas.prototype.setPixelRatio = function (ratio) {\n var pixelRatio = ratio || window.devicePixelRatio;\n if (pixelRatio === this.pixelRatio) {\n return;\n }\n HdpiCanvas.overrideScale(this.context, pixelRatio);\n this._pixelRatio = pixelRatio;\n this.resize(this.width, this.height);\n };\n Object.defineProperty(HdpiCanvas.prototype, \"pixelated\", {\n get: function () {\n return this.element.style.imageRendering === 'pixelated';\n },\n set: function (value) {\n this.element.style.imageRendering = value ? 'pixelated' : 'auto';\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(HdpiCanvas.prototype, \"width\", {\n get: function () {\n return this._width;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(HdpiCanvas.prototype, \"height\", {\n get: function () {\n return this._height;\n },\n enumerable: true,\n configurable: true\n });\n HdpiCanvas.prototype.resize = function (width, height) {\n if (!(width > 0 && height > 0)) {\n return;\n }\n var _a = this, element = _a.element, context = _a.context, pixelRatio = _a.pixelRatio;\n element.width = Math.round(width * pixelRatio);\n element.height = Math.round(height * pixelRatio);\n element.style.width = width + 'px';\n element.style.height = height + 'px';\n context.resetTransform();\n this._width = width;\n this._height = height;\n };\n Object.defineProperty(HdpiCanvas, \"textMeasuringContext\", {\n get: function () {\n if (this._textMeasuringContext) {\n return this._textMeasuringContext;\n }\n var canvas = document.createElement('canvas');\n return this._textMeasuringContext = canvas.getContext('2d');\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(HdpiCanvas, \"svgText\", {\n get: function () {\n if (this._svgText) {\n return this._svgText;\n }\n var xmlns = 'http://www.w3.org/2000/svg';\n var svg = document.createElementNS(xmlns, 'svg');\n svg.setAttribute('width', '100');\n svg.setAttribute('height', '100');\n // Add a descriptive class name in case someone sees this SVG element\n // in devtools and wonders about its purpose:\n if (svg.classList) {\n svg.classList.add('text-measuring-svg');\n }\n else {\n svg.setAttribute('class', 'text-measuring-svg');\n }\n svg.style.position = 'absolute';\n svg.style.top = '-1000px';\n svg.style.visibility = 'hidden';\n var svgText = document.createElementNS(xmlns, 'text');\n svgText.setAttribute('x', '0');\n svgText.setAttribute('y', '30');\n svgText.setAttribute('text', 'black');\n svg.appendChild(svgText);\n document.body.appendChild(svg);\n this._svgText = svgText;\n return svgText;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(HdpiCanvas, \"has\", {\n get: function () {\n if (this._has) {\n return this._has;\n }\n var isChrome = navigator.userAgent.indexOf('Chrome') > -1;\n var isFirefox = navigator.userAgent.indexOf('Firefox') > -1;\n var isSafari = !isChrome && navigator.userAgent.indexOf('Safari') > -1;\n return this._has = Object.freeze({\n textMetrics: this.textMeasuringContext.measureText('test').actualBoundingBoxDescent !== undefined\n // Firefox implemented advanced TextMetrics object in v74:\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1102584\n // but it's buggy, so we'll keed using the SVG for text measurement in Firefox for now.\n && !isFirefox && !isSafari,\n getTransform: this.textMeasuringContext.getTransform !== undefined\n });\n },\n enumerable: true,\n configurable: true\n });\n HdpiCanvas.measureText = function (text, font, textBaseline, textAlign) {\n var ctx = this.textMeasuringContext;\n ctx.font = font;\n ctx.textBaseline = textBaseline;\n ctx.textAlign = textAlign;\n return ctx.measureText(text);\n };\n /**\n * Returns the width and height of the measured text.\n * @param text The single-line text to measure.\n * @param font The font shorthand string.\n */\n HdpiCanvas.getTextSize = function (text, font) {\n if (this.has.textMetrics) {\n var ctx = this.textMeasuringContext;\n ctx.font = font;\n var metrics = ctx.measureText(text);\n return {\n width: metrics.width,\n height: metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent\n };\n }\n else {\n return this.measureSvgText(text, font);\n }\n };\n HdpiCanvas.measureSvgText = function (text, font) {\n var cache = this.textSizeCache;\n var fontCache = cache[font];\n // Note: consider not caching the size of numeric strings.\n // For example: if (isNaN(+text)) { // skip\n if (fontCache) {\n var size_1 = fontCache[text];\n if (size_1) {\n return size_1;\n }\n }\n else {\n cache[font] = {};\n }\n var svgText = this.svgText;\n svgText.style.font = font;\n svgText.textContent = text;\n // `getBBox` returns an instance of `SVGRect` with the same `width` and `height`\n // measurements as `DOMRect` instance returned by the `getBoundingClientRect`.\n // But the `SVGRect` instance has half the properties of the `DOMRect`,\n // so we use the `getBBox` method.\n var bbox = svgText.getBBox();\n var size = {\n width: bbox.width,\n height: bbox.height\n };\n cache[font][text] = size;\n return size;\n };\n HdpiCanvas.overrideScale = function (ctx, scale) {\n var depth = 0;\n var overrides = {\n save: function () {\n this.$save();\n depth++;\n },\n restore: function () {\n if (depth > 0) {\n this.$restore();\n depth--;\n }\n },\n setTransform: function (a, b, c, d, e, f) {\n this.$setTransform(a * scale, b * scale, c * scale, d * scale, e * scale, f * scale);\n },\n resetTransform: function () {\n // As of Jan 8, 2019, `resetTransform` is still an \"experimental technology\",\n // and doesn't work in IE11 and Edge 44.\n this.$setTransform(scale, 0, 0, scale, 0, 0);\n this.save();\n depth = 0;\n // The scale above will be impossible to restore,\n // because we override the `ctx.restore` above and\n // check `depth` there.\n }\n };\n for (var name_1 in overrides) {\n if (overrides.hasOwnProperty(name_1)) {\n // Save native methods under prefixed names,\n // if this hasn't been done by the previous overrides already.\n if (!ctx['$' + name_1]) {\n ctx['$' + name_1] = ctx[name_1];\n }\n // Replace native methods with overrides,\n // or previous overrides with the new ones.\n ctx[name_1] = overrides[name_1];\n }\n }\n };\n HdpiCanvas.textSizeCache = {};\n return HdpiCanvas;\n}());\nexport { HdpiCanvas };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Shape } from \"./shape\";\nimport { chainObjects } from \"../../util/object\";\nimport { BBox } from \"../bbox\";\nimport { HdpiCanvas } from \"../../canvas/hdpiCanvas\";\nvar Text = /** @class */ (function (_super) {\n __extends(Text, _super);\n function Text() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._x = 0;\n _this._y = 0;\n _this.lineBreakRegex = /\\r?\\n/g;\n _this.lines = [];\n _this._text = '';\n _this._dirtyFont = true;\n _this._fontSize = 10;\n _this._fontFamily = 'sans-serif';\n _this._textAlign = Text.defaultStyles.textAlign;\n _this._textBaseline = Text.defaultStyles.textBaseline;\n _this._lineHeight = 14;\n return _this;\n }\n Object.defineProperty(Text.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (value) {\n if (this._x !== value) {\n this._x = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Text.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (value) {\n if (this._y !== value) {\n this._y = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Text.prototype.splitText = function () {\n this.lines = this._text.split(this.lineBreakRegex);\n };\n Object.defineProperty(Text.prototype, \"text\", {\n get: function () {\n return this._text;\n },\n set: function (value) {\n var str = String(value); // `value` can be an object here\n if (this._text !== str) {\n this._text = str;\n this.splitText();\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Text.prototype, \"font\", {\n get: function () {\n if (this.dirtyFont) {\n this.dirtyFont = false;\n this._font = getFont(this.fontSize, this.fontFamily, this.fontStyle, this.fontWeight);\n }\n return this._font;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Text.prototype, \"dirtyFont\", {\n get: function () {\n return this._dirtyFont;\n },\n set: function (value) {\n if (this._dirtyFont !== value) {\n this._dirtyFont = value;\n if (value) {\n this.dirty = true;\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Text.prototype, \"fontStyle\", {\n get: function () {\n return this._fontStyle;\n },\n set: function (value) {\n if (this._fontStyle !== value) {\n this._fontStyle = value;\n this.dirtyFont = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Text.prototype, \"fontWeight\", {\n get: function () {\n return this._fontWeight;\n },\n set: function (value) {\n if (this._fontWeight !== value) {\n this._fontWeight = value;\n this.dirtyFont = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Text.prototype, \"fontSize\", {\n get: function () {\n return this._fontSize;\n },\n set: function (value) {\n if (!isFinite(value)) {\n value = 10;\n }\n if (this._fontSize !== value) {\n this._fontSize = value;\n this.dirtyFont = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Text.prototype, \"fontFamily\", {\n get: function () {\n return this._fontFamily;\n },\n set: function (value) {\n if (this._fontFamily !== value) {\n this._fontFamily = value;\n this.dirtyFont = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Text.prototype, \"textAlign\", {\n get: function () {\n return this._textAlign;\n },\n set: function (value) {\n if (this._textAlign !== value) {\n this._textAlign = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Text.prototype, \"textBaseline\", {\n get: function () {\n return this._textBaseline;\n },\n set: function (value) {\n if (this._textBaseline !== value) {\n this._textBaseline = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Text.prototype, \"lineHeight\", {\n get: function () {\n return this._lineHeight;\n },\n set: function (value) {\n // Multi-line text is complicated because:\n // - Canvas does not support it natively, so we have to implement it manually\n // - need to know the height of each line -> need to parse the font shorthand ->\n // generally impossible to do because font size may not be in pixels\n // - so, need to measure the text instead, each line individually -> expensive\n // - or make the user provide the line height manually for multi-line text\n // - computeBBox should use the lineHeight for multi-line text but ignore it otherwise\n // - textBaseline kind of loses its meaning for multi-line text\n if (this._lineHeight !== value) {\n this._lineHeight = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Text.prototype.computeBBox = function () {\n return HdpiCanvas.has.textMetrics\n ? this.getPreciseBBox()\n : this.getApproximateBBox();\n };\n Text.prototype.getPreciseBBox = function () {\n var metrics = HdpiCanvas.measureText(this.text, this.font, this.textBaseline, this.textAlign);\n return new BBox(this.x - metrics.actualBoundingBoxLeft, this.y - metrics.actualBoundingBoxAscent, metrics.width, metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent);\n };\n Text.prototype.getApproximateBBox = function () {\n var size = HdpiCanvas.getTextSize(this.text, this.font);\n var _a = this, x = _a.x, y = _a.y;\n switch (this.textAlign) {\n case 'end':\n case 'right':\n x -= size.width;\n break;\n case 'center':\n x -= size.width / 2;\n }\n switch (this.textBaseline) {\n case 'alphabetic':\n y -= size.height * 0.7;\n break;\n case 'middle':\n y -= size.height * 0.45;\n break;\n case 'ideographic':\n y -= size.height;\n break;\n case 'hanging':\n y -= size.height * 0.2;\n break;\n case 'bottom':\n y -= size.height;\n break;\n }\n return new BBox(x, y, size.width, size.height);\n };\n Text.prototype.isPointInPath = function (x, y) {\n var point = this.transformPoint(x, y);\n var bbox = this.computeBBox();\n return bbox ? bbox.containsPoint(point.x, point.y) : false;\n };\n Text.prototype.isPointInStroke = function (x, y) {\n return false;\n };\n Text.prototype.render = function (ctx) {\n if (!this.lines.length || !this.scene) {\n return;\n }\n if (this.dirtyTransform) {\n this.computeTransformMatrix();\n }\n // this.matrix.transformBBox(this.computeBBox!()).render(ctx); // debug\n this.matrix.toContext(ctx);\n var _a = this, fill = _a.fill, stroke = _a.stroke, strokeWidth = _a.strokeWidth;\n ctx.font = this.font;\n ctx.textAlign = this.textAlign;\n ctx.textBaseline = this.textBaseline;\n var pixelRatio = this.scene.canvas.pixelRatio || 1;\n var globalAlpha = ctx.globalAlpha;\n if (fill) {\n ctx.fillStyle = fill;\n ctx.globalAlpha = globalAlpha * this.opacity * this.fillOpacity;\n var _b = this, fillShadow = _b.fillShadow, text = _b.text, x = _b.x, y = _b.y;\n if (fillShadow && fillShadow.enabled) {\n ctx.shadowColor = fillShadow.color;\n ctx.shadowOffsetX = fillShadow.xOffset * pixelRatio;\n ctx.shadowOffsetY = fillShadow.yOffset * pixelRatio;\n ctx.shadowBlur = fillShadow.blur * pixelRatio;\n }\n ctx.fillText(text, x, y);\n }\n if (stroke && strokeWidth) {\n ctx.strokeStyle = stroke;\n ctx.lineWidth = strokeWidth;\n ctx.globalAlpha = globalAlpha * this.opacity * this.strokeOpacity;\n var _c = this, lineDash = _c.lineDash, lineDashOffset = _c.lineDashOffset, lineCap = _c.lineCap, lineJoin = _c.lineJoin, strokeShadow = _c.strokeShadow, text = _c.text, x = _c.x, y = _c.y;\n if (lineDash) {\n ctx.setLineDash(lineDash);\n }\n if (lineDashOffset) {\n ctx.lineDashOffset = lineDashOffset;\n }\n if (lineCap) {\n ctx.lineCap = lineCap;\n }\n if (lineJoin) {\n ctx.lineJoin = lineJoin;\n }\n if (strokeShadow && strokeShadow.enabled) {\n ctx.shadowColor = strokeShadow.color;\n ctx.shadowOffsetX = strokeShadow.xOffset * pixelRatio;\n ctx.shadowOffsetY = strokeShadow.yOffset * pixelRatio;\n ctx.shadowBlur = strokeShadow.blur * pixelRatio;\n }\n ctx.strokeText(text, x, y);\n }\n this.dirty = false;\n };\n Text.className = 'Text';\n Text.defaultStyles = chainObjects(Shape.defaultStyles, {\n textAlign: 'start',\n fontStyle: undefined,\n fontWeight: undefined,\n fontSize: 10,\n fontFamily: 'sans-serif',\n textBaseline: 'alphabetic'\n });\n return Text;\n}(Shape));\nexport { Text };\nexport function getFont(fontSize, fontFamily, fontStyle, fontWeight) {\n return [\n fontStyle || '',\n fontWeight || '',\n fontSize + 'px',\n fontFamily\n ].join(' ').trim();\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Padding } from \"./util/padding\";\nimport { Text } from \"./scene/shape/text\";\nimport { PointerEvents } from \"./scene/node\";\nimport { Observable, reactive } from \"./util/observable\";\nvar Caption = /** @class */ (function (_super) {\n __extends(Caption, _super);\n function Caption() {\n var _this = _super.call(this) || this;\n _this.node = new Text();\n _this.enabled = false;\n _this.padding = new Padding(10);\n var node = _this.node;\n node.textAlign = 'center';\n node.textBaseline = 'top';\n node.pointerEvents = PointerEvents.None;\n return _this;\n }\n Object.defineProperty(Caption.prototype, \"text\", {\n get: function () {\n return this.node.text;\n },\n set: function (value) {\n if (this.node.text !== value) {\n this.node.text = value;\n this.fireEvent({ type: 'change' });\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Caption.prototype, \"fontStyle\", {\n get: function () {\n return this.node.fontStyle;\n },\n set: function (value) {\n if (this.node.fontStyle !== value) {\n this.node.fontStyle = value;\n this.fireEvent({ type: 'change' });\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Caption.prototype, \"fontWeight\", {\n get: function () {\n return this.node.fontWeight;\n },\n set: function (value) {\n if (this.node.fontWeight !== value) {\n this.node.fontWeight = value;\n this.fireEvent({ type: 'change' });\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Caption.prototype, \"fontSize\", {\n get: function () {\n return this.node.fontSize;\n },\n set: function (value) {\n if (this.node.fontSize !== value) {\n this.node.fontSize = value;\n this.fireEvent({ type: 'change' });\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Caption.prototype, \"fontFamily\", {\n get: function () {\n return this.node.fontFamily;\n },\n set: function (value) {\n if (this.node.fontFamily !== value) {\n this.node.fontFamily = value;\n this.fireEvent({ type: 'change' });\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Caption.prototype, \"color\", {\n get: function () {\n return this.node.fill;\n },\n set: function (value) {\n if (this.node.fill !== value) {\n this.node.fill = value;\n this.fireEvent({ type: 'change' });\n }\n },\n enumerable: true,\n configurable: true\n });\n __decorate([\n reactive('change')\n ], Caption.prototype, \"enabled\", void 0);\n __decorate([\n reactive('change')\n ], Caption.prototype, \"padding\", void 0);\n return Caption;\n}(Observable));\nexport { Caption };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexport default function (a, b, count) {\n var step = tickStep(a, b, count);\n a = Math.ceil(a / step) * step;\n b = Math.floor(b / step) * step + step / 2;\n // Add half a step here so that the array returned by `range` includes the last tick.\n return range(a, b, step);\n}\nvar e10 = Math.sqrt(50);\nvar e5 = Math.sqrt(10);\nvar e2 = Math.sqrt(2);\nexport function tickStep(a, b, count) {\n var rawStep = Math.abs(b - a) / Math.max(0, count);\n var step = Math.pow(10, Math.floor(Math.log(rawStep) / Math.LN10)); // = Math.log10(rawStep)\n var error = rawStep / step;\n if (error >= e10) {\n step *= 10;\n }\n else if (error >= e5) {\n step *= 5;\n }\n else if (error >= e2) {\n step *= 2;\n }\n return b < a ? -step : step;\n}\nexport function tickIncrement(a, b, count) {\n var rawStep = (b - a) / Math.max(0, count);\n var power = Math.floor(Math.log(rawStep) / Math.LN10);\n var error = rawStep / Math.pow(10, power);\n return power >= 0\n ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)\n : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);\n}\nvar NumericTicks = /** @class */ (function (_super) {\n __extends(NumericTicks, _super);\n function NumericTicks(fractionDigits, elements) {\n var _this = _super.call(this) || this;\n if (elements) {\n for (var i = 0, n = elements.length; i < n; i++) {\n _this[i] = elements[i];\n }\n }\n _this.fractionDigits = fractionDigits;\n return _this;\n }\n return NumericTicks;\n}(Array));\nexport { NumericTicks };\nfunction range(a, b, step) {\n if (step === void 0) { step = 1; }\n var absStep = Math.abs(step);\n var fractionDigits = (absStep > 0 && absStep < 1)\n ? Math.abs(Math.floor(Math.log(absStep) / Math.LN10))\n : 0;\n var f = Math.pow(10, fractionDigits);\n var n = Math.max(0, Math.ceil((b - a) / step)) || 0;\n var values = new NumericTicks(fractionDigits);\n for (var i = 0; i < n; i++) {\n var value = a + step * i;\n values[i] = Math.round(value * f) / f;\n }\n return values;\n}\n","import { NumericTicks } from \"./ticks\";\nexport function calculateNiceSecondaryAxis(domain, primaryTickCount) {\n // Make secondary axis domain nice using strict tick count, matching the tick count from the primary axis.\n // This is to make the secondary axis grid lines/ tick positions align with the ones from the primary axis.\n var start = Math.floor(domain[0]);\n var stop = domain[1];\n start = calculateNiceStart(start, stop, primaryTickCount);\n var step = getTickStep(start, stop, primaryTickCount);\n var segments = primaryTickCount - 1;\n stop = start + (segments * step);\n var d = [start, stop];\n var ticks = getTicks(start, step, primaryTickCount);\n return [d, ticks];\n}\nfunction calculateNiceStart(a, b, count) {\n var rawStep = Math.abs(b - a) / (count - 1);\n var order = Math.floor(Math.log10(rawStep));\n var magnitude = Math.pow(10, order);\n return Math.floor(a / magnitude) * magnitude;\n}\nexport function getTicks(start, step, count) {\n // power of the step will be negative if the step is a fraction (between 0 and 1)\n var stepPower = Math.floor(Math.log10(step));\n var fractionDigits = (step > 0 && step < 1) ? Math.abs(stepPower) : 0;\n var f = Math.pow(10, fractionDigits);\n var ticks = new NumericTicks(fractionDigits);\n for (var i = 0; i < count; i++) {\n var tick = start + step * i;\n ticks[i] = Math.round(tick * f) / f;\n }\n return ticks;\n}\nexport function getTickStep(start, stop, count) {\n var segments = count - 1;\n var rawStep = (stop - start) / segments;\n return calculateNextNiceStep(rawStep);\n}\nfunction calculateNextNiceStep(rawStep) {\n var order = Math.floor(Math.log10(rawStep));\n var magnitude = Math.pow(10, order);\n // Make order 1\n var step = (rawStep / magnitude) * 10;\n if (step > 0 && step <= 1) {\n return magnitude / 10;\n }\n if (step > 1 && step <= 2) {\n return 2 * magnitude / 10;\n }\n if (step > 1 && step <= 5) {\n return 5 * magnitude / 10;\n }\n if (step > 5 && step <= 10) {\n return 10 * magnitude / 10;\n }\n if (step > 10 && step <= 20) {\n return 20 * magnitude / 10;\n }\n if (step > 20 && step <= 40) {\n return 40 * magnitude / 10;\n }\n if (step > 40 && step <= 50) {\n return 50 * magnitude / 10;\n }\n if (step > 50 && step <= 100) {\n return 100 * magnitude / 10;\n }\n return step;\n}\n","export default (function (x) { return function () { return x; }; });\n","export default function (a, b) {\n a = +a;\n b = +b;\n return function (t) { return a * (1 - t) + b * t; };\n}\n","var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar Color = /** @class */ (function () {\n /**\n * Every color component should be in the [0, 1] range.\n * Some easing functions (such as elastic easing) can overshoot the target value by some amount.\n * So, when animating colors, if the source or target color components are already near\n * or at the edge of the allowed [0, 1] range, it is possible for the intermediate color\n * component value to end up outside of that range mid-animation. For this reason the constructor\n * performs range checking/constraining.\n * @param r Red component.\n * @param g Green component.\n * @param b Blue component.\n * @param a Alpha (opacity) component.\n */\n function Color(r, g, b, a) {\n if (a === void 0) { a = 1; }\n // NaN is treated as 0.\n this.r = Math.min(1, Math.max(0, r || 0));\n this.g = Math.min(1, Math.max(0, g || 0));\n this.b = Math.min(1, Math.max(0, b || 0));\n this.a = Math.min(1, Math.max(0, a || 0));\n }\n /**\n * The given string can be in one of the following formats:\n * - #rgb\n * - #rrggbb\n * - rgb(r, g, b)\n * - rgba(r, g, b, a)\n * - CSS color name such as 'white', 'orange', 'cyan', etc.\n * @param str\n */\n Color.fromString = function (str) {\n // hexadecimal notation\n if (str.indexOf('#') >= 0) { // there can be some leading whitespace\n return Color.fromHexString(str);\n }\n // color name\n var hex = Color.nameToHex[str];\n if (hex) {\n return Color.fromHexString(hex);\n }\n // rgb(a) notation\n if (str.indexOf('rgb') >= 0) {\n return Color.fromRgbaString(str);\n }\n throw new Error(\"Invalid color string: '\" + str + \"'\");\n };\n // See https://drafts.csswg.org/css-color/#hex-notation\n Color.parseHex = function (input) {\n input = input.replace(/ /g, '').slice(1);\n var parts;\n switch (input.length) {\n case 6:\n case 8:\n parts = [];\n for (var i = 0; i < input.length; i += 2) {\n parts.push(parseInt(\"\" + input[i] + input[i + 1], 16));\n }\n break;\n case 3:\n case 4:\n parts = input.split('').map(function (p) { return parseInt(p, 16); }).map(function (p) { return p + p * 16; });\n break;\n }\n if (parts.length >= 3) {\n if (parts.every(function (p) { return p >= 0; })) {\n if (parts.length === 3) {\n parts.push(255);\n }\n return parts;\n }\n }\n };\n Color.fromHexString = function (str) {\n var values = Color.parseHex(str);\n if (values) {\n var _a = __read(values, 4), r = _a[0], g = _a[1], b = _a[2], a = _a[3];\n return new Color(r / 255, g / 255, b / 255, a / 255);\n }\n throw new Error(\"Malformed hexadecimal color string: '\" + str + \"'\");\n };\n Color.stringToRgba = function (str) {\n // Find positions of opening and closing parentheses.\n var _a = __read([NaN, NaN], 2), po = _a[0], pc = _a[1];\n for (var i = 0; i < str.length; i++) {\n var c = str[i];\n if (!po && c === '(') {\n po = i;\n }\n else if (c === ')') {\n pc = i;\n break;\n }\n }\n var contents = po && pc && str.substring(po + 1, pc);\n if (!contents) {\n return;\n }\n var parts = contents.split(',');\n var rgba = [];\n for (var i = 0; i < parts.length; i++) {\n var part = parts[i];\n var value = parseFloat(part);\n if (isNaN(value)) {\n return;\n }\n if (part.indexOf('%') >= 0) { // percentage r, g, or b value\n value = Math.max(0, Math.min(100, value));\n value /= 100;\n }\n else {\n if (i === 3) { // alpha component\n value = Math.max(0, Math.min(1, value));\n }\n else { // absolute r, g, or b value\n value = Math.max(0, Math.min(255, value));\n value /= 255;\n }\n }\n rgba.push(value);\n }\n return rgba;\n };\n Color.fromRgbaString = function (str) {\n var rgba = Color.stringToRgba(str);\n if (rgba) {\n if (rgba.length === 3) {\n return new Color(rgba[0], rgba[1], rgba[2]);\n }\n else if (rgba.length === 4) {\n return new Color(rgba[0], rgba[1], rgba[2], rgba[3]);\n }\n }\n throw new Error(\"Malformed rgb/rgba color string: '\" + str + \"'\");\n };\n Color.fromArray = function (arr) {\n if (arr.length === 4) {\n return new Color(arr[0], arr[1], arr[2], arr[3]);\n }\n if (arr.length === 3) {\n return new Color(arr[0], arr[1], arr[2]);\n }\n throw new Error('The given array should contain 3 or 4 color components (numbers).');\n };\n Color.fromHSB = function (h, s, b, alpha) {\n if (alpha === void 0) { alpha = 1; }\n var rgb = Color.HSBtoRGB(h, s, b);\n return new Color(rgb[0], rgb[1], rgb[2], alpha);\n };\n Color.padHex = function (str) {\n // Can't use `padStart(2, '0')` here because of IE.\n return str.length === 1 ? '0' + str : str;\n };\n Color.prototype.toHexString = function () {\n var hex = '#'\n + Color.padHex(Math.round(this.r * 255).toString(16))\n + Color.padHex(Math.round(this.g * 255).toString(16))\n + Color.padHex(Math.round(this.b * 255).toString(16));\n if (this.a < 1) {\n hex += Color.padHex(Math.round(this.a * 255).toString(16));\n }\n return hex;\n };\n Color.prototype.toRgbaString = function (fractionDigits) {\n if (fractionDigits === void 0) { fractionDigits = 3; }\n var components = [\n Math.round(this.r * 255),\n Math.round(this.g * 255),\n Math.round(this.b * 255)\n ];\n var k = Math.pow(10, fractionDigits);\n if (this.a !== 1) {\n components.push(Math.round(this.a * k) / k);\n return \"rgba(\" + components.join(', ') + \")\";\n }\n return \"rgb(\" + components.join(', ') + \")\";\n };\n Color.prototype.toString = function () {\n if (this.a === 1) {\n return this.toHexString();\n }\n return this.toRgbaString();\n };\n Color.prototype.toHSB = function () {\n return Color.RGBtoHSB(this.r, this.g, this.b);\n };\n /**\n * Converts the given RGB triple to an array of HSB (HSV) components.\n * The hue component will be `NaN` for achromatic colors.\n */\n Color.RGBtoHSB = function (r, g, b) {\n var min = Math.min(r, g, b);\n var max = Math.max(r, g, b);\n var S = max !== 0 ? (max - min) / max : 0;\n var H = NaN;\n // min == max, means all components are the same\n // and the color is a shade of gray with no hue (H is NaN)\n if (min !== max) {\n var delta = max - min;\n var rc = (max - r) / delta;\n var gc = (max - g) / delta;\n var bc = (max - b) / delta;\n if (r === max) {\n H = bc - gc;\n }\n else if (g === max) {\n H = 2.0 + rc - bc;\n }\n else {\n H = 4.0 + gc - rc;\n }\n H /= 6.0;\n if (H < 0) {\n H = H + 1.0;\n }\n }\n return [H * 360, S, max];\n };\n /**\n * Converts the given HSB (HSV) triple to an array of RGB components.\n */\n Color.HSBtoRGB = function (H, S, B) {\n if (isNaN(H)) {\n H = 0;\n }\n H = (((H % 360) + 360) % 360) / 360; // normalize hue to [0, 360] interval, then scale to [0, 1]\n var r = 0;\n var g = 0;\n var b = 0;\n if (S === 0) {\n r = g = b = B;\n }\n else {\n var h = (H - Math.floor(H)) * 6;\n var f = h - Math.floor(h);\n var p = B * (1 - S);\n var q = B * (1 - S * f);\n var t = B * (1 - (S * (1 - f)));\n switch (h >> 0) { // discard the floating point part of the number\n case 0:\n r = B;\n g = t;\n b = p;\n break;\n case 1:\n r = q;\n g = B;\n b = p;\n break;\n case 2:\n r = p;\n g = B;\n b = t;\n break;\n case 3:\n r = p;\n g = q;\n b = B;\n break;\n case 4:\n r = t;\n g = p;\n b = B;\n break;\n case 5:\n r = B;\n g = p;\n b = q;\n break;\n }\n }\n return [r, g, b];\n };\n Color.prototype.derive = function (hueShift, saturationFactor, brightnessFactor, opacityFactor) {\n var hsb = Color.RGBtoHSB(this.r, this.g, this.b);\n var b = hsb[2];\n if (b == 0 && brightnessFactor > 1.0) {\n b = 0.05;\n }\n var h = (((hsb[0] + hueShift) % 360) + 360) % 360;\n var s = Math.max(Math.min(hsb[1] * saturationFactor, 1.0), 0.0);\n b = Math.max(Math.min(b * brightnessFactor, 1.0), 0.0);\n var a = Math.max(Math.min(this.a * opacityFactor, 1.0), 0.0);\n var rgba = Color.HSBtoRGB(h, s, b);\n rgba.push(a);\n return Color.fromArray(rgba);\n };\n Color.prototype.brighter = function () {\n return this.derive(0, 1.0, 1.0 / 0.7, 1.0);\n };\n Color.prototype.darker = function () {\n return this.derive(0, 1.0, 0.7, 1.0);\n };\n /**\n * CSS Color Module Level 4:\n * https://drafts.csswg.org/css-color/#named-colors\n */\n Color.nameToHex = Object.freeze({\n aliceblue: '#F0F8FF',\n antiquewhite: '#FAEBD7',\n aqua: '#00FFFF',\n aquamarine: '#7FFFD4',\n azure: '#F0FFFF',\n beige: '#F5F5DC',\n bisque: '#FFE4C4',\n black: '#000000',\n blanchedalmond: '#FFEBCD',\n blue: '#0000FF',\n blueviolet: '#8A2BE2',\n brown: '#A52A2A',\n burlywood: '#DEB887',\n cadetblue: '#5F9EA0',\n chartreuse: '#7FFF00',\n chocolate: '#D2691E',\n coral: '#FF7F50',\n cornflowerblue: '#6495ED',\n cornsilk: '#FFF8DC',\n crimson: '#DC143C',\n cyan: '#00FFFF',\n darkblue: '#00008B',\n darkcyan: '#008B8B',\n darkgoldenrod: '#B8860B',\n darkgray: '#A9A9A9',\n darkgreen: '#006400',\n darkgrey: '#A9A9A9',\n darkkhaki: '#BDB76B',\n darkmagenta: '#8B008B',\n darkolivegreen: '#556B2F',\n darkorange: '#FF8C00',\n darkorchid: '#9932CC',\n darkred: '#8B0000',\n darksalmon: '#E9967A',\n darkseagreen: '#8FBC8F',\n darkslateblue: '#483D8B',\n darkslategray: '#2F4F4F',\n darkslategrey: '#2F4F4F',\n darkturquoise: '#00CED1',\n darkviolet: '#9400D3',\n deeppink: '#FF1493',\n deepskyblue: '#00BFFF',\n dimgray: '#696969',\n dimgrey: '#696969',\n dodgerblue: '#1E90FF',\n firebrick: '#B22222',\n floralwhite: '#FFFAF0',\n forestgreen: '#228B22',\n fuchsia: '#FF00FF',\n gainsboro: '#DCDCDC',\n ghostwhite: '#F8F8FF',\n gold: '#FFD700',\n goldenrod: '#DAA520',\n gray: '#808080',\n green: '#008000',\n greenyellow: '#ADFF2F',\n grey: '#808080',\n honeydew: '#F0FFF0',\n hotpink: '#FF69B4',\n indianred: '#CD5C5C',\n indigo: '#4B0082',\n ivory: '#FFFFF0',\n khaki: '#F0E68C',\n lavender: '#E6E6FA',\n lavenderblush: '#FFF0F5',\n lawngreen: '#7CFC00',\n lemonchiffon: '#FFFACD',\n lightblue: '#ADD8E6',\n lightcoral: '#F08080',\n lightcyan: '#E0FFFF',\n lightgoldenrodyellow: '#FAFAD2',\n lightgray: '#D3D3D3',\n lightgreen: '#90EE90',\n lightgrey: '#D3D3D3',\n lightpink: '#FFB6C1',\n lightsalmon: '#FFA07A',\n lightseagreen: '#20B2AA',\n lightskyblue: '#87CEFA',\n lightslategray: '#778899',\n lightslategrey: '#778899',\n lightsteelblue: '#B0C4DE',\n lightyellow: '#FFFFE0',\n lime: '#00FF00',\n limegreen: '#32CD32',\n linen: '#FAF0E6',\n magenta: '#FF00FF',\n maroon: '#800000',\n mediumaquamarine: '#66CDAA',\n mediumblue: '#0000CD',\n mediumorchid: '#BA55D3',\n mediumpurple: '#9370DB',\n mediumseagreen: '#3CB371',\n mediumslateblue: '#7B68EE',\n mediumspringgreen: '#00FA9A',\n mediumturquoise: '#48D1CC',\n mediumvioletred: '#C71585',\n midnightblue: '#191970',\n mintcream: '#F5FFFA',\n mistyrose: '#FFE4E1',\n moccasin: '#FFE4B5',\n navajowhite: '#FFDEAD',\n navy: '#000080',\n oldlace: '#FDF5E6',\n olive: '#808000',\n olivedrab: '#6B8E23',\n orange: '#FFA500',\n orangered: '#FF4500',\n orchid: '#DA70D6',\n palegoldenrod: '#EEE8AA',\n palegreen: '#98FB98',\n paleturquoise: '#AFEEEE',\n palevioletred: '#DB7093',\n papayawhip: '#FFEFD5',\n peachpuff: '#FFDAB9',\n peru: '#CD853F',\n pink: '#FFC0CB',\n plum: '#DDA0DD',\n powderblue: '#B0E0E6',\n purple: '#800080',\n rebeccapurple: '#663399',\n red: '#FF0000',\n rosybrown: '#BC8F8F',\n royalblue: '#4169E1',\n saddlebrown: '#8B4513',\n salmon: '#FA8072',\n sandybrown: '#F4A460',\n seagreen: '#2E8B57',\n seashell: '#FFF5EE',\n sienna: '#A0522D',\n silver: '#C0C0C0',\n skyblue: '#87CEEB',\n slateblue: '#6A5ACD',\n slategray: '#708090',\n slategrey: '#708090',\n snow: '#FFFAFA',\n springgreen: '#00FF7F',\n steelblue: '#4682B4',\n tan: '#D2B48C',\n teal: '#008080',\n thistle: '#D8BFD8',\n tomato: '#FF6347',\n turquoise: '#40E0D0',\n violet: '#EE82EE',\n wheat: '#F5DEB3',\n white: '#FFFFFF',\n whitesmoke: '#F5F5F5',\n yellow: '#FFFF00',\n yellowgreen: '#9ACD32'\n });\n return Color;\n}());\nexport { Color };\n","import number from \"./number\";\nimport { Color } from \"../util/color\";\nexport default function (a, b) {\n if (typeof a === 'string') {\n try {\n a = Color.fromString(a);\n }\n catch (e) {\n a = Color.fromArray([0, 0, 0]);\n }\n }\n if (typeof b === 'string') {\n try {\n b = Color.fromString(b);\n }\n catch (e) {\n b = Color.fromArray([0, 0, 0]);\n }\n }\n var red = number(a.r, b.r);\n var green = number(a.g, b.g);\n var blue = number(a.b, b.b);\n var alpha = number(a.a, b.a);\n return function (t) {\n return Color.fromArray([red(t), green(t), blue(t), alpha(t)]).toRgbaString();\n };\n}\n","import constant from \"./constant\";\nimport number from \"./number\";\nimport date from \"./date\";\nimport array from \"./array\";\nimport object from \"./object\";\nimport color from \"./color\";\nimport { Color } from \"../util/color\";\nexport default function (a, b) {\n var t = typeof b;\n var c;\n if (b == null || t === 'boolean') {\n return constant(b);\n }\n if (t === 'number') {\n return number(a, b);\n }\n if (t === 'string') {\n try {\n c = Color.fromString(b);\n b = c;\n return color(a, b);\n }\n catch (e) {\n // return string(a, b);\n }\n }\n if (b instanceof Color) {\n return color(a, b);\n }\n if (b instanceof Date) {\n return date(a, b);\n }\n if (Array.isArray(b)) {\n return array(a, b);\n }\n if (typeof b.valueOf !== 'function' && typeof b.toString !== 'function' || isNaN(b)) {\n return object(a, b);\n }\n return number(a, b);\n}\n","export default function (a, b) {\n var date = new Date;\n var msA = +a;\n var msB = +b;\n return function (t) {\n date.setTime(msA * (1 - t) + msB * t);\n return date;\n };\n}\n","import value from \"./value\";\nexport default function (a, b) {\n var nb = b ? b.length : 0;\n var na = a ? Math.min(nb, a.length) : 0;\n var x = new Array(na);\n var c = new Array(nb);\n var i;\n for (i = 0; i < na; ++i) {\n x[i] = value(a[i], b[i]);\n }\n for (; i < nb; ++i) {\n c[i] = b[i];\n }\n return function (t) {\n for (i = 0; i < na; ++i) {\n c[i] = x[i](t);\n }\n return c;\n };\n}\n","import value from \"./value\";\nexport default function (a, b) {\n var i = {};\n var c = {};\n var k;\n if (a === null || typeof a !== 'object') {\n a = {};\n }\n if (b === null || typeof b !== 'object') {\n b = {};\n }\n for (k in b) {\n if (k in a) {\n i[k] = value(a[k], b[k]);\n }\n else {\n c[k] = b[k];\n }\n }\n return function (t) {\n for (k in i) {\n c[k] = i[k](t);\n }\n return c;\n };\n}\n","export function ascending(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n","import { ascending } from \"./compare\";\n/**\n * Returns the insertion point for `x` in array to maintain sorted order.\n * The arguments `lo` and `hi` may be used to specify a subset of the array which should be considered;\n * by default the entire array is used. If `x` is already present in array, the insertion point will be before\n * (to the left of) any existing entries. The return value is suitable for use as the first argument to `splice`\n * assuming that array is already sorted. The returned insertion point `i` partitions the array into two halves\n * so that all `v < x` for `v` in `array.slice(lo, i)` for the left side and all `v >= x` for `v` in `array.slice(i, hi)`\n * for the right side.\n * @param list\n * @param x\n * @param comparator\n * @param lo\n * @param hi\n */\nexport function bisectLeft(list, x, comparator, lo, hi) {\n if (lo === void 0) { lo = 0; }\n if (hi === void 0) { hi = list.length; }\n while (lo < hi) {\n var mid = (lo + hi) >>> 1;\n if (comparator(list[mid], x) < 0) { // list[mid] < x\n lo = mid + 1;\n }\n else {\n hi = mid;\n }\n }\n return lo;\n}\nexport function bisectRight(list, x, comparator, lo, hi) {\n if (lo === void 0) { lo = 0; }\n if (hi === void 0) { hi = list.length; }\n while (lo < hi) {\n var mid = (lo + hi) >>> 1;\n if (comparator(list[mid], x) > 0) { // list[mid] > x\n hi = mid;\n }\n else {\n lo = mid + 1;\n }\n }\n return lo;\n}\n/**\n * A specialized version of `bisectLeft` that works with the arrays whose elements cannot be compared directly.\n * The map function is used instead to produce a comparable value for a given array element, then the values\n * returned by the map are compared using the `ascendingComparator`.\n * @param list\n * @param x\n * @param map\n * @param lo\n * @param hi\n */\nexport function complexBisectLeft(list, x, map, lo, hi) {\n if (lo === void 0) { lo = 0; }\n if (hi === void 0) { hi = list.length; }\n var comparator = ascendingComparator(map);\n while (lo < hi) {\n var mid = (lo + hi) >>> 1;\n if (comparator(list[mid], x) < 0) {\n lo = mid + 1;\n }\n else {\n hi = mid;\n }\n }\n return lo;\n}\nexport function complexBisectRight(list, x, map, lo, hi) {\n if (lo === void 0) { lo = 0; }\n if (hi === void 0) { hi = list.length; }\n var comparator = ascendingComparator(map);\n while (lo < hi) {\n var mid = (lo + hi) >>> 1;\n if (comparator(list[mid], x) < 0) {\n lo = mid + 1;\n }\n else {\n hi = mid;\n }\n }\n return lo;\n}\nfunction ascendingComparator(map) {\n return function (item, x) {\n return ascending(map(item), x);\n };\n}\n","var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport interpolateValue from \"../interpolate/value\";\nimport interpolateNumber from \"../interpolate/number\";\nimport { bisectRight } from \"../util/bisect\";\nimport { ascending } from \"../util/compare\";\nvar constant = function (x) { return function () { return x; }; };\nvar identity = function (x) { return x; };\nexport function clamper(domain) {\n var _a;\n var a = domain[0];\n var b = domain[domain.length - 1];\n if (a > b) {\n _a = __read([b, a], 2), a = _a[0], b = _a[1];\n }\n return function (x) { return Math.max(a, Math.min(b, x)); };\n}\nvar ContinuousScale = /** @class */ (function () {\n function ContinuousScale() {\n /**\n * The output value of the scale for `undefined` or `NaN` input values.\n */\n this.unknown = undefined;\n this.clamper = clamper;\n this._clamp = identity;\n this._domain = [0, 1];\n this._range = [0, 1];\n this.transform = identity; // transforms domain value\n this.untransform = identity; // untransforms domain value\n this._interpolate = interpolateValue;\n this.rescale();\n }\n Object.defineProperty(ContinuousScale.prototype, \"clamp\", {\n get: function () {\n return this._clamp !== identity;\n },\n set: function (value) {\n this._clamp = value ? this.clamper(this.domain) : identity;\n },\n enumerable: true,\n configurable: true\n });\n ContinuousScale.prototype.setDomain = function (values) {\n this._domain = Array.prototype.map.call(values, function (v) { return +v; });\n if (this._clamp !== identity) {\n this._clamp = this.clamper(this.domain);\n }\n this.rescale();\n };\n ContinuousScale.prototype.getDomain = function () {\n return this._domain.slice();\n };\n Object.defineProperty(ContinuousScale.prototype, \"domain\", {\n get: function () {\n return this.getDomain();\n },\n set: function (values) {\n this.setDomain(values);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ContinuousScale.prototype, \"range\", {\n get: function () {\n return this._range.slice();\n },\n set: function (values) {\n this._range = Array.prototype.slice.call(values);\n this.rescale();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ContinuousScale.prototype, \"interpolate\", {\n get: function () {\n return this._interpolate;\n },\n set: function (value) {\n this._interpolate = value;\n this.rescale();\n },\n enumerable: true,\n configurable: true\n });\n ContinuousScale.prototype.rescale = function () {\n if (Math.min(this.domain.length, this.range.length) > 2) {\n this.piecewise = this.polymap;\n }\n else {\n this.piecewise = this.bimap;\n }\n this.output = undefined;\n this.input = undefined;\n };\n /**\n * Returns a function that converts `x` in `[a, b]` to `t` in `[0, 1]`. Non-clamping.\n * @param a\n * @param b\n */\n ContinuousScale.prototype.normalize = function (a, b) {\n return (b -= (a = +a))\n ? function (x) { return (x - a) / b; }\n : constant(isNaN(b) ? NaN : 0.5);\n };\n ContinuousScale.prototype.bimap = function (domain, range, interpolate) {\n var x0 = domain[0];\n var x1 = domain[1];\n var y0 = range[0];\n var y1 = range[1];\n var xt;\n var ty;\n if (x1 < x0) {\n xt = this.normalize(x1, x0);\n ty = interpolate(y1, y0);\n }\n else {\n xt = this.normalize(x0, x1);\n ty = interpolate(y0, y1);\n }\n return function (x) { return ty(xt(x)); }; // domain value x --> t in [0, 1] --> range value y\n };\n ContinuousScale.prototype.polymap = function (domain, range, interpolate) {\n var _this = this;\n // number of segments in the polylinear scale\n var n = Math.min(domain.length, range.length) - 1;\n if (domain[n] < domain[0]) {\n domain = domain.slice().reverse();\n range = range.slice().reverse();\n }\n // deinterpolators from domain segment value to t\n var dt = Array.from({ length: n }, function (_, i) { return _this.normalize(domain[i], domain[i + 1]); });\n // reinterpolators from t to range segment value\n var tr = Array.from({ length: n }, function (_, i) { return interpolate(range[i], range[i + 1]); });\n return function (x) {\n var i = bisectRight(domain, x, ascending, 1, n) - 1; // Find the domain segment that `x` belongs to.\n // This also tells us which deinterpolator/reinterpolator pair to use.\n return tr[i](dt[i](x));\n };\n };\n ContinuousScale.prototype.convert = function (x, clamper) {\n x = +x;\n if (isNaN(x)) {\n return this.unknown;\n }\n if (!this.output) {\n this.output = this.piecewise(this.domain.map(this.transform), this.range, this.interpolate);\n }\n var clamp = clamper ? clamper(this.domain) : this._clamp;\n return this.output(this.transform(clamp(x)));\n };\n ContinuousScale.prototype.invert = function (y) {\n if (!this.input) {\n this.input = this.piecewise(this.range, this.domain.map(this.transform), interpolateNumber);\n }\n return this._clamp(this.untransform(this.input(y)));\n };\n return ContinuousScale;\n}());\nexport { ContinuousScale };\n","import { tickStep } from './ticks';\nfunction formatDefault(x, p) {\n var xs = x.toPrecision(p);\n out: for (var n = xs.length, i = 1, i0 = -1, i1 = 0; i < n; ++i) {\n switch (xs[i]) {\n case '.':\n i0 = i1 = i;\n break;\n case '0':\n if (i0 === 0)\n i0 = i;\n i1 = i;\n break;\n case 'e': break out;\n default:\n if (i0 > 0)\n i0 = 0;\n break;\n }\n }\n return i0 > 0 ? xs.slice(0, i0) + xs.slice(i1 + 1) : xs;\n}\nvar formatTypes = {\n '': formatDefault,\n // Multiply by 100, and then decimal notation with a percent sign.\n '%': function (x, p) { return (x * 100).toFixed(p); },\n // Binary notation, rounded to integer.\n 'b': function (x) { return Math.round(x).toString(2); },\n // Converts the integer to the corresponding unicode character before printing.\n 'c': function (x) { return String(x); },\n // Decimal notation, rounded to integer.\n 'd': formatDecimal,\n // Exponent notation.\n 'e': function (x, p) { return x.toExponential(p); },\n // Fixed point notation.\n 'f': function (x, p) { return x.toFixed(p); },\n // Either decimal or exponent notation, rounded to significant digits.\n 'g': function (x, p) { return x.toPrecision(p); },\n // Octal notation, rounded to integer.\n 'o': function (x) { return Math.round(x).toString(8); },\n // Multiply by 100, round to significant digits, and then decimal notation with a percent sign.\n 'p': function (x, p) { return formatRounded(x * 100, p); },\n // Decimal notation, rounded to significant digits.\n 'r': formatRounded,\n // Decimal notation with a SI prefix, rounded to significant digits.\n 's': formatPrefixAuto,\n // Hexadecimal notation, using upper-case letters, rounded to integer.\n 'X': function (x) { return Math.round(x).toString(16).toUpperCase(); },\n // Hexadecimal notation, using lower-case letters, rounded to integer.\n 'x': function (x) { return Math.round(x).toString(16); }\n};\nvar prefixes = ['y', 'z', 'a', 'f', 'p', 'n', '\\xB5', 'm', '', 'k', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y'];\n/**\n * [[fill]align][sign][#][0][width][grouping_option][.precision][type]\n */\nvar FormatSpecifier = /** @class */ (function () {\n function FormatSpecifier(specifier) {\n if (specifier instanceof FormatSpecifier) {\n this.fill = specifier.fill;\n this.align = specifier.align;\n this.sign = specifier.sign;\n this.symbol = specifier.symbol;\n this.zero = specifier.zero;\n this.width = specifier.width;\n this.comma = specifier.comma;\n this.precision = specifier.precision;\n this.trim = specifier.trim;\n this.type = specifier.type;\n this.string = specifier.string;\n }\n else {\n this.fill = specifier.fill === undefined ? ' ' : String(specifier.fill);\n this.align = specifier.align === undefined ? '>' : String(specifier.align);\n this.sign = specifier.sign === undefined ? '-' : String(specifier.sign);\n this.symbol = specifier.symbol === undefined ? '' : String(specifier.symbol);\n this.zero = !!specifier.zero;\n this.width = specifier.width === undefined ? undefined : +specifier.width;\n this.comma = !!specifier.comma;\n this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n this.trim = !!specifier.trim;\n this.type = specifier.type === undefined ? '' : String(specifier.type);\n this.string = specifier.string;\n }\n }\n return FormatSpecifier;\n}());\nexport { FormatSpecifier };\n// [[fill]align][sign][symbol][0][width][,][.precision][~][type]\nvar formatRegEx = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\nvar interpolateRegEx = /(#\\{(.*?)\\})/g;\nexport function makeFormatSpecifier(specifier) {\n if (specifier instanceof FormatSpecifier) {\n return new FormatSpecifier(specifier);\n }\n var found = false;\n var string = specifier.replace(interpolateRegEx, function () {\n if (!found) {\n specifier = arguments[2];\n found = true;\n }\n return '#{}';\n });\n var match = formatRegEx.exec(specifier);\n if (!match) {\n throw new Error(\"Invalid format: \" + specifier);\n }\n return new FormatSpecifier({\n fill: match[1],\n align: match[2],\n sign: match[3],\n symbol: match[4],\n zero: match[5],\n width: match[6],\n comma: match[7],\n precision: match[8] && match[8].slice(1),\n trim: match[9],\n type: match[10],\n string: found ? string : undefined\n });\n}\nexport function tickFormat(start, stop, count, specifier) {\n var step = tickStep(start, stop, count);\n var formatSpecifier = makeFormatSpecifier(specifier == undefined ? ',f' : specifier);\n var precision;\n switch (formatSpecifier.type) {\n case 's': {\n var value = Math.max(Math.abs(start), Math.abs(stop));\n if (formatSpecifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) {\n formatSpecifier.precision = precision;\n }\n return formatPrefix(formatSpecifier, value);\n }\n case '':\n case 'e':\n case 'g':\n case 'p':\n case 'r': {\n if (formatSpecifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) {\n formatSpecifier.precision = precision - +(formatSpecifier.type === 'e');\n }\n break;\n }\n case 'f':\n case '%': {\n if (formatSpecifier.precision == null && !isNaN(precision = precisionFixed(step))) {\n formatSpecifier.precision = precision - +(formatSpecifier.type === '%') * 2;\n }\n break;\n }\n }\n return format(formatSpecifier);\n}\nvar prefixExponent;\nfunction formatPrefixAuto(x, p) {\n if (p === void 0) { p = 0; }\n var d = formatDecimalParts(x, p);\n if (!d) {\n return String(x);\n }\n var coefficient = d[0];\n var exponent = d[1];\n prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3;\n var i = exponent - prefixExponent + 1;\n var n = coefficient.length;\n if (i === n) {\n return coefficient;\n }\n else {\n if (i > n) {\n return coefficient + new Array(i - n + 1).join('0');\n }\n if (i > 0) {\n return coefficient.slice(0, i) + '.' + coefficient.slice(i);\n }\n else {\n var parts = formatDecimalParts(x, Math.max(0, p + i - 1));\n return '0.' + new Array(1 - i).join('0') + parts[0]; // less than 1y!\n }\n }\n}\nfunction formatDecimal(x) {\n return Math.abs(x = Math.round(x)) >= 1e21\n ? x.toLocaleString('en').replace(/,/g, '')\n : x.toString(10);\n}\nfunction formatGroup(grouping, thousands) {\n return function (value, width) {\n var t = [];\n var i = value.length;\n var j = 0;\n var g = grouping[0];\n var length = 0;\n while (i > 0 && g > 0) {\n if (length + g + 1 > width) {\n g = Math.max(1, width - length);\n }\n t.push(value.substring(i -= g, i + g));\n if ((length += g + 1) > width) {\n break;\n }\n g = grouping[j = (j + 1) % grouping.length];\n }\n return t.reverse().join(thousands);\n };\n}\nexport function formatNumerals(numerals) {\n return function (value) { return value.replace(/[0-9]/g, function (i) { return numerals[+i]; }); };\n}\n// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.\nfunction formatTrim(s) {\n out: for (var n = s.length, i = 1, i0 = -1, i1 = 0; i < n; ++i) {\n switch (s[i]) {\n case '.':\n i0 = i1 = i;\n break;\n case '0':\n if (i0 === 0)\n i0 = i;\n i1 = i;\n break;\n default:\n if (!+s[i])\n break out;\n if (i0 > 0)\n i0 = 0;\n break;\n }\n }\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}\nfunction formatRounded(x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) {\n return String(x);\n }\n var coefficient = d[0];\n var exponent = d[1];\n if (exponent < 0) {\n return '0.' + new Array(-exponent).join('0') + coefficient;\n }\n else {\n if (coefficient.length > exponent + 1) {\n return coefficient.slice(0, exponent + 1) + '.' + coefficient.slice(exponent + 1);\n }\n else {\n return coefficient + new Array(exponent - coefficient.length + 2).join('0');\n }\n }\n}\n// Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimalParts(1.23) returns ['123', 0].\nexport function formatDecimalParts(x, p) {\n var sx = p ? x.toExponential(p - 1) : x.toExponential();\n var i = sx.indexOf('e');\n if (i < 0) { // NaN, ±Infinity\n return undefined;\n }\n var coefficient = sx.slice(0, i);\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +sx.slice(i + 1)\n ];\n}\nfunction identity(x) {\n return x;\n}\nexport var formatDefaultLocale;\nexport var format;\nexport var formatPrefix;\ndefaultLocale({\n thousands: ',',\n grouping: [3],\n currency: ['$', '']\n});\nfunction defaultLocale(definition) {\n formatDefaultLocale = formatLocale(definition);\n format = formatDefaultLocale.format;\n formatPrefix = formatDefaultLocale.formatPrefix;\n}\nfunction exponent(x) {\n var parts = formatDecimalParts(Math.abs(x));\n if (parts) {\n return parts[1];\n }\n return NaN;\n}\nfunction precisionFixed(step) {\n return Math.max(0, -exponent(Math.abs(step)));\n}\nfunction precisionPrefix(step, value) {\n var x = Math.floor(exponent(value) / 3);\n x = Math.min(8, x);\n x = Math.max(-8, x);\n return Math.max(0, x * 3 - exponent(Math.abs(step)));\n}\nfunction precisionRound(step, max) {\n step = Math.abs(step);\n max = Math.abs(max) - step;\n return Math.max(0, exponent(max) - exponent(step)) + 1;\n}\nexport function formatLocale(locale) {\n var group = locale.grouping === undefined || locale.thousands === undefined\n ? identity\n : formatGroup(Array.prototype.map.call(locale.grouping, Number), String(locale.thousands));\n var currencyPrefix = locale.currency === undefined ? '' : String(locale.currency[0]);\n var currencySuffix = locale.currency === undefined ? '' : String(locale.currency[1]);\n var decimal = locale.decimal === undefined ? '.' : String(locale.decimal);\n var numerals = locale.numerals === undefined\n ? identity\n : formatNumerals(Array.prototype.map.call(locale.numerals, String));\n var percent = locale.percent === undefined ? '%' : String(locale.percent);\n var minus = locale.minus === undefined ? '\\u2212' : String(locale.minus);\n var nan = locale.nan === undefined ? 'NaN' : String(locale.nan);\n function newFormat(specifier) {\n var formatSpecifier = makeFormatSpecifier(specifier);\n var fill = formatSpecifier.fill;\n var align = formatSpecifier.align;\n var sign = formatSpecifier.sign;\n var symbol = formatSpecifier.symbol;\n var zero = formatSpecifier.zero;\n var width = formatSpecifier.width;\n var comma = formatSpecifier.comma;\n var precision = formatSpecifier.precision;\n var trim = formatSpecifier.trim;\n var type = formatSpecifier.type;\n // The 'n' type is an alias for ',g'.\n if (type === 'n') {\n comma = true;\n type = 'g';\n }\n else if (!formatTypes[type]) { // The '' type, and any invalid type, is an alias for '.12~g'.\n if (precision === undefined) {\n precision = 12;\n }\n trim = true;\n type = 'g';\n }\n // If zero fill is specified, padding goes after sign and before digits.\n if (zero || (fill === '0' && align === '=')) {\n zero = true;\n fill = '0';\n align = '=';\n }\n // Compute the prefix and suffix.\n // For SI-prefix, the suffix is lazily computed.\n var prefix = symbol === '$' ? currencyPrefix : symbol === '#' && /[boxX]/.test(type) ? '0' + type.toLowerCase() : '';\n var suffix = symbol === '$' ? currencySuffix : /[%p]/.test(type) ? percent : '';\n // What format function should we use?\n // Is this an integer type?\n // Can this type generate exponential notation?\n var formatType = formatTypes[type];\n var maybeSuffix = /[defgprs%]/.test(type);\n // Set the default precision if not specified,\n // or clamp the specified precision to the supported range.\n // For significant precision, it must be in [1, 21].\n // For fixed precision, it must be in [0, 20].\n if (precision === undefined) {\n precision = 6;\n }\n else if (/[gprs]/.test(type)) {\n precision = Math.max(1, Math.min(21, precision));\n }\n else {\n precision = Math.max(0, Math.min(20, precision));\n }\n function format(x) {\n var valuePrefix = prefix;\n var valueSuffix = suffix;\n var value;\n if (type === 'c') {\n valueSuffix = formatType(+x) + valueSuffix;\n value = '';\n }\n else {\n var nx = +x;\n // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n var valueNegative = x < 0 || 1 / nx < 0;\n // Perform the initial formatting.\n value = isNaN(nx) ? nan : formatType(Math.abs(nx), precision);\n // Trim insignificant zeros.\n if (trim) {\n value = formatTrim(value);\n }\n // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.\n if (valueNegative && +value === 0 && sign !== '+') {\n valueNegative = false;\n }\n // Compute the prefix and suffix.\n var signPrefix = valueNegative\n ? (sign === '(' ? sign : minus)\n : (sign === '-' || sign === '(' ? '' : sign);\n var signSuffix = valueNegative && sign === '(' ? ')' : '';\n valuePrefix = signPrefix + valuePrefix;\n valueSuffix = (type === 's' ? prefixes[8 + prefixExponent / 3] : '') + valueSuffix + signSuffix;\n // Break the formatted value into the integer “value” part that can be\n // grouped, and fractional or exponential “suffix” part that is not.\n if (maybeSuffix) {\n for (var i = 0, n = value.length; i < n; i++) {\n var c = value.charCodeAt(i);\n if (48 > c || c > 57) {\n valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n value = value.slice(0, i);\n break;\n }\n }\n }\n }\n // If the fill character is not '0', grouping is applied before padding.\n if (comma && !zero)\n value = group(value, Infinity);\n // Compute the padding.\n var length = valuePrefix.length + value.length + valueSuffix.length;\n var padding = length < width ? new Array(width - length + 1).join(fill) : '';\n // If the fill character is '0', grouping is applied after padding.\n if (comma && zero) {\n value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity);\n padding = '';\n }\n // Reconstruct the final output based on the desired alignment.\n switch (align) {\n case '<':\n value = valuePrefix + value + valueSuffix + padding;\n break;\n case '=':\n value = valuePrefix + padding + value + valueSuffix;\n break;\n case '^':\n value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length);\n break;\n default:\n value = padding + valuePrefix + value + valueSuffix;\n break;\n }\n var string = formatSpecifier.string;\n if (string) {\n return string.replace(interpolateRegEx, function () { return numerals(value); });\n }\n return numerals(value);\n }\n return format;\n }\n function formatPrefix(specifier, value) {\n var formatSpecifier = makeFormatSpecifier(specifier);\n formatSpecifier.type = 'f';\n var f = newFormat(formatSpecifier);\n var e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3;\n var k = Math.pow(10, -e);\n var prefix = prefixes[8 + e / 3];\n return function (value) {\n return f(k * +value) + prefix;\n };\n }\n return {\n format: newFormat,\n formatPrefix: formatPrefix\n };\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { ContinuousScale } from \"./continuousScale\";\nimport ticks, { tickIncrement } from \"../util/ticks\";\nimport { tickFormat } from \"../util/numberFormat\";\n/**\n * Maps continuous domain to a continuous range.\n */\nvar LinearScale = /** @class */ (function (_super) {\n __extends(LinearScale, _super);\n function LinearScale() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'linear';\n return _this;\n }\n LinearScale.prototype.ticks = function (count) {\n if (count === void 0) { count = 10; }\n var d = this._domain;\n return ticks(d[0], d[d.length - 1], count);\n };\n /**\n * Extends the domain so that it starts and ends on nice round values.\n * @param count Tick count.\n */\n LinearScale.prototype.nice = function (count) {\n if (count === void 0) { count = 10; }\n var d = this.domain;\n var i0 = 0;\n var i1 = d.length - 1;\n var start = d[i0];\n var stop = d[i1];\n var step;\n if (stop < start) {\n step = start;\n start = stop;\n stop = step;\n step = i0;\n i0 = i1;\n i1 = step;\n }\n step = tickIncrement(start, stop, count);\n if (step > 0) {\n start = Math.floor(start / step) * step;\n stop = Math.ceil(stop / step) * step;\n step = tickIncrement(start, stop, count);\n }\n else if (step < 0) {\n start = Math.ceil(start * step) / step;\n stop = Math.floor(stop * step) / step;\n step = tickIncrement(start, stop, count);\n }\n if (step > 0) {\n d[i0] = Math.floor(start / step) * step;\n d[i1] = Math.ceil(stop / step) * step;\n this.domain = d;\n }\n else if (step < 0) {\n d[i0] = Math.ceil(start * step) / step;\n d[i1] = Math.floor(stop * step) / step;\n this.domain = d;\n }\n };\n LinearScale.prototype.tickFormat = function (count, specifier) {\n var d = this.domain;\n return tickFormat(d[0], d[d.length - 1], count == undefined ? 10 : count, specifier);\n };\n return LinearScale;\n}(ContinuousScale));\nexport { LinearScale };\n","var __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\n// Custom `Array.find` implementation for legacy browsers.\nexport function find(arr, predicate) {\n for (var i = 0; i < arr.length; i++) {\n var value = arr[i];\n if (predicate(value, i, arr)) {\n return value;\n }\n }\n}\nexport function findIndex(arr, predicate) {\n for (var i = 0; i < arr.length; i++) {\n if (predicate(arr[i], i, arr)) {\n return i;\n }\n }\n return -1;\n}\nfunction identity(value) {\n return value;\n}\nexport function extent(values, predicate, map) {\n var transform = map || identity;\n var n = values.length;\n var i = -1;\n var value;\n var min;\n var max;\n while (++i < n) { // Find the first value.\n value = values[i];\n if (predicate(value)) {\n min = max = value;\n while (++i < n) { // Compare the remaining values.\n value = values[i];\n if (predicate(value)) {\n if (min > value) {\n min = value;\n }\n if (max < value) {\n max = value;\n }\n }\n }\n }\n }\n return min === undefined || max === undefined ? undefined : [transform(min), transform(max)];\n}\n/**\n * finds the min and max using a process appropriate for stacked values. Ie,\n * summing up the positive and negative numbers, and returning the totals of each\n */\nexport function findMinMax(values) {\n var e_1, _a;\n var min = 0;\n var max = 0;\n try {\n for (var values_1 = __values(values), values_1_1 = values_1.next(); !values_1_1.done; values_1_1 = values_1.next()) {\n var value = values_1_1.value;\n if (value < 0) {\n min += value;\n }\n else {\n max += value;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (values_1_1 && !values_1_1.done && (_a = values_1.return)) _a.call(values_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return { min: min, max: max };\n}\nexport function copy(array, start, count) {\n if (start === void 0) { start = 0; }\n if (count === void 0) { count = array.length; }\n var result = [];\n var n = array.length;\n if (n) {\n for (var i = 0; i < count; i++) {\n result.push(array[(start + i) % n]);\n }\n }\n return result;\n}\n","// Simplified version of https://github.com/plotly/fast-isnumeric\n// that doesn't treat number strings with leading/trailing whitespace as numbers.\nexport function isNumber(value) {\n if (typeof value !== 'number') {\n return false;\n }\n return Number.isFinite(value);\n}\nexport function isNumberObject(value) {\n return !!value && value.hasOwnProperty('valueOf') && isNumber(value.valueOf());\n}\nexport function isNumeric(value) {\n return isNumber(value) || isNumberObject(value);\n}\nexport function isDate(value) {\n return value instanceof Date && !isNaN(+value);\n}\nexport function isString(value) {\n return typeof value === 'string';\n}\nexport function isStringObject(value) {\n return !!value && value.hasOwnProperty('toString') && isString(value.toString());\n}\nexport function isDiscrete(value) {\n return isString(value) || isStringObject(value);\n}\nexport function isContinuous(value) {\n return isNumeric(value) || isDate(value);\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Node } from \"./node\";\nimport { BBox } from \"./bbox\";\nimport { Matrix } from \"./matrix\";\nvar Group = /** @class */ (function (_super) {\n __extends(Group, _super);\n function Group() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.isContainerNode = true;\n _this._opacity = 1;\n return _this;\n }\n Object.defineProperty(Group.prototype, \"opacity\", {\n get: function () {\n return this._opacity;\n },\n set: function (value) {\n value = Math.min(1, Math.max(0, value));\n if (this._opacity !== value) {\n this._opacity = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n // We consider a group to be boundless, thus any point belongs to it.\n Group.prototype.containsPoint = function (x, y) {\n return true;\n };\n Group.prototype.computeBBox = function () {\n var left = Infinity;\n var right = -Infinity;\n var top = Infinity;\n var bottom = -Infinity;\n if (this.dirtyTransform) {\n this.computeTransformMatrix();\n }\n this.children.forEach(function (child) {\n if (!child.visible) {\n return;\n }\n var bbox = child.computeBBox();\n if (!bbox) {\n return;\n }\n if (!(child instanceof Group)) {\n if (child.dirtyTransform) {\n child.computeTransformMatrix();\n }\n var matrix = Matrix.flyweight(child.matrix);\n var parent_1 = child.parent;\n while (parent_1) {\n matrix.preMultiplySelf(parent_1.matrix);\n parent_1 = parent_1.parent;\n }\n matrix.transformBBox(bbox, 0, bbox);\n }\n var x = bbox.x;\n var y = bbox.y;\n if (x < left) {\n left = x;\n }\n if (y < top) {\n top = y;\n }\n if (x + bbox.width > right) {\n right = x + bbox.width;\n }\n if (y + bbox.height > bottom) {\n bottom = y + bbox.height;\n }\n });\n return new BBox(left, top, right - left, bottom - top);\n };\n Group.prototype.render = function (ctx) {\n // A group can have `scaling`, `rotation`, `translation` properties\n // that are applied to the canvas context before children are rendered,\n // so all children can be transformed at once.\n if (this.dirtyTransform) {\n this.computeTransformMatrix();\n }\n this.matrix.toContext(ctx);\n var children = this.children;\n var n = children.length;\n ctx.globalAlpha *= this.opacity;\n if (this.dirtyZIndex) {\n this.dirtyZIndex = false;\n children.sort(function (a, b) { return a.zIndex - b.zIndex; });\n }\n for (var i = 0; i < n; i++) {\n var child = children[i];\n if (child.visible) {\n ctx.save();\n child.render(ctx);\n ctx.restore();\n }\n }\n // debug\n // this.computeBBox().render(ctx, {\n // label: this.id,\n // resetTransform: true,\n // fillStyle: 'rgba(0, 0, 0, 0.5)'\n // });\n };\n Group.className = 'Group';\n return Group;\n}(Node));\nexport { Group };\n","import { Node } from \"./node\";\nvar EnterNode = /** @class */ (function () {\n function EnterNode(parent, datum) {\n this.next = null;\n this.scene = parent.scene;\n this.parent = parent;\n this.datum = datum;\n }\n EnterNode.prototype.appendChild = function (node) {\n // This doesn't work without the `strict: true` in the `tsconfig.json`,\n // so we must have two `if` checks below, instead of this single one.\n // if (this.next && !Node.isNode(this.next)) {\n // throw new Error(`${this.next} is not a Node.`);\n // }\n if (this.next === null) {\n return this.parent.insertBefore(node, null);\n }\n if (!Node.isNode(this.next)) {\n throw new Error(this.next + \" is not a Node.\");\n }\n return this.parent.insertBefore(node, this.next);\n };\n EnterNode.prototype.insertBefore = function (node, nextNode) {\n return this.parent.insertBefore(node, nextNode);\n };\n return EnterNode;\n}());\nexport { EnterNode };\n/**\n * G - type of the selected node(s).\n * GDatum - type of the datum of the selected node(s).\n * P - type of the parent node(s).\n * PDatum - type of the datum of the parent node(s).\n */\nvar Selection = /** @class */ (function () {\n function Selection(groups, parents) {\n this.groups = groups;\n this.parents = parents;\n }\n Selection.select = function (node) {\n return new Selection([[typeof node === 'function' ? node() : node]], [undefined]);\n };\n Selection.selectAll = function (nodes) {\n return new Selection([nodes == null ? [] : nodes], [undefined]);\n };\n /**\n * Creates new nodes, appends them to the nodes of this selection and returns them\n * as a new selection. The created nodes inherit the datums and the parents of the nodes\n * they replace.\n * @param Class The constructor function to use to create the new nodes.\n */\n Selection.prototype.append = function (Class) {\n return this.select(function (node) {\n return node.appendChild(new Class());\n });\n };\n /**\n * Same as the {@link append}, but accepts a custom creator function with the\n * {@link NodeSelector} signature rather than a constructor function.\n * @param creator\n */\n Selection.prototype.appendFn = function (creator) {\n return this.select(function (node, data, index, group) {\n return node.appendChild(creator(node, data, index, group));\n });\n };\n /**\n * Runs the given selector that returns a single node for every node in each group.\n * The original nodes are then replaced by the nodes returned by the selector\n * and returned as a new selection.\n * The selected nodes inherit the datums and the parents of the original nodes.\n */\n Selection.prototype.select = function (selector) {\n var groups = this.groups;\n var numGroups = groups.length;\n var subgroups = [];\n for (var j = 0; j < numGroups; j++) {\n var group = groups[j];\n var groupSize = group.length;\n var subgroup = subgroups[j] = new Array(groupSize);\n for (var i = 0; i < groupSize; i++) {\n var node = group[i];\n if (node) {\n var subnode = selector(node, node.datum, i, group);\n if (subnode) {\n subnode.datum = node.datum;\n }\n subgroup[i] = subnode;\n }\n // else this can be a group of the `enter` selection,\n // for example, with no nodes at the i-th position,\n // only nodes at the end of the group\n }\n }\n return new Selection(subgroups, this.parents);\n };\n /**\n * Same as {@link select}, but uses the given {@param Class} (constructor) as a selector.\n * @param Class The constructor function to use to find matching nodes.\n */\n Selection.prototype.selectByClass = function (Class) {\n return this.select(function (node) {\n if (Node.isNode(node)) {\n var children = node.children;\n var n = children.length;\n for (var i = 0; i < n; i++) {\n var child = children[i];\n if (child instanceof Class) {\n return child;\n }\n }\n }\n });\n };\n Selection.prototype.selectByTag = function (tag) {\n return this.select(function (node) {\n if (Node.isNode(node)) {\n var children = node.children;\n var n = children.length;\n for (var i = 0; i < n; i++) {\n var child = children[i];\n if (child.tag === tag) {\n return child;\n }\n }\n }\n });\n };\n Selection.prototype.selectAllByClass = function (Class) {\n return this.selectAll(function (node) {\n var nodes = [];\n if (Node.isNode(node)) {\n var children = node.children;\n var n = children.length;\n for (var i = 0; i < n; i++) {\n var child = children[i];\n if (child instanceof Class) {\n nodes.push(child);\n }\n }\n }\n return nodes;\n });\n };\n Selection.prototype.selectAllByTag = function (tag) {\n return this.selectAll(function (node) {\n var nodes = [];\n if (Node.isNode(node)) {\n var children = node.children;\n var n = children.length;\n for (var i = 0; i < n; i++) {\n var child = children[i];\n if (child.tag === tag) {\n nodes.push(child);\n }\n }\n }\n return nodes;\n });\n };\n Selection.prototype.selectNone = function () {\n return [];\n };\n /**\n * Runs the given selector that returns a group of nodes for every node in each group.\n * The original nodes are then replaced by the groups of nodes returned by the selector\n * and returned as a new selection. The original nodes become the parent nodes for each\n * group in the new selection. The selected nodes do not inherit the datums of the original nodes.\n * If called without any parameters, creates a new selection with an empty group for each\n * node in this selection.\n */\n Selection.prototype.selectAll = function (selectorAll) {\n if (!selectorAll) {\n selectorAll = this.selectNone;\n }\n // Each subgroup is populated with the selector (run on each group node) results.\n var subgroups = [];\n // In the new selection that we return, subgroups become groups,\n // and group nodes become parents.\n var parents = [];\n var groups = this.groups;\n var groupCount = groups.length;\n for (var j = 0; j < groupCount; j++) {\n var group = groups[j];\n var groupLength = group.length;\n for (var i = 0; i < groupLength; i++) {\n var node = group[i];\n if (node) {\n subgroups.push(selectorAll(node, node.datum, i, group));\n parents.push(node);\n }\n }\n }\n return new Selection(subgroups, parents);\n };\n /**\n * Runs the given callback for every node in this selection and returns this selection.\n * @param cb\n */\n Selection.prototype.each = function (cb) {\n var groups = this.groups;\n var numGroups = groups.length;\n for (var j = 0; j < numGroups; j++) {\n var group = groups[j];\n var groupSize = group.length;\n for (var i = 0; i < groupSize; i++) {\n var node = group[i];\n if (node) {\n cb(node, node.datum, i, group);\n }\n }\n }\n return this;\n };\n Selection.prototype.remove = function () {\n return this.each(function (node) {\n if (Node.isNode(node)) {\n var parent_1 = node.parent;\n if (parent_1) {\n parent_1.removeChild(node);\n }\n }\n });\n };\n Selection.prototype.merge = function (other) {\n var groups0 = this.groups;\n var groups1 = other.groups;\n var m0 = groups0.length;\n var m1 = groups1.length;\n var m = Math.min(m0, m1);\n var merges = new Array(m0);\n var j = 0;\n for (; j < m; j++) {\n var group0 = groups0[j];\n var group1 = groups1[j];\n var n = group0.length;\n var merge = merges[j] = new Array(n);\n for (var i = 0; i < n; i++) {\n var node = group0[i] || group1[i];\n merge[i] = node || undefined;\n }\n }\n for (; j < m0; j++) {\n merges[j] = groups0[j];\n }\n return new Selection(merges, this.parents);\n };\n /**\n * Return the first non-null element in this selection.\n * If the selection is empty, returns null.\n */\n Selection.prototype.node = function () {\n var groups = this.groups;\n var numGroups = groups.length;\n for (var j = 0; j < numGroups; j++) {\n var group = groups[j];\n var groupSize = group.length;\n for (var i = 0; i < groupSize; i++) {\n var node = group[i];\n if (node) {\n return node;\n }\n }\n }\n return null;\n };\n Selection.prototype.attr = function (name, value) {\n this.each(function (node) {\n node[name] = value;\n });\n return this;\n };\n Selection.prototype.attrFn = function (name, value) {\n this.each(function (node, datum, index, group) {\n node[name] = value(node, datum, index, group);\n });\n return this;\n };\n /**\n * Invokes the given function once, passing in this selection.\n * Returns this selection. Facilitates method chaining.\n * @param cb\n */\n Selection.prototype.call = function (cb) {\n cb(this);\n return this;\n };\n Object.defineProperty(Selection.prototype, \"size\", {\n /**\n * Returns the total number of nodes in this selection.\n */\n get: function () {\n var size = 0;\n this.each(function () { return size++; });\n return size;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Selection.prototype, \"data\", {\n /**\n * Returns the array of data for the selected elements.\n */\n get: function () {\n var data = [];\n this.each(function (_, datum) { return data.push(datum); });\n return data;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Selection.prototype, \"enter\", {\n get: function () {\n return new Selection(this.enterGroups ? this.enterGroups : [[]], this.parents);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Selection.prototype, \"exit\", {\n get: function () {\n return new Selection(this.exitGroups ? this.exitGroups : [[]], this.parents);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Binds the given value to each selected node and returns this selection\n * with its {@link GDatum} type changed to the type of the given value.\n * This method doesn't compute a join and doesn't affect indexes or the enter and exit selections.\n * This method can also be used to clear bound data.\n * @param value\n */\n Selection.prototype.setDatum = function (value) {\n return this.each(function (node) {\n node.datum = value;\n });\n };\n Object.defineProperty(Selection.prototype, \"datum\", {\n /**\n * Returns the bound datum for the first non-null element in the selection.\n * This is generally useful only if you know the selection contains exactly one element.\n */\n get: function () {\n var node = this.node();\n return node ? node.datum : null;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Binds the specified array of values with the selected nodes, returning a new selection\n * that represents the _update_ selection: the nodes successfully bound to the values.\n * Also defines the {@link enter} and {@link exit} selections on the returned selection,\n * which can be used to add or remove the nodes to correspond to the new data.\n * The `values` is an array of values of a particular type, or a function that returns\n * an array of values for each group.\n * When values are assigned to the nodes, they are stored in the {@link Node.datum} property.\n * @param values\n * @param key\n */\n Selection.prototype.setData = function (values, key) {\n if (typeof values !== 'function') {\n var data_1 = values;\n values = function () { return data_1; };\n }\n var groups = this.groups;\n var parents = this.parents;\n var numGroups = groups.length;\n var updateGroups = new Array(numGroups);\n var enterGroups = new Array(numGroups);\n var exitGroups = new Array(numGroups);\n for (var j = 0; j < numGroups; j++) {\n var group = groups[j];\n var parent_2 = parents[j];\n if (!parent_2) {\n throw new Error(\"Group #\" + j + \" has no parent: \" + group);\n }\n var groupSize = group.length;\n var data = values(parent_2, parent_2.datum, j, parents);\n var dataSize = data.length;\n var enterGroup = enterGroups[j] = new Array(dataSize);\n var updateGroup = updateGroups[j] = new Array(dataSize);\n var exitGroup = exitGroups[j] = new Array(groupSize);\n if (key) {\n this.bindKey(parent_2, group, enterGroup, updateGroup, exitGroup, data, key);\n }\n else {\n this.bindIndex(parent_2, group, enterGroup, updateGroup, exitGroup, data);\n }\n // Now connect the enter nodes to their following update node, such that\n // appendChild can insert the materialized enter node before this node,\n // rather than at the end of the parent node.\n for (var i0 = 0, i1 = 0; i0 < dataSize; i0++) {\n var previous = enterGroup[i0];\n if (previous) {\n if (i0 >= i1) {\n i1 = i0 + 1;\n }\n var next = void 0;\n while (!(next = updateGroup[i1]) && i1 < dataSize) {\n i1++;\n }\n previous.next = next || null;\n }\n }\n }\n var result = new Selection(updateGroups, parents);\n result.enterGroups = enterGroups;\n result.exitGroups = exitGroups;\n return result;\n };\n Selection.prototype.bindIndex = function (parent, group, enter, update, exit, data) {\n var groupSize = group.length;\n var dataSize = data.length;\n var i = 0;\n for (; i < dataSize; i++) {\n var node = group[i];\n if (node) {\n node.datum = data[i];\n update[i] = node;\n }\n else { // more datums than group nodes\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n // more group nodes than datums\n for (; i < groupSize; i++) {\n var node = group[i];\n if (node) {\n exit[i] = node;\n }\n }\n };\n Selection.prototype.bindKey = function (parent, group, enter, update, exit, data, key) {\n var groupSize = group.length;\n var dataSize = data.length;\n var keyValues = new Array(groupSize);\n var nodeByKeyValue = {};\n // Compute the key for each node.\n // If multiple nodes have the same key, the duplicates are added to exit.\n for (var i = 0; i < groupSize; i++) {\n var node = group[i];\n if (node) {\n var keyValue = keyValues[i] = Selection.keyPrefix + key(node, node.datum, i, group);\n if (keyValue in nodeByKeyValue) {\n exit[i] = node;\n }\n else {\n nodeByKeyValue[keyValue] = node;\n }\n }\n }\n // Compute the key for each datum.\n // If there is a node associated with this key, join and add it to update.\n // If there is not (or the key is a duplicate), add it to enter.\n for (var i = 0; i < dataSize; i++) {\n var keyValue = Selection.keyPrefix + key(parent, data[i], i, data);\n var node = nodeByKeyValue[keyValue];\n if (node) {\n update[i] = node;\n node.datum = data[i];\n nodeByKeyValue[keyValue] = undefined;\n }\n else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n // Add any remaining nodes that were not bound to data to exit.\n for (var i = 0; i < groupSize; i++) {\n var node = group[i];\n if (node && (nodeByKeyValue[keyValues[i]] === node)) {\n exit[i] = node;\n }\n }\n };\n Selection.keyPrefix = '$'; // Protect against keys like '__proto__'.\n return Selection;\n}());\nexport { Selection };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Shape } from \"./shape\";\nimport { chainObjects } from \"../../util/object\";\nimport { BBox } from \"../bbox\";\nvar Line = /** @class */ (function (_super) {\n __extends(Line, _super);\n function Line() {\n var _this = _super.call(this) || this;\n _this._x1 = 0;\n _this._y1 = 0;\n _this._x2 = 0;\n _this._y2 = 0;\n _this.restoreOwnStyles();\n return _this;\n }\n Object.defineProperty(Line.prototype, \"x1\", {\n get: function () {\n // TODO: Investigate getter performance further in the context\n // of the scene graph.\n // In isolated benchmarks using a getter has the same\n // performance as a direct property access in Firefox 64.\n // But in Chrome 71 the getter is 60% slower than direct access.\n // Direct read is 4.5+ times slower in Chrome than it is in Firefox.\n // Property access and direct read have the same performance\n // in Safari 12, which is 2+ times faster than Firefox at this.\n // https://jsperf.com/es5-getters-setters-versus-getter-setter-methods/18\n // This is a know Chrome issue. They say it's not a regression, since\n // the behavior is observed since M60, but jsperf.com history shows the\n // 10x slowdown happened between Chrome 48 and Chrome 57.\n // https://bugs.chromium.org/p/chromium/issues/detail?id=908743\n return this._x1;\n },\n set: function (value) {\n if (this._x1 !== value) {\n this._x1 = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Line.prototype, \"y1\", {\n get: function () {\n return this._y1;\n },\n set: function (value) {\n if (this._y1 !== value) {\n this._y1 = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Line.prototype, \"x2\", {\n get: function () {\n return this._x2;\n },\n set: function (value) {\n if (this._x2 !== value) {\n this._x2 = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Line.prototype, \"y2\", {\n get: function () {\n return this._y2;\n },\n set: function (value) {\n if (this._y2 !== value) {\n this._y2 = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Line.prototype.computeBBox = function () {\n return new BBox(this.x1, this.y1, this.x2 - this.x1, this.y2 - this.y1);\n };\n Line.prototype.isPointInPath = function (x, y) {\n return false;\n };\n Line.prototype.isPointInStroke = function (x, y) {\n return false;\n };\n Line.prototype.render = function (ctx) {\n if (this.dirtyTransform) {\n this.computeTransformMatrix();\n }\n this.matrix.toContext(ctx);\n var x1 = this.x1;\n var y1 = this.y1;\n var x2 = this.x2;\n var y2 = this.y2;\n // Align to the pixel grid if the line is strictly vertical\n // or horizontal (but not both, i.e. a dot).\n if (x1 === x2) {\n var x = Math.round(x1) + Math.floor(this.strokeWidth) % 2 / 2;\n x1 = x;\n x2 = x;\n }\n else if (y1 === y2) {\n var y = Math.round(y1) + Math.floor(this.strokeWidth) % 2 / 2;\n y1 = y;\n y2 = y;\n }\n ctx.beginPath();\n ctx.moveTo(x1, y1);\n ctx.lineTo(x2, y2);\n this.fillStroke(ctx);\n this.dirty = false;\n };\n Line.className = 'Line';\n Line.defaultStyles = chainObjects(Shape.defaultStyles, {\n fill: undefined,\n strokeWidth: 1\n });\n return Line;\n}(Shape));\nexport { Line };\n","// @ts-ignore Suppress tsc error: Property 'sign' does not exist on type 'Math'\nvar sign = Math.sign ? Math.sign : function (x) {\n x = +x;\n if (x === 0 || isNaN(x)) {\n return x;\n }\n return x > 0 ? 1 : -1;\n};\n/**\n * Finds the roots of a parametric linear equation in `t`,\n * where `t` lies in the interval of `[0,1]`.\n */\nexport function linearRoot(a, b) {\n var t = -b / a;\n return (a !== 0 && t >= 0 && t <= 1) ? [t] : [];\n}\n/**\n * Finds the roots of a parametric quadratic equation in `t`,\n * where `t` lies in the interval of `[0,1]`.\n */\nexport function quadraticRoots(a, b, c) {\n if (a === 0) {\n return linearRoot(b, c);\n }\n var D = b * b - 4 * a * c; // The polynomial's discriminant.\n var roots = [];\n if (D === 0) { // A single real root.\n var t = -b / (2 * a);\n if (t >= 0 && t <= 1) {\n roots.push(t);\n }\n }\n else if (D > 0) { // A pair of distinct real roots.\n var rD = Math.sqrt(D);\n var t1 = (-b - rD) / (2 * a);\n var t2 = (-b + rD) / (2 * a);\n if (t1 >= 0 && t1 <= 1) {\n roots.push(t1);\n }\n if (t2 >= 0 && t2 <= 1) {\n roots.push(t2);\n }\n }\n // else -> Complex roots.\n return roots;\n}\n/**\n * Finds the roots of a parametric cubic equation in `t`,\n * where `t` lies in the interval of `[0,1]`.\n * Returns an array of parametric intersection locations along the cubic,\n * excluding out-of-bounds intersections (before or after the end point\n * or in the imaginary plane).\n * An adaptation of http://www.particleincell.com/blog/2013/cubic-line-intersection/\n */\nexport function cubicRoots(a, b, c, d) {\n if (a === 0) {\n return quadraticRoots(b, c, d);\n }\n var A = b / a;\n var B = c / a;\n var C = d / a;\n var Q = (3 * B - A * A) / 9;\n var R = (9 * A * B - 27 * C - 2 * A * A * A) / 54;\n var D = Q * Q * Q + R * R; // The polynomial's discriminant.\n var third = 1 / 3;\n var roots = [];\n if (D >= 0) { // Complex or duplicate roots.\n var rD = Math.sqrt(D);\n var S = sign(R + rD) * Math.pow(Math.abs(R + rD), third);\n var T = sign(R - rD) * Math.pow(Math.abs(R - rD), third);\n var Im = Math.abs(Math.sqrt(3) * (S - T) / 2); // Complex part of the root pair.\n var t = -third * A + (S + T); // A real root.\n if (t >= 0 && t <= 1) {\n roots.push(t);\n }\n if (Im === 0) {\n var t_1 = -third * A - (S + T) / 2; // The real part of a complex root.\n if (t_1 >= 0 && t_1 <= 1) {\n roots.push(t_1);\n }\n }\n }\n else { // Distinct real roots.\n var theta = Math.acos(R / Math.sqrt(-Q * Q * Q));\n var thirdA = third * A;\n var twoSqrtQ = 2 * Math.sqrt(-Q);\n var t1 = twoSqrtQ * Math.cos(third * theta) - thirdA;\n var t2 = twoSqrtQ * Math.cos(third * (theta + 2 * Math.PI)) - thirdA;\n var t3 = twoSqrtQ * Math.cos(third * (theta + 4 * Math.PI)) - thirdA;\n if (t1 >= 0 && t1 <= 1) {\n roots.push(t1);\n }\n if (t2 >= 0 && t2 <= 1) {\n roots.push(t2);\n }\n if (t3 >= 0 && t3 <= 1) {\n roots.push(t3);\n }\n }\n return roots;\n}\n","import { cubicRoots } from \"./polyRoots\";\n/**\n * Returns the intersection point for the given pair of line segments, or null,\n * if the segments are parallel or don't intersect.\n * Based on http://paulbourke.net/geometry/pointlineplane/\n */\nexport function segmentIntersection(ax1, ay1, ax2, ay2, bx1, by1, bx2, by2) {\n var d = (ax2 - ax1) * (by2 - by1) - (ay2 - ay1) * (bx2 - bx1);\n if (d === 0) { // The lines are parallel.\n return null;\n }\n var ua = ((bx2 - bx1) * (ay1 - by1) - (ax1 - bx1) * (by2 - by1)) / d;\n var ub = ((ax2 - ax1) * (ay1 - by1) - (ay2 - ay1) * (ax1 - bx1)) / d;\n if (ua >= 0 && ua <= 1 && ub >= 0 && ub <= 1) {\n return {\n x: ax1 + ua * (ax2 - ax1),\n y: ay1 + ua * (ay2 - ay1)\n };\n }\n return null; // The intersection point is outside either or both segments.\n}\n/**\n * Returns intersection points of the given cubic curve and the line segment.\n * Takes in x/y components of cubic control points and line segment start/end points\n * as parameters.\n */\nexport function cubicSegmentIntersections(px1, py1, px2, py2, px3, py3, px4, py4, x1, y1, x2, y2) {\n var intersections = [];\n // Find line equation coefficients.\n var A = y1 - y2;\n var B = x2 - x1;\n var C = x1 * (y2 - y1) - y1 * (x2 - x1);\n // Find cubic Bezier curve equation coefficients from control points.\n var bx = bezierCoefficients(px1, px2, px3, px4);\n var by = bezierCoefficients(py1, py2, py3, py4);\n var a = A * bx[0] + B * by[0]; // t^3\n var b = A * bx[1] + B * by[1]; // t^2\n var c = A * bx[2] + B * by[2]; // t\n var d = A * bx[3] + B * by[3] + C; // 1\n var roots = cubicRoots(a, b, c, d);\n // Verify that the roots are within bounds of the linear segment.\n for (var i = 0; i < roots.length; i++) {\n var t = roots[i];\n var tt = t * t;\n var ttt = t * tt;\n // Find the cartesian plane coordinates for the parametric root `t`.\n var x = bx[0] * ttt + bx[1] * tt + bx[2] * t + bx[3];\n var y = by[0] * ttt + by[1] * tt + by[2] * t + by[3];\n // The parametric cubic roots we found are intersection points\n // with an infinite line, and so the x/y coordinates above are as well.\n // Make sure the x/y is also within the bounds of the given segment.\n var s = void 0;\n if (x1 !== x2) {\n s = (x - x1) / (x2 - x1);\n }\n else { // the line is vertical\n s = (y - y1) / (y2 - y1);\n }\n if (s >= 0 && s <= 1) {\n intersections.push({ x: x, y: y });\n }\n }\n return intersections;\n}\n/**\n * Returns the given coordinates vector multiplied by the coefficient matrix\n * of the parametric cubic Bézier equation.\n */\nexport function bezierCoefficients(P1, P2, P3, P4) {\n return [\n -P1 + 3 * P2 - 3 * P3 + P4,\n 3 * P1 - 6 * P2 + 3 * P3,\n -3 * P1 + 3 * P2,\n P1 // | 1 0 0 0| |P4|\n ];\n}\n","import { cubicSegmentIntersections, segmentIntersection } from \"./intersection\";\nvar Path2D = /** @class */ (function () {\n function Path2D() {\n // The methods of this class will likely be called many times per animation frame,\n // and any allocation can trigger a GC cycle during animation, so we attempt\n // to minimize the number of allocations.\n this.commands = [];\n this.params = [];\n this._closedPath = false;\n }\n Path2D.prototype.draw = function (ctx) {\n var commands = this.commands;\n var params = this.params;\n var n = commands.length;\n var j = 0;\n ctx.beginPath();\n for (var i = 0; i < n; i++) {\n switch (commands[i]) {\n case 'M':\n ctx.moveTo(params[j++], params[j++]);\n break;\n case 'L':\n ctx.lineTo(params[j++], params[j++]);\n break;\n case 'C':\n ctx.bezierCurveTo(params[j++], params[j++], params[j++], params[j++], params[j++], params[j++]);\n break;\n case 'Z':\n ctx.closePath();\n break;\n }\n }\n };\n Path2D.prototype.moveTo = function (x, y) {\n if (this.xy) {\n this.xy[0] = x;\n this.xy[1] = y;\n }\n else {\n this.xy = [x, y];\n }\n this.commands.push('M');\n this.params.push(x, y);\n };\n Path2D.prototype.lineTo = function (x, y) {\n if (this.xy) {\n this.commands.push('L');\n this.params.push(x, y);\n this.xy[0] = x;\n this.xy[1] = y;\n }\n else {\n this.moveTo(x, y);\n }\n };\n Path2D.prototype.rect = function (x, y, width, height) {\n this.moveTo(x, y);\n this.lineTo(x + width, y);\n this.lineTo(x + width, y + height);\n this.lineTo(x, y + height);\n this.closePath();\n };\n /**\n * Adds an arc segment to the path definition.\n * https://www.w3.org/TR/SVG11/paths.html#PathDataEllipticalArcCommands\n * @param rx The major-axis radius.\n * @param ry The minor-axis radius.\n * @param rotation The x-axis rotation, expressed in radians.\n * @param fA The large arc flag. `1` to use angle > π.\n * @param fS The sweep flag. `1` for the arc that goes to `x`/`y` clockwise.\n * @param x2 The x coordinate to arc to.\n * @param y2 The y coordinate to arc to.\n */\n Path2D.prototype.arcTo = function (rx, ry, rotation, fA, fS, x2, y2) {\n // Convert from endpoint to center parametrization:\n // https://www.w3.org/TR/SVG/implnote.html#ArcImplementationNotes\n var xy = this.xy;\n if (!xy) {\n return;\n }\n if (rx < 0) {\n rx = -rx;\n }\n if (ry < 0) {\n ry = -ry;\n }\n var x1 = xy[0];\n var y1 = xy[1];\n var hdx = (x1 - x2) / 2;\n var hdy = (y1 - y2) / 2;\n var sinPhi = Math.sin(rotation);\n var cosPhi = Math.cos(rotation);\n var xp = cosPhi * hdx + sinPhi * hdy;\n var yp = -sinPhi * hdx + cosPhi * hdy;\n var ratX = xp / rx;\n var ratY = yp / ry;\n var lambda = ratX * ratX + ratY * ratY;\n var cx = (x1 + x2) / 2;\n var cy = (y1 + y2) / 2;\n var cpx = 0;\n var cpy = 0;\n if (lambda >= 1) {\n lambda = Math.sqrt(lambda);\n rx *= lambda;\n ry *= lambda;\n // me gives lambda == cpx == cpy == 0;\n }\n else {\n lambda = Math.sqrt(1 / lambda - 1);\n if (fA === fS) {\n lambda = -lambda;\n }\n cpx = lambda * rx * ratY;\n cpy = -lambda * ry * ratX;\n cx += cosPhi * cpx - sinPhi * cpy;\n cy += sinPhi * cpx + cosPhi * cpy;\n }\n var theta1 = Math.atan2((yp - cpy) / ry, (xp - cpx) / rx);\n var deltaTheta = Math.atan2((-yp - cpy) / ry, (-xp - cpx) / rx) - theta1;\n // if (fS) {\n // if (deltaTheta <= 0) {\n // deltaTheta += Math.PI * 2;\n // }\n // }\n // else {\n // if (deltaTheta >= 0) {\n // deltaTheta -= Math.PI * 2;\n // }\n // }\n this.cubicArc(cx, cy, rx, ry, rotation, theta1, theta1 + deltaTheta, 1 - fS);\n };\n /**\n * Approximates an elliptical arc with up to four cubic Bézier curves.\n * @param commands The string array to write SVG command letters to.\n * @param params The number array to write SVG command parameters (cubic control points) to.\n * @param cx The x-axis coordinate for the ellipse's center.\n * @param cy The y-axis coordinate for the ellipse's center.\n * @param rx The ellipse's major-axis radius.\n * @param ry The ellipse's minor-axis radius.\n * @param phi The rotation for this ellipse, expressed in radians.\n * @param theta1 The starting angle, measured clockwise from the positive x-axis and expressed in radians.\n * @param theta2 The ending angle, measured clockwise from the positive x-axis and expressed in radians.\n * @param anticlockwise The arc control points are always placed clockwise from `theta1` to `theta2`,\n * even when `theta1 > theta2`, unless this flag is set to `1`.\n */\n Path2D.cubicArc = function (commands, params, cx, cy, rx, ry, phi, theta1, theta2, anticlockwise) {\n if (anticlockwise) {\n var temp = theta1;\n theta1 = theta2;\n theta2 = temp;\n }\n var start = params.length;\n // See https://pomax.github.io/bezierinfo/#circles_cubic\n // Arc of unit circle (start angle = 0, end angle <= π/2) in cubic Bézier coordinates:\n // S = [1, 0]\n // C1 = [1, f]\n // C2 = [cos(θ) + f * sin(θ), sin(θ) - f * cos(θ)]\n // E = [cos(θ), sin(θ)]\n // f = 4/3 * tan(θ/4)\n var f90 = 0.5522847498307935; // f for θ = π/2 is 4/3 * (Math.sqrt(2) - 1)\n var sinTheta1 = Math.sin(theta1);\n var cosTheta1 = Math.cos(theta1);\n var sinPhi = Math.sin(phi);\n var cosPhi = Math.cos(phi);\n var rightAngle = Math.PI / 2;\n // Since we know how to draw an arc of a unit circle with a cubic Bézier,\n // to draw an elliptical arc with arbitrary rotation and radii we:\n // 1) rotate the Bézier coordinates that represent a circular arc by θ\n // 2) scale the circular arc separately along the x/y axes, making it elliptical\n // 3) rotate elliptical arc by φ\n // |cos(φ) -sin(φ)| |sx 0| |cos(θ) -sin(θ)| -> |xx xy|\n // |sin(φ) cos(φ)| | 0 sy| |sin(θ) cos(θ)| -> |yx yy|\n var xx = cosPhi * cosTheta1 * rx - sinPhi * sinTheta1 * ry;\n var yx = sinPhi * cosTheta1 * rx + cosPhi * sinTheta1 * ry;\n var xy = -cosPhi * sinTheta1 * rx - sinPhi * cosTheta1 * ry;\n var yy = -sinPhi * sinTheta1 * rx + cosPhi * cosTheta1 * ry;\n // TODO: what if delta between θ1 and θ2 is greater than 2π?\n // Always draw clockwise from θ1 to θ2.\n theta2 -= theta1;\n if (theta2 < 0) {\n theta2 += Math.PI * 2;\n }\n // Multiplying each point [x, y] by:\n // |xx xy cx| |x|\n // |yx yy cy| |y|\n // | 0 0 1| |1|\n // TODO: This move command may be redundant, if we are already at this point.\n // The coordinates of the point calculated here may differ ever so slightly\n // because of precision error.\n commands.push('M');\n params.push(xx + cx, yx + cy);\n while (theta2 >= rightAngle) {\n theta2 -= rightAngle;\n commands.push('C');\n // Temp workaround for https://bugs.chromium.org/p/chromium/issues/detail?id=993330\n // Revert this commit when fixed ^^.\n var lastX = xy + cx;\n params.push(xx + xy * f90 + cx, yx + yy * f90 + cy, xx * f90 + xy + cx, yx * f90 + yy + cy, Math.abs(lastX) < 1e-8 ? 0 : lastX, yy + cy);\n // Prepend π/2 rotation matrix.\n // |xx xy| | 0 1| -> | xy -xx|\n // |yx yy| |-1 0| -> | yy -yx|\n // [xx, yx, xy, yy] = [xy, yy, -xx, -yx];\n // Compared to swapping with a temp variable, destructuring is:\n // - 10% faster in Chrome 70\n // - 99% slower in Firefox 63\n // Temp variable solution is 45% faster in FF than Chrome.\n // https://jsperf.com/multi-swap\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1165569\n var temp = xx;\n xx = xy;\n xy = -temp;\n temp = yx;\n yx = yy;\n yy = -temp;\n }\n if (theta2) {\n var f = 4 / 3 * Math.tan(theta2 / 4);\n var sinPhi2 = Math.sin(theta2);\n var cosPhi2 = Math.cos(theta2);\n var C2x = cosPhi2 + f * sinPhi2;\n var C2y = sinPhi2 - f * cosPhi2;\n commands.push('C');\n // Temp workaround for https://bugs.chromium.org/p/chromium/issues/detail?id=993330\n // Revert this commit when fixed ^^.\n var lastX = xx * cosPhi2 + xy * sinPhi2 + cx;\n params.push(xx + xy * f + cx, yx + yy * f + cy, xx * C2x + xy * C2y + cx, yx * C2x + yy * C2y + cy, Math.abs(lastX) < 1e-8 ? 0 : lastX, yx * cosPhi2 + yy * sinPhi2 + cy);\n }\n if (anticlockwise) {\n for (var i = start, j = params.length - 2; i < j; i += 2, j -= 2) {\n var temp = params[i];\n params[i] = params[j];\n params[j] = temp;\n temp = params[i + 1];\n params[i + 1] = params[j + 1];\n params[j + 1] = temp;\n }\n }\n };\n Path2D.prototype.cubicArc = function (cx, cy, rx, ry, phi, theta1, theta2, anticlockwise) {\n var commands = this.commands;\n var params = this.params;\n var start = commands.length;\n Path2D.cubicArc(commands, params, cx, cy, rx, ry, phi, theta1, theta2, anticlockwise);\n var x = params[params.length - 2];\n var y = params[params.length - 1];\n if (this.xy) {\n commands[start] = 'L';\n this.xy[0] = x;\n this.xy[1] = y;\n }\n else {\n this.xy = [x, y];\n }\n };\n /**\n * Returns the `[x, y]` coordinates of the curve at `t`.\n * @param points `(n + 1) * 2` control point coordinates for a Bézier curve of n-th order.\n * @param t\n */\n Path2D.prototype.deCasteljau = function (points, t) {\n var n = points.length;\n if (n < 2 || n % 2 === 1) {\n throw new Error('Fewer than two points or not an even count.');\n }\n else if (n === 2 || t === 0) {\n return points.slice(0, 2);\n }\n else if (t === 1) {\n return points.slice(-2);\n }\n else {\n var newPoints = [];\n var last = n - 2;\n for (var i = 0; i < last; i += 2) {\n newPoints.push((1 - t) * points[i] + t * points[i + 2], // x\n (1 - t) * points[i + 1] + t * points[i + 3] // y\n );\n }\n return this.deCasteljau(newPoints, t);\n }\n };\n /**\n * Approximates the given curve using `n` line segments.\n * @param points `(n + 1) * 2` control point coordinates for a Bézier curve of n-th order.\n * @param n\n */\n Path2D.prototype.approximateCurve = function (points, n) {\n var xy = this.deCasteljau(points, 0);\n this.moveTo(xy[0], xy[1]);\n var step = 1 / n;\n for (var t = step; t <= 1; t += step) {\n var xy_1 = this.deCasteljau(points, t);\n this.lineTo(xy_1[0], xy_1[1]);\n }\n };\n /**\n * Adds a quadratic curve segment to the path definition.\n * Note: the given quadratic segment is converted and stored as a cubic one.\n * @param cx x-component of the curve's control point\n * @param cy y-component of the curve's control point\n * @param x x-component of the end point\n * @param y y-component of the end point\n */\n Path2D.prototype.quadraticCurveTo = function (cx, cy, x, y) {\n if (!this.xy) {\n this.moveTo(cx, cy);\n }\n // See https://pomax.github.io/bezierinfo/#reordering\n this.cubicCurveTo((this.xy[0] + 2 * cx) / 3, (this.xy[1] + 2 * cy) / 3, // 1/3 start + 2/3 control\n (2 * cx + x) / 3, (2 * cy + y) / 3, // 2/3 control + 1/3 end\n x, y);\n };\n Path2D.prototype.cubicCurveTo = function (cx1, cy1, cx2, cy2, x, y) {\n if (!this.xy) {\n this.moveTo(cx1, cy1);\n }\n this.commands.push('C');\n this.params.push(cx1, cy1, cx2, cy2, x, y);\n this.xy[0] = x;\n this.xy[1] = y;\n };\n Object.defineProperty(Path2D.prototype, \"closedPath\", {\n get: function () {\n return this._closedPath;\n },\n enumerable: true,\n configurable: true\n });\n Path2D.prototype.closePath = function () {\n if (this.xy) {\n this.xy = undefined;\n this.commands.push('Z');\n this._closedPath = true;\n }\n };\n Path2D.prototype.clear = function () {\n this.commands.length = 0;\n this.params.length = 0;\n this.xy = undefined;\n this._closedPath = false;\n };\n Path2D.prototype.isPointInPath = function (x, y) {\n var commands = this.commands;\n var params = this.params;\n var cn = commands.length;\n // Hit testing using ray casting method, where the ray's origin is some point\n // outside the path. In this case, an offscreen point that is remote enough, so that\n // even if the path itself is large and is partially offscreen, the ray's origin\n // will likely be outside the path anyway. To test if the given point is inside the\n // path or not, we cast a ray from the origin to the given point and check the number\n // of intersections of this segment with the path. If the number of intersections is\n // even, then the ray both entered and exited the path an equal number of times,\n // therefore the point is outside the path, and inside the path, if the number of\n // intersections is odd. Since the path is compound, we check if the ray segment\n // intersects with each of the path's segments, which can be either a line segment\n // (one or no intersection points) or a Bézier curve segment (up to 3 intersection\n // points).\n var ox = -10000;\n var oy = -10000;\n // the starting point of the current path\n var sx = NaN;\n var sy = NaN;\n // the previous point of the current path\n var px = 0;\n var py = 0;\n var intersectionCount = 0;\n for (var ci = 0, pi = 0; ci < cn; ci++) {\n switch (commands[ci]) {\n case 'M':\n if (!isNaN(sx)) {\n if (segmentIntersection(sx, sy, px, py, ox, oy, x, y)) {\n intersectionCount++;\n }\n }\n sx = px = params[pi++];\n sy = py = params[pi++];\n break;\n case 'L':\n if (segmentIntersection(px, py, px = params[pi++], py = params[pi++], ox, oy, x, y)) {\n intersectionCount++;\n }\n break;\n case 'C':\n intersectionCount += cubicSegmentIntersections(px, py, params[pi++], params[pi++], params[pi++], params[pi++], px = params[pi++], py = params[pi++], ox, oy, x, y).length;\n break;\n case 'Z':\n if (!isNaN(sx)) {\n if (segmentIntersection(sx, sy, px, py, ox, oy, x, y)) {\n intersectionCount++;\n }\n }\n break;\n }\n }\n return intersectionCount % 2 === 1;\n };\n Path2D.fromString = function (value) {\n var path = new Path2D();\n path.setFromString(value);\n return path;\n };\n /**\n * Split the SVG path at command letters,\n * then extract the command letter and parameters from each substring.\n * @param value\n */\n Path2D.parseSvgPath = function (value) {\n return value.trim().split(Path2D.splitCommandsRe).map(function (part) {\n var strParams = part.match(Path2D.matchParamsRe);\n return {\n command: part.substr(0, 1),\n params: strParams ? strParams.map(parseFloat) : []\n };\n });\n };\n Path2D.prettifySvgPath = function (value) {\n return Path2D.parseSvgPath(value).map(function (d) { return d.command + d.params.join(','); }).join('\\n');\n };\n /**\n * See https://www.w3.org/TR/SVG11/paths.html\n * @param value\n */\n Path2D.prototype.setFromString = function (value) {\n var _this = this;\n this.clear();\n var parts = Path2D.parseSvgPath(value);\n // Current point.\n var x;\n var y;\n // Last control point. Used to calculate the reflection point\n // for `S`, `s`, `T`, `t` commands.\n var cpx;\n var cpy;\n var lastCommand;\n function checkQuadraticCP() {\n if (!lastCommand.match(Path2D.quadraticCommandRe)) {\n cpx = x;\n cpy = y;\n }\n }\n function checkCubicCP() {\n if (!lastCommand.match(Path2D.cubicCommandRe)) {\n cpx = x;\n cpy = y;\n }\n }\n // But that will make compiler complain about x/y, cpx/cpy\n // being used without being set first.\n parts.forEach(function (part) {\n var p = part.params;\n var n = p.length;\n var i = 0;\n switch (part.command) {\n case 'M':\n _this.moveTo(x = p[i++], y = p[i++]);\n while (i < n) {\n _this.lineTo(x = p[i++], y = p[i++]);\n }\n break;\n case 'm':\n _this.moveTo(x += p[i++], y += p[i++]);\n while (i < n) {\n _this.lineTo(x += p[i++], y += p[i++]);\n }\n break;\n case 'L':\n while (i < n) {\n _this.lineTo(x = p[i++], y = p[i++]);\n }\n break;\n case 'l':\n while (i < n) {\n _this.lineTo(x += p[i++], y += p[i++]);\n }\n break;\n case 'C':\n while (i < n) {\n _this.cubicCurveTo(p[i++], p[i++], cpx = p[i++], cpy = p[i++], x = p[i++], y = p[i++]);\n }\n break;\n case 'c':\n while (i < n) {\n _this.cubicCurveTo(x + p[i++], y + p[i++], cpx = x + p[i++], cpy = y + p[i++], x += p[i++], y += p[i++]);\n }\n break;\n case 'S':\n checkCubicCP();\n while (i < n) {\n _this.cubicCurveTo(x + x - cpx, y + y - cpy, cpx = p[i++], cpy = p[i++], x = p[i++], y = p[i++]);\n }\n break;\n case 's':\n checkCubicCP();\n while (i < n) {\n _this.cubicCurveTo(x + x - cpx, y + y - cpy, cpx = x + p[i++], cpy = y + p[i++], x += p[i++], y += p[i++]);\n }\n break;\n case 'Q':\n while (i < n) {\n _this.quadraticCurveTo(cpx = p[i++], cpy = p[i++], x = p[i++], y = p[i++]);\n }\n break;\n case 'q':\n while (i < n) {\n _this.quadraticCurveTo(cpx = x + p[i++], cpy = y + p[i++], x += p[i++], y += p[i++]);\n }\n break;\n case 'T':\n checkQuadraticCP();\n while (i < n) {\n _this.quadraticCurveTo(cpx = x + x - cpx, cpy = y + y - cpy, x = p[i++], y = p[i++]);\n }\n break;\n case 't':\n checkQuadraticCP();\n while (i < n) {\n _this.quadraticCurveTo(cpx = x + x - cpx, cpy = y + y - cpy, x += p[i++], y += p[i++]);\n }\n break;\n case 'A':\n while (i < n) {\n _this.arcTo(p[i++], p[i++], p[i++] * Math.PI / 180, p[i++], p[i++], x = p[i++], y = p[i++]);\n }\n break;\n case 'a':\n while (i < n) {\n _this.arcTo(p[i++], p[i++], p[i++] * Math.PI / 180, p[i++], p[i++], x += p[i++], y += p[i++]);\n }\n break;\n case 'Z':\n case 'z':\n _this.closePath();\n break;\n case 'H':\n while (i < n) {\n _this.lineTo(x = p[i++], y);\n }\n break;\n case 'h':\n while (i < n) {\n _this.lineTo(x += p[i++], y);\n }\n break;\n case 'V':\n while (i < n) {\n _this.lineTo(x, y = p[i++]);\n }\n break;\n case 'v':\n while (i < n) {\n _this.lineTo(x, y += p[i++]);\n }\n break;\n }\n lastCommand = part.command;\n });\n };\n Path2D.prototype.toString = function () {\n var c = this.commands;\n var p = this.params;\n var cn = c.length;\n var out = [];\n for (var ci = 0, pi = 0; ci < cn; ci++) {\n switch (c[ci]) {\n case 'M':\n out.push('M' + p[pi++] + ',' + p[pi++]);\n break;\n case 'L':\n out.push('L' + p[pi++] + ',' + p[pi++]);\n break;\n case 'C':\n out.push('C' + p[pi++] + ',' + p[pi++] + ' ' +\n p[pi++] + ',' + p[pi++] + ' ' +\n p[pi++] + ',' + p[pi++]);\n break;\n case 'Z':\n out.push('Z');\n break;\n }\n }\n return out.join('');\n };\n Path2D.prototype.toPrettyString = function () {\n return Path2D.prettifySvgPath(this.toString());\n };\n Path2D.prototype.toSvg = function () {\n return Path2D.xmlDeclaration + \"\\n\\n \\n\";\n };\n Path2D.prototype.toDebugSvg = function () {\n var d = Path2D.prettifySvgPath(this.toString());\n return Path2D.xmlDeclaration + \"\\n\\n \\n\";\n };\n /**\n * Returns an array of sub-paths of this Path,\n * where each sub-path is represented exclusively by cubic segments.\n */\n Path2D.prototype.toCubicPaths = function () {\n // Each sub-path is an array of `(n * 3 + 1) * 2` numbers,\n // where `n` is the number of segments.\n var paths = [];\n var params = this.params;\n // current path\n var path;\n // the starting point of the current path\n var sx;\n var sy;\n // the previous point of the current path\n var px;\n var py;\n var i = 0; // current parameter\n this.commands.forEach(function (command) {\n switch (command) {\n case 'M':\n path = [\n sx = px = params[i++],\n sy = py = params[i++]\n ];\n paths.push(path);\n break;\n case 'L':\n var x = params[i++];\n var y = params[i++];\n // Place control points along the line `a + (b - a) * t`\n // at t = 1/3 and 2/3:\n path.push((px + px + x) / 3, (py + py + y) / 3, (px + x + x) / 3, (py + y + y) / 3, px = x, py = y);\n break;\n case 'C':\n path.push(params[i++], params[i++], params[i++], params[i++], px = params[i++], py = params[i++]);\n break;\n case 'Z':\n path.push((px + px + sx) / 3, (py + py + sy) / 3, (px + sx + sx) / 3, (py + sy + sy) / 3, px = sx, py = sy);\n break;\n }\n });\n return paths;\n };\n Path2D.cubicPathToString = function (path) {\n var n = path.length;\n if (!(n % 2 === 0 && (n / 2 - 1) / 2 >= 1)) {\n throw new Error('Invalid path.');\n }\n return 'M' + path.slice(0, 2).join(',') + 'C' + path.slice(2).join(',');\n };\n Path2D.splitCommandsRe = /(?=[AaCcHhLlMmQqSsTtVvZz])/g;\n Path2D.matchParamsRe = /-?[0-9]*\\.?\\d+/g;\n Path2D.quadraticCommandRe = /[QqTt]/;\n Path2D.cubicCommandRe = /[CcSs]/;\n Path2D.xmlDeclaration = '';\n Path2D.xmlns = 'http://www.w3.org/2000/svg';\n return Path2D;\n}());\nexport { Path2D };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Shape } from \"./shape\";\nimport { Path2D } from \"../path2D\";\nvar Path = /** @class */ (function (_super) {\n __extends(Path, _super);\n function Path() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\n * Declare a path to retain for later rendering and hit testing\n * using custom Path2D class. Think of it as a TypeScript version\n * of the native Path2D (with some differences) that works in all browsers.\n */\n _this.path = new Path2D();\n /**\n * The path only has to be updated when certain attributes change.\n * For example, if transform attributes (such as `translationX`)\n * are changed, we don't have to update the path. The `dirtyPath` flag\n * is how we keep track if the path has to be updated or not.\n */\n _this._dirtyPath = true;\n /**\n * Path definition in SVG path syntax:\n * https://www.w3.org/TR/SVG11/paths.html#DAttribute\n */\n _this._svgPath = '';\n return _this;\n }\n Object.defineProperty(Path.prototype, \"dirtyPath\", {\n get: function () {\n return this._dirtyPath;\n },\n set: function (value) {\n if (this._dirtyPath !== value) {\n this._dirtyPath = value;\n if (value) {\n this.dirty = true;\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Path.prototype, \"svgPath\", {\n get: function () {\n return this._svgPath;\n },\n set: function (value) {\n if (this._svgPath !== value) {\n this._svgPath = value;\n this.path.setFromString(value);\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Path.prototype.isPointInPath = function (x, y) {\n var point = this.transformPoint(x, y);\n return this.path.closedPath && this.path.isPointInPath(point.x, point.y);\n };\n Path.prototype.isPointInStroke = function (x, y) {\n return false;\n };\n Path.prototype.updatePath = function () { };\n Path.prototype.render = function (ctx) {\n if (this.dirtyTransform) {\n this.computeTransformMatrix();\n }\n // if (scene.debug.renderBoundingBoxes) {\n // const bbox = this.computeBBox();\n // if (bbox) {\n // this.matrix.transformBBox(bbox).render(ctx);\n // }\n // }\n this.matrix.toContext(ctx);\n if (this.dirtyPath) {\n this.updatePath();\n this.dirtyPath = false;\n }\n this.path.draw(ctx);\n this.fillStroke(ctx);\n this.dirty = false;\n };\n Path.className = 'Path';\n return Path;\n}(Shape));\nexport { Path };\n","var twoPi = Math.PI * 2;\n/**\n * Normalize the given angle to be in the [0, 2π) interval.\n * @param radians Angle in radians.\n */\nexport function normalizeAngle360(radians) {\n radians %= twoPi;\n radians += twoPi;\n radians %= twoPi;\n return radians;\n}\nexport function normalizeAngle360Inclusive(radians) {\n radians %= twoPi;\n radians += twoPi;\n if (radians !== twoPi) {\n radians %= twoPi;\n }\n return radians;\n}\n/**\n * Normalize the given angle to be in the [-π, π) interval.\n * @param radians Angle in radians.\n */\nexport function normalizeAngle180(radians) {\n radians %= twoPi;\n if (radians < -Math.PI) {\n radians += twoPi;\n }\n else if (radians >= Math.PI) {\n radians -= twoPi;\n }\n return radians;\n}\nexport function toRadians(degrees) {\n return degrees / 180 * Math.PI;\n}\nexport function toDegrees(radians) {\n return radians / Math.PI * 180;\n}\n","export function isEqual(a, b, epsilon) {\n if (epsilon === void 0) { epsilon = 1e-10; }\n return Math.abs(a - b) < epsilon;\n}\n/**\n * `Number.toFixed(n)` always formats a number so that it has `n` digits after the decimal point.\n * For example, `Number(0.00003427).toFixed(2)` returns `0.00`.\n * That's not very helpful, because all the meaningful information is lost.\n * In this case we would want the formatted value to have at least two significant digits: `0.000034`,\n * not two fraction digits.\n * @param value\n * @param fractionOrSignificantDigits\n */\nexport function toFixed(value, fractionOrSignificantDigits) {\n if (fractionOrSignificantDigits === void 0) { fractionOrSignificantDigits = 2; }\n var power = Math.floor(Math.log(Math.abs(value)) / Math.LN10);\n if (power >= 0 || !isFinite(power)) {\n return value.toFixed(fractionOrSignificantDigits); // fraction digits\n }\n return value.toFixed(Math.abs(power) - 1 + fractionOrSignificantDigits); // significant digits\n}\nvar numberUnits = ['', 'K', 'M', 'B', 'T'];\nexport function log10(x) {\n return Math.log(x) * Math.LOG10E;\n}\n/**\n * Returns the mathematically correct n modulus of m. For context, the JS % operator is remainder\n * NOT modulus, which is why this is needed.\n */\nexport function mod(n, m) {\n // https://stackoverflow.com/a/13163436\n var remain = n % m;\n return remain >= 0 ? remain : (remain + m);\n}\nexport var EPSILON = Number.EPSILON || Math.pow(2, -52);\nexport function toReadableNumber(value, fractionDigits) {\n if (fractionDigits === void 0) { fractionDigits = 2; }\n // For example: toReadableNumber(10550000000) yields \"10.6B\"\n var prefix = '';\n if (value <= 0) {\n value = -value;\n prefix = '-';\n }\n var thousands = ~~(log10(value) / log10(1000)); // discard the floating point part\n return prefix + (value / Math.pow(1000.0, thousands)).toFixed(fractionDigits) + numberUnits[thousands];\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Shape } from \"./shape\";\nimport { Path } from \"./path\";\nimport { BBox } from \"../bbox\";\nimport { normalizeAngle360 } from \"../../util/angle\";\nimport { chainObjects } from \"../../util/object\";\nimport { isEqual } from \"../../util/number\";\nexport var ArcType;\n(function (ArcType) {\n ArcType[ArcType[\"Open\"] = 0] = \"Open\";\n ArcType[ArcType[\"Chord\"] = 1] = \"Chord\";\n ArcType[ArcType[\"Round\"] = 2] = \"Round\";\n})(ArcType || (ArcType = {}));\n/**\n * Elliptical arc node.\n */\nvar Arc = /** @class */ (function (_super) {\n __extends(Arc, _super);\n function Arc() {\n var _this = _super.call(this) || this;\n _this._centerX = 0;\n _this._centerY = 0;\n _this._radiusX = 10;\n _this._radiusY = 10;\n _this._startAngle = 0;\n _this._endAngle = Math.PI * 2;\n _this._counterClockwise = false;\n /**\n * The type of arc to render:\n * - {@link ArcType.Open} - end points of the arc segment are not connected (default)\n * - {@link ArcType.Chord} - end points of the arc segment are connected by a line segment\n * - {@link ArcType.Round} - each of the end points of the arc segment are connected\n * to the center of the arc\n * Arcs with {@link ArcType.Open} do not support hit testing, even if they have their\n * {@link Shape.fillStyle} set, because they are not closed paths. Hit testing support\n * would require using two paths - one for rendering, another for hit testing - and there\n * doesn't seem to be a compelling reason to do that, when one can just use {@link ArcType.Chord}\n * to create a closed path.\n */\n _this._type = ArcType.Open;\n _this.restoreOwnStyles();\n return _this;\n }\n Object.defineProperty(Arc.prototype, \"centerX\", {\n get: function () {\n return this._centerX;\n },\n set: function (value) {\n if (this._centerX !== value) {\n this._centerX = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Arc.prototype, \"centerY\", {\n get: function () {\n return this._centerY;\n },\n set: function (value) {\n if (this._centerY !== value) {\n this._centerY = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Arc.prototype, \"radiusX\", {\n get: function () {\n return this._radiusX;\n },\n set: function (value) {\n if (this._radiusX !== value) {\n this._radiusX = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Arc.prototype, \"radiusY\", {\n get: function () {\n return this._radiusY;\n },\n set: function (value) {\n if (this._radiusY !== value) {\n this._radiusY = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Arc.prototype, \"startAngle\", {\n get: function () {\n return this._startAngle;\n },\n set: function (value) {\n if (this._startAngle !== value) {\n this._startAngle = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Arc.prototype, \"endAngle\", {\n get: function () {\n return this._endAngle;\n },\n set: function (value) {\n if (this._endAngle !== value) {\n this._endAngle = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Arc.prototype, \"fullPie\", {\n get: function () {\n return isEqual(normalizeAngle360(this.startAngle), normalizeAngle360(this.endAngle));\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Arc.prototype, \"counterClockwise\", {\n get: function () {\n return this._counterClockwise;\n },\n set: function (value) {\n if (this._counterClockwise !== value) {\n this._counterClockwise = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Arc.prototype, \"type\", {\n get: function () {\n return this._type;\n },\n set: function (value) {\n if (this._type !== value) {\n this._type = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Arc.prototype.updatePath = function () {\n var path = this.path;\n path.clear(); // No need to recreate the Path, can simply clear the existing one.\n // This is much faster than the native Path2D implementation even though this `cubicArc`\n // method is pure TypeScript and actually produces the definition of an elliptical arc,\n // where you can specify two radii and rotation, while Path2D's `arc` method simply produces\n // a circular arc. Maybe it's due to the experimental nature of the Path2D class,\n // maybe it's because we have to create a new instance of it on each render, who knows...\n path.cubicArc(this.centerX, this.centerY, this.radiusX, this.radiusY, 0, this.startAngle, this.endAngle, this.counterClockwise ? 1 : 0);\n if (this.type === ArcType.Chord) {\n path.closePath();\n }\n else if (this.type === ArcType.Round && !this.fullPie) {\n path.lineTo(this.centerX, this.centerY);\n path.closePath();\n }\n };\n Arc.prototype.computeBBox = function () {\n // Only works with full arcs (circles) and untransformed ellipses.\n return new BBox(this.centerX - this.radiusX, this.centerY - this.radiusY, this.radiusX * 2, this.radiusY * 2);\n };\n Arc.prototype.isPointInPath = function (x, y) {\n var point = this.transformPoint(x, y);\n var bbox = this.computeBBox();\n return this.type !== ArcType.Open\n && bbox.containsPoint(point.x, point.y)\n && this.path.isPointInPath(point.x, point.y);\n };\n Arc.className = 'Arc';\n Arc.defaultStyles = chainObjects(Shape.defaultStyles, {\n lineWidth: 1,\n fillStyle: null\n });\n return Arc;\n}(Path));\nexport { Arc };\n","var doOnceFlags = {};\n/**\n * If the key was passed before, then doesn't execute the func\n * @param {Function} func\n * @param {string} key\n */\nexport function doOnce(func, key) {\n if (doOnceFlags[key]) {\n return;\n }\n func();\n doOnceFlags[key] = true;\n}\n","var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nimport { Group } from \"./scene/group\";\nimport { Selection } from \"./scene/selection\";\nimport { Line } from \"./scene/shape/line\";\nimport { Text } from \"./scene/shape/text\";\nimport { Arc } from \"./scene/shape/arc\";\nimport { BBox } from \"./scene/bbox\";\nimport { Matrix } from \"./scene/matrix\";\nimport { createId } from \"./util/id\";\nimport { normalizeAngle360, normalizeAngle360Inclusive, toRadians } from \"./util/angle\";\nimport { doOnce } from \"./util/function\";\nimport { ContinuousScale } from \"./scale/continuousScale\";\n// import { Rect } from \"./scene/shape/rect\"; // debug (bbox)\nvar Tags;\n(function (Tags) {\n Tags[Tags[\"Tick\"] = 0] = \"Tick\";\n Tags[Tags[\"GridLine\"] = 1] = \"GridLine\";\n})(Tags || (Tags = {}));\nvar AxisTick = /** @class */ (function () {\n function AxisTick() {\n /**\n * The line width to be used by axis ticks.\n */\n this.width = 1;\n /**\n * The line length to be used by axis ticks.\n */\n this.size = 6;\n /**\n * The color of the axis ticks.\n * Use `undefined` rather than `rgba(0, 0, 0, 0)` to make the ticks invisible.\n */\n this.color = 'rgba(195, 195, 195, 1)';\n /**\n * A hint of how many ticks to use (the exact number of ticks might differ),\n * a `TimeInterval` or a `CountableTimeInterval`.\n * For example:\n *\n * axis.tick.count = 5;\n * axis.tick.count = year;\n * axis.tick.count = month.every(6);\n */\n this.count = undefined;\n }\n return AxisTick;\n}());\nexport { AxisTick };\nvar AxisLabel = /** @class */ (function () {\n function AxisLabel() {\n this.fontStyle = undefined;\n this.fontWeight = undefined;\n this.fontSize = 12;\n this.fontFamily = 'Verdana, sans-serif';\n /**\n * The padding between the labels and the ticks.\n */\n this.padding = 5;\n /**\n * The color of the labels.\n * Use `undefined` rather than `rgba(0, 0, 0, 0)` to make labels invisible.\n */\n this.color = 'rgba(87, 87, 87, 1)';\n /**\n * Custom label rotation in degrees.\n * Labels are rendered perpendicular to the axis line by default.\n * Or parallel to the axis line, if the {@link parallel} is set to `true`.\n * The value of this config is used as the angular offset/deflection\n * from the default rotation.\n */\n this.rotation = undefined;\n /**\n * If specified and axis labels may collide, they are rotated to reduce collisions. If the\n * `rotation` property is specified, it takes precedence.\n */\n this.autoRotate = undefined;\n /**\n * Rotation angle to use when autoRotate is applied.\n */\n this.autoRotateAngle = 335;\n /**\n * By default labels and ticks are positioned to the left of the axis line.\n * `true` positions the labels to the right of the axis line.\n * However, if the axis is rotated, it's easier to think in terms\n * of this side or the opposite side, rather than left and right.\n * We use the term `mirror` for conciseness, although it's not\n * true mirroring - for example, when a label is rotated, so that\n * it is inclined at the 45 degree angle, text flowing from north-west\n * to south-east, ending at the tick to the left of the axis line,\n * and then we set this config to `true`, the text will still be flowing\n * from north-west to south-east, _starting_ at the tick to the right\n * of the axis line.\n */\n this.mirrored = false;\n /**\n * Labels are rendered perpendicular to the axis line by default.\n * Setting this config to `true` makes labels render parallel to the axis line\n * and center aligns labels' text at the ticks.\n */\n this.parallel = false;\n /**\n * In case {@param value} is a number, the {@param fractionDigits} parameter will\n * be provided as well. The `fractionDigits` corresponds to the number of fraction\n * digits used by the tick step. For example, if the tick step is `0.0005`,\n * the `fractionDigits` is 4.\n */\n this.formatter = undefined;\n this.onFormatChange = undefined;\n }\n Object.defineProperty(AxisLabel.prototype, \"format\", {\n get: function () {\n return this._format;\n },\n set: function (value) {\n // See `TimeLocaleObject` docs for the list of supported format directives.\n if (this._format !== value) {\n this._format = value;\n if (this.onFormatChange) {\n this.onFormatChange(value);\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n return AxisLabel;\n}());\nexport { AxisLabel };\n/**\n * A general purpose linear axis with no notion of orientation.\n * The axis is always rendered vertically, with horizontal labels positioned to the left\n * of the axis line by default. The axis can be {@link rotation | rotated} by an arbitrary angle,\n * so that it can be used as a top, right, bottom, left, radial or any other kind\n * of linear axis.\n * The generic `D` parameter is the type of the domain of the axis' scale.\n * The output range of the axis' scale is always numeric (screen coordinates).\n */\nvar Axis = /** @class */ (function () {\n function Axis(scale) {\n // debug (bbox)\n // private bboxRect = (() => {\n // const rect = new Rect();\n // rect.fill = undefined;\n // rect.stroke = 'red';\n // rect.strokeWidth = 1;\n // rect.strokeOpacity = 0.2;\n // return rect;\n // })();\n this.id = createId(this);\n this.lineNode = new Line();\n this.group = new Group();\n this.line = {\n width: 1,\n color: 'rgba(195, 195, 195, 1)'\n };\n this.tick = new AxisTick();\n this.label = new AxisLabel();\n this.translation = { x: 0, y: 0 };\n this.rotation = 0; // axis rotation angle in degrees\n this._labelAutoRotated = false;\n /**\n * This will be assigned a value when `this.calculateTickCount` is invoked.\n * If the user has specified a tick count, it will be used, otherwise a tick count will be calculated based on the available range.\n */\n this._calculatedTickCount = undefined;\n this.requestedRange = [0, 1];\n this._visibleRange = [0, 1];\n this._title = undefined;\n /**\n * The length of the grid. The grid is only visible in case of a non-zero value.\n * In case {@link radialGrid} is `true`, the value is interpreted as an angle\n * (in degrees).\n */\n this._gridLength = 0;\n /**\n * The array of styles to cycle through when rendering grid lines.\n * For example, use two {@link GridStyle} objects for alternating styles.\n * Contains only one {@link GridStyle} object by default, meaning all grid lines\n * have the same style.\n */\n this.gridStyle = [{\n stroke: 'rgba(219, 219, 219, 1)',\n lineDash: [4, 2]\n }];\n /**\n * `false` - render grid as lines of {@link gridLength} that extend the ticks\n * on the opposite side of the axis\n * `true` - render grid as concentric circles that go through the ticks\n */\n this._radialGrid = false;\n this.fractionDigits = 0;\n this.thickness = 0;\n this.scale = scale;\n this.groupSelection = Selection.select(this.group).selectAll();\n this.label.onFormatChange = this.onLabelFormatChange.bind(this);\n this.group.append(this.lineNode);\n // this.group.append(this.bboxRect); // debug (bbox)\n }\n Object.defineProperty(Axis.prototype, \"scale\", {\n get: function () {\n return this._scale;\n },\n set: function (value) {\n this._scale = value;\n this.requestedRange = value.range.slice();\n this.onLabelFormatChange();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Axis.prototype, \"ticks\", {\n get: function () {\n return this._ticks;\n },\n set: function (values) {\n this._ticks = values;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Axis.prototype, \"labelAutoRotated\", {\n get: function () {\n return this._labelAutoRotated;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Axis.prototype, \"calculatedTickCount\", {\n get: function () {\n var _a;\n return _a = this._calculatedTickCount, (_a !== null && _a !== void 0 ? _a : this.tick.count);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Overridden in ChartAxis subclass.\n * Sets an appropriate tick count based on the available range.\n */\n Axis.prototype.calculateTickCount = function (availableRange) { };\n /**\n * Meant to be overridden in subclasses to provide extra context the the label formatter.\n * The return value of this function will be passed to the laber.formatter as the `axis` parameter.\n */\n Axis.prototype.getMeta = function () { };\n Axis.prototype.updateRange = function () {\n var _a = this, rr = _a.requestedRange, vr = _a.visibleRange, scale = _a.scale;\n var span = (rr[1] - rr[0]) / (vr[1] - vr[0]);\n var shift = span * vr[0];\n var start = rr[0] - shift;\n scale.range = [start, start + span];\n };\n /**\n * Checks if a point or an object is in range.\n * @param x A point (or object's starting point).\n * @param width Object's width.\n * @param tolerance Expands the range on both ends by this amount.\n */\n Axis.prototype.inRange = function (x, width, tolerance) {\n if (width === void 0) { width = 0; }\n if (tolerance === void 0) { tolerance = 0; }\n return this.inRangeEx(x, width, tolerance) === 0;\n };\n Axis.prototype.inRangeEx = function (x, width, tolerance) {\n if (width === void 0) { width = 0; }\n if (tolerance === void 0) { tolerance = 0; }\n var range = this.range;\n // Account for inverted ranges, for example [500, 100] as well as [100, 500]\n var min = Math.min(range[0], range[1]);\n var max = Math.max(range[0], range[1]);\n if ((x + width) < (min - tolerance)) {\n return -1; // left of range\n }\n if (x > (max + tolerance)) {\n return 1; // right of range\n }\n return 0; // in range\n };\n Object.defineProperty(Axis.prototype, \"range\", {\n get: function () {\n return this.requestedRange.slice();\n },\n set: function (value) {\n this.requestedRange = value.slice();\n this.updateRange();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Axis.prototype, \"visibleRange\", {\n get: function () {\n return this._visibleRange.slice();\n },\n set: function (value) {\n if (value && value.length === 2) {\n var _a = __read(value, 2), min = _a[0], max = _a[1];\n min = Math.max(0, min);\n max = Math.min(1, max);\n min = Math.min(min, max);\n max = Math.max(min, max);\n this._visibleRange = [min, max];\n this.updateRange();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Axis.prototype, \"domain\", {\n get: function () {\n return this.scale.domain.slice();\n },\n set: function (value) {\n this.scale.domain = value.slice();\n this.onLabelFormatChange(this.label.format);\n },\n enumerable: true,\n configurable: true\n });\n Axis.prototype.onLabelFormatChange = function (format) {\n if (format && this.scale && this.scale.tickFormat) {\n try {\n this.labelFormatter = this.scale.tickFormat(this.calculatedTickCount, format);\n }\n catch (e) {\n this.labelFormatter = undefined;\n doOnce(function () { return console.warn(\"AG Charts - the axis label format string \" + format + \" is invalid. No formatting will be applied\"); }, \"invalid axis label format string \" + format);\n }\n }\n else {\n this.labelFormatter = undefined;\n }\n };\n Object.defineProperty(Axis.prototype, \"title\", {\n get: function () {\n return this._title;\n },\n set: function (value) {\n var oldTitle = this._title;\n if (oldTitle !== value) {\n if (oldTitle) {\n this.group.removeChild(oldTitle.node);\n }\n if (value) {\n value.node.rotation = -Math.PI / 2;\n this.group.appendChild(value.node);\n }\n this._title = value;\n // position title so that it doesn't briefly get rendered in the top left hand corner of the canvas before update is called.\n this.positionTitle();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Axis.prototype, \"gridLength\", {\n get: function () {\n return this._gridLength;\n },\n set: function (value) {\n // Was visible and now invisible, or was invisible and now visible.\n if (this._gridLength && !value || !this._gridLength && value) {\n this.groupSelection = this.groupSelection.remove().setData([]);\n }\n this._gridLength = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Axis.prototype, \"radialGrid\", {\n get: function () {\n return this._radialGrid;\n },\n set: function (value) {\n if (this._radialGrid !== value) {\n this._radialGrid = value;\n this.groupSelection = this.groupSelection.remove().setData([]);\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Creates/removes/updates the scene graph nodes that constitute the axis.\n * Supposed to be called _manually_ after changing _any_ of the axis properties.\n * This allows to bulk set axis properties before updating the nodes.\n * The node changes made by this method are rendered on the next animation frame.\n * We could schedule this method call automatically on the next animation frame\n * when any of the axis properties change (the way we do when properties of scene graph's\n * nodes change), but this will mean that we first wait for the next animation\n * frame to make changes to the nodes of the axis, then wait for another animation\n * frame to render those changes. It's nice to have everything update automatically,\n * but this extra level of async indirection will not just introduce an unwanted delay,\n * it will also make it harder to reason about the program.\n */\n Axis.prototype.update = function () {\n var _this = this;\n var _a = this, group = _a.group, scale = _a.scale, tick = _a.tick, label = _a.label, gridStyle = _a.gridStyle, requestedRange = _a.requestedRange;\n var requestedRangeMin = Math.min(requestedRange[0], requestedRange[1]);\n var requestedRangeMax = Math.max(requestedRange[0], requestedRange[1]);\n var rotation = toRadians(this.rotation);\n var labelRotation = label.rotation ? normalizeAngle360(toRadians(label.rotation)) : 0;\n var parallelLabels = label.parallel;\n var labelAutoRotation = 0;\n group.translationX = this.translation.x;\n group.translationY = this.translation.y;\n group.rotation = rotation;\n var halfBandwidth = (scale.bandwidth || 0) / 2;\n // The side of the axis line to position the labels on.\n // -1 = left (default)\n // 1 = right\n var sideFlag = label.mirrored ? 1 : -1;\n // When labels are parallel to the axis line, the `parallelFlipFlag` is used to\n // flip the labels to avoid upside-down text, when the axis is rotated\n // such that it is in the right hemisphere, i.e. the angle of rotation\n // is in the [0, π] interval.\n // The rotation angle is normalized, so that we have an easier time checking\n // if it's in the said interval. Since the axis is always rendered vertically\n // and then rotated, zero rotation means 12 (not 3) o-clock.\n // -1 = flip\n // 1 = don't flip (default)\n var parallelFlipRotation = normalizeAngle360(rotation);\n var parallelFlipFlag = !labelRotation && parallelFlipRotation >= 0 && parallelFlipRotation <= Math.PI ? -1 : 1;\n var regularFlipRotation = normalizeAngle360(rotation - Math.PI / 2);\n // Flip if the axis rotation angle is in the top hemisphere.\n var regularFlipFlag = !labelRotation && regularFlipRotation >= 0 && regularFlipRotation <= Math.PI ? -1 : 1;\n var ticks = this.ticks || scale.ticks(this.calculatedTickCount);\n var update = this.groupSelection.setData(ticks);\n update.exit.remove();\n var enter = update.enter.append(Group);\n // Line auto-snaps to pixel grid if vertical or horizontal.\n enter.append(Line).each(function (node) { return node.tag = Tags.Tick; });\n if (this.gridLength) {\n if (this.radialGrid) {\n enter.append(Arc).each(function (node) { return node.tag = Tags.GridLine; });\n }\n else {\n enter.append(Line).each(function (node) { return node.tag = Tags.GridLine; });\n }\n }\n enter.append(Text);\n var groupSelection = update.merge(enter);\n var anyVisible = false;\n groupSelection\n .attrFn('translationY', function (_, datum) {\n return Math.round(scale.convert(datum) + halfBandwidth);\n })\n .attrFn('visible', function (node) {\n var min = Math.floor(requestedRangeMin);\n var max = Math.ceil(requestedRangeMax);\n var visible = (min !== max) && node.translationY >= min && node.translationY <= max;\n anyVisible = visible || anyVisible;\n return visible;\n });\n this.group.visible = anyVisible;\n if (!anyVisible) {\n this.groupSelection = groupSelection;\n return;\n }\n // `ticks instanceof NumericTicks` doesn't work here, so we feature detect.\n this.fractionDigits = ticks.fractionDigits >= 0 ? ticks.fractionDigits : 0;\n // Update properties that affect the size of the axis labels and measure the labels\n var labelBboxes = new Map();\n var labelCount = 0;\n var halfFirstLabelLength = false;\n var halfLastLabelLength = false;\n var availableRange = requestedRangeMax - requestedRangeMin;\n var labelSelection = groupSelection.selectByClass(Text)\n .each(function (node, datum, index) {\n node.fontStyle = label.fontStyle;\n node.fontWeight = label.fontWeight;\n node.fontSize = label.fontSize;\n node.fontFamily = label.fontFamily;\n node.fill = label.color;\n node.text = _this.formatTickDatum(datum, index);\n node.visible = node.parent.visible;\n if (node.visible !== true) {\n return;\n }\n labelBboxes.set(index, node.computeBBox());\n if (node.text === '' || node.text == undefined) {\n return;\n }\n labelCount++;\n if (index === 0 && (node.translationY === scale.range[0])) {\n halfFirstLabelLength = true; // first label protrudes axis line\n }\n else if (index === ticks.length - 1 && (node.translationY === scale.range[1])) {\n halfLastLabelLength = true; // last label protrudes axis line\n }\n });\n var labelX = sideFlag * (tick.size + label.padding);\n var step = availableRange / labelCount;\n var calculateLabelsLength = function (bboxes, useWidth) {\n var e_1, _a;\n var totalLength = 0;\n var rotate = false;\n var lastIdx = bboxes.size - 1;\n var padding = 12;\n try {\n for (var _b = __values(bboxes.entries()), _c = _b.next(); !_c.done; _c = _b.next()) {\n var _d = __read(_c.value, 2), i = _d[0], bbox = _d[1];\n var divideBy = (i === 0 && halfFirstLabelLength) || (i === lastIdx && halfLastLabelLength) ? 2 : 1;\n var length_1 = useWidth ? bbox.width / divideBy : bbox.height / divideBy;\n var lengthWithPadding = length_1 <= 0 ? 0 : length_1 + padding;\n totalLength += lengthWithPadding;\n if (lengthWithPadding > step) {\n rotate = true;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return { totalLength: totalLength, rotate: rotate };\n };\n var useWidth = parallelLabels; // When the labels are parallel to the axis line, use the width of the text to calculate the total length of all labels\n var _b = calculateLabelsLength(labelBboxes, useWidth), totalLabelLength = _b.totalLength, rotate = _b.rotate;\n this._labelAutoRotated = false;\n if (label.rotation === undefined && label.autoRotate === true && rotate) {\n // When no user label rotation angle has been specified and the width of any label exceeds the average tick gap (`rotate` is `true`),\n // automatically rotate the labels\n labelAutoRotation = normalizeAngle360(toRadians(label.autoRotateAngle));\n this._labelAutoRotated = true;\n }\n if (labelRotation || labelAutoRotation) {\n // If the label rotation angle results in a non-parallel orientation, use the height of the texts to calculate the total length of all labels\n if (parallelLabels) {\n useWidth = (labelRotation === Math.PI) || (labelAutoRotation === Math.PI) ? true : false;\n }\n else {\n useWidth = labelRotation === Math.PI / 2 || labelRotation === (Math.PI + Math.PI / 2) || labelAutoRotation === Math.PI / 2 || labelAutoRotation === (Math.PI + Math.PI / 2) ? true : false;\n }\n totalLabelLength = calculateLabelsLength(labelBboxes, useWidth).totalLength;\n }\n var autoRotation = parallelLabels\n ? parallelFlipFlag * Math.PI / 2\n : (regularFlipFlag === -1 ? Math.PI : 0);\n var labelTextBaseline = parallelLabels && !labelRotation\n ? (sideFlag * parallelFlipFlag === -1 ? 'hanging' : 'bottom')\n : 'middle';\n var alignFlag = (labelRotation > 0 && labelRotation <= Math.PI) || (labelAutoRotation > 0 && labelAutoRotation <= Math.PI) ? -1 : 1;\n var labelTextAlign = parallelLabels\n ? labelRotation || labelAutoRotation ? (sideFlag * alignFlag === -1 ? 'end' : 'start') : 'center'\n : sideFlag * regularFlipFlag === -1 ? 'end' : 'start';\n labelSelection.each(function (label) {\n if (label.text === '' || label.text == undefined) {\n label.visible = false; // hide empty labels\n return;\n }\n label.textBaseline = labelTextBaseline;\n label.textAlign = labelTextAlign;\n label.x = labelX;\n label.rotationCenterX = labelX;\n label.rotation = autoRotation + labelRotation + labelAutoRotation;\n });\n if (totalLabelLength > availableRange) {\n var isContinuous_1 = scale instanceof ContinuousScale;\n var averageLabelLength = totalLabelLength / labelCount;\n var labelsToShow = Math.floor(availableRange / averageLabelLength);\n var showEvery_1 = labelsToShow > 2 ? Math.ceil(labelCount / labelsToShow) : labelCount;\n var visibleLabelIndex_1 = 0;\n labelSelection.each(function (label, _, index) {\n if (label.visible !== true) {\n return;\n }\n var forceVisible = isContinuous_1 && _this.tick.count === undefined ? index === 0 || index === labelCount - 1 : false; // always show first and last labels for a continuous axis when tick count has not been specified by the user\n label.visible = forceVisible || visibleLabelIndex_1 % showEvery_1 === 0 ? true : false;\n visibleLabelIndex_1++;\n if (!label.visible) {\n labelBboxes.delete(index);\n }\n });\n }\n groupSelection.selectByTag(Tags.Tick)\n .each(function (line, _, index) {\n line.strokeWidth = tick.width;\n line.stroke = tick.color;\n line.visible = labelBboxes.has(index);\n })\n .attr('x1', sideFlag * tick.size)\n .attr('x2', 0)\n .attr('y1', 0)\n .attr('y2', 0);\n if (this.gridLength && gridStyle.length) {\n var styleCount_1 = gridStyle.length;\n var gridLines = void 0;\n if (this.radialGrid) {\n var angularGridLength_1 = normalizeAngle360Inclusive(toRadians(this.gridLength));\n gridLines = groupSelection.selectByTag(Tags.GridLine)\n .each(function (arc, datum, index) {\n var radius = Math.round(scale.convert(datum) + halfBandwidth);\n arc.centerX = 0;\n arc.centerY = scale.range[0] - radius;\n arc.endAngle = angularGridLength_1;\n arc.radiusX = radius;\n arc.radiusY = radius;\n arc.visible = labelBboxes.has(index);\n });\n }\n else {\n gridLines = groupSelection.selectByTag(Tags.GridLine)\n .each(function (line, _, index) {\n line.x1 = 0;\n line.x2 = -sideFlag * _this.gridLength;\n line.y1 = 0;\n line.y2 = 0;\n line.visible = Math.abs(line.parent.translationY - scale.range[0]) > 1 && labelBboxes.has(index);\n });\n }\n gridLines.each(function (gridLine, _, index) {\n var style = gridStyle[index % styleCount_1];\n gridLine.stroke = style.stroke;\n gridLine.strokeWidth = tick.width;\n gridLine.lineDash = style.lineDash;\n gridLine.fill = undefined;\n });\n }\n this.groupSelection = groupSelection;\n // Render axis line.\n var lineNode = this.lineNode;\n lineNode.x1 = 0;\n lineNode.x2 = 0;\n lineNode.y1 = requestedRange[0];\n lineNode.y2 = requestedRange[1];\n lineNode.strokeWidth = this.line.width;\n lineNode.stroke = this.line.color;\n lineNode.visible = ticks.length > 0;\n this.positionTitle();\n // debug (bbox)\n // const bbox = this.computeBBox();\n // const bboxRect = this.bboxRect;\n // bboxRect.x = bbox.x;\n // bboxRect.y = bbox.y;\n // bboxRect.width = bbox.width;\n // bboxRect.height = bbox.height;\n };\n Axis.prototype.positionTitle = function () {\n var _a = this, title = _a.title, lineNode = _a.lineNode;\n if (!title) {\n return;\n }\n var titleVisible = false;\n if (title.enabled && lineNode.visible) {\n titleVisible = true;\n var _b = this, label = _b.label, rotation = _b.rotation, requestedRange = _b.requestedRange;\n var sideFlag = label.mirrored ? 1 : -1;\n var parallelFlipRotation = normalizeAngle360(rotation);\n var padding = title.padding.bottom;\n var titleNode = title.node;\n var bbox = this.computeBBox({ excludeTitle: true });\n var titleRotationFlag = sideFlag === -1 && parallelFlipRotation > Math.PI && parallelFlipRotation < Math.PI * 2 ? -1 : 1;\n titleNode.rotation = titleRotationFlag * sideFlag * Math.PI / 2;\n // titleNode.x = titleRotationFlag * sideFlag * (lineNode.y1 + lineNode.y2) / 2; // TODO: remove?\n titleNode.x = titleRotationFlag * sideFlag * (requestedRange[0] + requestedRange[1]) / 2;\n if (sideFlag === -1) {\n titleNode.y = titleRotationFlag * (-padding - bbox.width + Math.max(bbox.x + bbox.width, 0));\n }\n else {\n titleNode.y = -padding - bbox.width - Math.min(bbox.x, 0);\n }\n titleNode.textBaseline = titleRotationFlag === 1 ? 'bottom' : 'top';\n }\n title.node.visible = titleVisible;\n };\n // For formatting (nice rounded) tick values.\n Axis.prototype.formatTickDatum = function (datum, index) {\n var _a = this, label = _a.label, labelFormatter = _a.labelFormatter, fractionDigits = _a.fractionDigits;\n var meta = this.getMeta();\n return label.formatter\n ? label.formatter({\n value: fractionDigits >= 0 ? datum : String(datum),\n index: index,\n fractionDigits: fractionDigits,\n formatter: labelFormatter,\n axis: meta\n })\n : labelFormatter\n ? labelFormatter(datum)\n : typeof datum === 'number' && fractionDigits >= 0\n // the `datum` is a floating point number\n ? datum.toFixed(fractionDigits)\n // the`datum` is an integer, a string or an object\n : String(datum);\n };\n // For formatting arbitrary values between the ticks.\n Axis.prototype.formatDatum = function (datum) {\n return String(datum);\n };\n Axis.prototype.computeBBox = function (options) {\n var _a = this, title = _a.title, lineNode = _a.lineNode;\n var labels = this.groupSelection.selectByClass(Text);\n var left = Infinity;\n var right = -Infinity;\n var top = Infinity;\n var bottom = -Infinity;\n labels.each(function (label) {\n // The label itself is rotated, but not translated, the group that\n // contains it is. So to capture the group transform in the label bbox\n // calculation we combine the transform matrices of the label and the group.\n // Depending on the timing of the `axis.computeBBox()` method call, we may\n // not have the group's and the label's transform matrices updated yet (because\n // the transform matrix is not recalculated whenever a node's transform attributes\n // change, instead it's marked for recalculation on the next frame by setting\n // the node's `dirtyTransform` flag to `true`), so we force them to update\n // right here by calling `computeTransformMatrix`.\n label.computeTransformMatrix();\n var matrix = Matrix.flyweight(label.matrix);\n var group = label.parent;\n group.computeTransformMatrix();\n matrix.preMultiplySelf(group.matrix);\n var labelBBox = label.computeBBox();\n if (labelBBox) {\n var bbox = matrix.transformBBox(labelBBox);\n left = Math.min(left, bbox.x);\n right = Math.max(right, bbox.x + bbox.width);\n top = Math.min(top, bbox.y);\n bottom = Math.max(bottom, bbox.y + bbox.height);\n }\n });\n if (title && title.enabled && lineNode.visible && (!options || !options.excludeTitle)) {\n var label = title.node;\n label.computeTransformMatrix();\n var matrix = Matrix.flyweight(label.matrix);\n var labelBBox = label.computeBBox();\n if (labelBBox) {\n var bbox = matrix.transformBBox(labelBBox);\n left = Math.min(left, bbox.x);\n right = Math.max(right, bbox.x + bbox.width);\n top = Math.min(top, bbox.y);\n bottom = Math.max(bottom, bbox.y + bbox.height);\n }\n }\n left = Math.min(left, 0);\n right = Math.max(right, 0);\n top = Math.min(top, lineNode.y1, lineNode.y2);\n bottom = Math.max(bottom, lineNode.y1, lineNode.y2);\n return new BBox(left, top, right - left, bottom - top);\n };\n return Axis;\n}());\nexport { Axis };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Axis } from \"../axis\";\nimport { LinearScale } from \"../scale/linearScale\";\nexport var ChartAxisDirection;\n(function (ChartAxisDirection) {\n ChartAxisDirection[\"X\"] = \"x\";\n ChartAxisDirection[\"Y\"] = \"y\"; // means 'radius' in polar charts\n})(ChartAxisDirection || (ChartAxisDirection = {}));\nexport function flipChartAxisDirection(direction) {\n if (direction === ChartAxisDirection.X) {\n return ChartAxisDirection.Y;\n }\n else {\n return ChartAxisDirection.X;\n }\n}\nexport var ChartAxisPosition;\n(function (ChartAxisPosition) {\n ChartAxisPosition[\"Top\"] = \"top\";\n ChartAxisPosition[\"Right\"] = \"right\";\n ChartAxisPosition[\"Bottom\"] = \"bottom\";\n ChartAxisPosition[\"Left\"] = \"left\";\n ChartAxisPosition[\"Angle\"] = \"angle\";\n ChartAxisPosition[\"Radius\"] = \"radius\";\n})(ChartAxisPosition || (ChartAxisPosition = {}));\nvar ChartAxis = /** @class */ (function (_super) {\n __extends(ChartAxis, _super);\n function ChartAxis() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.keys = [];\n _this.direction = ChartAxisDirection.Y;\n _this.boundSeries = [];\n _this._position = ChartAxisPosition.Left;\n return _this;\n }\n Object.defineProperty(ChartAxis.prototype, \"type\", {\n get: function () {\n return this.constructor.type || '';\n },\n enumerable: true,\n configurable: true\n });\n ChartAxis.prototype.getMeta = function () {\n return {\n id: this.id,\n direction: this.direction,\n boundSeries: this.boundSeries,\n };\n };\n ChartAxis.prototype.useCalculatedTickCount = function () {\n // We only want to use the new algorithm for number axes. Category axes don't use a\n // calculated or user-supplied tick-count, and time axes need special handling depending on\n // the time-range involved.\n return this.scale instanceof LinearScale;\n };\n /**\n * For continuous axes, if tick count has not been specified, set the number of ticks based on the available range\n */\n ChartAxis.prototype.calculateTickCount = function (availableRange) {\n if (!this.useCalculatedTickCount()) {\n return;\n }\n // Approximate number of pixels to allocate for each tick.\n var optimalRangePx = 600;\n var optimalTickInteralPx = 70;\n var tickIntervalRatio = Math.pow(Math.log(availableRange) / Math.log(optimalRangePx), 2);\n var tickInterval = optimalTickInteralPx * tickIntervalRatio;\n this._calculatedTickCount = this.tick.count || Math.max(2, Math.floor(availableRange / tickInterval));\n };\n Object.defineProperty(ChartAxis.prototype, \"position\", {\n get: function () {\n return this._position;\n },\n set: function (value) {\n if (this._position !== value) {\n this._position = value;\n switch (value) {\n case ChartAxisPosition.Top:\n this.direction = ChartAxisDirection.X;\n this.rotation = -90;\n this.label.mirrored = true;\n this.label.parallel = true;\n break;\n case ChartAxisPosition.Right:\n this.direction = ChartAxisDirection.Y;\n this.rotation = 0;\n this.label.mirrored = true;\n this.label.parallel = false;\n break;\n case ChartAxisPosition.Bottom:\n this.direction = ChartAxisDirection.X;\n this.rotation = -90;\n this.label.mirrored = false;\n this.label.parallel = true;\n break;\n case ChartAxisPosition.Left:\n this.direction = ChartAxisDirection.Y;\n this.rotation = 0;\n this.label.mirrored = false;\n this.label.parallel = false;\n break;\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n return ChartAxis;\n}(Axis));\nexport { ChartAxis };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { calculateNiceSecondaryAxis } from \"../../util/secondaryAxisTicks\";\nimport { LinearScale } from \"../../scale/linearScale\";\nimport { extent } from \"../../util/array\";\nimport { isContinuous } from \"../../util/value\";\nimport { ChartAxis } from \"../chartAxis\";\nimport { doOnce } from \"../../util/function\";\n// Instead of clamping the values outside of domain to the range,\n// return NaNs to indicate invalid input.\nexport function clamper(domain) {\n var _a;\n var a = domain[0];\n var b = domain[domain.length - 1];\n if (a > b) {\n _a = __read([b, a], 2), a = _a[0], b = _a[1];\n }\n return function (x) { return x >= a && x <= b ? x : NaN; };\n}\nvar NumberAxis = /** @class */ (function (_super) {\n __extends(NumberAxis, _super);\n function NumberAxis() {\n var _this = _super.call(this, new LinearScale()) || this;\n _this._nice = true;\n _this._min = NaN;\n _this._max = NaN;\n _this.scale.clamper = clamper;\n return _this;\n }\n Object.defineProperty(NumberAxis.prototype, \"nice\", {\n get: function () {\n return this._nice;\n },\n set: function (value) {\n if (this._nice !== value) {\n this._nice = value;\n if (value && this.scale.nice) {\n this.scale.nice(typeof this.calculatedTickCount === 'number' ? this.calculatedTickCount : undefined);\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n NumberAxis.prototype.setDomain = function (domain, primaryTickCount) {\n var _a = this, scale = _a.scale, min = _a.min, max = _a.max;\n if (domain.length > 2) {\n domain = extent(domain, isContinuous, Number) || [0, 1];\n }\n domain = [\n isNaN(min) ? domain[0] : min,\n isNaN(max) ? domain[1] : max\n ];\n if (primaryTickCount) {\n // when `primaryTickCount` is supplied the current axis is a secondary axis which needs to be aligned to\n // the primary by constraining the tick count to the primary axis tick count\n var _b = __read(calculateNiceSecondaryAxis(domain, primaryTickCount), 2), d = _b[0], ticks = _b[1];\n scale.domain = d;\n this.ticks = ticks;\n return;\n }\n else {\n scale.domain = domain;\n this.onLabelFormatChange(this.label.format); // not sure why this is required?\n this.scale.clamp = true;\n if (this.nice && this.scale.nice) {\n this.scale.nice(typeof this.calculatedTickCount === 'number' ? this.calculatedTickCount : undefined);\n }\n }\n };\n Object.defineProperty(NumberAxis.prototype, \"domain\", {\n get: function () {\n return this.scale.domain;\n },\n set: function (domain) {\n this.setDomain(domain);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NumberAxis.prototype, \"min\", {\n get: function () {\n return this._min;\n },\n set: function (value) {\n if (this._min !== value) {\n this._min = value;\n if (!isNaN(value)) {\n this.scale.domain = [value, this.scale.domain[1]];\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NumberAxis.prototype, \"max\", {\n get: function () {\n return this._max;\n },\n set: function (value) {\n if (this._max !== value) {\n this._max = value;\n if (!isNaN(value)) {\n this.scale.domain = [this.scale.domain[0], value];\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n NumberAxis.prototype.formatDatum = function (datum) {\n if (typeof datum === \"number\") {\n return datum.toFixed(2);\n }\n else {\n doOnce(function () { return console.warn('AG Charts - Data contains Date objects which are being plotted against a number axis, please only use a number axis for numbers.'); }, \"number axis config used with Date objects\");\n return String(datum);\n }\n };\n NumberAxis.className = 'NumberAxis';\n NumberAxis.type = 'number';\n return NumberAxis;\n}(ChartAxis));\nexport { NumberAxis };\n","var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\n/**\n * Maps a discrete domain to a continuous numeric range.\n * See https://github.com/d3/d3-scale#band-scales for more info.\n */\nvar BandScale = /** @class */ (function () {\n function BandScale() {\n this.type = 'band';\n /**\n * Maps datum to its index in the {@link domain} array.\n * Used to check for duplicate datums (not allowed).\n */\n this.index = new Map();\n /**\n * The output range values for datum at each index.\n */\n this.ordinalRange = [];\n /**\n * Contains unique datums only. Since `{}` is used in place of `Map`\n * for IE11 compatibility, the datums are converted `toString` before\n * the uniqueness check.\n */\n this._domain = [];\n this._range = [0, 1];\n this._bandwidth = 1;\n /**\n * The ratio of the range that is reserved for space between bands.\n */\n this._paddingInner = 0;\n /**\n * The ratio of the range that is reserved for space before the first\n * and after the last band.\n */\n this._paddingOuter = 0;\n this._round = false;\n /**\n * How the leftover range is distributed.\n * `0.5` - equal distribution of space before the first and after the last band,\n * with bands effectively centered within the range.\n */\n this._align = 0.5;\n }\n Object.defineProperty(BandScale.prototype, \"domain\", {\n get: function () {\n return this._domain;\n },\n set: function (values) {\n var domain = this._domain;\n domain.length = 0;\n this.index = new Map();\n var index = this.index;\n // In case one wants to have duplicate domain values, for example, two 'Italy' categories,\n // one should use objects rather than strings for domain values like so:\n // { toString: () => 'Italy' }\n // { toString: () => 'Italy' }\n values.forEach(function (value) {\n if (index.get(value) === undefined) {\n index.set(value, domain.push(value) - 1);\n }\n });\n this.rescale();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BandScale.prototype, \"range\", {\n get: function () {\n return this._range;\n },\n set: function (values) {\n this._range[0] = values[0];\n this._range[1] = values[1];\n this.rescale();\n },\n enumerable: true,\n configurable: true\n });\n BandScale.prototype.ticks = function () {\n return this._domain;\n };\n BandScale.prototype.convert = function (d) {\n var i = this.index.get(d);\n if (i === undefined) {\n return NaN;\n }\n var r = this.ordinalRange[i];\n if (r === undefined) {\n return NaN;\n }\n return r;\n };\n Object.defineProperty(BandScale.prototype, \"bandwidth\", {\n get: function () {\n return this._bandwidth;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BandScale.prototype, \"padding\", {\n get: function () {\n return this._paddingInner;\n },\n set: function (value) {\n value = Math.max(0, Math.min(1, value));\n this._paddingInner = value;\n this._paddingOuter = value;\n this.rescale();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BandScale.prototype, \"paddingInner\", {\n get: function () {\n return this._paddingInner;\n },\n set: function (value) {\n this._paddingInner = Math.max(0, Math.min(1, value)); // [0, 1]\n this.rescale();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BandScale.prototype, \"paddingOuter\", {\n get: function () {\n return this._paddingOuter;\n },\n set: function (value) {\n this._paddingOuter = Math.max(0, Math.min(1, value)); // [0, 1]\n this.rescale();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BandScale.prototype, \"round\", {\n get: function () {\n return this._round;\n },\n set: function (value) {\n this._round = value;\n this.rescale();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BandScale.prototype, \"align\", {\n get: function () {\n return this._align;\n },\n set: function (value) {\n this._align = Math.max(0, Math.min(1, value)); // [0, 1]\n this.rescale();\n },\n enumerable: true,\n configurable: true\n });\n BandScale.prototype.rescale = function () {\n var _a;\n var n = this._domain.length;\n if (!n) {\n return;\n }\n var _b = __read(this._range, 2), a = _b[0], b = _b[1];\n var reversed = b < a;\n if (reversed) {\n _a = __read([b, a], 2), a = _a[0], b = _a[1];\n }\n var step = (b - a) / Math.max(1, n - this._paddingInner + this._paddingOuter * 2);\n if (this._round) {\n step = Math.floor(step);\n }\n a += (b - a - step * (n - this._paddingInner)) * this._align;\n this._bandwidth = step * (1 - this._paddingInner);\n if (this._round) {\n a = Math.round(a);\n this._bandwidth = Math.round(this._bandwidth);\n }\n var values = [];\n for (var i = 0; i < n; i++) {\n values.push(a + step * i);\n }\n this.ordinalRange = reversed ? values.reverse() : values;\n };\n return BandScale;\n}());\nexport { BandScale };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { BandScale } from \"../../scale/bandScale\";\nimport { ChartAxis } from \"../chartAxis\";\nvar CategoryAxis = /** @class */ (function (_super) {\n __extends(CategoryAxis, _super);\n function CategoryAxis() {\n var _this = _super.call(this, new BandScale()) || this;\n _this.scale.paddingInner = 0.2;\n _this.scale.paddingOuter = 0.3;\n return _this;\n }\n Object.defineProperty(CategoryAxis.prototype, \"paddingInner\", {\n get: function () {\n return this.scale.paddingInner;\n },\n set: function (value) {\n this.scale.paddingInner = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CategoryAxis.prototype, \"paddingOuter\", {\n get: function () {\n return this.scale.paddingOuter;\n },\n set: function (value) {\n this.scale.paddingOuter = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CategoryAxis.prototype, \"domain\", {\n get: function () {\n return this.scale.domain.slice();\n },\n set: function (values) {\n // Prevent duplicate categories.\n this.scale.domain = values\n .filter(function (s, i, arr) { return arr.indexOf(s) === i; });\n },\n enumerable: true,\n configurable: true\n });\n CategoryAxis.className = 'CategoryAxis';\n CategoryAxis.type = 'category';\n return CategoryAxis;\n}(ChartAxis));\nexport { CategoryAxis };\n","import { find } from \"../util/array\";\n/**\n * The tree layout is calculated in abstract x/y coordinates, where the root is at (0, 0)\n * and the tree grows downward from the root.\n */\nvar TreeNode = /** @class */ (function () {\n function TreeNode(label, parent, number) {\n if (label === void 0) { label = ''; }\n if (number === void 0) { number = 0; }\n this.x = 0;\n this.y = 0;\n this.subtreeLeft = NaN;\n this.subtreeRight = NaN;\n this.screenX = 0;\n this.screenY = 0;\n this.children = [];\n this.leafCount = 0;\n this.prelim = 0;\n this.mod = 0;\n this.ancestor = this;\n this.change = 0;\n this.shift = 0;\n this.label = label;\n // screenX and screenY are meant to be recomputed from (layout) x and y\n // when the tree is resized (without performing another layout)\n this.parent = parent;\n this.depth = parent ? parent.depth + 1 : 0;\n this.number = number;\n }\n TreeNode.prototype.getLeftSibling = function () {\n return this.number > 0 && this.parent ? this.parent.children[this.number - 1] : undefined;\n };\n TreeNode.prototype.getLeftmostSibling = function () {\n return this.number > 0 && this.parent ? this.parent.children[0] : undefined;\n };\n // traverse the left contour of a subtree, return the successor of v on this contour\n TreeNode.prototype.nextLeft = function () {\n return this.children ? this.children[0] : this.thread;\n };\n // traverse the right contour of a subtree, return the successor of v on this contour\n TreeNode.prototype.nextRight = function () {\n return this.children ? this.children[this.children.length - 1] : this.thread;\n };\n TreeNode.prototype.getSiblings = function () {\n var _this = this;\n return this.parent ? this.parent.children.filter(function (_, i) { return i !== _this.number; }) : [];\n };\n return TreeNode;\n}());\n/**\n * Converts an array of ticks, where each tick has an array of labels, to a label tree.\n * If `pad` is `true`, will ensure that every branch matches the depth of the tree by\n * creating empty labels.\n */\nexport function ticksToTree(ticks, pad) {\n if (pad === void 0) { pad = true; }\n var root = new TreeNode();\n var depth = 0;\n if (pad) {\n ticks.forEach(function (tick) { return depth = Math.max(depth, tick.labels.length); });\n }\n ticks.forEach(function (tick) {\n if (pad) {\n while (tick.labels.length < depth) {\n tick.labels.unshift('');\n }\n }\n insertTick(root, tick);\n });\n return root;\n}\nfunction insertTick(root, tick) {\n var pathParts = tick.labels.slice().reverse(); // path elements from root to leaf label\n var lastPartIndex = pathParts.length - 1;\n pathParts.forEach(function (pathPart, partIndex) {\n var children = root.children;\n var existingNode = find(children, function (child) { return child.label === pathPart; });\n var isNotLeaf = partIndex !== lastPartIndex;\n if (existingNode && isNotLeaf) { // the isNotLeaf check is to allow duplicate leafs\n root = existingNode;\n }\n else {\n var node = new TreeNode(pathPart, root);\n node.number = children.length;\n children.push(node);\n if (isNotLeaf) {\n root = node;\n }\n }\n });\n}\n// Shift the subtree.\nfunction moveSubtree(wm, wp, shift) {\n var subtrees = wp.number - wm.number;\n var ratio = shift / subtrees;\n wp.change -= ratio;\n wp.shift += shift;\n wm.change += ratio;\n wp.prelim += shift;\n wp.mod += shift;\n}\nfunction ancestor(vim, v, defaultAncestor) {\n return v.getSiblings().indexOf(vim.ancestor) >= 0 ? vim.ancestor : defaultAncestor;\n}\n// Spaces out the children.\nfunction executeShifts(v) {\n var children = v.children;\n if (children) {\n var shift = 0;\n var change = 0;\n for (var i = children.length - 1; i >= 0; i--) {\n var w = children[i];\n w.prelim += shift;\n w.mod += shift;\n change += w.change;\n shift += w.shift + change;\n }\n }\n}\n// Moves current subtree with v as the root if some nodes are conflicting in space.\nfunction apportion(v, defaultAncestor, distance) {\n var w = v.getLeftSibling();\n if (w) {\n var vop = v;\n var vip = v;\n var vim = w;\n var vom = vip.getLeftmostSibling();\n var sip = vip.mod;\n var sop = vop.mod;\n var sim = vim.mod;\n var som = vom.mod;\n while (vim.nextRight() && vip.nextLeft()) {\n vim = vim.nextRight();\n vip = vip.nextLeft();\n vom = vom.nextLeft();\n vop = vop.nextRight();\n vop.ancestor = v;\n var shift = (vim.prelim + sim) - (vip.prelim + sip) + distance;\n if (shift > 0) {\n moveSubtree(ancestor(vim, v, defaultAncestor), v, shift);\n sip += shift;\n sop += shift;\n }\n sim += vim.mod;\n sip += vip.mod;\n som += vom.mod;\n sop += vop.mod;\n }\n if (vim.nextRight() && !vop.nextRight()) {\n vop.thread = vim.nextRight();\n vop.mod += sim - sop;\n }\n else {\n if (vip.nextLeft() && !vom.nextLeft()) {\n vom.thread = vip.nextLeft();\n vom.mod += sip - som;\n }\n defaultAncestor = v;\n }\n }\n return defaultAncestor;\n}\n// Compute the preliminary x-coordinate of node and its children (recursively).\nfunction firstWalk(node, distance) {\n var children = node.children;\n if (children.length) {\n var defaultAncestor_1 = children[0];\n children.forEach(function (child) {\n firstWalk(child, distance);\n defaultAncestor_1 = apportion(child, defaultAncestor_1, distance);\n });\n executeShifts(node);\n var midpoint = (children[0].prelim + children[children.length - 1].prelim) / 2;\n var leftSibling = node.getLeftSibling();\n if (leftSibling) {\n node.prelim = leftSibling.prelim + distance;\n node.mod = node.prelim - midpoint;\n }\n else {\n node.prelim = midpoint;\n }\n }\n else {\n var leftSibling = node.getLeftSibling();\n node.prelim = leftSibling ? leftSibling.prelim + distance : 0;\n }\n}\nvar Dimensions = /** @class */ (function () {\n function Dimensions() {\n this.top = Infinity;\n this.right = -Infinity;\n this.bottom = -Infinity;\n this.left = Infinity;\n }\n Dimensions.prototype.update = function (node, xy) {\n var _a = xy(node), x = _a.x, y = _a.y;\n if (x > this.right) {\n this.right = x;\n }\n if (x < this.left) {\n this.left = x;\n }\n if (y > this.bottom) {\n this.bottom = y;\n }\n if (y < this.top) {\n this.top = y;\n }\n };\n return Dimensions;\n}());\nfunction secondWalk(v, m, layout) {\n v.x = v.prelim + m;\n v.y = v.depth;\n layout.update(v);\n v.children.forEach(function (w) { return secondWalk(w, m + v.mod, layout); });\n}\n// After the second walk the parent nodes are positioned at the center of their immediate children.\n// If we want the parent nodes to be positioned at the center of the subtree for which they are roots,\n// we need a third walk to adjust the positions.\nfunction thirdWalk(v) {\n var children = v.children;\n var leafCount = 0;\n children.forEach(function (w) {\n thirdWalk(w);\n if (w.children.length) {\n leafCount += w.leafCount;\n }\n else {\n leafCount++;\n }\n });\n v.leafCount = leafCount;\n if (children.length) {\n v.subtreeLeft = children[0].subtreeLeft;\n v.subtreeRight = children[v.children.length - 1].subtreeRight;\n v.x = (v.subtreeLeft + v.subtreeRight) / 2;\n }\n else {\n v.subtreeLeft = v.x;\n v.subtreeRight = v.x;\n }\n}\nexport function treeLayout(root) {\n var layout = new TreeLayout;\n firstWalk(root, 1);\n secondWalk(root, -root.prelim, layout);\n thirdWalk(root);\n return layout;\n}\nvar TreeLayout = /** @class */ (function () {\n function TreeLayout() {\n this.dimensions = new Dimensions;\n this.leafCount = 0;\n this.nodes = [];\n // One might want to process leaf nodes separately from the rest of the tree.\n // For example, position labels corresponding to leafs vertically, rather than horizontally.\n this.leafNodes = [];\n this.nonLeafNodes = [];\n this.depth = 0;\n }\n TreeLayout.prototype.update = function (node) {\n this.dimensions.update(node, function (node) { return ({ x: node.x, y: node.y }); });\n if (!node.children.length) {\n this.leafCount++;\n this.leafNodes.push(node);\n }\n else {\n this.nonLeafNodes.push(node);\n }\n if (node.depth > this.depth) {\n this.depth = node.depth;\n }\n this.nodes.push(node);\n };\n TreeLayout.prototype.resize = function (width, height, shiftX, shiftY, flipX) {\n if (shiftX === void 0) { shiftX = 0; }\n if (shiftY === void 0) { shiftY = 0; }\n if (flipX === void 0) { flipX = false; }\n var xSteps = this.leafCount - 1;\n var ySteps = this.depth;\n var dimensions = this.dimensions;\n var scalingX = 1;\n var scalingY = 1;\n if (width > 0 && xSteps) {\n var existingSpacingX = (dimensions.right - dimensions.left) / xSteps;\n var desiredSpacingX = width / xSteps;\n scalingX = desiredSpacingX / existingSpacingX;\n if (flipX) {\n scalingX = -scalingX;\n }\n }\n if (height > 0 && ySteps) {\n var existingSpacingY = (dimensions.bottom - dimensions.top) / ySteps;\n var desiredSpacingY = height / ySteps;\n scalingY = desiredSpacingY / existingSpacingY;\n }\n var screenDimensions = new Dimensions();\n this.nodes.forEach(function (node) {\n node.screenX = node.x * scalingX;\n node.screenY = node.y * scalingY;\n screenDimensions.update(node, function (node) { return ({ x: node.screenX, y: node.screenY }); });\n });\n // Normalize so that root top and leftmost leaf left start at zero.\n var offsetX = -screenDimensions.left;\n var offsetY = -screenDimensions.top;\n this.nodes.forEach(function (node) {\n node.screenX += offsetX + shiftX;\n node.screenY += offsetY + shiftY;\n });\n };\n return TreeLayout;\n}());\nexport { TreeLayout };\nfunction logTree(root, formatter) {\n root.children.forEach(function (child) { return logTree(child, formatter); });\n if (formatter) {\n console.log(formatter(root));\n }\n else {\n console.log(root);\n }\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Selection } from \"../../scene/selection\";\nimport { Line } from \"../../scene/shape/line\";\nimport { normalizeAngle360, toRadians } from \"../../util/angle\";\nimport { Text } from \"../../scene/shape/text\";\nimport { BBox } from \"../../scene/bbox\";\nimport { Matrix } from \"../../scene/matrix\";\n// import { Rect } from \"../../scene/shape/rect\"; debug (bbox)\nimport { BandScale } from \"../../scale/bandScale\";\nimport { ticksToTree, treeLayout } from \"../../layout/tree\";\nimport { AxisLabel } from \"../../axis\";\nimport { ChartAxis } from \"../chartAxis\";\nvar GroupedCategoryAxisLabel = /** @class */ (function (_super) {\n __extends(GroupedCategoryAxisLabel, _super);\n function GroupedCategoryAxisLabel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.grid = false;\n return _this;\n }\n return GroupedCategoryAxisLabel;\n}(AxisLabel));\nvar GroupedCategoryAxis = /** @class */ (function (_super) {\n __extends(GroupedCategoryAxis, _super);\n function GroupedCategoryAxis() {\n var _this = _super.call(this, new BandScale()) || this;\n // Label scale (labels are positionsed between ticks, tick count = label count + 1).\n // We don't call is `labelScale` for consistency with other axes.\n _this.tickScale = new BandScale();\n _this.longestSeparatorLength = 0;\n _this.translation = {\n x: 0,\n y: 0\n };\n /**\n * Axis rotation angle in degrees.\n */\n _this.rotation = 0;\n _this.line = {\n width: 1,\n color: 'rgba(195, 195, 195, 1)'\n };\n // readonly tick = new AxisTick();\n _this.label = new GroupedCategoryAxisLabel();\n /**\n * The color of the labels.\n * Use `undefined` rather than `rgba(0, 0, 0, 0)` to make labels invisible.\n */\n _this.labelColor = 'rgba(87, 87, 87, 1)';\n var _a = _this, group = _a.group, tickScale = _a.tickScale, scale = _a.scale;\n scale.paddingOuter = 0.1;\n scale.paddingInner = scale.paddingOuter * 2;\n _this.requestedRange = scale.range.slice();\n _this.scale = scale;\n tickScale.paddingInner = 1;\n tickScale.paddingOuter = 0;\n _this.gridLineSelection = Selection.select(group).selectAll();\n _this.axisLineSelection = Selection.select(group).selectAll();\n _this.separatorSelection = Selection.select(group).selectAll();\n _this.labelSelection = Selection.select(group).selectAll();\n return _this;\n // this.group.append(this.bboxRect); // debug (bbox)\n }\n Object.defineProperty(GroupedCategoryAxis.prototype, \"domain\", {\n get: function () {\n return this.scale.domain;\n },\n set: function (domainValues) {\n // Prevent duplicate categories.\n var values = domainValues.filter(function (s, i, arr) { return arr.indexOf(s) === i; });\n this.scale.domain = values;\n var tickTree = ticksToTree(values);\n this.tickTreeLayout = treeLayout(tickTree);\n var domain = values.slice();\n domain.push('');\n this.tickScale.domain = domain;\n this.resizeTickTree();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(GroupedCategoryAxis.prototype, \"range\", {\n get: function () {\n return this.requestedRange.slice();\n },\n set: function (value) {\n this.requestedRange = value.slice();\n this.updateRange();\n },\n enumerable: true,\n configurable: true\n });\n GroupedCategoryAxis.prototype.updateRange = function () {\n var _a = this, rr = _a.requestedRange, vr = _a.visibleRange, scale = _a.scale;\n var span = (rr[1] - rr[0]) / (vr[1] - vr[0]);\n var shift = span * vr[0];\n var start = rr[0] - shift;\n this.tickScale.range = scale.range = [start, start + span];\n this.resizeTickTree();\n };\n GroupedCategoryAxis.prototype.resizeTickTree = function () {\n var s = this.scale;\n var range = s.domain.length ? [s.convert(s.domain[0]), s.convert(s.domain[s.domain.length - 1])] : s.range;\n var layout = this.tickTreeLayout;\n var lineHeight = this.lineHeight;\n if (layout) {\n layout.resize(Math.abs(range[1] - range[0]), layout.depth * lineHeight, (Math.min(range[0], range[1]) || 0) + (s.bandwidth || 0) / 2, -layout.depth * lineHeight, (range[1] - range[0]) < 0);\n }\n };\n Object.defineProperty(GroupedCategoryAxis.prototype, \"lineHeight\", {\n get: function () {\n return this.label.fontSize * 1.5;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(GroupedCategoryAxis.prototype, \"gridLength\", {\n get: function () {\n return this._gridLength;\n },\n /**\n * The length of the grid. The grid is only visible in case of a non-zero value.\n */\n set: function (value) {\n // Was visible and now invisible, or was invisible and now visible.\n if (this._gridLength && !value || !this._gridLength && value) {\n this.gridLineSelection = this.gridLineSelection.remove().setData([]);\n this.labelSelection = this.labelSelection.remove().setData([]);\n }\n this._gridLength = value;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Creates/removes/updates the scene graph nodes that constitute the axis.\n * Supposed to be called _manually_ after changing _any_ of the axis properties.\n * This allows to bulk set axis properties before updating the nodes.\n * The node changes made by this method are rendered on the next animation frame.\n * We could schedule this method call automatically on the next animation frame\n * when any of the axis properties change (the way we do when properties of scene graph's\n * nodes change), but this will mean that we first wait for the next animation\n * frame to make changes to the nodes of the axis, then wait for another animation\n * frame to render those changes. It's nice to have everything update automatically,\n * but this extra level of async indirection will not just introduce an unwanted delay,\n * it will also make it harder to reason about the program.\n */\n GroupedCategoryAxis.prototype.update = function () {\n var _this = this;\n var _a = this, group = _a.group, scale = _a.scale, label = _a.label, tickScale = _a.tickScale, requestedRange = _a.requestedRange;\n var rangeStart = scale.range[0];\n var rangeEnd = scale.range[1];\n var rangeLength = Math.abs(rangeEnd - rangeStart);\n var bandwidth = (rangeLength / scale.domain.length) || 0;\n var parallelLabels = label.parallel;\n var rotation = toRadians(this.rotation);\n var isHorizontal = Math.abs(Math.cos(rotation)) < 1e-8;\n var labelRotation = this.label.rotation ? normalizeAngle360(toRadians(this.label.rotation)) : 0;\n group.translationX = this.translation.x;\n group.translationY = this.translation.y;\n group.rotation = rotation;\n var title = this.title;\n // The Text `node` of the Caption is not used to render the title of the grouped category axis.\n // The phantom root of the tree layout is used instead.\n if (title) {\n title.node.visible = false;\n }\n var lineHeight = this.lineHeight;\n // Render ticks and labels.\n var tickTreeLayout = this.tickTreeLayout;\n var labels = scale.ticks();\n var treeLabels = tickTreeLayout ? tickTreeLayout.nodes : [];\n var isLabelTree = tickTreeLayout ? tickTreeLayout.depth > 1 : false;\n var ticks = tickScale.ticks();\n // The side of the axis line to position the labels on.\n // -1 = left (default)\n // 1 = right\n var sideFlag = label.mirrored ? 1 : -1;\n // When labels are parallel to the axis line, the `parallelFlipFlag` is used to\n // flip the labels to avoid upside-down text, when the axis is rotated\n // such that it is in the right hemisphere, i.e. the angle of rotation\n // is in the [0, π] interval.\n // The rotation angle is normalized, so that we have an easier time checking\n // if it's in the said interval. Since the axis is always rendered vertically\n // and then rotated, zero rotation means 12 (not 3) o-clock.\n // -1 = flip\n // 1 = don't flip (default)\n var parallelFlipRotation = normalizeAngle360(rotation);\n var parallelFlipFlag = (!labelRotation && parallelFlipRotation >= 0 && parallelFlipRotation <= Math.PI) ? -1 : 1;\n var regularFlipRotation = normalizeAngle360(rotation - Math.PI / 2);\n // Flip if the axis rotation angle is in the top hemisphere.\n var regularFlipFlag = (!labelRotation && regularFlipRotation >= 0 && regularFlipRotation <= Math.PI) ? -1 : 1;\n var updateGridLines = this.gridLineSelection.setData(this.gridLength ? ticks : []);\n updateGridLines.exit.remove();\n var enterGridLines = updateGridLines.enter.append(Line);\n var gridLineSelection = updateGridLines.merge(enterGridLines);\n var updateLabels = this.labelSelection.setData(treeLabels);\n updateLabels.exit.remove();\n var enterLabels = updateLabels.enter.append(Text);\n var labelSelection = updateLabels.merge(enterLabels);\n var labelFormatter = label.formatter;\n var labelBBoxes = new Map();\n var maxLeafLabelWidth = 0;\n labelSelection\n .each(function (node, datum, index) {\n node.fontStyle = label.fontStyle;\n node.fontWeight = label.fontWeight;\n node.fontSize = label.fontSize;\n node.fontFamily = label.fontFamily;\n node.fill = label.color;\n node.textBaseline = parallelFlipFlag === -1 ? 'bottom' : 'hanging';\n // label.textBaseline = parallelLabels && !labelRotation\n // ? (sideFlag * parallelFlipFlag === -1 ? 'hanging' : 'bottom')\n // : 'middle';\n node.textAlign = 'center';\n node.translationX = datum.screenY - label.fontSize * 0.25;\n node.translationY = datum.screenX;\n if (index === 0) { // use the phantom root as the axis title\n if (title && title.enabled && labels.length > 0) {\n node.visible = true;\n node.text = title.text;\n node.fontSize = title.fontSize;\n node.fontStyle = title.fontStyle;\n node.fontWeight = title.fontWeight;\n node.fontFamily = title.fontFamily;\n node.textBaseline = 'hanging';\n }\n else {\n node.visible = false;\n }\n }\n else {\n node.text = labelFormatter\n ? labelFormatter({\n value: String(datum.label),\n index: index\n })\n : String(datum.label);\n node.visible =\n datum.screenX >= requestedRange[0] &&\n datum.screenX <= requestedRange[1];\n }\n var bbox = node.computeBBox();\n labelBBoxes.set(node.id, bbox);\n if (bbox.width > maxLeafLabelWidth) {\n maxLeafLabelWidth = bbox.width;\n }\n });\n var labelX = sideFlag * label.padding;\n var autoRotation = parallelLabels\n ? parallelFlipFlag * Math.PI / 2\n : (regularFlipFlag === -1 ? Math.PI : 0);\n var labelGrid = this.label.grid;\n var separatorData = [];\n labelSelection.each(function (label, datum, index) {\n label.x = labelX;\n label.rotationCenterX = labelX;\n if (!datum.children.length) {\n label.rotation = labelRotation;\n label.textAlign = 'end';\n label.textBaseline = 'middle';\n var bbox = labelBBoxes.get(label.id);\n if (bbox && bbox.height > bandwidth) {\n label.visible = false;\n }\n }\n else {\n label.translationX -= maxLeafLabelWidth - lineHeight + _this.label.padding;\n var availableRange = datum.leafCount * bandwidth;\n var bbox = labelBBoxes.get(label.id);\n if (bbox && bbox.width > availableRange) {\n label.visible = false;\n }\n else if (isHorizontal) {\n label.rotation = autoRotation;\n }\n else {\n label.rotation = -Math.PI / 2;\n }\n }\n // Calculate positions of label separators for all nodes except the root.\n // Each separator is placed to the top of the current label.\n if (datum.parent && isLabelTree) {\n var y = !datum.children.length\n ? datum.screenX - bandwidth / 2\n : datum.screenX - datum.leafCount * bandwidth / 2;\n if (!datum.children.length) {\n if ((datum.number !== datum.children.length - 1) || labelGrid) {\n separatorData.push({\n y: y,\n x1: 0,\n x2: -maxLeafLabelWidth - _this.label.padding * 2,\n toString: function () { return String(index); }\n });\n }\n }\n else {\n var x = -maxLeafLabelWidth - _this.label.padding * 2 + datum.screenY;\n separatorData.push({\n y: y,\n x1: x + lineHeight,\n x2: x,\n toString: function () { return String(index); }\n });\n }\n }\n });\n // Calculate the position of the long separator on the far bottom of the axis.\n var minX = 0;\n separatorData.forEach(function (d) { return minX = Math.min(minX, d.x2); });\n this.longestSeparatorLength = Math.abs(minX);\n separatorData.push({\n y: Math.max(rangeStart, rangeEnd),\n x1: 0,\n x2: minX,\n toString: function () { return String(separatorData.length); }\n });\n var updateSeparators = this.separatorSelection.setData(separatorData);\n updateSeparators.exit.remove();\n var enterSeparators = updateSeparators.enter.append(Line);\n var separatorSelection = updateSeparators.merge(enterSeparators);\n this.separatorSelection = separatorSelection;\n var epsilon = 0.0000001;\n separatorSelection.each(function (line, datum, i) {\n line.x1 = datum.x1;\n line.x2 = datum.x2;\n line.y1 = datum.y;\n line.y2 = datum.y;\n line.visible = datum.y >= requestedRange[0] - epsilon && datum.y <= requestedRange[1] + epsilon;\n line.stroke = _this.tick.color;\n line.fill = undefined;\n line.strokeWidth = 1;\n });\n this.gridLineSelection = gridLineSelection;\n this.labelSelection = labelSelection;\n // Render axis lines.\n var lineCount = tickTreeLayout ? tickTreeLayout.depth + 1 : 1;\n var lines = [];\n for (var i = 0; i < lineCount; i++) {\n lines.push(i);\n }\n var updateAxisLines = this.axisLineSelection.setData(lines);\n updateAxisLines.exit.remove();\n var enterAxisLines = updateAxisLines.enter.append(Line);\n var axisLineSelection = updateAxisLines.merge(enterAxisLines);\n this.axisLineSelection = axisLineSelection;\n axisLineSelection.each(function (line, _, index) {\n var x = index > 0 ? -maxLeafLabelWidth - _this.label.padding * 2 - (index - 1) * lineHeight : 0;\n line.x1 = x;\n line.x2 = x;\n line.y1 = requestedRange[0];\n line.y2 = requestedRange[1];\n line.strokeWidth = _this.line.width;\n line.stroke = _this.line.color;\n line.visible = labels.length > 0 && (index === 0 || (labelGrid && isLabelTree));\n });\n if (this.gridLength) {\n var styles_1 = this.gridStyle;\n var styleCount_1 = styles_1.length;\n gridLineSelection\n .each(function (line, datum, index) {\n var y = Math.round(tickScale.convert(datum));\n line.x1 = 0;\n line.x2 = -sideFlag * _this.gridLength;\n line.y1 = y;\n line.y2 = y;\n line.visible = y >= requestedRange[0] && y <= requestedRange[1] &&\n Math.abs(line.parent.translationY - rangeStart) > 1;\n var style = styles_1[index % styleCount_1];\n line.stroke = style.stroke;\n line.strokeWidth = _this.tick.width;\n line.lineDash = style.lineDash;\n line.fill = undefined;\n });\n }\n // debug (bbox)\n // const bbox = this.computeBBox();\n // const bboxRect = this.bboxRect;\n // bboxRect.x = bbox.x;\n // bboxRect.y = bbox.y;\n // bboxRect.width = bbox.width;\n // bboxRect.height = bbox.height;\n };\n GroupedCategoryAxis.prototype.computeBBox = function (options) {\n var includeTitle = !options || !options.excludeTitle;\n var left = Infinity;\n var right = -Infinity;\n var top = Infinity;\n var bottom = -Infinity;\n this.labelSelection.each(function (label, _, index) {\n // The label itself is rotated, but not translated, the group that\n // contains it is. So to capture the group transform in the label bbox\n // calculation we combine the transform matrices of the label and the group.\n // Depending on the timing of the `axis.computeBBox()` method call, we may\n // not have the group's and the label's transform matrices updated yet (because\n // the transform matrix is not recalculated whenever a node's transform attributes\n // change, instead it's marked for recalculation on the next frame by setting\n // the node's `dirtyTransform` flag to `true`), so we force them to update\n // right here by calling `computeTransformMatrix`.\n if (index > 0 || includeTitle) { // first node is the root (title)\n label.computeTransformMatrix();\n var matrix = Matrix.flyweight(label.matrix);\n var labelBBox = label.computeBBox();\n if (labelBBox) {\n var bbox = matrix.transformBBox(labelBBox);\n left = Math.min(left, bbox.x);\n right = Math.max(right, bbox.x + bbox.width);\n top = Math.min(top, bbox.y);\n bottom = Math.max(bottom, bbox.y + bbox.height);\n }\n }\n });\n return new BBox(left, top, Math.max(right - left, this.longestSeparatorLength), bottom - top);\n };\n // debug (bbox)\n // private bboxRect = (() => {\n // const rect = new Rect();\n // rect.fill = undefined;\n // rect.stroke = 'red';\n // rect.strokeWidth = 1;\n // rect.strokeOpacity = 0.2;\n // return rect;\n // })();\n GroupedCategoryAxis.className = 'GroupedCategoryAxis';\n GroupedCategoryAxis.type = 'groupedCategory';\n return GroupedCategoryAxis;\n}(ChartAxis));\nexport { GroupedCategoryAxis };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar t0 = new Date;\nvar t1 = new Date;\n/**\n * The interval methods don't mutate Date parameters.\n */\nvar TimeInterval = /** @class */ (function () {\n function TimeInterval(floor, offset) {\n this._floor = floor;\n this._offset = offset;\n }\n /**\n * Returns a new date representing the latest interval boundary date before or equal to date.\n * For example, `day.floor(date)` typically returns 12:00 AM local time on the given date.\n * @param date\n */\n TimeInterval.prototype.floor = function (date) {\n date = new Date(+date);\n this._floor(date);\n return date;\n };\n /**\n * Returns a new date representing the earliest interval boundary date after or equal to date.\n * @param date\n */\n TimeInterval.prototype.ceil = function (date) {\n date = new Date(+date - 1);\n this._floor(date);\n this._offset(date, 1);\n this._floor(date);\n return date;\n };\n /**\n * Returns a new date representing the closest interval boundary date to date.\n * @param date\n */\n TimeInterval.prototype.round = function (date) {\n var d0 = this.floor(date);\n var d1 = this.ceil(date);\n var ms = +date;\n return ms - d0.getTime() < d1.getTime() - ms ? d0 : d1;\n };\n /**\n * Returns a new date equal to date plus step intervals.\n * @param date\n * @param step\n */\n TimeInterval.prototype.offset = function (date, step) {\n if (step === void 0) { step = 1; }\n date = new Date(+date);\n this._offset(date, Math.floor(step));\n return date;\n };\n /**\n * Returns an array of dates representing every interval boundary after or equal to start (inclusive) and before stop (exclusive).\n * @param start\n * @param stop\n * @param step\n */\n TimeInterval.prototype.range = function (start, stop, step) {\n if (step === void 0) { step = 1; }\n var range = [];\n start = this.ceil(start);\n step = Math.floor(step);\n if (start > stop || step <= 0) {\n return range;\n }\n var previous;\n do {\n previous = new Date(+start);\n range.push(previous);\n this._offset(start, step);\n this._floor(start);\n } while (previous < start && start < stop);\n return range;\n };\n // Returns an interval that is a subset of this interval.\n // For example, to create an interval that return 1st, 11th, 21st and 31st of each month:\n // day.filter(date => (date.getDate() - 1) % 10 === 0)\n TimeInterval.prototype.filter = function (test) {\n var _this = this;\n var floor = function (date) {\n if (date >= date) {\n while (_this._floor(date), !test(date)) {\n date.setTime(date.getTime() - 1);\n }\n }\n return date;\n };\n var offset = function (date, step) {\n if (date >= date) {\n if (step < 0) {\n while (++step <= 0) {\n do {\n _this._offset(date, -1);\n } while (!test(date));\n }\n }\n else {\n while (--step >= 0) {\n do {\n _this._offset(date, 1);\n } while (!test(date));\n }\n }\n }\n return date;\n };\n return new TimeInterval(floor, offset);\n };\n return TimeInterval;\n}());\nexport { TimeInterval };\nvar CountableTimeInterval = /** @class */ (function (_super) {\n __extends(CountableTimeInterval, _super);\n function CountableTimeInterval(floor, offset, count, field) {\n var _this = _super.call(this, floor, offset) || this;\n _this._count = count;\n _this._field = field;\n return _this;\n }\n /**\n * Returns the number of interval boundaries after start (exclusive) and before or equal to end (inclusive).\n * @param start\n * @param end\n */\n CountableTimeInterval.prototype.count = function (start, end) {\n t0.setTime(+start);\n t1.setTime(+end);\n this._floor(t0);\n this._floor(t1);\n return Math.floor(this._count(t0, t1));\n };\n /**\n * Returns a filtered view of this interval representing every step'th date.\n * The meaning of step is dependent on this interval’s parent interval as defined by the `field` function.\n * @param step\n */\n CountableTimeInterval.prototype.every = function (step) {\n var _this = this;\n var result;\n step = Math.floor(step);\n if (isFinite(step) && step > 0) {\n if (step > 1) {\n var field_1 = this._field;\n if (field_1) {\n result = this.filter(function (d) { return field_1(d) % step === 0; });\n }\n else {\n result = this.filter(function (d) { return _this.count(0, d) % step === 0; });\n }\n }\n else {\n result = this;\n }\n }\n return result;\n };\n return CountableTimeInterval;\n}(TimeInterval));\nexport { CountableTimeInterval };\n","import { CountableTimeInterval } from \"./interval\";\nfunction floor(date) {\n return date;\n}\nfunction offset(date, milliseconds) {\n date.setTime(date.getTime() + milliseconds);\n}\nfunction count(start, end) {\n return end.getTime() - start.getTime();\n}\nexport var millisecond = new CountableTimeInterval(floor, offset, count);\nexport default millisecond;\n","// Common time unit sizes in milliseconds.\nexport var durationSecond = 1000;\nexport var durationMinute = durationSecond * 60;\nexport var durationHour = durationMinute * 60;\nexport var durationDay = durationHour * 24;\nexport var durationWeek = durationDay * 7;\nexport var durationMonth = durationDay * 30;\nexport var durationYear = durationDay * 365;\n","import { CountableTimeInterval } from \"./interval\";\nimport { durationSecond } from \"./duration\";\nfunction floor(date) {\n date.setTime(date.getTime() - date.getMilliseconds());\n}\nfunction offset(date, seconds) {\n date.setTime(date.getTime() + seconds * durationSecond);\n}\nfunction count(start, end) {\n return (end.getTime() - start.getTime()) / durationSecond;\n}\nexport var second = new CountableTimeInterval(floor, offset, count);\nexport default second;\n","import { CountableTimeInterval } from \"./interval\";\nimport { durationMinute, durationSecond } from \"./duration\";\nfunction floor(date) {\n date.setTime(date.getTime() - date.getMilliseconds() - date.getSeconds() * durationSecond);\n}\nfunction offset(date, minutes) {\n date.setTime(date.getTime() + minutes * durationMinute);\n}\nfunction count(start, end) {\n return (end.getTime() - start.getTime()) / durationMinute;\n}\nfunction field(date) {\n return date.getMinutes();\n}\nexport var minute = new CountableTimeInterval(floor, offset, count, field);\nexport default minute;\n","import { CountableTimeInterval } from \"./interval\";\nimport { durationHour, durationMinute, durationSecond } from \"./duration\";\nfunction floor(date) {\n date.setTime(date.getTime() - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute);\n}\nfunction offset(date, hours) {\n date.setTime(date.getTime() + hours * durationHour);\n}\nfunction count(start, end) {\n return (end.getTime() - start.getTime()) / durationHour;\n}\nfunction field(date) {\n return date.getHours();\n}\nexport var hour = new CountableTimeInterval(floor, offset, count, field);\nexport default hour;\n","import { CountableTimeInterval } from \"./interval\";\nimport { durationDay, durationMinute } from \"./duration\";\nfunction floor(date) {\n date.setHours(0, 0, 0, 0);\n}\nfunction offset(date, days) {\n date.setDate(date.getDate() + days);\n}\nfunction count(start, end) {\n var tzMinuteDelta = end.getTimezoneOffset() - start.getTimezoneOffset();\n return (end.getTime() - start.getTime() - tzMinuteDelta * durationMinute) / durationDay;\n}\nfunction field(date) {\n return date.getDate() - 1;\n}\nexport var day = new CountableTimeInterval(floor, offset, count, field);\nexport default day;\n","import { durationMinute, durationWeek } from \"./duration\";\nimport { CountableTimeInterval } from \"./interval\";\n// Set date to n-th day of the week.\nfunction weekday(n) {\n // Sets the `date` to the start of the `n`-th day of the current week.\n // n == 0 is Sunday.\n function floor(date) {\n // 1..31 1..7\n date.setDate(date.getDate() - (date.getDay() + 7 - n) % 7);\n date.setHours(0, 0, 0, 0); // h, m, s, ms\n }\n // Offset the date by the given number of weeks.\n function offset(date, weeks) {\n date.setDate(date.getDate() + weeks * 7);\n }\n // Count the number of weeks between the start and end dates.\n function count(start, end) {\n var msDelta = end.getTime() - start.getTime();\n var tzMinuteDelta = end.getTimezoneOffset() - start.getTimezoneOffset();\n return (msDelta - tzMinuteDelta * durationMinute) / durationWeek;\n }\n return new CountableTimeInterval(floor, offset, count);\n}\nexport var sunday = weekday(0);\nexport var monday = weekday(1);\nexport var tuesday = weekday(2);\nexport var wednesday = weekday(3);\nexport var thursday = weekday(4);\nexport var friday = weekday(5);\nexport var saturday = weekday(6);\nexport default sunday;\n","import { CountableTimeInterval } from \"./interval\";\nfunction floor(date) {\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n}\nfunction offset(date, months) {\n date.setMonth(date.getMonth() + months);\n}\nfunction count(start, end) {\n return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n}\nfunction field(date) {\n return date.getMonth();\n}\nexport var month = new CountableTimeInterval(floor, offset, count, field);\nexport default month;\n","import { CountableTimeInterval } from \"./interval\";\nfunction floor(date) {\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n}\nfunction offset(date, years) {\n date.setFullYear(date.getFullYear() + years);\n}\nfunction count(start, end) {\n return end.getFullYear() - start.getFullYear();\n}\nfunction field(date) {\n return date.getFullYear();\n}\nexport var year = new CountableTimeInterval(floor, offset, count, field);\nexport default year;\n","import { CountableTimeInterval } from \"./interval\";\nimport { durationDay } from \"./duration\";\nfunction floor(date) {\n date.setUTCHours(0, 0, 0, 0);\n}\nfunction offset(date, days) {\n date.setUTCDate(date.getUTCDate() + days);\n}\nfunction count(start, end) {\n return (end.getTime() - start.getTime()) / durationDay;\n}\nfunction field(date) {\n return date.getUTCDate() - 1;\n}\nexport var utcDay = new CountableTimeInterval(floor, offset, count, field);\nexport default utcDay;\n","import { CountableTimeInterval } from \"./interval\";\nfunction floor(date) {\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n}\nfunction offset(date, years) {\n date.setUTCFullYear(date.getUTCFullYear() + years);\n}\nfunction count(start, end) {\n return end.getUTCFullYear() - start.getUTCFullYear();\n}\nfunction field(date) {\n return date.getUTCFullYear();\n}\nexport var utcYear = new CountableTimeInterval(floor, offset, count, field);\nexport default utcYear;\n","import { durationWeek } from \"./duration\";\nimport { CountableTimeInterval } from \"./interval\";\n// Set date to n-th day of the week.\nfunction weekday(n) {\n // Sets the `date` to the start of the `n`-th day of the current week.\n // n == 0 is Sunday.\n function floor(date) {\n date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - n) % 7);\n date.setHours(0, 0, 0, 0); // h, m, s, ms\n }\n // Offset the date by the given number of weeks.\n function offset(date, weeks) {\n date.setUTCDate(date.getUTCDate() + weeks * 7);\n }\n // Count the number of weeks between the start and end dates.\n function count(start, end) {\n return (end.getTime() - start.getTime()) / durationWeek;\n }\n return new CountableTimeInterval(floor, offset, count);\n}\nexport var utcSunday = weekday(0);\nexport var utcMonday = weekday(1);\nexport var utcTuesday = weekday(2);\nexport var utcWednesday = weekday(3);\nexport var utcThursday = weekday(4);\nexport var utcFriday = weekday(5);\nexport var utcSaturday = weekday(6);\nexport default utcSunday;\n","import timeDay from \"../day\";\nimport year from \"../year\";\nimport { sunday as timeSunday, monday as timeMonday, thursday as timeThursday, } from \"../week\";\nimport utcDay from \"../utcDay\";\nimport utcYear from \"../utcYear\";\nimport utcSunday, { utcMonday, utcThursday } from \"../utcWeek\";\nfunction localDate(d) {\n // For JS Dates the [0, 100) interval is a time warp, a fast forward to the 20th century.\n // For example, -1 is -0001 BC, 0 is already 1900 AD.\n if (d.y >= 0 && d.y < 100) {\n var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n date.setFullYear(d.y);\n return date;\n }\n return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n}\nfunction utcDate(d) {\n if (d.y >= 0 && d.y < 100) {\n var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n date.setUTCFullYear(d.y);\n return date;\n }\n return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n}\n/**\n * Creates a lookup map for array of names to go from a name to index.\n * @param names\n */\nfunction formatLookup(names) {\n var map = {};\n for (var i = 0, n = names.length; i < n; i++) {\n map[names[i].toLowerCase()] = i;\n }\n return map;\n}\nfunction newYear(y) {\n return {\n y: y,\n m: 0,\n d: 1,\n H: 0,\n M: 0,\n S: 0,\n L: 0\n };\n}\nvar percentCharCode = 37;\nvar numberRe = /^\\s*\\d+/; // ignores next directive\nvar percentRe = /^%/;\nvar requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\n/**\n * Prepends any character in the `requoteRe` set with a backslash.\n * @param s\n */\nexport var requote = function (s) { return s.replace(requoteRe, '\\\\$&'); }; // $& - matched substring\n/**\n * Returns a RegExp that matches any string that starts with any of the given names (case insensitive).\n * @param names\n */\nexport var formatRe = function (names) { return new RegExp('^(?:' + names.map(requote).join('|') + ')', 'i'); };\n// A map of padding modifiers to padding strings. Default is `0`.\nvar pads = {\n '-': '',\n '_': ' ',\n '0': '0'\n};\nexport function pad(value, fill, width) {\n var sign = value < 0 ? '-' : '';\n var string = String(sign ? -value : value);\n var length = string.length;\n return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n}\n/**\n * Create a new time-locale-based object which exposes time-formatting\n * methods for the specified locale definition.\n *\n * @param timeLocale A time locale definition.\n */\nexport default function formatLocale(timeLocale) {\n var lDateTime = timeLocale.dateTime;\n var lDate = timeLocale.date;\n var lTime = timeLocale.time;\n var lPeriods = timeLocale.periods;\n var lWeekdays = timeLocale.days;\n var lShortWeekdays = timeLocale.shortDays;\n var lMonths = timeLocale.months;\n var lShortMonths = timeLocale.shortMonths;\n var periodRe = formatRe(lPeriods);\n var periodLookup = formatLookup(lPeriods);\n var weekdayRe = formatRe(lWeekdays);\n var weekdayLookup = formatLookup(lWeekdays);\n var shortWeekdayRe = formatRe(lShortWeekdays);\n var shortWeekdayLookup = formatLookup(lShortWeekdays);\n var monthRe = formatRe(lMonths);\n var monthLookup = formatLookup(lMonths);\n var shortMonthRe = formatRe(lShortMonths);\n var shortMonthLookup = formatLookup(lShortMonths);\n var formats = {\n 'a': formatShortWeekday,\n 'A': formatWeekday,\n 'b': formatShortMonth,\n 'B': formatMonth,\n 'c': undefined,\n 'd': formatDayOfMonth,\n 'e': formatDayOfMonth,\n 'f': formatMicroseconds,\n 'H': formatHour24,\n 'I': formatHour12,\n 'j': formatDayOfYear,\n 'L': formatMilliseconds,\n 'm': formatMonthNumber,\n 'M': formatMinutes,\n 'p': formatPeriod,\n 'Q': formatUnixTimestamp,\n 's': formatUnixTimestampSeconds,\n 'S': formatSeconds,\n 'u': formatWeekdayNumberMonday,\n 'U': formatWeekNumberSunday,\n 'V': formatWeekNumberISO,\n 'w': formatWeekdayNumberSunday,\n 'W': formatWeekNumberMonday,\n 'x': undefined,\n 'X': undefined,\n 'y': formatYear,\n 'Y': formatFullYear,\n 'Z': formatZone,\n '%': formatLiteralPercent\n };\n var utcFormats = {\n 'a': formatUTCShortWeekday,\n 'A': formatUTCWeekday,\n 'b': formatUTCShortMonth,\n 'B': formatUTCMonth,\n 'c': undefined,\n 'd': formatUTCDayOfMonth,\n 'e': formatUTCDayOfMonth,\n 'f': formatUTCMicroseconds,\n 'H': formatUTCHour24,\n 'I': formatUTCHour12,\n 'j': formatUTCDayOfYear,\n 'L': formatUTCMilliseconds,\n 'm': formatUTCMonthNumber,\n 'M': formatUTCMinutes,\n 'p': formatUTCPeriod,\n 'Q': formatUnixTimestamp,\n 's': formatUnixTimestampSeconds,\n 'S': formatUTCSeconds,\n 'u': formatUTCWeekdayNumberMonday,\n 'U': formatUTCWeekNumberSunday,\n 'V': formatUTCWeekNumberISO,\n 'w': formatUTCWeekdayNumberSunday,\n 'W': formatUTCWeekNumberMonday,\n 'x': undefined,\n 'X': undefined,\n 'y': formatUTCYear,\n 'Y': formatUTCFullYear,\n 'Z': formatUTCZone,\n '%': formatLiteralPercent\n };\n var parses = {\n 'a': parseShortWeekday,\n 'A': parseWeekday,\n 'b': parseShortMonth,\n 'B': parseMonth,\n 'c': parseLocaleDateTime,\n 'd': parseDayOfMonth,\n 'e': parseDayOfMonth,\n 'f': parseMicroseconds,\n 'H': parseHour24,\n 'I': parseHour24,\n 'j': parseDayOfYear,\n 'L': parseMilliseconds,\n 'm': parseMonthNumber,\n 'M': parseMinutes,\n 'p': parsePeriod,\n 'Q': parseUnixTimestamp,\n 's': parseUnixTimestampSeconds,\n 'S': parseSeconds,\n 'u': parseWeekdayNumberMonday,\n 'U': parseWeekNumberSunday,\n 'V': parseWeekNumberISO,\n 'w': parseWeekdayNumberSunday,\n 'W': parseWeekNumberMonday,\n 'x': parseLocaleDate,\n 'X': parseLocaleTime,\n 'y': parseYear,\n 'Y': parseFullYear,\n 'Z': parseZone,\n '%': parseLiteralPercent\n };\n // Recursive definitions.\n formats.x = newFormat(lDate, formats);\n formats.X = newFormat(lTime, formats);\n formats.c = newFormat(lDateTime, formats);\n utcFormats.x = newFormat(lDate, utcFormats);\n utcFormats.X = newFormat(lTime, utcFormats);\n utcFormats.c = newFormat(lDateTime, utcFormats);\n function newParse(specifier, newDate) {\n return function (str) {\n var d = newYear(1900);\n var i = parseSpecifier(d, specifier, str += '', 0);\n if (i != str.length) {\n return undefined;\n }\n // If a UNIX timestamp is specified, return it.\n if ('Q' in d) {\n return new Date(d.Q);\n }\n // The am-pm flag is 0 for AM, and 1 for PM.\n if ('p' in d) {\n d.H = d.H % 12 + d.p * 12;\n }\n // Convert day-of-week and week-of-year to day-of-year.\n if ('V' in d) {\n if (d.V < 1 || d.V > 53) {\n return undefined;\n }\n if (!('w' in d)) {\n d.w = 1;\n }\n if ('Z' in d) {\n var week = utcDate(newYear(d.y));\n var day = week.getUTCDay();\n week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday.floor(week);\n week = utcDay.offset(week, (d.V - 1) * 7);\n d.y = week.getUTCFullYear();\n d.m = week.getUTCMonth();\n d.d = week.getUTCDate() + (d.w + 6) % 7;\n }\n else {\n var week = newDate(newYear(d.y));\n var day = week.getDay();\n week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday.floor(week);\n week = timeDay.offset(week, (d.V - 1) * 7);\n d.y = week.getFullYear();\n d.m = week.getMonth();\n d.d = week.getDate() + (d.w + 6) % 7;\n }\n }\n else if ('W' in d || 'U' in d) {\n if (!('w' in d)) {\n d.w = 'u' in d\n ? d.u % 7\n : 'W' in d ? 1 : 0;\n }\n var day = 'Z' in d ? utcDate(newYear(d.y)).getUTCDay() : newDate(newYear(d.y)).getDay();\n d.m = 0;\n d.d = 'W' in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;\n }\n // If a time zone is specified, all fields are interpreted as UTC and then\n // offset according to the specified time zone.\n if ('Z' in d) {\n d.H += d.Z / 100 | 0;\n d.M += d.Z % 100;\n return utcDate(d);\n }\n // Otherwise, all fields are in local time.\n return newDate(d);\n };\n }\n /**\n * Creates a new function that formats the given Date or timestamp according to specifier.\n * @param specifier\n * @param formats\n */\n function newFormat(specifier, formats) {\n return function (date) {\n var string = [];\n var n = specifier.length;\n var i = -1;\n var j = 0;\n if (!(date instanceof Date)) {\n date = new Date(+date);\n }\n while (++i < n) {\n if (specifier.charCodeAt(i) === percentCharCode) {\n string.push(specifier.slice(j, i)); // copy the chunks of specifier with no directives as is\n var c = specifier.charAt(++i);\n var pad_1 = pads[c];\n if (pad_1 != undefined) { // if format directive has a padding modifier in front of it\n c = specifier.charAt(++i); // fetch the directive itself\n }\n else {\n pad_1 = c === 'e' ? ' ' : '0'; // use the default padding modifier\n }\n var format = formats[c];\n if (format) { // if the directive has a corresponding formatting function\n c = format(date, pad_1); // replace the directive with the formatted date\n }\n string.push(c);\n j = i + 1;\n }\n }\n string.push(specifier.slice(j, i));\n return string.join('');\n };\n }\n // Simultaneously walks over the specifier and the parsed string, populating the `d` map with parsed values.\n // The returned number is expected to equal the length of the parsed `string`, if parsing succeeded.\n function parseSpecifier(d, specifier, string, j) {\n // i - `specifier` string index\n // j - parsed `string` index\n var i = 0;\n var n = specifier.length;\n var m = string.length;\n while (i < n) {\n if (j >= m) {\n return -1;\n }\n var code = specifier.charCodeAt(i++);\n if (code === percentCharCode) {\n var char = specifier.charAt(i++);\n var parse = parses[(char in pads ? specifier.charAt(i++) : char)];\n if (!parse || ((j = parse(d, string, j)) < 0)) {\n return -1;\n }\n }\n else if (code != string.charCodeAt(j++)) {\n return -1;\n }\n }\n return j;\n }\n // ----------------------------- formats ----------------------------------\n function formatMicroseconds(date, fill) {\n return formatMilliseconds(date, fill) + '000';\n }\n function formatMilliseconds(date, fill) {\n return pad(date.getMilliseconds(), fill, 3);\n }\n function formatSeconds(date, fill) {\n return pad(date.getSeconds(), fill, 2);\n }\n function formatMinutes(date, fill) {\n return pad(date.getMinutes(), fill, 2);\n }\n function formatHour12(date, fill) {\n return pad(date.getHours() % 12 || 12, fill, 2);\n }\n function formatHour24(date, fill) {\n return pad(date.getHours(), fill, 2);\n }\n function formatPeriod(date) {\n return lPeriods[date.getHours() >= 12 ? 1 : 0];\n }\n function formatShortWeekday(date) {\n return lShortWeekdays[date.getDay()];\n }\n function formatWeekday(date) {\n return lWeekdays[date.getDay()];\n }\n function formatWeekdayNumberMonday(date) {\n var dayOfWeek = date.getDay();\n return dayOfWeek === 0 ? 7 : dayOfWeek;\n }\n function formatWeekNumberSunday(date, fill) {\n return pad(timeSunday.count(year.floor(date), date), fill, 2);\n }\n function formatWeekNumberISO(date, fill) {\n var day = date.getDay();\n date = (day >= 4 || day === 0) ? timeThursday.floor(date) : timeThursday.ceil(date);\n var yearStart = year.floor(date);\n return pad(timeThursday.count(yearStart, date) + (yearStart.getDay() === 4 ? 1 : 0), fill, 2);\n }\n function formatWeekdayNumberSunday(date) {\n return date.getDay();\n }\n function formatWeekNumberMonday(date, fill) {\n return pad(timeMonday.count(year.floor(date), date), fill, 2);\n }\n function formatDayOfMonth(date, fill) {\n return pad(date.getDate(), fill, 2);\n }\n function formatDayOfYear(date, fill) {\n return pad(1 + timeDay.count(year.floor(date), date), fill, 3);\n }\n function formatShortMonth(date) {\n return lShortMonths[date.getMonth()];\n }\n function formatMonth(date) {\n return lMonths[date.getMonth()];\n }\n function formatMonthNumber(date, fill) {\n return pad(date.getMonth() + 1, fill, 2);\n }\n function formatYear(date, fill) {\n return pad(date.getFullYear() % 100, fill, 2);\n }\n function formatFullYear(date, fill) {\n return pad(date.getFullYear() % 10000, fill, 4);\n }\n function formatZone(date) {\n var z = date.getTimezoneOffset();\n return (z > 0 ? '-' : (z *= -1, '+')) + pad(Math.floor(z / 60), '0', 2) + pad(z % 60, '0', 2);\n }\n // -------------------------- UTC formats -----------------------------------\n function formatUTCMicroseconds(date, fill) {\n return formatUTCMilliseconds(date, fill) + '000';\n }\n function formatUTCMilliseconds(date, fill) {\n return pad(date.getUTCMilliseconds(), fill, 3);\n }\n function formatUTCSeconds(date, fill) {\n return pad(date.getUTCSeconds(), fill, 2);\n }\n function formatUTCMinutes(date, fill) {\n return pad(date.getUTCMinutes(), fill, 2);\n }\n function formatUTCHour12(date, fill) {\n return pad(date.getUTCHours() % 12 || 12, fill, 2);\n }\n function formatUTCHour24(date, fill) {\n return pad(date.getUTCHours(), fill, 2);\n }\n function formatUTCPeriod(date) {\n return lPeriods[date.getUTCHours() >= 12 ? 1 : 0];\n }\n function formatUTCDayOfMonth(date, fill) {\n return pad(date.getUTCDate(), fill, 2);\n }\n function formatUTCDayOfYear(date, fill) {\n return pad(1 + utcDay.count(utcYear.floor(date), date), fill, 3);\n }\n function formatUTCMonthNumber(date, fill) {\n return pad(date.getUTCMonth() + 1, fill, 2);\n }\n function formatUTCShortMonth(date) {\n return lShortMonths[date.getUTCMonth()];\n }\n function formatUTCMonth(date) {\n return lMonths[date.getUTCMonth()];\n }\n function formatUTCShortWeekday(date) {\n return lShortWeekdays[date.getUTCDay()];\n }\n function formatUTCWeekday(date) {\n return lWeekdays[date.getUTCDay()];\n }\n function formatUTCWeekdayNumberMonday(date) {\n var dayOfWeek = date.getUTCDay();\n return dayOfWeek === 0 ? 7 : dayOfWeek;\n }\n function formatUTCWeekNumberSunday(date, fill) {\n return pad(utcSunday.count(utcYear.floor(date), date), fill, 2);\n }\n function formatUTCWeekNumberISO(date, fill) {\n var day = date.getUTCDay();\n date = (day >= 4 || day === 0) ? utcThursday.floor(date) : utcThursday.ceil(date);\n var yearStart = utcYear.floor(date);\n return pad(utcThursday.count(yearStart, date) + (yearStart.getUTCDay() === 4 ? 1 : 0), fill, 4);\n }\n function formatUTCWeekdayNumberSunday(date) {\n return date.getUTCDay();\n }\n function formatUTCWeekNumberMonday(date, fill) {\n return pad(utcMonday.count(utcYear.floor(date), date), fill, 2);\n }\n function formatUTCYear(date, fill) {\n return pad(date.getUTCFullYear() % 100, fill, 2);\n }\n function formatUTCFullYear(date, fill) {\n return pad(date.getUTCFullYear() % 10000, fill, 4);\n }\n function formatUTCZone() {\n return '+0000';\n }\n function formatLiteralPercent(date) {\n return '%';\n }\n function formatUnixTimestamp(date) {\n return date.getTime();\n }\n function formatUnixTimestampSeconds(date) {\n return Math.floor(date.getTime() / 1000);\n }\n // ------------------------------- parsers ------------------------------------\n function parseMicroseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 6));\n return n ? (d.L = Math.floor(parseFloat(n[0]) / 1000), i + n[0].length) : -1;\n }\n function parseMilliseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.L = +n[0], i + n[0].length) : -1;\n }\n function parseSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.S = +n[0], i + n[0].length) : -1;\n }\n function parseMinutes(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.M = +n[0], i + n[0].length) : -1;\n }\n function parseHour24(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.H = +n[0], i + n[0].length) : -1;\n }\n function parsePeriod(d, string, i) {\n var n = periodRe.exec(string.slice(i));\n return n ? (d.p = periodLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n function parseDayOfMonth(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.d = +n[0], i + n[0].length) : -1;\n }\n function parseDayOfYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n }\n function parseShortWeekday(d, string, i) {\n var n = shortWeekdayRe.exec(string.slice(i));\n return n ? (d.w = shortWeekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n function parseWeekday(d, string, i) {\n var n = weekdayRe.exec(string.slice(i));\n return n ? (d.w = weekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n function parseWeekdayNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.u = +n[0], i + n[0].length) : -1;\n }\n function parseWeekNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.U = +n[0], i + n[0].length) : -1;\n }\n function parseWeekNumberISO(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.V = +n[0], i + n[0].length) : -1;\n }\n function parseWeekNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.W = +n[0], i + n[0].length) : -1;\n }\n function parseWeekdayNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.w = +n[0], i + n[0].length) : -1;\n }\n function parseShortMonth(d, string, i) {\n var n = shortMonthRe.exec(string.slice(i));\n return n ? (d.m = shortMonthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n function parseMonth(d, string, i) {\n var n = monthRe.exec(string.slice(i));\n return n ? (d.m = monthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n function parseMonthNumber(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.m = parseFloat(n[0]) - 1, i + n[0].length) : -1;\n }\n function parseLocaleDateTime(d, string, i) {\n return parseSpecifier(d, lDateTime, string, i);\n }\n function parseLocaleDate(d, string, i) {\n return parseSpecifier(d, lDate, string, i);\n }\n function parseLocaleTime(d, string, i) {\n return parseSpecifier(d, lTime, string, i);\n }\n function parseUnixTimestamp(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.Q = +n[0], i + n[0].length) : -1;\n }\n function parseUnixTimestampSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.Q = (+n[0]) * 1000, i + n[0].length) : -1;\n }\n function parseYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n }\n function parseFullYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 4));\n return n ? (d.y = +n[0], i + n[0].length) : -1;\n }\n function parseZone(d, string, i) {\n var n = /^(Z)|^([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || '00')), i + n[0].length) : -1;\n }\n function parseLiteralPercent(d, string, i) {\n var n = percentRe.exec(string.slice(i, i + 1));\n return n ? i + n[0].length : -1;\n }\n return {\n format: function (specifier) {\n var f = newFormat(specifier, formats);\n f.toString = function () { return specifier; };\n return f;\n },\n parse: function (specifier) {\n var p = newParse(specifier, localDate);\n p.toString = function () { return specifier; };\n return p;\n },\n utcFormat: function (specifier) {\n var f = newFormat(specifier, utcFormats);\n f.toString = function () { return specifier; };\n return f;\n },\n utcParse: function (specifier) {\n var p = newParse(specifier, utcDate);\n p.toString = function () { return specifier; };\n return p;\n }\n };\n}\n","import formatLocale from './locale';\nexport var locale;\nsetDefaultLocale({\n dateTime: '%x, %X',\n date: '%-m/%-d/%Y',\n time: '%-I:%M:%S %p',\n periods: ['AM', 'PM'],\n days: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n shortDays: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],\n shortMonths: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']\n});\nexport default function setDefaultLocale(definition) {\n return locale = formatLocale(definition);\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Path } from \"./path\";\nimport { Shape } from \"./shape\";\nimport { BBox } from \"../bbox\";\nimport { LinearGradient } from \"../gradient/linearGradient\";\nimport { Color } from \"../../util/color\";\nexport var RectSizing;\n(function (RectSizing) {\n RectSizing[RectSizing[\"Content\"] = 0] = \"Content\";\n RectSizing[RectSizing[\"Border\"] = 1] = \"Border\";\n})(RectSizing || (RectSizing = {}));\nvar Rect = /** @class */ (function (_super) {\n __extends(Rect, _super);\n function Rect() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._x = 0;\n _this._y = 0;\n _this._width = 10;\n _this._height = 10;\n _this._radius = 0;\n /**\n * If `true`, the rect is aligned to the pixel grid for crisp looking lines.\n * Animated rects may not look nice with this option enabled, for example\n * when a rect is translated by a sub-pixel value on each frame.\n */\n _this._crisp = false;\n _this._gradient = false;\n _this.effectiveStrokeWidth = Shape.defaultStyles.strokeWidth;\n /**\n * Similar to https://developer.mozilla.org/en-US/docs/Web/CSS/box-sizing\n */\n _this._sizing = RectSizing.Content;\n return _this;\n }\n Object.defineProperty(Rect.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (value) {\n if (this._x !== value) {\n this._x = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Rect.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (value) {\n if (this._y !== value) {\n this._y = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Rect.prototype, \"width\", {\n get: function () {\n return this._width;\n },\n set: function (value) {\n if (this._width !== value) {\n this._width = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Rect.prototype, \"height\", {\n get: function () {\n return this._height;\n },\n set: function (value) {\n if (this._height !== value) {\n this._height = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Rect.prototype, \"radius\", {\n get: function () {\n return this._radius;\n },\n set: function (value) {\n if (this._radius !== value) {\n this._radius = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Rect.prototype, \"crisp\", {\n get: function () {\n return this._crisp;\n },\n set: function (value) {\n if (this._crisp !== value) {\n this._crisp = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Rect.prototype, \"gradient\", {\n get: function () {\n return this._gradient;\n },\n set: function (value) {\n if (this._gradient !== value) {\n this._gradient = value;\n this.updateGradientInstance();\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Rect.prototype.updateGradientInstance = function () {\n if (this.gradient) {\n var fill = this.fill;\n if (fill) {\n var gradient = new LinearGradient();\n gradient.angle = 270;\n gradient.stops = [{\n offset: 0,\n color: Color.fromString(fill).brighter().toString()\n }, {\n offset: 1,\n color: Color.fromString(fill).darker().toString()\n }];\n this.gradientInstance = gradient;\n }\n }\n else {\n this.gradientInstance = undefined;\n }\n };\n Object.defineProperty(Rect.prototype, \"fill\", {\n get: function () {\n return this._fill;\n },\n set: function (value) {\n if (this._fill !== value) {\n this._fill = value;\n this.updateGradientInstance();\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Rect.prototype, \"strokeWidth\", {\n get: function () {\n return this._strokeWidth;\n },\n set: function (value) {\n if (this._strokeWidth !== value) {\n this._strokeWidth = value;\n // Normally, when the `lineWidth` changes, we only need to repaint the rect\n // without updating the path. If the `isCrisp` is set to `true` however,\n // we need to update the path to make sure the new stroke aligns to\n // the pixel grid. This is the reason we override the `lineWidth` setter\n // and getter here.\n if (this.crisp || this.sizing === RectSizing.Border) {\n this.dirtyPath = true;\n }\n else {\n this.effectiveStrokeWidth = value;\n this.dirty = true;\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Rect.prototype, \"sizing\", {\n get: function () {\n return this._sizing;\n },\n set: function (value) {\n if (this._sizing !== value) {\n this._sizing = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Rect.prototype.updatePath = function () {\n var borderSizing = this.sizing === RectSizing.Border;\n var path = this.path;\n path.clear();\n var x = this.x;\n var y = this.y;\n var width = this.width;\n var height = this.height;\n var strokeWidth;\n if (borderSizing) {\n var halfWidth = width / 2;\n var halfHeight = height / 2;\n strokeWidth = Math.min(this.strokeWidth, halfWidth, halfHeight);\n x = Math.min(x + strokeWidth / 2, x + halfWidth);\n y = Math.min(y + strokeWidth / 2, y + halfHeight);\n width = Math.max(width - strokeWidth, 0);\n height = Math.max(height - strokeWidth, 0);\n }\n else {\n strokeWidth = this.strokeWidth;\n }\n this.effectiveStrokeWidth = strokeWidth;\n if (this.crisp && !borderSizing) {\n var _a = this, a = _a.alignment, al = _a.align;\n path.rect(al(a, x), al(a, y), al(a, x, width), al(a, y, height));\n }\n else {\n path.rect(x, y, width, height);\n }\n };\n Rect.prototype.computeBBox = function () {\n var _a = this, x = _a.x, y = _a.y, width = _a.width, height = _a.height;\n return new BBox(x, y, width, height);\n };\n Rect.prototype.isPointInPath = function (x, y) {\n var point = this.transformPoint(x, y);\n var bbox = this.computeBBox();\n return bbox.containsPoint(point.x, point.y);\n };\n Rect.prototype.isPointInStroke = function (x, y) {\n return false;\n };\n Rect.prototype.fillStroke = function (ctx) {\n if (!this.scene) {\n return;\n }\n var pixelRatio = this.scene.canvas.pixelRatio || 1;\n if (this.fill) {\n if (this.gradientInstance) {\n ctx.fillStyle = this.gradientInstance.createGradient(ctx, this.computeBBox());\n }\n else {\n ctx.fillStyle = this.fill;\n }\n ctx.globalAlpha = this.opacity * this.fillOpacity;\n // The canvas context scaling (depends on the device's pixel ratio)\n // has no effect on shadows, so we have to account for the pixel ratio\n // manually here.\n var fillShadow = this.fillShadow;\n if (fillShadow && fillShadow.enabled) {\n ctx.shadowColor = fillShadow.color;\n ctx.shadowOffsetX = fillShadow.xOffset * pixelRatio;\n ctx.shadowOffsetY = fillShadow.yOffset * pixelRatio;\n ctx.shadowBlur = fillShadow.blur * pixelRatio;\n }\n ctx.fill();\n }\n ctx.shadowColor = 'rgba(0, 0, 0, 0)';\n if (this.stroke && this.effectiveStrokeWidth) {\n ctx.strokeStyle = this.stroke;\n ctx.globalAlpha = this.opacity * this.strokeOpacity;\n ctx.lineWidth = this.effectiveStrokeWidth;\n if (this.lineDash) {\n ctx.setLineDash(this.lineDash);\n }\n if (this.lineDashOffset) {\n ctx.lineDashOffset = this.lineDashOffset;\n }\n if (this.lineCap) {\n ctx.lineCap = this.lineCap;\n }\n if (this.lineJoin) {\n ctx.lineJoin = this.lineJoin;\n }\n var strokeShadow = this.strokeShadow;\n if (strokeShadow && strokeShadow.enabled) {\n ctx.shadowColor = strokeShadow.color;\n ctx.shadowOffsetX = strokeShadow.xOffset * pixelRatio;\n ctx.shadowOffsetY = strokeShadow.yOffset * pixelRatio;\n ctx.shadowBlur = strokeShadow.blur * pixelRatio;\n }\n ctx.stroke();\n }\n };\n Rect.className = 'Rect';\n return Rect;\n}(Path));\nexport { Rect };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { ContinuousScale } from \"./continuousScale\";\nimport timeMillisecond from \"../util/time/millisecond\";\nimport timeSecond from \"../util/time/second\";\nimport timeMinute from \"../util/time/minute\";\nimport timeHour from \"../util/time/hour\";\nimport timeDay from \"../util/time/day\";\nimport timeWeek from \"../util/time/week\";\nimport timeMonth from \"../util/time/month\";\nimport timeYear from \"../util/time/year\";\nimport { durationSecond, durationMinute, durationHour, durationDay, durationWeek, durationMonth, durationYear } from \"../util/time/duration\";\nimport { complexBisectRight } from \"../util/bisect\";\nimport { tickStep } from \"../util/ticks\";\nimport { locale } from \"../util/time/format/defaultLocale\";\nvar TimeScale = /** @class */ (function (_super) {\n __extends(TimeScale, _super);\n function TimeScale() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'time';\n _this.year = timeYear;\n _this.month = timeMonth;\n _this.week = timeWeek;\n _this.day = timeDay;\n _this.hour = timeHour;\n _this.minute = timeMinute;\n _this.second = timeSecond;\n _this.millisecond = timeMillisecond;\n _this.format = locale.format;\n /**\n * Array of default tick intervals in the following format:\n *\n * [\n * interval (unit of time),\n * number of units (step),\n * the length of that number of units in milliseconds\n * ]\n */\n _this.tickIntervals = [\n [_this.second, 1, durationSecond],\n [_this.second, 5, 5 * durationSecond],\n [_this.second, 15, 15 * durationSecond],\n [_this.second, 30, 30 * durationSecond],\n [_this.minute, 1, durationMinute],\n [_this.minute, 5, 5 * durationMinute],\n [_this.minute, 15, 15 * durationMinute],\n [_this.minute, 30, 30 * durationMinute],\n [_this.hour, 1, durationHour],\n [_this.hour, 3, 3 * durationHour],\n [_this.hour, 6, 6 * durationHour],\n [_this.hour, 12, 12 * durationHour],\n [_this.day, 1, durationDay],\n [_this.day, 2, 2 * durationDay],\n [_this.week, 1, durationWeek],\n [_this.month, 1, durationMonth],\n [_this.month, 3, 3 * durationMonth],\n [_this.year, 1, durationYear]\n ];\n _this.formatMillisecond = _this.format('.%L');\n _this.formatSecond = _this.format(':%S');\n _this.formatMinute = _this.format('%I:%M');\n _this.formatHour = _this.format('%I %p');\n _this.formatDay = _this.format('%a %d');\n _this.formatWeek = _this.format('%b %d');\n _this.formatMonth = _this.format('%B');\n _this.formatYear = _this.format('%Y');\n _this._domain = [new Date(2000, 0, 1), new Date(2000, 0, 2)];\n return _this;\n }\n TimeScale.prototype.defaultTickFormat = function (date) {\n return (this.second.floor(date) < date\n ? this.formatMillisecond\n : this.minute.floor(date) < date\n ? this.formatSecond\n : this.hour.floor(date) < date\n ? this.formatMinute\n : this.day.floor(date) < date\n ? this.formatHour\n : this.month.floor(date) < date\n ? (this.week.floor(date) < date ? this.formatDay : this.formatWeek)\n : this.year.floor(date) < date\n ? this.formatMonth\n : this.formatYear)(date);\n };\n /**\n *\n * @param interval If the `interval` is a number, it's interpreted as the desired tick count\n * and the method tries to pick an appropriate interval automatically, based on the extent of the domain.\n * If the `interval` is `undefined`, it defaults to `10`.\n * If the `interval` is a time interval, simply use it.\n * @param start The start time (timestamp).\n * @param stop The end time (timestamp).\n * @param step Number of intervals between ticks.\n */\n TimeScale.prototype.tickInterval = function (interval, start, stop, step) {\n var _a;\n if (typeof interval === 'number') {\n var tickCount = interval;\n var tickIntervals = this.tickIntervals;\n var target = Math.abs(stop - start) / tickCount;\n var i = complexBisectRight(tickIntervals, target, function (interval) { return interval[2]; });\n if (i === tickIntervals.length) {\n step = tickStep(start / durationYear, stop / durationYear, tickCount);\n interval = this.year;\n }\n else if (i) {\n _a = __read(tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i], 2), interval = _a[0], step = _a[1];\n }\n else {\n step = Math.max(tickStep(start, stop, interval), 1);\n interval = this.millisecond;\n }\n }\n return step == undefined ? interval : interval.every(step);\n };\n Object.defineProperty(TimeScale.prototype, \"domain\", {\n get: function () {\n return _super.prototype.getDomain.call(this).map(function (t) { return new Date(t); });\n },\n set: function (values) {\n _super.prototype.setDomain.call(this, Array.prototype.map.call(values, function (t) { return t instanceof Date ? +t : +new Date(+t); }));\n },\n enumerable: true,\n configurable: true\n });\n TimeScale.prototype.invert = function (y) {\n return new Date(_super.prototype.invert.call(this, y));\n };\n /**\n * Returns uniformly-spaced dates that represent the scale's domain.\n * @param interval The desired tick count or a time interval object.\n */\n TimeScale.prototype.ticks = function (interval) {\n if (interval === void 0) { interval = 10; }\n var d = _super.prototype.getDomain.call(this);\n var t0 = d[0];\n var t1 = d[d.length - 1];\n var reverse = t1 < t0;\n if (reverse) {\n var _ = t0;\n t0 = t1;\n t1 = _;\n }\n var t = this.tickInterval(interval, t0, t1);\n var i = t ? t.range(t0, t1 + 1) : []; // inclusive stop\n return reverse ? i.reverse() : i;\n };\n /**\n * Returns a time format function suitable for displaying tick values.\n * @param count Ignored. Used only to satisfy the {@link Scale} interface.\n * @param specifier If the specifier string is provided, this method is equivalent to\n * the {@link TimeLocaleObject.format} method.\n * If no specifier is provided, this method returns the default time format function.\n */\n TimeScale.prototype.tickFormat = function (count, specifier) {\n return specifier == undefined ? this.defaultTickFormat.bind(this) : this.format(specifier);\n };\n /**\n * Extends the domain so that it starts and ends on nice round values.\n * This method typically modifies the scale’s domain, and may only extend the bounds to the nearest round value.\n * @param interval\n */\n TimeScale.prototype.nice = function (interval) {\n if (interval === void 0) { interval = 10; }\n var d = _super.prototype.getDomain.call(this);\n var i = this.tickInterval(interval, d[0], d[d.length - 1]);\n if (i) {\n this.domain = this._nice(d, i);\n }\n };\n TimeScale.prototype._nice = function (domain, interval) {\n var _a, _b;\n domain = domain.slice();\n var i0 = 0;\n var i1 = domain.length - 1;\n var x0 = domain[i0];\n var x1 = domain[i1];\n if (x1 < x0) {\n _a = __read([i1, i0], 2), i0 = _a[0], i1 = _a[1];\n _b = __read([x1, x0], 2), x0 = _b[0], x1 = _b[1];\n }\n domain[i0] = interval.floor(x0);\n domain[i1] = interval.ceil(x1);\n return domain;\n };\n return TimeScale;\n}(ContinuousScale));\nexport { TimeScale };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { TimeScale } from \"../../scale/timeScale\";\nimport { extent } from \"../../util/array\";\nimport { isContinuous } from \"../../util/value\";\nimport { ChartAxis } from \"../chartAxis\";\nvar TimeAxis = /** @class */ (function (_super) {\n __extends(TimeAxis, _super);\n function TimeAxis() {\n var _this = _super.call(this, new TimeScale()) || this;\n _this.datumFormat = '%m/%d/%y, %H:%M:%S';\n _this._nice = true;\n var scale = _this.scale;\n scale.clamp = true;\n _this.scale = scale;\n _this.datumFormatter = scale.tickFormat(_this.calculatedTickCount, _this.datumFormat);\n return _this;\n }\n Object.defineProperty(TimeAxis.prototype, \"nice\", {\n get: function () {\n return this._nice;\n },\n set: function (value) {\n if (this._nice !== value) {\n this._nice = value;\n if (value && this.scale.nice) {\n this.scale.nice(10);\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TimeAxis.prototype, \"domain\", {\n get: function () {\n return this.scale.domain;\n },\n set: function (domain) {\n if (domain.length > 2) {\n domain = (extent(domain, isContinuous, Number) || [0, 1000]).map(function (x) { return new Date(x); });\n }\n this.scale.domain = domain;\n if (this.nice && this.scale.nice) {\n this.scale.nice(10);\n }\n },\n enumerable: true,\n configurable: true\n });\n TimeAxis.prototype.onLabelFormatChange = function (format) {\n if (format) {\n _super.prototype.onLabelFormatChange.call(this, format);\n }\n else {\n // For time axis labels to look nice, even if date format wasn't set.\n this.labelFormatter = this.scale.tickFormat(this.calculatedTickCount, undefined);\n }\n };\n TimeAxis.prototype.formatDatum = function (datum) {\n return this.datumFormatter(datum);\n };\n TimeAxis.className = 'TimeAxis';\n TimeAxis.type = 'time';\n return TimeAxis;\n}(ChartAxis));\nexport { TimeAxis };\n","var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n};\nimport { HdpiCanvas } from \"../canvas/hdpiCanvas\";\nimport { createId } from \"../util/id\";\nvar Scene = /** @class */ (function () {\n // As a rule of thumb, constructors with no parameters are preferred.\n // A few exceptions are:\n // - we absolutely need to know something at construction time (document)\n // - knowing something at construction time meaningfully improves performance (width, height)\n function Scene(document, width, height) {\n var _this = this;\n if (document === void 0) { document = window.document; }\n this.id = createId(this);\n this._dirty = false;\n this.animationFrameId = 0;\n this._root = null;\n this.debug = {\n renderFrameIndex: false,\n renderBoundingBoxes: false\n };\n this._frameIndex = 0;\n this.render = function () {\n var _a;\n var _b = _this, ctx = _b.ctx, root = _b.root, pendingSize = _b.pendingSize;\n _this.animationFrameId = 0;\n if (pendingSize) {\n (_a = _this.canvas).resize.apply(_a, __spread(pendingSize));\n _this.pendingSize = undefined;\n }\n if (root && !root.visible) {\n _this.dirty = false;\n return;\n }\n // start with a blank canvas, clear previous drawing\n ctx.clearRect(0, 0, _this.width, _this.height);\n if (root) {\n ctx.save();\n if (root.visible) {\n root.render(ctx);\n }\n ctx.restore();\n }\n _this._frameIndex++;\n if (_this.debug.renderFrameIndex) {\n ctx.fillStyle = 'white';\n ctx.fillRect(0, 0, 40, 15);\n ctx.fillStyle = 'black';\n ctx.fillText(_this.frameIndex.toString(), 2, 10);\n }\n _this.dirty = false;\n };\n this.canvas = new HdpiCanvas(document, width, height);\n this.ctx = this.canvas.context;\n }\n Object.defineProperty(Scene.prototype, \"container\", {\n get: function () {\n return this.canvas.container;\n },\n set: function (value) {\n this.canvas.container = value;\n },\n enumerable: true,\n configurable: true\n });\n Scene.prototype.download = function (fileName) {\n this.canvas.download(fileName);\n };\n Scene.prototype.getDataURL = function (type) {\n return this.canvas.getDataURL(type);\n };\n Object.defineProperty(Scene.prototype, \"width\", {\n get: function () {\n return this.pendingSize ? this.pendingSize[0] : this.canvas.width;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Scene.prototype, \"height\", {\n get: function () {\n return this.pendingSize ? this.pendingSize[1] : this.canvas.height;\n },\n enumerable: true,\n configurable: true\n });\n Scene.prototype.resize = function (width, height) {\n width = Math.round(width);\n height = Math.round(height);\n if (width === this.width && height === this.height) {\n return;\n }\n this.pendingSize = [width, height];\n this.dirty = true;\n };\n Object.defineProperty(Scene.prototype, \"dirty\", {\n get: function () {\n return this._dirty;\n },\n set: function (dirty) {\n if (dirty) {\n if (!this._dirty) {\n this.animationFrameId = requestAnimationFrame(this.render);\n }\n }\n else if (this.animationFrameId) {\n cancelAnimationFrame(this.animationFrameId);\n this.animationFrameId = 0;\n }\n this._dirty = dirty;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Scene.prototype, \"root\", {\n get: function () {\n return this._root;\n },\n set: function (node) {\n if (node === this._root) {\n return;\n }\n if (this._root) {\n this._root._setScene();\n }\n this._root = node;\n if (node) {\n // If `node` is the root node of another scene ...\n if (node.parent === null && node.scene && node.scene !== this) {\n node.scene.root = null;\n }\n node._setScene(this);\n }\n this.dirty = true;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Scene.prototype, \"frameIndex\", {\n get: function () {\n return this._frameIndex;\n },\n enumerable: true,\n configurable: true\n });\n Scene.className = 'Scene';\n return Scene;\n}());\nexport { Scene };\n","var Gradient = /** @class */ (function () {\n function Gradient() {\n this.stops = [];\n }\n return Gradient;\n}());\nexport { Gradient };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Gradient } from \"./gradient\";\nvar LinearGradient = /** @class */ (function (_super) {\n __extends(LinearGradient, _super);\n function LinearGradient() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.angle = 0;\n return _this;\n }\n LinearGradient.prototype.createGradient = function (ctx, bbox) {\n var stops = this.stops;\n var radians = (this.angle % 360) * Math.PI / 180;\n var cos = Math.cos(radians);\n var sin = Math.sin(radians);\n var w = bbox.width;\n var h = bbox.height;\n var cx = bbox.x + w * 0.5;\n var cy = bbox.y + h * 0.5;\n if (w > 0 && h > 0) {\n var l = (Math.sqrt(h * h + w * w) * Math.abs(Math.cos(radians - Math.atan(h / w)))) / 2;\n var gradient_1 = ctx.createLinearGradient(cx + cos * l, cy + sin * l, cx - cos * l, cy - sin * l);\n stops.forEach(function (stop) {\n gradient_1.addColorStop(stop.offset, stop.color);\n });\n return gradient_1;\n }\n return 'black';\n };\n return LinearGradient;\n}(Gradient));\nexport { LinearGradient };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Path } from \"../../scene/shape/path\";\nimport { BBox } from \"../../scene/bbox\";\nvar Marker = /** @class */ (function (_super) {\n __extends(Marker, _super);\n function Marker() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._x = 0;\n _this._y = 0;\n _this._size = 12;\n return _this;\n }\n Object.defineProperty(Marker.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (value) {\n if (this._x !== value) {\n this._x = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Marker.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (value) {\n if (this._y !== value) {\n this._y = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Marker.prototype, \"size\", {\n get: function () {\n return this._size;\n },\n set: function (value) {\n if (this._size !== value) {\n this._size = Math.abs(value);\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Marker.prototype.computeBBox = function () {\n var _a = this, x = _a.x, y = _a.y, size = _a.size;\n var half = size / 2;\n return new BBox(x - half, y - half, size, size);\n };\n return Marker;\n}(Path));\nexport { Marker };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Marker } from \"./marker\";\nvar Square = /** @class */ (function (_super) {\n __extends(Square, _super);\n function Square() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Square.prototype.updatePath = function () {\n var _a = this, path = _a.path, x = _a.x, y = _a.y;\n var hs = this.size / 2;\n var _b = this, a = _b.alignment, al = _b.align;\n path.clear();\n path.moveTo(al(a, x - hs), al(a, y - hs));\n path.lineTo(al(a, x + hs), al(a, y - hs));\n path.lineTo(al(a, x + hs), al(a, y + hs));\n path.lineTo(al(a, x - hs), al(a, y + hs));\n path.closePath();\n };\n Square.className = 'Square';\n return Square;\n}(Marker));\nexport { Square };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Group } from \"../scene/group\";\nimport { Text } from \"../scene/shape/text\";\nimport { Square } from \"./marker/square\";\nimport { HdpiCanvas } from \"../canvas/hdpiCanvas\";\nvar MarkerLabel = /** @class */ (function (_super) {\n __extends(MarkerLabel, _super);\n function MarkerLabel() {\n var _this = _super.call(this) || this;\n _this.label = new Text();\n _this._marker = new Square();\n _this._markerSize = 15;\n _this._spacing = 8;\n var label = _this.label;\n label.textBaseline = 'middle';\n label.fontSize = 12;\n label.fontFamily = 'Verdana, sans-serif';\n label.fill = 'black';\n // For better looking vertical alignment of labels to markers.\n label.y = HdpiCanvas.has.textMetrics ? 1 : 0;\n _this.append([_this.marker, label]);\n _this.update();\n return _this;\n }\n Object.defineProperty(MarkerLabel.prototype, \"text\", {\n get: function () {\n return this.label.text;\n },\n set: function (value) {\n this.label.text = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MarkerLabel.prototype, \"fontStyle\", {\n get: function () {\n return this.label.fontStyle;\n },\n set: function (value) {\n this.label.fontStyle = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MarkerLabel.prototype, \"fontWeight\", {\n get: function () {\n return this.label.fontWeight;\n },\n set: function (value) {\n this.label.fontWeight = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MarkerLabel.prototype, \"fontSize\", {\n get: function () {\n return this.label.fontSize;\n },\n set: function (value) {\n this.label.fontSize = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MarkerLabel.prototype, \"fontFamily\", {\n get: function () {\n return this.label.fontFamily;\n },\n set: function (value) {\n this.label.fontFamily = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MarkerLabel.prototype, \"color\", {\n get: function () {\n return this.label.fill;\n },\n set: function (value) {\n this.label.fill = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MarkerLabel.prototype, \"marker\", {\n get: function () {\n return this._marker;\n },\n set: function (value) {\n if (this._marker !== value) {\n this.removeChild(this._marker);\n this._marker = value;\n this.appendChild(value);\n this.update();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MarkerLabel.prototype, \"markerSize\", {\n get: function () {\n return this._markerSize;\n },\n set: function (value) {\n if (this._markerSize !== value) {\n this._markerSize = value;\n this.update();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MarkerLabel.prototype, \"markerFill\", {\n get: function () {\n return this.marker.fill;\n },\n set: function (value) {\n this.marker.fill = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MarkerLabel.prototype, \"markerStroke\", {\n get: function () {\n return this.marker.stroke;\n },\n set: function (value) {\n this.marker.stroke = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MarkerLabel.prototype, \"markerStrokeWidth\", {\n get: function () {\n return this.marker.strokeWidth;\n },\n set: function (value) {\n this.marker.strokeWidth = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MarkerLabel.prototype, \"markerFillOpacity\", {\n get: function () {\n return this.marker.fillOpacity;\n },\n set: function (value) {\n this.marker.fillOpacity = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MarkerLabel.prototype, \"markerStrokeOpacity\", {\n get: function () {\n return this.marker.strokeOpacity;\n },\n set: function (value) {\n this.marker.strokeOpacity = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MarkerLabel.prototype, \"opacity\", {\n get: function () {\n return this.marker.opacity;\n },\n set: function (value) {\n this.marker.opacity = value;\n this.label.opacity = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MarkerLabel.prototype, \"spacing\", {\n get: function () {\n return this._spacing;\n },\n set: function (value) {\n if (this._spacing !== value) {\n this._spacing = value;\n this.update();\n }\n },\n enumerable: true,\n configurable: true\n });\n MarkerLabel.prototype.update = function () {\n var marker = this.marker;\n var markerSize = this.markerSize;\n marker.size = markerSize;\n this.label.x = markerSize / 2 + this.spacing;\n };\n MarkerLabel.className = 'MarkerLabel';\n return MarkerLabel;\n}(Group));\nexport { MarkerLabel };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Marker } from \"./marker\";\nvar Circle = /** @class */ (function (_super) {\n __extends(Circle, _super);\n function Circle() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Circle.prototype.updatePath = function () {\n var _a = this, x = _a.x, y = _a.y, path = _a.path, size = _a.size;\n var r = size / 2;\n path.clear();\n path.cubicArc(x, y, r, r, 0, 0, Math.PI * 2, 0);\n path.closePath();\n };\n Circle.className = 'Circle';\n return Circle;\n}(Marker));\nexport { Circle };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Marker } from \"./marker\";\nvar Cross = /** @class */ (function (_super) {\n __extends(Cross, _super);\n function Cross() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Cross.prototype.updatePath = function () {\n var _a = this, x = _a.x, y = _a.y;\n var _b = this, path = _b.path, size = _b.size;\n var s = size / 4.2;\n path.clear();\n path.moveTo(x -= s, y);\n path.lineTo(x -= s, y -= s);\n path.lineTo(x += s, y -= s);\n path.lineTo(x += s, y += s);\n path.lineTo(x += s, y -= s);\n path.lineTo(x += s, y += s);\n path.lineTo(x -= s, y += s);\n path.lineTo(x += s, y += s);\n path.lineTo(x -= s, y += s);\n path.lineTo(x -= s, y -= s);\n path.lineTo(x -= s, y += s);\n path.lineTo(x -= s, y -= s);\n path.closePath();\n };\n Cross.className = 'Cross';\n return Cross;\n}(Marker));\nexport { Cross };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Marker } from \"./marker\";\nvar Diamond = /** @class */ (function (_super) {\n __extends(Diamond, _super);\n function Diamond() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Diamond.prototype.updatePath = function () {\n var _a = this, x = _a.x, y = _a.y;\n var _b = this, path = _b.path, size = _b.size;\n var s = size / 2;\n path.clear();\n path.moveTo(x, y -= s);\n path.lineTo(x += s, y += s);\n path.lineTo(x -= s, y += s);\n path.lineTo(x -= s, y -= s);\n path.lineTo(x += s, y -= s);\n path.closePath();\n };\n Diamond.className = 'Diamond';\n return Diamond;\n}(Marker));\nexport { Diamond };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Marker } from \"./marker\";\nvar Heart = /** @class */ (function (_super) {\n __extends(Heart, _super);\n function Heart() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Heart.prototype.rad = function (degree) {\n return degree / 180 * Math.PI;\n };\n Heart.prototype.updatePath = function () {\n var _a = this, x = _a.x, path = _a.path, size = _a.size, rad = _a.rad;\n var r = size / 4;\n var y = this.y + r / 2;\n path.clear();\n path.cubicArc(x - r, y - r, r, r, 0, rad(130), rad(330), 0);\n path.cubicArc(x + r, y - r, r, r, 0, rad(220), rad(50), 0);\n path.lineTo(x, y + r);\n path.closePath();\n };\n Heart.className = 'Heart';\n return Heart;\n}(Marker));\nexport { Heart };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Marker } from \"./marker\";\nvar Plus = /** @class */ (function (_super) {\n __extends(Plus, _super);\n function Plus() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Plus.prototype.updatePath = function () {\n var _a = this, x = _a.x, y = _a.y;\n var _b = this, path = _b.path, size = _b.size;\n var s = size / 3;\n var hs = s / 2;\n path.clear();\n path.moveTo(x -= hs, y -= hs);\n path.lineTo(x, y -= s);\n path.lineTo(x += s, y);\n path.lineTo(x, y += s);\n path.lineTo(x += s, y);\n path.lineTo(x, y += s);\n path.lineTo(x -= s, y);\n path.lineTo(x, y += s);\n path.lineTo(x -= s, y);\n path.lineTo(x, y -= s);\n path.lineTo(x -= s, y);\n path.lineTo(x, y -= s);\n path.closePath();\n };\n Plus.className = 'Plus';\n return Plus;\n}(Marker));\nexport { Plus };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Marker } from \"./marker\";\nvar Triangle = /** @class */ (function (_super) {\n __extends(Triangle, _super);\n function Triangle() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Triangle.prototype.updatePath = function () {\n var _a = this, x = _a.x, y = _a.y;\n var _b = this, path = _b.path, size = _b.size;\n var s = size * 1.1;\n path.clear();\n path.moveTo(x, y -= s * 0.48);\n path.lineTo(x += s * 0.5, y += s * 0.87);\n path.lineTo(x -= s, y);\n path.closePath();\n };\n Triangle.className = 'Triangle';\n return Triangle;\n}(Marker));\nexport { Triangle };\n","import { Square } from \"./square\";\nimport { Circle } from \"./circle\";\nimport { Cross } from \"./cross\";\nimport { Diamond } from \"./diamond\";\nimport { Heart } from \"./heart\";\nimport { Plus } from \"./plus\";\nimport { Triangle } from \"./triangle\";\n// This function is in its own file because putting it into SeriesMarker makes the Legend\n// suddenly aware of the series (it's an agnostic component), and putting it into Marker\n// introduces circular dependencies.\nexport function getMarker(shape) {\n if (shape === void 0) { shape = Square; }\n if (typeof shape === 'string') {\n switch (shape) {\n case 'circle':\n return Circle;\n case 'cross':\n return Cross;\n case 'diamond':\n return Diamond;\n case 'heart':\n return Heart;\n case 'plus':\n return Plus;\n case 'triangle':\n return Triangle;\n default:\n return Square;\n }\n }\n if (typeof shape === 'function') {\n return shape;\n }\n return Square;\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Group } from \"../scene/group\";\nimport { Selection } from \"../scene/selection\";\nimport { MarkerLabel } from \"./markerLabel\";\nimport { reactive, Observable } from \"../util/observable\";\nimport { getMarker } from \"./marker/util\";\nimport { createId } from \"../util/id\";\nexport var LegendOrientation;\n(function (LegendOrientation) {\n LegendOrientation[LegendOrientation[\"Vertical\"] = 0] = \"Vertical\";\n LegendOrientation[LegendOrientation[\"Horizontal\"] = 1] = \"Horizontal\";\n})(LegendOrientation || (LegendOrientation = {}));\nexport var LegendPosition;\n(function (LegendPosition) {\n LegendPosition[\"Top\"] = \"top\";\n LegendPosition[\"Right\"] = \"right\";\n LegendPosition[\"Bottom\"] = \"bottom\";\n LegendPosition[\"Left\"] = \"left\";\n})(LegendPosition || (LegendPosition = {}));\nvar LegendLabel = /** @class */ (function (_super) {\n __extends(LegendLabel, _super);\n function LegendLabel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.color = 'black';\n _this.fontSize = 12;\n _this.fontFamily = 'Verdana, sans-serif';\n return _this;\n }\n __decorate([\n reactive('change')\n ], LegendLabel.prototype, \"color\", void 0);\n __decorate([\n reactive('layoutChange')\n ], LegendLabel.prototype, \"fontStyle\", void 0);\n __decorate([\n reactive('layoutChange')\n ], LegendLabel.prototype, \"fontWeight\", void 0);\n __decorate([\n reactive('layoutChange')\n ], LegendLabel.prototype, \"fontSize\", void 0);\n __decorate([\n reactive('layoutChange')\n ], LegendLabel.prototype, \"fontFamily\", void 0);\n __decorate([\n reactive()\n ], LegendLabel.prototype, \"formatter\", void 0);\n return LegendLabel;\n}(Observable));\nexport { LegendLabel };\nvar LegendMarker = /** @class */ (function (_super) {\n __extends(LegendMarker, _super);\n function LegendMarker() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.size = 15;\n /**\n * Padding between the marker and the label within each legend item.\n */\n _this.padding = 8;\n _this.strokeWidth = 1;\n return _this;\n }\n __decorate([\n reactive('layoutChange')\n ], LegendMarker.prototype, \"size\", void 0);\n __decorate([\n reactive('layoutChange')\n ], LegendMarker.prototype, \"shape\", void 0);\n __decorate([\n reactive('layoutChange')\n ], LegendMarker.prototype, \"padding\", void 0);\n __decorate([\n reactive('change')\n ], LegendMarker.prototype, \"strokeWidth\", void 0);\n return LegendMarker;\n}(Observable));\nexport { LegendMarker };\nvar LegendItem = /** @class */ (function (_super) {\n __extends(LegendItem, _super);\n function LegendItem() {\n var _this = _super.call(this) || this;\n _this.marker = new LegendMarker();\n _this.label = new LegendLabel();\n /**\n * The legend uses grid layout for its items, occupying as few columns as possible when positioned to left or right,\n * and as few rows as possible when positioned to top or bottom. This config specifies the amount of horizontal\n * padding between legend items.\n */\n _this.paddingX = 16;\n /**\n * The legend uses grid layout for its items, occupying as few columns as possible when positioned to left or right,\n * and as few rows as possible when positioned to top or bottom. This config specifies the amount of vertical\n * padding between legend items.\n */\n _this.paddingY = 8;\n var changeListener = function () { return _this.fireEvent({ type: 'change' }); };\n _this.marker.addEventListener('change', changeListener);\n _this.label.addEventListener('change', changeListener);\n var layoutChangeListener = function () { return _this.fireEvent({ type: 'layoutChange' }); };\n _this.marker.addEventListener('layoutChange', layoutChangeListener);\n _this.label.addEventListener('layoutChange', layoutChangeListener);\n return _this;\n }\n __decorate([\n reactive('layoutChange')\n ], LegendItem.prototype, \"paddingX\", void 0);\n __decorate([\n reactive('layoutChange')\n ], LegendItem.prototype, \"paddingY\", void 0);\n return LegendItem;\n}(Observable));\nexport { LegendItem };\nvar Legend = /** @class */ (function (_super) {\n __extends(Legend, _super);\n function Legend() {\n var _this = _super.call(this) || this;\n _this.id = createId(_this);\n _this.group = new Group();\n _this.itemSelection = Selection.select(_this.group).selectAll();\n _this.oldSize = [0, 0];\n _this.item = new LegendItem();\n _this.data = [];\n _this.enabled = true;\n _this.orientation = LegendOrientation.Vertical;\n _this.position = LegendPosition.Right;\n /**\n * Spacing between the legend and the edge of the chart's element.\n */\n _this.spacing = 20;\n _this._size = [0, 0];\n _this.addPropertyListener('data', _this.onDataChange);\n _this.addPropertyListener('enabled', _this.onEnabledChange);\n _this.addPropertyListener('position', _this.onPositionChange);\n _this.item.marker.addPropertyListener('shape', _this.onMarkerShapeChange, _this);\n _this.addEventListener('change', _this.update);\n _this.item.addEventListener('change', function () { return _this.fireEvent({ type: 'change' }); });\n _this.item.addEventListener('layoutChange', function () { return _this.fireEvent({ type: 'layoutChange' }); });\n return _this;\n }\n Object.defineProperty(Legend.prototype, \"size\", {\n get: function () {\n return this._size;\n },\n enumerable: true,\n configurable: true\n });\n Legend.prototype.onDataChange = function (event) {\n this.group.visible = event.value.length > 0 && this.enabled;\n };\n Legend.prototype.onEnabledChange = function (event) {\n this.group.visible = event.value && this.data.length > 0;\n };\n Legend.prototype.onPositionChange = function (event) {\n switch (event.value) {\n case 'right':\n case 'left':\n this.orientation = LegendOrientation.Vertical;\n break;\n case 'bottom':\n case 'top':\n this.orientation = LegendOrientation.Horizontal;\n break;\n }\n };\n Legend.prototype.onMarkerShapeChange = function () {\n this.itemSelection = this.itemSelection.setData([]);\n this.itemSelection.exit.remove();\n if (this.group.scene) {\n this.group.scene.dirty = false;\n }\n };\n /**\n * The method is given the desired size of the legend, which only serves as a hint.\n * The vertically oriented legend will take as much horizontal space as needed, but will\n * respect the height constraints, and the horizontal legend will take as much vertical\n * space as needed in an attempt not to exceed the given width.\n * After the layout is done, the {@link size} will contain the actual size of the legend.\n * If the actual size is not the same as the previous actual size, the legend will fire\n * the 'layoutChange' event to communicate that another layout is needed, and the above\n * process should be repeated.\n * @param width\n * @param height\n */\n Legend.prototype.performLayout = function (width, height) {\n var item = this.item;\n var marker = item.marker, paddingX = item.paddingX, paddingY = item.paddingY;\n var updateSelection = this.itemSelection.setData(this.data, function (_, datum) {\n var MarkerShape = getMarker(marker.shape || datum.marker.shape);\n return datum.id + '-' + datum.itemId + '-' + MarkerShape.name;\n });\n updateSelection.exit.remove();\n var enterSelection = updateSelection.enter.append(MarkerLabel).each(function (node, datum) {\n var MarkerShape = getMarker(marker.shape || datum.marker.shape);\n node.marker = new MarkerShape();\n });\n var itemSelection = this.itemSelection = updateSelection.merge(enterSelection);\n var itemCount = itemSelection.size;\n // Update properties that affect the size of the legend items and measure them.\n var bboxes = [];\n var itemMarker = this.item.marker;\n var itemLabel = this.item.label;\n var maxCharCount = 25;\n var ellipsis = \"...\";\n itemSelection.each(function (markerLabel, datum) {\n // TODO: measure only when one of these properties or data change (in a separate routine)\n markerLabel.markerSize = itemMarker.size;\n markerLabel.spacing = itemMarker.padding;\n markerLabel.fontStyle = itemLabel.fontStyle;\n markerLabel.fontWeight = itemLabel.fontWeight;\n markerLabel.fontSize = itemLabel.fontSize;\n markerLabel.fontFamily = itemLabel.fontFamily;\n var text = datum.label.text;\n if (text.length > maxCharCount) {\n text = \"\" + text.substring(0, maxCharCount - ellipsis.length) + ellipsis;\n }\n markerLabel.text = text;\n bboxes.push(markerLabel.computeBBox());\n });\n var itemHeight = bboxes.length && bboxes[0].height;\n var rowCount = 0;\n var columnWidth = 0;\n var paddedItemsWidth = 0;\n var paddedItemsHeight = 0;\n width = Math.max(1, width);\n height = Math.max(1, height);\n switch (this.orientation) {\n case LegendOrientation.Horizontal:\n if (!(isFinite(width) && width > 0)) {\n return false;\n }\n rowCount = 0;\n var columnCount = 0;\n // Split legend items into columns until the width is suitable.\n do {\n var itemsWidth = 0;\n columnCount = 0;\n columnWidth = 0;\n rowCount++;\n var i = 0;\n while (i < itemCount) {\n var bbox = bboxes[i];\n if (bbox.width > columnWidth) {\n columnWidth = bbox.width;\n }\n i++;\n if (i % rowCount === 0) {\n itemsWidth += columnWidth;\n columnWidth = 0;\n columnCount++;\n }\n }\n if (i % rowCount !== 0) {\n itemsWidth += columnWidth;\n columnCount++;\n }\n paddedItemsWidth = itemsWidth + (columnCount - 1) * paddingX;\n } while (paddedItemsWidth > width && columnCount > 1);\n paddedItemsHeight = itemHeight * rowCount + (rowCount - 1) * paddingY;\n break;\n case LegendOrientation.Vertical:\n if (!(isFinite(height) && height > 0)) {\n return false;\n }\n rowCount = itemCount * 2;\n // Split legend items into columns until the height is suitable.\n do {\n rowCount = (rowCount >> 1) + (rowCount % 2);\n columnWidth = 0;\n var itemsWidth = 0;\n var itemsHeight = 0;\n var columnCount_1 = 0;\n var i = 0;\n while (i < itemCount) {\n var bbox = bboxes[i];\n if (!columnCount_1) {\n itemsHeight += bbox.height;\n }\n if (bbox.width > columnWidth) {\n columnWidth = bbox.width;\n }\n i++;\n if (i % rowCount === 0) {\n itemsWidth += columnWidth;\n columnWidth = 0;\n columnCount_1++;\n }\n }\n if (i % rowCount !== 0) {\n itemsWidth += columnWidth;\n columnCount_1++;\n }\n paddedItemsWidth = itemsWidth + (columnCount_1 - 1) * paddingX;\n paddedItemsHeight = itemsHeight + (rowCount - 1) * paddingY;\n } while (paddedItemsHeight > height && rowCount > 1);\n break;\n }\n // Top-left corner of the first legend item.\n var startX = (width - paddedItemsWidth) / 2;\n var startY = (height - paddedItemsHeight) / 2;\n var x = 0;\n var y = 0;\n columnWidth = 0;\n // Position legend items using the layout computed above.\n itemSelection.each(function (markerLabel, datum, i) {\n // Round off for pixel grid alignment to work properly.\n markerLabel.translationX = Math.floor(startX + x);\n markerLabel.translationY = Math.floor(startY + y);\n var bbox = bboxes[i];\n if (bbox.width > columnWidth) {\n columnWidth = bbox.width;\n }\n if ((i + 1) % rowCount === 0) {\n x += columnWidth + paddingX;\n y = 0;\n columnWidth = 0;\n }\n else {\n y += bbox.height + paddingY;\n }\n });\n // Update legend item properties that don't affect the layout.\n this.update();\n var size = this._size;\n var oldSize = this.oldSize;\n size[0] = paddedItemsWidth;\n size[1] = paddedItemsHeight;\n if (size[0] !== oldSize[0] || size[1] !== oldSize[1]) {\n oldSize[0] = size[0];\n oldSize[1] = size[1];\n }\n };\n Legend.prototype.update = function () {\n var _this = this;\n this.itemSelection.each(function (markerLabel, datum) {\n var marker = datum.marker;\n markerLabel.markerFill = marker.fill;\n markerLabel.markerStroke = marker.stroke;\n markerLabel.markerStrokeWidth = _this.item.marker.strokeWidth;\n markerLabel.markerFillOpacity = marker.fillOpacity;\n markerLabel.markerStrokeOpacity = marker.strokeOpacity;\n markerLabel.opacity = datum.enabled ? 1 : 0.5;\n markerLabel.color = _this.item.label.color;\n });\n };\n Legend.prototype.getDatumForPoint = function (x, y) {\n var node = this.group.pickNode(x, y);\n if (node && node.parent) {\n return node.parent.datum;\n }\n };\n Legend.className = 'Legend';\n __decorate([\n reactive('layoutChange')\n ], Legend.prototype, \"data\", void 0);\n __decorate([\n reactive('layoutChange')\n ], Legend.prototype, \"enabled\", void 0);\n __decorate([\n reactive('layoutChange')\n ], Legend.prototype, \"orientation\", void 0);\n __decorate([\n reactive('layoutChange')\n ], Legend.prototype, \"position\", void 0);\n __decorate([\n reactive('layoutChange')\n ], Legend.prototype, \"spacing\", void 0);\n return Legend;\n}(Observable));\nexport { Legend };\n","var __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar SizeMonitor = /** @class */ (function () {\n function SizeMonitor() {\n }\n SizeMonitor.init = function () {\n var _this = this;\n var NativeResizeObserver = window.ResizeObserver;\n if (NativeResizeObserver) {\n this.resizeObserver = new NativeResizeObserver(function (entries) {\n var e_1, _a;\n try {\n for (var entries_1 = __values(entries), entries_1_1 = entries_1.next(); !entries_1_1.done; entries_1_1 = entries_1.next()) {\n var entry = entries_1_1.value;\n var _b = entry.contentRect, width = _b.width, height = _b.height;\n _this.checkSize(_this.elements.get(entry.target), entry.target, width, height);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (entries_1_1 && !entries_1_1.done && (_a = entries_1.return)) _a.call(entries_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n });\n }\n else { // polyfill (more reliable even in browsers that support ResizeObserver)\n var step = function () {\n _this.elements.forEach(function (entry, element) {\n _this.checkClientSize(element, entry);\n });\n };\n window.setInterval(step, 100);\n }\n this.ready = true;\n };\n SizeMonitor.checkSize = function (entry, element, width, height) {\n if (entry) {\n if (!entry.size || width !== entry.size.width || height !== entry.size.height) {\n entry.size = { width: width, height: height };\n entry.cb(entry.size, element);\n }\n }\n };\n // Only a single callback is supported.\n SizeMonitor.observe = function (element, cb) {\n if (!this.ready) {\n this.init();\n }\n this.unobserve(element);\n if (this.resizeObserver) {\n this.resizeObserver.observe(element);\n }\n this.elements.set(element, { cb: cb });\n // Ensure first size callback happens synchronously.\n this.checkClientSize(element, { cb: cb });\n };\n SizeMonitor.unobserve = function (element) {\n if (this.resizeObserver) {\n this.resizeObserver.unobserve(element);\n }\n this.elements.delete(element);\n };\n SizeMonitor.checkClientSize = function (element, entry) {\n var width = element.clientWidth ? element.clientWidth : 0;\n var height = element.clientHeight ? element.clientHeight : 0;\n this.checkSize(entry, element, width, height);\n };\n SizeMonitor.elements = new Map();\n SizeMonitor.ready = false;\n return SizeMonitor;\n}());\nexport { SizeMonitor };\n","function circleRectOverlap(cx, cy, r, x, y, w, h) {\n // Find closest horizontal and vertical edges.\n var edgeX = cx < x ? x : cx > x + w ? x + w : cx;\n var edgeY = cy < y ? y : cy > y + h ? y + h : cy;\n // Find distance to closest edges.\n var dx = cx - edgeX;\n var dy = cy - edgeY;\n var d = Math.sqrt((dx * dx) + (dy * dy));\n return d <= r;\n}\nfunction rectRectOverlap(x1, y1, w1, h1, x2, y2, w2, h2) {\n var xOverlap = (x1 + w1) > x2 && x1 < (x2 + w2);\n var yOverlap = (y1 + h1) > y2 && y1 < (y2 + h2);\n return xOverlap && yOverlap;\n}\nfunction rectContainsRect(r1x, r1y, r1w, r1h, r2x, r2y, r2w, r2h) {\n return (r2x + r2w) < (r1x + r1w) && (r2x) > (r1x) && (r2y) > (r1y) && (r2y + r2h) < (r1y + r1h);\n}\n/**\n * @param data Points and labels for one or more series. The order of series determines label placement precedence.\n * @param bounds Bounds to fit the labels into. If a label can't be fully contained, it doesn't fit.\n * @returns Placed labels for the given series (in the given order).\n */\nexport function placeLabels(data, bounds, padding) {\n if (padding === void 0) { padding = 5; }\n var result = [];\n data = data.map(function (d) { return d.slice().sort(function (a, b) { return b.size - a.size; }); });\n for (var j = 0; j < data.length; j++) {\n var labels = result[j] = [];\n var datum = data[j];\n if (!(datum && datum.length && datum[0].label)) {\n continue;\n }\n var _loop_1 = function (i, ln) {\n var d = datum[i];\n var l = d.label;\n var r = d.size * 0.5;\n var x = d.point.x - l.width * 0.5;\n var y = d.point.y - r - l.height - padding;\n var width = l.width, height = l.height;\n var withinBounds = !bounds || rectContainsRect(bounds.x, bounds.y, bounds.width, bounds.height, x, y, width, height);\n if (!withinBounds) {\n return \"continue\";\n }\n var overlapPoints = data.some(function (datum) { return datum.some(function (d) { return circleRectOverlap(d.point.x, d.point.y, d.size * 0.5, x, y, width, height); }); });\n if (overlapPoints) {\n return \"continue\";\n }\n var overlapLabels = result.some(function (labels) { return labels.some(function (l) { return rectRectOverlap(l.x, l.y, l.width, l.height, x, y, width, height); }); });\n if (overlapLabels) {\n return \"continue\";\n }\n labels.push({\n index: i,\n text: l.text,\n x: x,\n y: y,\n width: width,\n height: height\n });\n };\n for (var i = 0, ln = datum.length; i < ln; i++) {\n _loop_1(i, ln);\n }\n }\n return result;\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nimport { Scene } from \"../scene/scene\";\nimport { Group } from \"../scene/group\";\nimport { Padding } from \"../util/padding\";\nimport { Shape } from \"../scene/shape/shape\";\nimport { Rect } from \"../scene/shape/rect\";\nimport { Legend } from \"./legend\";\nimport { BBox } from \"../scene/bbox\";\nimport { find } from \"../util/array\";\nimport { SizeMonitor } from \"../util/sizeMonitor\";\nimport { Observable, reactive } from \"../util/observable\";\nimport { createId } from \"../util/id\";\nimport { placeLabels } from \"../util/labelPlacement\";\nvar defaultTooltipCss = \"\\n.ag-chart-tooltip {\\n display: table;\\n position: absolute;\\n user-select: none;\\n pointer-events: none;\\n white-space: nowrap;\\n z-index: 99999;\\n font: 12px Verdana, sans-serif;\\n color: black;\\n background: rgb(244, 244, 244);\\n border-radius: 5px;\\n box-shadow: 0 0 1px rgba(3, 3, 3, 0.7), 0.5vh 0.5vh 1vh rgba(3, 3, 3, 0.25);\\n}\\n\\n.ag-chart-tooltip-hidden {\\n top: -10000px !important;\\n}\\n\\n.ag-chart-tooltip-title {\\n font-weight: bold;\\n padding: 7px;\\n border-top-left-radius: 5px;\\n border-top-right-radius: 5px;\\n color: white;\\n background-color: #888888;\\n border-top-left-radius: 5px;\\n border-top-right-radius: 5px;\\n}\\n\\n.ag-chart-tooltip-content {\\n padding: 7px;\\n line-height: 1.7em;\\n border-bottom-left-radius: 5px;\\n border-bottom-right-radius: 5px;\\n overflow: hidden;\\n}\\n\\n.ag-chart-tooltip-content:empty {\\n padding: 0;\\n height: 7px;\\n}\\n\\n.ag-chart-tooltip-arrow::before {\\n content: \\\"\\\";\\n\\n position: absolute;\\n top: 100%;\\n left: 50%;\\n transform: translateX(-50%);\\n\\n border: 6px solid #989898;\\n\\n border-left-color: transparent;\\n border-right-color: transparent;\\n border-top-color: #989898;\\n border-bottom-color: transparent;\\n\\n width: 0;\\n height: 0;\\n\\n margin: 0 auto;\\n}\\n\\n.ag-chart-tooltip-arrow::after {\\n content: \\\"\\\";\\n\\n position: absolute;\\n top: 100%;\\n left: 50%;\\n transform: translateX(-50%);\\n\\n border: 5px solid black;\\n\\n border-left-color: transparent;\\n border-right-color: transparent;\\n border-top-color: rgb(244, 244, 244);\\n border-bottom-color: transparent;\\n\\n width: 0;\\n height: 0;\\n\\n margin: 0 auto;\\n}\\n\\n.ag-chart-wrapper {\\n box-sizing: border-box;\\n overflow: hidden;\\n}\\n\";\nexport function toTooltipHtml(input, defaults) {\n if (typeof input === 'string') {\n return input;\n }\n defaults = defaults || {};\n var _a = input.content, content = _a === void 0 ? defaults.content || '' : _a, _b = input.title, title = _b === void 0 ? defaults.title || undefined : _b, _c = input.color, color = _c === void 0 ? defaults.color || 'white' : _c, _d = input.backgroundColor, backgroundColor = _d === void 0 ? defaults.backgroundColor || '#888' : _d;\n var titleHtml = title ? \"
\" + title + \"
\" : '';\n return titleHtml + \"
\" + content + \"
\";\n}\nvar ChartTooltip = /** @class */ (function (_super) {\n __extends(ChartTooltip, _super);\n function ChartTooltip(chart, document) {\n var _this = _super.call(this) || this;\n _this.enabled = true;\n _this.class = Chart.defaultTooltipClass;\n _this.delay = 0;\n /**\n * If `true`, the tooltip will be shown for the marker closest to the mouse cursor.\n * Only has effect on series with markers.\n */\n _this.tracking = true;\n _this.showTimeout = 0;\n _this.constrained = false;\n _this.chart = chart;\n _this.class = '';\n var tooltipRoot = document.body;\n var element = document.createElement('div');\n _this.element = tooltipRoot.appendChild(element);\n // Detect when the chart becomes invisible and hide the tooltip as well.\n if (window.IntersectionObserver) {\n var target_1 = _this.chart.scene.canvas.element;\n var observer = new IntersectionObserver(function (entries) {\n var e_1, _a;\n try {\n for (var entries_1 = __values(entries), entries_1_1 = entries_1.next(); !entries_1_1.done; entries_1_1 = entries_1.next()) {\n var entry = entries_1_1.value;\n if (entry.target === target_1 && entry.intersectionRatio === 0) {\n _this.toggle(false);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (entries_1_1 && !entries_1_1.done && (_a = entries_1.return)) _a.call(entries_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }, { root: tooltipRoot });\n observer.observe(target_1);\n _this.observer = observer;\n }\n return _this;\n }\n ChartTooltip.prototype.destroy = function () {\n var parentNode = this.element.parentNode;\n if (parentNode) {\n parentNode.removeChild(this.element);\n }\n if (this.observer) {\n this.observer.unobserve(this.chart.scene.canvas.element);\n }\n };\n ChartTooltip.prototype.isVisible = function () {\n var element = this.element;\n if (element.classList) { // if not IE11\n return !element.classList.contains(Chart.defaultTooltipClass + '-hidden');\n }\n // IE11 part.\n var classes = element.getAttribute('class');\n if (classes) {\n return classes.split(' ').indexOf(Chart.defaultTooltipClass + '-hidden') < 0;\n }\n return false;\n };\n ChartTooltip.prototype.updateClass = function (visible, constrained) {\n var classList = [Chart.defaultTooltipClass, this.class];\n if (visible !== true) {\n classList.push(Chart.defaultTooltipClass + \"-hidden\");\n }\n if (constrained !== true) {\n classList.push(Chart.defaultTooltipClass + \"-arrow\");\n }\n this.element.setAttribute('class', classList.join(' '));\n };\n /**\n * Shows tooltip at the given event's coordinates.\n * If the `html` parameter is missing, moves the existing tooltip to the new position.\n */\n ChartTooltip.prototype.show = function (meta, html, instantly) {\n var _this = this;\n if (instantly === void 0) { instantly = false; }\n var el = this.element;\n if (html !== undefined) {\n el.innerHTML = html;\n }\n else if (!el.innerHTML) {\n return;\n }\n var left = meta.pageX - el.clientWidth / 2;\n var top = meta.pageY - el.clientHeight - 8;\n this.constrained = false;\n if (this.chart.container) {\n var tooltipRect = el.getBoundingClientRect();\n var minLeft = 0;\n var maxLeft = window.innerWidth - tooltipRect.width - 1;\n if (left < minLeft) {\n left = minLeft;\n this.updateClass(true, this.constrained = true);\n }\n else if (left > maxLeft) {\n left = maxLeft;\n this.updateClass(true, this.constrained = true);\n }\n if (top < window.pageYOffset) {\n top = meta.pageY + 20;\n this.updateClass(true, this.constrained = true);\n }\n }\n el.style.left = Math.round(left) + \"px\";\n el.style.top = Math.round(top) + \"px\";\n if (this.delay > 0 && !instantly) {\n this.toggle(false);\n this.showTimeout = window.setTimeout(function () {\n _this.toggle(true);\n }, this.delay);\n return;\n }\n this.toggle(true);\n };\n ChartTooltip.prototype.toggle = function (visible) {\n if (!visible) {\n window.clearTimeout(this.showTimeout);\n if (this.chart.lastPick && !this.delay) {\n this.chart.dehighlightDatum();\n this.chart.lastPick = undefined;\n }\n }\n this.updateClass(visible, this.constrained);\n };\n __decorate([\n reactive()\n ], ChartTooltip.prototype, \"enabled\", void 0);\n __decorate([\n reactive()\n ], ChartTooltip.prototype, \"class\", void 0);\n __decorate([\n reactive()\n ], ChartTooltip.prototype, \"delay\", void 0);\n __decorate([\n reactive()\n ], ChartTooltip.prototype, \"tracking\", void 0);\n return ChartTooltip;\n}(Observable));\nexport { ChartTooltip };\nvar Chart = /** @class */ (function (_super) {\n __extends(Chart, _super);\n function Chart(document) {\n if (document === void 0) { document = window.document; }\n var _this = _super.call(this) || this;\n _this.id = createId(_this);\n _this.background = new Rect();\n _this.legend = new Legend();\n _this.legendAutoPadding = new Padding();\n _this.captionAutoPadding = 0; // top padding only\n _this._container = undefined;\n _this._data = [];\n _this._autoSize = false;\n _this.padding = new Padding(20);\n _this._axes = [];\n _this._series = [];\n _this._axesChanged = false;\n _this._seriesChanged = false;\n _this.layoutCallbackId = 0;\n _this._performLayout = function () {\n _this.layoutCallbackId = 0;\n _this.background.width = _this.width;\n _this.background.height = _this.height;\n _this.performLayout();\n if (!_this.layoutPending) {\n _this.fireEvent({ type: 'layoutDone' });\n }\n };\n _this.dataCallbackId = 0;\n _this.nodeData = new Map();\n _this.updateCallbackId = 0;\n _this.legendBBox = new BBox(0, 0, 0, 0);\n _this._onMouseDown = _this.onMouseDown.bind(_this);\n _this._onMouseMove = _this.onMouseMove.bind(_this);\n _this._onMouseUp = _this.onMouseUp.bind(_this);\n _this._onMouseOut = _this.onMouseOut.bind(_this);\n _this._onClick = _this.onClick.bind(_this);\n _this.pointerInsideLegend = false;\n _this.pointerOverLegendDatum = false;\n var root = new Group();\n var background = _this.background;\n background.fill = 'white';\n root.appendChild(background);\n var element = _this._element = document.createElement('div');\n element.setAttribute('class', 'ag-chart-wrapper');\n var scene = new Scene(document);\n _this.scene = scene;\n _this.autoSize = true; // Triggers width/height calc - needs to happen before root group assignment.\n scene.root = root;\n scene.container = element;\n _this.padding.addEventListener('layoutChange', _this.scheduleLayout, _this);\n var legend = _this.legend;\n legend.addEventListener('layoutChange', _this.scheduleLayout, _this);\n legend.item.label.addPropertyListener('formatter', _this.updateLegend, _this);\n legend.addPropertyListener('position', _this.onLegendPositionChange, _this);\n _this.tooltip = new ChartTooltip(_this, document);\n _this.tooltip.addPropertyListener('class', function () { return _this.tooltip.toggle(); });\n if (Chart.tooltipDocuments.indexOf(document) < 0) {\n var styleElement = document.createElement('style');\n styleElement.innerHTML = defaultTooltipCss;\n // Make sure the default tooltip style goes before other styles so it can be overridden.\n document.head.insertBefore(styleElement, document.head.querySelector('style'));\n Chart.tooltipDocuments.push(document);\n }\n _this.setupDomListeners(scene.canvas.element);\n _this.addPropertyListener('title', _this.onCaptionChange);\n _this.addPropertyListener('subtitle', _this.onCaptionChange);\n _this.addEventListener('layoutChange', _this.scheduleLayout);\n return _this;\n }\n Object.defineProperty(Chart.prototype, \"container\", {\n get: function () {\n return this._container;\n },\n set: function (value) {\n if (this._container !== value) {\n var parentNode = this.element.parentNode;\n if (parentNode != null) {\n parentNode.removeChild(this.element);\n }\n if (value) {\n value.appendChild(this.element);\n }\n this._container = value;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Chart.prototype, \"data\", {\n get: function () {\n return this._data;\n },\n set: function (data) {\n this._data = data;\n this.series.forEach(function (series) { return series.data = data; });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Chart.prototype, \"width\", {\n get: function () {\n return this.scene.width;\n },\n set: function (value) {\n this.autoSize = false;\n if (this.width !== value) {\n this.scene.resize(value, this.height);\n this.fireEvent({ type: 'layoutChange' });\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Chart.prototype, \"height\", {\n get: function () {\n return this.scene.height;\n },\n set: function (value) {\n this.autoSize = false;\n if (this.height !== value) {\n this.scene.resize(this.width, value);\n this.fireEvent({ type: 'layoutChange' });\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Chart.prototype, \"autoSize\", {\n get: function () {\n return this._autoSize;\n },\n set: function (value) {\n if (this._autoSize !== value) {\n this._autoSize = value;\n var style = this.element.style;\n if (value) {\n var chart_1 = this; // capture `this` for IE11\n SizeMonitor.observe(this.element, function (size) {\n if (size.width !== chart_1.width || size.height !== chart_1.height) {\n chart_1.scene.resize(size.width, size.height);\n chart_1.fireEvent({ type: 'layoutChange' });\n }\n });\n style.display = 'block';\n style.width = '100%';\n style.height = '100%';\n }\n else {\n SizeMonitor.unobserve(this.element);\n style.display = 'inline-block';\n style.width = 'auto';\n style.height = 'auto';\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Chart.prototype.download = function (fileName) {\n this.scene.download(fileName);\n };\n Chart.prototype.destroy = function () {\n this.tooltip.destroy();\n SizeMonitor.unobserve(this.element);\n this.container = undefined;\n this.cleanupDomListeners(this.scene.canvas.element);\n this.scene.container = undefined;\n };\n Chart.prototype.onLegendPositionChange = function () {\n this.legendAutoPadding.clear();\n this.layoutPending = true;\n };\n Chart.prototype.onCaptionChange = function (event) {\n var value = event.value, oldValue = event.oldValue;\n if (oldValue) {\n oldValue.removeEventListener('change', this.scheduleLayout, this);\n this.scene.root.removeChild(oldValue.node);\n }\n if (value) {\n value.addEventListener('change', this.scheduleLayout, this);\n this.scene.root.appendChild(value.node);\n }\n };\n Object.defineProperty(Chart.prototype, \"element\", {\n get: function () {\n return this._element;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Chart.prototype, \"axes\", {\n get: function () {\n return this._axes;\n },\n set: function (values) {\n var _this = this;\n this._axes.forEach(function (axis) { return _this.detachAxis(axis); });\n // make linked axes go after the regular ones (simulates stable sort by `linkedTo` property)\n this._axes = values.filter(function (a) { return !a.linkedTo; }).concat(values.filter(function (a) { return a.linkedTo; }));\n this._axes.forEach(function (axis) { return _this.attachAxis(axis); });\n this.axesChanged = true;\n },\n enumerable: true,\n configurable: true\n });\n Chart.prototype.attachAxis = function (axis) {\n this.scene.root.insertBefore(axis.group, this.seriesRoot);\n };\n Chart.prototype.detachAxis = function (axis) {\n this.scene.root.removeChild(axis.group);\n };\n Object.defineProperty(Chart.prototype, \"series\", {\n get: function () {\n return this._series;\n },\n set: function (values) {\n var _this = this;\n this.removeAllSeries();\n values.forEach(function (series) { return _this.addSeries(series); });\n },\n enumerable: true,\n configurable: true\n });\n Chart.prototype.scheduleLayout = function () {\n this.layoutPending = true;\n };\n Chart.prototype.scheduleData = function () {\n // To prevent the chart from thinking the cursor is over the same node\n // after a change to data (the nodes are reused on data changes).\n this.dehighlightDatum();\n this.dataPending = true;\n };\n Chart.prototype.addSeries = function (series, before) {\n var _a = this, allSeries = _a.series, seriesRoot = _a.seriesRoot;\n var canAdd = allSeries.indexOf(series) < 0;\n if (canAdd) {\n var beforeIndex = before ? allSeries.indexOf(before) : -1;\n if (beforeIndex >= 0) {\n allSeries.splice(beforeIndex, 0, series);\n seriesRoot.insertBefore(series.group, before.group);\n }\n else {\n allSeries.push(series);\n seriesRoot.append(series.group);\n }\n this.initSeries(series);\n this.seriesChanged = true;\n this.axesChanged = true;\n return true;\n }\n return false;\n };\n Chart.prototype.initSeries = function (series) {\n series.chart = this;\n if (!series.data) {\n series.data = this.data;\n }\n series.addEventListener('layoutChange', this.scheduleLayout, this);\n series.addEventListener('dataChange', this.scheduleData, this);\n series.addEventListener('legendChange', this.updateLegend, this);\n series.addEventListener('nodeClick', this.onSeriesNodeClick, this);\n };\n Chart.prototype.freeSeries = function (series) {\n series.chart = undefined;\n series.removeEventListener('layoutChange', this.scheduleLayout, this);\n series.removeEventListener('dataChange', this.scheduleData, this);\n series.removeEventListener('legendChange', this.updateLegend, this);\n series.removeEventListener('nodeClick', this.onSeriesNodeClick, this);\n };\n Chart.prototype.addSeriesAfter = function (series, after) {\n var _a = this, allSeries = _a.series, seriesRoot = _a.seriesRoot;\n var canAdd = allSeries.indexOf(series) < 0;\n if (canAdd) {\n var afterIndex = after ? this.series.indexOf(after) : -1;\n if (afterIndex >= 0) {\n if (afterIndex + 1 < allSeries.length) {\n seriesRoot.insertBefore(series.group, allSeries[afterIndex + 1].group);\n }\n else {\n seriesRoot.append(series.group);\n }\n this.initSeries(series);\n allSeries.splice(afterIndex + 1, 0, series);\n }\n else {\n if (allSeries.length > 0) {\n seriesRoot.insertBefore(series.group, allSeries[0].group);\n }\n else {\n seriesRoot.append(series.group);\n }\n this.initSeries(series);\n allSeries.unshift(series);\n }\n this.seriesChanged = true;\n this.axesChanged = true;\n }\n return false;\n };\n Chart.prototype.removeSeries = function (series) {\n var index = this.series.indexOf(series);\n if (index >= 0) {\n this.series.splice(index, 1);\n this.freeSeries(series);\n this.seriesRoot.removeChild(series.group);\n this.seriesChanged = true;\n return true;\n }\n return false;\n };\n Chart.prototype.removeAllSeries = function () {\n var _this = this;\n this.series.forEach(function (series) {\n _this.freeSeries(series);\n _this.seriesRoot.removeChild(series.group);\n });\n this._series = []; // using `_series` instead of `series` to prevent infinite recursion\n this.seriesChanged = true;\n };\n Chart.prototype.assignSeriesToAxes = function () {\n var _this = this;\n this.axes.forEach(function (axis) {\n var axisName = axis.direction + 'Axis';\n var boundSeries = [];\n _this.series.forEach(function (series) {\n if (series[axisName] === axis) {\n boundSeries.push(series);\n }\n });\n axis.boundSeries = boundSeries;\n });\n this.seriesChanged = false;\n };\n Chart.prototype.assignAxesToSeries = function (force) {\n var _this = this;\n if (force === void 0) { force = false; }\n // This method has to run before `assignSeriesToAxes`.\n var directionToAxesMap = {};\n this.axes.forEach(function (axis) {\n var direction = axis.direction;\n var directionAxes = directionToAxesMap[direction] || (directionToAxesMap[direction] = []);\n directionAxes.push(axis);\n });\n this.series.forEach(function (series) {\n series.directions.forEach(function (direction) {\n var axisName = direction + 'Axis';\n if (!series[axisName] || force) {\n var directionAxes = directionToAxesMap[direction];\n if (directionAxes) {\n var axis = _this.findMatchingAxis(directionAxes, series.getKeys(direction));\n if (axis) {\n series[axisName] = axis;\n }\n }\n }\n });\n });\n this.axesChanged = false;\n };\n Chart.prototype.findMatchingAxis = function (directionAxes, directionKeys) {\n for (var i = 0; i < directionAxes.length; i++) {\n var axis = directionAxes[i];\n var axisKeys = axis.keys;\n if (!axisKeys.length) {\n return axis;\n }\n else if (directionKeys) {\n for (var j = 0; j < directionKeys.length; j++) {\n if (axisKeys.indexOf(directionKeys[j]) >= 0) {\n return axis;\n }\n }\n }\n }\n };\n Object.defineProperty(Chart.prototype, \"axesChanged\", {\n get: function () {\n return this._axesChanged;\n },\n set: function (value) {\n this._axesChanged = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Chart.prototype, \"seriesChanged\", {\n get: function () {\n return this._seriesChanged;\n },\n set: function (value) {\n this._seriesChanged = value;\n if (value) {\n this.dataPending = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Chart.prototype, \"layoutPending\", {\n /**\n * Only `true` while we are waiting for the layout to start.\n * This will be `false` if the layout has already started and is ongoing.\n */\n get: function () {\n return !!this.layoutCallbackId;\n },\n set: function (value) {\n if (value) {\n if (!(this.layoutCallbackId || this.dataPending)) {\n this.layoutCallbackId = requestAnimationFrame(this._performLayout);\n this.series.forEach(function (s) { return s.nodeDataPending = true; });\n }\n }\n else if (this.layoutCallbackId) {\n cancelAnimationFrame(this.layoutCallbackId);\n this.layoutCallbackId = 0;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Chart.prototype, \"dataPending\", {\n get: function () {\n return !!this.dataCallbackId;\n },\n set: function (value) {\n var _this = this;\n if (this.dataCallbackId) {\n clearTimeout(this.dataCallbackId);\n this.dataCallbackId = 0;\n }\n if (value) {\n this.dataCallbackId = window.setTimeout(function () {\n _this.dataPending = false;\n _this.processData();\n }, 0);\n }\n },\n enumerable: true,\n configurable: true\n });\n Chart.prototype.processData = function () {\n this.layoutPending = false;\n if (this.axesChanged) {\n this.assignAxesToSeries(true);\n this.assignSeriesToAxes();\n }\n if (this.seriesChanged) {\n this.assignSeriesToAxes();\n }\n this.series.forEach(function (s) { return s.processData(); });\n this.updateLegend(); // sets legend data which schedules a layout\n this.layoutPending = true;\n };\n Chart.prototype.createNodeData = function () {\n var _this = this;\n this.nodeData.clear();\n this.series.forEach(function (s) {\n var data = s.visible ? s.createNodeData() : [];\n _this.nodeData.set(s, data);\n });\n };\n Chart.prototype.placeLabels = function () {\n var series = [];\n var data = [];\n this.nodeData.forEach(function (d, s) {\n if (s.visible && s.label.enabled) {\n series.push(s);\n data.push(s.getLabelData());\n }\n });\n var seriesRect = this.seriesRect;\n var labels = seriesRect\n ? placeLabels(data, { x: 0, y: 0, width: seriesRect.width, height: seriesRect.height })\n : [];\n return new Map(labels.map(function (l, i) { return [series[i], l]; }));\n };\n Chart.prototype.updateLegend = function () {\n var legendData = [];\n this.series.filter(function (s) { return s.showInLegend; }).forEach(function (series) { return series.listSeriesItems(legendData); });\n var formatter = this.legend.item.label.formatter;\n if (formatter) {\n legendData.forEach(function (datum) { return datum.label.text = formatter({\n id: datum.id,\n itemId: datum.itemId,\n value: datum.label.text\n }); });\n }\n this.legend.data = legendData;\n };\n Object.defineProperty(Chart.prototype, \"updatePending\", {\n get: function () {\n return !!this.updateCallbackId;\n },\n set: function (value) {\n var _this = this;\n if (this.updateCallbackId) {\n clearTimeout(this.updateCallbackId);\n this.updateCallbackId = 0;\n }\n if (value && !this.layoutPending) {\n this.updateCallbackId = window.setTimeout(function () {\n _this.update();\n }, 0);\n }\n },\n enumerable: true,\n configurable: true\n });\n Chart.prototype.update = function () {\n this.updatePending = false;\n this.series.forEach(function (series) {\n if (series.updatePending) {\n series.update();\n }\n });\n };\n Chart.prototype.positionCaptions = function () {\n var _a = this, title = _a.title, subtitle = _a.subtitle;\n var titleVisible = false;\n var subtitleVisible = false;\n var spacing = 10;\n var paddingTop = spacing;\n if (title && title.enabled) {\n title.node.x = this.width / 2;\n title.node.y = paddingTop;\n titleVisible = true;\n var titleBBox = title.node.computeBBox(); // make sure to set node's x/y, then computeBBox\n if (titleBBox) {\n paddingTop = titleBBox.y + titleBBox.height;\n }\n if (subtitle && subtitle.enabled) {\n subtitle.node.x = this.width / 2;\n subtitle.node.y = paddingTop + spacing;\n subtitleVisible = true;\n var subtitleBBox = subtitle.node.computeBBox();\n if (subtitleBBox) {\n paddingTop = subtitleBBox.y + subtitleBBox.height;\n }\n }\n }\n if (title) {\n title.node.visible = titleVisible;\n }\n if (subtitle) {\n subtitle.node.visible = subtitleVisible;\n }\n this.captionAutoPadding = Math.floor(paddingTop);\n };\n Chart.prototype.positionLegend = function () {\n if (!this.legend.enabled || !this.legend.data.length) {\n return;\n }\n var _a = this, legend = _a.legend, captionAutoPadding = _a.captionAutoPadding, legendAutoPadding = _a.legendAutoPadding;\n var width = this.width;\n var height = this.height - captionAutoPadding;\n var legendGroup = legend.group;\n var legendSpacing = legend.spacing;\n var translationX = 0;\n var translationY = 0;\n var legendBBox;\n switch (legend.position) {\n case 'bottom':\n legend.performLayout(width - legendSpacing * 2, 0);\n legendBBox = legendGroup.computeBBox();\n legendGroup.visible = legendBBox.height < Math.floor((height * 0.5)); // Remove legend if it takes up more than 50% of the chart height.\n if (legendGroup.visible) {\n translationX = (width - legendBBox.width) / 2 - legendBBox.x;\n translationY = captionAutoPadding + height - legendBBox.height - legendBBox.y - legendSpacing;\n legendAutoPadding.bottom = legendBBox.height;\n }\n else {\n legendAutoPadding.bottom = 0;\n }\n break;\n case 'top':\n legend.performLayout(width - legendSpacing * 2, 0);\n legendBBox = legendGroup.computeBBox();\n legendGroup.visible = legendBBox.height < Math.floor((height * 0.5));\n if (legendGroup.visible) {\n translationX = (width - legendBBox.width) / 2 - legendBBox.x;\n translationY = captionAutoPadding + legendSpacing - legendBBox.y;\n legendAutoPadding.top = legendBBox.height;\n }\n else {\n legendAutoPadding.top = 0;\n }\n break;\n case 'left':\n legend.performLayout(0, height - legendSpacing * 2);\n legendBBox = legendGroup.computeBBox();\n legendGroup.visible = legendBBox.width < Math.floor((width * 0.5)); // Remove legend if it takes up more than 50% of the chart width.\n if (legendGroup.visible) {\n translationX = legendSpacing - legendBBox.x;\n translationY = captionAutoPadding + (height - legendBBox.height) / 2 - legendBBox.y;\n legendAutoPadding.left = legendBBox.width;\n }\n else {\n legendAutoPadding.left = 0;\n }\n break;\n default: // case 'right':\n legend.performLayout(0, height - legendSpacing * 2);\n legendBBox = legendGroup.computeBBox();\n legendGroup.visible = legendBBox.width < Math.floor((width * 0.5));\n if (legendGroup.visible) {\n translationX = width - legendBBox.width - legendBBox.x - legendSpacing;\n translationY = captionAutoPadding + (height - legendBBox.height) / 2 - legendBBox.y;\n legendAutoPadding.right = legendBBox.width;\n }\n else {\n legendAutoPadding.right = 0;\n }\n break;\n }\n if (legendGroup.visible) {\n // Round off for pixel grid alignment to work properly.\n legendGroup.translationX = Math.floor(translationX + legendGroup.translationX);\n legendGroup.translationY = Math.floor(translationY + legendGroup.translationY);\n this.legendBBox = legendGroup.computeBBox();\n }\n };\n Chart.prototype.setupDomListeners = function (chartElement) {\n chartElement.addEventListener('mousedown', this._onMouseDown);\n chartElement.addEventListener('mousemove', this._onMouseMove);\n chartElement.addEventListener('mouseup', this._onMouseUp);\n chartElement.addEventListener('mouseout', this._onMouseOut);\n chartElement.addEventListener('click', this._onClick);\n };\n Chart.prototype.cleanupDomListeners = function (chartElement) {\n chartElement.removeEventListener('mousedown', this._onMouseDown);\n chartElement.removeEventListener('mousemove', this._onMouseMove);\n chartElement.removeEventListener('mouseup', this._onMouseUp);\n chartElement.removeEventListener('mouseout', this._onMouseOut);\n chartElement.removeEventListener('click', this._onClick);\n };\n Chart.prototype.getSeriesRect = function () {\n return this.seriesRect;\n };\n // x/y are local canvas coordinates in CSS pixels, not actual pixels\n Chart.prototype.pickSeriesNode = function (x, y) {\n if (!(this.seriesRect && this.seriesRect.containsPoint(x, y))) {\n return undefined;\n }\n var allSeries = this.series;\n var node = undefined;\n for (var i = allSeries.length - 1; i >= 0; i--) {\n var series = allSeries[i];\n if (!series.visible || !series.group.visible) {\n continue;\n }\n node = series.pickGroup.pickNode(x, y);\n if (node) {\n return {\n series: series,\n node: node\n };\n }\n }\n };\n // Provided x/y are in canvas coordinates.\n Chart.prototype.pickClosestSeriesNodeDatum = function (x, y) {\n if (!this.seriesRect || !this.seriesRect.containsPoint(x, y)) {\n return undefined;\n }\n var allSeries = this.series;\n function getDistance(p1, p2) {\n return Math.sqrt(Math.pow((p1.x - p2.x), 2) + Math.pow((p1.y - p2.y), 2));\n }\n var minDistance = Infinity;\n var closestDatum;\n var _loop_1 = function (i) {\n var series = allSeries[i];\n if (!series.visible || !series.group.visible) {\n return \"continue\";\n }\n var hitPoint = series.group.transformPoint(x, y);\n series.getNodeData().forEach(function (datum) {\n var _a, _b;\n if (!datum.point) {\n return;\n }\n // Ignore off-screen points when finding the closest series node datum in tracking mode.\n var xAxis = series.xAxis, yAxis = series.yAxis;\n var isInRange = ((_a = xAxis) === null || _a === void 0 ? void 0 : _a.inRange(datum.point.x)) && ((_b = yAxis) === null || _b === void 0 ? void 0 : _b.inRange(datum.point.y));\n if (!isInRange) {\n return;\n }\n var distance = getDistance(hitPoint, datum.point);\n if (distance < minDistance) {\n minDistance = distance;\n closestDatum = datum;\n }\n });\n };\n for (var i = allSeries.length - 1; i >= 0; i--) {\n _loop_1(i);\n }\n return closestDatum;\n };\n Chart.prototype.onMouseMove = function (event) {\n this.handleLegendMouseMove(event);\n if (this.tooltip.enabled) {\n if (this.tooltip.delay > 0) {\n this.tooltip.toggle(false);\n }\n this.handleTooltip(event);\n }\n };\n Chart.prototype.handleTooltip = function (event) {\n var _a = this, lastPick = _a.lastPick, tooltipTracking = _a.tooltip.tracking;\n var offsetX = event.offsetX, offsetY = event.offsetY;\n var pick = this.pickSeriesNode(offsetX, offsetY);\n var nodeDatum;\n if (pick && pick.node instanceof Shape) {\n var node = pick.node;\n nodeDatum = node.datum;\n if (lastPick && lastPick.datum === nodeDatum) {\n lastPick.node = node;\n lastPick.event = event;\n }\n // Marker nodes will have the `point` info in their datums.\n // Highlight if not a marker node or, if not in the tracking mode, highlight markers too.\n if ((!node.datum.point || !tooltipTracking)) {\n if (!lastPick // cursor moved from empty space to a node\n || lastPick.node !== node) { // cursor moved from one node to another\n this.onSeriesDatumPick(event, node.datum, node, event);\n }\n else if (pick.series.tooltip.enabled) { // cursor moved within the same node\n this.tooltip.show(event);\n }\n // A non-marker node (takes precedence over marker nodes) was highlighted.\n // Or we are not in the tracking mode.\n // Either way, we are done at this point.\n return;\n }\n }\n var hideTooltip = false;\n // In tracking mode a tooltip is shown for the closest rendered datum.\n // This makes it easier to show tooltips when markers are small and/or plentiful\n // and also gives the ability to show tooltips even when the series were configured\n // to not render markers.\n if (tooltipTracking) {\n var closestDatum = this.pickClosestSeriesNodeDatum(offsetX, offsetY);\n if (closestDatum && closestDatum.point) {\n var _b = closestDatum.point, x = _b.x, y = _b.y;\n var canvas = this.scene.canvas;\n var point = closestDatum.series.group.inverseTransformPoint(x, y);\n var canvasRect = canvas.element.getBoundingClientRect();\n this.onSeriesDatumPick({\n pageX: Math.round(canvasRect.left + window.pageXOffset + point.x),\n pageY: Math.round(canvasRect.top + window.pageYOffset + point.y)\n }, closestDatum, nodeDatum === closestDatum && pick ? pick.node : undefined, event);\n }\n else {\n hideTooltip = true;\n }\n }\n if (lastPick && (hideTooltip || !tooltipTracking)) {\n // Cursor moved from a non-marker node to empty space.\n this.dehighlightDatum();\n this.tooltip.toggle(false);\n this.lastPick = undefined;\n }\n };\n Chart.prototype.onMouseDown = function (event) { };\n Chart.prototype.onMouseUp = function (event) { };\n Chart.prototype.onMouseOut = function (event) {\n this.tooltip.toggle(false);\n };\n Chart.prototype.onClick = function (event) {\n if (this.checkSeriesNodeClick()) {\n return;\n }\n if (this.checkLegendClick(event)) {\n return;\n }\n this.fireEvent({\n type: 'click',\n event: event\n });\n };\n Chart.prototype.checkSeriesNodeClick = function () {\n var lastPick = this.lastPick;\n if (lastPick && lastPick.event && lastPick.node) {\n var event_1 = lastPick.event, datum = lastPick.datum;\n datum.series.fireNodeClickEvent(event_1, datum);\n return true;\n }\n return false;\n };\n Chart.prototype.onSeriesNodeClick = function (event) {\n this.fireEvent(__assign(__assign({}, event), { type: 'seriesNodeClick' }));\n };\n Chart.prototype.checkLegendClick = function (event) {\n var datum = this.legend.getDatumForPoint(event.offsetX, event.offsetY);\n if (datum) {\n var id_1 = datum.id, itemId = datum.itemId, enabled = datum.enabled;\n var series = find(this.series, function (series) { return series.id === id_1; });\n if (series) {\n series.toggleSeriesItem(itemId, !enabled);\n if (enabled) {\n this.tooltip.toggle(false);\n }\n this.legend.fireEvent({\n type: 'click',\n event: event,\n itemId: itemId,\n enabled: !enabled\n });\n return true;\n }\n }\n return false;\n };\n Chart.prototype.handleLegendMouseMove = function (event) {\n if (!this.legend.enabled) {\n return;\n }\n var offsetX = event.offsetX, offsetY = event.offsetY;\n var datum = this.legend.getDatumForPoint(offsetX, offsetY);\n var pointerInsideLegend = this.legendBBox.containsPoint(offsetX, offsetY);\n var pointerOverLegendDatum = pointerInsideLegend && datum !== undefined;\n if (!pointerInsideLegend && this.pointerInsideLegend) {\n this.pointerInsideLegend = false;\n this.element.style.cursor = 'default';\n // Dehighlight if the pointer was inside the legend and is now leaving it.\n this.dehighlightDatum();\n return;\n }\n if (pointerOverLegendDatum && !this.pointerOverLegendDatum) {\n this.element.style.cursor = 'pointer';\n }\n if (!pointerOverLegendDatum && this.pointerOverLegendDatum) {\n this.element.style.cursor = 'default';\n }\n this.pointerInsideLegend = pointerInsideLegend;\n this.pointerOverLegendDatum = pointerOverLegendDatum;\n var oldHighlightedDatum = this.highlightedDatum;\n if (datum) {\n var id_2 = datum.id, itemId = datum.itemId, enabled = datum.enabled;\n if (enabled) {\n var series = find(this.series, function (series) { return series.id === id_2; });\n if (series) {\n this.highlightedDatum = {\n series: series,\n itemId: itemId,\n datum: undefined\n };\n }\n }\n }\n // Careful to only schedule updates when necessary.\n if ((this.highlightedDatum && !oldHighlightedDatum) ||\n (this.highlightedDatum && oldHighlightedDatum &&\n (this.highlightedDatum.series !== oldHighlightedDatum.series ||\n this.highlightedDatum.itemId !== oldHighlightedDatum.itemId))) {\n this.series.forEach(function (s) { return s.updatePending = true; });\n }\n };\n Chart.prototype.onSeriesDatumPick = function (meta, datum, node, event) {\n var lastPick = this.lastPick;\n if (lastPick) {\n if (lastPick.datum === datum) {\n return;\n }\n this.dehighlightDatum();\n }\n this.lastPick = {\n datum: datum,\n node: node,\n event: event\n };\n this.highlightDatum(datum);\n var html = datum.series.tooltip.enabled && datum.series.getTooltipHtml(datum);\n if (html) {\n this.tooltip.show(meta, html);\n }\n };\n Chart.prototype.highlightDatum = function (datum) {\n this.element.style.cursor = datum.series.cursor;\n this.highlightedDatum = datum;\n this.series.forEach(function (s) { return s.updatePending = true; });\n };\n Chart.prototype.dehighlightDatum = function () {\n if (this.highlightedDatum) {\n this.highlightedDatum = undefined;\n this.series.forEach(function (s) { return s.updatePending = true; });\n }\n };\n Chart.defaultTooltipClass = 'ag-chart-tooltip';\n Chart.tooltipDocuments = [];\n __decorate([\n reactive('layoutChange')\n ], Chart.prototype, \"title\", void 0);\n __decorate([\n reactive('layoutChange')\n ], Chart.prototype, \"subtitle\", void 0);\n return Chart;\n}(Observable));\nexport { Chart };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Node } from \"./node\";\nimport { Path2D } from \"./path2D\";\nimport { BBox } from \"./bbox\";\n/**\n * Acts as `Group` node but with specified bounds that form a rectangle.\n * Any parts of the child nodes outside that rectangle will not be visible.\n * Unlike the `Group` node, the `ClipRect` node cannot be transformed.\n */\nvar ClipRect = /** @class */ (function (_super) {\n __extends(ClipRect, _super);\n function ClipRect() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.isContainerNode = true;\n _this.path = new Path2D();\n _this._enabled = true;\n _this._dirtyPath = true;\n _this._x = 0;\n _this._y = 0;\n _this._width = 10;\n _this._height = 10;\n return _this;\n }\n ClipRect.prototype.containsPoint = function (x, y) {\n var point = this.transformPoint(x, y);\n return point.x >= this.x && point.x <= this.x + this.width\n && point.y >= this.y && point.y <= this.y + this.height;\n };\n Object.defineProperty(ClipRect.prototype, \"enabled\", {\n get: function () {\n return this._enabled;\n },\n set: function (value) {\n if (this._enabled !== value) {\n this._enabled = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ClipRect.prototype, \"dirtyPath\", {\n get: function () {\n return this._dirtyPath;\n },\n set: function (value) {\n if (this._dirtyPath !== value) {\n this._dirtyPath = value;\n if (value) {\n this.dirty = true;\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ClipRect.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (value) {\n if (this._x !== value) {\n this._x = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ClipRect.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (value) {\n if (this._y !== value) {\n this._y = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ClipRect.prototype, \"width\", {\n get: function () {\n return this._width;\n },\n set: function (value) {\n if (this._width !== value) {\n this._width = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ClipRect.prototype, \"height\", {\n get: function () {\n return this._height;\n },\n set: function (value) {\n if (this._height !== value) {\n this._height = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n ClipRect.prototype.updatePath = function () {\n var path = this.path;\n path.clear();\n path.rect(this.x, this.y, this.width, this.height);\n this.dirtyPath = false;\n };\n ClipRect.prototype.computeBBox = function () {\n var _a = this, x = _a.x, y = _a.y, width = _a.width, height = _a.height;\n return new BBox(x, y, width, height);\n };\n ClipRect.prototype.render = function (ctx) {\n if (this.enabled) {\n if (this.dirtyPath) {\n this.updatePath();\n }\n this.path.draw(ctx);\n ctx.clip();\n }\n var children = this.children;\n var n = children.length;\n for (var i = 0; i < n; i++) {\n ctx.save();\n var child = children[i];\n if (child.visible) {\n child.render(ctx);\n }\n ctx.restore();\n }\n // debug\n // this.computeBBox().render(ctx, {\n // label: this.id,\n // resetTransform: true,\n // fillStyle: 'rgba(0, 0, 0, 0.5)'\n // });\n };\n ClipRect.className = 'ClipRect';\n return ClipRect;\n}(Node));\nexport { ClipRect };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Path } from \"../../scene/shape/path\";\nimport { BBox } from \"../../scene/bbox\";\nvar RangeHandle = /** @class */ (function (_super) {\n __extends(RangeHandle, _super);\n function RangeHandle() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._fill = '#f2f2f2';\n _this._stroke = '#999999';\n _this._strokeWidth = 1;\n _this._lineCap = 'square';\n _this._centerX = 0;\n _this._centerY = 0;\n // Use an even number for better looking results.\n _this._width = 8;\n // Use an even number for better looking results.\n _this._gripLineGap = 2;\n // Use an even number for better looking results.\n _this._gripLineLength = 8;\n _this._height = 16;\n return _this;\n }\n Object.defineProperty(RangeHandle.prototype, \"centerX\", {\n get: function () {\n return this._centerX;\n },\n set: function (value) {\n if (this._centerX !== value) {\n this._centerX = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RangeHandle.prototype, \"centerY\", {\n get: function () {\n return this._centerY;\n },\n set: function (value) {\n if (this._centerY !== value) {\n this._centerY = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RangeHandle.prototype, \"width\", {\n get: function () {\n return this._width;\n },\n set: function (value) {\n if (this._width !== value) {\n this._width = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RangeHandle.prototype, \"gripLineGap\", {\n get: function () {\n return this._gripLineGap;\n },\n set: function (value) {\n if (this._gripLineGap !== value) {\n this._gripLineGap = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RangeHandle.prototype, \"gripLineLength\", {\n get: function () {\n return this._gripLineLength;\n },\n set: function (value) {\n if (this._gripLineLength !== value) {\n this._gripLineLength = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RangeHandle.prototype, \"height\", {\n get: function () {\n return this._height;\n },\n set: function (value) {\n if (this._height !== value) {\n this._height = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n RangeHandle.prototype.computeBBox = function () {\n var _a = this, centerX = _a.centerX, centerY = _a.centerY, width = _a.width, height = _a.height;\n var x = centerX - width / 2;\n var y = centerY - height / 2;\n return new BBox(x, y, width, height);\n };\n RangeHandle.prototype.isPointInPath = function (x, y) {\n var point = this.transformPoint(x, y);\n var bbox = this.computeBBox();\n return bbox.containsPoint(point.x, point.y);\n };\n RangeHandle.prototype.updatePath = function () {\n var _a = this, path = _a.path, centerX = _a.centerX, centerY = _a.centerY, width = _a.width, height = _a.height;\n var _b = this, a = _b.alignment, al = _b.align;\n path.clear();\n var x = centerX - width / 2;\n var y = centerY - height / 2;\n var ax = al(a, x);\n var ay = al(a, y);\n var axw = ax + al(a, x, width);\n var ayh = ay + al(a, y, height);\n // Handle.\n path.moveTo(ax, ay);\n path.lineTo(axw, ay);\n path.lineTo(axw, ayh);\n path.lineTo(ax, ayh);\n path.lineTo(ax, ay);\n // Grip lines.\n var dx = this.gripLineGap / 2;\n var dy = this.gripLineLength / 2;\n path.moveTo(al(a, centerX - dx), al(a, centerY - dy));\n path.lineTo(al(a, centerX - dx), al(a, centerY + dy));\n path.moveTo(al(a, centerX + dx), al(a, centerY - dy));\n path.lineTo(al(a, centerX + dx), al(a, centerY + dy));\n };\n RangeHandle.className = 'RangeHandle';\n return RangeHandle;\n}(Path));\nexport { RangeHandle };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Path } from \"../../scene/shape/path\";\nimport { BBox } from \"../../scene/bbox\";\nvar RangeMask = /** @class */ (function (_super) {\n __extends(RangeMask, _super);\n function RangeMask() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._stroke = '#999999';\n _this._strokeWidth = 1;\n _this._fill = '#999999';\n _this._fillOpacity = 0.2;\n _this._lineCap = 'square';\n _this._x = 0;\n _this._y = 0;\n _this._width = 200;\n _this._height = 30;\n _this.minRange = 0.05;\n _this._min = 0;\n _this._max = 1;\n return _this;\n }\n Object.defineProperty(RangeMask.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (value) {\n if (this._x !== value) {\n this._x = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RangeMask.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (value) {\n if (this._y !== value) {\n this._y = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RangeMask.prototype, \"width\", {\n get: function () {\n return this._width;\n },\n set: function (value) {\n if (this._width !== value) {\n this._width = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RangeMask.prototype, \"height\", {\n get: function () {\n return this._height;\n },\n set: function (value) {\n if (this._height !== value) {\n this._height = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RangeMask.prototype, \"min\", {\n get: function () {\n return this._min;\n },\n set: function (value) {\n value = Math.min(Math.max(value, 0), this.max - this.minRange);\n if (isNaN(value)) {\n return;\n }\n if (this._min !== value) {\n this._min = value;\n this.dirtyPath = true;\n this.onRangeChange && this.onRangeChange(value, this.max);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RangeMask.prototype, \"max\", {\n get: function () {\n return this._max;\n },\n set: function (value) {\n value = Math.max(Math.min(value, 1), this.min + this.minRange);\n if (isNaN(value)) {\n return;\n }\n if (this._max !== value) {\n this._max = value;\n this.dirtyPath = true;\n this.onRangeChange && this.onRangeChange(this.min, value);\n }\n },\n enumerable: true,\n configurable: true\n });\n RangeMask.prototype.computeBBox = function () {\n var _a = this, x = _a.x, y = _a.y, width = _a.width, height = _a.height;\n return new BBox(x, y, width, height);\n };\n RangeMask.prototype.computeVisibleRangeBBox = function () {\n var _a = this, x = _a.x, y = _a.y, width = _a.width, height = _a.height, min = _a.min, max = _a.max;\n var minX = x + width * min;\n var maxX = x + width * max;\n return new BBox(minX, y, maxX - minX, height);\n };\n RangeMask.prototype.updatePath = function () {\n var _a = this, path = _a.path, x = _a.x, y = _a.y, width = _a.width, height = _a.height, min = _a.min, max = _a.max;\n var _b = this, a = _b.alignment, al = _b.align;\n path.clear();\n var ax = al(a, x);\n var ay = al(a, y);\n var axw = ax + al(a, x, width);\n var ayh = ay + al(a, y, height);\n // Whole range.\n path.moveTo(ax, ay);\n path.lineTo(axw, ay);\n path.lineTo(axw, ayh);\n path.lineTo(ax, ayh);\n path.lineTo(ax, ay);\n var minX = al(a, x + width * min);\n var maxX = al(a, x + width * max);\n // Visible range.\n path.moveTo(minX, ay);\n path.lineTo(minX, ayh);\n path.lineTo(maxX, ayh);\n path.lineTo(maxX, ay);\n path.lineTo(minX, ay);\n };\n RangeMask.className = 'RangeMask';\n return RangeMask;\n}(Path));\nexport { RangeMask };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Group } from \"../../scene/group\";\nimport { RangeHandle } from \"./rangeHandle\";\nimport { RangeMask } from \"./rangeMask\";\nvar RangeSelector = /** @class */ (function (_super) {\n __extends(RangeSelector, _super);\n function RangeSelector() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.isContainerNode = true;\n _this.minHandle = new RangeHandle();\n _this.maxHandle = new RangeHandle();\n _this.mask = (function () {\n var _a = RangeSelector.defaults, x = _a.x, y = _a.y, width = _a.width, height = _a.height, min = _a.min, max = _a.max;\n var mask = new RangeMask();\n mask.x = x;\n mask.y = y;\n mask.width = width;\n mask.height = height;\n mask.min = min;\n mask.max = max;\n var _b = _this, minHandle = _b.minHandle, maxHandle = _b.maxHandle;\n minHandle.centerX = x;\n maxHandle.centerX = x + width;\n minHandle.centerY = maxHandle.centerY = y + height / 2;\n _this.append([mask, minHandle, maxHandle]);\n mask.onRangeChange = function (min, max) {\n _this.updateHandles();\n _this.onRangeChange && _this.onRangeChange(min, max);\n };\n return mask;\n })();\n _this._x = RangeSelector.defaults.x;\n _this._y = RangeSelector.defaults.y;\n _this._width = RangeSelector.defaults.width;\n _this._height = RangeSelector.defaults.height;\n _this._min = RangeSelector.defaults.min;\n _this._max = RangeSelector.defaults.max;\n return _this;\n }\n Object.defineProperty(RangeSelector.prototype, \"x\", {\n get: function () {\n return this.mask.x;\n },\n set: function (value) {\n this.mask.x = value;\n this.updateHandles();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RangeSelector.prototype, \"y\", {\n get: function () {\n return this.mask.y;\n },\n set: function (value) {\n this.mask.y = value;\n this.updateHandles();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RangeSelector.prototype, \"width\", {\n get: function () {\n return this.mask.width;\n },\n set: function (value) {\n this.mask.width = value;\n this.updateHandles();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RangeSelector.prototype, \"height\", {\n get: function () {\n return this.mask.height;\n },\n set: function (value) {\n this.mask.height = value;\n this.updateHandles();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RangeSelector.prototype, \"min\", {\n get: function () {\n return this.mask.min;\n },\n set: function (value) {\n this.mask.min = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RangeSelector.prototype, \"max\", {\n get: function () {\n return this.mask.max;\n },\n set: function (value) {\n this.mask.max = value;\n },\n enumerable: true,\n configurable: true\n });\n RangeSelector.prototype.updateHandles = function () {\n var _a = this, minHandle = _a.minHandle, maxHandle = _a.maxHandle, x = _a.x, y = _a.y, width = _a.width, height = _a.height, mask = _a.mask;\n minHandle.centerX = x + width * mask.min;\n maxHandle.centerX = x + width * mask.max;\n minHandle.centerY = maxHandle.centerY = y + height / 2;\n };\n RangeSelector.prototype.computeBBox = function () {\n return this.mask.computeBBox();\n };\n RangeSelector.prototype.computeVisibleRangeBBox = function () {\n return this.mask.computeVisibleRangeBBox();\n };\n RangeSelector.prototype.render = function (ctx) {\n if (this.dirtyTransform) {\n this.computeTransformMatrix();\n }\n this.matrix.toContext(ctx);\n var _a = this, mask = _a.mask, minHandle = _a.minHandle, maxHandle = _a.maxHandle;\n [mask, minHandle, maxHandle].forEach(function (child) {\n ctx.save();\n if (child.visible) {\n child.render(ctx);\n }\n ctx.restore();\n });\n };\n RangeSelector.className = 'Range';\n RangeSelector.defaults = {\n x: 0,\n y: 0,\n width: 200,\n height: 30,\n min: 0,\n max: 1\n };\n return RangeSelector;\n}(Group));\nexport { RangeSelector };\n","var NavigatorMask = /** @class */ (function () {\n function NavigatorMask(rangeMask) {\n this.rm = rangeMask;\n }\n Object.defineProperty(NavigatorMask.prototype, \"fill\", {\n get: function () {\n return this.rm.fill;\n },\n set: function (value) {\n this.rm.fill = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NavigatorMask.prototype, \"stroke\", {\n get: function () {\n return this.rm.stroke;\n },\n set: function (value) {\n this.rm.stroke = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NavigatorMask.prototype, \"strokeWidth\", {\n get: function () {\n return this.rm.strokeWidth;\n },\n set: function (value) {\n this.rm.strokeWidth = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NavigatorMask.prototype, \"fillOpacity\", {\n get: function () {\n return this.rm.fillOpacity;\n },\n set: function (value) {\n this.rm.fillOpacity = value;\n },\n enumerable: true,\n configurable: true\n });\n return NavigatorMask;\n}());\nexport { NavigatorMask };\n","var NavigatorHandle = /** @class */ (function () {\n function NavigatorHandle(rangeHandle) {\n this.rh = rangeHandle;\n }\n Object.defineProperty(NavigatorHandle.prototype, \"fill\", {\n get: function () {\n return this.rh.fill;\n },\n set: function (value) {\n this.rh.fill = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NavigatorHandle.prototype, \"stroke\", {\n get: function () {\n return this.rh.stroke;\n },\n set: function (value) {\n this.rh.stroke = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NavigatorHandle.prototype, \"strokeWidth\", {\n get: function () {\n return this.rh.strokeWidth;\n },\n set: function (value) {\n this.rh.strokeWidth = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NavigatorHandle.prototype, \"width\", {\n get: function () {\n return this.rh.width;\n },\n set: function (value) {\n this.rh.width = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NavigatorHandle.prototype, \"height\", {\n get: function () {\n return this.rh.height;\n },\n set: function (value) {\n this.rh.height = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NavigatorHandle.prototype, \"gripLineGap\", {\n get: function () {\n return this.rh.gripLineGap;\n },\n set: function (value) {\n this.rh.gripLineGap = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NavigatorHandle.prototype, \"gripLineLength\", {\n get: function () {\n return this.rh.gripLineLength;\n },\n set: function (value) {\n this.rh.gripLineLength = value;\n },\n enumerable: true,\n configurable: true\n });\n return NavigatorHandle;\n}());\nexport { NavigatorHandle };\n","import { RangeSelector } from \"../shapes/rangeSelector\";\nimport { ChartAxisDirection } from \"../chartAxis\";\nimport { BBox } from \"../../scene/bbox\";\nimport { NavigatorMask } from \"./navigatorMask\";\nimport { NavigatorHandle } from \"./navigatorHandle\";\nvar Navigator = /** @class */ (function () {\n function Navigator(chart) {\n var _this = this;\n this.rs = new RangeSelector();\n this.mask = new NavigatorMask(this.rs.mask);\n this.minHandle = new NavigatorHandle(this.rs.minHandle);\n this.maxHandle = new NavigatorHandle(this.rs.maxHandle);\n this.minHandleDragging = false;\n this.maxHandleDragging = false;\n this.panHandleOffset = NaN;\n this.changedCursor = false;\n this._margin = 10;\n this.chart = chart;\n chart.scene.root.append(this.rs);\n this.rs.onRangeChange = function (min, max) { return _this.updateAxes(min, max); };\n }\n Object.defineProperty(Navigator.prototype, \"enabled\", {\n get: function () {\n return this.rs.visible;\n },\n set: function (value) {\n this.rs.visible = value;\n this.chart.layoutPending = true;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Navigator.prototype, \"x\", {\n get: function () {\n return this.rs.x;\n },\n set: function (value) {\n this.rs.x = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Navigator.prototype, \"y\", {\n get: function () {\n return this.rs.y;\n },\n set: function (value) {\n this.rs.y = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Navigator.prototype, \"width\", {\n get: function () {\n return this.rs.width;\n },\n set: function (value) {\n this.rs.width = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Navigator.prototype, \"height\", {\n get: function () {\n return this.rs.height;\n },\n set: function (value) {\n this.rs.height = value;\n this.chart.layoutPending = true;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Navigator.prototype, \"margin\", {\n get: function () {\n return this._margin;\n },\n set: function (value) {\n this._margin = value;\n this.chart.layoutPending = true;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Navigator.prototype, \"min\", {\n get: function () {\n return this.rs.min;\n },\n set: function (value) {\n this.rs.min = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Navigator.prototype, \"max\", {\n get: function () {\n return this.rs.max;\n },\n set: function (value) {\n this.rs.max = value;\n },\n enumerable: true,\n configurable: true\n });\n Navigator.prototype.updateAxes = function (min, max) {\n var _this = this;\n var chart = this.chart;\n var clipSeries = false;\n chart.axes.forEach(function (axis) {\n if (axis.direction === ChartAxisDirection.X) {\n if (!clipSeries && (min > 0 || max < 1)) {\n clipSeries = true;\n }\n axis.visibleRange = [min, max];\n var oldLabelAutoRotated = axis.labelAutoRotated;\n axis.update();\n if (axis.labelAutoRotated !== oldLabelAutoRotated) {\n _this.chart.layoutPending = true;\n }\n }\n });\n chart.seriesRoot.enabled = clipSeries;\n chart.series.forEach(function (s) { return s.nodeDataPending = true; });\n };\n Navigator.prototype.onDragStart = function (offset) {\n if (!this.enabled) {\n return;\n }\n var offsetX = offset.offsetX, offsetY = offset.offsetY;\n var rs = this.rs;\n var minHandle = rs.minHandle, maxHandle = rs.maxHandle, x = rs.x, width = rs.width, min = rs.min;\n var visibleRange = rs.computeVisibleRangeBBox();\n if (!(this.minHandleDragging || this.maxHandleDragging)) {\n if (minHandle.containsPoint(offsetX, offsetY)) {\n this.minHandleDragging = true;\n }\n else if (maxHandle.containsPoint(offsetX, offsetY)) {\n this.maxHandleDragging = true;\n }\n else if (visibleRange.containsPoint(offsetX, offsetY)) {\n this.panHandleOffset = (offsetX - x) / width - min;\n }\n }\n };\n Navigator.prototype.onDrag = function (offset) {\n if (!this.enabled) {\n return;\n }\n var _a = this, rs = _a.rs, panHandleOffset = _a.panHandleOffset;\n var x = rs.x, y = rs.y, width = rs.width, height = rs.height, minHandle = rs.minHandle, maxHandle = rs.maxHandle;\n var style = this.chart.element.style;\n var offsetX = offset.offsetX, offsetY = offset.offsetY;\n var minX = x + width * rs.min;\n var maxX = x + width * rs.max;\n var visibleRange = new BBox(minX, y, maxX - minX, height);\n function getRatio() {\n return Math.min(Math.max((offsetX - x) / width, 0), 1);\n }\n if (minHandle.containsPoint(offsetX, offsetY)) {\n this.changedCursor = true;\n style.cursor = 'ew-resize';\n }\n else if (maxHandle.containsPoint(offsetX, offsetY)) {\n this.changedCursor = true;\n style.cursor = 'ew-resize';\n }\n else if (visibleRange.containsPoint(offsetX, offsetY)) {\n this.changedCursor = true;\n style.cursor = 'grab';\n }\n else if (this.changedCursor) {\n this.changedCursor = false;\n style.cursor = 'default';\n }\n if (this.minHandleDragging) {\n rs.min = getRatio();\n }\n else if (this.maxHandleDragging) {\n rs.max = getRatio();\n }\n else if (!isNaN(panHandleOffset)) {\n var span = rs.max - rs.min;\n var min = Math.min(getRatio() - panHandleOffset, 1 - span);\n if (min <= rs.min) { // pan left\n rs.min = min;\n rs.max = rs.min + span;\n }\n else { // pan right\n rs.max = min + span;\n rs.min = rs.max - span;\n }\n }\n };\n Navigator.prototype.onDragStop = function () {\n this.stopHandleDragging();\n };\n Navigator.prototype.stopHandleDragging = function () {\n this.minHandleDragging = this.maxHandleDragging = false;\n this.panHandleOffset = NaN;\n };\n return Navigator;\n}());\nexport { Navigator };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n};\nimport { Chart } from \"./chart\";\nimport { CategoryAxis } from \"./axis/categoryAxis\";\nimport { GroupedCategoryAxis } from \"./axis/groupedCategoryAxis\";\nimport { ChartAxisPosition, ChartAxisDirection } from \"./chartAxis\";\nimport { BBox } from \"../scene/bbox\";\nimport { ClipRect } from \"../scene/clipRect\";\nimport { Navigator } from \"./navigator/navigator\";\nimport { NumberAxis } from \"./axis/numberAxis\";\nvar CartesianChart = /** @class */ (function (_super) {\n __extends(CartesianChart, _super);\n function CartesianChart(document) {\n if (document === void 0) { document = window.document; }\n var _this = _super.call(this, document) || this;\n _this._seriesRoot = new ClipRect();\n _this.navigator = new Navigator(_this);\n // Prevent the scene from rendering chart components in an invalid state\n // (before first layout is performed).\n _this.scene.root.visible = false;\n var root = _this.scene.root;\n root.append(_this.seriesRoot);\n root.append(_this.legend.group);\n _this.navigator.enabled = false;\n return _this;\n }\n Object.defineProperty(CartesianChart.prototype, \"seriesRoot\", {\n get: function () {\n return this._seriesRoot;\n },\n enumerable: true,\n configurable: true\n });\n CartesianChart.prototype.performLayout = function () {\n if (this.dataPending) {\n return;\n }\n this.scene.root.visible = true;\n var _a = this, width = _a.width, height = _a.height, axes = _a.axes, legend = _a.legend, navigator = _a.navigator;\n var shrinkRect = new BBox(0, 0, width, height);\n this.positionCaptions();\n this.positionLegend();\n if (legend.enabled && legend.data.length) {\n var legendAutoPadding = this.legendAutoPadding;\n var legendPadding = this.legend.spacing;\n shrinkRect.x += legendAutoPadding.left;\n shrinkRect.y += legendAutoPadding.top;\n shrinkRect.width -= legendAutoPadding.left + legendAutoPadding.right;\n shrinkRect.height -= legendAutoPadding.top + legendAutoPadding.bottom;\n switch (this.legend.position) {\n case 'right':\n shrinkRect.width -= legendPadding;\n break;\n case 'bottom':\n shrinkRect.height -= legendPadding;\n break;\n case 'left':\n shrinkRect.x += legendPadding;\n shrinkRect.width -= legendPadding;\n break;\n case 'top':\n shrinkRect.y += legendPadding;\n shrinkRect.height -= legendPadding;\n break;\n }\n }\n var _b = this, captionAutoPadding = _b.captionAutoPadding, padding = _b.padding;\n shrinkRect.x += padding.left;\n shrinkRect.width -= padding.left + padding.right;\n shrinkRect.y += padding.top + captionAutoPadding;\n shrinkRect.height -= padding.top + captionAutoPadding + padding.bottom;\n if (navigator.enabled) {\n shrinkRect.height -= navigator.height + navigator.margin;\n }\n // Set the number of ticks for continuous axes based on the available range\n // before updating the axis domain via `this.updateAxes()` as the tick count has an effect on the calculated `nice` domain extent\n axes.forEach(function (axis) {\n var availableRange = 0;\n switch (axis.position) {\n case ChartAxisPosition.Top:\n case ChartAxisPosition.Bottom:\n availableRange = shrinkRect.width;\n break;\n case ChartAxisPosition.Left:\n case ChartAxisPosition.Right:\n availableRange = shrinkRect.height;\n break;\n }\n axis.calculateTickCount(availableRange);\n });\n this.updateAxes();\n var bottomAxesHeight = 0;\n var axisPositionVisited = {\n top: false,\n right: false,\n bottom: false,\n left: false,\n angle: false,\n radius: false\n };\n axes.forEach(function (axis) {\n axis.group.visible = true;\n var axisThickness = Math.floor(axis.thickness || axis.computeBBox().width);\n // for multiple axes in the same direction and position, apply padding at the top of each inner axis (i.e. between axes).\n var axisPadding = axis.title && axis.title.padding.top || 15;\n if (axisPositionVisited[axis.position]) {\n axisThickness += axisPadding;\n }\n switch (axis.position) {\n case ChartAxisPosition.Top:\n axisPositionVisited[ChartAxisPosition.Top] = true;\n shrinkRect.y += axisThickness;\n shrinkRect.height -= axisThickness;\n axis.translation.y = Math.floor(shrinkRect.y + 1);\n axis.label.mirrored = true;\n break;\n case ChartAxisPosition.Right:\n axisPositionVisited[ChartAxisPosition.Right] = true;\n shrinkRect.width -= axisThickness;\n axis.translation.x = Math.max(Math.floor(shrinkRect.x), Math.floor(shrinkRect.x + shrinkRect.width));\n axis.label.mirrored = true;\n break;\n case ChartAxisPosition.Bottom:\n axisPositionVisited[ChartAxisPosition.Bottom] = true;\n shrinkRect.height -= axisThickness;\n bottomAxesHeight += axisThickness;\n axis.translation.y = Math.max(Math.floor(shrinkRect.y), Math.floor(shrinkRect.y + shrinkRect.height + 1));\n break;\n case ChartAxisPosition.Left:\n axisPositionVisited[ChartAxisPosition.Left] = true;\n shrinkRect.x += axisThickness;\n shrinkRect.width -= axisThickness;\n axis.translation.x = Math.floor(shrinkRect.x);\n break;\n }\n });\n // width and height should not be negative\n shrinkRect.width = Math.max(0, shrinkRect.width);\n shrinkRect.height = Math.max(0, shrinkRect.height);\n axes.forEach(function (axis) {\n switch (axis.position) {\n case ChartAxisPosition.Top:\n case ChartAxisPosition.Bottom:\n axis.translation.x = Math.floor(shrinkRect.x);\n axis.range = [0, shrinkRect.width];\n axis.gridLength = shrinkRect.height;\n break;\n case ChartAxisPosition.Left:\n case ChartAxisPosition.Right:\n axis.translation.y = Math.floor(shrinkRect.y);\n if (axis instanceof CategoryAxis || axis instanceof GroupedCategoryAxis) {\n axis.range = [0, shrinkRect.height];\n }\n else {\n axis.range = [shrinkRect.height, 0];\n }\n axis.gridLength = shrinkRect.width;\n break;\n }\n });\n this.createNodeData();\n this.seriesRect = shrinkRect;\n this.series.forEach(function (series) {\n series.group.translationX = Math.floor(shrinkRect.x);\n series.group.translationY = Math.floor(shrinkRect.y);\n series.update(); // this has to happen after the `updateAxes` call\n });\n var seriesRoot = this.seriesRoot;\n seriesRoot.x = shrinkRect.x;\n seriesRoot.y = shrinkRect.y;\n seriesRoot.width = shrinkRect.width;\n seriesRoot.height = shrinkRect.height;\n if (navigator.enabled) {\n navigator.x = shrinkRect.x;\n navigator.y = shrinkRect.y + shrinkRect.height + bottomAxesHeight + navigator.margin;\n navigator.width = shrinkRect.width;\n }\n this.axes.forEach(function (axis) { return axis.update(); });\n };\n CartesianChart.prototype.initSeries = function (series) {\n _super.prototype.initSeries.call(this, series);\n };\n CartesianChart.prototype.freeSeries = function (series) {\n _super.prototype.freeSeries.call(this, series);\n };\n CartesianChart.prototype.setupDomListeners = function (chartElement) {\n _super.prototype.setupDomListeners.call(this, chartElement);\n this._onTouchStart = this.onTouchStart.bind(this);\n this._onTouchMove = this.onTouchMove.bind(this);\n this._onTouchEnd = this.onTouchEnd.bind(this);\n this._onTouchCancel = this.onTouchCancel.bind(this);\n chartElement.addEventListener('touchstart', this._onTouchStart, { passive: true });\n chartElement.addEventListener('touchmove', this._onTouchMove, { passive: true });\n chartElement.addEventListener('touchend', this._onTouchEnd, { passive: true });\n chartElement.addEventListener('touchcancel', this._onTouchCancel, { passive: true });\n };\n CartesianChart.prototype.cleanupDomListeners = function (chartElement) {\n _super.prototype.cleanupDomListeners.call(this, chartElement);\n chartElement.removeEventListener('touchstart', this._onTouchStart);\n chartElement.removeEventListener('touchmove', this._onTouchMove);\n chartElement.removeEventListener('touchend', this._onTouchEnd);\n chartElement.removeEventListener('touchcancel', this._onTouchCancel);\n };\n CartesianChart.prototype.getTouchOffset = function (event) {\n var rect = this.scene.canvas.element.getBoundingClientRect();\n var touch = event.touches[0];\n return touch ? {\n offsetX: touch.clientX - rect.left,\n offsetY: touch.clientY - rect.top\n } : undefined;\n };\n CartesianChart.prototype.onTouchStart = function (event) {\n var offset = this.getTouchOffset(event);\n if (offset) {\n this.navigator.onDragStart(offset);\n }\n };\n CartesianChart.prototype.onTouchMove = function (event) {\n var offset = this.getTouchOffset(event);\n if (offset) {\n this.navigator.onDrag(offset);\n }\n };\n CartesianChart.prototype.onTouchEnd = function (event) {\n this.navigator.onDragStop();\n };\n CartesianChart.prototype.onTouchCancel = function (event) {\n this.navigator.onDragStop();\n };\n CartesianChart.prototype.onMouseDown = function (event) {\n _super.prototype.onMouseDown.call(this, event);\n this.navigator.onDragStart(event);\n };\n CartesianChart.prototype.onMouseMove = function (event) {\n _super.prototype.onMouseMove.call(this, event);\n this.navigator.onDrag(event);\n };\n CartesianChart.prototype.onMouseUp = function (event) {\n _super.prototype.onMouseUp.call(this, event);\n this.navigator.onDragStop();\n };\n CartesianChart.prototype.onMouseOut = function (event) {\n _super.prototype.onMouseOut.call(this, event);\n this.navigator.onDragStop();\n };\n CartesianChart.prototype.assignAxesToSeries = function (force) {\n if (force === void 0) { force = false; }\n _super.prototype.assignAxesToSeries.call(this, force);\n this.series.forEach(function (series) {\n if (!series.xAxis) {\n console.warn(\"Could not find a matching xAxis for the \" + series.id + \" series.\");\n }\n if (!series.yAxis) {\n console.warn(\"Could not find a matching yAxis for the \" + series.id + \" series.\");\n }\n });\n };\n CartesianChart.prototype.updateAxes = function () {\n var _this = this;\n var navigator = this.navigator;\n var clipSeries = false;\n var primaryTickCount;\n this.axes.forEach(function (axis) {\n var _a;\n var direction = axis.direction, boundSeries = axis.boundSeries;\n if (boundSeries.length === 0 && _this._series.length > 0) {\n console.warn('AG Charts - chart series not initialised; check series and axes configuration.');\n }\n if (axis.linkedTo) {\n axis.domain = axis.linkedTo.domain;\n }\n else {\n var domains_1 = [];\n boundSeries.filter(function (s) { return s.visible; }).forEach(function (series) {\n domains_1.push(series.getDomain(direction));\n });\n var domain = (_a = new Array()).concat.apply(_a, __spread(domains_1));\n var isYAxis = axis.direction === 'y';\n if (axis instanceof NumberAxis && isYAxis) {\n // the `primaryTickCount` is used to align the secondary axis tick count with the primary\n axis.setDomain(domain, primaryTickCount);\n primaryTickCount = primaryTickCount || axis.scale.ticks(axis.calculatedTickCount).length;\n }\n else {\n axis.domain = domain;\n }\n }\n if (axis.direction === ChartAxisDirection.X) {\n axis.visibleRange = [navigator.min, navigator.max];\n }\n if (!clipSeries && (axis.visibleRange[0] > 0 || axis.visibleRange[1] < 1)) {\n clipSeries = true;\n }\n axis.update();\n });\n this.seriesRoot.enabled = clipSeries;\n };\n CartesianChart.className = 'CartesianChart';\n CartesianChart.type = 'cartesian';\n return CartesianChart;\n}(Chart));\nexport { CartesianChart };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { BBox } from \"../scene/bbox\";\nimport { ClipRect } from \"../scene/clipRect\";\nimport { Chart } from \"./chart\";\nvar HierarchyChart = /** @class */ (function (_super) {\n __extends(HierarchyChart, _super);\n function HierarchyChart(document) {\n if (document === void 0) { document = window.document; }\n var _this = _super.call(this, document) || this;\n _this._data = {};\n _this._seriesRoot = new ClipRect();\n // Prevent the scene from rendering chart components in an invalid state\n // (before first layout is performed).\n _this.scene.root.visible = false;\n var root = _this.scene.root;\n root.append(_this.seriesRoot);\n root.append(_this.legend.group);\n return _this;\n }\n Object.defineProperty(HierarchyChart.prototype, \"seriesRoot\", {\n get: function () {\n return this._seriesRoot;\n },\n enumerable: true,\n configurable: true\n });\n HierarchyChart.prototype.performLayout = function () {\n if (this.dataPending) {\n return;\n }\n this.scene.root.visible = true;\n var _a = this, width = _a.width, height = _a.height, legend = _a.legend;\n var shrinkRect = new BBox(0, 0, width, height);\n this.positionCaptions();\n this.positionLegend();\n if (legend.enabled && legend.data.length) {\n var legendAutoPadding = this.legendAutoPadding;\n var legendPadding = this.legend.spacing;\n shrinkRect.x += legendAutoPadding.left;\n shrinkRect.y += legendAutoPadding.top;\n shrinkRect.width -= legendAutoPadding.left + legendAutoPadding.right;\n shrinkRect.height -= legendAutoPadding.top + legendAutoPadding.bottom;\n switch (this.legend.position) {\n case 'right':\n shrinkRect.width -= legendPadding;\n break;\n case 'bottom':\n shrinkRect.height -= legendPadding;\n break;\n case 'left':\n shrinkRect.x += legendPadding;\n shrinkRect.width -= legendPadding;\n break;\n case 'top':\n shrinkRect.y += legendPadding;\n shrinkRect.height -= legendPadding;\n break;\n }\n }\n var _b = this, captionAutoPadding = _b.captionAutoPadding, padding = _b.padding;\n shrinkRect.x += padding.left;\n shrinkRect.width -= padding.left + padding.right;\n shrinkRect.y += padding.top + captionAutoPadding;\n shrinkRect.height -= padding.top + captionAutoPadding + padding.bottom;\n this.seriesRect = shrinkRect;\n this.series.forEach(function (series) {\n series.group.translationX = Math.floor(shrinkRect.x);\n series.group.translationY = Math.floor(shrinkRect.y);\n series.update(); // this has to happen after the `updateAxes` call\n });\n var seriesRoot = this.seriesRoot;\n seriesRoot.x = shrinkRect.x;\n seriesRoot.y = shrinkRect.y;\n seriesRoot.width = shrinkRect.width;\n seriesRoot.height = shrinkRect.height;\n };\n HierarchyChart.className = 'HierarchyChart';\n HierarchyChart.type = 'hierarchy';\n return HierarchyChart;\n}(Chart));\nexport { HierarchyChart };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n};\nimport { CartesianChart } from \"./cartesianChart\";\nimport { extent } from \"../util/array\";\nimport { ChartAxisDirection } from \"./chartAxis\";\nimport { isContinuous } from \"../util/value\";\nvar GroupedCategoryChart = /** @class */ (function (_super) {\n __extends(GroupedCategoryChart, _super);\n function GroupedCategoryChart() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n GroupedCategoryChart.prototype.updateAxes = function () {\n this.axes.forEach(function (axis) {\n var _a;\n var direction = axis.direction, boundSeries = axis.boundSeries;\n var domains = [];\n var isNumericX = undefined;\n boundSeries.filter(function (s) { return s.visible; }).forEach(function (series) {\n if (direction === ChartAxisDirection.X) {\n if (isNumericX === undefined) {\n // always add first X domain\n var domain_1 = series.getDomain(direction);\n domains.push(domain_1);\n isNumericX = typeof domain_1[0] === 'number';\n }\n else if (isNumericX) {\n // only add further X domains if the axis is numeric\n domains.push(series.getDomain(direction));\n }\n }\n else {\n domains.push(series.getDomain(direction));\n }\n });\n var domain = (_a = new Array()).concat.apply(_a, __spread(domains));\n axis.domain = extent(domain, isContinuous) || domain;\n axis.update();\n });\n };\n GroupedCategoryChart.className = 'GroupedCategoryChart';\n GroupedCategoryChart.type = 'groupedCategory';\n return GroupedCategoryChart;\n}(CartesianChart));\nexport { GroupedCategoryChart };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { getFont } from \"../scene/shape/text\";\nimport { Observable, reactive } from \"../util/observable\";\nvar Label = /** @class */ (function (_super) {\n __extends(Label, _super);\n function Label() {\n var _this = _super.call(this) || this;\n _this.enabled = true;\n _this.fontSize = 12;\n _this.fontFamily = 'Verdana, sans-serif';\n _this.color = 'rgba(70, 70, 70, 1)';\n return _this;\n }\n Label.prototype.getFont = function () {\n return getFont(this.fontSize, this.fontFamily, this.fontStyle, this.fontWeight);\n };\n __decorate([\n reactive('change', 'dataChange')\n ], Label.prototype, \"enabled\", void 0);\n __decorate([\n reactive('change')\n ], Label.prototype, \"fontSize\", void 0);\n __decorate([\n reactive('change')\n ], Label.prototype, \"fontFamily\", void 0);\n __decorate([\n reactive('change')\n ], Label.prototype, \"fontStyle\", void 0);\n __decorate([\n reactive('change')\n ], Label.prototype, \"fontWeight\", void 0);\n __decorate([\n reactive('change')\n ], Label.prototype, \"color\", void 0);\n return Label;\n}(Observable));\nexport { Label };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n};\nimport { Group } from \"../../scene/group\";\nimport { Observable, reactive } from \"../../util/observable\";\nimport { ChartAxisDirection } from \"../chartAxis\";\nimport { createId } from \"../../util/id\";\nimport { Label } from \"../label\";\nimport { isNumber } from \"../../util/value\";\nimport { TimeAxis } from \"../axis/timeAxis\";\nvar SeriesItemHighlightStyle = /** @class */ (function () {\n function SeriesItemHighlightStyle() {\n this.fill = 'yellow';\n this.stroke = undefined;\n this.strokeWidth = undefined;\n }\n return SeriesItemHighlightStyle;\n}());\nexport { SeriesItemHighlightStyle };\nvar SeriesHighlightStyle = /** @class */ (function () {\n function SeriesHighlightStyle() {\n this.strokeWidth = undefined;\n this.dimOpacity = undefined;\n }\n return SeriesHighlightStyle;\n}());\nexport { SeriesHighlightStyle };\nvar HighlightStyle = /** @class */ (function () {\n function HighlightStyle() {\n /**\n * @deprecated Use item.fill instead.\n */\n this.fill = undefined;\n /**\n * @deprecated Use item.stroke instead.\n */\n this.stroke = undefined;\n /**\n * @deprecated Use item.strokeWidth instead.\n */\n this.strokeWidth = undefined;\n this.item = new SeriesItemHighlightStyle();\n this.series = new SeriesHighlightStyle();\n }\n return HighlightStyle;\n}());\nexport { HighlightStyle };\nvar SeriesTooltip = /** @class */ (function (_super) {\n __extends(SeriesTooltip, _super);\n function SeriesTooltip() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.enabled = true;\n return _this;\n }\n __decorate([\n reactive('change')\n ], SeriesTooltip.prototype, \"enabled\", void 0);\n return SeriesTooltip;\n}(Observable));\nexport { SeriesTooltip };\nvar Series = /** @class */ (function (_super) {\n __extends(Series, _super);\n function Series() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.id = createId(_this);\n // The group node that contains all the nodes used to render this series.\n _this.group = new Group();\n // The group node that contains all the nodes that can be \"picked\" (react to hover, tap, click).\n _this.pickGroup = _this.group.appendChild(new Group());\n _this.directions = [ChartAxisDirection.X, ChartAxisDirection.Y];\n _this.directionKeys = {};\n _this.label = new Label();\n _this.data = undefined;\n _this.visible = true;\n _this.showInLegend = true;\n _this.cursor = 'default';\n _this._nodeDataPending = true;\n _this._updatePending = false;\n _this.highlightStyle = new HighlightStyle();\n _this.scheduleLayout = function () {\n _this.fireEvent({ type: 'layoutChange' });\n };\n _this.scheduleData = function () {\n _this.fireEvent({ type: 'dataChange' });\n };\n return _this;\n }\n Object.defineProperty(Series.prototype, \"type\", {\n get: function () {\n return this.constructor.type || '';\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Series.prototype, \"grouped\", {\n set: function (g) {\n if (g === true) {\n throw new Error(\"AG Charts - grouped: true is unsupported for series of type: \" + this.type);\n }\n },\n enumerable: true,\n configurable: true\n });\n Series.prototype.setColors = function (fills, strokes) { };\n // Returns the actual keys used (to fetch the values from `data` items) for the given direction.\n Series.prototype.getKeys = function (direction) {\n var _this = this;\n var directionKeys = this.directionKeys;\n var keys = directionKeys && directionKeys[direction];\n var values = [];\n if (keys) {\n keys.forEach(function (key) {\n var value = _this[key];\n if (value) {\n if (Array.isArray(value)) {\n values.push.apply(values, __spread(value));\n }\n else {\n values.push(value);\n }\n }\n });\n }\n return values;\n };\n // Using processed data, create data that backs visible nodes.\n Series.prototype.createNodeData = function () { return []; };\n // Returns persisted node data associated with the rendered portion of the series' data.\n Series.prototype.getNodeData = function () { return []; };\n Series.prototype.getLabelData = function () { return []; };\n Object.defineProperty(Series.prototype, \"nodeDataPending\", {\n get: function () {\n return this._nodeDataPending;\n },\n set: function (value) {\n if (this._nodeDataPending !== value) {\n this._nodeDataPending = value;\n this.updatePending = true;\n if (value && this.chart) {\n this.chart.updatePending = value;\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Series.prototype.scheduleNodeDate = function () {\n this.nodeDataPending = true;\n };\n Object.defineProperty(Series.prototype, \"updatePending\", {\n get: function () {\n return this._updatePending;\n },\n set: function (value) {\n if (this._updatePending !== value) {\n this._updatePending = value;\n if (value && this.chart) {\n this.chart.updatePending = value;\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Series.prototype.scheduleUpdate = function () {\n this.updatePending = true;\n };\n Series.prototype.getOpacity = function (datum) {\n var _a = this, chart = _a.chart, _b = _a.highlightStyle.series.dimOpacity, dimOpacity = _b === void 0 ? 1 : _b;\n return !chart || !chart.highlightedDatum ||\n chart.highlightedDatum.series === this &&\n (!datum || chart.highlightedDatum.itemId === datum.itemId) ? 1 : dimOpacity;\n };\n Series.prototype.getStrokeWidth = function (defaultStrokeWidth, datum) {\n var _a = this, chart = _a.chart, strokeWidth = _a.highlightStyle.series.strokeWidth;\n return chart && chart.highlightedDatum &&\n chart.highlightedDatum.series === this &&\n (!datum || chart.highlightedDatum.itemId === datum.itemId) &&\n strokeWidth !== undefined ? strokeWidth : defaultStrokeWidth;\n };\n Series.prototype.fireNodeClickEvent = function (event, datum) { };\n Series.prototype.toggleSeriesItem = function (itemId, enabled) {\n this.visible = enabled;\n };\n // Each series is expected to have its own logic to efficiently update its nodes\n // on hightlight changes.\n Series.prototype.onHighlightChange = function () { };\n Series.prototype.fixNumericExtent = function (extent, type, axis) {\n if (!extent) {\n return [0, 1];\n }\n var _a = __read(extent, 2), min = _a[0], max = _a[1];\n min = +min;\n max = +max;\n if (min === 0 && max === 0) {\n // domain has zero length and the single valid value is 0. Use the default of [0, 1].\n return [0, 1];\n }\n if (min === max) {\n // domain has zero length, there is only a single valid value in data\n if (axis instanceof TimeAxis) { // numbers in domain correspond to Unix timestamps\n // automatically expand domain by 1 in each direction\n min -= 1;\n max += 1;\n }\n else {\n var padding = Math.abs(min * 0.01);\n min -= padding;\n max += padding;\n }\n }\n if (!(isNumber(min) && isNumber(max))) {\n return [0, 1];\n }\n return [min, max];\n };\n Series.highlightedZIndex = 1000000000000;\n __decorate([\n reactive('dataChange')\n ], Series.prototype, \"data\", void 0);\n __decorate([\n reactive('dataChange')\n ], Series.prototype, \"visible\", void 0);\n __decorate([\n reactive('layoutChange')\n ], Series.prototype, \"showInLegend\", void 0);\n return Series;\n}(Observable));\nexport { Series };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Observable, reactive } from \"../../util/observable\";\nimport { Circle } from \"../marker/circle\";\nvar SeriesMarker = /** @class */ (function (_super) {\n __extends(SeriesMarker, _super);\n function SeriesMarker() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.enabled = true;\n /**\n * One of the predefined marker names, or a marker constructor function (for user-defined markers).\n * A series will create one marker instance per data point.\n */\n _this.shape = Circle;\n _this.size = 6;\n /**\n * In case a series has the `sizeKey` set, the `sizeKey` values along with the `size` and `maxSize` configs\n * will be used to determine the size of the marker. All values will be mapped to a marker size\n * within the `[size, maxSize]` range, where the largest values will correspond to the `maxSize`\n * and the lowest to the `size`.\n */\n _this.maxSize = 30;\n _this.strokeWidth = 1;\n return _this;\n }\n __decorate([\n reactive('change')\n ], SeriesMarker.prototype, \"enabled\", void 0);\n __decorate([\n reactive('change')\n ], SeriesMarker.prototype, \"shape\", void 0);\n __decorate([\n reactive('change')\n ], SeriesMarker.prototype, \"size\", void 0);\n __decorate([\n reactive('change')\n ], SeriesMarker.prototype, \"maxSize\", void 0);\n __decorate([\n reactive('change')\n ], SeriesMarker.prototype, \"domain\", void 0);\n __decorate([\n reactive('change')\n ], SeriesMarker.prototype, \"fill\", void 0);\n __decorate([\n reactive('change')\n ], SeriesMarker.prototype, \"stroke\", void 0);\n __decorate([\n reactive('change')\n ], SeriesMarker.prototype, \"strokeWidth\", void 0);\n __decorate([\n reactive('change')\n ], SeriesMarker.prototype, \"fillOpacity\", void 0);\n __decorate([\n reactive('change')\n ], SeriesMarker.prototype, \"strokeOpacity\", void 0);\n return SeriesMarker;\n}(Observable));\nexport { SeriesMarker };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Series } from \"../series\";\nimport { ChartAxisDirection } from \"../../chartAxis\";\nimport { SeriesMarker } from \"../seriesMarker\";\nvar PolarSeries = /** @class */ (function (_super) {\n __extends(PolarSeries, _super);\n function PolarSeries() {\n var _a;\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.directionKeys = (_a = {},\n _a[ChartAxisDirection.X] = ['angleKey'],\n _a[ChartAxisDirection.Y] = ['radiusKey'],\n _a);\n /**\n * The center of the polar series (for example, the center of a pie).\n * If the polar chart has multiple series, all of them will have their\n * center set to the same value as a result of the polar chart layout.\n * The center coordinates are not supposed to be set by the user.\n */\n _this.centerX = 0;\n _this.centerY = 0;\n /**\n * The maximum radius the series can use.\n * This value is set automatically as a result of the polar chart layout\n * and is not supposed to be set by the user.\n */\n _this.radius = 0;\n return _this;\n }\n return PolarSeries;\n}(Series));\nexport { PolarSeries };\nvar PolarSeriesMarker = /** @class */ (function (_super) {\n __extends(PolarSeriesMarker, _super);\n function PolarSeriesMarker() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return PolarSeriesMarker;\n}(SeriesMarker));\nexport { PolarSeriesMarker };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Chart } from \"./chart\";\nimport { PolarSeries } from \"./series/polar/polarSeries\";\nimport { Padding } from \"../util/padding\";\nimport { BBox } from \"../scene/bbox\";\nvar PolarChart = /** @class */ (function (_super) {\n __extends(PolarChart, _super);\n function PolarChart(document) {\n if (document === void 0) { document = window.document; }\n var _this = _super.call(this, document) || this;\n _this.padding = new Padding(40);\n _this.scene.root.append(_this.legend.group);\n _this.padding.addEventListener('layoutChange', _this.scheduleLayout, _this);\n return _this;\n }\n Object.defineProperty(PolarChart.prototype, \"seriesRoot\", {\n get: function () {\n return this.scene.root;\n },\n enumerable: true,\n configurable: true\n });\n PolarChart.prototype.performLayout = function () {\n var shrinkRect = new BBox(0, 0, this.width, this.height);\n this.positionCaptions();\n this.positionLegend();\n var captionAutoPadding = this.captionAutoPadding;\n shrinkRect.y += captionAutoPadding;\n shrinkRect.height -= captionAutoPadding;\n if (this.legend.enabled && this.legend.data.length) {\n var legendAutoPadding = this.legendAutoPadding;\n shrinkRect.x += legendAutoPadding.left;\n shrinkRect.y += legendAutoPadding.top;\n shrinkRect.width -= legendAutoPadding.left + legendAutoPadding.right;\n shrinkRect.height -= legendAutoPadding.top + legendAutoPadding.bottom;\n var legendPadding = this.legend.spacing;\n switch (this.legend.position) {\n case 'right':\n shrinkRect.width -= legendPadding;\n break;\n case 'bottom':\n shrinkRect.height -= legendPadding;\n break;\n case 'left':\n shrinkRect.x += legendPadding;\n shrinkRect.width -= legendPadding;\n break;\n case 'top':\n shrinkRect.y += legendPadding;\n shrinkRect.height -= legendPadding;\n break;\n }\n }\n var padding = this.padding;\n shrinkRect.x += padding.left;\n shrinkRect.y += padding.top;\n shrinkRect.width -= padding.left + padding.right;\n shrinkRect.height -= padding.top + padding.bottom;\n this.seriesRect = shrinkRect;\n var centerX = shrinkRect.x + shrinkRect.width / 2;\n var centerY = shrinkRect.y + shrinkRect.height / 2;\n var radius = Math.max(0, Math.min(shrinkRect.width, shrinkRect.height) / 2); // radius shouldn't be negative\n this.series.forEach(function (series) {\n if (series instanceof PolarSeries) {\n series.centerX = centerX;\n series.centerY = centerY;\n series.radius = radius;\n series.update();\n }\n });\n };\n PolarChart.className = 'PolarChart';\n PolarChart.type = 'polar';\n return PolarChart;\n}(Chart));\nexport { PolarChart };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Series } from \"../series\";\nimport { ChartAxisDirection } from \"../../chartAxis\";\nimport { SeriesMarker } from \"../seriesMarker\";\nimport { isContinuous, isDiscrete } from \"../../../util/value\";\nvar CartesianSeries = /** @class */ (function (_super) {\n __extends(CartesianSeries, _super);\n function CartesianSeries() {\n var _a;\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.directionKeys = (_a = {},\n _a[ChartAxisDirection.X] = ['xKey'],\n _a[ChartAxisDirection.Y] = ['yKey'],\n _a);\n return _this;\n }\n /**\n * Note: we are passing `isContinuousX` and `isContinuousY` into this method because it will\n * typically be called inside a loop and this check only needs to happen once.\n * @param x A domain value to be plotted along the x-axis.\n * @param y A domain value to be plotted along the y-axis.\n * @param isContinuousX Typically this will be the value of `xAxis.scale instanceof ContinuousScale`.\n * @param isContinuousY Typically this will be the value of `yAxis.scale instanceof ContinuousScale`.\n * @returns `[x, y]`, if both x and y are valid domain values for their respective axes/scales, or `undefined`.\n */\n CartesianSeries.prototype.checkDomainXY = function (x, y, isContinuousX, isContinuousY) {\n var isValidDatum = (isContinuousX && isContinuous(x) || !isContinuousX && isDiscrete(x)) &&\n (isContinuousY && isContinuous(y) || !isContinuousY && isDiscrete(y));\n return isValidDatum ? [x, y] : undefined;\n };\n /**\n * Note: we are passing `isContinuousScale` into this method because it will\n * typically be called inside a loop and this check only needs to happen once.\n * @param value A domain value to be plotted along an axis.\n * @param isContinuousScale Typically this will be the value of `xAxis.scale instanceof ContinuousScale` or `yAxis.scale instanceof ContinuousScale`.\n * @returns `value`, if the value is valid for its axis/scale, or `undefined`.\n */\n CartesianSeries.prototype.checkDatum = function (value, isContinuousScale) {\n if (isContinuousScale && isContinuous(value)) {\n return value;\n }\n else if (!isContinuousScale) {\n if (!isDiscrete(value)) {\n return String(value);\n }\n return value;\n }\n return undefined;\n };\n /**\n * Note: we are passing the xAxis and yAxis because the calling code is supposed to make sure\n * that series has both of them defined, and also to avoid one level of indirection,\n * e.g. `this.xAxis!.inRange(x)`, both of which are suboptimal in tight loops where this method is used.\n * @param x A range value to be plotted along the x-axis.\n * @param y A range value to be plotted along the y-axis.\n * @param xAxis The series' x-axis.\n * @param yAxis The series' y-axis.\n * @returns\n */\n CartesianSeries.prototype.checkRangeXY = function (x, y, xAxis, yAxis) {\n return !isNaN(x) && !isNaN(y) && xAxis.inRange(x) && yAxis.inRange(y);\n };\n return CartesianSeries;\n}(Series));\nexport { CartesianSeries };\nvar CartesianSeriesMarker = /** @class */ (function (_super) {\n __extends(CartesianSeriesMarker, _super);\n function CartesianSeriesMarker() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.formatter = undefined;\n return _this;\n }\n return CartesianSeriesMarker;\n}(SeriesMarker));\nexport { CartesianSeriesMarker };\n","export function equal(a, b) {\n if (a === b)\n return true;\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor)\n return false;\n var length_1, i = void 0;\n if (Array.isArray(a)) {\n length_1 = a.length;\n if (length_1 != b.length)\n return false;\n for (i = length_1; i-- !== 0;)\n if (!equal(a[i], b[i]))\n return false;\n return true;\n }\n // if ((a instanceof Map) && (b instanceof Map)) {\n // if (a.size !== b.size) return false;\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // for (i of a.entries())\n // if (!equal(i[1], b.get(i[0]))) return false;\n // return true;\n // }\n //\n // if ((a instanceof Set) && (b instanceof Set)) {\n // if (a.size !== b.size) return false;\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // return true;\n // }\n //\n // if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n // length = a.length;\n // if (length != b.length) return false;\n // for (i = length; i-- !== 0;)\n // if (a[i] !== b[i]) return false;\n // return true;\n // }\n if (a.constructor === RegExp)\n return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf)\n return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString)\n return a.toString() === b.toString();\n var keys = Object.keys(a);\n length_1 = keys.length;\n if (length_1 !== Object.keys(b).length)\n return false;\n for (i = length_1; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i]))\n return false;\n for (i = length_1; i-- !== 0;) {\n var key = keys[i];\n if (!equal(a[key], b[key]))\n return false;\n }\n return true;\n }\n // true if both NaN, false otherwise\n return a !== a && b !== b;\n}\n","var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { locale } from \"./time/format/defaultLocale\";\nvar interpolatePattern = /(#\\{(.*?)\\})/g;\nexport function interpolate(input, values, formats) {\n return input.replace(interpolatePattern, function () {\n var name = arguments[2];\n var _a = __read(name.split(':'), 2), valueName = _a[0], formatName = _a[1];\n var value = values[valueName];\n if (typeof value === 'number') {\n var format = formatName && formats && formats[formatName];\n if (format) {\n var _b = format, locales = _b.locales, options = _b.options;\n return value.toLocaleString(locales, options);\n }\n return String(value);\n }\n if (value instanceof Date) {\n var format = formatName && formats && formats[formatName];\n if (typeof format === 'string') {\n var formatter = locale.format(format);\n return formatter(value);\n }\n return value.toDateString();\n }\n if (typeof value === 'string' || (value && value.toString)) {\n return String(value);\n }\n return '';\n });\n}\n","var element = null;\nexport function sanitizeHtml(text) {\n element = element || document.createElement('div');\n if (!text) {\n return '';\n }\n element.innerText = text;\n return element.innerHTML;\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nimport { Group } from \"../../../scene/group\";\nimport { Selection } from \"../../../scene/selection\";\nimport { Rect } from \"../../../scene/shape/rect\";\nimport { Text } from \"../../../scene/shape/text\";\nimport { BandScale } from \"../../../scale/bandScale\";\nimport { SeriesTooltip, Series } from \"../series\";\nimport { Label } from \"../../label\";\nimport { PointerEvents } from \"../../../scene/node\";\nimport { CartesianSeries } from \"./cartesianSeries\";\nimport { ChartAxisDirection, flipChartAxisDirection } from \"../../chartAxis\";\nimport { toTooltipHtml } from \"../../chart\";\nimport { findMinMax } from \"../../../util/array\";\nimport { equal } from \"../../../util/equal\";\nimport { reactive } from \"../../../util/observable\";\nimport { sanitizeHtml } from \"../../../util/sanitize\";\nimport { isNumber } from \"../../../util/value\";\nimport { clamper, ContinuousScale } from \"../../../scale/continuousScale\";\nvar BarSeriesNodeTag;\n(function (BarSeriesNodeTag) {\n BarSeriesNodeTag[BarSeriesNodeTag[\"Bar\"] = 0] = \"Bar\";\n BarSeriesNodeTag[BarSeriesNodeTag[\"Label\"] = 1] = \"Label\";\n})(BarSeriesNodeTag || (BarSeriesNodeTag = {}));\nexport var BarLabelPlacement;\n(function (BarLabelPlacement) {\n BarLabelPlacement[\"Inside\"] = \"inside\";\n BarLabelPlacement[\"Outside\"] = \"outside\";\n})(BarLabelPlacement || (BarLabelPlacement = {}));\nvar BarSeriesLabel = /** @class */ (function (_super) {\n __extends(BarSeriesLabel, _super);\n function BarSeriesLabel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.placement = BarLabelPlacement.Inside;\n return _this;\n }\n __decorate([\n reactive('change')\n ], BarSeriesLabel.prototype, \"formatter\", void 0);\n __decorate([\n reactive('change')\n ], BarSeriesLabel.prototype, \"placement\", void 0);\n return BarSeriesLabel;\n}(Label));\nexport { BarSeriesLabel };\nvar BarSeriesTooltip = /** @class */ (function (_super) {\n __extends(BarSeriesTooltip, _super);\n function BarSeriesTooltip() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n reactive('change')\n ], BarSeriesTooltip.prototype, \"renderer\", void 0);\n return BarSeriesTooltip;\n}(SeriesTooltip));\nexport { BarSeriesTooltip };\nfunction flat(arr, target) {\n if (target === void 0) { target = []; }\n arr.forEach(function (v) {\n if (Array.isArray(v)) {\n flat(v, target);\n }\n else {\n target.push(v);\n }\n });\n return target;\n}\nfunction is2dArray(array) {\n return array.length > 0 && Array.isArray(array[0]);\n}\nvar BarSeries = /** @class */ (function (_super) {\n __extends(BarSeries, _super);\n function BarSeries() {\n var _a;\n var _this = _super.call(this) || this;\n // Need to put bar and label nodes into separate groups, because even though label nodes are\n // created after the bar nodes, this only guarantees that labels will always be on top of bars\n // on the first run. If on the next run more bars are added, they might clip the labels\n // rendered during the previous run.\n _this.rectGroup = _this.pickGroup.appendChild(new Group);\n _this.labelGroup = _this.group.appendChild(new Group);\n _this.rectSelection = Selection.select(_this.rectGroup).selectAll();\n _this.labelSelection = Selection.select(_this.labelGroup).selectAll();\n _this.nodeData = [];\n _this.xData = [];\n _this.yData = [];\n _this.yDomain = [];\n _this.label = new BarSeriesLabel();\n /**\n * The assumption is that the values will be reset (to `true`)\n * in the {@link yKeys} setter.\n */\n _this.seriesItemEnabled = new Map();\n _this.tooltip = new BarSeriesTooltip();\n _this.flipXY = false;\n _this.fills = [\n '#c16068',\n '#a2bf8a',\n '#ebcc87',\n '#80a0c3',\n '#b58dae',\n '#85c0d1'\n ];\n _this.strokes = [\n '#874349',\n '#718661',\n '#a48f5f',\n '#5a7088',\n '#7f637a',\n '#5d8692'\n ];\n _this.fillOpacity = 1;\n _this.strokeOpacity = 1;\n _this.lineDash = [0];\n _this.lineDashOffset = 0;\n /**\n * Used to get the position of bars within each group.\n */\n _this.groupScale = new BandScale();\n _this.directionKeys = (_a = {},\n _a[ChartAxisDirection.X] = ['xKey'],\n _a[ChartAxisDirection.Y] = ['yKeys'],\n _a);\n _this._xKey = '';\n _this._xName = '';\n _this.cumYKeyCount = [];\n _this.flatYKeys = undefined; // only set when a user used a flat array for yKeys\n _this.hideInLegend = [];\n /**\n * yKeys: [['coffee']] - regular bars, each category has a single bar that shows a value for coffee\n * yKeys: [['coffee'], ['tea'], ['milk']] - each category has three bars that show values for coffee, tea and milk\n * yKeys: [['coffee', 'tea', 'milk']] - each category has a single bar with three stacks that show values for coffee, tea and milk\n * yKeys: [['coffee', 'tea', 'milk'], ['paper', 'ink']] - each category has 2 stacked bars,\n * first showing values for coffee, tea and milk and second values for paper and ink\n */\n _this._yKeys = [];\n _this._grouped = false;\n /**\n * A map of `yKeys` to their names (used in legends and tooltips).\n * For example, if a key is `product_name` it's name can be a more presentable `Product Name`.\n */\n _this._yNames = {};\n _this._strokeWidth = 1;\n _this.addEventListener('update', _this.scheduleUpdate);\n _this.label.enabled = false;\n _this.label.addEventListener('change', _this.scheduleUpdate, _this);\n return _this;\n }\n BarSeries.prototype.getKeys = function (direction) {\n var _this = this;\n var directionKeys = this.directionKeys;\n var keys = directionKeys && directionKeys[this.flipXY ? flipChartAxisDirection(direction) : direction];\n var values = [];\n if (keys) {\n keys.forEach(function (key) {\n var value = _this[key];\n if (value) {\n if (Array.isArray(value)) {\n values = values.concat(flat(value));\n }\n else {\n values.push(value);\n }\n }\n });\n }\n return values;\n };\n Object.defineProperty(BarSeries.prototype, \"xKey\", {\n get: function () {\n return this._xKey;\n },\n set: function (value) {\n if (this._xKey !== value) {\n this._xKey = value;\n this.xData = [];\n this.scheduleData();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BarSeries.prototype, \"xName\", {\n get: function () {\n return this._xName;\n },\n set: function (value) {\n if (this._xName !== value) {\n this._xName = value;\n this.scheduleUpdate();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BarSeries.prototype, \"yKeys\", {\n get: function () {\n return this._yKeys;\n },\n set: function (yKeys) {\n var _this = this;\n var flatYKeys = undefined;\n // Convert from flat y-keys to grouped y-keys.\n if (!is2dArray(yKeys)) {\n flatYKeys = yKeys;\n yKeys = this.grouped ? flatYKeys.map(function (k) { return [k]; }) : [flatYKeys];\n }\n if (!equal(this._yKeys, yKeys)) {\n this.flatYKeys = flatYKeys ? flatYKeys : undefined;\n this._yKeys = yKeys;\n var prevYKeyCount_1 = 0;\n this.cumYKeyCount = [];\n var visibleStacks_1 = [];\n yKeys.forEach(function (stack, index) {\n if (stack.length > 0) {\n visibleStacks_1.push(String(index));\n }\n _this.cumYKeyCount.push(prevYKeyCount_1);\n prevYKeyCount_1 += stack.length;\n });\n this.yData = [];\n var seriesItemEnabled_1 = this.seriesItemEnabled;\n seriesItemEnabled_1.clear();\n yKeys.forEach(function (stack) {\n stack.forEach(function (yKey) { return seriesItemEnabled_1.set(yKey, true); });\n });\n var groupScale = this.groupScale;\n groupScale.domain = visibleStacks_1;\n groupScale.padding = 0.1;\n groupScale.round = true;\n this.scheduleData();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BarSeries.prototype, \"grouped\", {\n get: function () {\n return this._grouped;\n },\n set: function (value) {\n if (this._grouped !== value) {\n this._grouped = value;\n if (this.flatYKeys) {\n this.yKeys = this.flatYKeys;\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BarSeries.prototype, \"yNames\", {\n get: function () {\n return this._yNames;\n },\n set: function (values) {\n if (Array.isArray(values) && this.flatYKeys) {\n var map_1 = {};\n this.flatYKeys.forEach(function (k, i) {\n map_1[k] = values[i];\n });\n values = map_1;\n }\n this._yNames = values;\n this.scheduleData();\n },\n enumerable: true,\n configurable: true\n });\n BarSeries.prototype.setColors = function (fills, strokes) {\n this.fills = fills;\n this.strokes = strokes;\n };\n Object.defineProperty(BarSeries.prototype, \"normalizedTo\", {\n get: function () {\n return this._normalizedTo;\n },\n set: function (value) {\n var absValue = value ? Math.abs(value) : undefined;\n if (this._normalizedTo !== absValue) {\n this._normalizedTo = absValue;\n this.scheduleData();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BarSeries.prototype, \"strokeWidth\", {\n get: function () {\n return this._strokeWidth;\n },\n set: function (value) {\n if (this._strokeWidth !== value) {\n this._strokeWidth = value;\n this.scheduleUpdate();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BarSeries.prototype, \"shadow\", {\n get: function () {\n return this._shadow;\n },\n set: function (value) {\n if (this._shadow !== value) {\n this._shadow = value;\n this.scheduleUpdate();\n }\n },\n enumerable: true,\n configurable: true\n });\n BarSeries.prototype.onHighlightChange = function () {\n this.updateRectNodes();\n };\n BarSeries.prototype.processData = function () {\n var _this = this;\n var _a = this, xKey = _a.xKey, yKeys = _a.yKeys, seriesItemEnabled = _a.seriesItemEnabled, xAxis = _a.xAxis;\n var data = xKey && yKeys.length && this.data ? this.data : [];\n if (!xAxis) {\n return false;\n }\n var keysFound = true; // only warn once\n this.xData = data.map(function (datum) {\n if (keysFound && !(xKey in datum)) {\n keysFound = false;\n console.warn(\"The key '\" + xKey + \"' was not found in the data: \", datum);\n }\n return _this.checkDatum(datum[xKey], false);\n });\n this.yData = data.map(function (datum) { return yKeys.map(function (stack) {\n return stack.map(function (yKey) {\n if (keysFound && !(yKey in datum)) {\n keysFound = false;\n console.warn(\"The key '\" + yKey + \"' was not found in the data: \", datum);\n }\n var yDatum = _this.checkDatum(datum[yKey], true);\n if (!seriesItemEnabled.get(yKey) || yDatum === undefined) {\n return 0;\n }\n return yDatum;\n });\n }); });\n // Contains min/max values for each stack in each group,\n // where min is zero and max is a positive total of all values in the stack\n // or min is a negative total of all values in the stack and max is zero.\n var yMinMax = this.yData.map(function (group) { return group.map(function (stack) { return findMinMax(stack); }); });\n var _b = this, yData = _b.yData, normalizedTo = _b.normalizedTo;\n // Calculate the sum of the absolute values of all items in each stack in each group. Used for normalization of stacked bars.\n var yAbsTotal = this.yData.map(function (group) { return group.map(function (stack) { return stack.reduce(function (acc, stack) {\n acc += Math.abs(stack);\n return acc;\n }, 0); }); });\n var yLargestMinMax = this.findLargestMinMax(yMinMax);\n var yMin;\n var yMax;\n if (normalizedTo && isFinite(normalizedTo)) {\n yMin = yLargestMinMax.min < 0 ? -normalizedTo : 0;\n yMax = yLargestMinMax.max > 0 ? normalizedTo : 0;\n yData.forEach(function (group, i) {\n group.forEach(function (stack, j) {\n stack.forEach(function (y, k) {\n stack[k] = y / yAbsTotal[i][j] * normalizedTo;\n });\n });\n });\n }\n else {\n yMin = yLargestMinMax.min;\n yMax = yLargestMinMax.max;\n }\n this.yDomain = this.fixNumericExtent([yMin, yMax], 'y', this.yAxis);\n this.fireEvent({ type: 'dataProcessed' });\n return true;\n };\n BarSeries.prototype.findLargestMinMax = function (groups) {\n var e_1, _a, e_2, _b;\n var tallestStackMin = 0;\n var tallestStackMax = 0;\n try {\n for (var groups_1 = __values(groups), groups_1_1 = groups_1.next(); !groups_1_1.done; groups_1_1 = groups_1.next()) {\n var group = groups_1_1.value;\n try {\n for (var group_1 = (e_2 = void 0, __values(group)), group_1_1 = group_1.next(); !group_1_1.done; group_1_1 = group_1.next()) {\n var stack = group_1_1.value;\n if (stack.min < tallestStackMin) {\n tallestStackMin = stack.min;\n }\n if (stack.max > tallestStackMax) {\n tallestStackMax = stack.max;\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (group_1_1 && !group_1_1.done && (_b = group_1.return)) _b.call(group_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (groups_1_1 && !groups_1_1.done && (_a = groups_1.return)) _a.call(groups_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return { min: tallestStackMin, max: tallestStackMax };\n };\n BarSeries.prototype.getDomain = function (direction) {\n if (this.flipXY) {\n direction = flipChartAxisDirection(direction);\n }\n if (direction === ChartAxisDirection.X) {\n return this.xData;\n }\n else {\n return this.yDomain;\n }\n };\n BarSeries.prototype.fireNodeClickEvent = function (event, datum) {\n this.fireEvent({\n type: 'nodeClick',\n event: event,\n series: this,\n datum: datum.datum,\n xKey: this.xKey,\n yKey: datum.yKey\n });\n };\n BarSeries.prototype.getCategoryAxis = function () {\n return this.flipXY ? this.yAxis : this.xAxis;\n };\n BarSeries.prototype.getValueAxis = function () {\n return this.flipXY ? this.xAxis : this.yAxis;\n };\n BarSeries.prototype.createNodeData = function () {\n var _this = this;\n var _a = this, chart = _a.chart, data = _a.data, visible = _a.visible;\n var xAxis = this.getCategoryAxis();\n var yAxis = this.getValueAxis();\n if (!(chart && data && visible && xAxis && yAxis) || chart.layoutPending || chart.dataPending) {\n return [];\n }\n var flipXY = this.flipXY;\n var xScale = xAxis.scale;\n var yScale = yAxis.scale;\n var _b = this, groupScale = _b.groupScale, yKeys = _b.yKeys, cumYKeyCount = _b.cumYKeyCount, fills = _b.fills, strokes = _b.strokes, strokeWidth = _b.strokeWidth, seriesItemEnabled = _b.seriesItemEnabled, xData = _b.xData, yData = _b.yData, label = _b.label;\n var labelFontStyle = label.fontStyle, labelFontWeight = label.fontWeight, labelFontSize = label.fontSize, labelFontFamily = label.fontFamily, labelColor = label.color, labelFormatter = label.formatter, labelPlacement = label.placement;\n groupScale.range = [0, xScale.bandwidth];\n var grouped = true;\n var barWidth = grouped ? groupScale.bandwidth : xScale.bandwidth;\n var nodeData = [];\n xData.forEach(function (group, groupIndex) {\n var seriesDatum = data[groupIndex];\n var x = xScale.convert(group);\n var groupYs = yData[groupIndex]; // y-data for groups of stacks\n for (var stackIndex = 0; stackIndex < groupYs.length; stackIndex++) {\n var stackYs = groupYs[stackIndex]; // y-data for a stack within a group\n var prevMinY = 0;\n var prevMaxY = 0;\n for (var levelIndex = 0; levelIndex < stackYs.length; levelIndex++) {\n var currY = +stackYs[levelIndex];\n var yKey = yKeys[stackIndex][levelIndex];\n var barX = grouped ? x + groupScale.convert(String(stackIndex)) : x;\n // Bars outside of visible range are not rendered, so we create node data\n // only for the visible subset of user data.\n if (!xAxis.inRange(barX, barWidth)) {\n continue;\n }\n var prevY = currY < 0 ? prevMinY : prevMaxY;\n var continuousY = yScale instanceof ContinuousScale;\n var y = yScale.convert(prevY + currY, continuousY ? clamper : undefined);\n var bottomY = yScale.convert(prevY, continuousY ? clamper : undefined);\n var yValue = seriesDatum[yKey]; // unprocessed y-value\n var labelText = void 0;\n if (labelFormatter) {\n labelText = labelFormatter({ value: isNumber(yValue) ? yValue : undefined });\n }\n else {\n labelText = isNumber(yValue) ? yValue.toFixed(2) : '';\n }\n var labelX = void 0;\n var labelY = void 0;\n if (flipXY) {\n labelY = barX + barWidth / 2;\n if (labelPlacement === BarLabelPlacement.Inside) {\n labelX = y + (yValue >= 0 ? -1 : 1) * Math.abs(bottomY - y) / 2;\n }\n else {\n labelX = y + (yValue >= 0 ? 1 : -1) * 4;\n }\n }\n else {\n labelX = barX + barWidth / 2;\n if (labelPlacement === BarLabelPlacement.Inside) {\n labelY = y + (yValue >= 0 ? 1 : -1) * Math.abs(bottomY - y) / 2;\n }\n else {\n labelY = y + (yValue >= 0 ? -3 : 4);\n }\n }\n var labelTextAlign = void 0;\n var labelTextBaseline = void 0;\n if (labelPlacement === BarLabelPlacement.Inside) {\n labelTextAlign = 'center';\n labelTextBaseline = 'middle';\n }\n else {\n labelTextAlign = flipXY ? (yValue >= 0 ? 'start' : 'end') : 'center';\n labelTextBaseline = flipXY ? 'middle' : (yValue >= 0 ? 'bottom' : 'top');\n }\n var colorIndex = cumYKeyCount[stackIndex] + levelIndex;\n nodeData.push({\n index: groupIndex,\n series: _this,\n itemId: yKey,\n datum: seriesDatum,\n yValue: yValue,\n yKey: yKey,\n x: flipXY ? Math.min(y, bottomY) : barX,\n y: flipXY ? barX : Math.min(y, bottomY),\n width: flipXY ? Math.abs(bottomY - y) : barWidth,\n height: flipXY ? barWidth : Math.abs(bottomY - y),\n fill: fills[colorIndex % fills.length],\n stroke: strokes[colorIndex % strokes.length],\n strokeWidth: strokeWidth,\n label: seriesItemEnabled.get(yKey) && labelText ? {\n text: labelText,\n fontStyle: labelFontStyle,\n fontWeight: labelFontWeight,\n fontSize: labelFontSize,\n fontFamily: labelFontFamily,\n textAlign: labelTextAlign,\n textBaseline: labelTextBaseline,\n fill: labelColor,\n x: labelX,\n y: labelY\n } : undefined\n });\n if (currY < 0) {\n prevMinY += currY;\n }\n else {\n prevMaxY += currY;\n }\n }\n }\n });\n return this.nodeData = nodeData;\n };\n BarSeries.prototype.update = function () {\n this.updatePending = false;\n this.updateSelections();\n this.updateNodes();\n };\n BarSeries.prototype.updateSelections = function () {\n if (!this.nodeDataPending) {\n return;\n }\n this.nodeDataPending = false;\n this.createNodeData();\n this.updateRectSelection();\n this.updateLabelSelection();\n };\n BarSeries.prototype.updateNodes = function () {\n this.group.visible = this.visible;\n this.updateRectNodes();\n this.updateLabelNodes();\n };\n BarSeries.prototype.updateRectSelection = function () {\n var updateRects = this.rectSelection.setData(this.nodeData);\n updateRects.exit.remove();\n var enterRects = updateRects.enter.append(Rect).each(function (rect) {\n rect.tag = BarSeriesNodeTag.Bar;\n rect.crisp = true;\n });\n this.rectSelection = updateRects.merge(enterRects);\n };\n BarSeries.prototype.updateRectNodes = function () {\n var _this = this;\n if (!this.chart) {\n return;\n }\n var _a = this, fills = _a.fills, strokes = _a.strokes, fillOpacity = _a.fillOpacity, strokeOpacity = _a.strokeOpacity, shadow = _a.shadow, formatter = _a.formatter, xKey = _a.xKey, flipXY = _a.flipXY, yKeys = _a.yKeys, highlightedDatum = _a.chart.highlightedDatum, _b = _a.highlightStyle, deprecatedFill = _b.fill, deprecatedStroke = _b.stroke, deprecatedStrokeWidth = _b.strokeWidth, _c = _b.item, _d = _c.fill, highlightedFill = _d === void 0 ? deprecatedFill : _d, _e = _c.stroke, highlightedStroke = _e === void 0 ? deprecatedStroke : _e, _f = _c.strokeWidth, highlightedDatumStrokeWidth = _f === void 0 ? deprecatedStrokeWidth : _f;\n this.rectSelection.each(function (rect, datum, index) {\n var colorIndex = 0;\n var i = 0;\n for (var j = 0; j < yKeys.length; j++) {\n var stack = yKeys[j];\n i = stack.indexOf(datum.yKey);\n if (i >= 0) {\n colorIndex += i;\n break;\n }\n colorIndex += stack.length;\n }\n var isDatumHighlighted = datum === highlightedDatum;\n var fill = isDatumHighlighted && highlightedFill !== undefined ? highlightedFill : fills[colorIndex % fills.length];\n var stroke = isDatumHighlighted && highlightedStroke !== undefined ? highlightedStroke : strokes[colorIndex % fills.length];\n var strokeWidth = isDatumHighlighted && highlightedDatumStrokeWidth !== undefined\n ? highlightedDatumStrokeWidth\n : _this.getStrokeWidth(_this.strokeWidth, datum);\n var format = undefined;\n if (formatter) {\n format = formatter({\n datum: datum.datum,\n fill: fill,\n stroke: stroke,\n strokeWidth: strokeWidth,\n highlighted: isDatumHighlighted,\n xKey: xKey,\n yKey: datum.yKey\n });\n }\n rect.x = datum.x;\n rect.y = datum.y;\n rect.width = datum.width;\n rect.height = datum.height;\n rect.fill = format && format.fill || fill;\n rect.stroke = format && format.stroke || stroke;\n rect.strokeWidth = format && format.strokeWidth !== undefined ? format.strokeWidth : strokeWidth;\n rect.fillOpacity = fillOpacity;\n rect.strokeOpacity = strokeOpacity;\n rect.lineDash = _this.lineDash;\n rect.lineDashOffset = _this.lineDashOffset;\n rect.fillShadow = shadow;\n // Prevent stroke from rendering for zero height columns and zero width bars.\n rect.visible = flipXY ? datum.width > 0 : datum.height > 0;\n rect.zIndex = isDatumHighlighted ? Series.highlightedZIndex : index;\n rect.opacity = _this.getOpacity(datum);\n });\n };\n BarSeries.prototype.updateLabelSelection = function () {\n var updateLabels = this.labelSelection.setData(this.nodeData);\n updateLabels.exit.remove();\n var enterLabels = updateLabels.enter.append(Text).each(function (text) {\n text.tag = BarSeriesNodeTag.Label;\n text.pointerEvents = PointerEvents.None;\n });\n this.labelSelection = updateLabels.merge(enterLabels);\n };\n BarSeries.prototype.updateLabelNodes = function () {\n var _this = this;\n if (!this.chart) {\n return;\n }\n var _a = this, highlightedDatum = _a.chart.highlightedDatum, _b = _a.label, labelEnabled = _b.enabled, fontStyle = _b.fontStyle, fontWeight = _b.fontWeight, fontSize = _b.fontSize, fontFamily = _b.fontFamily, color = _b.color;\n this.labelSelection.each(function (text, datum, index) {\n var label = datum.label;\n if (label && labelEnabled) {\n text.fontStyle = fontStyle;\n text.fontWeight = fontWeight;\n text.fontSize = fontSize;\n text.fontFamily = fontFamily;\n text.textAlign = label.textAlign;\n text.textBaseline = label.textBaseline;\n text.text = label.text;\n text.x = label.x;\n text.y = label.y;\n text.fill = color;\n text.visible = true;\n text.opacity = _this.getOpacity(datum);\n }\n else {\n text.visible = false;\n }\n });\n };\n BarSeries.prototype.getTooltipHtml = function (nodeDatum) {\n var _a = this, xKey = _a.xKey, yKeys = _a.yKeys, yData = _a.yData;\n var xAxis = this.getCategoryAxis();\n var yAxis = this.getValueAxis();\n var yKey = nodeDatum.yKey;\n if (!yData.length || !xKey || !yKey || !xAxis || !yAxis) {\n return '';\n }\n var yGroup = yData[nodeDatum.index];\n var fillIndex = 0;\n var i = 0;\n var j = 0;\n for (; j < yKeys.length; j++) {\n var stack = yKeys[j];\n i = stack.indexOf(yKey);\n if (i >= 0) {\n fillIndex += i;\n break;\n }\n fillIndex += stack.length;\n }\n var _b = this, xName = _b.xName, yNames = _b.yNames, fills = _b.fills, strokes = _b.strokes, tooltip = _b.tooltip, formatter = _b.formatter;\n var tooltipRenderer = tooltip.renderer;\n var datum = nodeDatum.datum;\n var yName = yNames[yKey];\n var fill = fills[fillIndex % fills.length];\n var stroke = strokes[fillIndex % fills.length];\n var strokeWidth = this.getStrokeWidth(this.strokeWidth, datum);\n var xValue = datum[xKey];\n var yValue = datum[yKey];\n var processedYValue = yGroup[j][i];\n var xString = sanitizeHtml(xAxis.formatDatum(xValue));\n var yString = sanitizeHtml(yAxis.formatDatum(yValue));\n var title = sanitizeHtml(yName);\n var content = xString + ': ' + yString;\n var format = undefined;\n if (formatter) {\n format = formatter({\n datum: datum,\n fill: fill,\n stroke: stroke,\n strokeWidth: strokeWidth,\n highlighted: false,\n xKey: xKey,\n yKey: yKey\n });\n }\n var color = format && format.fill || fill;\n var defaults = {\n title: title,\n backgroundColor: color,\n content: content\n };\n if (tooltipRenderer) {\n return toTooltipHtml(tooltipRenderer({\n datum: datum,\n xKey: xKey,\n xValue: xValue,\n xName: xName,\n yKey: yKey,\n yValue: yValue,\n processedYValue: processedYValue,\n yName: yName,\n color: color\n }), defaults);\n }\n return toTooltipHtml(defaults);\n };\n BarSeries.prototype.listSeriesItems = function (legendData) {\n var _a = this, id = _a.id, data = _a.data, xKey = _a.xKey, yKeys = _a.yKeys, yNames = _a.yNames, cumYKeyCount = _a.cumYKeyCount, seriesItemEnabled = _a.seriesItemEnabled, hideInLegend = _a.hideInLegend, fills = _a.fills, strokes = _a.strokes, fillOpacity = _a.fillOpacity, strokeOpacity = _a.strokeOpacity;\n if (data && data.length && xKey && yKeys.length) {\n this.yKeys.forEach(function (stack, stackIndex) {\n stack.forEach(function (yKey, levelIndex) {\n if (hideInLegend.indexOf(yKey) < 0) {\n var colorIndex = cumYKeyCount[stackIndex] + levelIndex;\n legendData.push({\n id: id,\n itemId: yKey,\n enabled: seriesItemEnabled.get(yKey) || false,\n label: {\n text: yNames[yKey] || yKey\n },\n marker: {\n fill: fills[colorIndex % fills.length],\n stroke: strokes[colorIndex % strokes.length],\n fillOpacity: fillOpacity,\n strokeOpacity: strokeOpacity\n }\n });\n }\n });\n });\n }\n };\n BarSeries.prototype.toggleSeriesItem = function (itemId, enabled) {\n var seriesItemEnabled = this.seriesItemEnabled;\n seriesItemEnabled.set(itemId, enabled);\n var yKeys = this.yKeys.map(function (stack) { return stack.slice(); }); // deep clone\n seriesItemEnabled.forEach(function (enabled, yKey) {\n if (!enabled) {\n yKeys.forEach(function (stack) {\n var index = stack.indexOf(yKey);\n if (index >= 0) {\n stack.splice(index, 1);\n }\n });\n }\n });\n var visibleStacks = [];\n yKeys.forEach(function (stack, index) {\n if (stack.length > 0) {\n visibleStacks.push(String(index));\n }\n });\n this.groupScale.domain = visibleStacks;\n this.scheduleData();\n };\n BarSeries.className = 'BarSeries';\n BarSeries.type = 'bar';\n __decorate([\n reactive('dataChange')\n ], BarSeries.prototype, \"flipXY\", void 0);\n __decorate([\n reactive('dataChange')\n ], BarSeries.prototype, \"fills\", void 0);\n __decorate([\n reactive('dataChange')\n ], BarSeries.prototype, \"strokes\", void 0);\n __decorate([\n reactive('update')\n ], BarSeries.prototype, \"fillOpacity\", void 0);\n __decorate([\n reactive('update')\n ], BarSeries.prototype, \"strokeOpacity\", void 0);\n __decorate([\n reactive('update')\n ], BarSeries.prototype, \"lineDash\", void 0);\n __decorate([\n reactive('update')\n ], BarSeries.prototype, \"lineDashOffset\", void 0);\n __decorate([\n reactive('update')\n ], BarSeries.prototype, \"formatter\", void 0);\n __decorate([\n reactive('layoutChange')\n ], BarSeries.prototype, \"hideInLegend\", void 0);\n return BarSeries;\n}(CartesianSeries));\nexport { BarSeries };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n};\nimport { Group } from \"../../../scene/group\";\nimport { Selection } from \"../../../scene/selection\";\nimport { SeriesTooltip } from \"../series\";\nimport { PointerEvents } from \"../../../scene/node\";\nimport { Path } from \"../../../scene/shape/path\";\nimport { CartesianSeries, CartesianSeriesMarker } from \"./cartesianSeries\";\nimport { ChartAxisDirection } from \"../../chartAxis\";\nimport { getMarker } from \"../../marker/util\";\nimport { toTooltipHtml } from \"../../chart\";\nimport { extent } from \"../../../util/array\";\nimport { equal } from \"../../../util/equal\";\nimport { reactive } from \"../../../util/observable\";\nimport { interpolate } from \"../../../util/string\";\nimport { Text } from \"../../../scene/shape/text\";\nimport { Label } from \"../../label\";\nimport { sanitizeHtml } from \"../../../util/sanitize\";\nimport { isContinuous, isNumber } from \"../../../util/value\";\nimport { clamper, ContinuousScale } from \"../../../scale/continuousScale\";\nimport { doOnce } from \"../../../util/function\";\nvar AreaSeriesLabel = /** @class */ (function (_super) {\n __extends(AreaSeriesLabel, _super);\n function AreaSeriesLabel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n reactive('change')\n ], AreaSeriesLabel.prototype, \"formatter\", void 0);\n return AreaSeriesLabel;\n}(Label));\nvar AreaSeriesTooltip = /** @class */ (function (_super) {\n __extends(AreaSeriesTooltip, _super);\n function AreaSeriesTooltip() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n reactive('change')\n ], AreaSeriesTooltip.prototype, \"renderer\", void 0);\n __decorate([\n reactive('change')\n ], AreaSeriesTooltip.prototype, \"format\", void 0);\n return AreaSeriesTooltip;\n}(SeriesTooltip));\nexport { AreaSeriesTooltip };\nvar AreaSeries = /** @class */ (function (_super) {\n __extends(AreaSeries, _super);\n function AreaSeries() {\n var _this = _super.call(this) || this;\n _this.tooltip = new AreaSeriesTooltip();\n _this.areaGroup = _this.group.insertBefore(new Group, _this.pickGroup);\n _this.strokeGroup = _this.group.insertBefore(new Group, _this.pickGroup);\n _this.markerGroup = _this.pickGroup.appendChild(new Group);\n _this.labelGroup = _this.group.appendChild(new Group);\n _this.fillSelection = Selection.select(_this.areaGroup).selectAll();\n _this.strokeSelection = Selection.select(_this.strokeGroup).selectAll();\n _this.markerSelection = Selection.select(_this.markerGroup).selectAll();\n _this.labelSelection = Selection.select(_this.labelGroup).selectAll();\n /**\n * The assumption is that the values will be reset (to `true`)\n * in the {@link yKeys} setter.\n */\n _this.seriesItemEnabled = new Map();\n _this.xData = [];\n _this.yData = [];\n _this.fillSelectionData = [];\n _this.strokeSelectionData = [];\n _this.markerSelectionData = [];\n _this.labelSelectionData = [];\n _this.yDomain = [];\n _this.xDomain = [];\n _this.directionKeys = {\n x: ['xKey'],\n y: ['yKeys']\n };\n _this.marker = new CartesianSeriesMarker();\n _this.label = new AreaSeriesLabel();\n _this.fills = [\n '#c16068',\n '#a2bf8a',\n '#ebcc87',\n '#80a0c3',\n '#b58dae',\n '#85c0d1'\n ];\n _this.strokes = [\n '#874349',\n '#718661',\n '#a48f5f',\n '#5a7088',\n '#7f637a',\n '#5d8692'\n ];\n _this.fillOpacity = 1;\n _this.strokeOpacity = 1;\n _this.lineDash = [0];\n _this.lineDashOffset = 0;\n _this._xKey = '';\n _this.xName = '';\n _this._yKeys = [];\n _this.yNames = [];\n _this.strokeWidth = 2;\n _this.addEventListener('update', _this.scheduleUpdate);\n var _a = _this, marker = _a.marker, label = _a.label;\n marker.enabled = false;\n marker.addPropertyListener('shape', _this.onMarkerShapeChange, _this);\n marker.addEventListener('change', _this.scheduleUpdate, _this);\n label.enabled = false;\n label.addEventListener('change', _this.scheduleUpdate, _this);\n return _this;\n }\n AreaSeries.prototype.onMarkerShapeChange = function () {\n this.markerSelection = this.markerSelection.setData([]);\n this.markerSelection.exit.remove();\n this.fireEvent({ type: 'legendChange' });\n };\n Object.defineProperty(AreaSeries.prototype, \"xKey\", {\n get: function () {\n return this._xKey;\n },\n set: function (value) {\n if (this._xKey !== value) {\n this._xKey = value;\n this.xData = [];\n this.scheduleData();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AreaSeries.prototype, \"yKeys\", {\n get: function () {\n return this._yKeys;\n },\n set: function (values) {\n if (!equal(this._yKeys, values)) {\n this._yKeys = values;\n this.yData = [];\n var seriesItemEnabled_1 = this.seriesItemEnabled;\n seriesItemEnabled_1.clear();\n values.forEach(function (key) { return seriesItemEnabled_1.set(key, true); });\n this.scheduleData();\n }\n },\n enumerable: true,\n configurable: true\n });\n AreaSeries.prototype.setColors = function (fills, strokes) {\n this.fills = fills;\n this.strokes = strokes;\n };\n Object.defineProperty(AreaSeries.prototype, \"normalizedTo\", {\n get: function () {\n return this._normalizedTo;\n },\n set: function (value) {\n var absValue = value ? Math.abs(value) : undefined;\n if (this._normalizedTo !== absValue) {\n this._normalizedTo = absValue;\n this.scheduleData();\n }\n },\n enumerable: true,\n configurable: true\n });\n AreaSeries.prototype.processData = function () {\n var e_1, _a, e_2, _b, e_3, _c;\n var _this = this;\n var _d = this, xKey = _d.xKey, yKeys = _d.yKeys, seriesItemEnabled = _d.seriesItemEnabled, xAxis = _d.xAxis, yAxis = _d.yAxis, normalizedTo = _d.normalizedTo;\n var data = xKey && yKeys.length && this.data ? this.data : [];\n if (!xAxis || !yAxis) {\n return false;\n }\n // If the data is an array of rows like so:\n //\n // [{\n // xKey: 'Jan',\n // yKey1: 5,\n // yKey2: 7,\n // yKey3: -9,\n // }, {\n // xKey: 'Feb',\n // yKey1: 10,\n // yKey2: -15,\n // yKey3: 20\n // }]\n //\n var isContinuousX = xAxis.scale instanceof ContinuousScale;\n var isContinuousY = yAxis.scale instanceof ContinuousScale;\n var normalized = normalizedTo && isFinite(normalizedTo);\n var yData = [];\n var xData = [];\n var xValues = [];\n var _loop_1 = function (datum) {\n // X datum\n if (!(xKey in datum)) {\n doOnce(function () { return console.warn(\"The key '\" + xKey + \"' was not found in the data: \", datum); }, xKey + \" not found in data\");\n return \"continue\";\n }\n var xDatum = this_1.checkDatum(datum[xKey], isContinuousX);\n if (isContinuousX && xDatum === undefined) {\n return \"continue\";\n }\n else {\n xValues.push(xDatum);\n xData.push({ xDatum: xDatum, seriesDatum: datum });\n }\n // Y datum\n yKeys.forEach(function (yKey, i) {\n if (!(yKey in datum)) {\n doOnce(function () { return console.warn(\"The key '\" + yKey + \"' was not found in the data: \", datum); }, yKey + \" not found in data\");\n return;\n }\n var value = datum[yKey];\n var seriesYs = yData[i] || (yData[i] = []);\n if (!seriesItemEnabled.get(yKey)) {\n seriesYs.push(0);\n }\n else {\n var yDatum = _this.checkDatum(value, isContinuousY);\n seriesYs.push(yDatum);\n }\n });\n };\n var this_1 = this;\n try {\n for (var data_1 = __values(data), data_1_1 = data_1.next(); !data_1_1.done; data_1_1 = data_1.next()) {\n var datum = data_1_1.value;\n _loop_1(datum);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (data_1_1 && !data_1_1.done && (_a = data_1.return)) _a.call(data_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n this.yData = yData;\n this.xData = xData;\n this.xDomain = isContinuousX ? this.fixNumericExtent(extent(xValues, isContinuous), 'x', xAxis) : xValues;\n // xData: ['Jan', 'Feb', undefined]\n //\n // yData: [\n // [5, 10], <- series 1 (yKey1)\n // [7, -15], <- series 2 (yKey2)\n // [-9, 20] <- series 3 (yKey3)\n // ]\n var yMin = 0;\n var yMax = 0;\n for (var i = 0; i < xData.length; i++) {\n var total = { sum: 0, absSum: 0 };\n try {\n for (var yData_1 = (e_2 = void 0, __values(yData)), yData_1_1 = yData_1.next(); !yData_1_1.done; yData_1_1 = yData_1.next()) {\n var seriesYs = yData_1_1.value;\n if (seriesYs[i] === undefined) {\n continue;\n }\n var y = +seriesYs[i]; // convert to number as the value could be a Date object\n total.absSum += Math.abs(y);\n total.sum += y;\n if (total.sum > yMax) {\n yMax = total.sum;\n }\n else if (total.sum < yMin) {\n yMin = total.sum;\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (yData_1_1 && !yData_1_1.done && (_b = yData_1.return)) _b.call(yData_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n if (!(normalized && normalizedTo)) {\n continue;\n }\n var normalizedTotal = 0;\n try {\n // normalize y values using the absolute sum of y values in the stack\n for (var yData_2 = (e_3 = void 0, __values(yData)), yData_2_1 = yData_2.next(); !yData_2_1.done; yData_2_1 = yData_2.next()) {\n var seriesYs = yData_2_1.value;\n var normalizedY = +seriesYs[i] / total.absSum * normalizedTo;\n seriesYs[i] = normalizedY;\n // sum normalized values to get updated yMin and yMax of normalized area\n normalizedTotal += normalizedY;\n if (normalizedTotal > yMax) {\n yMax = normalizedTotal;\n }\n else if (normalizedTotal < yMin) {\n yMin = normalizedTotal;\n }\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (yData_2_1 && !yData_2_1.done && (_c = yData_2.return)) _c.call(yData_2);\n }\n finally { if (e_3) throw e_3.error; }\n }\n }\n if (normalized && normalizedTo) {\n // multiplier to control the unused whitespace in the y domain, value selected by subjective visual 'niceness'.\n var domainWhitespaceAdjustment = 0.5;\n // set the yMin and yMax based on cumulative sum of normalized values\n yMin = yMin < (-normalizedTo * domainWhitespaceAdjustment) ? -normalizedTo : yMin;\n yMax = yMax > (normalizedTo * domainWhitespaceAdjustment) ? normalizedTo : yMax;\n }\n this.yDomain = this.fixNumericExtent([yMin, yMax], 'y', yAxis);\n this.fireEvent({ type: 'dataProcessed' });\n return true;\n };\n AreaSeries.prototype.findLargestMinMax = function (totals) {\n var e_4, _a;\n var min = 0;\n var max = 0;\n try {\n for (var totals_1 = __values(totals), totals_1_1 = totals_1.next(); !totals_1_1.done; totals_1_1 = totals_1.next()) {\n var total = totals_1_1.value;\n if (total.min < min) {\n min = total.min;\n }\n if (total.max > max) {\n max = total.max;\n }\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (totals_1_1 && !totals_1_1.done && (_a = totals_1.return)) _a.call(totals_1);\n }\n finally { if (e_4) throw e_4.error; }\n }\n return { min: min, max: max };\n };\n AreaSeries.prototype.getDomain = function (direction) {\n if (direction === ChartAxisDirection.X) {\n return this.xDomain;\n }\n else {\n return this.yDomain;\n }\n };\n AreaSeries.prototype.update = function () {\n this.updatePending = false;\n this.updateSelections();\n this.updateNodes();\n };\n AreaSeries.prototype.updateSelections = function () {\n if (!this.nodeDataPending) {\n return;\n }\n this.nodeDataPending = false;\n this.createSelectionData();\n this.updateFillSelection();\n this.updateStrokeSelection();\n this.updateMarkerSelection();\n this.updateLabelSelection();\n };\n AreaSeries.prototype.updateNodes = function () {\n this.group.visible = this.visible && this.xData.length > 0 && this.yData.length > 0;\n this.updateFillNodes();\n this.updateStrokeNodes();\n this.updateMarkerNodes();\n this.updateLabelNodes();\n };\n AreaSeries.prototype.createSelectionData = function () {\n var _this = this;\n var _a = this, data = _a.data, xAxis = _a.xAxis, yAxis = _a.yAxis, xData = _a.xData, yData = _a.yData, labelSelectionData = _a.labelSelectionData, markerSelectionData = _a.markerSelectionData, strokeSelectionData = _a.strokeSelectionData, fillSelectionData = _a.fillSelectionData, xKey = _a.xKey;\n if (!data || !xAxis || !yAxis || !xData.length || !yData.length) {\n return;\n }\n var _b = this, yKeys = _b.yKeys, marker = _b.marker, label = _b.label, fills = _b.fills, strokes = _b.strokes;\n var xScale = xAxis.scale;\n var yScale = yAxis.scale;\n var continuousY = yScale instanceof ContinuousScale;\n var xOffset = (xScale.bandwidth || 0) / 2;\n markerSelectionData.length = 0;\n labelSelectionData.length = 0;\n strokeSelectionData.length = 0;\n fillSelectionData.length = 0;\n var cumulativePathValues = new Array(xData.length).fill(null).map(function () { return ({ left: 0, right: 0 }); });\n var cumulativeMarkerValues = new Array(xData.length).fill(0);\n var createPathCoordinates = function (xDatum, yDatum, idx, side) {\n var x = xScale.convert(xDatum) + xOffset;\n var prevY = cumulativePathValues[idx][side];\n var currY = cumulativePathValues[idx][side] + yDatum;\n var prevYCoordinate = yScale.convert(prevY, continuousY ? clamper : undefined);\n var currYCoordinate = yScale.convert(currY, continuousY ? clamper : undefined);\n cumulativePathValues[idx][side] = currY;\n return [\n { x: x, y: currYCoordinate },\n { x: x, y: prevYCoordinate },\n ];\n };\n var createMarkerCoordinate = function (xDatum, yDatum, idx, rawYDatum) {\n var currY;\n // if not normalized, the invalid data points will be processed as `undefined` in processData()\n // if normalized, the invalid data points will be processed as 0 rather than `undefined`\n // check if unprocessed datum is valid as we only want to show markers for valid points\n var normalized = _this.normalizedTo && isFinite(_this.normalizedTo);\n var normalizedAndValid = normalized && continuousY && isContinuous(rawYDatum);\n var valid = (!normalized && !isNaN(yDatum)) || normalizedAndValid;\n if (valid) {\n currY = cumulativeMarkerValues[idx] += yDatum;\n }\n var x = xScale.convert(xDatum) + xOffset;\n var y = yScale.convert(currY, continuousY ? clamper : undefined);\n return { x: x, y: y };\n };\n yData.forEach(function (seriesYs, seriesIdx) {\n var yKey = yKeys[seriesIdx];\n var fillSelectionForSeries = fillSelectionData[seriesIdx] || (fillSelectionData[seriesIdx] = { itemId: yKey, points: [] });\n var fillPoints = fillSelectionForSeries.points;\n var fillPhantomPoints = [];\n var strokeDatum = strokeSelectionData[seriesIdx] || (strokeSelectionData[seriesIdx] = { itemId: yKey, points: [], yValues: [] });\n var strokePoints = strokeDatum.points;\n var yValues = strokeDatum.yValues;\n seriesYs.forEach(function (yDatum, datumIdx) {\n var _a;\n var _b = xData[datumIdx], xDatum = _b.xDatum, seriesDatum = _b.seriesDatum;\n var nextXDatum = (_a = xData[datumIdx + 1]) === null || _a === void 0 ? void 0 : _a.xDatum;\n var nextYDatum = seriesYs[datumIdx + 1];\n // marker data\n var point = createMarkerCoordinate(xDatum, +yDatum, datumIdx, seriesDatum[yKey]);\n if (marker) {\n markerSelectionData.push({\n index: datumIdx,\n series: _this,\n itemId: yKey,\n datum: seriesDatum,\n yValue: yDatum,\n yKey: yKey,\n point: point,\n fill: fills[seriesIdx % fills.length],\n stroke: strokes[seriesIdx % strokes.length]\n });\n }\n // label data\n var labelText;\n if (label.formatter) {\n labelText = label.formatter({ value: yDatum });\n }\n else {\n labelText = isNumber(yDatum) ? Number(yDatum).toFixed(2) : String(yDatum);\n }\n if (label) {\n labelSelectionData.push({\n index: datumIdx,\n itemId: yKey,\n point: point,\n label: _this.seriesItemEnabled.get(yKey) && labelText ? {\n text: labelText,\n fontStyle: label.fontStyle,\n fontWeight: label.fontWeight,\n fontSize: label.fontSize,\n fontFamily: label.fontFamily,\n textAlign: 'center',\n textBaseline: 'bottom',\n fill: label.color\n } : undefined\n });\n }\n // fill data\n // Handle data in pairs of current and next x and y values\n var windowX = [xDatum, nextXDatum];\n var windowY = [yDatum, nextYDatum];\n if (windowX.some(function (v) { return v == undefined; })) {\n return;\n }\n if (windowY.some(function (v) { return v == undefined; })) {\n windowY[0] = 0;\n windowY[1] = 0;\n }\n var currCoordinates = createPathCoordinates(windowX[0], +windowY[0], datumIdx, 'right');\n fillPoints.push(currCoordinates[0]);\n fillPhantomPoints.push(currCoordinates[1]);\n var nextCoordinates = createPathCoordinates(windowX[1], +windowY[1], datumIdx, 'left');\n fillPoints.push(nextCoordinates[0]);\n fillPhantomPoints.push(nextCoordinates[1]);\n // stroke data\n strokePoints.push({ x: NaN, y: NaN }); // moveTo\n yValues.push(undefined);\n strokePoints.push(currCoordinates[0]);\n yValues.push(yDatum);\n if (nextYDatum !== undefined) {\n strokePoints.push(nextCoordinates[0]);\n yValues.push(yDatum);\n }\n });\n fillPoints.push.apply(fillPoints, __spread(fillPhantomPoints.slice().reverse()));\n });\n };\n AreaSeries.prototype.updateFillSelection = function () {\n var updateFills = this.fillSelection.setData(this.fillSelectionData);\n updateFills.exit.remove();\n var enterFills = updateFills.enter.append(Path)\n .each(function (path) {\n path.lineJoin = 'round';\n path.stroke = undefined;\n path.pointerEvents = PointerEvents.None;\n });\n this.fillSelection = updateFills.merge(enterFills);\n };\n AreaSeries.prototype.updateFillNodes = function () {\n var _this = this;\n var _a = this, fills = _a.fills, fillOpacity = _a.fillOpacity, strokeOpacity = _a.strokeOpacity, strokeWidth = _a.strokeWidth, shadow = _a.shadow, seriesItemEnabled = _a.seriesItemEnabled;\n this.fillSelection.each(function (shape, datum, index) {\n shape.fill = fills[index % fills.length];\n shape.fillOpacity = fillOpacity;\n shape.strokeOpacity = strokeOpacity;\n shape.strokeWidth = strokeWidth;\n shape.lineDash = _this.lineDash;\n shape.lineDashOffset = _this.lineDashOffset;\n shape.fillShadow = shadow;\n shape.visible = !!seriesItemEnabled.get(datum.itemId);\n shape.opacity = _this.getOpacity(datum);\n var points = datum.points;\n var path = shape.path;\n path.clear();\n points.forEach(function (_a, i) {\n var x = _a.x, y = _a.y;\n if (i > 0) {\n path.lineTo(x, y);\n }\n else {\n path.moveTo(x, y);\n }\n });\n path.closePath();\n });\n };\n AreaSeries.prototype.updateStrokeSelection = function () {\n var updateStrokes = this.strokeSelection.setData(this.strokeSelectionData);\n updateStrokes.exit.remove();\n var enterStrokes = updateStrokes.enter.append(Path)\n .each(function (path) {\n path.fill = undefined;\n path.lineJoin = path.lineCap = 'round';\n path.pointerEvents = PointerEvents.None;\n });\n this.strokeSelection = updateStrokes.merge(enterStrokes);\n };\n AreaSeries.prototype.updateStrokeNodes = function () {\n var _this = this;\n if (!this.data) {\n return;\n }\n var _a = this, strokes = _a.strokes, strokeOpacity = _a.strokeOpacity, seriesItemEnabled = _a.seriesItemEnabled;\n var moveTo = true;\n this.strokeSelection.each(function (shape, datum, index) {\n shape.visible = !!seriesItemEnabled.get(datum.itemId);\n shape.opacity = _this.getOpacity(datum);\n shape.stroke = strokes[index % strokes.length];\n shape.strokeWidth = _this.getStrokeWidth(_this.strokeWidth, datum);\n shape.strokeOpacity = strokeOpacity;\n shape.lineDash = _this.lineDash;\n shape.lineDashOffset = _this.lineDashOffset;\n var points = datum.points, yValues = datum.yValues;\n var path = shape.path;\n path.clear();\n for (var i = 0; i < points.length; i++) {\n var _a = points[i], x = _a.x, y = _a.y;\n if (yValues[i] === undefined) {\n moveTo = true;\n }\n else {\n if (moveTo) {\n path.moveTo(x, y);\n moveTo = false;\n }\n else {\n path.lineTo(x, y);\n }\n }\n }\n });\n };\n AreaSeries.prototype.updateMarkerSelection = function () {\n var MarkerShape = getMarker(this.marker.shape);\n var data = MarkerShape ? this.markerSelectionData : [];\n var updateMarkers = this.markerSelection.setData(data);\n updateMarkers.exit.remove();\n var enterMarkers = updateMarkers.enter.append(MarkerShape);\n this.markerSelection = updateMarkers.merge(enterMarkers);\n };\n AreaSeries.prototype.updateMarkerNodes = function () {\n var _this = this;\n if (!this.chart) {\n return;\n }\n var _a = this, xKey = _a.xKey, marker = _a.marker, seriesItemEnabled = _a.seriesItemEnabled, yKeys = _a.yKeys, fills = _a.fills, strokes = _a.strokes, highlightedDatum = _a.chart.highlightedDatum, _b = _a.highlightStyle, deprecatedFill = _b.fill, deprecatedStroke = _b.stroke, deprecatedStrokeWidth = _b.strokeWidth, _c = _b.item, _d = _c.fill, highlightedFill = _d === void 0 ? deprecatedFill : _d, _e = _c.stroke, highlightedStroke = _e === void 0 ? deprecatedStroke : _e, _f = _c.strokeWidth, highlightedDatumStrokeWidth = _f === void 0 ? deprecatedStrokeWidth : _f;\n var size = marker.size, formatter = marker.formatter;\n var markerStrokeWidth = marker.strokeWidth !== undefined ? marker.strokeWidth : this.strokeWidth;\n this.markerSelection.each(function (node, datum) {\n var yKeyIndex = yKeys.indexOf(datum.yKey);\n var isDatumHighlighted = datum === highlightedDatum;\n var fill = isDatumHighlighted && highlightedFill !== undefined ? highlightedFill : marker.fill || fills[yKeyIndex % fills.length];\n var stroke = isDatumHighlighted && highlightedStroke !== undefined ? highlightedStroke : marker.stroke || strokes[yKeyIndex % fills.length];\n var strokeWidth = isDatumHighlighted && highlightedDatumStrokeWidth !== undefined\n ? highlightedDatumStrokeWidth\n : markerStrokeWidth;\n var format = undefined;\n if (formatter) {\n format = formatter({\n datum: datum.datum,\n xKey: xKey,\n yKey: datum.yKey,\n fill: fill,\n stroke: stroke,\n strokeWidth: strokeWidth,\n size: size,\n highlighted: isDatumHighlighted\n });\n }\n node.fill = format && format.fill || fill;\n node.stroke = format && format.stroke || stroke;\n node.strokeWidth = format && format.strokeWidth !== undefined\n ? format.strokeWidth\n : strokeWidth;\n node.size = format && format.size !== undefined\n ? format.size\n : size;\n node.translationX = datum.point.x;\n node.translationY = datum.point.y;\n node.visible = marker.enabled && node.size > 0 && !!seriesItemEnabled.get(datum.yKey) && !isNaN(datum.point.x) && !isNaN(datum.point.y);\n node.opacity = _this.getOpacity(datum);\n });\n };\n AreaSeries.prototype.updateLabelSelection = function () {\n var updateLabels = this.labelSelection.setData(this.labelSelectionData);\n updateLabels.exit.remove();\n var enterLabels = updateLabels.enter.append(Text);\n this.labelSelection = updateLabels.merge(enterLabels);\n };\n AreaSeries.prototype.updateLabelNodes = function () {\n var _this = this;\n if (!this.chart) {\n return;\n }\n var _a = this.label, labelEnabled = _a.enabled, fontStyle = _a.fontStyle, fontWeight = _a.fontWeight, fontSize = _a.fontSize, fontFamily = _a.fontFamily, color = _a.color;\n this.labelSelection.each(function (text, datum) {\n var point = datum.point, label = datum.label;\n if (label && labelEnabled) {\n text.fontStyle = fontStyle;\n text.fontWeight = fontWeight;\n text.fontSize = fontSize;\n text.fontFamily = fontFamily;\n text.textAlign = label.textAlign;\n text.textBaseline = label.textBaseline;\n text.text = label.text;\n text.x = point.x;\n text.y = point.y - 10;\n text.fill = color;\n text.visible = true;\n text.opacity = _this.getOpacity(datum);\n }\n else {\n text.visible = false;\n }\n });\n };\n AreaSeries.prototype.getNodeData = function () {\n return this.markerSelectionData;\n };\n AreaSeries.prototype.fireNodeClickEvent = function (event, datum) {\n this.fireEvent({\n type: 'nodeClick',\n event: event,\n series: this,\n datum: datum.datum,\n xKey: this.xKey,\n yKey: datum.yKey\n });\n };\n AreaSeries.prototype.getTooltipHtml = function (nodeDatum) {\n var xKey = this.xKey;\n var yKey = nodeDatum.yKey;\n if (!(xKey && yKey) || !this.seriesItemEnabled.get(yKey)) {\n return '';\n }\n var datum = nodeDatum.datum;\n var xValue = datum[xKey];\n var yValue = datum[yKey];\n var _a = this, xAxis = _a.xAxis, yAxis = _a.yAxis;\n if (!(xAxis && yAxis && isNumber(yValue))) {\n return '';\n }\n var _b = this, xName = _b.xName, yKeys = _b.yKeys, yNames = _b.yNames, yData = _b.yData, fills = _b.fills, strokes = _b.strokes, tooltip = _b.tooltip, marker = _b.marker;\n var size = marker.size, markerFormatter = marker.formatter, markerStrokeWidth = marker.strokeWidth, markerFill = marker.fill, markerStroke = marker.stroke;\n var xString = xAxis.formatDatum(xValue);\n var yString = yAxis.formatDatum(yValue);\n var yKeyIndex = yKeys.indexOf(yKey);\n var seriesYs = yData[yKeyIndex];\n var processedYValue = seriesYs[nodeDatum.index];\n var yName = yNames[yKeyIndex];\n var title = sanitizeHtml(yName);\n var content = sanitizeHtml(xString + ': ' + yString);\n var strokeWidth = markerStrokeWidth !== undefined ? markerStrokeWidth : this.strokeWidth;\n var fill = markerFill || fills[yKeyIndex % fills.length];\n var stroke = markerStroke || strokes[yKeyIndex % fills.length];\n var format = undefined;\n if (markerFormatter) {\n format = markerFormatter({\n datum: datum,\n xKey: xKey,\n yKey: yKey,\n fill: fill,\n stroke: stroke,\n strokeWidth: strokeWidth,\n size: size,\n highlighted: false\n });\n }\n var color = format && format.fill || fill;\n var defaults = {\n title: title,\n backgroundColor: color,\n content: content\n };\n var tooltipRenderer = tooltip.renderer, tooltipFormat = tooltip.format;\n if (tooltipFormat || tooltipRenderer) {\n var params = {\n datum: datum,\n xKey: xKey,\n xName: xName,\n xValue: xValue,\n yKey: yKey,\n yValue: yValue,\n processedYValue: processedYValue,\n yName: yName,\n color: color\n };\n if (tooltipFormat) {\n return toTooltipHtml({\n content: interpolate(tooltipFormat, params)\n }, defaults);\n }\n if (tooltipRenderer) {\n return toTooltipHtml(tooltipRenderer(params), defaults);\n }\n }\n return toTooltipHtml(defaults);\n };\n AreaSeries.prototype.listSeriesItems = function (legendData) {\n var _a = this, data = _a.data, id = _a.id, xKey = _a.xKey, yKeys = _a.yKeys, yNames = _a.yNames, seriesItemEnabled = _a.seriesItemEnabled, marker = _a.marker, fills = _a.fills, strokes = _a.strokes, fillOpacity = _a.fillOpacity, strokeOpacity = _a.strokeOpacity;\n if (data && data.length && xKey && yKeys.length) {\n yKeys.forEach(function (yKey, index) {\n legendData.push({\n id: id,\n itemId: yKey,\n enabled: seriesItemEnabled.get(yKey) || false,\n label: {\n text: yNames[index] || yKeys[index]\n },\n marker: {\n shape: marker.shape,\n fill: marker.fill || fills[index % fills.length],\n stroke: marker.stroke || strokes[index % strokes.length],\n fillOpacity: fillOpacity,\n strokeOpacity: strokeOpacity\n }\n });\n });\n }\n };\n AreaSeries.prototype.toggleSeriesItem = function (itemId, enabled) {\n this.seriesItemEnabled.set(itemId, enabled);\n this.scheduleData();\n };\n AreaSeries.className = 'AreaSeries';\n AreaSeries.type = 'area';\n __decorate([\n reactive('dataChange')\n ], AreaSeries.prototype, \"fills\", void 0);\n __decorate([\n reactive('dataChange')\n ], AreaSeries.prototype, \"strokes\", void 0);\n __decorate([\n reactive('update')\n ], AreaSeries.prototype, \"fillOpacity\", void 0);\n __decorate([\n reactive('update')\n ], AreaSeries.prototype, \"strokeOpacity\", void 0);\n __decorate([\n reactive('update')\n ], AreaSeries.prototype, \"lineDash\", void 0);\n __decorate([\n reactive('update')\n ], AreaSeries.prototype, \"lineDashOffset\", void 0);\n __decorate([\n reactive('update')\n ], AreaSeries.prototype, \"xName\", void 0);\n __decorate([\n reactive('update')\n ], AreaSeries.prototype, \"yNames\", void 0);\n __decorate([\n reactive('update')\n ], AreaSeries.prototype, \"strokeWidth\", void 0);\n __decorate([\n reactive('update')\n ], AreaSeries.prototype, \"shadow\", void 0);\n return AreaSeries;\n}(CartesianSeries));\nexport { AreaSeries };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n};\nimport { Group } from \"../../../scene/group\";\nimport { Selection } from \"../../../scene/selection\";\nimport { Rect } from \"../../../scene/shape/rect\";\nimport { Text } from \"../../../scene/shape/text\";\nimport { SeriesTooltip, Series } from \"../series\";\nimport { Label } from \"../../label\";\nimport { PointerEvents } from \"../../../scene/node\";\nimport { CartesianSeries } from \"./cartesianSeries\";\nimport { ChartAxisDirection } from \"../../chartAxis\";\nimport { toTooltipHtml } from \"../../chart\";\nimport { extent } from \"../../../util/array\";\nimport { reactive } from \"../../../util/observable\";\nimport ticks, { tickStep } from \"../../../util/ticks\";\nimport { sanitizeHtml } from \"../../../util/sanitize\";\nimport { isContinuous } from \"../../../util/value\";\nvar HistogramSeriesNodeTag;\n(function (HistogramSeriesNodeTag) {\n HistogramSeriesNodeTag[HistogramSeriesNodeTag[\"Bin\"] = 0] = \"Bin\";\n HistogramSeriesNodeTag[HistogramSeriesNodeTag[\"Label\"] = 1] = \"Label\";\n})(HistogramSeriesNodeTag || (HistogramSeriesNodeTag = {}));\nvar HistogramSeriesLabel = /** @class */ (function (_super) {\n __extends(HistogramSeriesLabel, _super);\n function HistogramSeriesLabel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n reactive('change')\n ], HistogramSeriesLabel.prototype, \"formatter\", void 0);\n return HistogramSeriesLabel;\n}(Label));\nvar defaultBinCount = 10;\nvar aggregationFunctions = {\n count: function (bin) { return bin.data.length; },\n sum: function (bin, yKey) { return bin.data.reduce(function (acc, datum) { return acc + datum[yKey]; }, 0); },\n mean: function (bin, yKey) { return aggregationFunctions.sum(bin, yKey) / aggregationFunctions.count(bin, yKey); }\n};\nvar HistogramBin = /** @class */ (function () {\n function HistogramBin(_a) {\n var _b = __read(_a, 2), domainMin = _b[0], domainMax = _b[1];\n this.data = [];\n this.aggregatedValue = 0;\n this.frequency = 0;\n this.domain = [domainMin, domainMax];\n }\n ;\n HistogramBin.prototype.addDatum = function (datum) {\n this.data.push(datum);\n this.frequency++;\n };\n Object.defineProperty(HistogramBin.prototype, \"domainWidth\", {\n get: function () {\n var _a = __read(this.domain, 2), domainMin = _a[0], domainMax = _a[1];\n return domainMax - domainMin;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(HistogramBin.prototype, \"relativeHeight\", {\n get: function () {\n return this.aggregatedValue / this.domainWidth;\n },\n enumerable: true,\n configurable: true\n });\n HistogramBin.prototype.calculateAggregatedValue = function (aggregationName, yKey) {\n if (!yKey) {\n // not having a yKey forces us into a frequency plot\n aggregationName = 'count';\n }\n var aggregationFunction = aggregationFunctions[aggregationName];\n this.aggregatedValue = aggregationFunction(this, yKey);\n };\n HistogramBin.prototype.getY = function (areaPlot) {\n return areaPlot ? this.relativeHeight : this.aggregatedValue;\n };\n return HistogramBin;\n}());\nexport { HistogramBin };\nvar HistogramSeriesTooltip = /** @class */ (function (_super) {\n __extends(HistogramSeriesTooltip, _super);\n function HistogramSeriesTooltip() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n reactive('change')\n ], HistogramSeriesTooltip.prototype, \"renderer\", void 0);\n return HistogramSeriesTooltip;\n}(SeriesTooltip));\nexport { HistogramSeriesTooltip };\nvar HistogramSeries = /** @class */ (function (_super) {\n __extends(HistogramSeries, _super);\n function HistogramSeries() {\n var _a;\n var _this = _super.call(this) || this;\n // Need to put column and label nodes into separate groups, because even though label nodes are\n // created after the column nodes, this only guarantees that labels will always be on top of columns\n // on the first run. If on the next run more columns are added, they might clip the labels\n // rendered during the previous run.\n _this.rectGroup = _this.pickGroup.appendChild(new Group());\n _this.textGroup = _this.group.appendChild(new Group());\n _this.rectSelection = Selection.select(_this.rectGroup).selectAll();\n _this.textSelection = Selection.select(_this.textGroup).selectAll();\n _this.binnedData = [];\n _this.xDomain = [];\n _this.yDomain = [];\n _this.label = new HistogramSeriesLabel();\n _this.seriesItemEnabled = true;\n _this.tooltip = new HistogramSeriesTooltip();\n _this.fill = undefined;\n _this.stroke = undefined;\n _this.fillOpacity = 1;\n _this.strokeOpacity = 1;\n _this.lineDash = [0];\n _this.lineDashOffset = 0;\n _this.directionKeys = (_a = {},\n _a[ChartAxisDirection.X] = ['xKey'],\n _a[ChartAxisDirection.Y] = ['yKey'],\n _a);\n _this._xKey = '';\n _this._areaPlot = false;\n _this._bins = undefined;\n _this._aggregation = 'count';\n _this._binCount = undefined;\n _this._xName = '';\n _this._yKey = '';\n _this._yName = '';\n _this._strokeWidth = 1;\n _this.label.enabled = false;\n _this.label.addEventListener('change', _this.scheduleUpdate, _this);\n return _this;\n }\n HistogramSeries.prototype.getKeys = function (direction) {\n var _this = this;\n var directionKeys = this.directionKeys;\n var keys = directionKeys && directionKeys[direction];\n var values = [];\n if (keys) {\n keys.forEach(function (key) {\n var value = _this[key];\n if (value) {\n if (Array.isArray(value)) {\n values.push.apply(values, __spread(value));\n }\n else {\n values.push(value);\n }\n }\n });\n }\n return values;\n };\n Object.defineProperty(HistogramSeries.prototype, \"xKey\", {\n get: function () {\n return this._xKey;\n },\n set: function (value) {\n if (this._xKey !== value) {\n this._xKey = value;\n this.scheduleData();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(HistogramSeries.prototype, \"areaPlot\", {\n get: function () {\n return this._areaPlot;\n },\n set: function (c) {\n this._areaPlot = c;\n this.scheduleData();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(HistogramSeries.prototype, \"bins\", {\n get: function () {\n return this._bins;\n },\n set: function (bins) {\n this._bins = bins;\n this.scheduleData();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(HistogramSeries.prototype, \"aggregation\", {\n get: function () {\n return this._aggregation;\n },\n set: function (aggregation) {\n this._aggregation = aggregation;\n this.scheduleData();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(HistogramSeries.prototype, \"binCount\", {\n get: function () {\n return this._binCount;\n },\n set: function (binCount) {\n this._binCount = binCount;\n this.scheduleData();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(HistogramSeries.prototype, \"xName\", {\n get: function () {\n return this._xName;\n },\n set: function (value) {\n if (this._xName !== value) {\n this._xName = value;\n this.scheduleUpdate();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(HistogramSeries.prototype, \"yKey\", {\n get: function () {\n return this._yKey;\n },\n set: function (yKey) {\n this._yKey = yKey;\n this.seriesItemEnabled = true;\n this.scheduleData();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(HistogramSeries.prototype, \"yName\", {\n get: function () {\n return this._yName;\n },\n set: function (values) {\n this._yName = values;\n this.scheduleData();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(HistogramSeries.prototype, \"strokeWidth\", {\n get: function () {\n return this._strokeWidth;\n },\n set: function (value) {\n if (this._strokeWidth !== value) {\n this._strokeWidth = value;\n this.scheduleUpdate();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(HistogramSeries.prototype, \"shadow\", {\n get: function () {\n return this._shadow;\n },\n set: function (value) {\n if (this._shadow !== value) {\n this._shadow = value;\n this.scheduleUpdate();\n }\n },\n enumerable: true,\n configurable: true\n });\n HistogramSeries.prototype.onHighlightChange = function () {\n this.updateRectNodes();\n };\n HistogramSeries.prototype.setColors = function (fills, strokes) {\n this.fill = fills[0];\n this.stroke = strokes[0];\n };\n // During processData phase, used to unify different ways of the user specifying\n // the bins. Returns bins in format[[min1, max1], [min2, max2], ... ].\n HistogramSeries.prototype.deriveBins = function () {\n var _this = this;\n var _a = this, bins = _a.bins, binCount = _a.binCount;\n if (!this.data) {\n return [];\n }\n if (bins) {\n return bins;\n }\n var xData = this.data.map(function (datum) { return datum[_this.xKey]; });\n var xDomain = this.fixNumericExtent(extent(xData, isContinuous), 'x');\n var binStarts = ticks(xDomain[0], xDomain[1], this.binCount || defaultBinCount);\n var binSize = tickStep(xDomain[0], xDomain[1], this.binCount || defaultBinCount);\n var firstBinEnd = binStarts[0];\n var expandStartToBin = function (n) { return [n, n + binSize]; };\n return __spread([\n [firstBinEnd - binSize, firstBinEnd]\n ], binStarts.map(expandStartToBin));\n };\n HistogramSeries.prototype.placeDataInBins = function (data) {\n var _this = this;\n var xKey = this.xKey;\n var derivedBins = this.deriveBins();\n // creating a sorted copy allows binning in O(n) rather than O(n²)\n // but at the expense of more temporary memory\n var sortedData = data.slice().sort(function (a, b) {\n if (a[xKey] < b[xKey]) {\n return -1;\n }\n if (a[xKey] > b[xKey]) {\n return 1;\n }\n return 0;\n });\n var currentBin = 0;\n var bins = [new HistogramBin(derivedBins[0])];\n loop: for (var i = 0, ln = sortedData.length; i < ln; i++) {\n var datum = sortedData[i];\n while (datum[xKey] > derivedBins[currentBin][1]) {\n currentBin++;\n var bin = derivedBins[currentBin];\n if (!bin) {\n break loop;\n }\n bins.push(new HistogramBin(bin));\n }\n bins[currentBin].addDatum(datum);\n }\n bins.forEach(function (b) { return b.calculateAggregatedValue(_this._aggregation, _this.yKey); });\n return bins;\n };\n Object.defineProperty(HistogramSeries.prototype, \"xMax\", {\n get: function () {\n var _this = this;\n return this.data && this.data.reduce(function (acc, datum) {\n return Math.max(acc, datum[_this.xKey]);\n }, Number.NEGATIVE_INFINITY);\n },\n enumerable: true,\n configurable: true\n });\n HistogramSeries.prototype.processData = function () {\n var _this = this;\n var _a = this, xKey = _a.xKey, data = _a.data;\n this.binnedData = this.placeDataInBins(xKey && data ? data : []);\n var yData = this.binnedData.map(function (b) { return b.getY(_this.areaPlot); });\n var yMinMax = extent(yData, isContinuous);\n this.yDomain = this.fixNumericExtent([0, yMinMax ? yMinMax[1] : 1], 'y');\n var firstBin = this.binnedData[0];\n var lastBin = this.binnedData[this.binnedData.length - 1];\n var xMin = firstBin.domain[0];\n var xMax = lastBin.domain[1];\n this.xDomain = [xMin, xMax];\n this.fireEvent({ type: 'dataProcessed' });\n return true;\n };\n HistogramSeries.prototype.getDomain = function (direction) {\n if (direction === ChartAxisDirection.X) {\n return this.xDomain;\n }\n else {\n return this.yDomain;\n }\n };\n HistogramSeries.prototype.fireNodeClickEvent = function (event, datum) {\n this.fireEvent({\n type: 'nodeClick',\n event: event,\n series: this,\n datum: datum.datum,\n xKey: this.xKey\n });\n };\n HistogramSeries.prototype.update = function () {\n this.updatePending = false;\n this.updateSelections();\n this.updateNodes();\n };\n HistogramSeries.prototype.updateSelections = function () {\n if (!this.nodeDataPending) {\n return;\n }\n this.nodeDataPending = false;\n var nodeData = this.createNodeData();\n this.updateRectSelection(nodeData);\n this.updateTextSelection(nodeData);\n };\n HistogramSeries.prototype.updateNodes = function () {\n this.group.visible = this.visible;\n this.updateRectNodes();\n this.updateTextNodes();\n };\n HistogramSeries.prototype.createNodeData = function () {\n var _this = this;\n var _a = this, xAxis = _a.xAxis, yAxis = _a.yAxis;\n if (!this.seriesItemEnabled || !xAxis || !yAxis) {\n return [];\n }\n var xScale = xAxis.scale;\n var yScale = yAxis.scale;\n var _b = this, fill = _b.fill, stroke = _b.stroke, strokeWidth = _b.strokeWidth;\n var nodeData = [];\n var defaultLabelFormatter = function (params) { return String(params.value); };\n var _c = this.label, _d = _c.formatter, labelFormatter = _d === void 0 ? defaultLabelFormatter : _d, labelFontStyle = _c.fontStyle, labelFontWeight = _c.fontWeight, labelFontSize = _c.fontSize, labelFontFamily = _c.fontFamily, labelColor = _c.color;\n this.binnedData.forEach(function (binOfData) {\n var total = binOfData.aggregatedValue, frequency = binOfData.frequency, _a = __read(binOfData.domain, 2), xDomainMin = _a[0], xDomainMax = _a[1], relativeHeight = binOfData.relativeHeight;\n var xMinPx = xScale.convert(xDomainMin), xMaxPx = xScale.convert(xDomainMax), \n // note: assuming can't be negative:\n y = _this.areaPlot ? relativeHeight : (_this.yKey ? total : frequency), yZeroPx = yScale.convert(0), yMaxPx = yScale.convert(y), w = xMaxPx - xMinPx, h = Math.abs(yMaxPx - yZeroPx);\n var selectionDatumLabel = y !== 0 ? {\n text: labelFormatter({ value: binOfData.aggregatedValue }),\n fontStyle: labelFontStyle,\n fontWeight: labelFontWeight,\n fontSize: labelFontSize,\n fontFamily: labelFontFamily,\n fill: labelColor,\n x: xMinPx + w / 2,\n y: yMaxPx + h / 2\n } : undefined;\n nodeData.push({\n series: _this,\n datum: binOfData,\n // since each selection is an aggregation of multiple data.\n x: xMinPx,\n y: yMaxPx,\n width: w,\n height: h,\n fill: fill,\n stroke: stroke,\n strokeWidth: strokeWidth,\n label: selectionDatumLabel,\n });\n });\n return nodeData;\n };\n HistogramSeries.prototype.updateRectSelection = function (nodeData) {\n var updateRects = this.rectSelection.setData(nodeData);\n updateRects.exit.remove();\n var enterRects = updateRects.enter.append(Rect).each(function (rect) {\n rect.tag = HistogramSeriesNodeTag.Bin;\n rect.crisp = true;\n });\n this.rectSelection = updateRects.merge(enterRects);\n };\n HistogramSeries.prototype.updateRectNodes = function () {\n var _this = this;\n if (!this.chart) {\n return;\n }\n var _a = this, fillOpacity = _a.fillOpacity, strokeOpacity = _a.strokeOpacity, shadow = _a.shadow, highlightedDatum = _a.chart.highlightedDatum, _b = _a.highlightStyle, deprecatedFill = _b.fill, deprecatedStroke = _b.stroke, deprecatedStrokeWidth = _b.strokeWidth, _c = _b.item, _d = _c.fill, highlightedFill = _d === void 0 ? deprecatedFill : _d, _e = _c.stroke, highlightedStroke = _e === void 0 ? deprecatedStroke : _e, _f = _c.strokeWidth, highlightedDatumStrokeWidth = _f === void 0 ? deprecatedStrokeWidth : _f;\n this.rectSelection.each(function (rect, datum, index) {\n var isDatumHighlighted = datum === highlightedDatum;\n var strokeWidth = isDatumHighlighted && highlightedDatumStrokeWidth !== undefined\n ? highlightedDatumStrokeWidth\n : _this.getStrokeWidth(datum.strokeWidth, datum);\n rect.x = datum.x;\n rect.y = datum.y;\n rect.width = datum.width;\n rect.height = datum.height;\n rect.fill = isDatumHighlighted && highlightedFill !== undefined ? highlightedFill : datum.fill;\n rect.stroke = isDatumHighlighted && highlightedStroke !== undefined ? highlightedStroke : datum.stroke;\n rect.fillOpacity = fillOpacity;\n rect.strokeOpacity = strokeOpacity;\n rect.strokeWidth = strokeWidth;\n rect.lineDash = _this.lineDash;\n rect.lineDashOffset = _this.lineDashOffset;\n rect.fillShadow = shadow;\n rect.zIndex = isDatumHighlighted ? Series.highlightedZIndex : index;\n rect.visible = datum.height > 0; // prevent stroke from rendering for zero height columns\n rect.opacity = _this.getOpacity(datum);\n });\n };\n HistogramSeries.prototype.updateTextSelection = function (nodeData) {\n var updateTexts = this.textSelection.setData(nodeData);\n updateTexts.exit.remove();\n var enterTexts = updateTexts.enter.append(Text).each(function (text) {\n text.tag = HistogramSeriesNodeTag.Label;\n text.pointerEvents = PointerEvents.None;\n text.textAlign = 'center';\n text.textBaseline = 'middle';\n });\n this.textSelection = updateTexts.merge(enterTexts);\n };\n HistogramSeries.prototype.updateTextNodes = function () {\n var labelEnabled = this.label.enabled;\n this.textSelection.each(function (text, datum) {\n var label = datum.label;\n if (label && labelEnabled) {\n text.text = label.text;\n text.x = label.x;\n text.y = label.y;\n text.fontStyle = label.fontStyle;\n text.fontWeight = label.fontWeight;\n text.fontSize = label.fontSize;\n text.fontFamily = label.fontFamily;\n text.fill = label.fill;\n text.visible = true;\n }\n else {\n text.visible = false;\n }\n });\n };\n HistogramSeries.prototype.getTooltipHtml = function (nodeDatum) {\n var _a = this, xKey = _a.xKey, yKey = _a.yKey, xAxis = _a.xAxis, yAxis = _a.yAxis;\n if (!xKey || !xAxis || !yAxis) {\n return '';\n }\n var _b = this, xName = _b.xName, yName = _b.yName, color = _b.fill, tooltip = _b.tooltip, aggregation = _b.aggregation;\n var tooltipRenderer = tooltip.renderer;\n var bin = nodeDatum.datum;\n var aggregatedValue = bin.aggregatedValue, frequency = bin.frequency, _c = __read(bin.domain, 2), rangeMin = _c[0], rangeMax = _c[1];\n var title = sanitizeHtml(xName || xKey) + \": \" + xAxis.formatDatum(rangeMin) + \" - \" + xAxis.formatDatum(rangeMax);\n var content = yKey ?\n \"\" + sanitizeHtml(yName || yKey) + \" (\" + aggregation + \"): \" + yAxis.formatDatum(aggregatedValue) + \"
\" :\n '';\n content += \"Frequency: \" + frequency;\n var defaults = {\n title: title,\n backgroundColor: color,\n content: content\n };\n if (tooltipRenderer) {\n return toTooltipHtml(tooltipRenderer({\n datum: bin,\n xKey: xKey,\n xValue: bin.domain,\n xName: xName,\n yKey: yKey,\n yValue: bin.aggregatedValue,\n yName: yName,\n color: color\n }), defaults);\n }\n return toTooltipHtml(defaults);\n };\n HistogramSeries.prototype.listSeriesItems = function (legendData) {\n var _a = this, id = _a.id, data = _a.data, yKey = _a.yKey, yName = _a.yName, seriesItemEnabled = _a.seriesItemEnabled, fill = _a.fill, stroke = _a.stroke, fillOpacity = _a.fillOpacity, strokeOpacity = _a.strokeOpacity;\n if (data && data.length) {\n legendData.push({\n id: id,\n itemId: yKey,\n enabled: seriesItemEnabled,\n label: {\n text: yName || yKey || 'Frequency'\n },\n marker: {\n fill: fill || 'rgba(0, 0, 0, 0)',\n stroke: stroke || 'rgba(0, 0, 0, 0)',\n fillOpacity: fillOpacity,\n strokeOpacity: strokeOpacity\n }\n });\n }\n };\n HistogramSeries.prototype.toggleSeriesItem = function (itemId, enabled) {\n if (itemId === this.yKey) {\n this.seriesItemEnabled = enabled;\n }\n this.scheduleData();\n };\n HistogramSeries.className = 'HistogramSeries';\n HistogramSeries.type = 'histogram';\n __decorate([\n reactive('dataChange')\n ], HistogramSeries.prototype, \"fill\", void 0);\n __decorate([\n reactive('dataChange')\n ], HistogramSeries.prototype, \"stroke\", void 0);\n __decorate([\n reactive('layoutChange')\n ], HistogramSeries.prototype, \"fillOpacity\", void 0);\n __decorate([\n reactive('layoutChange')\n ], HistogramSeries.prototype, \"strokeOpacity\", void 0);\n __decorate([\n reactive('update')\n ], HistogramSeries.prototype, \"lineDash\", void 0);\n __decorate([\n reactive('update')\n ], HistogramSeries.prototype, \"lineDashOffset\", void 0);\n return HistogramSeries;\n}(CartesianSeries));\nexport { HistogramSeries };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { Path } from \"../../../scene/shape/path\";\nimport { ContinuousScale } from \"../../../scale/continuousScale\";\nimport { Selection } from \"../../../scene/selection\";\nimport { Group } from \"../../../scene/group\";\nimport { SeriesTooltip } from \"../series\";\nimport { extent } from \"../../../util/array\";\nimport { PointerEvents } from \"../../../scene/node\";\nimport { Text } from \"../../../scene/shape/text\";\nimport { CartesianSeries, CartesianSeriesMarker } from \"./cartesianSeries\";\nimport { ChartAxisDirection } from \"../../chartAxis\";\nimport { getMarker } from \"../../marker/util\";\nimport { reactive } from \"../../../util/observable\";\nimport { toTooltipHtml } from \"../../chart\";\nimport { interpolate } from \"../../../util/string\";\nimport { Label } from \"../../label\";\nimport { sanitizeHtml } from \"../../../util/sanitize\";\nimport { isContinuous } from \"../../../util/value\";\nvar LineSeriesLabel = /** @class */ (function (_super) {\n __extends(LineSeriesLabel, _super);\n function LineSeriesLabel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n reactive('change')\n ], LineSeriesLabel.prototype, \"formatter\", void 0);\n return LineSeriesLabel;\n}(Label));\nvar LineSeriesTooltip = /** @class */ (function (_super) {\n __extends(LineSeriesTooltip, _super);\n function LineSeriesTooltip() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n reactive('change')\n ], LineSeriesTooltip.prototype, \"renderer\", void 0);\n __decorate([\n reactive('change')\n ], LineSeriesTooltip.prototype, \"format\", void 0);\n return LineSeriesTooltip;\n}(SeriesTooltip));\nexport { LineSeriesTooltip };\nvar LineSeries = /** @class */ (function (_super) {\n __extends(LineSeries, _super);\n function LineSeries() {\n var _this = _super.call(this) || this;\n _this.xDomain = [];\n _this.yDomain = [];\n _this.xData = [];\n _this.yData = [];\n _this.lineNode = new Path();\n // We use groups for this selection even though each group only contains a marker ATM\n // because in the future we might want to add label support as well.\n _this.nodeSelection = Selection.select(_this.pickGroup).selectAll();\n _this.nodeData = [];\n _this.marker = new CartesianSeriesMarker();\n _this.label = new LineSeriesLabel();\n _this.stroke = '#874349';\n _this.lineDash = [0];\n _this.lineDashOffset = 0;\n _this.strokeWidth = 2;\n _this.strokeOpacity = 1;\n _this.tooltip = new LineSeriesTooltip();\n _this._xKey = '';\n _this.xName = '';\n _this._yKey = '';\n _this.yName = '';\n var lineNode = _this.lineNode;\n lineNode.fill = undefined;\n lineNode.lineJoin = 'round';\n lineNode.pointerEvents = PointerEvents.None;\n // Make line render before markers in the pick group.\n _this.group.insertBefore(lineNode, _this.pickGroup);\n _this.addEventListener('update', _this.scheduleUpdate);\n var _a = _this, marker = _a.marker, label = _a.label;\n marker.fill = '#c16068';\n marker.stroke = '#874349';\n marker.addPropertyListener('shape', _this.onMarkerShapeChange, _this);\n marker.addEventListener('change', _this.scheduleUpdate, _this);\n label.enabled = false;\n label.addEventListener('change', _this.scheduleUpdate, _this);\n return _this;\n }\n LineSeries.prototype.onMarkerShapeChange = function () {\n this.nodeSelection = this.nodeSelection.setData([]);\n this.nodeSelection.exit.remove();\n this.fireEvent({ type: 'legendChange' });\n };\n LineSeries.prototype.setColors = function (fills, strokes) {\n this.stroke = fills[0];\n this.marker.stroke = strokes[0];\n this.marker.fill = fills[0];\n };\n Object.defineProperty(LineSeries.prototype, \"xKey\", {\n get: function () {\n return this._xKey;\n },\n set: function (value) {\n if (this._xKey !== value) {\n this._xKey = value;\n this.xData = [];\n this.scheduleData();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LineSeries.prototype, \"yKey\", {\n get: function () {\n return this._yKey;\n },\n set: function (value) {\n if (this._yKey !== value) {\n this._yKey = value;\n this.yData = [];\n this.scheduleData();\n }\n },\n enumerable: true,\n configurable: true\n });\n LineSeries.prototype.processData = function () {\n var _a = this, xAxis = _a.xAxis, yAxis = _a.yAxis, xKey = _a.xKey, yKey = _a.yKey, xData = _a.xData, yData = _a.yData;\n var data = xKey && yKey && this.data ? this.data : [];\n if (!xAxis || !yAxis) {\n return false;\n }\n var isContinuousX = xAxis.scale instanceof ContinuousScale;\n var isContinuousY = yAxis.scale instanceof ContinuousScale;\n xData.length = 0;\n yData.length = 0;\n for (var i = 0, n = data.length; i < n; i++) {\n var datum = data[i];\n var x = datum[xKey];\n var y = datum[yKey];\n var xDatum = this.checkDatum(x, isContinuousX);\n if (isContinuousX && xDatum === undefined) {\n continue;\n }\n else {\n xData.push(xDatum);\n }\n var yDatum = this.checkDatum(y, isContinuousY);\n yData.push(yDatum);\n }\n this.xDomain = isContinuousX ? this.fixNumericExtent(extent(xData, isContinuous), 'x', xAxis) : xData;\n this.yDomain = isContinuousY ? this.fixNumericExtent(extent(yData, isContinuous), 'y', yAxis) : yData;\n return true;\n };\n LineSeries.prototype.getDomain = function (direction) {\n if (direction === ChartAxisDirection.X) {\n return this.xDomain;\n }\n return this.yDomain;\n };\n LineSeries.prototype.onHighlightChange = function () {\n this.updateNodes();\n };\n LineSeries.prototype.resetHighlight = function () {\n this.lineNode.strokeWidth = this.strokeWidth;\n };\n LineSeries.prototype.update = function () {\n this.updatePending = false;\n this.updateSelections();\n this.updateNodes();\n };\n LineSeries.prototype.updateSelections = function () {\n if (!this.nodeDataPending) {\n return;\n }\n this.nodeDataPending = false;\n this.updateLinePath(); // this will create node data too\n this.updateNodeSelection();\n };\n LineSeries.prototype.updateLinePath = function () {\n var _a;\n var _b = this, data = _b.data, xAxis = _b.xAxis, yAxis = _b.yAxis;\n if (!data || !xAxis || !yAxis) {\n return;\n }\n var _c = this, xData = _c.xData, yData = _c.yData, lineNode = _c.lineNode, label = _c.label, xKey = _c.xKey, yKey = _c.yKey;\n var xScale = xAxis.scale;\n var yScale = yAxis.scale;\n var xOffset = (xScale.bandwidth || 0) / 2;\n var yOffset = (yScale.bandwidth || 0) / 2;\n var linePath = lineNode.path;\n var nodeData = [];\n linePath.clear();\n var moveTo = true;\n var prevXInRange = undefined;\n var nextXYDatums = undefined;\n for (var i = 0; i < xData.length; i++) {\n var xyDatums = nextXYDatums || [xData[i], yData[i]];\n if (xyDatums[1] === undefined) {\n prevXInRange = undefined;\n moveTo = true;\n }\n else {\n var _d = __read(xyDatums, 2), xDatum = _d[0], yDatum = _d[1];\n var x = xScale.convert(xDatum) + xOffset;\n if (isNaN(x)) {\n prevXInRange = undefined;\n moveTo = true;\n continue;\n }\n var tolerance = (xScale.bandwidth || (this.marker.size * 0.5 + (this.marker.strokeWidth || 0))) + 1;\n nextXYDatums = yData[i + 1] === undefined ? undefined : [xData[i + 1], yData[i + 1]];\n var xInRange = xAxis.inRangeEx(x, 0, tolerance);\n var nextXInRange = nextXYDatums && xAxis.inRangeEx(xScale.convert(nextXYDatums[0]) + xOffset, 0, tolerance);\n if (xInRange === -1 && nextXInRange === -1) {\n moveTo = true;\n continue;\n }\n if (xInRange === 1 && prevXInRange === 1) {\n moveTo = true;\n continue;\n }\n prevXInRange = xInRange;\n var y = yScale.convert(yDatum) + yOffset;\n if (moveTo) {\n linePath.moveTo(x, y);\n moveTo = false;\n }\n else {\n linePath.lineTo(x, y);\n }\n var labelText = void 0;\n if (label.formatter) {\n labelText = label.formatter({ value: yDatum });\n }\n else {\n labelText = typeof yDatum === 'number' && isFinite(yDatum) ? yDatum.toFixed(2) : yDatum ? String(yDatum) : '';\n }\n var seriesDatum = (_a = {}, _a[xKey] = xDatum, _a[yKey] = yDatum, _a);\n nodeData.push({\n series: this,\n datum: seriesDatum,\n point: { x: x, y: y },\n label: labelText ? {\n text: labelText,\n fontStyle: label.fontStyle,\n fontWeight: label.fontWeight,\n fontSize: label.fontSize,\n fontFamily: label.fontFamily,\n textAlign: 'center',\n textBaseline: 'bottom',\n fill: label.color\n } : undefined\n });\n }\n }\n // Used by marker nodes and for hit-testing even when not using markers\n // when `chart.tooltip.tracking` is true.\n this.nodeData = nodeData;\n };\n LineSeries.prototype.updateNodeSelection = function () {\n var marker = this.marker;\n var nodeData = marker.shape ? this.nodeData : [];\n var MarkerShape = getMarker(marker.shape);\n var updateSelection = this.nodeSelection.setData(nodeData);\n updateSelection.exit.remove();\n var enterSelection = updateSelection.enter.append(Group);\n enterSelection.append(MarkerShape);\n enterSelection.append(Text);\n this.nodeSelection = updateSelection.merge(enterSelection);\n };\n LineSeries.prototype.updateNodes = function () {\n this.group.visible = this.visible;\n this.updateLineNode();\n this.updateMarkerNodes();\n this.updateTextNodes();\n };\n LineSeries.prototype.updateLineNode = function () {\n var lineNode = this.lineNode;\n lineNode.stroke = this.stroke;\n lineNode.strokeWidth = this.getStrokeWidth(this.strokeWidth);\n lineNode.strokeOpacity = this.strokeOpacity;\n lineNode.lineDash = this.lineDash;\n lineNode.lineDashOffset = this.lineDashOffset;\n lineNode.opacity = this.getOpacity();\n };\n LineSeries.prototype.updateMarkerNodes = function () {\n var _this = this;\n if (!this.chart) {\n return;\n }\n var _a = this, marker = _a.marker, xKey = _a.xKey, yKey = _a.yKey, lineStroke = _a.stroke, highlightedDatum = _a.chart.highlightedDatum, _b = _a.highlightStyle, deprecatedFill = _b.fill, deprecatedStroke = _b.stroke, deprecatedStrokeWidth = _b.strokeWidth, _c = _b.item, _d = _c.fill, highlightedFill = _d === void 0 ? deprecatedFill : _d, _e = _c.stroke, highlightedStroke = _e === void 0 ? deprecatedStroke : _e, _f = _c.strokeWidth, highlightedDatumStrokeWidth = _f === void 0 ? deprecatedStrokeWidth : _f;\n var size = marker.size, formatter = marker.formatter;\n var markerStrokeWidth = marker.strokeWidth !== undefined ? marker.strokeWidth : this.strokeWidth;\n var MarkerShape = getMarker(marker.shape);\n this.nodeSelection.selectByClass(MarkerShape)\n .each(function (node, datum) {\n var isDatumHighlighted = datum === highlightedDatum;\n var fill = isDatumHighlighted && highlightedFill !== undefined ? highlightedFill : marker.fill;\n var stroke = isDatumHighlighted && highlightedStroke !== undefined ? highlightedStroke : marker.stroke || lineStroke;\n var strokeWidth = isDatumHighlighted && highlightedDatumStrokeWidth !== undefined\n ? highlightedDatumStrokeWidth\n : markerStrokeWidth;\n var format = undefined;\n if (formatter) {\n format = formatter({\n datum: datum.datum,\n xKey: xKey,\n yKey: yKey,\n fill: fill,\n stroke: stroke,\n strokeWidth: strokeWidth,\n size: size,\n highlighted: isDatumHighlighted\n });\n }\n node.fill = format && format.fill || fill;\n node.stroke = format && format.stroke || stroke;\n node.strokeWidth = format && format.strokeWidth !== undefined\n ? format.strokeWidth\n : strokeWidth;\n node.size = format && format.size !== undefined\n ? format.size\n : size;\n node.translationX = datum.point.x;\n node.translationY = datum.point.y;\n node.opacity = _this.getOpacity(datum);\n node.visible = marker.enabled && node.size > 0;\n });\n };\n LineSeries.prototype.updateTextNodes = function () {\n var _this = this;\n this.nodeSelection.selectByClass(Text)\n .each(function (text, datum) {\n var point = datum.point, label = datum.label;\n var _a = _this.label, labelEnabled = _a.enabled, fontStyle = _a.fontStyle, fontWeight = _a.fontWeight, fontSize = _a.fontSize, fontFamily = _a.fontFamily, color = _a.color;\n if (label && labelEnabled) {\n text.fontStyle = fontStyle;\n text.fontWeight = fontWeight;\n text.fontSize = fontSize;\n text.fontFamily = fontFamily;\n text.textAlign = label.textAlign;\n text.textBaseline = label.textBaseline;\n text.text = label.text;\n text.x = point.x;\n text.y = point.y - 10;\n text.fill = color;\n text.visible = true;\n }\n else {\n text.visible = false;\n }\n });\n };\n LineSeries.prototype.getNodeData = function () {\n return this.nodeData;\n };\n LineSeries.prototype.fireNodeClickEvent = function (event, datum) {\n this.fireEvent({\n type: 'nodeClick',\n event: event,\n series: this,\n datum: datum.datum,\n xKey: this.xKey,\n yKey: this.yKey\n });\n };\n LineSeries.prototype.getTooltipHtml = function (nodeDatum) {\n var _a = this, xKey = _a.xKey, yKey = _a.yKey, xAxis = _a.xAxis, yAxis = _a.yAxis;\n if (!xKey || !yKey || !xAxis || !yAxis) {\n return '';\n }\n var _b = this, xName = _b.xName, yName = _b.yName, tooltip = _b.tooltip, marker = _b.marker;\n var tooltipRenderer = tooltip.renderer, tooltipFormat = tooltip.format;\n var datum = nodeDatum.datum;\n var xValue = datum[xKey];\n var yValue = datum[yKey];\n var xString = xAxis.formatDatum(xValue);\n var yString = yAxis.formatDatum(yValue);\n var title = sanitizeHtml(this.title || yName);\n var content = sanitizeHtml(xString + ': ' + yString);\n var markerFormatter = marker.formatter, fill = marker.fill, stroke = marker.stroke, markerStrokeWidth = marker.strokeWidth, size = marker.size;\n var strokeWidth = markerStrokeWidth !== undefined ? markerStrokeWidth : this.strokeWidth;\n var format = undefined;\n if (markerFormatter) {\n format = markerFormatter({\n datum: datum,\n xKey: xKey,\n yKey: yKey,\n fill: fill,\n stroke: stroke,\n strokeWidth: strokeWidth,\n size: size,\n highlighted: false\n });\n }\n var color = format && format.fill || fill;\n var defaults = {\n title: title,\n backgroundColor: color,\n content: content\n };\n if (tooltipFormat || tooltipRenderer) {\n var params = {\n datum: datum,\n xKey: xKey,\n xValue: xValue,\n xName: xName,\n yKey: yKey,\n yValue: yValue,\n yName: yName,\n title: title,\n color: color\n };\n if (tooltipFormat) {\n return toTooltipHtml({\n content: interpolate(tooltipFormat, params)\n }, defaults);\n }\n if (tooltipRenderer) {\n return toTooltipHtml(tooltipRenderer(params), defaults);\n }\n }\n return toTooltipHtml(defaults);\n };\n LineSeries.prototype.listSeriesItems = function (legendData) {\n var _a = this, id = _a.id, data = _a.data, xKey = _a.xKey, yKey = _a.yKey, yName = _a.yName, visible = _a.visible, title = _a.title, marker = _a.marker, stroke = _a.stroke, strokeOpacity = _a.strokeOpacity;\n if (data && data.length && xKey && yKey) {\n legendData.push({\n id: id,\n itemId: undefined,\n enabled: visible,\n label: {\n text: title || yName || yKey\n },\n marker: {\n shape: marker.shape,\n fill: marker.fill || 'rgba(0, 0, 0, 0)',\n stroke: marker.stroke || stroke || 'rgba(0, 0, 0, 0)',\n fillOpacity: 1,\n strokeOpacity: strokeOpacity\n }\n });\n }\n };\n LineSeries.className = 'LineSeries';\n LineSeries.type = 'line';\n __decorate([\n reactive('layoutChange')\n ], LineSeries.prototype, \"title\", void 0);\n __decorate([\n reactive('update')\n ], LineSeries.prototype, \"stroke\", void 0);\n __decorate([\n reactive('update')\n ], LineSeries.prototype, \"lineDash\", void 0);\n __decorate([\n reactive('update')\n ], LineSeries.prototype, \"lineDashOffset\", void 0);\n __decorate([\n reactive('update')\n ], LineSeries.prototype, \"strokeWidth\", void 0);\n __decorate([\n reactive('update')\n ], LineSeries.prototype, \"strokeOpacity\", void 0);\n __decorate([\n reactive('update')\n ], LineSeries.prototype, \"xName\", void 0);\n __decorate([\n reactive('update')\n ], LineSeries.prototype, \"yName\", void 0);\n return LineSeries;\n}(CartesianSeries));\nexport { LineSeries };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Selection } from \"../../../scene/selection\";\nimport { SeriesTooltip, Series } from \"../series\";\nimport { extent } from \"../../../util/array\";\nimport { LinearScale } from \"../../../scale/linearScale\";\nimport { reactive } from \"../../../util/observable\";\nimport { CartesianSeries, CartesianSeriesMarker } from \"./cartesianSeries\";\nimport { ChartAxisDirection } from \"../../chartAxis\";\nimport { getMarker } from \"../../marker/util\";\nimport { toTooltipHtml } from \"../../chart\";\nimport { ContinuousScale } from \"../../../scale/continuousScale\";\nimport { sanitizeHtml } from \"../../../util/sanitize\";\nimport { Label } from \"../../label\";\nimport { Text } from \"../../../scene/shape/text\";\nimport { HdpiCanvas } from \"../../../canvas/hdpiCanvas\";\nimport { isContinuous } from \"../../../util/value\";\nvar ScatterSeriesTooltip = /** @class */ (function (_super) {\n __extends(ScatterSeriesTooltip, _super);\n function ScatterSeriesTooltip() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n reactive('change')\n ], ScatterSeriesTooltip.prototype, \"renderer\", void 0);\n return ScatterSeriesTooltip;\n}(SeriesTooltip));\nexport { ScatterSeriesTooltip };\nvar ScatterSeries = /** @class */ (function (_super) {\n __extends(ScatterSeries, _super);\n function ScatterSeries() {\n var _this = _super.call(this) || this;\n _this.xDomain = [];\n _this.yDomain = [];\n _this.xData = [];\n _this.yData = [];\n _this.validData = [];\n _this.sizeData = [];\n _this.sizeScale = new LinearScale();\n _this.nodeData = [];\n _this.markerSelection = Selection.select(_this.pickGroup).selectAll();\n _this.labelSelection = Selection.select(_this.group).selectAll();\n _this.marker = new CartesianSeriesMarker();\n _this.label = new Label();\n _this._fill = '#c16068';\n _this._stroke = '#874349';\n _this._strokeWidth = 2;\n _this._fillOpacity = 1;\n _this._strokeOpacity = 1;\n _this.xKey = '';\n _this.yKey = '';\n _this.xName = '';\n _this.yName = '';\n _this.sizeName = 'Size';\n _this.labelName = 'Label';\n _this.tooltip = new ScatterSeriesTooltip();\n var _a = _this, marker = _a.marker, label = _a.label;\n marker.addPropertyListener('shape', _this.onMarkerShapeChange, _this);\n marker.addEventListener('change', _this.scheduleUpdate, _this);\n _this.addPropertyListener('xKey', function () { return _this.xData = []; });\n _this.addPropertyListener('yKey', function () { return _this.yData = []; });\n _this.addPropertyListener('sizeKey', function () { return _this.sizeData = []; });\n label.enabled = false;\n label.addEventListener('change', _this.scheduleUpdate, _this);\n label.addEventListener('dataChange', _this.scheduleData, _this);\n return _this;\n }\n Object.defineProperty(ScatterSeries.prototype, \"fill\", {\n get: function () {\n return this._fill;\n },\n /**\n * @deprecated Use {@link marker.fill} instead.\n */\n set: function (value) {\n if (this._fill !== value) {\n this._fill = value;\n this.scheduleUpdate();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ScatterSeries.prototype, \"stroke\", {\n get: function () {\n return this._stroke;\n },\n /**\n * @deprecated Use {@link marker.stroke} instead.\n */\n set: function (value) {\n if (this._stroke !== value) {\n this._stroke = value;\n this.scheduleUpdate();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ScatterSeries.prototype, \"strokeWidth\", {\n get: function () {\n return this._strokeWidth;\n },\n /**\n * @deprecated Use {@link marker.strokeWidth} instead.\n */\n set: function (value) {\n if (this._strokeWidth !== value) {\n this._strokeWidth = value;\n this.scheduleUpdate();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ScatterSeries.prototype, \"fillOpacity\", {\n get: function () {\n return this._fillOpacity;\n },\n /**\n * @deprecated Use {@link marker.fillOpacity} instead.\n */\n set: function (value) {\n if (this._fillOpacity !== value) {\n this._fillOpacity = value;\n this.scheduleUpdate();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ScatterSeries.prototype, \"strokeOpacity\", {\n get: function () {\n return this._strokeOpacity;\n },\n /**\n * @deprecated Use {@link marker.strokeOpacity} instead.\n */\n set: function (value) {\n if (this._strokeOpacity !== value) {\n this._strokeOpacity = value;\n this.scheduleUpdate();\n }\n },\n enumerable: true,\n configurable: true\n });\n ScatterSeries.prototype.onHighlightChange = function () {\n this.updateMarkerNodes();\n };\n ScatterSeries.prototype.onMarkerShapeChange = function () {\n this.markerSelection = this.markerSelection.setData([]);\n this.markerSelection.exit.remove();\n this.fireEvent({ type: 'legendChange' });\n };\n ScatterSeries.prototype.setColors = function (fills, strokes) {\n this.fill = fills[0];\n this.stroke = strokes[0];\n this.marker.fill = fills[0];\n this.marker.stroke = strokes[0];\n };\n ScatterSeries.prototype.processData = function () {\n var _this = this;\n var _a = this, xKey = _a.xKey, yKey = _a.yKey, sizeKey = _a.sizeKey, labelKey = _a.labelKey, xAxis = _a.xAxis, yAxis = _a.yAxis, marker = _a.marker, label = _a.label;\n if (!xAxis || !yAxis) {\n return false;\n }\n var data = xKey && yKey && this.data ? this.data : [];\n var xScale = xAxis.scale;\n var yScale = yAxis.scale;\n var isContinuousX = xScale instanceof ContinuousScale;\n var isContinuousY = yScale instanceof ContinuousScale;\n this.validData = data.filter(function (d) { return _this.checkDatum(d[xKey], isContinuousX) !== undefined && _this.checkDatum(d[yKey], isContinuousY) !== undefined; });\n this.xData = this.validData.map(function (d) { return d[xKey]; });\n this.yData = this.validData.map(function (d) { return d[yKey]; });\n this.sizeData = sizeKey ? this.validData.map(function (d) { return d[sizeKey]; }) : [];\n this.sizeScale.domain = marker.domain ? marker.domain : extent(this.sizeData, isContinuous) || [1, 1];\n if (xAxis.scale instanceof ContinuousScale) {\n this.xDomain = this.fixNumericExtent(extent(this.xData, isContinuous), 'x', xAxis);\n }\n else {\n this.xDomain = this.xData;\n }\n if (yAxis.scale instanceof ContinuousScale) {\n this.yDomain = this.fixNumericExtent(extent(this.yData, isContinuous), 'y', yAxis);\n }\n else {\n this.yDomain = this.yData;\n }\n return true;\n };\n ScatterSeries.prototype.getDomain = function (direction) {\n if (direction === ChartAxisDirection.X) {\n return this.xDomain;\n }\n else {\n return this.yDomain;\n }\n };\n ScatterSeries.prototype.getNodeData = function () {\n return this.nodeData;\n };\n ScatterSeries.prototype.getLabelData = function () {\n return this.nodeData;\n };\n ScatterSeries.prototype.fireNodeClickEvent = function (event, datum) {\n this.fireEvent({\n type: 'nodeClick',\n event: event,\n series: this,\n datum: datum.datum,\n xKey: this.xKey,\n yKey: this.yKey,\n sizeKey: this.sizeKey\n });\n };\n ScatterSeries.prototype.createNodeData = function () {\n var _a = this, chart = _a.chart, data = _a.data, visible = _a.visible, xAxis = _a.xAxis, yAxis = _a.yAxis, label = _a.label, labelKey = _a.labelKey;\n if (!(chart && data && visible && xAxis && yAxis) || chart.layoutPending || chart.dataPending) {\n return [];\n }\n var xScale = xAxis.scale;\n var yScale = yAxis.scale;\n var isContinuousX = xScale instanceof ContinuousScale;\n var isContinuousY = yScale instanceof ContinuousScale;\n var xOffset = (xScale.bandwidth || 0) / 2;\n var yOffset = (yScale.bandwidth || 0) / 2;\n var _b = this, xData = _b.xData, yData = _b.yData, validData = _b.validData, sizeData = _b.sizeData, sizeScale = _b.sizeScale, marker = _b.marker;\n var nodeData = [];\n sizeScale.range = [marker.size, marker.maxSize];\n var font = label.getFont();\n for (var i = 0; i < xData.length; i++) {\n var xy = this.checkDomainXY(xData[i], yData[i], isContinuousX, isContinuousY);\n if (!xy) {\n continue;\n }\n var x = xScale.convert(xy[0]) + xOffset;\n var y = yScale.convert(xy[1]) + yOffset;\n if (!this.checkRangeXY(x, y, xAxis, yAxis)) {\n continue;\n }\n var text = labelKey ? String(validData[i][labelKey]) : '';\n var size = HdpiCanvas.getTextSize(text, font);\n nodeData.push({\n series: this,\n datum: validData[i],\n point: { x: x, y: y },\n size: sizeData.length ? sizeScale.convert(sizeData[i]) : marker.size,\n label: __assign({ text: text }, size),\n });\n }\n return this.nodeData = nodeData;\n };\n ScatterSeries.prototype.update = function () {\n this.updatePending = false;\n this.updateSelections();\n this.updateNodes();\n };\n ScatterSeries.prototype.updateSelections = function () {\n if (!this.nodeDataPending) {\n return;\n }\n this.nodeDataPending = false;\n this.createNodeData();\n this.updateMarkerSelection();\n this.updateLabelSelection();\n };\n ScatterSeries.prototype.updateNodes = function () {\n this.group.visible = this.visible;\n this.updateMarkerNodes();\n this.updateLabelNodes();\n };\n ScatterSeries.prototype.updateLabelSelection = function () {\n var placedLabels = this.chart && this.chart.placeLabels().get(this) || [];\n var updateLabels = this.labelSelection.setData(placedLabels);\n updateLabels.exit.remove();\n var enterLabels = updateLabels.enter.append(Text);\n this.labelSelection = updateLabels.merge(enterLabels);\n };\n ScatterSeries.prototype.updateMarkerSelection = function () {\n var MarkerShape = getMarker(this.marker.shape);\n var updateMarkers = this.markerSelection.setData(this.nodeData);\n updateMarkers.exit.remove();\n var enterMarkers = updateMarkers.enter.append(MarkerShape);\n this.markerSelection = updateMarkers.merge(enterMarkers);\n };\n ScatterSeries.prototype.updateLabelNodes = function () {\n var label = this.label;\n this.labelSelection.each(function (text, datum) {\n text.text = datum.text;\n text.fill = label.color;\n text.x = datum.x;\n text.y = datum.y;\n text.fontStyle = label.fontStyle;\n text.fontWeight = label.fontWeight;\n text.fontSize = label.fontSize;\n text.fontFamily = label.fontFamily;\n text.textAlign = 'left';\n text.textBaseline = 'top';\n });\n };\n ScatterSeries.prototype.updateMarkerNodes = function () {\n var _this = this;\n if (!this.chart) {\n return;\n }\n var _a = this, marker = _a.marker, xKey = _a.xKey, yKey = _a.yKey, strokeWidth = _a.strokeWidth, fillOpacity = _a.fillOpacity, strokeOpacity = _a.strokeOpacity, seriesFill = _a.fill, seriesStroke = _a.stroke, highlightedDatum = _a.chart.highlightedDatum, sizeScale = _a.sizeScale, sizeData = _a.sizeData, _b = _a.highlightStyle, deprecatedFill = _b.fill, deprecatedStroke = _b.stroke, deprecatedStrokeWidth = _b.strokeWidth, _c = _b.item, _d = _c.fill, highlightedFill = _d === void 0 ? deprecatedFill : _d, _e = _c.stroke, highlightedStroke = _e === void 0 ? deprecatedStroke : _e, _f = _c.strokeWidth, highlightedDatumStrokeWidth = _f === void 0 ? deprecatedStrokeWidth : _f;\n var markerStrokeWidth = marker.strokeWidth !== undefined ? marker.strokeWidth : strokeWidth;\n var formatter = marker.formatter;\n sizeScale.range = [marker.size, marker.maxSize];\n this.markerSelection.each(function (node, datum, index) {\n var isDatumHighlighted = datum === highlightedDatum;\n var fill = isDatumHighlighted && highlightedFill !== undefined ? highlightedFill : marker.fill || seriesFill;\n var stroke = isDatumHighlighted && highlightedStroke !== undefined ? highlightedStroke : marker.stroke || seriesStroke;\n var strokeWidth = isDatumHighlighted && highlightedDatumStrokeWidth !== undefined\n ? highlightedDatumStrokeWidth\n : _this.getStrokeWidth(markerStrokeWidth, datum);\n var size = sizeData.length ? sizeScale.convert(sizeData[index]) : marker.size;\n var format = undefined;\n if (formatter) {\n format = formatter({\n datum: datum.datum,\n xKey: xKey,\n yKey: yKey,\n fill: fill,\n stroke: stroke,\n strokeWidth: strokeWidth,\n size: size,\n highlighted: isDatumHighlighted\n });\n }\n node.fill = format && format.fill || fill;\n node.stroke = format && format.stroke || stroke;\n node.strokeWidth = format && format.strokeWidth !== undefined\n ? format.strokeWidth\n : strokeWidth;\n node.size = format && format.size !== undefined\n ? format.size\n : size;\n node.fillOpacity = marker.fillOpacity !== undefined ? marker.fillOpacity : fillOpacity;\n node.strokeOpacity = marker.strokeOpacity !== undefined ? marker.strokeOpacity : strokeOpacity;\n node.translationX = datum.point.x;\n node.translationY = datum.point.y;\n node.opacity = _this.getOpacity(datum);\n node.zIndex = isDatumHighlighted ? Series.highlightedZIndex : index;\n node.visible = marker.enabled && node.size > 0;\n });\n };\n ScatterSeries.prototype.getTooltipHtml = function (nodeDatum) {\n var _a = this, xKey = _a.xKey, yKey = _a.yKey, xAxis = _a.xAxis, yAxis = _a.yAxis;\n if (!xKey || !yKey || !xAxis || !yAxis) {\n return '';\n }\n var _b = this, seriesFill = _b.fill, seriesStroke = _b.stroke, marker = _b.marker, tooltip = _b.tooltip, xName = _b.xName, yName = _b.yName, sizeKey = _b.sizeKey, sizeName = _b.sizeName, labelKey = _b.labelKey, labelName = _b.labelName;\n var fill = marker.fill || seriesFill;\n var stroke = marker.stroke || seriesStroke;\n var strokeWidth = this.getStrokeWidth(marker.strokeWidth || this.strokeWidth, nodeDatum);\n var formatter = this.marker.formatter;\n var format = undefined;\n if (formatter) {\n format = formatter({\n datum: nodeDatum,\n xKey: xKey,\n yKey: yKey,\n fill: fill,\n stroke: stroke,\n strokeWidth: strokeWidth,\n size: nodeDatum.size,\n highlighted: false\n });\n }\n var color = format && format.fill || fill || 'gray';\n var title = this.title || yName;\n var datum = nodeDatum.datum;\n var xValue = datum[xKey];\n var yValue = datum[yKey];\n var xString = sanitizeHtml(xAxis.formatDatum(xValue));\n var yString = sanitizeHtml(yAxis.formatDatum(yValue));\n var content = \"\" + sanitizeHtml(xName || xKey) + \": \" + xString + \"
\" +\n (\"\" + sanitizeHtml(yName || yKey) + \": \" + yString);\n if (sizeKey) {\n content += \"
\" + sanitizeHtml(sizeName || sizeKey) + \": \" + sanitizeHtml(datum[sizeKey]);\n }\n if (labelKey) {\n content = \"\" + sanitizeHtml(labelName || labelKey) + \": \" + sanitizeHtml(datum[labelKey]) + \"
\" + content;\n }\n var defaults = {\n title: title,\n backgroundColor: color,\n content: content\n };\n var tooltipRenderer = tooltip.renderer;\n if (tooltipRenderer) {\n return toTooltipHtml(tooltipRenderer({\n datum: datum,\n xKey: xKey,\n xValue: xValue,\n xName: xName,\n yKey: yKey,\n yValue: yValue,\n yName: yName,\n sizeKey: sizeKey,\n sizeName: sizeName,\n labelKey: labelKey,\n labelName: labelName,\n title: title,\n color: color\n }), defaults);\n }\n return toTooltipHtml(defaults);\n };\n ScatterSeries.prototype.listSeriesItems = function (legendData) {\n var _a = this, id = _a.id, data = _a.data, xKey = _a.xKey, yKey = _a.yKey, yName = _a.yName, title = _a.title, visible = _a.visible, marker = _a.marker, fill = _a.fill, stroke = _a.stroke, fillOpacity = _a.fillOpacity, strokeOpacity = _a.strokeOpacity;\n if (data && data.length && xKey && yKey) {\n legendData.push({\n id: id,\n itemId: undefined,\n enabled: visible,\n label: {\n text: title || yName || yKey\n },\n marker: {\n shape: marker.shape,\n fill: marker.fill || fill || 'rgba(0, 0, 0, 0)',\n stroke: marker.stroke || stroke || 'rgba(0, 0, 0, 0)',\n fillOpacity: marker.fillOpacity !== undefined ? marker.fillOpacity : fillOpacity,\n strokeOpacity: marker.strokeOpacity !== undefined ? marker.strokeOpacity : strokeOpacity\n }\n });\n }\n };\n ScatterSeries.className = 'ScatterSeries';\n ScatterSeries.type = 'scatter';\n __decorate([\n reactive('layoutChange')\n ], ScatterSeries.prototype, \"title\", void 0);\n __decorate([\n reactive('dataChange')\n ], ScatterSeries.prototype, \"xKey\", void 0);\n __decorate([\n reactive('dataChange')\n ], ScatterSeries.prototype, \"yKey\", void 0);\n __decorate([\n reactive('dataChange')\n ], ScatterSeries.prototype, \"sizeKey\", void 0);\n __decorate([\n reactive('dataChange')\n ], ScatterSeries.prototype, \"labelKey\", void 0);\n return ScatterSeries;\n}(CartesianSeries));\nexport { ScatterSeries };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Series } from \"../series\";\nimport { reactive } from \"../../../util/observable\";\nvar HierarchySeries = /** @class */ (function (_super) {\n __extends(HierarchySeries, _super);\n function HierarchySeries() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.data = undefined;\n return _this;\n }\n __decorate([\n reactive('dataChange')\n ], HierarchySeries.prototype, \"data\", void 0);\n return HierarchySeries;\n}(Series));\nexport { HierarchySeries };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Observable, reactive } from \"../util/observable\";\nvar DropShadow = /** @class */ (function (_super) {\n __extends(DropShadow, _super);\n function DropShadow() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.enabled = true;\n _this.color = 'rgba(0, 0, 0, 0.5)';\n _this.xOffset = 0;\n _this.yOffset = 0;\n _this.blur = 5;\n return _this;\n }\n __decorate([\n reactive('change')\n ], DropShadow.prototype, \"enabled\", void 0);\n __decorate([\n reactive('change')\n ], DropShadow.prototype, \"color\", void 0);\n __decorate([\n reactive('change')\n ], DropShadow.prototype, \"xOffset\", void 0);\n __decorate([\n reactive('change')\n ], DropShadow.prototype, \"yOffset\", void 0);\n __decorate([\n reactive('change')\n ], DropShadow.prototype, \"blur\", void 0);\n return DropShadow;\n}(Observable));\nexport { DropShadow };\n","function slice(parent, x0, y0, x1, y1) {\n var nodes = parent.children;\n var k = parent.value && (y1 - y0) / parent.value;\n nodes.forEach(function (node) {\n node.x0 = x0;\n node.x1 = x1;\n node.y0 = y0;\n node.y1 = y0 += node.value * k;\n });\n}\nfunction dice(parent, x0, y0, x1, y1) {\n var nodes = parent.children;\n var k = parent.value && (x1 - x0) / parent.value;\n nodes.forEach(function (node) {\n node.x0 = x0;\n node.x1 = x0 += node.value * k;\n node.y0 = y0;\n node.y1 = y1;\n });\n}\nfunction roundNode(node) {\n node.x0 = Math.round(node.x0);\n node.y0 = Math.round(node.y0);\n node.x1 = Math.round(node.x1);\n node.y1 = Math.round(node.y1);\n}\nexport function squarifyRatio(ratio, parent, x0, y0, x1, y1) {\n var rows = [];\n var nodes = parent.children;\n var n = nodes.length;\n var value = parent.value;\n var i0 = 0;\n var i1 = 0;\n var dx;\n var dy;\n var nodeValue;\n var sumValue;\n var minValue;\n var maxValue;\n var newRatio;\n var minRatio;\n var alpha;\n var beta;\n while (i0 < n) {\n dx = x1 - x0;\n dy = y1 - y0;\n // Find the next non-empty node.\n do {\n sumValue = nodes[i1++].value;\n } while (!sumValue && i1 < n);\n minValue = maxValue = sumValue;\n alpha = Math.max(dy / dx, dx / dy) / (value * ratio);\n beta = sumValue * sumValue * alpha;\n minRatio = Math.max(maxValue / beta, beta / minValue);\n // Keep adding nodes while the aspect ratio maintains or improves.\n for (; i1 < n; ++i1) {\n nodeValue = nodes[i1].value;\n sumValue += nodeValue;\n if (nodeValue < minValue) {\n minValue = nodeValue;\n }\n if (nodeValue > maxValue) {\n maxValue = nodeValue;\n }\n beta = sumValue * sumValue * alpha;\n newRatio = Math.max(maxValue / beta, beta / minValue);\n if (newRatio > minRatio) {\n sumValue -= nodeValue;\n break;\n }\n minRatio = newRatio;\n }\n // Position and record the row orientation.\n var row = {\n value: sumValue,\n dice: dx < dy,\n children: nodes.slice(i0, i1)\n };\n rows.push(row);\n if (row.dice) {\n dice(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1);\n }\n else {\n slice(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1);\n }\n value -= sumValue;\n i0 = i1;\n }\n return rows;\n}\nvar phi = (1 + Math.sqrt(5)) / 2;\nvar squarify = (function custom(ratio) {\n function squarify(parent, x0, y0, x1, y1) {\n squarifyRatio(ratio, parent, x0, y0, x1, y1);\n }\n squarify.ratio = function (x) { return custom((x = +x) > 1 ? x : 1); };\n return squarify;\n})(phi);\nvar Treemap = /** @class */ (function () {\n function Treemap() {\n this.paddingStack = [0];\n this.dx = 1;\n this.dy = 1;\n this.round = true;\n this.tile = squarify;\n this.paddingInner = function (_) { return 0; };\n this.paddingTop = function (_) { return 0; };\n this.paddingRight = function (_) { return 0; };\n this.paddingBottom = function (_) { return 0; };\n this.paddingLeft = function (_) { return 0; };\n }\n Object.defineProperty(Treemap.prototype, \"size\", {\n get: function () {\n return [this.dx, this.dy];\n },\n set: function (size) {\n this.dx = size[0];\n this.dy = size[1];\n },\n enumerable: true,\n configurable: true\n });\n Treemap.prototype.processData = function (root) {\n root.x0 = 0;\n root.y0 = 0;\n root.x1 = this.dx;\n root.y1 = this.dy;\n root.eachBefore(this.positionNode.bind(this));\n this.paddingStack = [0];\n if (this.round) {\n root.eachBefore(roundNode);\n }\n return root;\n };\n Treemap.prototype.positionNode = function (node) {\n var p = this.paddingStack[node.depth];\n var x0 = node.x0 + p;\n var y0 = node.y0 + p;\n var x1 = node.x1 - p;\n var y1 = node.y1 - p;\n if (x1 < x0) {\n x0 = x1 = (x0 + x1) / 2;\n }\n if (y1 < y0) {\n y0 = y1 = (y0 + y1) / 2;\n }\n node.x0 = x0;\n node.y0 = y0;\n node.x1 = x1;\n node.y1 = y1;\n if (node.children) {\n p = this.paddingStack[node.depth + 1] = this.paddingInner(node) / 2;\n x0 += this.paddingLeft(node) - p;\n y0 += this.paddingTop(node) - p;\n x1 -= this.paddingRight(node) - p;\n y1 -= this.paddingBottom(node) - p;\n if (x1 < x0) {\n x0 = x1 = (x0 + x1) / 2;\n }\n if (y1 < y0) {\n y0 = y1 = (y0 + y1) / 2;\n }\n this.tile(node, x0, y0, x1, y1);\n }\n };\n return Treemap;\n}());\nexport { Treemap };\n","var HierarchyNode = /** @class */ (function () {\n function HierarchyNode(datum) {\n this.value = 0;\n this.depth = 0;\n this.height = 0;\n this.parent = undefined;\n this.children = undefined;\n this.datum = datum;\n }\n HierarchyNode.prototype.countFn = function (node) {\n var sum = 0, children = node.children;\n if (!children || !children.length) {\n sum = 1;\n }\n else {\n var i = children.length;\n while (--i >= 0) {\n sum += children[i].value;\n }\n }\n node.value = sum;\n };\n HierarchyNode.prototype.count = function () {\n return this.eachAfter(this.countFn);\n };\n HierarchyNode.prototype.each = function (callback, scope) {\n var _this = this;\n var index = -1;\n this.iterator(function (node) {\n callback.call(scope, node, ++index, _this);\n });\n return this;\n };\n /**\n * Invokes the given callback for each node in post-order traversal.\n * @param callback\n * @param scope\n */\n HierarchyNode.prototype.eachAfter = function (callback, scope) {\n var node = this;\n var nodes = [node];\n var next = [];\n while (node = nodes.pop()) {\n next.push(node);\n var children = node.children;\n if (children) {\n for (var i = 0, n = children.length; i < n; ++i) {\n nodes.push(children[i]);\n }\n }\n }\n var index = -1;\n while (node = next.pop()) {\n callback.call(scope, node, ++index, this);\n }\n return this;\n };\n /**\n * Invokes the given callback for each node in pre-order traversal.\n * @param callback\n * @param scope\n */\n HierarchyNode.prototype.eachBefore = function (callback, scope) {\n var node = this;\n var nodes = [node];\n var index = -1;\n while (node = nodes.pop()) {\n callback.call(scope, node, ++index, this);\n var children = node.children;\n if (children) {\n for (var i = children.length - 1; i >= 0; --i) {\n var child = children[i];\n nodes.push(child);\n }\n }\n }\n return this;\n };\n HierarchyNode.prototype.find = function (callback, scope) {\n var _this = this;\n var index = -1;\n var result;\n this.iterator(function (node) {\n if (callback.call(scope, node, ++index, _this)) {\n result = node;\n return false;\n }\n });\n return result;\n };\n HierarchyNode.prototype.sum = function (value) {\n return this.eachAfter(function (node) {\n var sum = +value(node.datum) || 0;\n var children = node.children;\n if (children) {\n var i = children.length;\n while (--i >= 0) {\n sum += children[i].value;\n }\n }\n node.value = sum;\n });\n };\n HierarchyNode.prototype.sort = function (compare) {\n return this.eachBefore(function (node) {\n if (node.children) {\n node.children.sort(compare);\n }\n });\n };\n HierarchyNode.prototype.path = function (end) {\n var start = this;\n var ancestor = leastCommonAncestor(start, end);\n var nodes = [start];\n while (start !== ancestor) {\n start = start.parent;\n nodes.push(start);\n }\n var k = nodes.length;\n while (end !== ancestor) {\n nodes.splice(k, 0, end);\n end = end.parent;\n }\n // const otherBranch = [];\n // while (end !== ancestor) {\n // otherBranch.push(end);\n // end = end.parent;\n // }\n // nodes.concat(otherBranch.reverse());\n return nodes;\n };\n HierarchyNode.prototype.ancestors = function () {\n var node = this;\n var nodes = [node];\n while (node = node.parent) {\n nodes.push(node);\n }\n return nodes;\n };\n HierarchyNode.prototype.descendants = function () {\n var nodes = [];\n this.iterator(function (node) { return nodes.push(node); });\n return nodes;\n };\n HierarchyNode.prototype.leaves = function () {\n var leaves = [];\n this.eachBefore(function (node) {\n if (!node.children) {\n leaves.push(node);\n }\n });\n return leaves;\n };\n HierarchyNode.prototype.links = function () {\n var root = this;\n var links = [];\n root.each(function (node) {\n if (node !== root) { // Don’t include the root’s parent, if any.\n links.push({ source: node.parent, target: node });\n }\n });\n return links;\n };\n HierarchyNode.prototype.copy = function () {\n // TODO\n };\n HierarchyNode.prototype.iterator = function (callback) {\n var node = this;\n var next = [node];\n var current;\n doLoop: do {\n current = next.reverse();\n next = [];\n while (node = current.pop()) {\n if (callback(node) === false) {\n break doLoop;\n }\n var children = node.children;\n if (children) {\n for (var i = 0, n = children.length; i < n; ++i) {\n next.push(children[i]);\n }\n }\n }\n } while (next.length);\n };\n return HierarchyNode;\n}());\nexport { HierarchyNode };\nexport function hierarchy(data, children) {\n if (data instanceof Map) {\n data = [undefined, data];\n if (children === undefined) {\n children = mapChildren;\n }\n }\n else if (children === undefined) {\n children = objectChildren;\n }\n var root = new HierarchyNode(data);\n var nodes = [root];\n var node;\n var child, childs, i, n;\n while (node = nodes.pop()) {\n if ((childs = children(node.datum)) && (n = (childs = Array.from(childs)).length)) {\n node.children = childs;\n for (i = n - 1; i >= 0; --i) {\n nodes.push(child = childs[i] = new HierarchyNode(childs[i]));\n child.parent = node;\n child.depth = node.depth + 1;\n }\n }\n }\n return root.eachBefore(computeHeight);\n}\nfunction computeHeight(node) {\n var height = 0;\n do {\n node.height = height;\n } while ((node = node.parent) && (node.height < ++height));\n}\nfunction mapChildren(d) {\n return Array.isArray(d) ? d[1] : undefined;\n}\nfunction objectChildren(d) {\n return d.children;\n}\nfunction leastCommonAncestor(a, b) {\n if (!(a && b)) {\n return undefined;\n }\n if (a === b) {\n return a;\n }\n var aNodes = a.ancestors();\n var bNodes = b.ancestors();\n var c = undefined;\n a = aNodes.pop();\n b = bNodes.pop();\n while (a === b) {\n c = a;\n a = aNodes.pop();\n b = bNodes.pop();\n }\n return c;\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Selection } from \"../../../scene/selection\";\nimport { HdpiCanvas } from \"../../../canvas/hdpiCanvas\";\nimport { reactive } from \"../../../util/observable\";\nimport { Label } from \"../../label\";\nimport { SeriesTooltip } from \"../series\";\nimport { HierarchySeries } from \"./hierarchySeries\";\nimport { toTooltipHtml } from \"../../chart\";\nimport { Group } from \"../../../scene/group\";\nimport { Text } from \"../../../scene/shape/text\";\nimport { Rect } from \"../../../scene/shape/rect\";\nimport { DropShadow } from \"../../../scene/dropShadow\";\nimport { LinearScale } from \"../../../scale/linearScale\";\nimport { Treemap } from \"../../../layout/treemap\";\nimport { hierarchy } from \"../../../layout/hierarchy\";\nimport { toFixed } from \"../../../util/number\";\nvar TreemapSeriesTooltip = /** @class */ (function (_super) {\n __extends(TreemapSeriesTooltip, _super);\n function TreemapSeriesTooltip() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n reactive('change')\n ], TreemapSeriesTooltip.prototype, \"renderer\", void 0);\n return TreemapSeriesTooltip;\n}(SeriesTooltip));\nexport { TreemapSeriesTooltip };\nvar TreemapSeriesLabel = /** @class */ (function (_super) {\n __extends(TreemapSeriesLabel, _super);\n function TreemapSeriesLabel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.padding = 10;\n return _this;\n }\n __decorate([\n reactive('change')\n ], TreemapSeriesLabel.prototype, \"padding\", void 0);\n return TreemapSeriesLabel;\n}(Label));\nexport { TreemapSeriesLabel };\nvar TextNodeTag;\n(function (TextNodeTag) {\n TextNodeTag[TextNodeTag[\"Name\"] = 0] = \"Name\";\n TextNodeTag[TextNodeTag[\"Value\"] = 1] = \"Value\";\n})(TextNodeTag || (TextNodeTag = {}));\nvar TreemapSeries = /** @class */ (function (_super) {\n __extends(TreemapSeries, _super);\n function TreemapSeries() {\n var _this = _super.call(this) || this;\n _this.groupSelection = Selection.select(_this.pickGroup).selectAll();\n _this.labelMap = new Map();\n _this.layout = new Treemap();\n _this.title = (function () {\n var label = new TreemapSeriesLabel();\n label.color = 'white';\n label.fontWeight = 'bold';\n label.fontSize = 12;\n label.fontFamily = 'Verdana, sans-serif';\n label.padding = 15;\n return label;\n })();\n _this.subtitle = (function () {\n var label = new TreemapSeriesLabel();\n label.color = 'white';\n label.fontSize = 9;\n label.fontFamily = 'Verdana, sans-serif';\n label.padding = 13;\n return label;\n })();\n _this.labels = {\n large: (function () {\n var label = new Label();\n label.color = 'white';\n label.fontWeight = 'bold';\n label.fontSize = 18;\n return label;\n })(),\n medium: (function () {\n var label = new Label();\n label.color = 'white';\n label.fontWeight = 'bold';\n label.fontSize = 14;\n return label;\n })(),\n small: (function () {\n var label = new Label();\n label.color = 'white';\n label.fontWeight = 'bold';\n label.fontSize = 10;\n return label;\n })(),\n color: (function () {\n var label = new Label();\n label.color = 'white';\n return label;\n })()\n };\n _this._nodePadding = 2;\n _this.labelKey = 'label';\n _this.sizeKey = 'size';\n _this.colorKey = 'color';\n _this.colorDomain = [-5, 5];\n _this.colorRange = ['#cb4b3f', '#6acb64'];\n _this.colorParents = false;\n _this.gradient = true;\n _this.colorName = 'Change';\n _this.rootName = 'Root';\n _this._shadow = (function () {\n var shadow = new DropShadow();\n shadow.color = 'rgba(0, 0, 0, 0.4)';\n shadow.xOffset = 1.5;\n shadow.yOffset = 1.5;\n return shadow;\n })();\n _this.tooltip = new TreemapSeriesTooltip();\n _this.shadow.addEventListener('change', _this.scheduleUpdate, _this);\n _this.title.addEventListener('change', _this.scheduleUpdate, _this);\n _this.subtitle.addEventListener('change', _this.scheduleUpdate, _this);\n _this.labels.small.addEventListener('change', _this.scheduleUpdate, _this);\n _this.labels.medium.addEventListener('change', _this.scheduleUpdate, _this);\n _this.labels.large.addEventListener('change', _this.scheduleUpdate, _this);\n _this.labels.color.addEventListener('change', _this.scheduleUpdate, _this);\n return _this;\n }\n Object.defineProperty(TreemapSeries.prototype, \"nodePadding\", {\n get: function () {\n return this._nodePadding;\n },\n set: function (value) {\n if (this._nodePadding !== value) {\n this._nodePadding = value;\n this.updateLayoutPadding();\n this.scheduleUpdate();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TreemapSeries.prototype, \"shadow\", {\n get: function () {\n return this._shadow;\n },\n set: function (value) {\n if (this._shadow !== value) {\n this._shadow = value;\n this.scheduleUpdate();\n }\n },\n enumerable: true,\n configurable: true\n });\n TreemapSeries.prototype.onHighlightChange = function () {\n this.updateNodes();\n };\n TreemapSeries.prototype.updateLayoutPadding = function () {\n var _a = this, title = _a.title, subtitle = _a.subtitle, nodePadding = _a.nodePadding, labelKey = _a.labelKey;\n this.layout.paddingRight = function (_) { return nodePadding; };\n this.layout.paddingBottom = function (_) { return nodePadding; };\n this.layout.paddingLeft = function (_) { return nodePadding; };\n this.layout.paddingTop = function (node) {\n var name = node.datum[labelKey] || '';\n if (node.children) {\n name = name.toUpperCase();\n }\n var font = node.depth > 1 ? subtitle : title;\n var textSize = HdpiCanvas.getTextSize(name, [font.fontWeight, font.fontSize + 'px', font.fontFamily].join(' ').trim());\n var innerNodeWidth = node.x1 - node.x0 - nodePadding * 2;\n var hasTitle = node.depth > 0 && node.children && textSize.width <= innerNodeWidth;\n node.hasTitle = !!hasTitle;\n return hasTitle ? textSize.height + nodePadding * 2 : nodePadding;\n };\n };\n TreemapSeries.prototype.processData = function () {\n if (!this.data) {\n return false;\n }\n var _a = this, data = _a.data, sizeKey = _a.sizeKey, labelKey = _a.labelKey, colorKey = _a.colorKey, colorDomain = _a.colorDomain, colorRange = _a.colorRange, colorParents = _a.colorParents;\n var dataRoot;\n if (sizeKey) {\n dataRoot = hierarchy(data).sum(function (datum) { return datum.children ? 1 : datum[sizeKey]; });\n }\n else {\n dataRoot = hierarchy(data).sum(function (datum) { return datum.children ? 0 : 1; });\n }\n this.dataRoot = dataRoot;\n var colorScale = new LinearScale();\n colorScale.domain = colorDomain;\n colorScale.range = colorRange;\n var series = this;\n function traverse(root, depth) {\n if (depth === void 0) { depth = 0; }\n var children = root.children, datum = root.datum;\n var label = datum[labelKey];\n var colorValue = colorKey ? datum[colorKey] : depth;\n root.series = series;\n root.fill = !children || colorParents ? colorScale.convert(colorValue) : '#272931';\n root.colorValue = colorValue;\n if (label) {\n root.label = children ? label.toUpperCase() : label;\n }\n else {\n root.label = '';\n }\n if (children) {\n children.forEach(function (child) { return traverse(child, depth + 1); });\n }\n }\n traverse(this.dataRoot);\n return true;\n };\n TreemapSeries.prototype.getLabelCenterX = function (datum) {\n return (datum.x0 + datum.x1) / 2;\n };\n TreemapSeries.prototype.getLabelCenterY = function (datum) {\n return (datum.y0 + datum.y1) / 2 + 2;\n };\n TreemapSeries.prototype.update = function () {\n this.updatePending = false;\n this.updateSelections();\n this.updateNodes();\n };\n TreemapSeries.prototype.updateSelections = function () {\n if (!this.nodeDataPending) {\n return;\n }\n this.nodeDataPending = false;\n var _a = this, chart = _a.chart, dataRoot = _a.dataRoot;\n if (!chart || !dataRoot) {\n return;\n }\n var seriesRect = chart.getSeriesRect();\n if (!seriesRect) {\n return;\n }\n this.layout.size = [seriesRect.width, seriesRect.height];\n this.updateLayoutPadding();\n var descendants = this.layout.processData(dataRoot).descendants();\n var updateGroups = this.groupSelection.setData(descendants);\n updateGroups.exit.remove();\n var enterGroups = updateGroups.enter.append(Group);\n enterGroups.append(Rect);\n enterGroups.append(Text).each(function (node) { return node.tag = TextNodeTag.Name; });\n enterGroups.append(Text).each(function (node) { return node.tag = TextNodeTag.Value; });\n this.groupSelection = updateGroups.merge(enterGroups);\n };\n TreemapSeries.prototype.updateNodes = function () {\n var _this = this;\n if (!this.chart) {\n return;\n }\n var _a = this, colorKey = _a.colorKey, labelMap = _a.labelMap, nodePadding = _a.nodePadding, title = _a.title, subtitle = _a.subtitle, labels = _a.labels, shadow = _a.shadow, gradient = _a.gradient, highlightedDatum = _a.chart.highlightedDatum, _b = _a.highlightStyle, deprecatedFill = _b.fill, deprecatedStroke = _b.stroke, deprecatedStrokeWidth = _b.strokeWidth, _c = _b.item, _d = _c.fill, highlightedFill = _d === void 0 ? deprecatedFill : _d, _e = _c.stroke, highlightedStroke = _e === void 0 ? deprecatedStroke : _e, _f = _c.strokeWidth, highlightedDatumStrokeWidth = _f === void 0 ? deprecatedStrokeWidth : _f;\n this.groupSelection.selectByClass(Rect).each(function (rect, datum) {\n var isDatumHighlighted = datum === highlightedDatum;\n var fill = isDatumHighlighted && highlightedFill !== undefined ? highlightedFill : datum.fill;\n var stroke = isDatumHighlighted && highlightedStroke !== undefined ? highlightedStroke : datum.depth < 2 ? undefined : 'black';\n var strokeWidth = isDatumHighlighted && highlightedDatumStrokeWidth !== undefined\n ? highlightedDatumStrokeWidth\n : _this.getStrokeWidth(1, datum);\n rect.fill = fill;\n rect.stroke = stroke;\n rect.strokeWidth = strokeWidth;\n rect.crisp = true;\n rect.gradient = gradient;\n rect.x = datum.x0;\n rect.y = datum.y0;\n rect.width = datum.x1 - datum.x0;\n rect.height = datum.y1 - datum.y0;\n });\n this.groupSelection.selectByTag(TextNodeTag.Name).each(function (text, datum, index) {\n var isLeaf = !datum.children;\n var innerNodeWidth = datum.x1 - datum.x0 - nodePadding * 2;\n var innerNodeHeight = datum.y1 - datum.y0 - nodePadding * 2;\n var hasTitle = datum.hasTitle;\n var highlighted = datum === highlightedDatum;\n var label;\n if (isLeaf) {\n if (innerNodeWidth > 40 && innerNodeHeight > 40) {\n label = labels.large;\n }\n else if (innerNodeWidth > 20 && innerNodeHeight > 20) {\n label = labels.medium;\n }\n else {\n label = labels.small;\n }\n }\n else {\n if (datum.depth > 1) {\n label = subtitle;\n }\n else {\n label = title;\n }\n }\n text.fontWeight = label.fontWeight;\n text.fontSize = label.fontSize;\n text.fontFamily = label.fontFamily;\n text.textBaseline = isLeaf ? 'bottom' : (hasTitle ? 'top' : 'middle');\n text.textAlign = hasTitle ? 'left' : 'center';\n text.text = datum.label;\n var textBBox = text.computeBBox();\n var hasLabel = isLeaf && !!textBBox\n && textBBox.width <= innerNodeWidth\n && textBBox.height * 2 + 8 <= innerNodeHeight;\n labelMap.set(index, text);\n text.fill = highlighted ? 'black' : label.color;\n text.fillShadow = hasLabel && !highlighted ? shadow : undefined;\n text.visible = hasTitle || hasLabel;\n if (hasTitle) {\n text.x = datum.x0 + nodePadding;\n text.y = datum.y0 + nodePadding;\n }\n else {\n text.x = _this.getLabelCenterX(datum);\n text.y = _this.getLabelCenterY(datum);\n }\n });\n this.groupSelection.selectByTag(TextNodeTag.Value).each(function (text, datum, index) {\n var isLeaf = !datum.children;\n var innerNodeWidth = datum.x1 - datum.x0 - nodePadding * 2;\n var highlighted = datum === highlightedDatum;\n var value = datum.colorValue;\n var label = labels.color;\n text.fontSize = label.fontSize;\n text.fontFamily = label.fontFamily;\n text.fontStyle = label.fontStyle;\n text.fontWeight = label.fontWeight;\n text.textBaseline = 'top';\n text.textAlign = 'center';\n text.text = typeof value === 'number' && isFinite(value)\n ? String(toFixed(datum.colorValue)) + '%'\n : '';\n var textBBox = text.computeBBox();\n var nameNode = labelMap.get(index);\n var hasLabel = !!nameNode && nameNode.visible;\n var isVisible = isLeaf && !!colorKey && hasLabel && !!textBBox && textBBox.width < innerNodeWidth;\n text.fill = highlighted ? 'black' : label.color;\n text.fillShadow = highlighted ? undefined : shadow;\n text.visible = isVisible;\n if (isVisible) {\n text.x = _this.getLabelCenterX(datum);\n text.y = _this.getLabelCenterY(datum);\n }\n else {\n if (nameNode && !(datum.children && datum.children.length)) {\n nameNode.textBaseline = 'middle';\n nameNode.y = _this.getLabelCenterY(datum);\n }\n }\n });\n };\n TreemapSeries.prototype.getDomain = function (direction) {\n return [0, 1];\n };\n TreemapSeries.prototype.fireNodeClickEvent = function (event, datum) {\n this.fireEvent({\n type: 'nodeClick',\n event: event,\n series: this,\n datum: datum.datum,\n labelKey: this.labelKey,\n sizeKey: this.sizeKey,\n colorKey: this.colorKey\n });\n };\n TreemapSeries.prototype.getTooltipHtml = function (nodeDatum) {\n var _a = this, tooltip = _a.tooltip, sizeKey = _a.sizeKey, labelKey = _a.labelKey, colorKey = _a.colorKey, colorName = _a.colorName, rootName = _a.rootName;\n var datum = nodeDatum.datum;\n var tooltipRenderer = tooltip.renderer;\n var title = nodeDatum.depth ? datum[labelKey] : (rootName || datum[labelKey]);\n var content = undefined;\n var color = nodeDatum.fill || 'gray';\n if (colorKey && colorName) {\n var colorValue = datum[colorKey];\n if (typeof colorValue === 'number' && isFinite(colorValue)) {\n content = \"\" + colorName + \": \" + toFixed(datum[colorKey]);\n }\n }\n var defaults = {\n title: title,\n backgroundColor: color,\n content: content\n };\n if (tooltipRenderer) {\n return toTooltipHtml(tooltipRenderer({\n datum: nodeDatum,\n sizeKey: sizeKey,\n labelKey: labelKey,\n colorKey: colorKey,\n title: title,\n color: color\n }), defaults);\n }\n return toTooltipHtml(defaults);\n };\n TreemapSeries.prototype.listSeriesItems = function (legendData) {\n };\n TreemapSeries.className = 'TreemapSeries';\n TreemapSeries.type = 'treemap';\n __decorate([\n reactive('dataChange')\n ], TreemapSeries.prototype, \"labelKey\", void 0);\n __decorate([\n reactive('dataChange')\n ], TreemapSeries.prototype, \"sizeKey\", void 0);\n __decorate([\n reactive('dataChange')\n ], TreemapSeries.prototype, \"colorKey\", void 0);\n __decorate([\n reactive('dataChange')\n ], TreemapSeries.prototype, \"colorDomain\", void 0);\n __decorate([\n reactive('dataChange')\n ], TreemapSeries.prototype, \"colorRange\", void 0);\n __decorate([\n reactive('dataChange')\n ], TreemapSeries.prototype, \"colorParents\", void 0);\n __decorate([\n reactive('update')\n ], TreemapSeries.prototype, \"gradient\", void 0);\n return TreemapSeries;\n}(HierarchySeries));\nexport { TreemapSeries };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n};\nimport { Group } from \"../../../scene/group\";\nimport { Line } from \"../../../scene/shape/line\";\nimport { Text } from \"../../../scene/shape/text\";\nimport { Selection } from \"../../../scene/selection\";\nimport { LinearScale } from \"../../../scale/linearScale\";\nimport { Sector } from \"../../../scene/shape/sector\";\nimport { HighlightStyle, SeriesTooltip } from \"./../series\";\nimport { Label } from \"../../label\";\nimport { PointerEvents } from \"../../../scene/node\";\nimport { normalizeAngle180, toRadians } from \"../../../util/angle\";\nimport { toFixed, mod } from \"../../../util/number\";\nimport { Caption } from \"../../../caption\";\nimport { reactive, Observable } from \"../../../util/observable\";\nimport { PolarSeries } from \"./polarSeries\";\nimport { ChartAxisDirection } from \"../../chartAxis\";\nimport { toTooltipHtml } from \"../../chart\";\nvar PieHighlightStyle = /** @class */ (function (_super) {\n __extends(PieHighlightStyle, _super);\n function PieHighlightStyle() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return PieHighlightStyle;\n}(HighlightStyle));\nvar PieNodeTag;\n(function (PieNodeTag) {\n PieNodeTag[PieNodeTag[\"Sector\"] = 0] = \"Sector\";\n PieNodeTag[PieNodeTag[\"Callout\"] = 1] = \"Callout\";\n PieNodeTag[PieNodeTag[\"Label\"] = 2] = \"Label\";\n})(PieNodeTag || (PieNodeTag = {}));\nvar PieSeriesLabel = /** @class */ (function (_super) {\n __extends(PieSeriesLabel, _super);\n function PieSeriesLabel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.offset = 3; // from the callout line\n _this.minAngle = 20; // in degrees\n return _this;\n }\n __decorate([\n reactive('change')\n ], PieSeriesLabel.prototype, \"offset\", void 0);\n __decorate([\n reactive('dataChange')\n ], PieSeriesLabel.prototype, \"minAngle\", void 0);\n __decorate([\n reactive('dataChange')\n ], PieSeriesLabel.prototype, \"formatter\", void 0);\n return PieSeriesLabel;\n}(Label));\nvar PieSeriesCallout = /** @class */ (function (_super) {\n __extends(PieSeriesCallout, _super);\n function PieSeriesCallout() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.colors = [\n '#874349',\n '#718661',\n '#a48f5f',\n '#5a7088',\n '#7f637a',\n '#5d8692'\n ];\n _this.length = 10;\n _this.strokeWidth = 1;\n return _this;\n }\n __decorate([\n reactive('change')\n ], PieSeriesCallout.prototype, \"colors\", void 0);\n __decorate([\n reactive('change')\n ], PieSeriesCallout.prototype, \"length\", void 0);\n __decorate([\n reactive('change')\n ], PieSeriesCallout.prototype, \"strokeWidth\", void 0);\n return PieSeriesCallout;\n}(Observable));\nvar PieSeriesTooltip = /** @class */ (function (_super) {\n __extends(PieSeriesTooltip, _super);\n function PieSeriesTooltip() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n reactive('change')\n ], PieSeriesTooltip.prototype, \"renderer\", void 0);\n return PieSeriesTooltip;\n}(SeriesTooltip));\nexport { PieSeriesTooltip };\nvar PieTitle = /** @class */ (function (_super) {\n __extends(PieTitle, _super);\n function PieTitle() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.showInLegend = false;\n return _this;\n }\n __decorate([\n reactive()\n ], PieTitle.prototype, \"showInLegend\", void 0);\n return PieTitle;\n}(Caption));\nexport { PieTitle };\nvar PieSeries = /** @class */ (function (_super) {\n __extends(PieSeries, _super);\n function PieSeries() {\n var _this = _super.call(this) || this;\n _this.radiusScale = new LinearScale();\n _this.groupSelection = Selection.select(_this.pickGroup).selectAll();\n /**\n * The processed data that gets visualized.\n */\n _this.groupSelectionData = [];\n _this.angleScale = (function () {\n var scale = new LinearScale();\n // Each slice is a ratio of the whole, where all ratios add up to 1.\n scale.domain = [0, 1];\n // Add 90 deg to start the first pie at 12 o'clock.\n scale.range = [-Math.PI, Math.PI].map(function (angle) { return angle + Math.PI / 2; });\n return scale;\n })();\n // When a user toggles a series item (e.g. from the legend), its boolean state is recorded here.\n _this.seriesItemEnabled = [];\n _this.label = new PieSeriesLabel();\n _this.callout = new PieSeriesCallout();\n _this.tooltip = new PieSeriesTooltip();\n /**\n * The key of the numeric field to use to determine the angle (for example,\n * a pie slice angle).\n */\n _this.angleKey = '';\n _this.angleName = '';\n _this._fills = [\n '#c16068',\n '#a2bf8a',\n '#ebcc87',\n '#80a0c3',\n '#b58dae',\n '#85c0d1'\n ];\n _this._strokes = [\n '#874349',\n '#718661',\n '#a48f5f',\n '#5a7088',\n '#7f637a',\n '#5d8692'\n ];\n _this.fillOpacity = 1;\n _this.strokeOpacity = 1;\n _this.lineDash = [0];\n _this.lineDashOffset = 0;\n /**\n * The series rotation in degrees.\n */\n _this.rotation = 0;\n _this.outerRadiusOffset = 0;\n _this.innerRadiusOffset = 0;\n _this.strokeWidth = 1;\n _this.highlightStyle = new PieHighlightStyle();\n _this.addEventListener('update', _this.scheduleUpdate, _this);\n _this.label.addEventListener('change', _this.scheduleUpdate, _this);\n _this.label.addEventListener('dataChange', _this.scheduleData, _this);\n _this.callout.addEventListener('change', _this.scheduleLayout, _this);\n _this.addPropertyListener('data', function (event) {\n if (event.value) {\n event.source.seriesItemEnabled = event.value.map(function () { return true; });\n }\n });\n return _this;\n }\n Object.defineProperty(PieSeries.prototype, \"title\", {\n get: function () {\n return this._title;\n },\n set: function (value) {\n var oldTitle = this._title;\n function updateLegend() {\n this.fireEvent({ type: 'legendChange' });\n }\n if (oldTitle !== value) {\n if (oldTitle) {\n oldTitle.removeEventListener('change', this.scheduleUpdate, this);\n oldTitle.removePropertyListener('showInLegend', updateLegend, this);\n this.group.removeChild(oldTitle.node);\n }\n if (value) {\n value.node.textBaseline = 'bottom';\n value.addEventListener('change', this.scheduleUpdate, this);\n value.addPropertyListener('showInLegend', updateLegend, this);\n this.group.appendChild(value.node);\n }\n this._title = value;\n this.scheduleUpdate();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PieSeries.prototype, \"fills\", {\n get: function () {\n return this._fills;\n },\n set: function (values) {\n this._fills = values;\n this.scheduleUpdate();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PieSeries.prototype, \"strokes\", {\n get: function () {\n return this._strokes;\n },\n set: function (values) {\n this._strokes = values;\n this.scheduleUpdate();\n },\n enumerable: true,\n configurable: true\n });\n PieSeries.prototype.onHighlightChange = function () {\n this.updateNodes();\n };\n PieSeries.prototype.setColors = function (fills, strokes) {\n this.fills = fills;\n this.strokes = strokes;\n this.callout.colors = strokes;\n };\n PieSeries.prototype.getDomain = function (direction) {\n if (direction === ChartAxisDirection.X) {\n return this.angleScale.domain;\n }\n else {\n return this.radiusScale.domain;\n }\n };\n PieSeries.prototype.processData = function () {\n var _this = this;\n var _a = this, angleKey = _a.angleKey, radiusKey = _a.radiusKey, seriesItemEnabled = _a.seriesItemEnabled, angleScale = _a.angleScale, groupSelectionData = _a.groupSelectionData, label = _a.label;\n var data = angleKey && this.data ? this.data : [];\n var angleData = data.map(function (datum, index) { return seriesItemEnabled[index] && Math.abs(+datum[angleKey]) || 0; });\n var angleDataTotal = angleData.reduce(function (a, b) { return a + b; }, 0);\n // The ratios (in [0, 1] interval) used to calculate the end angle value for every pie slice.\n // Each slice starts where the previous one ends, so we only keep the ratios for end angles.\n var angleDataRatios = (function () {\n var sum = 0;\n return angleData.map(function (datum) { return sum += datum / angleDataTotal; });\n })();\n var labelFormatter = label.formatter;\n var labelKey = label.enabled && this.labelKey;\n var labelData = [];\n var radiusData = [];\n if (labelKey) {\n if (labelFormatter) {\n labelData = data.map(function (datum) { return labelFormatter({ value: datum[labelKey] }); });\n }\n else {\n labelData = data.map(function (datum) { return String(datum[labelKey]); });\n }\n }\n if (radiusKey) {\n var _b = this, radiusMin = _b.radiusMin, radiusMax = _b.radiusMax;\n var radii = data.map(function (datum) { return Math.abs(datum[radiusKey]); });\n var min_1 = radiusMin !== undefined ? radiusMin : Math.min.apply(Math, __spread(radii));\n var max = radiusMax !== undefined ? radiusMax : Math.max.apply(Math, __spread(radii));\n var delta_1 = max - min_1;\n radiusData = radii.map(function (value) { return delta_1 ? (value - min_1) / delta_1 : 1; });\n }\n groupSelectionData.length = 0;\n var rotation = toRadians(this.rotation);\n var halfPi = Math.PI / 2;\n var datumIndex = 0;\n var quadrantTextOpts = [\n { textAlign: 'center', textBaseline: 'bottom' },\n { textAlign: 'left', textBaseline: 'middle' },\n { textAlign: 'center', textBaseline: 'hanging' },\n { textAlign: 'right', textBaseline: 'middle' },\n ];\n // Process segments.\n var end = 0;\n angleDataRatios.forEach(function (start) {\n if (isNaN(start)) {\n return;\n } // No segments displayed - nothing to do.\n var radius = radiusKey ? radiusData[datumIndex] : 1;\n var startAngle = angleScale.convert(start) + rotation;\n var endAngle = angleScale.convert(end) + rotation;\n var midAngle = (startAngle + endAngle) / 2;\n var span = Math.abs(endAngle - startAngle);\n var midCos = Math.cos(midAngle);\n var midSin = Math.sin(midAngle);\n var labelMinAngle = toRadians(label.minAngle);\n var labelVisible = labelKey && span > labelMinAngle;\n var midAngle180 = normalizeAngle180(midAngle);\n // Split the circle into quadrants like so: ⊗\n var quadrantStart = -3 * Math.PI / 4; // same as `normalizeAngle180(toRadians(-135))`\n var quadrantOffset = midAngle180 - quadrantStart;\n var quadrant = Math.floor(quadrantOffset / halfPi);\n var quadrantIndex = mod(quadrant, quadrantTextOpts.length);\n var _a = quadrantTextOpts[quadrantIndex], textAlign = _a.textAlign, textBaseline = _a.textBaseline;\n groupSelectionData.push({\n series: _this,\n datum: data[datumIndex],\n itemId: datumIndex,\n index: datumIndex,\n radius: radius,\n startAngle: startAngle,\n endAngle: endAngle,\n midAngle: midAngle,\n midCos: midCos,\n midSin: midSin,\n label: labelVisible ? {\n text: labelData[datumIndex],\n textAlign: textAlign,\n textBaseline: textBaseline\n } : undefined\n });\n datumIndex++;\n end = start; // Update for next iteration.\n });\n return true;\n };\n PieSeries.prototype.update = function () {\n this.updatePending = false;\n var _a = this, radius = _a.radius, innerRadiusOffset = _a.innerRadiusOffset, outerRadiusOffset = _a.outerRadiusOffset, title = _a.title;\n this.radiusScale.range = [\n innerRadiusOffset ? radius + innerRadiusOffset : 0,\n radius + (outerRadiusOffset || 0)\n ];\n this.group.translationX = this.centerX;\n this.group.translationY = this.centerY;\n if (title) {\n var outerRadius = Math.max(0, this.radiusScale.range[1]);\n if (outerRadius === 0) {\n title.node.visible = false;\n }\n else {\n title.node.translationY = -radius - outerRadiusOffset - 2;\n title.node.visible = title.enabled;\n }\n }\n this.updateSelections();\n this.updateNodes();\n };\n PieSeries.prototype.updateSelections = function () {\n if (!this.nodeDataPending) {\n return;\n }\n this.nodeDataPending = false;\n this.updateGroupSelection();\n };\n PieSeries.prototype.updateGroupSelection = function () {\n var updateGroups = this.groupSelection.setData(this.groupSelectionData);\n updateGroups.exit.remove();\n var enterGroups = updateGroups.enter.append(Group);\n enterGroups.append(Sector).each(function (node) { return node.tag = PieNodeTag.Sector; });\n enterGroups.append(Line).each(function (node) {\n node.tag = PieNodeTag.Callout;\n node.pointerEvents = PointerEvents.None;\n });\n enterGroups.append(Text).each(function (node) {\n node.tag = PieNodeTag.Label;\n node.pointerEvents = PointerEvents.None;\n });\n this.groupSelection = updateGroups.merge(enterGroups);\n };\n PieSeries.prototype.updateNodes = function () {\n var _this = this;\n if (!this.chart) {\n return;\n }\n this.group.visible = this.visible && this.seriesItemEnabled.indexOf(true) >= 0;\n var _a = this, fills = _a.fills, strokes = _a.strokes, fillOpacity = _a.fillOpacity, strokeOpacity = _a.strokeOpacity, radiusScale = _a.radiusScale, callout = _a.callout, shadow = _a.shadow, highlightedDatum = _a.chart.highlightedDatum, _b = _a.highlightStyle, deprecatedFill = _b.fill, deprecatedStroke = _b.stroke, deprecatedStrokeWidth = _b.strokeWidth, _c = _b.item, _d = _c.fill, highlightedFill = _d === void 0 ? deprecatedFill : _d, _e = _c.stroke, highlightedStroke = _e === void 0 ? deprecatedStroke : _e, _f = _c.strokeWidth, highlightedDatumStrokeWidth = _f === void 0 ? deprecatedStrokeWidth : _f, angleKey = _a.angleKey, radiusKey = _a.radiusKey, formatter = _a.formatter;\n var centerOffsets = [];\n var innerRadius = radiusScale.convert(0);\n this.groupSelection.selectByTag(PieNodeTag.Sector).each(function (sector, datum, index) {\n var radius = radiusScale.convert(datum.radius);\n var isDatumHighlighted = !!highlightedDatum && highlightedDatum.series === _this && datum.itemId === highlightedDatum.itemId;\n var fill = isDatumHighlighted && highlightedFill !== undefined ? highlightedFill : fills[index % fills.length];\n var stroke = isDatumHighlighted && highlightedStroke !== undefined ? highlightedStroke : strokes[index % strokes.length];\n var strokeWidth = isDatumHighlighted && highlightedDatumStrokeWidth !== undefined\n ? highlightedDatumStrokeWidth\n : _this.getStrokeWidth(_this.strokeWidth);\n var format = undefined;\n if (formatter) {\n format = formatter({\n datum: datum.datum,\n angleKey: angleKey,\n radiusKey: radiusKey,\n fill: fill,\n stroke: stroke,\n strokeWidth: strokeWidth,\n highlighted: isDatumHighlighted\n });\n }\n // Bring highlighted slice's parent group to front.\n var parent = sector.parent && sector.parent.parent;\n if (isDatumHighlighted && parent) {\n parent.removeChild(sector.parent);\n parent.appendChild(sector.parent);\n }\n sector.innerRadius = Math.max(0, innerRadius);\n sector.outerRadius = Math.max(0, radius);\n sector.startAngle = datum.startAngle;\n sector.endAngle = datum.endAngle;\n sector.fill = format && format.fill || fill;\n sector.stroke = format && format.stroke || stroke;\n sector.strokeWidth = format && format.strokeWidth !== undefined ? format.strokeWidth : strokeWidth;\n sector.fillOpacity = fillOpacity;\n sector.strokeOpacity = strokeOpacity;\n sector.lineDash = _this.lineDash;\n sector.lineDashOffset = _this.lineDashOffset;\n sector.fillShadow = shadow;\n sector.lineJoin = 'round';\n sector.opacity = _this.getOpacity();\n centerOffsets.push(sector.centerOffset);\n });\n var calloutColors = callout.colors, calloutLength = callout.length, calloutStrokeWidth = callout.strokeWidth;\n this.groupSelection.selectByTag(PieNodeTag.Callout).each(function (line, datum, index) {\n var radius = radiusScale.convert(datum.radius);\n var outerRadius = Math.max(0, radius);\n if (datum.label && outerRadius !== 0) {\n line.strokeWidth = calloutStrokeWidth;\n line.stroke = calloutColors[index % calloutColors.length];\n line.x1 = datum.midCos * outerRadius;\n line.y1 = datum.midSin * outerRadius;\n line.x2 = datum.midCos * (outerRadius + calloutLength);\n line.y2 = datum.midSin * (outerRadius + calloutLength);\n }\n else {\n line.stroke = undefined;\n }\n });\n {\n var _g = this.label, offset_1 = _g.offset, fontStyle_1 = _g.fontStyle, fontWeight_1 = _g.fontWeight, fontSize_1 = _g.fontSize, fontFamily_1 = _g.fontFamily, color_1 = _g.color;\n this.groupSelection.selectByTag(PieNodeTag.Label).each(function (text, datum, index) {\n var label = datum.label;\n var radius = radiusScale.convert(datum.radius);\n var outerRadius = Math.max(0, radius);\n if (label && outerRadius !== 0) {\n var labelRadius = centerOffsets[index] + outerRadius + calloutLength + offset_1;\n text.fontStyle = fontStyle_1;\n text.fontWeight = fontWeight_1;\n text.fontSize = fontSize_1;\n text.fontFamily = fontFamily_1;\n text.text = label.text;\n text.x = datum.midCos * labelRadius;\n text.y = datum.midSin * labelRadius;\n text.fill = color_1;\n text.textAlign = label.textAlign;\n text.textBaseline = label.textBaseline;\n }\n else {\n text.fill = undefined;\n }\n });\n }\n };\n PieSeries.prototype.fireNodeClickEvent = function (event, datum) {\n this.fireEvent({\n type: 'nodeClick',\n event: event,\n series: this,\n datum: datum.datum,\n angleKey: this.angleKey,\n labelKey: this.labelKey,\n radiusKey: this.radiusKey\n });\n };\n PieSeries.prototype.getTooltipHtml = function (nodeDatum) {\n var angleKey = this.angleKey;\n if (!angleKey) {\n return '';\n }\n var _a = this, fills = _a.fills, tooltip = _a.tooltip, angleName = _a.angleName, radiusKey = _a.radiusKey, radiusName = _a.radiusName, labelKey = _a.labelKey, labelName = _a.labelName;\n var tooltipRenderer = tooltip.renderer;\n var color = fills[nodeDatum.index % fills.length];\n var datum = nodeDatum.datum;\n var label = labelKey ? datum[labelKey] + \": \" : '';\n var angleValue = datum[angleKey];\n var formattedAngleValue = typeof angleValue === 'number' ? toFixed(angleValue) : angleValue.toString();\n var title = this.title ? this.title.text : undefined;\n var content = label + formattedAngleValue;\n var defaults = {\n title: title,\n backgroundColor: color,\n content: content\n };\n if (tooltipRenderer) {\n return toTooltipHtml(tooltipRenderer({\n datum: datum,\n angleKey: angleKey,\n angleValue: angleValue,\n angleName: angleName,\n radiusKey: radiusKey,\n radiusValue: radiusKey ? datum[radiusKey] : undefined,\n radiusName: radiusName,\n labelKey: labelKey,\n labelName: labelName,\n title: title,\n color: color,\n }), defaults);\n }\n return toTooltipHtml(defaults);\n };\n PieSeries.prototype.listSeriesItems = function (legendData) {\n var _this = this;\n var _a = this, labelKey = _a.labelKey, data = _a.data;\n if (data && data.length && labelKey) {\n var _b = this, fills_1 = _b.fills, strokes_1 = _b.strokes, id_1 = _b.id;\n var titleText_1 = this.title && this.title.showInLegend && this.title.text;\n data.forEach(function (datum, index) {\n var labelParts = [];\n titleText_1 && labelParts.push(titleText_1);\n labelParts.push(String(datum[labelKey]));\n legendData.push({\n id: id_1,\n itemId: index,\n enabled: _this.seriesItemEnabled[index],\n label: {\n text: labelParts.join(' - ')\n },\n marker: {\n fill: fills_1[index % fills_1.length],\n stroke: strokes_1[index % strokes_1.length],\n fillOpacity: _this.fillOpacity,\n strokeOpacity: _this.strokeOpacity\n }\n });\n });\n }\n };\n PieSeries.prototype.toggleSeriesItem = function (itemId, enabled) {\n this.seriesItemEnabled[itemId] = enabled;\n this.scheduleData();\n };\n PieSeries.className = 'PieSeries';\n PieSeries.type = 'pie';\n __decorate([\n reactive('dataChange')\n ], PieSeries.prototype, \"angleKey\", void 0);\n __decorate([\n reactive('update')\n ], PieSeries.prototype, \"angleName\", void 0);\n __decorate([\n reactive('dataChange')\n ], PieSeries.prototype, \"radiusKey\", void 0);\n __decorate([\n reactive('update')\n ], PieSeries.prototype, \"radiusName\", void 0);\n __decorate([\n reactive('dataChange')\n ], PieSeries.prototype, \"radiusMin\", void 0);\n __decorate([\n reactive('dataChange')\n ], PieSeries.prototype, \"radiusMax\", void 0);\n __decorate([\n reactive('dataChange')\n ], PieSeries.prototype, \"labelKey\", void 0);\n __decorate([\n reactive('update')\n ], PieSeries.prototype, \"labelName\", void 0);\n __decorate([\n reactive('layoutChange')\n ], PieSeries.prototype, \"fillOpacity\", void 0);\n __decorate([\n reactive('layoutChange')\n ], PieSeries.prototype, \"strokeOpacity\", void 0);\n __decorate([\n reactive('update')\n ], PieSeries.prototype, \"lineDash\", void 0);\n __decorate([\n reactive('update')\n ], PieSeries.prototype, \"lineDashOffset\", void 0);\n __decorate([\n reactive('update')\n ], PieSeries.prototype, \"formatter\", void 0);\n __decorate([\n reactive('dataChange')\n ], PieSeries.prototype, \"rotation\", void 0);\n __decorate([\n reactive('layoutChange')\n ], PieSeries.prototype, \"outerRadiusOffset\", void 0);\n __decorate([\n reactive('dataChange')\n ], PieSeries.prototype, \"innerRadiusOffset\", void 0);\n __decorate([\n reactive('layoutChange')\n ], PieSeries.prototype, \"strokeWidth\", void 0);\n __decorate([\n reactive('layoutChange')\n ], PieSeries.prototype, \"shadow\", void 0);\n return PieSeries;\n}(PolarSeries));\nexport { PieSeries };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Path } from \"./path\";\nimport { normalizeAngle360 } from \"../../util/angle\";\nimport { isEqual } from \"../../util/number\";\nimport { BBox } from \"../bbox\";\nvar Sector = /** @class */ (function (_super) {\n __extends(Sector, _super);\n function Sector() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._centerX = 0;\n _this._centerY = 0;\n _this._centerOffset = 0;\n _this._innerRadius = 10;\n _this._outerRadius = 20;\n _this._startAngle = 0;\n _this._endAngle = Math.PI * 2;\n _this._angleOffset = 0;\n return _this;\n }\n Object.defineProperty(Sector.prototype, \"centerX\", {\n get: function () {\n return this._centerX;\n },\n set: function (value) {\n if (this._centerX !== value) {\n this._centerX = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sector.prototype, \"centerY\", {\n get: function () {\n return this._centerY;\n },\n set: function (value) {\n if (this._centerY !== value) {\n this._centerY = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sector.prototype, \"centerOffset\", {\n get: function () {\n return this._centerOffset;\n },\n set: function (value) {\n if (this._centerOffset !== value) {\n this._centerOffset = Math.max(0, value);\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sector.prototype, \"innerRadius\", {\n get: function () {\n return this._innerRadius;\n },\n set: function (value) {\n if (this._innerRadius !== value) {\n this._innerRadius = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sector.prototype, \"outerRadius\", {\n get: function () {\n return this._outerRadius;\n },\n set: function (value) {\n if (this._outerRadius !== value) {\n this._outerRadius = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sector.prototype, \"startAngle\", {\n get: function () {\n return this._startAngle;\n },\n set: function (value) {\n if (this._startAngle !== value) {\n this._startAngle = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sector.prototype, \"endAngle\", {\n get: function () {\n return this._endAngle;\n },\n set: function (value) {\n if (this._endAngle !== value) {\n this._endAngle = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sector.prototype, \"angleOffset\", {\n get: function () {\n return this._angleOffset;\n },\n set: function (value) {\n if (this._angleOffset !== value) {\n this._angleOffset = value;\n this.dirtyPath = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Sector.prototype.computeBBox = function () {\n var radius = this.outerRadius;\n return new BBox(this.centerX - radius, this.centerY - radius, radius * 2, radius * 2);\n };\n Sector.prototype.isFullPie = function () {\n return isEqual(normalizeAngle360(this.startAngle), normalizeAngle360(this.endAngle));\n };\n Sector.prototype.updatePath = function () {\n var path = this.path;\n var angleOffset = this.angleOffset;\n var startAngle = Math.min(this.startAngle, this.endAngle) + angleOffset;\n var endAngle = Math.max(this.startAngle, this.endAngle) + angleOffset;\n var midAngle = (startAngle + endAngle) * 0.5;\n var innerRadius = Math.min(this.innerRadius, this.outerRadius);\n var outerRadius = Math.max(this.innerRadius, this.outerRadius);\n var centerOffset = this.centerOffset;\n var fullPie = this.isFullPie();\n var centerX = this.centerX;\n var centerY = this.centerY;\n path.clear();\n if (centerOffset) {\n centerX += centerOffset * Math.cos(midAngle);\n centerY += centerOffset * Math.sin(midAngle);\n }\n if (!fullPie) {\n path.moveTo(centerX + innerRadius * Math.cos(startAngle), centerY + innerRadius * Math.sin(startAngle));\n // if (showTip) {\n // path.lineTo(\n // centerX + 0.5 * (innerRadius + outerRadius) * Math.cos(startAngle) + tipOffset * Math.cos(startAngle + Math.PI / 2),\n // centerY + 0.5 * (innerRadius + outerRadius) * Math.sin(startAngle) + tipOffset * Math.sin(startAngle + Math.PI / 2)\n // );\n // }\n path.lineTo(centerX + outerRadius * Math.cos(startAngle), centerY + outerRadius * Math.sin(startAngle));\n }\n path.cubicArc(centerX, centerY, outerRadius, outerRadius, 0, startAngle, endAngle, 0);\n // path[fullPie ? 'moveTo' : 'lineTo'](\n // centerX + innerRadius * Math.cos(endAngle),\n // centerY + innerRadius * Math.sin(endAngle)\n // );\n if (fullPie) {\n path.moveTo(centerX + innerRadius * Math.cos(endAngle), centerY + innerRadius * Math.sin(endAngle));\n }\n else {\n // if (showTip) {\n // path.lineTo(\n // centerX + 0.5 * (innerRadius + outerRadius) * Math.cos(endAngle) + tipOffset * Math.cos(endAngle + Math.PI / 2),\n // centerY + 0.5 * (innerRadius + outerRadius) * Math.sin(endAngle) + tipOffset * Math.sin(endAngle + Math.PI / 2)\n // );\n // }\n // Temp workaround for https://bugs.chromium.org/p/chromium/issues/detail?id=993330\n // Revert this commit when fixed ^^.\n var x = centerX + innerRadius * Math.cos(endAngle);\n path.lineTo(Math.abs(x) < 1e-8 ? 0 : x, centerY + innerRadius * Math.sin(endAngle));\n }\n path.cubicArc(centerX, centerY, innerRadius, innerRadius, 0, endAngle, startAngle, 1);\n path.closePath();\n this.dirtyPath = false;\n };\n Sector.className = 'Sector';\n return Sector;\n}(Path));\nexport { Sector };\n","import { CountableTimeInterval } from \"./interval\";\nimport { durationMinute } from \"./duration\";\nfunction floor(date) {\n date.setUTCSeconds(0, 0);\n}\nfunction offset(date, minutes) {\n date.setTime(date.getTime() + minutes * durationMinute);\n}\nfunction count(start, end) {\n return (end.getTime() - start.getTime()) / durationMinute;\n}\nfunction field(date) {\n return date.getUTCMinutes();\n}\nexport var utcMinute = new CountableTimeInterval(floor, offset, count, field);\nexport default utcMinute;\n","import { CountableTimeInterval } from \"./interval\";\nimport { durationHour } from \"./duration\";\nfunction floor(date) {\n date.setUTCMinutes(0, 0, 0);\n}\nfunction offset(date, hours) {\n date.setTime(date.getTime() + hours * durationHour);\n}\nfunction count(start, end) {\n return (end.getTime() - start.getTime()) / durationHour;\n}\nfunction field(date) {\n return date.getUTCHours();\n}\nexport var utcHour = new CountableTimeInterval(floor, offset, count, field);\nexport default utcHour;\n","import { CountableTimeInterval } from \"./interval\";\nfunction floor(date) {\n date.setUTCDate(1);\n date.setUTCHours(0, 0, 0, 0);\n}\nfunction offset(date, months) {\n date.setUTCMonth(date.getUTCMonth() + months);\n}\nfunction count(start, end) {\n return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n}\nfunction field(date) {\n return date.getUTCMonth();\n}\nexport var utcMonth = new CountableTimeInterval(floor, offset, count, field);\nexport default utcMonth;\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { deepMerge, defaultIsMergeableObject, getValue, isObject } from \"../../util/object\";\nimport { Chart } from \"../chart\";\nimport { TimeInterval } from \"../../util/time/interval\";\nvar palette = {\n fills: [\n '#f3622d',\n '#fba71b',\n '#57b757',\n '#41a9c9',\n '#4258c9',\n '#9a42c8',\n '#c84164',\n '#888888'\n ],\n strokes: [\n '#aa4520',\n '#b07513',\n '#3d803d',\n '#2d768d',\n '#2e3e8d',\n '#6c2e8c',\n '#8c2d46',\n '#5f5f5f'\n ]\n};\nfunction arrayMerge(target, source, options) {\n return source;\n}\nfunction isMergeableObject(value) {\n return defaultIsMergeableObject(value) && !(value instanceof TimeInterval);\n}\nexport var mergeOptions = { arrayMerge: arrayMerge, isMergeableObject: isMergeableObject };\nvar BOLD = 'bold';\nvar INSIDE = 'inside';\nvar RIGHT = 'right';\nvar ChartTheme = /** @class */ (function () {\n function ChartTheme(options) {\n options = deepMerge({}, options || {}, mergeOptions);\n var _a = options.overrides, overrides = _a === void 0 ? null : _a, _b = options.palette, palette = _b === void 0 ? null : _b;\n var defaults = this.createChartConfigPerSeries(this.getDefaults());\n if (overrides) {\n var common = overrides.common, cartesian = overrides.cartesian, polar = overrides.polar, hierarchy = overrides.hierarchy;\n var applyOverrides = function (type, seriesTypes, overrideOpts) {\n if (overrideOpts) {\n defaults[type] = deepMerge(defaults[type], overrideOpts, mergeOptions);\n seriesTypes.forEach(function (seriesType) {\n defaults[seriesType] = deepMerge(defaults[seriesType], overrideOpts, mergeOptions);\n });\n }\n };\n applyOverrides('common', Object.keys(defaults), common);\n applyOverrides('cartesian', ChartTheme.cartesianSeriesTypes, cartesian);\n applyOverrides('polar', ChartTheme.polarSeriesTypes, polar);\n applyOverrides('hierarchy', ChartTheme.hierarchySeriesTypes, hierarchy);\n var seriesOverridesMap_1 = {};\n ChartTheme.seriesTypes.forEach(function (seriesType) {\n var chartConfig = overrides[seriesType];\n if (chartConfig) {\n if (chartConfig.series) {\n seriesOverridesMap_1[seriesType] = chartConfig.series;\n chartConfig.series = seriesOverridesMap_1;\n }\n defaults[seriesType] = deepMerge(defaults[seriesType], chartConfig, mergeOptions);\n }\n });\n }\n this.palette = (palette !== null && palette !== void 0 ? palette : this.getPalette());\n this.config = Object.freeze(defaults);\n }\n ChartTheme.prototype.getPalette = function () {\n return palette;\n };\n ChartTheme.getAxisDefaults = function () {\n return {\n top: {},\n right: {},\n bottom: {},\n left: {},\n thickness: 0,\n title: {\n enabled: false,\n padding: {\n top: 10,\n right: 10,\n bottom: 10,\n left: 10\n },\n text: 'Axis Title',\n fontStyle: undefined,\n fontWeight: BOLD,\n fontSize: 12,\n fontFamily: this.fontFamily,\n color: 'rgb(70, 70, 70)'\n },\n label: {\n fontStyle: undefined,\n fontWeight: undefined,\n fontSize: 12,\n fontFamily: this.fontFamily,\n padding: 5,\n rotation: undefined,\n color: 'rgb(87, 87, 87)',\n formatter: undefined,\n autoRotate: false\n },\n line: {\n width: 1,\n color: 'rgb(195, 195, 195)'\n },\n tick: {\n width: 1,\n size: 6,\n color: 'rgb(195, 195, 195)',\n },\n gridStyle: [{\n stroke: 'rgb(219, 219, 219)',\n lineDash: [4, 2]\n }]\n };\n };\n ChartTheme.getSeriesDefaults = function () {\n return {\n tooltip: {\n enabled: true,\n renderer: undefined,\n },\n visible: true,\n showInLegend: true,\n cursor: 'default',\n highlightStyle: {\n item: {\n fill: 'yellow'\n },\n series: {\n dimOpacity: 1\n }\n }\n };\n };\n ChartTheme.getBarSeriesDefaults = function () {\n return __assign(__assign({}, this.getSeriesDefaults()), { flipXY: false, fillOpacity: 1, strokeOpacity: 1, xKey: '', xName: '', yKeys: [], yNames: [], grouped: false, normalizedTo: undefined, strokeWidth: 1, lineDash: [0], lineDashOffset: 0, label: {\n enabled: false,\n fontStyle: undefined,\n fontWeight: undefined,\n fontSize: 12,\n fontFamily: this.fontFamily,\n color: 'rgb(70, 70, 70)',\n formatter: undefined,\n placement: INSIDE,\n }, shadow: {\n enabled: false,\n color: 'rgba(0, 0, 0, 0.5)',\n xOffset: 3,\n yOffset: 3,\n blur: 5\n } });\n };\n ChartTheme.getLineSeriesDefaults = function () {\n var seriesDefaults = this.getSeriesDefaults();\n return __assign(__assign({}, seriesDefaults), { tooltip: __assign(__assign({}, seriesDefaults.tooltip), { format: undefined }) });\n };\n ChartTheme.getCartesianSeriesMarkerDefaults = function () {\n return {\n enabled: true,\n shape: 'circle',\n size: 6,\n maxSize: 30,\n strokeWidth: 1,\n formatter: undefined\n };\n };\n ChartTheme.getChartDefaults = function () {\n return {\n background: {\n visible: true,\n fill: 'white'\n },\n padding: {\n top: 20,\n right: 20,\n bottom: 20,\n left: 20\n },\n title: {\n enabled: false,\n padding: {\n top: 10,\n right: 10,\n bottom: 10,\n left: 10\n },\n text: 'Title',\n fontStyle: undefined,\n fontWeight: BOLD,\n fontSize: 16,\n fontFamily: this.fontFamily,\n color: 'rgb(70, 70, 70)'\n },\n subtitle: {\n enabled: false,\n padding: {\n top: 10,\n right: 10,\n bottom: 10,\n left: 10\n },\n text: 'Subtitle',\n fontStyle: undefined,\n fontWeight: undefined,\n fontSize: 12,\n fontFamily: this.fontFamily,\n color: 'rgb(140, 140, 140)'\n },\n legend: {\n enabled: true,\n position: RIGHT,\n spacing: 20,\n item: {\n paddingX: 16,\n paddingY: 8,\n marker: {\n shape: undefined,\n size: 15,\n strokeWidth: 1,\n padding: 8\n },\n label: {\n color: 'black',\n fontStyle: undefined,\n fontWeight: undefined,\n fontSize: 12,\n fontFamily: this.fontFamily,\n formatter: undefined\n }\n }\n },\n tooltip: {\n enabled: true,\n tracking: true,\n delay: 0,\n class: Chart.defaultTooltipClass\n }\n };\n };\n ChartTheme.prototype.createChartConfigPerSeries = function (config) {\n var typeToAliases = {\n cartesian: ChartTheme.cartesianSeriesTypes,\n polar: ChartTheme.polarSeriesTypes,\n hierarchy: ChartTheme.hierarchySeriesTypes,\n groupedCategory: [],\n };\n Object.entries(typeToAliases).forEach(function (_a) {\n var _b = __read(_a, 2), type = _b[0], aliases = _b[1];\n aliases.forEach(function (alias) {\n if (!config[alias]) {\n config[alias] = deepMerge({}, config[type], mergeOptions);\n }\n });\n });\n return config;\n };\n ChartTheme.prototype.getConfig = function (path, defaultValue) {\n var value = getValue(this.config, path, defaultValue);\n if (Array.isArray(value)) {\n return deepMerge([], value, mergeOptions);\n }\n if (isObject(value)) {\n return deepMerge({}, value, mergeOptions);\n }\n return value;\n };\n /**\n * Meant to be overridden in subclasses. For example:\n * ```\n * getDefaults() {\n * const subclassDefaults = { ... };\n * return this.mergeWithParentDefaults(subclassDefaults);\n * }\n * ```\n */\n ChartTheme.prototype.getDefaults = function () {\n return deepMerge({}, ChartTheme.defaults, mergeOptions);\n };\n ChartTheme.prototype.mergeWithParentDefaults = function (parentDefaults, defaults) {\n return deepMerge(parentDefaults, defaults, mergeOptions);\n };\n ChartTheme.fontFamily = 'Verdana, sans-serif';\n ChartTheme.cartesianDefaults = __assign(__assign({}, ChartTheme.getChartDefaults()), { axes: {\n number: __assign({}, ChartTheme.getAxisDefaults()),\n log: __assign(__assign({}, ChartTheme.getAxisDefaults()), { base: 10 }),\n category: __assign(__assign({}, ChartTheme.getAxisDefaults()), { label: __assign(__assign({}, ChartTheme.getAxisDefaults().label), { autoRotate: true }) }),\n groupedCategory: __assign({}, ChartTheme.getAxisDefaults()),\n time: __assign({}, ChartTheme.getAxisDefaults())\n }, series: {\n column: __assign(__assign({}, ChartTheme.getBarSeriesDefaults()), { flipXY: false }),\n bar: __assign(__assign({}, ChartTheme.getBarSeriesDefaults()), { flipXY: true }),\n line: __assign(__assign({}, ChartTheme.getLineSeriesDefaults()), { title: undefined, xKey: '', xName: '', yKey: '', yName: '', strokeWidth: 2, strokeOpacity: 1, lineDash: [0], lineDashOffset: 0, marker: __assign({}, ChartTheme.getCartesianSeriesMarkerDefaults()), label: {\n enabled: false,\n fontStyle: undefined,\n fontWeight: undefined,\n fontSize: 12,\n fontFamily: ChartTheme.fontFamily,\n color: 'rgb(70, 70, 70)',\n formatter: undefined\n } }),\n scatter: __assign(__assign({}, ChartTheme.getSeriesDefaults()), { title: undefined, xKey: '', yKey: '', sizeKey: undefined, labelKey: undefined, xName: '', yName: '', sizeName: 'Size', labelName: 'Label', strokeWidth: 2, fillOpacity: 1, strokeOpacity: 1, marker: __assign({}, ChartTheme.getCartesianSeriesMarkerDefaults()), label: {\n enabled: false,\n fontStyle: undefined,\n fontWeight: undefined,\n fontSize: 12,\n fontFamily: ChartTheme.fontFamily,\n color: 'rgb(70, 70, 70)'\n } }),\n area: __assign(__assign({}, ChartTheme.getSeriesDefaults()), { xKey: '', xName: '', yKeys: [], yNames: [], normalizedTo: undefined, fillOpacity: 0.8, strokeOpacity: 1, strokeWidth: 2, lineDash: [0], lineDashOffset: 0, shadow: {\n enabled: false,\n color: 'rgba(0, 0, 0, 0.5)',\n xOffset: 3,\n yOffset: 3,\n blur: 5\n }, marker: __assign(__assign({}, ChartTheme.getCartesianSeriesMarkerDefaults()), { enabled: false }), label: {\n enabled: false,\n fontStyle: undefined,\n fontWeight: undefined,\n fontSize: 12,\n fontFamily: ChartTheme.fontFamily,\n color: 'rgb(70, 70, 70)',\n formatter: undefined\n } }),\n histogram: __assign(__assign({}, ChartTheme.getSeriesDefaults()), { xKey: '', yKey: '', xName: '', yName: '', strokeWidth: 1, fillOpacity: 1, strokeOpacity: 1, lineDash: [0], lineDashOffset: 0, areaPlot: false, binCount: 10, bins: undefined, aggregation: 'sum', label: {\n enabled: false,\n fontStyle: undefined,\n fontWeight: undefined,\n fontSize: 12,\n fontFamily: ChartTheme.fontFamily,\n color: 'rgb(70, 70, 70)',\n formatter: undefined\n }, shadow: {\n enabled: true,\n color: 'rgba(0, 0, 0, 0.5)',\n xOffset: 0,\n yOffset: 0,\n blur: 5,\n } })\n }, navigator: {\n enabled: false,\n height: 30,\n mask: {\n fill: '#999999',\n stroke: '#999999',\n strokeWidth: 1,\n fillOpacity: 0.2\n },\n minHandle: {\n fill: '#f2f2f2',\n stroke: '#999999',\n strokeWidth: 1,\n width: 8,\n height: 16,\n gripLineGap: 2,\n gripLineLength: 8\n },\n maxHandle: {\n fill: '#f2f2f2',\n stroke: '#999999',\n strokeWidth: 1,\n width: 8,\n height: 16,\n gripLineGap: 2,\n gripLineLength: 8\n }\n } });\n ChartTheme.polarDefaults = __assign(__assign({}, ChartTheme.getChartDefaults()), { series: {\n pie: __assign(__assign({}, ChartTheme.getSeriesDefaults()), { title: {\n enabled: true,\n padding: {\n top: 10,\n right: 10,\n bottom: 10,\n left: 10\n },\n text: '',\n fontStyle: undefined,\n fontWeight: 'bold',\n fontSize: 14,\n fontFamily: ChartTheme.fontFamily,\n color: 'rgb(70, 70, 70)'\n }, angleKey: '', angleName: '', radiusKey: undefined, radiusName: undefined, labelKey: undefined, labelName: undefined, label: {\n enabled: true,\n fontStyle: undefined,\n fontWeight: undefined,\n fontSize: 12,\n fontFamily: ChartTheme.fontFamily,\n color: 'rgb(70, 70, 70)',\n offset: 3,\n minAngle: 20\n }, callout: {\n length: 10,\n strokeWidth: 2\n }, fillOpacity: 1, strokeOpacity: 1, strokeWidth: 1, lineDash: [0], lineDashOffset: 0, rotation: 0, outerRadiusOffset: 0, innerRadiusOffset: 0, shadow: {\n enabled: false,\n color: 'rgba(0, 0, 0, 0.5)',\n xOffset: 3,\n yOffset: 3,\n blur: 5\n } })\n } });\n ChartTheme.hierarchyDefaults = __assign(__assign({}, ChartTheme.getChartDefaults()), { series: {\n treemap: __assign(__assign({}, ChartTheme.getSeriesDefaults()), { showInLegend: false, labelKey: 'label', sizeKey: 'size', colorKey: 'color', colorDomain: [-5, 5], colorRange: ['#cb4b3f', '#6acb64'], colorParents: false, gradient: true, nodePadding: 2, title: {\n enabled: true,\n color: 'white',\n fontStyle: undefined,\n fontWeight: 'bold',\n fontSize: 12,\n fontFamily: 'Verdana, sans-serif',\n padding: 15\n }, subtitle: {\n enabled: true,\n color: 'white',\n fontStyle: undefined,\n fontWeight: undefined,\n fontSize: 9,\n fontFamily: 'Verdana, sans-serif',\n padding: 13\n }, labels: {\n large: {\n enabled: true,\n fontStyle: undefined,\n fontWeight: 'bold',\n fontSize: 18,\n fontFamily: 'Verdana, sans-serif',\n color: 'white'\n },\n medium: {\n enabled: true,\n fontStyle: undefined,\n fontWeight: 'bold',\n fontSize: 14,\n fontFamily: 'Verdana, sans-serif',\n color: 'white'\n },\n small: {\n enabled: true,\n fontStyle: undefined,\n fontWeight: 'bold',\n fontSize: 10,\n fontFamily: 'Verdana, sans-serif',\n color: 'white'\n },\n color: {\n enabled: true,\n fontStyle: undefined,\n fontWeight: undefined,\n fontSize: 12,\n fontFamily: 'Verdana, sans-serif',\n color: 'white'\n }\n } })\n } });\n ChartTheme.defaults = {\n cartesian: ChartTheme.cartesianDefaults,\n groupedCategory: ChartTheme.cartesianDefaults,\n polar: ChartTheme.polarDefaults,\n hierarchy: ChartTheme.hierarchyDefaults,\n };\n ChartTheme.cartesianSeriesTypes = ['line', 'area', 'bar', 'column', 'scatter', 'histogram'];\n ChartTheme.polarSeriesTypes = ['pie'];\n ChartTheme.hierarchySeriesTypes = ['treemap'];\n ChartTheme.seriesTypes = ChartTheme.cartesianSeriesTypes\n .concat(ChartTheme.polarSeriesTypes)\n .concat(ChartTheme.hierarchySeriesTypes);\n return ChartTheme;\n}());\nexport { ChartTheme };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { ChartTheme } from \"./chartTheme\";\nvar DarkTheme = /** @class */ (function (_super) {\n __extends(DarkTheme, _super);\n function DarkTheme(options) {\n return _super.call(this, options) || this;\n }\n DarkTheme.prototype.getDefaults = function () {\n var fontColor = 'rgb(200, 200, 200)';\n var mutedFontColor = 'rgb(150, 150, 150)';\n var axisDefaults = {\n title: {\n color: fontColor\n },\n label: {\n color: fontColor\n },\n gridStyle: [{\n stroke: 'rgb(88, 88, 88)',\n lineDash: [4, 2]\n }]\n };\n var seriesLabelDefaults = {\n label: {\n color: fontColor\n }\n };\n var chartAxesDefaults = {\n axes: {\n number: __assign({}, axisDefaults),\n category: __assign({}, axisDefaults),\n time: __assign({}, axisDefaults)\n },\n };\n var chartDefaults = {\n background: {\n fill: 'rgb(34, 38, 41)'\n },\n title: {\n color: fontColor\n },\n subtitle: {\n color: mutedFontColor\n },\n legend: {\n item: {\n label: {\n color: fontColor\n }\n }\n }\n };\n return this.mergeWithParentDefaults(_super.prototype.getDefaults.call(this), {\n cartesian: __assign(__assign(__assign({}, chartDefaults), chartAxesDefaults), { series: {\n bar: __assign({}, seriesLabelDefaults),\n column: __assign({}, seriesLabelDefaults),\n histogram: __assign({}, seriesLabelDefaults)\n } }),\n groupedCategory: __assign(__assign(__assign({}, chartDefaults), chartAxesDefaults), { series: {\n bar: __assign({}, seriesLabelDefaults),\n column: __assign({}, seriesLabelDefaults),\n histogram: __assign({}, seriesLabelDefaults)\n } }),\n polar: __assign(__assign({}, chartDefaults), { series: {\n pie: __assign(__assign({}, seriesLabelDefaults), { title: {\n color: fontColor\n } })\n } }),\n hierarchy: __assign(__assign({}, chartDefaults), { series: {\n treemap: {\n title: {\n color: fontColor,\n },\n subtitle: {\n color: mutedFontColor,\n },\n labels: {\n large: {\n color: fontColor,\n },\n medium: {\n color: fontColor,\n },\n small: {\n color: fontColor,\n },\n color: {\n color: fontColor,\n },\n },\n },\n } }),\n });\n };\n return DarkTheme;\n}(ChartTheme));\nexport { DarkTheme };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { ChartTheme } from \"./chartTheme\";\nvar palette = {\n fills: [\n '#f44336',\n '#e91e63',\n '#9c27b0',\n '#673ab7',\n '#3f51b5',\n '#2196f3',\n '#03a9f4',\n '#00bcd4',\n '#009688',\n '#4caf50',\n '#8bc34a',\n '#cddc39',\n '#ffeb3b',\n '#ffc107',\n '#ff9800',\n '#ff5722'\n ],\n strokes: [\n '#ab2f26',\n '#a31545',\n '#6d1b7b',\n '#482980',\n '#2c397f',\n '#1769aa',\n '#0276ab',\n '#008494',\n '#00695f',\n '#357a38',\n '#618834',\n '#909a28',\n '#b3a429',\n '#b38705',\n '#b36a00',\n '#b33d18'\n ]\n};\nvar MaterialLight = /** @class */ (function (_super) {\n __extends(MaterialLight, _super);\n function MaterialLight() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n MaterialLight.prototype.getPalette = function () {\n return palette;\n };\n return MaterialLight;\n}(ChartTheme));\nexport { MaterialLight };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { DarkTheme } from \"./darkTheme\";\nvar palette = {\n fills: [\n '#f44336',\n '#e91e63',\n '#9c27b0',\n '#673ab7',\n '#3f51b5',\n '#2196f3',\n '#03a9f4',\n '#00bcd4',\n '#009688',\n '#4caf50',\n '#8bc34a',\n '#cddc39',\n '#ffeb3b',\n '#ffc107',\n '#ff9800',\n '#ff5722'\n ],\n strokes: [\n '#ab2f26',\n '#a31545',\n '#6d1b7b',\n '#482980',\n '#2c397f',\n '#1769aa',\n '#0276ab',\n '#008494',\n '#00695f',\n '#357a38',\n '#618834',\n '#909a28',\n '#b3a429',\n '#b38705',\n '#b36a00',\n '#b33d18'\n ]\n};\nvar MaterialDark = /** @class */ (function (_super) {\n __extends(MaterialDark, _super);\n function MaterialDark() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n MaterialDark.prototype.getPalette = function () {\n return palette;\n };\n return MaterialDark;\n}(DarkTheme));\nexport { MaterialDark };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { ChartTheme } from \"./chartTheme\";\nvar palette = {\n fills: [\n '#c16068',\n '#a2bf8a',\n '#ebcc87',\n '#80a0c3',\n '#b58dae',\n '#85c0d1'\n ],\n strokes: [\n '#874349',\n '#718661',\n '#a48f5f',\n '#5a7088',\n '#7f637a',\n '#5d8692'\n ]\n};\nvar PastelLight = /** @class */ (function (_super) {\n __extends(PastelLight, _super);\n function PastelLight() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n PastelLight.prototype.getPalette = function () {\n return palette;\n };\n return PastelLight;\n}(ChartTheme));\nexport { PastelLight };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { DarkTheme } from \"./darkTheme\";\nvar palette = {\n fills: [\n '#c16068',\n '#a2bf8a',\n '#ebcc87',\n '#80a0c3',\n '#b58dae',\n '#85c0d1'\n ],\n strokes: [\n '#874349',\n '#718661',\n '#a48f5f',\n '#5a7088',\n '#7f637a',\n '#5d8692'\n ]\n};\nvar PastelDark = /** @class */ (function (_super) {\n __extends(PastelDark, _super);\n function PastelDark() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n PastelDark.prototype.getPalette = function () {\n return palette;\n };\n return PastelDark;\n}(DarkTheme));\nexport { PastelDark };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { ChartTheme } from \"./chartTheme\";\nvar palette = {\n fills: [\n '#febe76',\n '#ff7979',\n '#badc58',\n '#f9ca23',\n '#f0932b',\n '#eb4c4b',\n '#6ab04c',\n '#7ed6df',\n '#e056fd',\n '#686de0'\n ],\n strokes: [\n '#b28553',\n '#b35555',\n '#829a3e',\n '#ae8d19',\n '#a8671e',\n '#a43535',\n '#4a7b35',\n '#58969c',\n '#9d3cb1',\n '#494c9d'\n ]\n};\nvar SolarLight = /** @class */ (function (_super) {\n __extends(SolarLight, _super);\n function SolarLight() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SolarLight.prototype.getPalette = function () {\n return palette;\n };\n return SolarLight;\n}(ChartTheme));\nexport { SolarLight };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { DarkTheme } from \"./darkTheme\";\nvar palette = {\n fills: [\n '#febe76',\n '#ff7979',\n '#badc58',\n '#f9ca23',\n '#f0932b',\n '#eb4c4b',\n '#6ab04c',\n '#7ed6df',\n '#e056fd',\n '#686de0'\n ],\n strokes: [\n '#b28553',\n '#b35555',\n '#829a3e',\n '#ae8d19',\n '#a8671e',\n '#a43535',\n '#4a7b35',\n '#58969c',\n '#9d3cb1',\n '#494c9d'\n ]\n};\nvar SolarDark = /** @class */ (function (_super) {\n __extends(SolarDark, _super);\n function SolarDark() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SolarDark.prototype.getPalette = function () {\n return palette;\n };\n return SolarDark;\n}(DarkTheme));\nexport { SolarDark };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { ChartTheme } from \"./chartTheme\";\nvar palette = {\n fills: [\n '#5BC0EB',\n '#FDE74C',\n '#9BC53D',\n '#E55934',\n '#FA7921',\n '#fa3081'\n ],\n strokes: [\n '#4086a4',\n '#b1a235',\n '#6c8a2b',\n '#a03e24',\n '#af5517',\n '#af225a'\n ]\n};\nvar VividLight = /** @class */ (function (_super) {\n __extends(VividLight, _super);\n function VividLight() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n VividLight.prototype.getPalette = function () {\n return palette;\n };\n return VividLight;\n}(ChartTheme));\nexport { VividLight };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { DarkTheme } from \"./darkTheme\";\nvar palette = {\n fills: [\n '#5BC0EB',\n '#FDE74C',\n '#9BC53D',\n '#E55934',\n '#FA7921',\n '#fa3081'\n ],\n strokes: [\n '#4086a4',\n '#b1a235',\n '#6c8a2b',\n '#a03e24',\n '#af5517',\n '#af225a'\n ]\n};\nvar VividDark = /** @class */ (function (_super) {\n __extends(VividDark, _super);\n function VividDark() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n VividDark.prototype.getPalette = function () {\n return palette;\n };\n return VividDark;\n}(DarkTheme));\nexport { VividDark };\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { ChartTheme } from \"../themes/chartTheme\";\nimport { DarkTheme } from '../themes/darkTheme';\nimport { MaterialLight } from \"../themes/materialLight\";\nimport { MaterialDark } from \"../themes/materialDark\";\nimport { PastelLight } from \"../themes/pastelLight\";\nimport { PastelDark } from \"../themes/pastelDark\";\nimport { SolarLight } from \"../themes/solarLight\";\nimport { SolarDark } from \"../themes/solarDark\";\nimport { VividLight } from \"../themes/vividLight\";\nimport { VividDark } from \"../themes/vividDark\";\nvar lightTheme = new ChartTheme();\nvar darkTheme = new DarkTheme();\nexport var lightThemes = {\n 'undefined': lightTheme,\n 'null': lightTheme,\n 'ag-default': lightTheme,\n 'ag-material': new MaterialLight(),\n 'ag-pastel': new PastelLight(),\n 'ag-solar': new SolarLight(),\n 'ag-vivid': new VividLight(),\n};\nexport var darkThemes = {\n 'undefined': darkTheme,\n 'null': darkTheme,\n 'ag-default-dark': darkTheme,\n 'ag-material-dark': new MaterialDark(),\n 'ag-pastel-dark': new PastelDark(),\n 'ag-solar-dark': new SolarDark(),\n 'ag-vivid-dark': new VividDark(),\n};\nexport var themes = __assign(__assign({}, darkThemes), lightThemes);\nexport function getChartTheme(value) {\n if (value instanceof ChartTheme) {\n return value;\n }\n var stockTheme = themes[value];\n if (stockTheme) {\n return stockTheme;\n }\n value = value;\n if (value.baseTheme || value.overrides || value.palette) {\n var baseTheme = getChartTheme(value.baseTheme);\n return new baseTheme.constructor(value);\n }\n return lightTheme;\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { ContinuousScale } from \"./continuousScale\";\nimport ticks from \"../util/ticks\";\nimport { format } from \"../util/numberFormat\";\nvar identity = function (x) { return x; };\nvar LogScale = /** @class */ (function (_super) {\n __extends(LogScale, _super);\n function LogScale() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'log';\n _this._domain = [1, 10];\n _this.baseLog = identity; // takes a log with base `base` of `x`\n _this.basePow = identity; // raises `base` to the power of `x`\n _this._base = 10;\n return _this;\n }\n LogScale.prototype.setDomain = function (values) {\n var df = values[0];\n var dl = values[values.length - 1];\n if (df === 0 || dl === 0 || df < 0 && dl > 0 || df > 0 && dl < 0) {\n console.warn('Log scale domain should not start at, end at or cross zero.');\n if (df === 0 && dl > 0) {\n df = Number.EPSILON;\n }\n else if (dl === 0 && df < 0) {\n dl = -Number.EPSILON;\n }\n else if (df < 0 && dl > 0) {\n if (Math.abs(dl) >= Math.abs(df)) {\n df = Number.EPSILON;\n }\n else {\n dl = -Number.EPSILON;\n }\n }\n else if (df > 0 && dl < 0) {\n if (Math.abs(dl) >= Math.abs(df)) {\n df = -Number.EPSILON;\n }\n else {\n dl = Number.EPSILON;\n }\n }\n values = values.slice();\n values[0] = df;\n values[values.length - 1] = dl;\n }\n _super.prototype.setDomain.call(this, values);\n };\n LogScale.prototype.getDomain = function () {\n return _super.prototype.getDomain.call(this);\n };\n Object.defineProperty(LogScale.prototype, \"base\", {\n get: function () {\n return this._base;\n },\n set: function (value) {\n if (this._base !== value) {\n this._base = value;\n this.rescale();\n }\n },\n enumerable: true,\n configurable: true\n });\n LogScale.prototype.rescale = function () {\n var base = this.base;\n var baseLog = LogScale.makeLogFn(base);\n var basePow = LogScale.makePowFn(base);\n if (this.domain[0] < 0) {\n baseLog = this.reflect(baseLog);\n basePow = this.reflect(basePow);\n this.transform = function (x) { return -Math.log(-x); };\n this.untransform = function (x) { return -Math.exp(-x); };\n }\n else {\n this.transform = function (x) { return Math.log(x); };\n this.untransform = function (x) { return Math.exp(x); };\n }\n this.baseLog = baseLog;\n this.basePow = basePow;\n _super.prototype.rescale.call(this);\n };\n /**\n * For example, if `f` is `Math.log10`, we have\n *\n * f(100) == 2\n * f(-100) == NaN\n * rf = reflect(f)\n * rf(-100) == -2\n *\n * @param f\n */\n LogScale.prototype.reflect = function (f) {\n return function (x) { return -f(-x); };\n };\n LogScale.prototype.nice = function () {\n var _a, _b;\n var domain = this.domain;\n var i0 = 0;\n var i1 = domain.length - 1;\n var x0 = domain[i0];\n var x1 = domain[i1];\n if (x1 < x0) {\n _a = __read([i1, i0], 2), i0 = _a[0], i1 = _a[1];\n _b = __read([x1, x0], 2), x0 = _b[0], x1 = _b[1];\n }\n // For example, for base == 10:\n // [ 50, 900] becomes [ 10, 1000 ]\n domain[i0] = this.basePow(Math.floor(this.baseLog(x0)));\n domain[i1] = this.basePow(Math.ceil(this.baseLog(x1)));\n this.domain = domain;\n };\n LogScale.pow10 = function (x) {\n return isFinite(x)\n ? +('1e' + x) // to avoid precision issues, e.g. Math.pow(10, -4) is not 0.0001\n : x < 0\n ? 0\n : x;\n };\n LogScale.makePowFn = function (base) {\n if (base === 10) {\n return LogScale.pow10;\n }\n if (base === Math.E) {\n return Math.exp;\n }\n return function (x) { return Math.pow(base, x); };\n };\n // Make a log function witn an arbitrary base or return a native function if exists.\n LogScale.makeLogFn = function (base) {\n if (base === Math.E) {\n return Math.log;\n }\n if (base === 10) {\n return Math.log10;\n }\n if (base === 2) {\n return Math.log2;\n }\n var logBase = Math.log(base);\n return function (x) { return Math.log(x) / logBase; };\n };\n LogScale.prototype.ticks = function (count) {\n var _a;\n if (count === void 0) { count = 10; }\n var n = count == null ? 10 : +count;\n var base = this.base;\n var domain = this.domain;\n var d0 = domain[0];\n var d1 = domain[domain.length - 1];\n var isReversed = d1 < d0;\n if (isReversed) {\n _a = __read([d1, d0], 2), d0 = _a[0], d1 = _a[1];\n }\n var p0 = this.baseLog(d0);\n var p1 = this.baseLog(d1);\n var z = [];\n // if `base` is an integer and delta in order of magnitudes is less than n\n if (!(base % 1) && p1 - p0 < n) {\n // For example, if n == 10, base == 10 and domain == [10^2, 10^6]\n // then p1 - p0 < n == true.\n p0 = Math.round(p0) - 1;\n p1 = Math.round(p1) + 1;\n if (d0 > 0) {\n for (; p0 < p1; ++p0) {\n for (var k = 1, p = this.basePow(p0); k < base; ++k) {\n var t = p * k;\n // The `t` checks are needed because we expanded the [p0, p1] by 1 in each direction.\n if (t < d0)\n continue;\n if (t > d1)\n break;\n z.push(t);\n }\n }\n }\n else {\n for (; p0 < p1; ++p0) {\n for (var k = base - 1, p = this.basePow(p0); k >= 1; --k) {\n var t = p * k;\n if (t < d0)\n continue;\n if (t > d1)\n break;\n z.push(t);\n }\n }\n }\n if (z.length * 2 < n) {\n z = ticks(d0, d1, n);\n }\n }\n else {\n // For example, if n == 4, base == 10 and domain == [10^2, 10^6]\n // then p1 - p0 < n == false.\n // `ticks` return [2, 3, 4, 5, 6], then mapped to [10^2, 10^3, 10^4, 10^5, 10^6].\n z = ticks(p0, p1, Math.min(p1 - p0, n)).map(this.basePow);\n }\n return isReversed ? z.reverse() : z;\n };\n LogScale.prototype.tickFormat = function (count, specifier) {\n var _this = this;\n var base = this.base;\n if (specifier == null) {\n specifier = (base === 10 ? '.0e' : ',');\n }\n if (typeof specifier !== 'function') {\n specifier = format(specifier);\n }\n if (count === Infinity) {\n return specifier;\n }\n if (count == null) {\n count = 10;\n }\n var k = Math.max(1, base * count / this.ticks().length);\n return function (d) {\n var i = d / _this.basePow(Math.round(_this.baseLog(d)));\n if (i * base < base - 0.5) {\n i *= base;\n }\n return i <= k ? specifier(d) : '';\n };\n };\n return LogScale;\n}(ContinuousScale));\nexport { LogScale };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { LogScale } from \"../../scale/logScale\";\nimport { NumberAxis, clamper } from \"./numberAxis\";\nvar LogAxis = /** @class */ (function (_super) {\n __extends(LogAxis, _super);\n function LogAxis() {\n var _this = _super.call(this) || this;\n _this.scale = new LogScale();\n _this.scale.clamper = clamper;\n return _this;\n }\n Object.defineProperty(LogAxis.prototype, \"base\", {\n get: function () {\n return this.scale.base;\n },\n set: function (value) {\n this.scale.base = value;\n },\n enumerable: true,\n configurable: true\n });\n LogAxis.className = 'LogAxis';\n LogAxis.type = 'log';\n return LogAxis;\n}(NumberAxis));\nexport { LogAxis };\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n};\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\n/**\n * Performs a JSON-diff between a source and target JSON structure.\n *\n * On a per property basis, takes the target property value where:\n * - types are different.\n * - type is primitive.\n * - type is array and length or content have changed.\n *\n * Recurses for object types.\n *\n * @param source starting point for diff\n * @param target target for diff vs. source\n * @param opts.stringify properties to stringify for comparison purposes\n *\n * @returns `null` if no differences, or an object with the subset of properties that have changed.\n */\nexport function jsonDiff(source, target, opts) {\n var e_1, _a;\n var _b = (opts || {}).stringify, stringify = _b === void 0 ? [] : _b;\n var sourceType = classify(source);\n var targetType = classify(target);\n if (targetType === 'array') {\n if (sourceType !== 'array' || source.length !== target.length) {\n return __spread(target);\n }\n if (target.some(function (targetElement, i) { var _a; return jsonDiff((_a = source) === null || _a === void 0 ? void 0 : _a[i], targetElement) != null; })) {\n return __spread(target);\n }\n return null;\n }\n var lhs = source || {};\n var rhs = target || {};\n var allProps = new Set(__spread(Object.keys(lhs), Object.keys(rhs)));\n var propsChangedCount = 0;\n var result = {};\n var _loop_1 = function (prop) {\n // Cheap-and-easy equality check.\n if (lhs[prop] === rhs[prop]) {\n return \"continue\";\n }\n var take = function (v) {\n result[prop] = v;\n propsChangedCount++;\n };\n if (stringify.includes(prop)) {\n if (JSON.stringify(lhs[prop] !== JSON.stringify(rhs[prop]))) {\n take(rhs[prop]);\n }\n return \"continue\";\n }\n var lhsType = classify(lhs[prop]);\n var rhsType = classify(rhs[prop]);\n if (lhsType !== rhsType) {\n // Types changed, just take RHS.\n take(rhs[prop]);\n return \"continue\";\n }\n if (rhsType === 'primitive' || rhsType === null) {\n take(rhs[prop]);\n return \"continue\";\n }\n if (rhsType === 'array' && lhs[prop].length !== rhs[prop].length) {\n // Arrays are different sizes, so just take target array.\n take(rhs[prop]);\n return \"continue\";\n }\n if (rhsType === 'class-instance') {\n // Don't try to do anything tricky with array diffs!\n take(rhs[prop]);\n return \"continue\";\n }\n if (rhsType === 'function' && lhs[prop] !== rhs[prop]) {\n take(rhs[prop]);\n return \"continue\";\n }\n var diff = jsonDiff(lhs[prop], rhs[prop], { stringify: stringify });\n if (diff !== null) {\n take(diff);\n }\n };\n try {\n for (var allProps_1 = __values(allProps), allProps_1_1 = allProps_1.next(); !allProps_1_1.done; allProps_1_1 = allProps_1.next()) {\n var prop = allProps_1_1.value;\n _loop_1(prop);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (allProps_1_1 && !allProps_1_1.done && (_a = allProps_1.return)) _a.call(allProps_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return propsChangedCount === 0 ? null : result;\n}\n/**\n * Special value used by `jsonMerge` to signal that a property should be removed from the merged\n * output.\n */\nexport var DELETE = Symbol('');\nvar NOT_SPECIFIED = Symbol('');\n/**\n * Merge together the provide JSON object structures, with the precedence of application running\n * from higher indexes to lower indexes.\n *\n * Deep-clones all objects to avoid mutation of the inputs changing the output object. For arrays,\n * just performs a deep-clone of the entire array, no merging of elements attempted.\n *\n * @param json all json objects to merge\n *\n * @returns the combination of all of the json inputs\n */\nexport function jsonMerge() {\n var e_2, _a;\n var json = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n json[_i] = arguments[_i];\n }\n var jsonTypes = json.map(function (v) { return classify(v); });\n if (jsonTypes.some(function (v) { return v === 'array'; })) {\n // Clone final array.\n var finalValue = json[json.length - 1];\n if (finalValue instanceof Array) {\n return finalValue.map(function (v) {\n var type = classify(v);\n return type === 'array' ? jsonMerge([], v) :\n type === 'object' ? jsonMerge({}, v) :\n v;\n });\n }\n return finalValue;\n }\n var result = {};\n var props = new Set(json.map(function (v) { return v != null ? Object.keys(v) : []; })\n .reduce(function (r, n) { return r.concat(n); }, []));\n var _loop_2 = function (nextProp) {\n var values = json.map(function (j) { return j != null && nextProp in j ? j[nextProp] : NOT_SPECIFIED; })\n .filter(function (v) { return v !== NOT_SPECIFIED; });\n if (values.length === 0) {\n return \"continue\";\n }\n var lastValue = values[values.length - 1];\n if (lastValue === DELETE) {\n return \"continue\";\n }\n var types = values.map(function (v) { return classify(v); });\n var type = types[0];\n if (types.some(function (t) { return t !== type && t !== null; })) {\n // Short-circuit if mismatching types.\n result[nextProp] = lastValue;\n return \"continue\";\n }\n if (type === 'array' || type === 'object') {\n result[nextProp] = jsonMerge.apply(void 0, __spread(values));\n }\n else {\n // Just directly assign/overwrite.\n result[nextProp] = lastValue;\n }\n };\n try {\n for (var props_1 = __values(props), props_1_1 = props_1.next(); !props_1_1.done; props_1_1 = props_1.next()) {\n var nextProp = props_1_1.value;\n _loop_2(nextProp);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (props_1_1 && !props_1_1.done && (_a = props_1.return)) _a.call(props_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return result;\n}\n/**\n * Recursively apply a JSON object into a class-hierarchy, optionally instantiating certain classes\n * by property name.\n *\n * @param target to apply source JSON properties into\n * @param source to be applied\n * @param params.path path for logging/error purposes, to aid with pinpointing problems\n * @param params.matcherPath path for pattern matching, to lookup allowedTypes override.\n * @param params.skip property names to skip from the source\n * @param params.constructors dictionary of property name to class constructors for properties that\n * require object construction\n * @param params.allowedTypes overrides by path for allowed property types\n */\nexport function jsonApply(target, source, params) {\n if (params === void 0) { params = {}; }\n var _a, _b, _c;\n var _d = params.path, path = _d === void 0 ? undefined : _d, _e = params.matcherPath, matcherPath = _e === void 0 ? path ? path.replace(/(\\[[0-9+]{1,}\\])/i, '[]') : undefined : _e, _f = params.skip, skip = _f === void 0 ? [] : _f, _g = params.constructors, constructors = _g === void 0 ? {} : _g, _h = params.allowedTypes, allowedTypes = _h === void 0 ? {} : _h;\n if (target == null) {\n throw new Error(\"AG Charts - target is uninitialised: \" + (path || ''));\n }\n if (source == null) {\n return target;\n }\n var targetType = classify(target);\n for (var property in source) {\n if (skip.indexOf(property) >= 0) {\n continue;\n }\n var newValue = source[property];\n var propertyPath = \"\" + (path ? path + '.' : '') + property;\n var propertyMatcherPath = \"\" + (matcherPath ? matcherPath + '.' : '') + property;\n var targetAny = target;\n var targetClass = targetAny.constructor;\n var currentValue = targetAny[property];\n var ctr = constructors[property];\n try {\n var currentValueType = classify(currentValue);\n var newValueType = classify(newValue);\n if (targetType === 'class-instance' && !(property in target || targetAny.hasOwnProperty(property))) {\n console.warn(\"AG Charts - unable to set [\" + propertyPath + \"] in \" + ((_a = targetClass) === null || _a === void 0 ? void 0 : _a.name) + \" - property is unknown\");\n continue;\n }\n var allowableTypes = allowedTypes[propertyMatcherPath] || [currentValueType];\n if (currentValueType === 'class-instance' && newValueType === 'object') {\n // Allowed, this is the common case! - do not error.\n }\n else if (currentValueType != null && newValueType != null && !allowableTypes.includes(newValueType)) {\n console.warn(\"AG Charts - unable to set [\" + propertyPath + \"] in \" + ((_b = targetClass) === null || _b === void 0 ? void 0 : _b.name) + \" - can't apply type of [\" + newValueType + \"], allowed types are: [\" + allowableTypes + \"]\");\n continue;\n }\n if (newValueType === 'array') {\n targetAny[property] = newValue;\n }\n else if (newValueType === 'class-instance') {\n targetAny[property] = newValue;\n }\n else if (newValueType === 'object') {\n if (currentValue != null) {\n jsonApply(currentValue, newValue, __assign(__assign({}, params), { path: propertyPath, matcherPath: propertyMatcherPath }));\n }\n else if (ctr != null) {\n targetAny[property] = jsonApply(new ctr(), newValue, __assign(__assign({}, params), { path: propertyPath, matcherPath: propertyMatcherPath }));\n }\n else {\n targetAny[property] = newValue;\n }\n }\n else {\n targetAny[property] = newValue;\n }\n }\n catch (error) {\n console.warn(\"AG Charts - unable to set [\" + propertyPath + \"] in [\" + ((_c = targetClass) === null || _c === void 0 ? void 0 : _c.name) + \"]; nested error is: \" + error.message);\n continue;\n }\n }\n return target;\n}\n/**\n * Walk the given JSON object graphs, invoking the visit() callback for every object encountered.\n * Arrays are descended into without a callback, however their elements will have the visit()\n * callback invoked if they are objects.\n *\n * @param json to traverse\n * @param visit callback for each non-primitive and non-array object found\n * @param opts.skip property names to skip when walking\n * @param jsons to traverse in parallel\n */\nexport function jsonWalk(json, visit, opts) {\n var jsons = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n jsons[_i - 3] = arguments[_i];\n }\n var _a;\n var jsonType = classify(json);\n var skip = opts.skip || [];\n if (jsonType === 'array') {\n json.forEach(function (element, index) {\n var _a;\n jsonWalk.apply(void 0, __spread([element, visit, opts], (_a = jsons) === null || _a === void 0 ? void 0 : _a.map(function (o) { var _a; return (_a = o) === null || _a === void 0 ? void 0 : _a[index]; })));\n });\n return;\n }\n else if (jsonType !== 'object') {\n return;\n }\n visit.apply(void 0, __spread([jsonType, json], jsons));\n var _loop_3 = function (property) {\n if (skip.indexOf(property) >= 0) {\n return \"continue\";\n }\n var value = json[property];\n var otherValues = (_a = jsons) === null || _a === void 0 ? void 0 : _a.map(function (o) { var _a; return (_a = o) === null || _a === void 0 ? void 0 : _a[property]; });\n var valueType = classify(value);\n if (valueType === 'object' || valueType === 'array') {\n jsonWalk.apply(void 0, __spread([value, visit, opts], otherValues));\n }\n };\n for (var property in json) {\n _loop_3(property);\n }\n}\n/**\n * Classify the type of a value to assist with handling for merge purposes.\n */\nexport function classify(value) {\n if (value == null) {\n return null;\n }\n else if (value instanceof HTMLElement) {\n return 'primitive';\n }\n else if (value instanceof Array) {\n return 'array';\n }\n else if (value instanceof Date) {\n return 'primitive';\n }\n else if (typeof value === 'object' && value.constructor === Object) {\n return 'object';\n }\n else if (typeof value === 'function') {\n return 'function';\n }\n else if (typeof value === 'object' && value.constructor != null) {\n return 'class-instance';\n }\n return 'primitive';\n}\n","import { NumberAxis } from \"../axis/numberAxis\";\nimport { ChartAxisPosition } from \"../chartAxis\";\nimport { CategoryAxis } from \"../axis/categoryAxis\";\nexport var DEFAULT_CARTESIAN_CHART_OVERRIDES = {\n type: 'cartesian',\n axes: [{\n type: NumberAxis.type,\n position: ChartAxisPosition.Left,\n }, {\n type: CategoryAxis.type,\n position: ChartAxisPosition.Bottom,\n }],\n};\nexport var DEFAULT_BAR_CHART_OVERRIDES = {\n axes: [{\n type: 'number',\n position: ChartAxisPosition.Bottom,\n }, {\n type: 'category',\n position: ChartAxisPosition.Left,\n }],\n};\nexport var DEFAULT_SCATTER_HISTOGRAM_CHART_OVERRIDES = {\n axes: [{\n type: 'number',\n position: ChartAxisPosition.Bottom,\n }, {\n type: 'number',\n position: ChartAxisPosition.Left,\n }],\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { BarLabelPlacement } from '../series/cartesian/barSeries';\nexport function transform(input, transforms) {\n var result = {};\n for (var p in input) {\n var t = transforms[p] || (function (x) { return x; });\n result[p] = t(input[p], input);\n }\n return result;\n}\nfunction is2dArray(input) {\n return input != null && input instanceof Array && input[0] instanceof Array;\n}\nfunction yNamesMapping(p, src) {\n if (p == null) {\n return {};\n }\n if (!(p instanceof Array)) {\n return p;\n }\n var yKeys = src.yKeys;\n if (yKeys == null || is2dArray(yKeys)) {\n throw new Error('AG Charts - yNames and yKeys mismatching configuration.');\n }\n var result = {};\n yKeys.forEach(function (k, i) {\n result[k] = p[i];\n });\n return result;\n}\nfunction yKeysMapping(p, src) {\n if (p == null) {\n return [[]];\n }\n if (is2dArray(p)) {\n return p;\n }\n return src.grouped ? p.map(function (v) { return [v]; }) : [p];\n}\nfunction labelMapping(p) {\n if (p == null) {\n return undefined;\n }\n var placement = p.placement;\n return __assign(__assign({}, p), { placement: placement === 'inside' ? BarLabelPlacement.Inside :\n placement === 'outside' ? BarLabelPlacement.Outside :\n undefined });\n}\nexport function barSeriesTransform(options) {\n var result = __assign(__assign({}, options), { yKeys: options.yKeys || [options.yKey] });\n delete result['yKey'];\n return transform(result, {\n yNames: yNamesMapping,\n yKeys: yKeysMapping,\n label: labelMapping,\n });\n}\nfunction identityTransform(input) { return input; }\n;\nvar SERIES_TRANSFORMS = {\n area: identityTransform,\n bar: barSeriesTransform,\n column: barSeriesTransform,\n histogram: identityTransform,\n line: identityTransform,\n pie: identityTransform,\n scatter: identityTransform,\n treemap: identityTransform,\n};\nexport function applySeriesTransform(options) {\n var type = options.type;\n var transform = SERIES_TRANSFORMS[type || 'line'];\n return transform(options);\n}\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n};\n/**\n * Groups the series options objects if they are of type `column` or `bar` and places them in an array at the index where the first instance of this series type was found.\n * Returns an array of arrays containing the ordered and grouped series options objects.\n */\nexport function groupSeriesByType(seriesOptions) {\n var e_1, _a;\n var indexMap = {};\n var result = [];\n try {\n for (var seriesOptions_1 = __values(seriesOptions), seriesOptions_1_1 = seriesOptions_1.next(); !seriesOptions_1_1.done; seriesOptions_1_1 = seriesOptions_1.next()) {\n var s = seriesOptions_1_1.value;\n if (s.type !== 'column' && s.type !== 'bar' && (s.type !== 'area' || s.stacked !== true)) {\n // No need to use index for these cases.\n result.push([s]);\n continue;\n }\n var seriesType = s.type || 'line';\n var groupingKey = s.stacked ? 'stacked' :\n s.grouped ? 'grouped' :\n s.yKeys ? 'stacked' :\n 'grouped';\n var indexKey = seriesType + \"-\" + s.xKey + \"-\" + groupingKey;\n if (indexMap[indexKey] == null) {\n // Add indexed array to result on first addition.\n indexMap[indexKey] = [];\n result.push(indexMap[indexKey]);\n }\n indexMap[indexKey].push(s);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (seriesOptions_1_1 && !seriesOptions_1_1.done && (_a = seriesOptions_1.return)) _a.call(seriesOptions_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return result;\n}\n/**\n * Takes an array of bar or area series options objects and returns a single object with the combined area series options.\n */\nexport function reduceSeries(series, enableBarSeriesSpecialCases) {\n var e_2, _a;\n var options = {};\n var arrayValueProperties = ['yKeys', 'fills', 'strokes', 'yNames', 'hideInChart', 'hideInLegend'];\n var stringValueProperties = ['yKey', 'fill', 'stroke', 'yName'];\n try {\n for (var series_1 = __values(series), series_1_1 = series_1.next(); !series_1_1.done; series_1_1 = series_1.next()) {\n var s = series_1_1.value;\n for (var property in s) {\n var arrayValueProperty = arrayValueProperties.indexOf(property) > -1;\n var stringValueProperty = stringValueProperties.indexOf(property) > -1;\n if (arrayValueProperty && s[property].length > 0) {\n options[property] = __spread((options[property] || []), s[property]);\n }\n else if (stringValueProperty) {\n options[property + \"s\"] = __spread((options[property + \"s\"] || []), [s[property]]);\n }\n else if (enableBarSeriesSpecialCases && property === 'showInLegend') {\n if (s[property] === false) {\n options.hideInLegend = __spread((options.hideInLegend || []), (s.yKey ? [s.yKey] : s.yKeys));\n }\n }\n else if (enableBarSeriesSpecialCases && property === 'grouped') {\n if (s[property] === true) {\n options[property] = s[property];\n }\n }\n else {\n options[property] = s[property];\n }\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (series_1_1 && !series_1_1.done && (_a = series_1.return)) _a.call(series_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return options;\n}\n/**\n * Transforms provided series options array into an array containing series options which are compatible with standalone charts series options.\n */\nexport function processSeriesOptions(seriesOptions) {\n var e_3, _a;\n var result = [];\n var preprocessed = seriesOptions.map(function (series) {\n // Change the default for bar/columns when yKey is used to be grouped rather than stacked.\n if ((series.type === 'bar' || series.type === 'column') && series.yKey != null && !series.stacked) {\n return __assign(__assign({}, series), { grouped: series.grouped != null ? series.grouped : true });\n }\n return series;\n });\n try {\n for (var _b = __values(groupSeriesByType(preprocessed)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var series = _c.value;\n switch (series[0].type) {\n case 'column':\n case 'bar':\n result.push(reduceSeries(series, true));\n break;\n case 'area':\n result.push(reduceSeries(series, false));\n break;\n case 'line':\n default:\n if (series.length > 1) {\n console.warn('AG Charts - unexpected grouping of series type: ' + series[0].type);\n }\n result.push(series[0]);\n break;\n }\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_3) throw e_3.error; }\n }\n return result;\n}\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n};\nimport { DEFAULT_CARTESIAN_CHART_OVERRIDES, DEFAULT_BAR_CHART_OVERRIDES, DEFAULT_SCATTER_HISTOGRAM_CHART_OVERRIDES } from \"./defaults\";\nimport { jsonMerge, DELETE, jsonWalk } from \"../../util/json\";\nimport { applySeriesTransform } from \"./transforms\";\nimport { getChartTheme } from \"./themes\";\nimport { processSeriesOptions } from \"./prepareSeries\";\nexport function optionsType(input) {\n var _a, _b;\n return input.type || ((_b = (_a = input.series) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.type) || 'cartesian';\n}\nexport function isAgCartesianChartOptions(input) {\n var specifiedType = optionsType(input);\n if (specifiedType == null) {\n return true;\n }\n switch (specifiedType) {\n case 'cartesian':\n case 'area':\n case 'bar':\n case 'column':\n case 'groupedCategory':\n case 'histogram':\n case 'line':\n case 'scatter':\n return true;\n default:\n return false;\n }\n}\nexport function isAgHierarchyChartOptions(input) {\n var specifiedType = optionsType(input);\n if (specifiedType == null) {\n return false;\n }\n switch (input.type) {\n case 'hierarchy':\n case 'treemap':\n return true;\n default:\n return false;\n }\n}\nexport function isAgPolarChartOptions(input) {\n var specifiedType = optionsType(input);\n if (specifiedType == null) {\n return false;\n }\n switch (input.type) {\n case 'polar':\n case 'pie':\n return true;\n default:\n return false;\n }\n}\nexport function isSeriesOptionType(input) {\n if (input == null) {\n return false;\n }\n return ['line', 'bar', 'column', 'histogram', 'scatter', 'area', 'pie', 'treemap'].indexOf(input) >= 0;\n}\nfunction countArrayElements(input) {\n var e_1, _a;\n var count = 0;\n try {\n for (var input_1 = __values(input), input_1_1 = input_1.next(); !input_1_1.done; input_1_1 = input_1.next()) {\n var next = input_1_1.value;\n if (next instanceof Array) {\n count += countArrayElements(next);\n }\n if (next != null) {\n count++;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (input_1_1 && !input_1_1.done && (_a = input_1.return)) _a.call(input_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return count;\n}\nfunction takeColours(context, colours, maxCount) {\n var result = [];\n for (var count = 0; count < maxCount; count++) {\n result.push(colours[(count + context.colourIndex) % colours.length]);\n }\n return result;\n}\nexport function prepareOptions(newOptions, fallbackOptions) {\n var options = fallbackOptions == null ? newOptions : jsonMerge(fallbackOptions, newOptions);\n sanityCheckOptions(options);\n // Determine type and ensure it's explicit in the options config.\n var userSuppliedOptionsType = options.type;\n var type = optionsType(options);\n options = __assign(__assign({}, options), { type: type });\n var defaultSeriesType = isAgCartesianChartOptions(options) ? 'line' :\n isAgHierarchyChartOptions(options) ? 'treemap' :\n isAgPolarChartOptions(options) ? 'pie' :\n 'line';\n var defaultOverrides = type === 'bar' ? DEFAULT_BAR_CHART_OVERRIDES :\n type === 'scatter' ? DEFAULT_SCATTER_HISTOGRAM_CHART_OVERRIDES :\n type === 'histogram' ? DEFAULT_SCATTER_HISTOGRAM_CHART_OVERRIDES :\n isAgCartesianChartOptions(options) ? DEFAULT_CARTESIAN_CHART_OVERRIDES :\n {};\n var _a = prepareMainOptions(defaultOverrides, options), context = _a.context, mergedOptions = _a.mergedOptions, axesThemes = _a.axesThemes, seriesThemes = _a.seriesThemes;\n // Special cases where we have arrays of elements which need their own defaults.\n mergedOptions.series = processSeriesOptions(mergedOptions.series || [])\n .map(function (s) {\n var type = s.type ? s.type :\n isSeriesOptionType(userSuppliedOptionsType) ? userSuppliedOptionsType :\n defaultSeriesType;\n var series = __assign(__assign({}, s), { type: type });\n return prepareSeries(context, series, seriesThemes[type] || {});\n });\n if (isAgCartesianChartOptions(mergedOptions)) {\n (mergedOptions.axes || []).forEach(function (a, i) {\n var type = a.type || 'number';\n var axis = __assign(__assign({}, a), { type: type });\n var axesTheme = jsonMerge(axesThemes[type], axesThemes[type][a.position || 'unknown'] || {});\n mergedOptions.axes[i] = prepareAxis(axis, axesTheme);\n });\n }\n prepareEnabledOptions(options, mergedOptions);\n return mergedOptions;\n}\nfunction sanityCheckOptions(options) {\n var _a, _b;\n if ((_a = options.series) === null || _a === void 0 ? void 0 : _a.some(function (s) { return s.yKeys != null && s.yKey != null; })) {\n console.warn('AG Charts - series options yKeys and yKey are mutually exclusive, please only use yKey for future compatibility.');\n }\n if ((_b = options.series) === null || _b === void 0 ? void 0 : _b.some(function (s) { return s.yNames != null && s.yName != null; })) {\n console.warn('AG Charts - series options yNames and yName are mutually exclusive, please only use yName for future compatibility.');\n }\n}\nfunction prepareMainOptions(defaultOverrides, options) {\n var _a = prepareTheme(options), theme = _a.theme, cleanedTheme = _a.cleanedTheme, axesThemes = _a.axesThemes, seriesThemes = _a.seriesThemes;\n var context = { colourIndex: 0, palette: theme.palette };\n var mergedOptions = jsonMerge(defaultOverrides, cleanedTheme, options);\n return { context: context, mergedOptions: mergedOptions, axesThemes: axesThemes, seriesThemes: seriesThemes };\n}\nfunction prepareTheme(options) {\n var theme = getChartTheme(options.theme);\n var themeConfig = theme.getConfig(optionsType(options) || 'cartesian');\n return {\n theme: theme,\n axesThemes: themeConfig['axes'] || {},\n seriesThemes: themeConfig['series'] || {},\n cleanedTheme: jsonMerge(themeConfig, { axes: DELETE, series: DELETE }),\n };\n}\nfunction prepareSeries(context, input) {\n var defaults = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n defaults[_i - 2] = arguments[_i];\n }\n var paletteOptions = calculateSeriesPalette(context, input);\n // Part of the options interface, but not directly consumed by the series implementations.\n var removeOptions = { stacked: DELETE };\n var mergedResult = jsonMerge.apply(void 0, __spread(defaults, [paletteOptions, input, removeOptions]));\n return applySeriesTransform(mergedResult);\n}\nfunction calculateSeriesPalette(context, input) {\n var paletteOptions = {};\n var _a = context.palette, fills = _a.fills, strokes = _a.strokes;\n var inputAny = input;\n var colourCount = countArrayElements(inputAny['yKeys'] || []) || 1; // Defaults to 1 if no yKeys.\n switch (input.type) {\n case 'pie':\n colourCount = Math.max(fills.length, strokes.length);\n case 'area':\n case 'bar':\n case 'column':\n paletteOptions.fills = takeColours(context, fills, colourCount);\n paletteOptions.strokes = takeColours(context, strokes, colourCount);\n break;\n case 'histogram':\n paletteOptions.fill = takeColours(context, fills, 1)[0];\n paletteOptions.stroke = takeColours(context, strokes, 1)[0];\n break;\n case 'scatter':\n paletteOptions.fill = takeColours(context, fills, 1)[0];\n case 'line':\n paletteOptions.stroke = takeColours(context, fills, 1)[0];\n paletteOptions.marker = {\n stroke: takeColours(context, strokes, 1)[0],\n fill: takeColours(context, fills, 1)[0],\n };\n break;\n case 'treemap':\n break;\n default:\n throw new Error('AG Charts - unknown series type: ' + input.type);\n }\n context.colourIndex += colourCount;\n return paletteOptions;\n}\nfunction prepareAxis(input) {\n var defaults = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n defaults[_i - 1] = arguments[_i];\n }\n // Remove redundant theme overload keys.\n var removeOptions = { top: DELETE, bottom: DELETE, left: DELETE, right: DELETE };\n return jsonMerge.apply(void 0, __spread(defaults, [input, removeOptions]));\n}\nfunction prepareEnabledOptions(options, mergedOptions) {\n // Set `enabled: true` for all option objects where the user has provided values.\n jsonWalk(options, function (_, userOpts, mergedOpts) {\n if (!mergedOpts) {\n return;\n }\n if ('enabled' in mergedOpts && userOpts.enabled == null) {\n mergedOpts.enabled = true;\n }\n }, { skip: ['data'] }, mergedOptions);\n}\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n};\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nimport { CartesianChart } from './cartesianChart';\nimport { PolarChart } from './polarChart';\nimport { HierarchyChart } from './hierarchyChart';\nimport { Caption } from '../caption';\nimport { AreaSeries } from './series/cartesian/areaSeries';\nimport { BarSeries } from './series/cartesian/barSeries';\nimport { HistogramSeries } from './series/cartesian/histogramSeries';\nimport { LineSeries } from './series/cartesian/lineSeries';\nimport { ScatterSeries } from './series/cartesian/scatterSeries';\nimport { PieSeries, PieTitle } from './series/polar/pieSeries';\nimport { TreemapSeries } from './series/hierarchy/treemapSeries';\nimport { LogAxis } from './axis/logAxis';\nimport { NumberAxis } from './axis/numberAxis';\nimport { CategoryAxis } from './axis/categoryAxis';\nimport { GroupedCategoryAxis } from './axis/groupedCategoryAxis';\nimport { TimeAxis } from './axis/timeAxis';\nimport { DropShadow } from '../scene/dropShadow';\nimport { jsonDiff, jsonMerge, jsonApply } from '../util/json';\nimport { GroupedCategoryChart } from './groupedCategoryChart';\nimport { prepareOptions, isAgCartesianChartOptions, isAgHierarchyChartOptions, isAgPolarChartOptions, optionsType } from './mapping/prepare';\nfunction chartType(options) {\n if (isAgCartesianChartOptions(options)) {\n return 'cartesian';\n }\n else if (isAgPolarChartOptions(options)) {\n return 'polar';\n }\n else if (isAgHierarchyChartOptions(options)) {\n return 'hierarchy';\n }\n throw new Error('AG Chart - unknown type of chart for options with type: ' + options.type);\n}\n// Backwards-compatibility layer.\nvar AgChart = /** @class */ (function () {\n function AgChart() {\n }\n /** @deprecated use AgChart.create() or AgChart.update() instead. */\n AgChart.createComponent = function (options, type) {\n // console.warn('AG Charts - createComponent should no longer be used, use AgChart.update() instead.')\n if (type.indexOf('.series') >= 0) {\n var optionsWithType = __assign(__assign({}, options), { type: options.type || type.split('.')[0] });\n return createSeries([optionsWithType])[0];\n }\n return null;\n };\n AgChart.create = function (options, container, data) {\n return AgChartV2.create(options);\n };\n AgChart.update = function (chart, options, container, data) {\n return AgChartV2.update(chart, options);\n };\n return AgChart;\n}());\nexport { AgChart };\nvar AgChartV2 = /** @class */ (function () {\n function AgChartV2() {\n }\n AgChartV2.create = function (userOptions) {\n debug('user options', userOptions);\n var mergedOptions = prepareOptions(userOptions);\n var chart = isAgCartesianChartOptions(mergedOptions) ? (mergedOptions.type === 'groupedCategory' ? new GroupedCategoryChart(document) : new CartesianChart(document)) :\n isAgHierarchyChartOptions(mergedOptions) ? new HierarchyChart(document) :\n isAgPolarChartOptions(mergedOptions) ? new PolarChart(document) :\n undefined;\n if (!chart) {\n throw new Error(\"AG Charts - couldn't apply configuration, check type of options: \" + mergedOptions['type']);\n }\n AgChartV2.updateDelta(chart, mergedOptions, userOptions);\n return chart;\n };\n AgChartV2.update = function (chart, userOptions) {\n debug('user options', userOptions);\n var mergedOptions = prepareOptions(userOptions, chart.userOptions);\n if (chartType(mergedOptions) !== chartType(chart.options)) {\n chart.destroy();\n console.warn('AG Charts - options supplied require a different type of chart, please recreate the chart.');\n return;\n }\n var deltaOptions = jsonDiff(chart.options, mergedOptions, { stringify: ['data'] });\n if (deltaOptions == null) {\n return;\n }\n AgChartV2.updateDelta(chart, deltaOptions, userOptions);\n };\n AgChartV2.updateDelta = function (chart, update, userOptions) {\n if (update.type == null) {\n update = __assign(__assign({}, update), { type: chart.options.type || optionsType(update) });\n }\n debug('delta update', update);\n applyChartOptions(chart, update, userOptions);\n };\n AgChartV2.DEBUG = false;\n return AgChartV2;\n}());\nexport { AgChartV2 };\nfunction debug(message) {\n var optionalParams = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n optionalParams[_i - 1] = arguments[_i];\n }\n if (AgChartV2.DEBUG) {\n console.log.apply(console, __spread([message], optionalParams));\n }\n}\nfunction applyChartOptions(chart, options, userOptions) {\n if (isAgCartesianChartOptions(options)) {\n applyOptionValues(chart, options, { skip: ['type', 'data', 'series', 'axes', 'autoSize', 'listeners', 'theme'] });\n }\n else if (isAgPolarChartOptions(options)) {\n applyOptionValues(chart, options, { skip: ['type', 'data', 'series', 'autoSize', 'listeners', 'theme'] });\n }\n else if (isAgHierarchyChartOptions(options)) {\n applyOptionValues(chart, options, { skip: ['type', 'data', 'series', 'autoSize', 'listeners', 'theme'] });\n }\n else {\n throw new Error(\"AG Charts - couldn't apply configuration, check type of options and chart: \" + options['type']);\n }\n var performProcessData = false;\n if (options.series && options.series.length > 0) {\n applySeries(chart, options);\n }\n if (isAgCartesianChartOptions(options) && options.axes) {\n performProcessData = applyAxes(chart, options);\n }\n if (options.data) {\n chart.data = options.data;\n performProcessData = true;\n }\n // Needs to be done last to avoid overrides by width/height properties.\n if (options.autoSize != null) {\n chart.autoSize = options.autoSize;\n }\n if (options.listeners) {\n registerListeners(chart, options.listeners);\n }\n chart.layoutPending = true;\n if (performProcessData) {\n chart.processData();\n }\n chart.performLayout();\n chart.options = jsonMerge(chart.options || {}, options);\n chart.userOptions = jsonMerge(chart.userOptions || {}, userOptions);\n}\nfunction applySeries(chart, options) {\n var optSeries = options.series;\n if (!optSeries) {\n return;\n }\n var matchingTypes = chart.series.length === optSeries.length &&\n chart.series.every(function (s, i) { var _a; return s.type === ((_a = optSeries[i]) === null || _a === void 0 ? void 0 : _a.type); });\n // Try to optimise series updates if series count and types didn't change.\n if (matchingTypes) {\n chart.series.forEach(function (s, i) {\n var _a, _b;\n var previousOpts = ((_b = (_a = chart.options) === null || _a === void 0 ? void 0 : _a.series) === null || _b === void 0 ? void 0 : _b[i]) || {};\n var seriesDiff = jsonDiff(previousOpts, optSeries[i] || {});\n debug(\"applying series diff idx \" + i, seriesDiff);\n jsonApply(s, seriesDiff);\n });\n return;\n }\n chart.series = createSeries(optSeries);\n}\nfunction applyAxes(chart, options) {\n var optAxes = options.axes;\n if (!optAxes) {\n return false;\n }\n var matchingTypes = chart.axes.length === optAxes.length &&\n chart.axes.every(function (a, i) { return a.type === optAxes[i].type; });\n // Try to optimise series updates if series count and types didn't change.\n if (matchingTypes) {\n var oldOpts_1 = chart.options;\n if (isAgCartesianChartOptions(oldOpts_1)) {\n chart.axes.forEach(function (a, i) {\n var _a;\n var previousOpts = ((_a = oldOpts_1.axes) === null || _a === void 0 ? void 0 : _a[i]) || {};\n var axisDiff = jsonDiff(previousOpts, optAxes[i]);\n debug(\"applying axis diff idx \" + i, axisDiff);\n jsonApply(a, axisDiff);\n });\n return true;\n }\n }\n chart.axes = createAxis(optAxes);\n return true;\n}\nfunction createSeries(options) {\n var e_1, _a;\n var series = [];\n var skip = ['listeners'];\n var index = 0;\n try {\n for (var _b = __values(options || []), _c = _b.next(); !_c.done; _c = _b.next()) {\n var seriesOptions = _c.value;\n var path = \"series[\" + index++ + \"]\";\n switch (seriesOptions.type) {\n case 'area':\n series.push(applySeriesValues(new AreaSeries(), seriesOptions, { path: path, skip: skip }));\n break;\n case 'bar':\n case 'column':\n series.push(applySeriesValues(new BarSeries(), seriesOptions, { path: path, skip: skip }));\n break;\n case 'histogram':\n series.push(applySeriesValues(new HistogramSeries(), seriesOptions, { path: path, skip: skip }));\n break;\n case 'line':\n series.push(applySeriesValues(new LineSeries(), seriesOptions, { path: path, skip: skip }));\n break;\n case 'scatter':\n series.push(applySeriesValues(new ScatterSeries(), seriesOptions, { path: path, skip: skip }));\n break;\n case 'pie':\n series.push(applySeriesValues(new PieSeries(), seriesOptions, { path: path, skip: skip }));\n break;\n case 'treemap':\n series.push(applySeriesValues(new TreemapSeries(), seriesOptions, { path: path, skip: skip }));\n break;\n default:\n throw new Error('AG Charts - unknown series type: ' + seriesOptions.type);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n series.forEach(function (next, index) {\n var _a, _b;\n var listeners = (_b = (_a = options) === null || _a === void 0 ? void 0 : _a[index]) === null || _b === void 0 ? void 0 : _b.listeners;\n if (listeners == null) {\n return;\n }\n registerListeners(next, listeners);\n });\n return series;\n}\nfunction createAxis(options) {\n var e_2, _a;\n var axes = [];\n var index = 0;\n try {\n for (var _b = __values(options || []), _c = _b.next(); !_c.done; _c = _b.next()) {\n var axisOptions = _c.value;\n var path = \"axis[\" + index++ + \"]\";\n switch (axisOptions.type) {\n case 'number':\n axes.push(applyAxisValues(new NumberAxis(), axisOptions, { path: path }));\n break;\n case LogAxis.type:\n axes.push(applyAxisValues(new LogAxis(), axisOptions, { path: path }));\n break;\n case CategoryAxis.type:\n axes.push(applyAxisValues(new CategoryAxis(), axisOptions, { path: path }));\n break;\n case GroupedCategoryAxis.type:\n axes.push(applyAxisValues(new GroupedCategoryAxis(), axisOptions, { path: path }));\n break;\n case TimeAxis.type:\n axes.push(applyAxisValues(new TimeAxis(), axisOptions, { path: path }));\n break;\n default:\n throw new Error('AG Charts - unknown axis type: ' + axisOptions['type']);\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return axes;\n}\nfunction registerListeners(source, listeners) {\n for (var property in listeners) {\n source.addEventListener(property, listeners[property]);\n }\n}\nvar JSON_APPLY_OPTIONS = {\n constructors: {\n 'title': Caption,\n 'subtitle': Caption,\n 'shadow': DropShadow,\n },\n allowedTypes: {\n 'series[].marker.shape': ['primitive', 'function'],\n 'axis[].tick.count': ['primitive', 'class-instance'],\n },\n};\nfunction applyOptionValues(target, options, _a) {\n var _b = _a === void 0 ? {} : _a, skip = _b.skip, path = _b.path;\n var applyOpts = __assign(__assign(__assign({}, JSON_APPLY_OPTIONS), { skip: __spread(['type'], (skip || [])) }), (path ? { path: path } : {}));\n return jsonApply(target, options, applyOpts);\n}\nfunction applySeriesValues(target, options, _a) {\n var _b = _a === void 0 ? {} : _a, skip = _b.skip, path = _b.path;\n var _c;\n var ctrs = ((_c = JSON_APPLY_OPTIONS) === null || _c === void 0 ? void 0 : _c.constructors) || {};\n var seriesTypeOverrides = {\n constructors: __assign(__assign({}, ctrs), { 'title': target.type === 'pie' ? PieTitle : ctrs['title'] }),\n };\n var applyOpts = __assign(__assign(__assign(__assign({}, JSON_APPLY_OPTIONS), seriesTypeOverrides), { skip: __spread(['type'], (skip || [])) }), (path ? { path: path } : {}));\n return jsonApply(target, options, applyOpts);\n}\nfunction applyAxisValues(target, options, _a) {\n var _b = _a === void 0 ? {} : _a, skip = _b.skip, path = _b.path;\n var applyOpts = __assign(__assign(__assign({}, JSON_APPLY_OPTIONS), { skip: __spread(['type'], (skip || [])) }), (path ? { path: path } : {}));\n return jsonApply(target, options, applyOpts);\n}\n","export function getSeriesType(chartType) {\n switch (chartType) {\n case 'bar':\n case 'groupedBar':\n case 'stackedBar':\n case 'normalizedBar':\n return 'bar';\n case 'column':\n case 'groupedColumn':\n case 'stackedColumn':\n case 'normalizedColumn':\n return 'column';\n case 'line':\n return 'line';\n case 'area':\n case 'stackedArea':\n case 'normalizedArea':\n return 'area';\n case 'scatter':\n case 'bubble':\n return 'scatter';\n case 'histogram':\n return 'histogram';\n case 'pie':\n case 'doughnut':\n return 'pie';\n default:\n return 'cartesian';\n }\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, BeanStub, Events, PostConstruct } from \"@ag-grid-community/core\";\nimport { ChartDataModel } from \"./chartDataModel\";\nimport { getChartTheme } from \"ag-charts-community\";\nimport { getSeriesType } from \"./utils/seriesTypeMapper\";\nvar ChartController = /** @class */ (function (_super) {\n __extends(ChartController, _super);\n function ChartController(model) {\n var _this = _super.call(this) || this;\n _this.model = model;\n return _this;\n }\n ChartController.prototype.init = function () {\n var _this = this;\n this.setChartRange();\n this.addManagedListener(this.eventService, Events.EVENT_RANGE_SELECTION_CHANGED, function (event) {\n if (event.id && event.id === _this.model.chartId) {\n _this.updateForRangeChange();\n }\n });\n if (this.model.unlinked) {\n if (this.rangeService) {\n this.rangeService.setCellRanges([]);\n }\n }\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_MOVED, this.updateForGridChange.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PINNED, this.updateForGridChange.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_VISIBLE, this.updateForGridChange.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_ROW_GROUP_CHANGED, this.updateForGridChange.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_MODEL_UPDATED, this.updateForGridChange.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_CELL_VALUE_CHANGED, this.updateForDataChange.bind(this));\n };\n ChartController.prototype.updateForGridChange = function () {\n if (this.model.unlinked) {\n return;\n }\n this.model.updateCellRanges();\n this.setChartRange();\n };\n ChartController.prototype.updateForDataChange = function () {\n if (this.model.unlinked) {\n return;\n }\n this.model.updateData();\n this.raiseChartUpdatedEvent();\n };\n ChartController.prototype.updateForRangeChange = function () {\n this.updateForGridChange();\n this.raiseChartRangeSelectionChangedEvent();\n };\n ChartController.prototype.updateForPanelChange = function (updatedCol) {\n this.model.updateCellRanges(updatedCol);\n this.setChartRange();\n this.raiseChartRangeSelectionChangedEvent();\n };\n ChartController.prototype.getChartModel = function () {\n var modelType = this.model.pivotChart ? 'pivot' : 'range';\n var seriesChartTypes = this.isComboChart() ? this.model.seriesChartTypes : undefined;\n return {\n modelType: modelType,\n chartId: this.model.chartId,\n chartType: this.model.chartType,\n chartThemeName: this.model.chartThemeName,\n chartOptions: this.chartProxy.getChartOptions(),\n chartPalette: this.chartProxy.getChartPalette(),\n cellRange: this.getCellRangeParams(),\n suppressChartRanges: this.model.suppressChartRanges,\n aggFunc: this.model.aggFunc,\n unlinkChart: this.model.unlinked,\n seriesChartTypes: seriesChartTypes\n };\n };\n ChartController.prototype.getChartId = function () {\n return this.model.chartId;\n };\n ChartController.prototype.getChartData = function () {\n return this.model.chartData;\n };\n ChartController.prototype.getChartType = function () {\n return this.model.chartType;\n };\n ChartController.prototype.setChartType = function (chartType) {\n this.model.chartType = chartType;\n this.model.updateSeriesChartTypes();\n this.raiseChartUpdatedEvent();\n this.raiseChartOptionsChangedEvent();\n };\n ChartController.prototype.setChartThemeName = function (chartThemeName) {\n this.model.chartThemeName = chartThemeName;\n this.raiseChartUpdatedEvent();\n this.raiseChartOptionsChangedEvent();\n };\n ChartController.prototype.getChartThemeName = function () {\n return this.model.chartThemeName;\n };\n ChartController.prototype.isPivotChart = function () {\n return this.model.pivotChart;\n };\n ChartController.prototype.isPivotMode = function () {\n return this.model.isPivotMode();\n };\n ChartController.prototype.isGrouping = function () {\n return this.model.isGrouping();\n };\n ChartController.prototype.getThemes = function () {\n return this.gridOptionsWrapper.getChartThemes();\n };\n ChartController.prototype.getPalettes = function () {\n var _this = this;\n var themeNames = this.gridOptionsWrapper.getChartThemes();\n return themeNames.map(function (themeName) {\n var stockTheme = _this.chartProxy.isStockTheme(themeName);\n var theme = stockTheme ? themeName : _this.chartProxy.lookupCustomChartTheme(themeName);\n return getChartTheme(theme).palette;\n });\n };\n ChartController.prototype.getValueColState = function () {\n return this.model.valueColState.map(this.displayNameMapper.bind(this));\n };\n ChartController.prototype.getSelectedValueColState = function () {\n return this.getValueColState().filter(function (cs) { return cs.selected; });\n };\n ChartController.prototype.getDimensionColState = function () {\n return this.model.dimensionColState;\n };\n ChartController.prototype.getSelectedDimension = function () {\n return this.model.getSelectedDimension();\n };\n ChartController.prototype.displayNameMapper = function (col) {\n var columnNames = this.model.columnNames[col.colId];\n col.displayName = columnNames ? columnNames.join(' - ') : this.model.getColDisplayName(col.column);\n return col;\n };\n ChartController.prototype.getColStateForMenu = function () {\n return { dimensionCols: this.model.dimensionColState, valueCols: this.getValueColState() };\n };\n ChartController.prototype.isDefaultCategorySelected = function () {\n return this.model.getSelectedDimension().colId === ChartDataModel.DEFAULT_CATEGORY;\n };\n ChartController.prototype.setChartRange = function (silent) {\n if (silent === void 0) { silent = false; }\n if (this.rangeService && !this.model.suppressChartRanges && !this.model.unlinked) {\n this.rangeService.setCellRanges(this.getCellRanges());\n }\n if (!silent) {\n this.raiseChartUpdatedEvent();\n }\n };\n ChartController.prototype.detachChartRange = function () {\n // when chart is detached it won't listen to changes from the grid\n this.model.unlinked = !this.model.unlinked;\n if (this.model.unlinked) {\n // remove range from grid\n if (this.rangeService) {\n this.rangeService.setCellRanges([]);\n }\n }\n else {\n // update chart data may have changed\n this.updateForGridChange();\n }\n };\n ChartController.prototype.setChartProxy = function (chartProxy) {\n this.chartProxy = chartProxy;\n };\n ChartController.prototype.getChartProxy = function () {\n return this.chartProxy;\n };\n ChartController.prototype.isActiveXYChart = function () {\n return _.includes(['scatter', 'bubble'], this.getChartType());\n };\n ChartController.prototype.isChartLinked = function () {\n return !this.model.unlinked;\n };\n ChartController.prototype.customComboExists = function () {\n return this.model.savedCustomSeriesChartTypes && this.model.savedCustomSeriesChartTypes.length > 0;\n };\n ChartController.prototype.getSeriesChartTypes = function () {\n return this.model.seriesChartTypes;\n };\n ChartController.prototype.isComboChart = function () {\n return this.model.isComboChart();\n };\n ChartController.prototype.updateSeriesChartType = function (colId, chartType, secondaryAxis) {\n var seriesChartType = this.model.seriesChartTypes.find(function (s) { return s.colId === colId; });\n if (seriesChartType) {\n // once a combo chart has been modified it is now a 'customCombo' chart\n var updateChartType = this.model.chartType !== 'customCombo';\n if (updateChartType) {\n this.model.chartType = 'customCombo';\n }\n var prevSeriesChartType = seriesChartType.chartType;\n if (chartType != null) {\n seriesChartType.chartType = chartType;\n }\n if (secondaryAxis != null) {\n seriesChartType.secondaryAxis = secondaryAxis;\n }\n // replace existing custom series types with this latest version\n this.model.savedCustomSeriesChartTypes = this.model.seriesChartTypes;\n // series chart types can be modified, i.e. column chart types should be moved to primary axis\n this.model.updateSeriesChartTypes();\n this.updateForDataChange();\n if (updateChartType) {\n // update the settings panel by raising an EVENT_CHART_TYPE_CHANGED event\n this.dispatchEvent(Object.freeze({\n type: ChartController.EVENT_CHART_TYPE_CHANGED\n }));\n }\n if (prevSeriesChartType !== chartType) {\n // update the format panel by raising an EVENT_CHART_SERIES_CHART_TYPE_CHANGED event\n this.dispatchEvent(Object.freeze({\n type: ChartController.EVENT_CHART_SERIES_CHART_TYPE_CHANGED\n }));\n }\n }\n };\n ChartController.prototype.getActiveSeriesChartTypes = function () {\n var selectedColIds = this.getSelectedValueColState().map(function (c) { return c.colId; });\n return this.getSeriesChartTypes().filter(function (s) { return selectedColIds.includes(s.colId); });\n };\n ChartController.prototype.getChartSeriesTypes = function () {\n var supportedComboSeriesTypes = ['line', 'column', 'area'];\n return this.isComboChart() ? supportedComboSeriesTypes : [getSeriesType(this.getChartType())];\n };\n ChartController.prototype.getCellRanges = function () {\n return [this.model.dimensionCellRange, this.model.valueCellRange].filter(function (r) { return r; });\n };\n ChartController.prototype.getCellRangeParams = function () {\n var cellRanges = this.getCellRanges();\n var firstCellRange = cellRanges[0];\n var startRow = (firstCellRange && firstCellRange.startRow) || null;\n var endRow = (firstCellRange && firstCellRange.endRow) || null;\n return {\n rowStartIndex: startRow && startRow.rowIndex,\n rowStartPinned: startRow && startRow.rowPinned,\n rowEndIndex: endRow && endRow.rowIndex,\n rowEndPinned: endRow && endRow.rowPinned,\n columns: cellRanges.reduce(function (columns, value) { return columns.concat(value.columns.map(function (c) { return c.getId(); })); }, [])\n };\n };\n ChartController.prototype.raiseChartUpdatedEvent = function () {\n var event = Object.freeze({\n type: ChartController.EVENT_CHART_UPDATED\n });\n this.dispatchEvent(event);\n };\n ChartController.prototype.raiseChartOptionsChangedEvent = function () {\n var _a = this.getChartModel(), chartId = _a.chartId, chartType = _a.chartType;\n var event = Object.freeze({\n type: Events.EVENT_CHART_OPTIONS_CHANGED,\n chartId: chartId,\n chartType: chartType,\n chartThemeName: this.model.chartThemeName,\n chartOptions: this.chartProxy.getChartOptions(),\n api: this.gridApi,\n columnApi: this.columnApi,\n });\n this.eventService.dispatchEvent(event);\n };\n ChartController.prototype.raiseChartRangeSelectionChangedEvent = function () {\n var event = Object.freeze({\n type: Events.EVENT_CHART_RANGE_SELECTION_CHANGED,\n id: this.model.chartId,\n chartId: this.model.chartId,\n cellRange: this.getCellRangeParams(),\n api: this.gridApi,\n columnApi: this.columnApi,\n });\n this.eventService.dispatchEvent(event);\n };\n ChartController.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n if (this.rangeService) {\n this.rangeService.setCellRanges([]);\n }\n };\n ChartController.EVENT_CHART_UPDATED = 'chartUpdated';\n ChartController.EVENT_CHART_TYPE_CHANGED = 'chartTypeChanged';\n ChartController.EVENT_CHART_SERIES_CHART_TYPE_CHANGED = 'chartSeriesChartTypeChanged';\n __decorate([\n Autowired('rangeService')\n ], ChartController.prototype, \"rangeService\", void 0);\n __decorate([\n Autowired('gridApi')\n ], ChartController.prototype, \"gridApi\", void 0);\n __decorate([\n Autowired('columnApi')\n ], ChartController.prototype, \"columnApi\", void 0);\n __decorate([\n PostConstruct\n ], ChartController.prototype, \"init\", null);\n return ChartController;\n}(BeanStub));\nexport { ChartController };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n};\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nimport { _, AgAbstractField, AgCheckbox, AgGroupComponent, AgRadioButton, AgSelect, AgToggleButton, AutoScrollService, Autowired, Component, DragAndDropService, DragSourceType, PostConstruct } from \"@ag-grid-community/core\";\nimport { ChartController } from \"../../chartController\";\nvar ChartDataPanel = /** @class */ (function (_super) {\n __extends(ChartDataPanel, _super);\n function ChartDataPanel(chartController, chartOptionsService) {\n var _this = _super.call(this, ChartDataPanel.TEMPLATE) || this;\n _this.chartController = chartController;\n _this.chartOptionsService = chartOptionsService;\n _this.columnComps = new Map();\n return _this;\n }\n ChartDataPanel.prototype.init = function () {\n this.updatePanels();\n this.addManagedListener(this.chartController, ChartController.EVENT_CHART_UPDATED, this.updatePanels.bind(this));\n this.createAutoScrollService();\n };\n ChartDataPanel.prototype.destroy = function () {\n this.clearComponents();\n _super.prototype.destroy.call(this);\n };\n ChartDataPanel.prototype.updatePanels = function () {\n var _this = this;\n var currentChartType = this.chartType;\n var _a = this.chartController.getColStateForMenu(), dimensionCols = _a.dimensionCols, valueCols = _a.valueCols;\n var colIds = dimensionCols.map(function (c) { return c.colId; }).concat(valueCols.map(function (c) { return c.colId; }));\n this.chartType = this.chartController.getChartType();\n var groupExpandedState = this.getGroupExpandedState();\n if (_.areEqual(_.keys(this.columnComps), colIds) && this.chartType === currentChartType) {\n // if possible, we just update existing components\n __spread(dimensionCols, valueCols).forEach(function (col) {\n _this.columnComps.get(col.colId).setValue(col.selected, true);\n });\n if (this.chartController.isActiveXYChart()) {\n var getSeriesLabel_1 = this.generateGetSeriesLabel();\n valueCols.forEach(function (col) {\n _this.columnComps.get(col.colId).setLabel(getSeriesLabel_1(col));\n });\n }\n // recreate series chart type group if it exists as series may be added or removed via series group panel\n _.removeFromParent(this.getGui().querySelector('#seriesChartTypeGroup'));\n this.seriesChartTypeGroupComp = this.destroyBean(this.seriesChartTypeGroupComp);\n this.createSeriesChartTypeGroup(valueCols);\n }\n else {\n // otherwise, we re-create everything\n this.clearComponents();\n this.createCategoriesGroup(dimensionCols);\n this.createSeriesGroup(valueCols);\n this.createSeriesChartTypeGroup(valueCols);\n }\n this.restoreGroupExpandedState(groupExpandedState);\n };\n ChartDataPanel.prototype.getGroupExpandedState = function () {\n return [\n this.categoriesGroupComp,\n this.seriesGroupComp,\n this.seriesChartTypeGroupComp\n ].map(function (group) { return !group ? true : group.isExpanded(); });\n };\n ChartDataPanel.prototype.restoreGroupExpandedState = function (groupExpandedState) {\n [\n this.categoriesGroupComp,\n this.seriesGroupComp,\n this.seriesChartTypeGroupComp\n ].forEach(function (group, idx) {\n if (!group) {\n return;\n }\n group.toggleGroupExpand(groupExpandedState[idx]);\n });\n };\n ChartDataPanel.prototype.createAutoScrollService = function () {\n var eGui = this.getGui();\n this.autoScrollService = new AutoScrollService({\n scrollContainer: eGui,\n scrollAxis: 'y',\n getVerticalPosition: function () { return eGui.scrollTop; },\n setVerticalPosition: function (position) { return eGui.scrollTop = position; }\n });\n };\n ChartDataPanel.prototype.addComponent = function (parent, component, id) {\n var eDiv = document.createElement('div');\n eDiv.id = id;\n eDiv.className = 'ag-chart-data-section';\n eDiv.appendChild(component.getGui());\n parent.appendChild(eDiv);\n };\n ChartDataPanel.prototype.addChangeListener = function (component, columnState) {\n var _this = this;\n this.addManagedListener(component, AgAbstractField.EVENT_CHANGED, function () {\n columnState.selected = component.getValue();\n _this.chartController.updateForPanelChange(columnState);\n });\n };\n ChartDataPanel.prototype.createCategoriesGroup = function (columns) {\n var _this = this;\n this.categoriesGroupComp = this.createBean(new AgGroupComponent({\n title: this.getCategoryGroupTitle(),\n enabled: true,\n suppressEnabledCheckbox: true,\n suppressOpenCloseIcons: false,\n cssIdentifier: 'charts-data'\n }));\n var inputName = \"chartDimension\" + this.getCompId();\n columns.forEach(function (col) {\n var comp = _this.categoriesGroupComp.createManagedBean(new AgRadioButton());\n comp.setLabel(_.escapeString(col.displayName));\n comp.setValue(col.selected);\n comp.setInputName(inputName);\n _this.addChangeListener(comp, col);\n _this.categoriesGroupComp.addItem(comp);\n _this.columnComps.set(col.colId, comp);\n });\n this.addComponent(this.getGui(), this.categoriesGroupComp, 'categoriesGroup');\n };\n ChartDataPanel.prototype.createSeriesGroup = function (columns) {\n var _this = this;\n this.seriesGroupComp = this.createManagedBean(new AgGroupComponent({\n title: this.getSeriesGroupTitle(),\n enabled: true,\n suppressEnabledCheckbox: true,\n suppressOpenCloseIcons: false,\n cssIdentifier: 'charts-data'\n }));\n if (this.chartController.isActiveXYChart()) {\n var pairedModeToggle = this.seriesGroupComp.createManagedBean(new AgToggleButton());\n pairedModeToggle\n .setLabel(this.chartTranslationService.translate('paired'))\n .setLabelAlignment('left')\n .setLabelWidth('flex')\n .setInputWidth(45)\n .setValue(this.chartOptionsService.getPairedMode())\n .onValueChange(function (newValue) {\n _this.chartOptionsService.setPairedMode(!!newValue);\n _this.chartController.updateForGridChange();\n });\n this.seriesGroupComp.addItem(pairedModeToggle);\n }\n var getSeriesLabel = this.generateGetSeriesLabel();\n columns.forEach(function (col) {\n var comp = _this.seriesGroupComp.createManagedBean(new AgCheckbox());\n comp.addCssClass('ag-data-select-checkbox');\n var label = getSeriesLabel(col);\n comp.setLabel(label);\n comp.setValue(col.selected);\n _this.addChangeListener(comp, col);\n _this.seriesGroupComp.addItem(comp);\n _this.columnComps.set(col.colId, comp);\n _this.addDragHandle(comp, col);\n });\n this.addComponent(this.getGui(), this.seriesGroupComp, 'seriesGroup');\n var dropTarget = {\n getIconName: function () { return DragAndDropService.ICON_MOVE; },\n getContainer: function () { return _this.seriesGroupComp.getGui(); },\n onDragging: function (params) { return _this.onDragging(params); },\n onDragLeave: function () { return _this.onDragLeave(); },\n isInterestedIn: this.isInterestedIn.bind(this),\n targetContainsSource: true\n };\n this.dragAndDropService.addDropTarget(dropTarget);\n };\n ChartDataPanel.prototype.createSeriesChartTypeGroup = function (columns) {\n var _this = this;\n if (!this.chartController.isComboChart()) {\n return;\n }\n this.seriesChartTypeGroupComp = this.createManagedBean(new AgGroupComponent({\n title: this.chartTranslationService.translate('seriesChartType'),\n enabled: true,\n suppressEnabledCheckbox: true,\n suppressOpenCloseIcons: false,\n cssIdentifier: 'charts-data'\n }));\n var seriesChartTypes = this.chartController.getSeriesChartTypes();\n columns.forEach(function (col) {\n if (!col.selected) {\n return;\n }\n var seriesChartType = seriesChartTypes.filter(function (s) { return s.colId === col.colId; })[0];\n if (!seriesChartType) {\n return;\n }\n var seriesItemGroup = _this.seriesChartTypeGroupComp.createManagedBean(new AgGroupComponent({\n title: col.displayName,\n enabled: true,\n suppressEnabledCheckbox: true,\n suppressOpenCloseIcons: true,\n cssIdentifier: 'charts-format-sub-level'\n }));\n var secondaryAxisComp = _this.seriesChartTypeGroupComp\n .createManagedBean(new AgCheckbox())\n .setLabel(_this.chartTranslationService.translate('secondaryAxis'))\n .setLabelWidth(\"flex\")\n .setDisabled(['groupedColumn', 'stackedColumn', 'stackedArea'].includes(seriesChartType.chartType))\n .setValue(!!seriesChartType.secondaryAxis)\n .onValueChange(function (enabled) { return _this.chartController.updateSeriesChartType(col.colId, undefined, enabled); });\n seriesItemGroup.addItem(secondaryAxisComp);\n var translate = function (key, defaultText) {\n return _this.chartTranslationService.translate(key, defaultText);\n };\n var availableChartTypes = [\n { value: 'line', text: translate('line', 'Line') },\n { value: 'area', text: translate('area', 'Area') },\n { value: 'stackedArea', text: translate('stackedArea', 'StackedArea') },\n { value: 'groupedColumn', text: translate('groupedColumn', 'Grouped Column') },\n { value: 'stackedColumn', text: translate('stackedColumn', 'Stacked Column') },\n ];\n var chartTypeComp = seriesItemGroup.createManagedBean(new AgSelect());\n chartTypeComp\n .setLabelAlignment('left')\n .setLabelWidth(\"flex\")\n .addOptions(availableChartTypes)\n .setValue(seriesChartType.chartType)\n .onValueChange(function (chartType) { return _this.chartController.updateSeriesChartType(col.colId, chartType); });\n seriesItemGroup.addItem(chartTypeComp);\n _this.seriesChartTypeGroupComp.addItem(seriesItemGroup);\n });\n this.addComponent(this.getGui(), this.seriesChartTypeGroupComp, 'seriesChartTypeGroup');\n };\n ChartDataPanel.prototype.addDragHandle = function (comp, col) {\n var _this = this;\n var eDragHandle = _.createIconNoSpan('columnDrag', this.gridOptionsWrapper);\n eDragHandle.classList.add('ag-drag-handle', 'ag-chart-data-column-drag-handle');\n comp.getGui().insertAdjacentElement('beforeend', eDragHandle);\n var dragSource = {\n type: DragSourceType.ChartPanel,\n eElement: eDragHandle,\n dragItemName: col.displayName,\n getDragItem: function () { return ({ columns: [col.column] }); },\n onDragStopped: function () { return _this.onDragStop(); }\n };\n this.dragAndDropService.addDragSource(dragSource, true);\n this.addDestroyFunc(function () { return _this.dragAndDropService.removeDragSource(dragSource); });\n };\n ChartDataPanel.prototype.generateGetSeriesLabel = function () {\n if (!this.chartController.isActiveXYChart()) {\n return function (col) { return _.escapeString(col.displayName); };\n }\n var isBubble = this.chartType === 'bubble';\n var isInPairedMode = this.isInPairedMode();\n var selectedValuesCount = 0;\n var indexToAxisLabel = new Map();\n indexToAxisLabel.set(0, 'X');\n indexToAxisLabel.set(1, 'Y');\n indexToAxisLabel.set(2, 'size');\n return function (col) {\n var escapedLabel = _.escapeString(col.displayName);\n if (!col.selected) {\n return escapedLabel;\n }\n var axisLabel;\n if (isInPairedMode) {\n axisLabel = indexToAxisLabel.get(selectedValuesCount % (isBubble ? 3 : 2));\n }\n else {\n if (selectedValuesCount === 0) {\n axisLabel = 'X';\n }\n else {\n axisLabel = isBubble && selectedValuesCount % 2 === 0 ? 'size' : 'Y';\n }\n }\n selectedValuesCount++;\n return escapedLabel + \" (\" + axisLabel + \")\";\n };\n };\n ChartDataPanel.prototype.getCategoryGroupTitle = function () {\n return this.chartTranslationService.translate(this.chartController.isActiveXYChart() ? 'labels' : 'categories');\n };\n ChartDataPanel.prototype.getSeriesGroupTitle = function () {\n return this.chartTranslationService.translate(this.chartController.isActiveXYChart() ? 'xyValues' : 'series');\n };\n ChartDataPanel.prototype.isInPairedMode = function () {\n return this.chartController.isActiveXYChart() && this.chartOptionsService.getSeriesOption('paired', 'scatter');\n };\n ChartDataPanel.prototype.clearComponents = function () {\n _.clearElement(this.getGui());\n this.categoriesGroupComp = this.destroyBean(this.categoriesGroupComp);\n this.seriesGroupComp = this.destroyBean(this.seriesGroupComp);\n this.seriesChartTypeGroupComp = this.destroyBean(this.seriesChartTypeGroupComp);\n this.columnComps.clear();\n };\n ChartDataPanel.prototype.onDragging = function (draggingEvent) {\n var itemHovered = this.checkHoveredItem(draggingEvent);\n if (!itemHovered) {\n return;\n }\n this.lastDraggedColumn = draggingEvent.dragItem.columns[0];\n var comp = itemHovered.comp, position = itemHovered.position;\n var _a = this.lastHoveredItem || {}, lastHoveredComp = _a.comp, lastHoveredPosition = _a.position;\n if (comp === lastHoveredComp && position === lastHoveredPosition) {\n return;\n }\n this.autoScrollService.check(draggingEvent.event);\n this.clearHoveredItems();\n this.lastHoveredItem = { comp: comp, position: position };\n var eGui = comp.getGui();\n eGui.classList.add('ag-list-item-hovered', \"ag-item-highlight-\" + position);\n };\n ChartDataPanel.prototype.checkHoveredItem = function (draggingEvent) {\n var e_1, _a;\n if (_.missing(draggingEvent.vDirection)) {\n return null;\n }\n var mouseEvent = draggingEvent.event;\n try {\n for (var _b = __values(this.columnComps.values()), _c = _b.next(); !_c.done; _c = _b.next()) {\n var comp = _c.value;\n var eGui = comp.getGui();\n if (!eGui.querySelector('.ag-chart-data-column-drag-handle')) {\n continue;\n }\n var rect = eGui.getBoundingClientRect();\n var isOverComp = mouseEvent.clientY >= rect.top && mouseEvent.clientY <= rect.bottom;\n if (isOverComp) {\n var height = eGui.clientHeight;\n var position = mouseEvent.clientY > rect.top + (height / 2) ? 'bottom' : 'top';\n return { comp: comp, position: position };\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return null;\n };\n ChartDataPanel.prototype.onDragLeave = function () {\n this.clearHoveredItems();\n };\n ChartDataPanel.prototype.onDragStop = function () {\n var _this = this;\n if (this.lastHoveredItem) {\n var _a = this.chartController.getColStateForMenu(), dimensionCols = _a.dimensionCols, valueCols = _a.valueCols;\n var draggedColumnState = __spread(dimensionCols, valueCols).find(function (state) { return state.column === _this.lastDraggedColumn; });\n if (draggedColumnState) {\n var targetIndex = Array.from(this.columnComps.values()).indexOf(this.lastHoveredItem.comp);\n if (this.lastHoveredItem.position === 'bottom') {\n targetIndex++;\n }\n draggedColumnState.order = targetIndex;\n this.chartController.updateForPanelChange(draggedColumnState);\n }\n }\n this.clearHoveredItems();\n this.lastDraggedColumn = undefined;\n this.autoScrollService.ensureCleared();\n };\n ChartDataPanel.prototype.clearHoveredItems = function () {\n this.columnComps.forEach(function (columnComp) {\n columnComp.getGui().classList.remove('ag-list-item-hovered', 'ag-item-highlight-top', 'ag-item-highlight-bottom');\n });\n this.lastHoveredItem = undefined;\n };\n ChartDataPanel.prototype.isInterestedIn = function (type) {\n return type === DragSourceType.ChartPanel;\n };\n ChartDataPanel.TEMPLATE = \"
\";\n __decorate([\n Autowired('dragAndDropService')\n ], ChartDataPanel.prototype, \"dragAndDropService\", void 0);\n __decorate([\n Autowired('chartTranslationService')\n ], ChartDataPanel.prototype, \"chartTranslationService\", void 0);\n __decorate([\n PostConstruct\n ], ChartDataPanel.prototype, \"init\", null);\n return ChartDataPanel;\n}(Component));\nexport { ChartDataPanel };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, Component, PostConstruct, RefSelector } from \"@ag-grid-community/core\";\nvar FontPanel = /** @class */ (function (_super) {\n __extends(FontPanel, _super);\n function FontPanel(params) {\n var _this = _super.call(this) || this;\n _this.activeComps = [];\n _this.params = params;\n return _this;\n }\n FontPanel.prototype.init = function () {\n var groupParams = {\n cssIdentifier: 'charts-format-sub-level',\n direction: 'vertical',\n suppressOpenCloseIcons: true\n };\n this.setTemplate(FontPanel.TEMPLATE, { fontGroup: groupParams });\n this.initGroup();\n this.initFontFamilySelect();\n this.initFontWeightStyleSelect();\n this.initFontSizeSelect();\n this.initFontColorPicker();\n };\n FontPanel.prototype.addCompToPanel = function (comp) {\n this.fontGroup.addItem(comp);\n this.activeComps.push(comp);\n };\n FontPanel.prototype.setEnabled = function (enabled) {\n this.fontGroup.setEnabled(enabled);\n };\n FontPanel.prototype.initGroup = function () {\n var _this = this;\n this.fontGroup\n .setTitle(this.params.name || this.chartTranslationService.translate('font'))\n .setEnabled(this.params.enabled)\n .hideEnabledCheckbox(!!this.params.suppressEnabledCheckbox)\n .hideOpenCloseIcons(true)\n .onEnableChange(function (enabled) {\n if (_this.params.setEnabled) {\n _this.params.setEnabled(enabled);\n }\n });\n };\n FontPanel.prototype.initFontFamilySelect = function () {\n var _this = this;\n var families = [\n 'Arial, sans-serif',\n 'Aria Black, sans-serif',\n 'Book Antiqua, serif',\n 'Charcoal, sans-serif',\n 'Comic Sans MS, cursive',\n 'Courier, monospace',\n 'Courier New, monospace',\n 'Gadget, sans-serif',\n 'Geneva, sans-serif',\n 'Helvetica, sans-serif',\n 'Impact, sans-serif',\n 'Lucida Console, monospace',\n 'Lucida Grande, sans-serif',\n 'Lucida Sans Unicode, sans-serif',\n 'Monaco, monospace',\n 'Palatino Linotype, serif',\n 'Palatino, serif',\n 'Times New Roman, serif',\n 'Times, serif',\n 'Verdana, sans-serif'\n ];\n var family = this.params.initialFont.family;\n var initialValue = families[0];\n if (family) {\n // check for known values using lowercase\n var lowerCaseValues = families.map(function (f) { return f.toLowerCase(); });\n var valueIndex = lowerCaseValues.indexOf(family.toLowerCase());\n if (valueIndex >= 0) {\n initialValue = families[valueIndex];\n }\n else {\n // add user provided value to list\n var capitalisedFontValue = _.capitalise(family);\n families.push(capitalisedFontValue);\n initialValue = capitalisedFontValue;\n }\n }\n var options = families.sort().map(function (value) { return ({ value: value, text: value }); });\n this.familySelect.addOptions(options)\n .setInputWidth('flex')\n .setValue(\"\" + initialValue)\n .onValueChange(function (newValue) { return _this.params.setFont({ family: newValue }); });\n };\n FontPanel.prototype.initFontSizeSelect = function () {\n var _this = this;\n var sizes = [8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36];\n var size = this.params.initialFont.size;\n if (!_.includes(sizes, size)) {\n sizes.push(size);\n }\n var options = sizes.sort(function (a, b) { return a - b; }).map(function (value) { return ({ value: \"\" + value, text: \"\" + value }); });\n this.sizeSelect.addOptions(options)\n .setInputWidth('flex')\n .setValue(\"\" + size)\n .onValueChange(function (newValue) { return _this.params.setFont({ size: parseInt(newValue, 10) }); });\n this.sizeSelect.setLabel(this.chartTranslationService.translate('size'));\n };\n FontPanel.prototype.initFontWeightStyleSelect = function () {\n var _this = this;\n var _a = this.params.initialFont, _b = _a.weight, weight = _b === void 0 ? 'normal' : _b, _c = _a.style, style = _c === void 0 ? 'normal' : _c;\n var weightStyles = [\n { name: 'normal', weight: 'normal', style: 'normal' },\n { name: 'bold', weight: 'bold', style: 'normal' },\n { name: 'italic', weight: 'normal', style: 'italic' },\n { name: 'boldItalic', weight: 'bold', style: 'italic' }\n ];\n var selectedOption = weightStyles.find(function (x) { return x.weight === weight && x.style === style; });\n if (!selectedOption) {\n selectedOption = { name: 'predefined', weight: weight, style: style };\n weightStyles.unshift(selectedOption);\n }\n var options = weightStyles.map(function (ws) { return ({\n value: ws.name,\n text: _this.chartTranslationService.translate(ws.name),\n }); });\n this.weightStyleSelect.addOptions(options)\n .setInputWidth('flex')\n .setValue(selectedOption.name)\n .onValueChange(function (newValue) {\n var selectedWeightStyle = weightStyles.find(function (x) { return x.name === newValue; });\n _this.params.setFont({ weight: selectedWeightStyle.weight, style: selectedWeightStyle.style });\n });\n };\n FontPanel.prototype.initFontColorPicker = function () {\n var _this = this;\n this.colorPicker\n .setLabel(this.chartTranslationService.translate('color'))\n .setInputWidth(45)\n .setValue(\"\" + this.params.initialFont.color)\n .onValueChange(function (newColor) { return _this.params.setFont({ color: newColor }); });\n };\n FontPanel.prototype.destroyActiveComps = function () {\n var _this = this;\n this.activeComps.forEach(function (comp) {\n _.removeFromParent(comp.getGui());\n _this.destroyBean(comp);\n });\n };\n FontPanel.prototype.destroy = function () {\n this.destroyActiveComps();\n _super.prototype.destroy.call(this);\n };\n FontPanel.TEMPLATE = \"
\\n \\n \\n \\n
\\n \\n \\n
\\n
\\n
\";\n __decorate([\n RefSelector('fontGroup')\n ], FontPanel.prototype, \"fontGroup\", void 0);\n __decorate([\n RefSelector('familySelect')\n ], FontPanel.prototype, \"familySelect\", void 0);\n __decorate([\n RefSelector('weightStyleSelect')\n ], FontPanel.prototype, \"weightStyleSelect\", void 0);\n __decorate([\n RefSelector('sizeSelect')\n ], FontPanel.prototype, \"sizeSelect\", void 0);\n __decorate([\n RefSelector('colorPicker')\n ], FontPanel.prototype, \"colorPicker\", void 0);\n __decorate([\n Autowired('chartTranslationService')\n ], FontPanel.prototype, \"chartTranslationService\", void 0);\n __decorate([\n PostConstruct\n ], FontPanel.prototype, \"init\", null);\n return FontPanel;\n}(Component));\nexport { FontPanel };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, Component, PostConstruct, RefSelector, } from \"@ag-grid-community/core\";\nimport { FontPanel } from \"../fontPanel\";\nimport { LegendPosition } from \"ag-charts-community\";\nimport { getMaxValue } from \"../formatPanel\";\nvar LegendPanel = /** @class */ (function (_super) {\n __extends(LegendPanel, _super);\n function LegendPanel(chartOptionsService) {\n var _this = _super.call(this) || this;\n _this.chartOptionsService = chartOptionsService;\n _this.activePanels = [];\n return _this;\n }\n LegendPanel.prototype.init = function () {\n var groupParams = {\n cssIdentifier: 'charts-format-top-level',\n direction: 'vertical'\n };\n this.setTemplate(LegendPanel.TEMPLATE, { legendGroup: groupParams });\n this.initLegendGroup();\n this.initLegendPosition();\n this.initLegendPadding();\n this.initLegendItems();\n this.initLabelPanel();\n };\n LegendPanel.prototype.initLegendGroup = function () {\n var _this = this;\n this.legendGroup\n .setTitle(this.chartTranslationService.translate(\"legend\"))\n .hideEnabledCheckbox(false)\n .setEnabled(this.chartOptionsService.getChartOption(\"legend.enabled\") || false)\n .toggleGroupExpand(false)\n .onEnableChange(function (enabled) {\n _this.chartOptionsService.setChartOption(\"legend.enabled\", enabled);\n _this.legendGroup.toggleGroupExpand(true);\n });\n };\n LegendPanel.prototype.initLegendPosition = function () {\n var _this = this;\n var positions = [LegendPosition.Top, LegendPosition.Right, LegendPosition.Bottom, LegendPosition.Left];\n this.legendPositionSelect\n .setLabel(this.chartTranslationService.translate(\"position\"))\n .setLabelWidth(\"flex\")\n .setInputWidth(80)\n .addOptions(positions.map(function (position) { return ({\n value: position,\n text: _this.chartTranslationService.translate(position)\n }); }))\n .setValue(this.chartOptionsService.getChartOption(\"legend.position\"))\n .onValueChange(function (newValue) { return _this.chartOptionsService.setChartOption(\"legend.position\", newValue); });\n };\n LegendPanel.prototype.initLegendPadding = function () {\n var _this = this;\n var currentValue = this.chartOptionsService.getChartOption(\"legend.spacing\");\n this.legendPaddingSlider\n .setLabel(this.chartTranslationService.translate(\"spacing\"))\n .setMaxValue(getMaxValue(currentValue, 200))\n .setValue(\"\" + currentValue)\n .setTextFieldWidth(45)\n .onValueChange(function (newValue) { return _this.chartOptionsService.setChartOption(\"legend.spacing\", newValue); });\n };\n LegendPanel.prototype.initLegendItems = function () {\n var _this = this;\n var initSlider = function (expression, labelKey, input, defaultMaxValue) {\n var currentValue = _this.chartOptionsService.getChartOption(\"legend.\" + expression);\n input.setLabel(_this.chartTranslationService.translate(labelKey))\n .setMaxValue(getMaxValue(currentValue, defaultMaxValue))\n .setValue(\"\" + currentValue)\n .setTextFieldWidth(45)\n .onValueChange(function (newValue) {\n _this.chartOptionsService.setChartOption(\"legend.\" + expression, newValue);\n });\n };\n initSlider(\"item.marker.size\", \"markerSize\", this.markerSizeSlider, 40);\n initSlider(\"item.marker.strokeWidth\", \"markerStroke\", this.markerStrokeSlider, 10);\n initSlider(\"item.marker.padding\", \"itemSpacing\", this.markerPaddingSlider, 20);\n initSlider(\"item.paddingX\", \"layoutHorizontalSpacing\", this.itemPaddingXSlider, 50);\n initSlider(\"item.paddingY\", \"layoutVerticalSpacing\", this.itemPaddingYSlider, 50);\n };\n LegendPanel.prototype.initLabelPanel = function () {\n var _this = this;\n var chartProxy = this.chartOptionsService;\n var initialFont = {\n family: chartProxy.getChartOption(\"legend.item.label.fontFamily\"),\n style: chartProxy.getChartOption(\"legend.item.label.fontStyle\"),\n weight: chartProxy.getChartOption(\"legend.item.label.fontWeight\"),\n size: chartProxy.getChartOption(\"legend.item.label.fontSize\"),\n color: chartProxy.getChartOption(\"legend.item.label.color\")\n };\n var setFont = function (font) {\n var proxy = _this.chartOptionsService;\n if (font.family) {\n proxy.setChartOption(\"legend.item.label.fontFamily\", font.family);\n }\n if (font.weight) {\n proxy.setChartOption(\"legend.item.label.fontWeight\", font.weight);\n }\n if (font.style) {\n proxy.setChartOption(\"legend.item.label.fontStyle\", font.style);\n }\n if (font.size) {\n proxy.setChartOption(\"legend.item.label.fontSize\", font.size);\n }\n if (font.color) {\n proxy.setChartOption(\"legend.item.label.color\", font.color);\n }\n };\n var params = {\n enabled: true,\n suppressEnabledCheckbox: true,\n initialFont: initialFont,\n setFont: setFont\n };\n var fontPanelComp = this.createBean(new FontPanel(params));\n this.legendGroup.addItem(fontPanelComp);\n this.activePanels.push(fontPanelComp);\n };\n LegendPanel.prototype.destroyActivePanels = function () {\n var _this = this;\n this.activePanels.forEach(function (panel) {\n _.removeFromParent(panel.getGui());\n _this.destroyBean(panel);\n });\n };\n LegendPanel.prototype.destroy = function () {\n this.destroyActivePanels();\n _super.prototype.destroy.call(this);\n };\n LegendPanel.TEMPLATE = \"
\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
\";\n __decorate([\n RefSelector('legendGroup')\n ], LegendPanel.prototype, \"legendGroup\", void 0);\n __decorate([\n RefSelector('legendPositionSelect')\n ], LegendPanel.prototype, \"legendPositionSelect\", void 0);\n __decorate([\n RefSelector('legendPaddingSlider')\n ], LegendPanel.prototype, \"legendPaddingSlider\", void 0);\n __decorate([\n RefSelector('markerSizeSlider')\n ], LegendPanel.prototype, \"markerSizeSlider\", void 0);\n __decorate([\n RefSelector('markerStrokeSlider')\n ], LegendPanel.prototype, \"markerStrokeSlider\", void 0);\n __decorate([\n RefSelector('markerPaddingSlider')\n ], LegendPanel.prototype, \"markerPaddingSlider\", void 0);\n __decorate([\n RefSelector('itemPaddingXSlider')\n ], LegendPanel.prototype, \"itemPaddingXSlider\", void 0);\n __decorate([\n RefSelector('itemPaddingYSlider')\n ], LegendPanel.prototype, \"itemPaddingYSlider\", void 0);\n __decorate([\n Autowired('chartTranslationService')\n ], LegendPanel.prototype, \"chartTranslationService\", void 0);\n __decorate([\n PostConstruct\n ], LegendPanel.prototype, \"init\", null);\n return LegendPanel;\n}(Component));\nexport { LegendPanel };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Component, PostConstruct, RefSelector } from \"@ag-grid-community/core\";\nimport { getMaxValue } from \"../formatPanel\";\nvar AxisTicksPanel = /** @class */ (function (_super) {\n __extends(AxisTicksPanel, _super);\n function AxisTicksPanel(chartOptionsService) {\n var _this = _super.call(this) || this;\n _this.chartOptionsService = chartOptionsService;\n return _this;\n }\n AxisTicksPanel.prototype.init = function () {\n var groupParams = {\n cssIdentifier: 'charts-format-sub-level',\n direction: 'vertical',\n suppressOpenCloseIcons: true\n };\n this.setTemplate(AxisTicksPanel.TEMPLATE, { axisTicksGroup: groupParams });\n this.initAxisTicks();\n };\n AxisTicksPanel.prototype.initAxisTicks = function () {\n var _this = this;\n this.axisTicksGroup\n .setTitle(this.chartTranslationService.translate(\"ticks\"))\n .hideOpenCloseIcons(true)\n .hideEnabledCheckbox(true);\n this.axisTicksColorPicker\n .setLabel(this.chartTranslationService.translate(\"color\"))\n .setLabelWidth(\"flex\")\n .setInputWidth(45)\n .setValue(this.chartOptionsService.getAxisProperty(\"tick.color\"))\n .onValueChange(function (newColor) { return _this.chartOptionsService.setAxisProperty(\"tick.color\", newColor); });\n var initInput = function (expression, input, label, defaultMaxValue) {\n var currentValue = _this.chartOptionsService.getAxisProperty(expression);\n input.setLabel(label)\n .setMaxValue(getMaxValue(currentValue, defaultMaxValue))\n .setValue(\"\" + currentValue)\n .setTextFieldWidth(45)\n .onValueChange(function (newValue) { return _this.chartOptionsService.setAxisProperty(expression, newValue); });\n };\n initInput(\"tick.width\", this.axisTicksWidthSlider, this.chartTranslationService.translate(\"width\"), 10);\n initInput(\"tick.size\", this.axisTicksSizeSlider, this.chartTranslationService.translate(\"length\"), 30);\n };\n AxisTicksPanel.TEMPLATE = \"
\\n \\n \\n \\n \\n \\n
\";\n __decorate([\n RefSelector('axisTicksGroup')\n ], AxisTicksPanel.prototype, \"axisTicksGroup\", void 0);\n __decorate([\n RefSelector('axisTicksColorPicker')\n ], AxisTicksPanel.prototype, \"axisTicksColorPicker\", void 0);\n __decorate([\n RefSelector('axisTicksWidthSlider')\n ], AxisTicksPanel.prototype, \"axisTicksWidthSlider\", void 0);\n __decorate([\n RefSelector('axisTicksSizeSlider')\n ], AxisTicksPanel.prototype, \"axisTicksSizeSlider\", void 0);\n __decorate([\n Autowired('chartTranslationService')\n ], AxisTicksPanel.prototype, \"chartTranslationService\", void 0);\n __decorate([\n PostConstruct\n ], AxisTicksPanel.prototype, \"init\", null);\n return AxisTicksPanel;\n}(Component));\nexport { AxisTicksPanel };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, AgAngleSelect, AgSlider, Autowired, Component, PostConstruct, RefSelector, } from \"@ag-grid-community/core\";\nimport { ChartController } from \"../../../chartController\";\nimport { AxisTicksPanel } from \"./axisTicksPanel\";\nimport { FontPanel } from \"../fontPanel\";\nimport { getMaxValue } from \"../formatPanel\";\nvar AxisPanel = /** @class */ (function (_super) {\n __extends(AxisPanel, _super);\n function AxisPanel(chartController, chartOptionsService) {\n var _this = _super.call(this) || this;\n _this.chartController = chartController;\n _this.chartOptionsService = chartOptionsService;\n _this.activePanels = [];\n _this.axisLabelUpdateFuncs = [];\n return _this;\n }\n AxisPanel.prototype.init = function () {\n var _this = this;\n var groupParams = {\n cssIdentifier: 'charts-format-top-level',\n direction: 'vertical'\n };\n this.setTemplate(AxisPanel.TEMPLATE, { axisGroup: groupParams });\n this.initAxis();\n this.initAxisTicks();\n this.initAxisLabels();\n var updateAxisLabelRotations = function () { return _this.axisLabelUpdateFuncs.forEach(function (func) { return func(); }); };\n this.addManagedListener(this.chartController, ChartController.EVENT_CHART_UPDATED, updateAxisLabelRotations);\n };\n AxisPanel.prototype.initAxis = function () {\n var _this = this;\n var chartTranslationService = this.chartTranslationService;\n this.axisGroup\n .setTitle(chartTranslationService.translate(\"axis\"))\n .toggleGroupExpand(false)\n .hideEnabledCheckbox(true);\n this.axisColorInput\n .setLabel(chartTranslationService.translate(\"color\"))\n .setLabelWidth(\"flex\")\n .setInputWidth(45)\n .setValue(this.chartOptionsService.getAxisProperty(\"line.color\"))\n .onValueChange(function (newColor) { return _this.chartOptionsService.setAxisProperty(\"line.color\", newColor); });\n var currentValue = this.chartOptionsService.getAxisProperty(\"line.width\");\n this.axisLineWidthSlider\n .setMaxValue(getMaxValue(currentValue, 10))\n .setLabel(chartTranslationService.translate(\"thickness\"))\n .setTextFieldWidth(45)\n .setValue(\"\" + currentValue)\n .onValueChange(function (newValue) { return _this.chartOptionsService.setAxisProperty(\"line.width\", newValue); });\n if (_.includes(['line', 'scatter', 'bubble'], this.chartController.getChartType()) && !this.chartController.isGrouping()) {\n var options_1 = [\n { value: '', text: chartTranslationService.translate('automatic') }\n ];\n ['category', 'time', 'number'].forEach(function (type) {\n options_1.push({ value: type, text: chartTranslationService.translate(type) });\n });\n this.xAxisTypeSelect\n .setLabel(chartTranslationService.translate('xType'))\n .setLabelWidth('flex')\n .addOptions(options_1)\n .setValue(this.chartOptionsService.getChartOption('xAxis.type') || '')\n .onValueChange(function (newValue) {\n _this.chartOptionsService.setChartOption('xAxis.type', typeof newValue === 'string' && newValue.length && newValue);\n _this.chartController.updateForDataChange();\n });\n }\n else {\n this.xAxisTypeSelect.setDisplayed(false);\n }\n };\n AxisPanel.prototype.initAxisTicks = function () {\n var axisTicksComp = this.createBean(new AxisTicksPanel(this.chartOptionsService));\n this.axisGroup.addItem(axisTicksComp);\n this.activePanels.push(axisTicksComp);\n };\n AxisPanel.prototype.initAxisLabels = function () {\n var _this = this;\n var initialFont = {\n family: this.chartOptionsService.getAxisProperty(\"label.fontFamily\"),\n style: this.chartOptionsService.getAxisProperty(\"label.fontStyle\"),\n weight: this.chartOptionsService.getAxisProperty(\"label.fontWeight\"),\n size: this.chartOptionsService.getAxisProperty(\"label.fontSize\"),\n color: this.chartOptionsService.getAxisProperty(\"label.color\")\n };\n var setFont = function (font) {\n if (font.family) {\n _this.chartOptionsService.setAxisProperty(\"label.fontFamily\", font.family);\n }\n if (font.weight) {\n _this.chartOptionsService.setAxisProperty(\"label.fontWeight\", font.weight);\n }\n if (font.style) {\n _this.chartOptionsService.setAxisProperty(\"label.fontStyle\", font.style);\n }\n if (font.size) {\n _this.chartOptionsService.setAxisProperty(\"label.fontSize\", font.size);\n }\n if (font.color) {\n _this.chartOptionsService.setAxisProperty(\"label.color\", font.color);\n }\n _this.chartController.getChartProxy().getChart().layoutPending = true;\n };\n var params = {\n enabled: true,\n suppressEnabledCheckbox: true,\n initialFont: initialFont,\n setFont: setFont\n };\n var labelPanelComp = this.createBean(new FontPanel(params));\n this.axisGroup.addItem(labelPanelComp);\n this.activePanels.push(labelPanelComp);\n this.addAdditionalLabelComps(labelPanelComp);\n };\n AxisPanel.prototype.addAdditionalLabelComps = function (labelPanelComp) {\n var _this = this;\n var createAngleComp = function (label, axisType) {\n var value = _this.chartOptionsService.getLabelRotation(axisType);\n var angleSelect = new AgAngleSelect()\n .setLabel(label)\n .setLabelWidth(\"flex\")\n .setValue(value || 0)\n .onValueChange(function (newValue) { return _this.chartOptionsService.setLabelRotation(axisType, newValue); });\n // the axis label rotation needs to be updated when the default category changes in the data panel\n _this.axisLabelUpdateFuncs.push(function () {\n var value = _this.chartOptionsService.getLabelRotation(axisType);\n angleSelect.setValue(value);\n });\n var rotationInput = _this.createBean(angleSelect);\n labelPanelComp.addCompToPanel(rotationInput);\n };\n var degreesSymbol = String.fromCharCode(176);\n var xRotationLabel = this.chartTranslationService.translate(\"xRotation\") + \" \" + degreesSymbol;\n var yRotationLabel = this.chartTranslationService.translate(\"yRotation\") + \" \" + degreesSymbol;\n createAngleComp(xRotationLabel, \"xAxis\");\n createAngleComp(yRotationLabel, \"yAxis\");\n var labelPaddingSlider = this.createBean(new AgSlider());\n var currentValue = this.chartOptionsService.getAxisProperty(\"label.padding\");\n labelPaddingSlider.setLabel(this.chartTranslationService.translate(\"padding\"))\n .setMaxValue(getMaxValue(currentValue, 30))\n .setValue(\"\" + currentValue)\n .setTextFieldWidth(45)\n .onValueChange(function (newValue) { return _this.chartOptionsService.setAxisProperty(\"label.padding\", newValue); });\n labelPanelComp.addCompToPanel(labelPaddingSlider);\n };\n AxisPanel.prototype.destroyActivePanels = function () {\n var _this = this;\n this.activePanels.forEach(function (panel) {\n _.removeFromParent(panel.getGui());\n _this.destroyBean(panel);\n });\n };\n AxisPanel.prototype.destroy = function () {\n this.destroyActivePanels();\n _super.prototype.destroy.call(this);\n };\n AxisPanel.TEMPLATE = \"
\\n \\n \\n \\n \\n \\n
\";\n __decorate([\n RefSelector('axisGroup')\n ], AxisPanel.prototype, \"axisGroup\", void 0);\n __decorate([\n RefSelector('axisColorInput')\n ], AxisPanel.prototype, \"axisColorInput\", void 0);\n __decorate([\n RefSelector('axisLineWidthSlider')\n ], AxisPanel.prototype, \"axisLineWidthSlider\", void 0);\n __decorate([\n RefSelector('xAxisTypeSelect')\n ], AxisPanel.prototype, \"xAxisTypeSelect\", void 0);\n __decorate([\n Autowired('chartTranslationService')\n ], AxisPanel.prototype, \"chartTranslationService\", void 0);\n __decorate([\n PostConstruct\n ], AxisPanel.prototype, \"init\", null);\n return AxisPanel;\n}(Component));\nexport { AxisPanel };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Component, PostConstruct, RefSelector } from \"@ag-grid-community/core\";\nimport { getMaxValue } from \"../formatPanel\";\nvar NavigatorPanel = /** @class */ (function (_super) {\n __extends(NavigatorPanel, _super);\n function NavigatorPanel(chartOptionsService) {\n var _this = _super.call(this) || this;\n _this.chartOptionsService = chartOptionsService;\n return _this;\n }\n NavigatorPanel.prototype.init = function () {\n var groupParams = {\n cssIdentifier: 'charts-format-top-level',\n direction: 'vertical'\n };\n this.setTemplate(NavigatorPanel.TEMPLATE, { navigatorGroup: groupParams });\n this.initNavigator();\n };\n NavigatorPanel.prototype.initNavigator = function () {\n var _this = this;\n var chartTranslationService = this.chartTranslationService;\n this.navigatorGroup\n .setTitle(chartTranslationService.translate(\"navigator\"))\n .toggleGroupExpand(false)\n .hideEnabledCheckbox(false)\n .setEnabled(this.chartOptionsService.getChartOption(\"navigator.enabled\") || false)\n .onEnableChange(function (enabled) {\n _this.chartOptionsService.setChartOption(\"navigator.enabled\", enabled);\n _this.navigatorGroup.toggleGroupExpand(true);\n });\n var currentValue = this.chartOptionsService.getChartOption(\"navigator.height\");\n this.navigatorHeightSlider\n .setLabel(chartTranslationService.translate(\"height\"))\n .setMinValue(10)\n .setMaxValue(getMaxValue(currentValue, 60))\n .setTextFieldWidth(45)\n .setValue(\"\" + (currentValue || 30))\n .onValueChange(function (height) { return _this.chartOptionsService.setChartOption(\"navigator.height\", height); });\n };\n NavigatorPanel.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n NavigatorPanel.TEMPLATE = \"
\\n \\n \\n \\n
\";\n __decorate([\n RefSelector('navigatorGroup')\n ], NavigatorPanel.prototype, \"navigatorGroup\", void 0);\n __decorate([\n RefSelector('navigatorHeightSlider')\n ], NavigatorPanel.prototype, \"navigatorHeightSlider\", void 0);\n __decorate([\n Autowired('chartTranslationService')\n ], NavigatorPanel.prototype, \"chartTranslationService\", void 0);\n __decorate([\n PostConstruct\n ], NavigatorPanel.prototype, \"init\", null);\n return NavigatorPanel;\n}(Component));\nexport { NavigatorPanel };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Component, PostConstruct, RefSelector } from \"@ag-grid-community/core\";\nimport { getMaxValue } from \"../formatPanel\";\nvar PaddingPanel = /** @class */ (function (_super) {\n __extends(PaddingPanel, _super);\n function PaddingPanel(chartOptionsService) {\n var _this = _super.call(this) || this;\n _this.chartOptionsService = chartOptionsService;\n return _this;\n }\n PaddingPanel.prototype.init = function () {\n var groupParams = {\n cssIdentifier: 'charts-format-sub-level',\n direction: 'vertical',\n suppressOpenCloseIcons: true\n };\n this.setTemplate(PaddingPanel.TEMPLATE, { chartPaddingGroup: groupParams });\n this.initGroup();\n this.initChartPaddingItems();\n };\n PaddingPanel.prototype.initGroup = function () {\n this.chartPaddingGroup\n .setTitle(this.chartTranslationService.translate(\"padding\"))\n .hideOpenCloseIcons(true)\n .hideEnabledCheckbox(true);\n };\n PaddingPanel.prototype.initChartPaddingItems = function () {\n var _this = this;\n var initInput = function (property, input) {\n var currentValue = _this.chartOptionsService.getChartOption('padding.' + property);\n input.setLabel(_this.chartTranslationService.translate(property))\n .setMaxValue(getMaxValue(currentValue, 200))\n .setValue(\"\" + currentValue)\n .setTextFieldWidth(45)\n .onValueChange(function (newValue) { return _this.chartOptionsService.setChartOption('padding.' + property, newValue); });\n };\n initInput('top', this.paddingTopSlider);\n initInput('right', this.paddingRightSlider);\n initInput('bottom', this.paddingBottomSlider);\n initInput('left', this.paddingLeftSlider);\n };\n PaddingPanel.TEMPLATE = \"
\\n \\n \\n \\n \\n \\n \\n
\";\n __decorate([\n RefSelector('chartPaddingGroup')\n ], PaddingPanel.prototype, \"chartPaddingGroup\", void 0);\n __decorate([\n RefSelector('paddingTopSlider')\n ], PaddingPanel.prototype, \"paddingTopSlider\", void 0);\n __decorate([\n RefSelector('paddingRightSlider')\n ], PaddingPanel.prototype, \"paddingRightSlider\", void 0);\n __decorate([\n RefSelector('paddingBottomSlider')\n ], PaddingPanel.prototype, \"paddingBottomSlider\", void 0);\n __decorate([\n RefSelector('paddingLeftSlider')\n ], PaddingPanel.prototype, \"paddingLeftSlider\", void 0);\n __decorate([\n Autowired('chartTranslationService')\n ], PaddingPanel.prototype, \"chartTranslationService\", void 0);\n __decorate([\n PostConstruct\n ], PaddingPanel.prototype, \"init\", null);\n return PaddingPanel;\n}(Component));\nexport { PaddingPanel };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Component, PostConstruct, RefSelector } from \"@ag-grid-community/core\";\nvar BackgroundPanel = /** @class */ (function (_super) {\n __extends(BackgroundPanel, _super);\n function BackgroundPanel(chartOptionsService) {\n var _this = _super.call(this) || this;\n _this.chartOptionsService = chartOptionsService;\n return _this;\n }\n BackgroundPanel.prototype.init = function () {\n var groupParams = {\n cssIdentifier: 'charts-format-sub-level',\n direction: 'vertical',\n suppressOpenCloseIcons: true\n };\n this.setTemplate(BackgroundPanel.TEMPLATE, { chartBackgroundGroup: groupParams });\n this.initGroup();\n this.initColorPicker();\n };\n BackgroundPanel.prototype.initGroup = function () {\n var _this = this;\n this.group\n .setTitle(this.chartTranslationService.translate('background'))\n .setEnabled(this.chartOptionsService.getChartOption('background.visible'))\n .hideOpenCloseIcons(true)\n .hideEnabledCheckbox(false)\n .onEnableChange(function (enabled) { return _this.chartOptionsService.setChartOption('background.visible', enabled); });\n };\n BackgroundPanel.prototype.initColorPicker = function () {\n var _this = this;\n this.colorPicker\n .setLabel(this.chartTranslationService.translate('color'))\n .setLabelWidth('flex')\n .setInputWidth(45)\n .setValue(this.chartOptionsService.getChartOption('background.fill'))\n .onValueChange(function (newColor) { return _this.chartOptionsService.setChartOption('background.fill', newColor); });\n };\n BackgroundPanel.TEMPLATE = \"
\\n \\n \\n \\n
\";\n __decorate([\n RefSelector('chartBackgroundGroup')\n ], BackgroundPanel.prototype, \"group\", void 0);\n __decorate([\n RefSelector('colorPicker')\n ], BackgroundPanel.prototype, \"colorPicker\", void 0);\n __decorate([\n Autowired('chartTranslationService')\n ], BackgroundPanel.prototype, \"chartTranslationService\", void 0);\n __decorate([\n PostConstruct\n ], BackgroundPanel.prototype, \"init\", null);\n return BackgroundPanel;\n}(Component));\nexport { BackgroundPanel };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, Component, PostConstruct } from \"@ag-grid-community/core\";\nimport { FontPanel } from \"../fontPanel\";\nvar TitlePanel = /** @class */ (function (_super) {\n __extends(TitlePanel, _super);\n function TitlePanel(chartOptionsService) {\n var _this = _super.call(this, TitlePanel.TEMPLATE) || this;\n _this.chartOptionsService = chartOptionsService;\n _this.activePanels = [];\n return _this;\n }\n TitlePanel.prototype.init = function () {\n this.initFontPanel();\n this.titlePlaceholder = this.chartTranslationService.translate('titlePlaceholder');\n };\n TitlePanel.prototype.hasTitle = function () {\n var title = this.getOption('title');\n return title && title.enabled && title.text && title.text.length > 0;\n };\n TitlePanel.prototype.initFontPanel = function () {\n var _this = this;\n var hasTitle = this.hasTitle;\n var setFont = function (font) {\n if (font.family) {\n _this.setOption('title.fontFamily', font.family);\n }\n if (font.weight) {\n _this.setOption('title.fontWeight', font.weight);\n }\n if (font.style) {\n _this.setOption('title.fontStyle', font.style);\n }\n if (font.size) {\n _this.setOption('title.fontSize', font.size);\n }\n if (font.color) {\n _this.setOption('title.color', font.color);\n }\n };\n var initialFont = {\n family: this.getOption('title.fontFamily'),\n style: this.getOption('title.fontStyle'),\n weight: this.getOption('title.fontWeight'),\n size: this.getOption('title.fontSize'),\n color: this.getOption('title.color')\n };\n if (!hasTitle) {\n setFont(initialFont);\n }\n var fontPanelParams = {\n name: this.chartTranslationService.translate('title'),\n enabled: this.hasTitle(),\n suppressEnabledCheckbox: false,\n initialFont: initialFont,\n setFont: setFont,\n setEnabled: function (enabled) {\n _this.setOption('title.enabled', enabled);\n var currentTitleText = _this.getOption('title.text');\n if (enabled && currentTitleText === 'Title') {\n _this.setOption('title.text', _this.titlePlaceholder);\n }\n }\n };\n var fontPanelComp = this.createBean(new FontPanel(fontPanelParams));\n this.getGui().appendChild(fontPanelComp.getGui());\n this.activePanels.push(fontPanelComp);\n // edits to the title can disable it, so keep the checkbox in sync:\n this.addManagedListener(this.eventService, 'chartTitleEdit', function () {\n fontPanelComp.setEnabled(_this.hasTitle());\n });\n };\n TitlePanel.prototype.getOption = function (expression) {\n return this.chartOptionsService.getChartOption(expression);\n };\n TitlePanel.prototype.setOption = function (property, value) {\n this.chartOptionsService.setChartOption(property, value);\n };\n TitlePanel.prototype.destroyActivePanels = function () {\n var _this = this;\n this.activePanels.forEach(function (panel) {\n _.removeFromParent(panel.getGui());\n _this.destroyBean(panel);\n });\n };\n TitlePanel.prototype.destroy = function () {\n this.destroyActivePanels();\n _super.prototype.destroy.call(this);\n };\n TitlePanel.TEMPLATE = \"
\";\n __decorate([\n Autowired('chartTranslationService')\n ], TitlePanel.prototype, \"chartTranslationService\", void 0);\n __decorate([\n PostConstruct\n ], TitlePanel.prototype, \"init\", null);\n return TitlePanel;\n}(Component));\nexport default TitlePanel;\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, Component, PostConstruct, RefSelector } from \"@ag-grid-community/core\";\nimport { PaddingPanel } from \"./paddingPanel\";\nimport { BackgroundPanel } from \"./backgroundPanel\";\nimport TitlePanel from \"./titlePanel\";\nvar ChartPanel = /** @class */ (function (_super) {\n __extends(ChartPanel, _super);\n function ChartPanel(chartOptionsService) {\n var _this = _super.call(this) || this;\n _this.chartOptionsService = chartOptionsService;\n _this.activePanels = [];\n return _this;\n }\n ChartPanel.prototype.init = function () {\n var groupParams = {\n cssIdentifier: 'charts-format-top-level',\n direction: 'vertical'\n };\n this.setTemplate(ChartPanel.TEMPLATE, { chartGroup: groupParams });\n this.initGroup();\n this.initTitles();\n this.initPaddingPanel();\n this.initBackgroundPanel();\n };\n ChartPanel.prototype.initGroup = function () {\n this.chartGroup\n .setTitle(this.chartTranslationService.translate('chart'))\n .toggleGroupExpand(false)\n .hideEnabledCheckbox(true);\n };\n ChartPanel.prototype.initTitles = function () {\n var titlePanelComp = this.createBean(new TitlePanel(this.chartOptionsService));\n this.chartGroup.addItem(titlePanelComp);\n this.activePanels.push(titlePanelComp);\n };\n ChartPanel.prototype.initPaddingPanel = function () {\n var paddingPanelComp = this.createBean(new PaddingPanel(this.chartOptionsService));\n this.chartGroup.addItem(paddingPanelComp);\n this.activePanels.push(paddingPanelComp);\n };\n ChartPanel.prototype.initBackgroundPanel = function () {\n var backgroundPanelComp = this.createBean(new BackgroundPanel(this.chartOptionsService));\n this.chartGroup.addItem(backgroundPanelComp);\n this.activePanels.push(backgroundPanelComp);\n };\n ChartPanel.prototype.destroyActivePanels = function () {\n var _this = this;\n this.activePanels.forEach(function (panel) {\n _.removeFromParent(panel.getGui());\n _this.destroyBean(panel);\n });\n };\n ChartPanel.prototype.destroy = function () {\n this.destroyActivePanels();\n _super.prototype.destroy.call(this);\n };\n ChartPanel.TEMPLATE = \"
\\n \\n
\";\n __decorate([\n RefSelector('chartGroup')\n ], ChartPanel.prototype, \"chartGroup\", void 0);\n __decorate([\n Autowired('chartTranslationService')\n ], ChartPanel.prototype, \"chartTranslationService\", void 0);\n __decorate([\n PostConstruct\n ], ChartPanel.prototype, \"init\", null);\n return ChartPanel;\n}(Component));\nexport { ChartPanel };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Component, PostConstruct, RefSelector, } from \"@ag-grid-community/core\";\nimport { getMaxValue } from \"../formatPanel\";\nvar ShadowPanel = /** @class */ (function (_super) {\n __extends(ShadowPanel, _super);\n function ShadowPanel(chartOptionsService, getSelectedSeries) {\n var _this = _super.call(this) || this;\n _this.chartOptionsService = chartOptionsService;\n _this.getSelectedSeries = getSelectedSeries;\n return _this;\n }\n ShadowPanel.prototype.init = function () {\n var groupParams = {\n cssIdentifier: 'charts-format-sub-level',\n direction: 'vertical',\n suppressOpenCloseIcons: true\n };\n this.setTemplate(ShadowPanel.TEMPLATE, { shadowGroup: groupParams });\n this.shadowBlurSlider.setTextFieldWidth(45);\n this.shadowXOffsetSlider.setTextFieldWidth(45);\n this.shadowYOffsetSlider.setTextFieldWidth(45);\n this.initSeriesShadow();\n };\n ShadowPanel.prototype.initSeriesShadow = function () {\n var _this = this;\n this.shadowGroup\n .setTitle(this.chartTranslationService.translate(\"shadow\"))\n .setEnabled(this.chartOptionsService.getSeriesOption(\"shadow.enabled\", this.getSelectedSeries()))\n .hideOpenCloseIcons(true)\n .hideEnabledCheckbox(false)\n .onEnableChange(function (newValue) { return _this.chartOptionsService.setSeriesOption(\"shadow.enabled\", newValue, _this.getSelectedSeries()); });\n this.shadowColorPicker\n .setLabel(this.chartTranslationService.translate(\"color\"))\n .setLabelWidth(\"flex\")\n .setInputWidth(45)\n .setValue(this.chartOptionsService.getSeriesOption(\"shadow.color\", this.getSelectedSeries()))\n .onValueChange(function (newValue) { return _this.chartOptionsService.setSeriesOption(\"shadow.color\", newValue, _this.getSelectedSeries()); });\n var initInput = function (input, property, minValue, defaultMaxValue) {\n var currentValue = _this.chartOptionsService.getSeriesOption(\"shadow.\" + property, _this.getSelectedSeries());\n input.setLabel(_this.chartTranslationService.translate(property))\n .setMinValue(minValue)\n .setMaxValue(getMaxValue(currentValue, defaultMaxValue))\n .setValue(\"\" + currentValue)\n .onValueChange(function (newValue) { return _this.chartOptionsService.setSeriesOption(\"shadow.\" + property, newValue, _this.getSelectedSeries()); });\n };\n initInput(this.shadowBlurSlider, \"blur\", 0, 20);\n initInput(this.shadowXOffsetSlider, \"xOffset\", -10, 10);\n initInput(this.shadowYOffsetSlider, \"yOffset\", -10, 10);\n };\n ShadowPanel.TEMPLATE = \"
\\n \\n \\n \\n \\n \\n \\n
\";\n __decorate([\n RefSelector('shadowGroup')\n ], ShadowPanel.prototype, \"shadowGroup\", void 0);\n __decorate([\n RefSelector('shadowColorPicker')\n ], ShadowPanel.prototype, \"shadowColorPicker\", void 0);\n __decorate([\n RefSelector('shadowBlurSlider')\n ], ShadowPanel.prototype, \"shadowBlurSlider\", void 0);\n __decorate([\n RefSelector('shadowXOffsetSlider')\n ], ShadowPanel.prototype, \"shadowXOffsetSlider\", void 0);\n __decorate([\n RefSelector('shadowYOffsetSlider')\n ], ShadowPanel.prototype, \"shadowYOffsetSlider\", void 0);\n __decorate([\n Autowired('chartTranslationService')\n ], ShadowPanel.prototype, \"chartTranslationService\", void 0);\n __decorate([\n PostConstruct\n ], ShadowPanel.prototype, \"init\", null);\n return ShadowPanel;\n}(Component));\nexport { ShadowPanel };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, Component, PostConstruct, RefSelector } from \"@ag-grid-community/core\";\nimport { getMaxValue } from \"../formatPanel\";\nvar MarkersPanel = /** @class */ (function (_super) {\n __extends(MarkersPanel, _super);\n function MarkersPanel(chartOptionsService, getSelectedSeries) {\n var _this = _super.call(this) || this;\n _this.chartOptionsService = chartOptionsService;\n _this.getSelectedSeries = getSelectedSeries;\n return _this;\n }\n MarkersPanel.prototype.init = function () {\n var groupParams = {\n cssIdentifier: 'charts-format-sub-level',\n direction: 'vertical'\n };\n this.setTemplate(MarkersPanel.TEMPLATE, { seriesMarkersGroup: groupParams });\n this.initMarkers();\n };\n MarkersPanel.prototype.initMarkers = function () {\n var _this = this;\n var seriesMarkerShapeOptions = [\n {\n value: 'square',\n text: 'Square'\n },\n {\n value: 'circle',\n text: 'Circle'\n },\n {\n value: 'cross',\n text: 'Cross'\n },\n {\n value: 'diamond',\n text: 'Diamond'\n },\n {\n value: 'plus',\n text: 'Plus'\n },\n {\n value: 'triangle',\n text: 'Triangle'\n },\n {\n value: 'heart',\n text: 'Heart'\n }\n ];\n this.seriesMarkerShapeSelect\n .addOptions(seriesMarkerShapeOptions)\n .setLabel(this.chartTranslationService.translate('shape'))\n .setValue(this.getSeriesOption(\"marker.shape\"))\n .onValueChange(function (value) { return _this.setSeriesOption(\"marker.shape\", value); });\n // scatter charts should always show markers\n var chartType = this.chartOptionsService.getChartType();\n var shouldHideEnabledCheckbox = _.includes(['scatter', 'bubble'], chartType);\n this.seriesMarkersGroup\n .setTitle(this.chartTranslationService.translate(\"markers\"))\n .hideEnabledCheckbox(shouldHideEnabledCheckbox)\n .setEnabled(this.getSeriesOption(\"marker.enabled\") || false)\n .hideOpenCloseIcons(true)\n .onEnableChange(function (newValue) { return _this.setSeriesOption(\"marker.enabled\", newValue); });\n var initInput = function (expression, input, labelKey, defaultMaxValue) {\n var currentValue = _this.getSeriesOption(expression);\n input.setLabel(_this.chartTranslationService.translate(labelKey))\n .setMaxValue(getMaxValue(currentValue, defaultMaxValue))\n .setValue(\"\" + currentValue)\n .setTextFieldWidth(45)\n .onValueChange(function (newValue) { return _this.setSeriesOption(expression, newValue); });\n };\n if (chartType === 'bubble') {\n initInput(\"marker.maxSize\", this.seriesMarkerMinSizeSlider, \"maxSize\", 60);\n initInput(\"marker.size\", this.seriesMarkerSizeSlider, \"minSize\", 60);\n }\n else {\n this.seriesMarkerMinSizeSlider.setDisplayed(false);\n initInput(\"marker.size\", this.seriesMarkerSizeSlider, \"size\", 60);\n }\n initInput(\"marker.strokeWidth\", this.seriesMarkerStrokeWidthSlider, \"strokeWidth\", 10);\n };\n MarkersPanel.prototype.getSeriesOption = function (expression) {\n return this.chartOptionsService.getSeriesOption(expression, this.getSelectedSeries());\n };\n MarkersPanel.prototype.setSeriesOption = function (expression, newValue) {\n this.chartOptionsService.setSeriesOption(expression, newValue, this.getSelectedSeries());\n };\n MarkersPanel.TEMPLATE = \"
\\n \\n \\n \\n \\n \\n \\n
\";\n __decorate([\n RefSelector('seriesMarkersGroup')\n ], MarkersPanel.prototype, \"seriesMarkersGroup\", void 0);\n __decorate([\n RefSelector('seriesMarkerShapeSelect')\n ], MarkersPanel.prototype, \"seriesMarkerShapeSelect\", void 0);\n __decorate([\n RefSelector('seriesMarkerSizeSlider')\n ], MarkersPanel.prototype, \"seriesMarkerSizeSlider\", void 0);\n __decorate([\n RefSelector('seriesMarkerMinSizeSlider')\n ], MarkersPanel.prototype, \"seriesMarkerMinSizeSlider\", void 0);\n __decorate([\n RefSelector('seriesMarkerStrokeWidthSlider')\n ], MarkersPanel.prototype, \"seriesMarkerStrokeWidthSlider\", void 0);\n __decorate([\n Autowired('chartTranslationService')\n ], MarkersPanel.prototype, \"chartTranslationService\", void 0);\n __decorate([\n PostConstruct\n ], MarkersPanel.prototype, \"init\", null);\n return MarkersPanel;\n}(Component));\nexport { MarkersPanel };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Component, PostConstruct, RefSelector } from \"@ag-grid-community/core\";\nimport { getMaxValue } from \"../formatPanel\";\nvar CalloutPanel = /** @class */ (function (_super) {\n __extends(CalloutPanel, _super);\n function CalloutPanel(chartOptionsService, getSelectedSeries) {\n var _this = _super.call(this) || this;\n _this.chartOptionsService = chartOptionsService;\n _this.getSelectedSeries = getSelectedSeries;\n return _this;\n }\n CalloutPanel.prototype.init = function () {\n var groupParams = {\n cssIdentifier: 'charts-format-sub-level',\n direction: 'vertical'\n };\n this.setTemplate(CalloutPanel.TEMPLATE, { calloutGroup: groupParams });\n this.initCalloutOptions();\n };\n CalloutPanel.prototype.initCalloutOptions = function () {\n var _this = this;\n this.calloutGroup\n .setTitle(this.chartTranslationService.translate(\"callout\"))\n .setEnabled(true)\n .hideOpenCloseIcons(true)\n .hideEnabledCheckbox(true);\n var initInput = function (expression, input, labelKey, defaultMaxValue) {\n var currentValue = _this.chartOptionsService.getSeriesOption(expression, _this.getSelectedSeries());\n input.setLabel(_this.chartTranslationService.translate(labelKey))\n .setMaxValue(getMaxValue(currentValue, defaultMaxValue))\n .setValue(\"\" + currentValue)\n .setTextFieldWidth(45)\n .onValueChange(function (newValue) { return _this.chartOptionsService.setSeriesOption(expression, newValue, _this.getSelectedSeries()); });\n };\n initInput(\"callout.length\", this.calloutLengthSlider, \"length\", 40);\n initInput(\"callout.strokeWidth\", this.calloutStrokeWidthSlider, \"strokeWidth\", 10);\n initInput(\"label.offset\", this.labelOffsetSlider, \"offset\", 30);\n };\n CalloutPanel.TEMPLATE = \"
\\n \\n \\n \\n \\n \\n
\";\n __decorate([\n RefSelector('calloutGroup')\n ], CalloutPanel.prototype, \"calloutGroup\", void 0);\n __decorate([\n RefSelector('calloutLengthSlider')\n ], CalloutPanel.prototype, \"calloutLengthSlider\", void 0);\n __decorate([\n RefSelector('calloutStrokeWidthSlider')\n ], CalloutPanel.prototype, \"calloutStrokeWidthSlider\", void 0);\n __decorate([\n RefSelector('labelOffsetSlider')\n ], CalloutPanel.prototype, \"labelOffsetSlider\", void 0);\n __decorate([\n Autowired('chartTranslationService')\n ], CalloutPanel.prototype, \"chartTranslationService\", void 0);\n __decorate([\n PostConstruct\n ], CalloutPanel.prototype, \"init\", null);\n return CalloutPanel;\n}(Component));\nexport { CalloutPanel };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, AgSelect, AgSlider, AgToggleButton, Autowired, Component, PostConstruct, RefSelector } from \"@ag-grid-community/core\";\nimport { ShadowPanel } from \"./shadowPanel\";\nimport { FontPanel } from \"../fontPanel\";\nimport { initFontPanelParams } from \"./fontPanelParams\";\nimport { getMaxValue } from \"../formatPanel\";\nimport { MarkersPanel } from \"./markersPanel\";\nimport { ChartController } from \"../../../chartController\";\nimport { getSeriesType } from \"../../../utils/seriesTypeMapper\";\nimport { CalloutPanel } from \"./calloutPanel\";\nvar SeriesPanel = /** @class */ (function (_super) {\n __extends(SeriesPanel, _super);\n function SeriesPanel(chartController, chartOptionsService, seriesType) {\n var _this = _super.call(this) || this;\n _this.chartController = chartController;\n _this.chartOptionsService = chartOptionsService;\n _this.activePanels = [];\n _this.widgetFuncs = {\n 'lineWidth': function () { return _this.initLineWidth(); },\n 'strokeWidth': function () { return _this.initStrokeWidth(); },\n 'lineDash': function () { return _this.initLineDash(); },\n 'lineOpacity': function () { return _this.initLineOpacity(); },\n 'fillOpacity': function () { return _this.initFillOpacity(); },\n 'markers': function () { return _this.initMarkers(); },\n 'labels': function () { return _this.initLabels(); },\n 'shadow': function () { return _this.initShadow(); },\n 'tooltips': function () { return _this.initTooltips(); },\n 'bins': function () { return _this.initBins(); },\n };\n _this.seriesWidgetMappings = {\n 'area': ['tooltips', 'lineWidth', 'lineDash', 'lineOpacity', 'fillOpacity', 'markers', 'labels', 'shadow'],\n 'bar': ['tooltips', 'strokeWidth', 'lineDash', 'lineOpacity', 'fillOpacity', 'labels', 'shadow'],\n 'column': ['tooltips', 'strokeWidth', 'lineDash', 'lineOpacity', 'fillOpacity', 'labels', 'shadow'],\n 'line': ['tooltips', 'lineWidth', 'lineDash', 'lineOpacity', 'markers', 'labels'],\n 'histogram': ['tooltips', 'bins', 'strokeWidth', 'lineDash', 'lineOpacity', 'fillOpacity', 'labels', 'shadow'],\n 'scatter': ['tooltips', 'markers', 'labels'],\n 'pie': ['tooltips', 'strokeWidth', 'lineOpacity', 'fillOpacity', 'labels', 'shadow'],\n };\n _this.seriesType = seriesType || _this.getChartSeriesType();\n return _this;\n }\n SeriesPanel.prototype.init = function () {\n var groupParams = {\n cssIdentifier: 'charts-format-top-level',\n direction: 'vertical'\n };\n this.setTemplate(SeriesPanel.TEMPLATE, { seriesGroup: groupParams });\n this.seriesGroup\n .setTitle(this.translate(\"series\"))\n .toggleGroupExpand(false)\n .hideEnabledCheckbox(true);\n this.addManagedListener(this.chartController, ChartController.EVENT_CHART_SERIES_CHART_TYPE_CHANGED, this.refreshWidgets.bind(this));\n this.refreshWidgets();\n };\n SeriesPanel.prototype.refreshWidgets = function () {\n var _this = this;\n this.destroyActivePanels();\n if (this.chartController.isComboChart()) {\n this.updateSeriesType();\n this.initSeriesSelect();\n }\n this.seriesWidgetMappings[this.seriesType].forEach(function (w) { return _this.widgetFuncs[w](); });\n };\n SeriesPanel.prototype.initSeriesSelect = function () {\n var _this = this;\n var seriesSelect = this.seriesGroup.createManagedBean(new AgSelect());\n seriesSelect\n .setLabel(this.translate('seriesType'))\n .setLabelAlignment(\"left\")\n .setLabelWidth('flex')\n .setInputWidth(100)\n .addOptions(this.getSeriesSelectOptions())\n .setValue(\"\" + this.seriesType)\n .onValueChange(function (newValue) {\n _this.seriesType = newValue;\n _this.refreshWidgets();\n });\n this.seriesGroup.addItem(seriesSelect);\n this.activePanels.push(seriesSelect);\n };\n SeriesPanel.prototype.initTooltips = function () {\n var _this = this;\n var seriesTooltipsToggle = this.createBean(new AgToggleButton());\n seriesTooltipsToggle\n .setLabel(this.translate(\"tooltips\"))\n .setLabelAlignment(\"left\")\n .setLabelWidth(\"flex\")\n .setInputWidth(45)\n .setValue(this.getSeriesOption(\"tooltip.enabled\") || false)\n .onValueChange(function (newValue) { return _this.setSeriesOption(\"tooltip.enabled\", newValue); });\n this.addWidget(seriesTooltipsToggle);\n };\n SeriesPanel.prototype.initStrokeWidth = function () {\n var _this = this;\n var currentValue = this.getSeriesOption(\"strokeWidth\");\n var seriesStrokeWidthSlider = this.createBean(new AgSlider());\n seriesStrokeWidthSlider\n .setLabel(this.translate(\"strokeWidth\"))\n .setMaxValue(getMaxValue(currentValue, 10))\n .setTextFieldWidth(45)\n .setValue(\"\" + currentValue)\n .onValueChange(function (newValue) { return _this.setSeriesOption(\"strokeWidth\", newValue); });\n this.addWidget(seriesStrokeWidthSlider);\n };\n SeriesPanel.prototype.initLineWidth = function () {\n var _this = this;\n var currentValue = this.getSeriesOption(\"strokeWidth\");\n var seriesLineWidthSlider = this.createBean(new AgSlider());\n seriesLineWidthSlider\n .setLabel(this.translate('lineWidth'))\n .setMaxValue(getMaxValue(currentValue, 10))\n .setTextFieldWidth(45)\n .setValue(\"\" + currentValue)\n .onValueChange(function (newValue) { return _this.setSeriesOption(\"strokeWidth\", newValue); });\n this.addWidget(seriesLineWidthSlider);\n };\n SeriesPanel.prototype.initLineDash = function () {\n var _this = this;\n var lineDash = this.getSeriesOption(\"lineDash\");\n var currentValue = lineDash ? lineDash[0] : 0;\n var seriesLineDashSlider = this.createBean(new AgSlider());\n seriesLineDashSlider\n .setLabel(this.translate('lineDash'))\n .setMaxValue(getMaxValue(currentValue, 30))\n .setTextFieldWidth(45)\n .setValue(\"\" + currentValue)\n .onValueChange(function (newValue) { return _this.setSeriesOption(\"lineDash\", [newValue]); });\n this.addWidget(seriesLineDashSlider);\n };\n SeriesPanel.prototype.initLineOpacity = function () {\n var _this = this;\n var currentValue = this.getSeriesOption(\"strokeOpacity\");\n var seriesLineOpacitySlider = this.createBean(new AgSlider());\n seriesLineOpacitySlider\n .setLabel(this.translate(\"strokeOpacity\"))\n .setStep(0.05)\n .setMaxValue(getMaxValue(currentValue, 1))\n .setTextFieldWidth(45)\n .setValue(\"\" + currentValue)\n .onValueChange(function (newValue) { return _this.setSeriesOption(\"strokeOpacity\", newValue); });\n this.addWidget(seriesLineOpacitySlider);\n };\n SeriesPanel.prototype.initFillOpacity = function () {\n var _this = this;\n var currentValue = this.getSeriesOption(\"fillOpacity\");\n var seriesFillOpacitySlider = this.createBean(new AgSlider());\n seriesFillOpacitySlider\n .setLabel(this.translate(\"fillOpacity\"))\n .setStep(0.05)\n .setMaxValue(getMaxValue(currentValue, 1))\n .setTextFieldWidth(45)\n .setValue(\"\" + currentValue)\n .onValueChange(function (newValue) { return _this.setSeriesOption(\"fillOpacity\", newValue); });\n this.addWidget(seriesFillOpacitySlider);\n };\n SeriesPanel.prototype.initLabels = function () {\n var _this = this;\n var params = initFontPanelParams(this.chartTranslationService, this.chartOptionsService, function () { return _this.seriesType; });\n var labelPanelComp = this.createBean(new FontPanel(params));\n if (this.seriesType === 'pie') {\n var calloutPanelComp = this.createBean(new CalloutPanel(this.chartOptionsService, function () { return _this.seriesType; }));\n labelPanelComp.addCompToPanel(calloutPanelComp);\n this.activePanels.push(calloutPanelComp);\n }\n this.addWidget(labelPanelComp);\n };\n SeriesPanel.prototype.initShadow = function () {\n var _this = this;\n var shadowPanelComp = this.createBean(new ShadowPanel(this.chartOptionsService, function () { return _this.seriesType; }));\n this.addWidget(shadowPanelComp);\n };\n SeriesPanel.prototype.initMarkers = function () {\n var _this = this;\n var markersPanelComp = this.createBean(new MarkersPanel(this.chartOptionsService, function () { return _this.seriesType; }));\n this.addWidget(markersPanelComp);\n };\n SeriesPanel.prototype.initBins = function () {\n var _this = this;\n var currentValue = this.getSeriesOption(\"binCount\");\n var seriesBinCountSlider = this.createBean(new AgSlider());\n seriesBinCountSlider\n .setLabel(this.translate(\"histogramBinCount\"))\n .setMinValue(4)\n .setMaxValue(getMaxValue(currentValue, 100))\n .setTextFieldWidth(45)\n .setValue(\"\" + currentValue)\n .onValueChange(function (newValue) { return _this.setSeriesOption(\"binCount\", newValue); });\n this.addWidget(seriesBinCountSlider);\n };\n SeriesPanel.prototype.addWidget = function (widget) {\n this.seriesGroup.addItem(widget);\n this.activePanels.push(widget);\n };\n SeriesPanel.prototype.getSeriesOption = function (expression) {\n return this.chartOptionsService.getSeriesOption(expression, this.seriesType);\n };\n SeriesPanel.prototype.setSeriesOption = function (expression, newValue) {\n this.chartOptionsService.setSeriesOption(expression, newValue, this.seriesType);\n };\n SeriesPanel.prototype.getChartSeriesType = function () {\n var ct = this.chartController.getSeriesChartTypes()[0].chartType;\n return (ct === 'columnLineCombo') ? 'column' : (ct === 'areaColumnCombo') ? 'area' : getSeriesType(ct);\n };\n SeriesPanel.prototype.getSeriesSelectOptions = function () {\n var _this = this;\n if (!this.seriesSelectOptions) {\n // lazy init options as they are only required for combo charts\n this.seriesSelectOptions = new Map([\n ['area', { value: 'area', text: this.translate('area', 'Area') }],\n ['bar', { value: 'bar', text: this.translate('bar', 'Bar') }],\n ['column', { value: 'column', text: this.translate('column', 'Column') }],\n ['line', { value: 'line', text: this.translate('line', 'Line') }],\n ['scatter', { value: 'scatter', text: this.translate('scatter', 'Scatter') }],\n ['histogram', { value: 'histogram', text: this.translate('histogram', 'Histogram') }],\n ['pie', { value: 'pie', text: this.translate('pie', 'Pie') }],\n ]);\n }\n var seriesSelectOptions = new Set();\n this.chartController.getActiveSeriesChartTypes().forEach(function (s) {\n var chartType = getSeriesType(s.chartType);\n seriesSelectOptions.add(_this.seriesSelectOptions.get(chartType));\n });\n return Array.from(seriesSelectOptions);\n };\n SeriesPanel.prototype.updateSeriesType = function () {\n var activeChartTypes = this.chartController.getActiveSeriesChartTypes().map(function (s) { return getSeriesType(s.chartType); });\n var invalidSeriesType = !activeChartTypes.includes(this.seriesType);\n if (invalidSeriesType && activeChartTypes.length > 0) {\n this.seriesType = activeChartTypes[0]; // default to first active series type\n }\n };\n SeriesPanel.prototype.translate = function (key, defaultText) {\n return this.chartTranslationService.translate(key, defaultText);\n };\n SeriesPanel.prototype.destroyActivePanels = function () {\n var _this = this;\n this.activePanels.forEach(function (panel) {\n _.removeFromParent(panel.getGui());\n _this.destroyBean(panel);\n });\n };\n SeriesPanel.prototype.destroy = function () {\n this.destroyActivePanels();\n _super.prototype.destroy.call(this);\n };\n SeriesPanel.TEMPLATE = \"
\\n \\n \\n
\";\n __decorate([\n RefSelector('seriesGroup')\n ], SeriesPanel.prototype, \"seriesGroup\", void 0);\n __decorate([\n Autowired('chartTranslationService')\n ], SeriesPanel.prototype, \"chartTranslationService\", void 0);\n __decorate([\n PostConstruct\n ], SeriesPanel.prototype, \"init\", null);\n return SeriesPanel;\n}(Component));\nexport { SeriesPanel };\n","export function initFontPanelParams(chartTranslationService, chartOptionsService, getSelectedSeries) {\n var initialFont = {\n family: chartOptionsService.getSeriesOption(\"label.fontFamily\", getSelectedSeries()),\n style: chartOptionsService.getSeriesOption(\"label.fontStyle\", getSelectedSeries()),\n weight: chartOptionsService.getSeriesOption(\"label.fontWeight\", getSelectedSeries()),\n size: chartOptionsService.getSeriesOption(\"label.fontSize\", getSelectedSeries()),\n color: chartOptionsService.getSeriesOption(\"label.color\", getSelectedSeries())\n };\n var setFont = function (font) {\n if (font.family) {\n chartOptionsService.setSeriesOption(\"label.fontFamily\", font.family, getSelectedSeries());\n }\n if (font.weight) {\n chartOptionsService.setSeriesOption(\"label.fontWeight\", font.weight, getSelectedSeries());\n }\n if (font.style) {\n chartOptionsService.setSeriesOption(\"label.fontStyle\", font.style, getSelectedSeries());\n }\n if (font.size) {\n chartOptionsService.setSeriesOption(\"label.fontSize\", font.size, getSelectedSeries());\n }\n if (font.color) {\n chartOptionsService.setSeriesOption(\"label.color\", font.color, getSelectedSeries());\n }\n };\n var params = {\n name: chartTranslationService.translate('labels'),\n enabled: chartOptionsService.getSeriesOption(\"label.enabled\", getSelectedSeries()) || false,\n setEnabled: function (enabled) { return chartOptionsService.setSeriesOption(\"label.enabled\", enabled, getSelectedSeries()); },\n suppressEnabledCheckbox: false,\n initialFont: initialFont,\n setFont: setFont\n };\n return params;\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Component, PostConstruct } from \"@ag-grid-community/core\";\nimport { ChartController } from \"../../chartController\";\nimport { LegendPanel } from \"./legend/legendPanel\";\nimport { AxisPanel } from \"./axis/axisPanel\";\nimport { NavigatorPanel } from \"./navigator/navigatorPanel\";\nimport { ChartPanel } from \"./chart/chartPanel\";\nimport { SeriesPanel } from \"./series/seriesPanel\";\nexport function getMaxValue(currentValue, defaultMaxValue) {\n return Math.max(currentValue, defaultMaxValue);\n}\nvar FormatPanel = /** @class */ (function (_super) {\n __extends(FormatPanel, _super);\n function FormatPanel(chartController, chartOptionsService) {\n var _this = _super.call(this, FormatPanel.TEMPLATE) || this;\n _this.chartController = chartController;\n _this.chartOptionsService = chartOptionsService;\n _this.panels = [];\n return _this;\n }\n FormatPanel.prototype.init = function () {\n this.createPanels();\n this.addManagedListener(this.chartController, ChartController.EVENT_CHART_UPDATED, this.createPanels.bind(this));\n };\n FormatPanel.prototype.createPanels = function () {\n var chartType = this.chartController.getChartType();\n var isGrouping = this.chartController.isGrouping();\n if (chartType === this.chartType && isGrouping === this.isGrouping) {\n // existing panels can be re-used\n return;\n }\n this.destroyPanels();\n this.addComponent(new ChartPanel(this.chartOptionsService));\n this.addComponent(new LegendPanel(this.chartOptionsService));\n switch (chartType) {\n case 'groupedColumn':\n case 'stackedColumn':\n case 'normalizedColumn':\n this.addComponent(new AxisPanel(this.chartController, this.chartOptionsService));\n this.addComponent(new SeriesPanel(this.chartController, this.chartOptionsService, 'column'));\n this.addComponent(new NavigatorPanel(this.chartOptionsService));\n break;\n case 'groupedBar':\n case 'stackedBar':\n case 'normalizedBar':\n this.addComponent(new AxisPanel(this.chartController, this.chartOptionsService));\n this.addComponent(new SeriesPanel(this.chartController, this.chartOptionsService, 'bar'));\n this.addComponent(new NavigatorPanel(this.chartOptionsService));\n break;\n case 'pie':\n case 'doughnut':\n this.addComponent(new SeriesPanel(this.chartController, this.chartOptionsService, 'pie'));\n break;\n case 'line':\n this.addComponent(new AxisPanel(this.chartController, this.chartOptionsService));\n this.addComponent(new SeriesPanel(this.chartController, this.chartOptionsService, 'line'));\n this.addComponent(new NavigatorPanel(this.chartOptionsService));\n break;\n case 'scatter':\n case 'bubble':\n this.addComponent(new AxisPanel(this.chartController, this.chartOptionsService));\n this.addComponent(new SeriesPanel(this.chartController, this.chartOptionsService, 'scatter'));\n this.addComponent(new NavigatorPanel(this.chartOptionsService));\n break;\n case 'area':\n case 'stackedArea':\n case 'normalizedArea':\n this.addComponent(new AxisPanel(this.chartController, this.chartOptionsService));\n this.addComponent(new SeriesPanel(this.chartController, this.chartOptionsService, 'area'));\n this.addComponent(new NavigatorPanel(this.chartOptionsService));\n break;\n case 'histogram':\n this.addComponent(new AxisPanel(this.chartController, this.chartOptionsService));\n this.addComponent(new SeriesPanel(this.chartController, this.chartOptionsService, 'histogram'));\n this.addComponent(new NavigatorPanel(this.chartOptionsService));\n break;\n case 'columnLineCombo':\n case 'areaColumnCombo':\n case 'customCombo':\n this.addComponent(new AxisPanel(this.chartController, this.chartOptionsService));\n // there is no single series type supplied for combo charts, it is inferred by the Series Panel\n this.addComponent(new SeriesPanel(this.chartController, this.chartOptionsService));\n this.addComponent(new NavigatorPanel(this.chartOptionsService));\n break;\n default:\n // warn vanilla javascript users when they supply invalid chart type\n console.warn(\"AG Grid: ChartFormattingPanel - unexpected chart type index: \" + chartType + \" supplied\");\n }\n this.chartType = chartType;\n this.isGrouping = isGrouping;\n };\n FormatPanel.prototype.addComponent = function (component) {\n this.createBean(component);\n this.panels.push(component);\n component.addCssClass('ag-chart-format-section');\n this.getGui().appendChild(component.getGui());\n };\n FormatPanel.prototype.destroyPanels = function () {\n var _this = this;\n this.panels.forEach(function (panel) {\n _.removeFromParent(panel.getGui());\n _this.destroyBean(panel);\n });\n };\n FormatPanel.prototype.destroy = function () {\n this.destroyPanels();\n _super.prototype.destroy.call(this);\n };\n FormatPanel.TEMPLATE = \"
\";\n __decorate([\n PostConstruct\n ], FormatPanel.prototype, \"init\", null);\n return FormatPanel;\n}(Component));\nexport { FormatPanel };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Component, PostConstruct } from \"@ag-grid-community/core\";\nimport { Group, Scene } from \"ag-charts-community\";\nvar MiniChart = /** @class */ (function (_super) {\n __extends(MiniChart, _super);\n function MiniChart(container, tooltipName) {\n var _this = _super.call(this) || this;\n _this.size = 58;\n _this.padding = 5;\n _this.root = new Group();\n var scene = new Scene(window.document, _this.size, _this.size);\n scene.canvas.element.classList.add('ag-chart-mini-thumbnail-canvas');\n scene.root = _this.root;\n scene.container = container;\n _this.scene = scene;\n _this.tooltipName = tooltipName;\n return _this;\n }\n MiniChart.prototype.init = function () {\n this.scene.canvas.element.title = this.chartTranslationService.translate(this.tooltipName);\n };\n __decorate([\n Autowired('chartTranslationService')\n ], MiniChart.prototype, \"chartTranslationService\", void 0);\n __decorate([\n PostConstruct\n ], MiniChart.prototype, \"init\", null);\n return MiniChart;\n}(Component));\nexport { MiniChart };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { PostConstruct } from \"@ag-grid-community/core\";\nimport { MiniChart } from \"./miniChart\";\nimport { Line } from \"ag-charts-community\";\nvar MiniChartWithAxes = /** @class */ (function (_super) {\n __extends(MiniChartWithAxes, _super);\n function MiniChartWithAxes(container, tooltipName) {\n var _this = _super.call(this, container, tooltipName) || this;\n _this.stroke = 'gray';\n _this.axisOvershoot = 3;\n return _this;\n }\n MiniChartWithAxes.prototype.addAxes = function () {\n var size = this.size;\n var padding = this.padding;\n var leftAxis = new Line();\n leftAxis.x1 = padding;\n leftAxis.y1 = padding;\n leftAxis.x2 = padding;\n leftAxis.y2 = size - padding + this.axisOvershoot;\n leftAxis.stroke = this.stroke;\n var bottomAxis = new Line();\n bottomAxis.x1 = padding - this.axisOvershoot + 1;\n bottomAxis.y1 = size - padding;\n bottomAxis.x2 = size - padding + 1;\n bottomAxis.y2 = size - padding;\n bottomAxis.stroke = this.stroke;\n var root = this.root;\n root.append(leftAxis);\n root.append(bottomAxis);\n };\n __decorate([\n PostConstruct\n ], MiniChartWithAxes.prototype, \"addAxes\", null);\n return MiniChartWithAxes;\n}(MiniChart));\nexport { MiniChartWithAxes };\n","import { BandScale, ClipRect, LinearScale, Path, Rect } from \"ag-charts-community\";\nexport function createColumnRects(params) {\n var stacked = params.stacked, size = params.size, padding = params.padding, xScalePadding = params.xScalePadding, xScaleDomain = params.xScaleDomain, yScaleDomain = params.yScaleDomain;\n var xScale = new BandScale();\n xScale.domain = xScaleDomain;\n xScale.range = [padding, size - padding];\n xScale.paddingInner = xScalePadding;\n xScale.paddingOuter = xScalePadding;\n var yScale = new LinearScale();\n yScale.domain = yScaleDomain;\n yScale.range = [size - padding, padding];\n var createBars = function (series, xScale, yScale) {\n return series.map(function (datum, i) {\n var top = yScale.convert(datum);\n var rect = new Rect();\n rect.x = xScale.convert(i);\n rect.y = top;\n rect.width = xScale.bandwidth;\n rect.height = yScale.convert(0) - top;\n rect.strokeWidth = 1;\n rect.crisp = true;\n return rect;\n });\n };\n if (stacked) {\n return params.data.map(function (d) { return createBars(d, xScale, yScale); });\n }\n return createBars(params.data, xScale, yScale);\n}\nexport function createLinePaths(root, data, size, padding) {\n var xScale = new LinearScale();\n xScale.domain = [0, 4];\n xScale.range = [padding, size - padding];\n var yScale = new LinearScale();\n yScale.domain = [0, 10];\n yScale.range = [size - padding, padding];\n var lines = data.map(function (series) {\n var line = new Path();\n line.strokeWidth = 3;\n line.lineCap = \"round\";\n line.fill = undefined;\n series.forEach(function (datum, i) {\n line.path[i > 0 ? \"lineTo\" : \"moveTo\"](xScale.convert(i), yScale.convert(datum));\n });\n return line;\n });\n var clipRect = new ClipRect();\n clipRect.x = clipRect.y = padding;\n clipRect.width = clipRect.height = size - padding * 2;\n clipRect.append(lines);\n root.append(clipRect);\n return lines;\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { MiniChartWithAxes } from \"../miniChartWithAxes\";\nimport { createColumnRects } from \"../miniChartHelpers\";\nvar MiniColumn = /** @class */ (function (_super) {\n __extends(MiniColumn, _super);\n function MiniColumn(container, fills, strokes) {\n var _this = _super.call(this, container, \"groupedColumnTooltip\") || this;\n _this.columnData = [2, 3, 4];\n var _a = _this, root = _a.root, columnData = _a.columnData, size = _a.size, padding = _a.padding;\n _this.columns = createColumnRects({\n stacked: false,\n root: root,\n data: columnData,\n size: size,\n padding: padding,\n xScaleDomain: [0, 1, 2],\n yScaleDomain: [0, 4],\n xScalePadding: 0.3\n });\n root.append(_this.columns);\n _this.updateColors(fills, strokes);\n return _this;\n }\n MiniColumn.prototype.updateColors = function (fills, strokes) {\n this.columns.forEach(function (column, i) {\n column.fill = fills[i];\n column.stroke = strokes[i];\n });\n };\n MiniColumn.chartType = 'groupedColumn';\n return MiniColumn;\n}(MiniChartWithAxes));\nexport { MiniColumn };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { MiniChartWithAxes } from \"../miniChartWithAxes\";\nimport { createColumnRects } from \"../miniChartHelpers\";\nvar MiniStackedColumn = /** @class */ (function (_super) {\n __extends(MiniStackedColumn, _super);\n function MiniStackedColumn(container, fills, strokes, data, yScaleDomain, tooltipName) {\n if (data === void 0) { data = MiniStackedColumn.data; }\n if (yScaleDomain === void 0) { yScaleDomain = [0, 16]; }\n if (tooltipName === void 0) { tooltipName = \"stackedColumnTooltip\"; }\n var _this = _super.call(this, container, tooltipName) || this;\n var _a = _this, root = _a.root, size = _a.size, padding = _a.padding;\n _this.stackedColumns = createColumnRects({\n stacked: true,\n root: root,\n data: data,\n size: size,\n padding: padding,\n xScaleDomain: [0, 1, 2],\n yScaleDomain: yScaleDomain,\n xScalePadding: 0.3,\n });\n root.append([].concat.apply([], _this.stackedColumns));\n _this.updateColors(fills, strokes);\n return _this;\n }\n MiniStackedColumn.prototype.updateColors = function (fills, strokes) {\n this.stackedColumns.forEach(function (series, i) {\n return series.forEach(function (column) {\n column.fill = fills[i];\n column.stroke = strokes[i];\n });\n });\n };\n MiniStackedColumn.chartType = 'stackedColumn';\n MiniStackedColumn.data = [\n [8, 12, 16],\n [6, 9, 12],\n [2, 3, 4]\n ];\n return MiniStackedColumn;\n}(MiniChartWithAxes));\nexport { MiniStackedColumn };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { MiniStackedColumn } from \"./miniStackedColumn\";\nvar MiniNormalizedColumn = /** @class */ (function (_super) {\n __extends(MiniNormalizedColumn, _super);\n function MiniNormalizedColumn(container, fills, strokes) {\n return _super.call(this, container, fills, strokes, MiniNormalizedColumn.data, [0, 10], \"normalizedColumnTooltip\") || this;\n }\n MiniNormalizedColumn.chartType = 'normalizedColumn';\n MiniNormalizedColumn.data = [\n [10, 10, 10],\n [6, 7, 8],\n [2, 4, 6]\n ];\n return MiniNormalizedColumn;\n}(MiniStackedColumn));\nexport { MiniNormalizedColumn };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { BandScale, LinearScale, Rect } from \"ag-charts-community\";\nimport { MiniChartWithAxes } from \"../miniChartWithAxes\";\nvar MiniBar = /** @class */ (function (_super) {\n __extends(MiniBar, _super);\n function MiniBar(container, fills, strokes) {\n var _this = _super.call(this, container, \"groupedBarTooltip\") || this;\n var padding = _this.padding;\n var size = _this.size;\n var data = [2, 3, 4];\n var yScale = new BandScale();\n yScale.domain = [0, 1, 2];\n yScale.range = [padding, size - padding];\n yScale.paddingInner = 0.3;\n yScale.paddingOuter = 0.3;\n var xScale = new LinearScale();\n xScale.domain = [0, 4];\n xScale.range = [size - padding, padding];\n var bottom = xScale.convert(0);\n var height = yScale.bandwidth;\n _this.bars = data.map(function (datum, i) {\n var rect = new Rect();\n rect.x = padding;\n rect.y = yScale.convert(i);\n rect.width = bottom - xScale.convert(datum);\n rect.height = height;\n rect.strokeWidth = 1;\n rect.crisp = true;\n return rect;\n });\n _this.updateColors(fills, strokes);\n _this.root.append(_this.bars);\n return _this;\n }\n MiniBar.prototype.updateColors = function (fills, strokes) {\n this.bars.forEach(function (bar, i) {\n bar.fill = fills[i];\n bar.stroke = strokes[i];\n });\n };\n MiniBar.chartType = 'groupedBar';\n return MiniBar;\n}(MiniChartWithAxes));\nexport { MiniBar };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { MiniChartWithAxes } from \"../miniChartWithAxes\";\nimport { BandScale, LinearScale, Rect } from \"ag-charts-community\";\nvar MiniStackedBar = /** @class */ (function (_super) {\n __extends(MiniStackedBar, _super);\n function MiniStackedBar(container, fills, strokes, data, xScaleDomain, tooltipName) {\n if (data === void 0) { data = MiniStackedBar.data; }\n if (xScaleDomain === void 0) { xScaleDomain = [0, 16]; }\n if (tooltipName === void 0) { tooltipName = \"stackedBarTooltip\"; }\n var _this = _super.call(this, container, tooltipName) || this;\n var size = _this.size;\n var padding = _this.padding;\n var yScale = new BandScale();\n yScale.domain = [0, 1, 2];\n yScale.range = [padding, size - padding];\n yScale.paddingInner = 0.3;\n yScale.paddingOuter = 0.3;\n var xScale = new LinearScale();\n xScale.domain = xScaleDomain;\n xScale.range = [size - padding, padding];\n var bottom = xScale.convert(0);\n var height = yScale.bandwidth;\n _this.bars = data.map(function (series) {\n return series.map(function (datum, i) {\n var rect = new Rect();\n rect.x = padding;\n rect.y = yScale.convert(i);\n rect.width = bottom - xScale.convert(datum);\n rect.height = height;\n rect.strokeWidth = 1;\n rect.crisp = true;\n return rect;\n });\n });\n _this.updateColors(fills, strokes);\n _this.root.append([].concat.apply([], _this.bars));\n return _this;\n }\n MiniStackedBar.prototype.updateColors = function (fills, strokes) {\n this.bars.forEach(function (series, i) {\n return series.forEach(function (bar) {\n bar.fill = fills[i];\n bar.stroke = strokes[i];\n });\n });\n };\n MiniStackedBar.chartType = 'stackedBar';\n MiniStackedBar.data = [\n [8, 12, 16],\n [6, 9, 12],\n [2, 3, 4]\n ];\n return MiniStackedBar;\n}(MiniChartWithAxes));\nexport { MiniStackedBar };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { MiniStackedBar } from \"./miniStackedBar\";\nvar MiniNormalizedBar = /** @class */ (function (_super) {\n __extends(MiniNormalizedBar, _super);\n function MiniNormalizedBar(container, fills, strokes) {\n return _super.call(this, container, fills, strokes, MiniNormalizedBar.data, [0, 10], \"normalizedBarTooltip\") || this;\n }\n MiniNormalizedBar.chartType = 'normalizedBar';\n MiniNormalizedBar.data = [\n [10, 10, 10],\n [6, 7, 8],\n [2, 4, 6]\n ];\n return MiniNormalizedBar;\n}(MiniStackedBar));\nexport { MiniNormalizedBar };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { MiniChart } from \"../miniChart\";\nimport { Sector, toRadians } from \"ag-charts-community\";\nvar MiniDoughnut = /** @class */ (function (_super) {\n __extends(MiniDoughnut, _super);\n function MiniDoughnut(container, fills, strokes, centerRadiusScaler, tooltipName) {\n if (centerRadiusScaler === void 0) { centerRadiusScaler = 0.6; }\n if (tooltipName === void 0) { tooltipName = \"doughnutTooltip\"; }\n var _this = _super.call(this, container, tooltipName) || this;\n var radius = (_this.size - _this.padding * 2) / 2;\n var center = radius + _this.padding;\n var angles = [\n [toRadians(-90), toRadians(30)],\n [toRadians(30), toRadians(120)],\n [toRadians(120), toRadians(180)],\n [toRadians(180), toRadians(210)],\n [toRadians(210), toRadians(240)],\n [toRadians(240), toRadians(270)]\n ];\n _this.sectors = angles.map(function (_a) {\n var _b = __read(_a, 2), startAngle = _b[0], endAngle = _b[1];\n var sector = new Sector();\n sector.centerX = center;\n sector.centerY = center;\n sector.innerRadius = radius * centerRadiusScaler;\n sector.outerRadius = radius;\n sector.startAngle = startAngle;\n sector.endAngle = endAngle;\n sector.stroke = undefined;\n sector.strokeWidth = 1;\n return sector;\n });\n _this.updateColors(fills, strokes);\n _this.root.append(_this.sectors);\n return _this;\n }\n MiniDoughnut.prototype.updateColors = function (fills, strokes) {\n this.sectors.forEach(function (sector, i) {\n sector.fill = fills[i % fills.length];\n sector.stroke = strokes[i % strokes.length];\n });\n };\n MiniDoughnut.chartType = 'doughnut';\n return MiniDoughnut;\n}(MiniChart));\nexport { MiniDoughnut };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { MiniDoughnut } from \"./miniDoughnut\";\nvar MiniPie = /** @class */ (function (_super) {\n __extends(MiniPie, _super);\n function MiniPie(container, fills, strokes) {\n return _super.call(this, container, fills, strokes, 0, \"pieTooltip\") || this;\n }\n MiniPie.chartType = 'pie';\n return MiniPie;\n}(MiniDoughnut));\nexport { MiniPie };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { MiniChartWithAxes } from \"../miniChartWithAxes\";\nimport { createLinePaths } from \"../miniChartHelpers\";\nvar MiniLine = /** @class */ (function (_super) {\n __extends(MiniLine, _super);\n function MiniLine(container, fills, strokes) {\n var _this = _super.call(this, container, \"lineTooltip\") || this;\n _this.data = [\n [9, 7, 8, 5, 6],\n [5, 6, 3, 4, 1],\n [1, 3, 4, 8, 7]\n ];\n _this.lines = createLinePaths(_this.root, _this.data, _this.size, _this.padding);\n _this.updateColors(fills, strokes);\n return _this;\n }\n MiniLine.prototype.updateColors = function (fills, strokes) {\n this.lines.forEach(function (line, i) {\n line.stroke = fills[i];\n });\n };\n MiniLine.chartType = 'line';\n return MiniLine;\n}(MiniChartWithAxes));\nexport { MiniLine };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { MiniChartWithAxes } from \"../miniChartWithAxes\";\nimport { Arc, ClipRect, LinearScale } from \"ag-charts-community\";\nvar MiniScatter = /** @class */ (function (_super) {\n __extends(MiniScatter, _super);\n function MiniScatter(container, fills, strokes) {\n var _this = _super.call(this, container, \"scatterTooltip\") || this;\n var size = _this.size;\n var padding = _this.padding;\n // [x, y] pairs\n var data = [\n [[0.3, 3], [1.1, 0.9], [2, 0.4], [3.4, 2.4]],\n [[0, 0.3], [1, 2], [2.4, 1.4], [3, 0]]\n ];\n var xScale = new LinearScale();\n xScale.domain = [-0.5, 4];\n xScale.range = [padding * 2, size - padding];\n var yScale = new LinearScale();\n yScale.domain = [-0.5, 3.5];\n yScale.range = [size - padding, padding];\n var points = [];\n data.forEach(function (series) {\n series.forEach(function (_a) {\n var _b = __read(_a, 2), x = _b[0], y = _b[1];\n var arc = new Arc();\n arc.strokeWidth = 1;\n arc.centerX = xScale.convert(x);\n arc.centerY = yScale.convert(y);\n arc.radiusX = arc.radiusY = 2.5;\n points.push(arc);\n });\n });\n _this.points = points;\n _this.updateColors(fills, strokes);\n var clipRect = new ClipRect();\n clipRect.x = clipRect.y = padding;\n clipRect.width = clipRect.height = size - padding * 2;\n clipRect.append(_this.points);\n _this.root.append(clipRect);\n return _this;\n }\n MiniScatter.prototype.updateColors = function (fills, strokes) {\n this.points.forEach(function (line, i) {\n line.stroke = strokes[i % strokes.length];\n line.fill = fills[i % fills.length];\n });\n };\n MiniScatter.chartType = 'scatter';\n return MiniScatter;\n}(MiniChartWithAxes));\nexport { MiniScatter };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { MiniChartWithAxes } from \"../miniChartWithAxes\";\nimport { Arc, ClipRect, LinearScale } from \"ag-charts-community\";\nvar MiniBubble = /** @class */ (function (_super) {\n __extends(MiniBubble, _super);\n function MiniBubble(container, fills, strokes) {\n var _this = _super.call(this, container, \"bubbleTooltip\") || this;\n var size = _this.size;\n var padding = _this.padding;\n // [x, y, radius] triples\n var data = [\n [[0.1, 0.3, 5], [0.5, 0.4, 7], [0.2, 0.8, 7]], [[0.8, 0.7, 5], [0.7, 0.3, 9]]\n ];\n var xScale = new LinearScale();\n xScale.domain = [0, 1];\n xScale.range = [padding * 2, size - padding];\n var yScale = new LinearScale();\n yScale.domain = [0, 1];\n yScale.range = [size - padding, padding];\n var points = [];\n data.forEach(function (series) {\n series.forEach(function (_a) {\n var _b = __read(_a, 3), x = _b[0], y = _b[1], radius = _b[2];\n var arc = new Arc();\n arc.strokeWidth = 1;\n arc.centerX = xScale.convert(x);\n arc.centerY = yScale.convert(y);\n arc.radiusX = arc.radiusY = radius;\n arc.fillOpacity = 0.7;\n points.push(arc);\n });\n });\n _this.points = points;\n _this.updateColors(fills, strokes);\n var clipRect = new ClipRect();\n clipRect.x = padding;\n clipRect.y = padding;\n clipRect.width = size - padding * 2;\n clipRect.height = size - padding * 2;\n clipRect.append(_this.points);\n _this.root.append(clipRect);\n return _this;\n }\n MiniBubble.prototype.updateColors = function (fills, strokes) {\n this.points.forEach(function (line, i) {\n line.stroke = strokes[i % strokes.length];\n line.fill = fills[i % fills.length];\n });\n };\n MiniBubble.chartType = 'bubble';\n return MiniBubble;\n}(MiniChartWithAxes));\nexport { MiniBubble };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { MiniChartWithAxes } from \"../miniChartWithAxes\";\nimport { BandScale, LinearScale, Path } from \"ag-charts-community\";\nvar MiniArea = /** @class */ (function (_super) {\n __extends(MiniArea, _super);\n function MiniArea(container, fills, strokes, data) {\n if (data === void 0) { data = MiniArea.data; }\n var _this = _super.call(this, container, \"groupedAreaTooltip\") || this;\n var size = _this.size;\n var padding = _this.padding;\n var xScale = new BandScale();\n xScale.domain = [0, 1, 2];\n xScale.paddingInner = 1;\n xScale.paddingOuter = 0;\n xScale.range = [padding + 0.5, size - padding - 0.5];\n var yScale = new LinearScale();\n yScale.domain = [0, 6];\n yScale.range = [size - padding + 0.5, padding];\n var xCount = data.length;\n var last = xCount * 2 - 1;\n var pathData = [];\n var bottomY = yScale.convert(0);\n data.forEach(function (datum, i) {\n var x = xScale.convert(i);\n datum.forEach(function (yDatum, j) {\n var y = yScale.convert(yDatum);\n var points = pathData[j] || (pathData[j] = []);\n points[i] = {\n x: x,\n y: y\n };\n points[last - i] = {\n x: x,\n y: bottomY\n };\n });\n });\n _this.areas = pathData.reverse().map(function (points) {\n var area = new Path();\n area.strokeWidth = 1;\n area.fillOpacity = 0.7;\n var path = area.path;\n path.clear();\n points.forEach(function (point, i) { return path[i > 0 ? \"lineTo\" : \"moveTo\"](point.x, point.y); });\n path.closePath();\n return area;\n });\n _this.updateColors(fills, strokes);\n _this.root.append(_this.areas);\n return _this;\n }\n MiniArea.prototype.updateColors = function (fills, strokes) {\n this.areas.forEach(function (area, i) {\n area.fill = fills[i];\n area.stroke = strokes[i];\n });\n };\n MiniArea.chartType = 'area';\n MiniArea.data = [\n [1, 3, 5],\n [2, 6, 4],\n [5, 3, 1]\n ];\n return MiniArea;\n}(MiniChartWithAxes));\nexport { MiniArea };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { MiniChartWithAxes } from \"../miniChartWithAxes\";\nimport { BandScale, LinearScale, Path } from \"ag-charts-community\";\nvar MiniStackedArea = /** @class */ (function (_super) {\n __extends(MiniStackedArea, _super);\n function MiniStackedArea(container, fills, strokes, data, tooltipName) {\n if (data === void 0) { data = MiniStackedArea.data; }\n if (tooltipName === void 0) { tooltipName = \"stackedAreaTooltip\"; }\n var _this = _super.call(this, container, tooltipName) || this;\n var size = _this.size;\n var padding = _this.padding;\n var xScale = new BandScale();\n xScale.domain = [0, 1, 2];\n xScale.paddingInner = 1;\n xScale.paddingOuter = 0;\n xScale.range = [padding + 0.5, size - padding - 0.5];\n var yScale = new LinearScale();\n yScale.domain = [0, 16];\n yScale.range = [size - padding + 0.5, padding + 0.5];\n var xCount = data.length;\n var last = xCount * 2 - 1;\n var pathData = [];\n data.forEach(function (datum, i) {\n var x = xScale.convert(i);\n var total = 0;\n datum.forEach(function (yDatum, j) {\n var y = yScale.convert(total + yDatum);\n var points = pathData[j] || (pathData[j] = []);\n points[i] = {\n x: x,\n y: y\n };\n points[last - i] = {\n x: x,\n y: yScale.convert(total) // bottom y\n };\n total += yDatum;\n });\n });\n _this.areas = pathData.map(function (points) {\n var area = new Path();\n area.strokeWidth = 1;\n var path = area.path;\n path.clear();\n points.forEach(function (point, i) { return path[i > 0 ? \"lineTo\" : \"moveTo\"](point.x, point.y); });\n path.closePath();\n return area;\n });\n _this.updateColors(fills, strokes);\n _this.root.append(_this.areas);\n return _this;\n }\n MiniStackedArea.prototype.updateColors = function (fills, strokes) {\n this.areas.forEach(function (area, i) {\n area.fill = fills[i];\n area.stroke = strokes[i];\n });\n };\n MiniStackedArea.chartType = 'stackedArea';\n MiniStackedArea.data = [\n [2, 3, 2],\n [3, 6, 5],\n [6, 2, 2]\n ];\n return MiniStackedArea;\n}(MiniChartWithAxes));\nexport { MiniStackedArea };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { MiniStackedArea } from \"./miniStackedArea\";\nvar MiniNormalizedArea = /** @class */ (function (_super) {\n __extends(MiniNormalizedArea, _super);\n function MiniNormalizedArea(container, fills, strokes, data) {\n if (data === void 0) { data = MiniNormalizedArea.data; }\n return _super.call(this, container, fills, strokes, data, \"normalizedAreaTooltip\") || this;\n }\n MiniNormalizedArea.chartType = 'normalizedArea';\n MiniNormalizedArea.data = MiniStackedArea.data.map(function (stack) {\n var sum = stack.reduce(function (p, c) { return p + c; }, 0);\n return stack.map(function (v) { return v / sum * 16; });\n });\n return MiniNormalizedArea;\n}(MiniStackedArea));\nexport { MiniNormalizedArea };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { MiniChartWithAxes } from \"../miniChartWithAxes\";\nimport { LinearScale, Rect } from \"ag-charts-community\";\nvar MiniHistogram = /** @class */ (function (_super) {\n __extends(MiniHistogram, _super);\n function MiniHistogram(container, fills, strokes) {\n var _this = _super.call(this, container, \"histogramTooltip\") || this;\n var padding = _this.padding;\n var size = _this.size;\n // approx normal curve\n var data = [2, 5, 11, 13, 10, 6, 1];\n var xScale = new LinearScale();\n xScale.domain = [0, data.length];\n xScale.range = [padding, size - padding];\n var yScale = new LinearScale();\n yScale.domain = [0, data.reduce(function (a, b) { return Math.max(a, b); }, 0)];\n yScale.range = [size - padding, padding];\n var bottom = yScale.convert(0);\n _this.bars = data.map(function (datum, i) {\n var top = yScale.convert(datum);\n var left = xScale.convert(i);\n var right = xScale.convert(i + 1);\n var rect = new Rect();\n rect.x = left;\n rect.y = top;\n rect.width = right - left;\n rect.height = bottom - top;\n rect.strokeWidth = 1;\n rect.crisp = true;\n return rect;\n });\n _this.updateColors(fills, strokes);\n _this.root.append(_this.bars);\n return _this;\n }\n MiniHistogram.prototype.updateColors = function (_a, _b) {\n var _c = __read(_a, 1), fill = _c[0];\n var _d = __read(_b, 1), stroke = _d[0];\n this.bars.forEach(function (bar) {\n bar.fill = fill;\n bar.stroke = stroke;\n });\n };\n MiniHistogram.chartType = 'histogram';\n return MiniHistogram;\n}(MiniChartWithAxes));\nexport { MiniHistogram };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { MiniChartWithAxes } from \"../miniChartWithAxes\";\nimport { createColumnRects, createLinePaths } from \"../miniChartHelpers\";\nvar MiniColumnLineCombo = /** @class */ (function (_super) {\n __extends(MiniColumnLineCombo, _super);\n function MiniColumnLineCombo(container, fills, strokes) {\n var _this = _super.call(this, container, \"columnLineComboTooltip\") || this;\n _this.columnData = [3, 4];\n _this.lineData = [\n [5, 4, 6, 5, 4]\n ];\n var _a = _this, root = _a.root, columnData = _a.columnData, lineData = _a.lineData, size = _a.size, padding = _a.padding;\n _this.columns = createColumnRects({\n stacked: false,\n root: root,\n data: columnData,\n size: size,\n padding: padding,\n xScaleDomain: [0, 1],\n yScaleDomain: [0, 4],\n xScalePadding: 0.5\n });\n root.append(_this.columns);\n _this.lines = createLinePaths(root, lineData, size, padding);\n _this.updateColors(fills, strokes);\n return _this;\n }\n MiniColumnLineCombo.prototype.updateColors = function (fills, strokes) {\n this.columns.forEach(function (bar, i) {\n bar.fill = fills[i];\n bar.stroke = strokes[i];\n });\n this.lines.forEach(function (line, i) {\n line.stroke = fills[i + 2];\n });\n };\n MiniColumnLineCombo.chartType = 'columnLineCombo';\n return MiniColumnLineCombo;\n}(MiniChartWithAxes));\nexport { MiniColumnLineCombo };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { MiniChartWithAxes } from \"../miniChartWithAxes\";\nimport { BandScale, LinearScale, Path } from \"ag-charts-community\";\nimport { createColumnRects } from \"../miniChartHelpers\";\nvar MiniAreaColumnCombo = /** @class */ (function (_super) {\n __extends(MiniAreaColumnCombo, _super);\n function MiniAreaColumnCombo(container, fills, strokes) {\n var _this = _super.call(this, container, \"areaColumnComboTooltip\") || this;\n _this.columnData = [3, 4.5];\n _this.areaData = [\n [5, 4, 6, 5, 4],\n ];\n var _a = _this, root = _a.root, columnData = _a.columnData, areaData = _a.areaData, size = _a.size, padding = _a.padding;\n _this.columns = createColumnRects({\n stacked: false,\n root: root,\n data: columnData,\n size: size,\n padding: padding,\n xScaleDomain: [0, 1],\n yScaleDomain: [0, 6],\n xScalePadding: 0.5,\n });\n // scale for area series\n var xScale = new BandScale();\n xScale.range = [padding, size - padding];\n xScale.domain = [0, 1, 2, 3, 4];\n xScale.paddingInner = 1;\n xScale.paddingOuter = 0;\n var yScale = new LinearScale();\n yScale.range = [size - padding, padding];\n yScale.domain = [0, 6];\n var pathData = [];\n var yZero = yScale.convert(0);\n var firstX = xScale.convert(0);\n areaData.forEach(function (series, i) {\n var points = pathData[i] || (pathData[i] = []);\n series.forEach(function (data, j) {\n var yDatum = data;\n var xDatum = j;\n var x = xScale.convert(xDatum);\n var y = yScale.convert(yDatum);\n points[j] = { x: x, y: y };\n });\n var lastX = xScale.convert(series.length - 1);\n pathData[i].push({\n x: lastX,\n y: yZero\n }, {\n x: firstX,\n y: yZero\n });\n });\n _this.areas = pathData.map(function (points) {\n var area = new Path();\n area.strokeWidth = 1;\n area.fillOpacity = 0.8;\n var path = area.path;\n points.forEach(function (point, i) { return path[i > 0 ? 'lineTo' : 'moveTo'](point.x, point.y); });\n return area;\n });\n root.append(_this.areas);\n root.append([].concat.apply([], _this.columns));\n _this.updateColors(fills, strokes);\n return _this;\n }\n MiniAreaColumnCombo.prototype.updateColors = function (fills, strokes) {\n this.areas.forEach(function (area, i) {\n area.fill = fills[i];\n area.stroke = strokes[i];\n });\n this.columns.forEach(function (bar, i) {\n bar.fill = fills[i + 1];\n bar.stroke = strokes[i + 1];\n });\n };\n MiniAreaColumnCombo.chartType = 'areaColumnCombo';\n return MiniAreaColumnCombo;\n}(MiniChartWithAxes));\nexport { MiniAreaColumnCombo };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Line, Path } from \"ag-charts-community\";\nimport { createColumnRects, createLinePaths } from \"../miniChartHelpers\";\nimport { MiniChart } from \"../miniChart\";\nvar MiniCustomCombo = /** @class */ (function (_super) {\n __extends(MiniCustomCombo, _super);\n function MiniCustomCombo(container, fills, strokes) {\n var _this = _super.call(this, container, \"customComboTooltip\") || this;\n _this.columnData = [3, 4];\n _this.lineData = [\n [5, 4, 6, 5, 4]\n ];\n var _a = _this, root = _a.root, columnData = _a.columnData, lineData = _a.lineData, size = _a.size, padding = _a.padding;\n _this.columns = createColumnRects({\n stacked: false,\n root: root,\n data: columnData,\n size: size,\n padding: padding,\n xScaleDomain: [0, 1],\n yScaleDomain: [0, 4],\n xScalePadding: 0.5\n });\n root.append(_this.columns);\n _this.lines = createLinePaths(root, lineData, size, padding);\n var axisStroke = 'grey';\n var axisOvershoot = 3;\n var leftAxis = new Line();\n leftAxis.x1 = padding;\n leftAxis.y1 = padding;\n leftAxis.x2 = padding;\n leftAxis.y2 = size - padding + axisOvershoot;\n leftAxis.stroke = axisStroke;\n var bottomAxis = new Line();\n bottomAxis.x1 = padding - axisOvershoot + 1;\n bottomAxis.y1 = size - padding;\n bottomAxis.x2 = size - padding + 1;\n bottomAxis.y2 = size - padding;\n bottomAxis.stroke = axisStroke;\n var penIcon = new Path();\n penIcon.svgPath = 'M25.76,43.46l5.51,5.07M49.86,22a3.26,3.26,0,0,0-3-.59,6.78,6.78,0,0,0-3.35,2.14l-18,20.25-.08.09-2.42,8-.18.57,8.19-3.6,18-20.34a6.83,6.83,0,0,0,1.73-3.59A3.29,3.29,0,0,0,49.86,22Zm-8.1,3.5,5.58,5m-6.6-3.85,5.51,5.06';\n penIcon.fill = 'whitesmoke';\n penIcon.stroke = 'darkslategrey';\n penIcon.strokeWidth = 1;\n root.append([bottomAxis, leftAxis, penIcon]);\n _this.updateColors(fills, strokes);\n return _this;\n }\n MiniCustomCombo.prototype.updateColors = function (fills, strokes) {\n this.columns.forEach(function (bar, i) {\n bar.fill = fills[i];\n bar.stroke = strokes[i];\n });\n this.lines.forEach(function (line, i) {\n line.stroke = fills[i + 2];\n });\n };\n MiniCustomCombo.chartType = 'customCombo';\n return MiniCustomCombo;\n}(MiniChart));\nexport { MiniCustomCombo };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AgGroupComponent, Autowired, Component, PostConstruct } from \"@ag-grid-community/core\";\nimport { MiniArea, MiniAreaColumnCombo, MiniBar, MiniBubble, MiniColumn, MiniColumnLineCombo, MiniCustomCombo, MiniDoughnut, MiniHistogram, MiniLine, MiniNormalizedArea, MiniNormalizedBar, MiniNormalizedColumn, MiniPie, MiniScatter, MiniStackedArea, MiniStackedBar, MiniStackedColumn, } from \"./miniCharts\";\nvar MiniChartsContainer = /** @class */ (function (_super) {\n __extends(MiniChartsContainer, _super);\n function MiniChartsContainer(chartController, fills, strokes) {\n var _this = _super.call(this, MiniChartsContainer.TEMPLATE) || this;\n _this.wrappers = {};\n _this.chartGroups = {\n columnGroup: [\n MiniColumn,\n MiniStackedColumn,\n MiniNormalizedColumn\n ],\n barGroup: [\n MiniBar,\n MiniStackedBar,\n MiniNormalizedBar\n ],\n pieGroup: [\n MiniPie,\n MiniDoughnut\n ],\n lineGroup: [\n MiniLine\n ],\n scatterGroup: [\n MiniScatter,\n MiniBubble\n ],\n areaGroup: [\n MiniArea,\n MiniStackedArea,\n MiniNormalizedArea\n ],\n histogramGroup: [\n MiniHistogram\n ],\n combinationGroup: [\n MiniColumnLineCombo,\n MiniAreaColumnCombo,\n MiniCustomCombo\n ]\n };\n _this.chartController = chartController;\n _this.fills = fills;\n _this.strokes = strokes;\n return _this;\n }\n MiniChartsContainer.prototype.init = function () {\n var _this = this;\n // hide MiniCustomCombo if no custom combo exists\n if (!this.chartController.customComboExists()) {\n this.chartGroups.combinationGroup = this.chartGroups.combinationGroup.filter(function (miniChart) { return miniChart !== MiniCustomCombo; });\n }\n var eGui = this.getGui();\n Object.keys(this.chartGroups).forEach(function (group) {\n var chartGroup = _this.chartGroups[group];\n var groupComponent = _this.createBean(new AgGroupComponent({\n title: _this.chartTranslationService.translate(group),\n suppressEnabledCheckbox: true,\n enabled: true,\n suppressOpenCloseIcons: true,\n cssIdentifier: 'charts-settings',\n direction: 'horizontal'\n }));\n chartGroup.forEach(function (MiniClass) {\n var miniWrapper = document.createElement('div');\n miniWrapper.classList.add('ag-chart-mini-thumbnail');\n _this.addManagedListener(miniWrapper, 'click', function () {\n _this.chartController.setChartType(MiniClass.chartType);\n _this.updateSelectedMiniChart();\n });\n _this.wrappers[MiniClass.chartType] = miniWrapper;\n _this.createBean(new MiniClass(miniWrapper, _this.fills, _this.strokes));\n groupComponent.addItem(miniWrapper);\n });\n eGui.appendChild(groupComponent.getGui());\n });\n this.updateSelectedMiniChart();\n };\n MiniChartsContainer.prototype.updateSelectedMiniChart = function () {\n var selectedChartType = this.chartController.getChartType();\n for (var miniChartType in this.wrappers) {\n var miniChart = this.wrappers[miniChartType];\n var selected = miniChartType === selectedChartType;\n miniChart.classList.toggle('ag-selected', selected);\n }\n };\n MiniChartsContainer.TEMPLATE = \"
\";\n __decorate([\n Autowired('chartTranslationService')\n ], MiniChartsContainer.prototype, \"chartTranslationService\", void 0);\n __decorate([\n PostConstruct\n ], MiniChartsContainer.prototype, \"init\", null);\n return MiniChartsContainer;\n}(Component));\nexport { MiniChartsContainer };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, Component, PostConstruct, RefSelector } from \"@ag-grid-community/core\";\nimport { MiniChartsContainer } from \"./miniChartsContainer\";\nimport { ChartController } from \"../../chartController\";\nvar ChartSettingsPanel = /** @class */ (function (_super) {\n __extends(ChartSettingsPanel, _super);\n function ChartSettingsPanel(chartController) {\n var _this = _super.call(this, ChartSettingsPanel.TEMPLATE) || this;\n _this.miniCharts = [];\n _this.cardItems = [];\n _this.activePaletteIndex = 0;\n _this.palettes = [];\n _this.themes = [];\n _this.chartController = chartController;\n return _this;\n }\n ChartSettingsPanel.prototype.postConstruct = function () {\n var _this = this;\n this.resetPalettes();\n this.ePrevBtn.insertAdjacentElement('afterbegin', _.createIconNoSpan('previous', this.gridOptionsWrapper));\n this.eNextBtn.insertAdjacentElement('afterbegin', _.createIconNoSpan('next', this.gridOptionsWrapper));\n this.addManagedListener(this.ePrevBtn, 'click', function () { return _this.setActivePalette(_this.getPrev(), 'left'); });\n this.addManagedListener(this.eNextBtn, 'click', function () { return _this.setActivePalette(_this.getNext(), 'right'); });\n // change the selected chart when a combo chart is modified via the data panel, i.e. the custom combo should be selected\n this.addManagedListener(this.chartController, ChartController.EVENT_CHART_TYPE_CHANGED, function () { return _this.resetPalettes(true); });\n this.scrollSelectedIntoView();\n };\n ChartSettingsPanel.prototype.scrollSelectedIntoView = function () {\n var _this = this;\n // the panel is not immediately visible due to the slide animation, so we add a\n // setTimeout to wait until the panel animation is over and is able to scroll\n setTimeout(function () {\n var currentPallet = _this.miniCharts.find(function (pallet) { return !pallet.getGui().classList.contains('ag-hidden'); });\n var currentChart = currentPallet.getGui().querySelector('.ag-selected');\n if (currentChart) {\n currentChart.scrollIntoView({ block: 'nearest' });\n }\n }, 250);\n };\n ChartSettingsPanel.prototype.resetPalettes = function (forceReset) {\n var _this = this;\n var palettes = this.chartController.getPalettes();\n if ((_.shallowCompare(palettes, this.palettes) && !forceReset) || this.isAnimating) {\n return;\n }\n this.palettes = palettes;\n this.themes = this.chartController.getThemes();\n this.activePaletteIndex = this.themes.findIndex(function (name) { return name === _this.chartController.getChartThemeName(); });\n this.cardItems = [];\n _.clearElement(this.eCardSelector);\n this.destroyMiniCharts();\n this.palettes.forEach(function (palette, index) {\n var isActivePalette = _this.activePaletteIndex === index;\n var fills = palette.fills, strokes = palette.strokes;\n var miniChartsContainer = _this.createBean(new MiniChartsContainer(_this.chartController, fills, strokes));\n _this.miniCharts.push(miniChartsContainer);\n _this.eMiniChartsContainer.appendChild(miniChartsContainer.getGui());\n _this.addCardLink(index);\n if (isActivePalette) {\n miniChartsContainer.updateSelectedMiniChart();\n }\n else {\n miniChartsContainer.addCssClass('ag-hidden');\n }\n });\n this.eNavBar.classList.toggle('ag-hidden', this.palettes.length <= 1);\n _.radioCssClass(this.cardItems[this.activePaletteIndex], 'ag-selected', 'ag-not-selected');\n };\n ChartSettingsPanel.prototype.addCardLink = function (index) {\n var _this = this;\n var link = document.createElement('div');\n link.classList.add('ag-chart-settings-card-item');\n this.addManagedListener(link, 'click', function () {\n _this.setActivePalette(index, index < _this.activePaletteIndex ? 'left' : 'right');\n });\n this.eCardSelector.appendChild(link);\n this.cardItems.push(link);\n };\n ChartSettingsPanel.prototype.getPrev = function () {\n var prev = this.activePaletteIndex - 1;\n if (prev < 0) {\n prev = this.palettes.length - 1;\n }\n return prev;\n };\n ChartSettingsPanel.prototype.getNext = function () {\n var next = this.activePaletteIndex + 1;\n if (next >= this.palettes.length) {\n next = 0;\n }\n return next;\n };\n ChartSettingsPanel.prototype.setActivePalette = function (index, animationDirection) {\n var _this = this;\n if (this.isAnimating || this.activePaletteIndex === index) {\n return;\n }\n _.radioCssClass(this.cardItems[index], 'ag-selected', 'ag-not-selected');\n var currentPalette = this.miniCharts[this.activePaletteIndex];\n var currentGui = currentPalette.getGui();\n var futurePalette = this.miniCharts[index];\n var nextGui = futurePalette.getGui();\n currentPalette.updateSelectedMiniChart();\n futurePalette.updateSelectedMiniChart();\n var multiplier = animationDirection === 'left' ? -1 : 1;\n var final = nextGui.style.left = (_.getAbsoluteWidth(this.getGui()) * multiplier) + \"px\";\n this.activePaletteIndex = index;\n this.isAnimating = true;\n var animatingClass = 'ag-animating';\n futurePalette.removeCssClass('ag-hidden');\n currentPalette.addCssClass(animatingClass);\n futurePalette.addCssClass(animatingClass);\n this.chartController.setChartThemeName(this.themes[index]);\n window.setTimeout(function () {\n currentGui.style.left = -parseFloat(final) + \"px\";\n nextGui.style.left = '0px';\n }, 0);\n window.setTimeout(function () {\n _this.isAnimating = false;\n currentPalette.removeCssClass(animatingClass);\n futurePalette.removeCssClass(animatingClass);\n currentPalette.addCssClass('ag-hidden');\n }, 300);\n };\n ChartSettingsPanel.prototype.destroyMiniCharts = function () {\n _.clearElement(this.eMiniChartsContainer);\n this.miniCharts = this.destroyBeans(this.miniCharts);\n };\n ChartSettingsPanel.prototype.destroy = function () {\n this.destroyMiniCharts();\n _super.prototype.destroy.call(this);\n };\n ChartSettingsPanel.TEMPLATE = \"
\\n
\\n
\\n
\\n \\n
\\n
\\n
\\n \\n
\\n
\\n
\";\n __decorate([\n Autowired('resizeObserverService')\n ], ChartSettingsPanel.prototype, \"resizeObserverService\", void 0);\n __decorate([\n RefSelector('eMiniChartsContainer')\n ], ChartSettingsPanel.prototype, \"eMiniChartsContainer\", void 0);\n __decorate([\n RefSelector('eNavBar')\n ], ChartSettingsPanel.prototype, \"eNavBar\", void 0);\n __decorate([\n RefSelector('eCardSelector')\n ], ChartSettingsPanel.prototype, \"eCardSelector\", void 0);\n __decorate([\n RefSelector('ePrevBtn')\n ], ChartSettingsPanel.prototype, \"ePrevBtn\", void 0);\n __decorate([\n RefSelector('eNextBtn')\n ], ChartSettingsPanel.prototype, \"eNextBtn\", void 0);\n __decorate([\n PostConstruct\n ], ChartSettingsPanel.prototype, \"postConstruct\", null);\n return ChartSettingsPanel;\n}(Component));\nexport { ChartSettingsPanel };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AgPromise, Autowired, Component, PostConstruct, TabbedLayout } from \"@ag-grid-community/core\";\nimport { ChartDataPanel } from \"./data/chartDataPanel\";\nimport { FormatPanel } from \"./format/formatPanel\";\nimport { ChartSettingsPanel } from \"./settings/chartSettingsPanel\";\nvar TabbedChartMenu = /** @class */ (function (_super) {\n __extends(TabbedChartMenu, _super);\n function TabbedChartMenu(params) {\n var _this = _super.call(this) || this;\n _this.tabs = [];\n var controller = params.controller, panels = params.panels, chartOptionsService = params.chartOptionsService;\n _this.chartController = controller;\n _this.chartOptionsService = chartOptionsService;\n _this.panels = panels;\n return _this;\n }\n TabbedChartMenu.prototype.init = function () {\n var _this = this;\n this.panels.forEach(function (panel) {\n var panelType = panel.replace('chart', '').toLowerCase();\n var _a = _this.createTab(panel, panelType, _this.getPanelClass(panelType)), comp = _a.comp, tab = _a.tab;\n _this.tabs.push(tab);\n _this.addDestroyFunc(function () { return _this.destroyBean(comp); });\n });\n this.tabbedLayout = new TabbedLayout({\n items: this.tabs,\n cssClass: 'ag-chart-tabbed-menu',\n keepScrollPosition: true\n });\n this.getContext().createBean(this.tabbedLayout);\n };\n TabbedChartMenu.prototype.createTab = function (name, title, TabPanelClass) {\n var eWrapperDiv = document.createElement('div');\n eWrapperDiv.classList.add('ag-chart-tab', \"ag-chart-\" + title);\n var comp = new TabPanelClass(this.chartController, this.chartOptionsService);\n this.getContext().createBean(comp);\n eWrapperDiv.appendChild(comp.getGui());\n var titleEl = document.createElement('div');\n var translatedTitle = this.chartTranslationService.translate(title);\n titleEl.innerText = translatedTitle;\n return {\n comp: comp,\n tab: {\n title: titleEl,\n titleLabel: translatedTitle,\n bodyPromise: AgPromise.resolve(eWrapperDiv),\n getScrollableContainer: function () {\n var scrollableContainer = eWrapperDiv.querySelector('.ag-scrollable-container');\n return (scrollableContainer || eWrapperDiv);\n },\n name: name\n }\n };\n };\n TabbedChartMenu.prototype.showTab = function (tab) {\n var tabItem = this.tabs[tab];\n this.tabbedLayout.showItem(tabItem);\n };\n TabbedChartMenu.prototype.getGui = function () {\n return this.tabbedLayout && this.tabbedLayout.getGui();\n };\n TabbedChartMenu.prototype.destroy = function () {\n if (this.parentComponent && this.parentComponent.isAlive()) {\n this.destroyBean(this.parentComponent);\n }\n _super.prototype.destroy.call(this);\n };\n TabbedChartMenu.prototype.getPanelClass = function (panelType) {\n switch (panelType) {\n case TabbedChartMenu.TAB_DATA:\n return ChartDataPanel;\n case TabbedChartMenu.TAB_FORMAT:\n return FormatPanel;\n default:\n return ChartSettingsPanel;\n }\n };\n TabbedChartMenu.TAB_DATA = 'data';\n TabbedChartMenu.TAB_FORMAT = 'format';\n __decorate([\n Autowired('chartTranslationService')\n ], TabbedChartMenu.prototype, \"chartTranslationService\", void 0);\n __decorate([\n PostConstruct\n ], TabbedChartMenu.prototype, \"init\", null);\n return TabbedChartMenu;\n}(Component));\nexport { TabbedChartMenu };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { _, AgPanel, AgPromise, Autowired, Component, PostConstruct } from \"@ag-grid-community/core\";\nimport { TabbedChartMenu } from \"./tabbedChartMenu\";\nvar ChartMenu = /** @class */ (function (_super) {\n __extends(ChartMenu, _super);\n function ChartMenu(eChartContainer, eMenuPanelContainer, chartController, chartOptionsService) {\n var _this = _super.call(this, ChartMenu.TEMPLATE) || this;\n _this.eChartContainer = eChartContainer;\n _this.eMenuPanelContainer = eMenuPanelContainer;\n _this.chartController = chartController;\n _this.chartOptionsService = chartOptionsService;\n _this.buttons = {\n chartSettings: ['menu', function () { return _this.showMenu(\"chartSettings\"); }],\n chartData: ['menu', function () { return _this.showMenu(\"chartData\"); }],\n chartFormat: ['menu', function () { return _this.showMenu(\"chartFormat\"); }],\n chartLink: ['linked', function (e) { return _this.toggleDetached(e); }],\n chartUnlink: ['unlinked', function (e) { return _this.toggleDetached(e); }],\n chartDownload: ['save', function () { return _this.saveChart(); }]\n };\n _this.tabs = [];\n _this.menuVisible = false;\n return _this;\n }\n ChartMenu.prototype.postConstruct = function () {\n this.createButtons();\n this.refreshMenuClasses();\n // TODO requires a better solution as this causes the docs the 'jump' when pages are reloaded\n // this.addManagedListener(this.eventService, Events.EVENT_CHART_CREATED, (e: ChartCreated) => {\n // // creating settings panel ahead of time to prevent an undesirable 'jitter' when the canvas resizes\n // // caused as a result of scrollIntoView() when the selected chart type is scrolled into view\n // if (e.chartId === this.chartController.getChartId()) {\n // this.createMenuPanel(0);\n // }\n // });\n };\n ChartMenu.prototype.isVisible = function () {\n return this.menuVisible;\n };\n ChartMenu.prototype.getToolbarOptions = function () {\n var _this = this;\n var tabOptions = [\n 'chartSettings',\n 'chartData',\n 'chartFormat',\n this.chartController.isChartLinked() ? 'chartLink' : 'chartUnlink',\n 'chartDownload'\n ];\n var toolbarItemsFunc = this.gridOptionsWrapper.getChartToolbarItemsFunc();\n if (toolbarItemsFunc) {\n var params = {\n defaultItems: tabOptions\n };\n tabOptions = toolbarItemsFunc(params).filter(function (option) {\n if (!_this.buttons[option]) {\n console.warn(\"AG Grid: '\" + option + \" is not a valid Chart Toolbar Option\");\n return false;\n }\n return true;\n });\n }\n // pivot charts use the column tool panel instead of the data panel\n if (this.chartController.isPivotChart()) {\n tabOptions = tabOptions.filter(function (option) { return option !== 'chartData'; });\n }\n var ignoreOptions = ['chartUnlink', 'chartLink', 'chartDownload'];\n this.tabs = tabOptions.filter(function (option) { return ignoreOptions.indexOf(option) === -1; });\n return tabOptions.filter(function (value) {\n return ignoreOptions.indexOf(value) !== -1 ||\n (_this.tabs.length && value === _this.tabs[0]);\n });\n };\n ChartMenu.prototype.toggleDetached = function (e) {\n var target = e.target;\n var active = target.classList.contains('ag-icon-linked');\n target.classList.toggle('ag-icon-linked', !active);\n target.classList.toggle('ag-icon-unlinked', active);\n var tooltipKey = active ? 'chartUnlinkToolbarTooltip' : 'chartLinkToolbarTooltip';\n var tooltipTitle = this.chartTranslationService.translate(tooltipKey);\n if (tooltipTitle) {\n target.title = tooltipTitle;\n }\n this.chartController.detachChartRange();\n };\n ChartMenu.prototype.createButtons = function () {\n var _this = this;\n var chartToolbarOptions = this.getToolbarOptions();\n var gui = this.getGui();\n chartToolbarOptions.forEach(function (button) {\n var buttonConfig = _this.buttons[button];\n var _a = __read(buttonConfig, 2), iconName = _a[0], callback = _a[1];\n var buttonEl = _.createIconNoSpan(iconName, _this.gridOptionsWrapper, undefined, true);\n buttonEl.classList.add('ag-chart-menu-icon');\n var tooltipTitle = _this.chartTranslationService.translate(button + 'ToolbarTooltip');\n if (tooltipTitle) {\n buttonEl.title = tooltipTitle;\n }\n _this.addManagedListener(buttonEl, 'click', callback);\n gui.appendChild(buttonEl);\n });\n };\n ChartMenu.prototype.saveChart = function () {\n var event = { type: ChartMenu.EVENT_DOWNLOAD_CHART };\n this.dispatchEvent(event);\n };\n ChartMenu.prototype.createMenuPanel = function (defaultTab) {\n var _this = this;\n var width = this.gridOptionsWrapper.chartMenuPanelWidth();\n var menuPanel = this.menuPanel = this.createBean(new AgPanel({\n minWidth: width,\n width: width,\n height: '100%',\n closable: true,\n hideTitleBar: true,\n cssIdentifier: 'chart-menu'\n }));\n menuPanel.setParentComponent(this);\n this.eMenuPanelContainer.appendChild(menuPanel.getGui());\n this.tabbedMenu = this.createBean(new TabbedChartMenu({\n controller: this.chartController,\n type: this.chartController.getChartType(),\n panels: this.tabs,\n chartOptionsService: this.chartOptionsService\n }));\n this.addManagedListener(menuPanel, Component.EVENT_DESTROYED, function () { return _this.destroyBean(_this.tabbedMenu); });\n return new AgPromise(function (res) {\n window.setTimeout(function () {\n menuPanel.setBodyComponent(_this.tabbedMenu);\n _this.tabbedMenu.showTab(defaultTab);\n _this.addManagedListener(_this.eChartContainer, 'click', function (event) {\n if (_this.getGui().contains(event.target)) {\n return;\n }\n if (_this.menuVisible) {\n _this.hideMenu();\n }\n });\n res(menuPanel);\n }, 100);\n });\n };\n ChartMenu.prototype.showContainer = function () {\n if (!this.menuPanel) {\n return;\n }\n this.menuVisible = true;\n this.showParent(this.menuPanel.getWidth());\n this.refreshMenuClasses();\n };\n ChartMenu.prototype.showMenu = function (tabName) {\n var tab = this.tabs.indexOf(tabName);\n if (!this.menuPanel) {\n this.createMenuPanel(tab).then(this.showContainer.bind(this));\n }\n else {\n this.showContainer();\n }\n };\n ChartMenu.prototype.hideMenu = function () {\n var _this = this;\n this.hideParent();\n window.setTimeout(function () {\n _this.menuVisible = false;\n _this.refreshMenuClasses();\n }, 500);\n };\n ChartMenu.prototype.refreshMenuClasses = function () {\n this.eChartContainer.classList.toggle('ag-chart-menu-visible', this.menuVisible);\n this.eChartContainer.classList.toggle('ag-chart-menu-hidden', !this.menuVisible);\n };\n ChartMenu.prototype.showParent = function (width) {\n this.eMenuPanelContainer.style.minWidth = width + \"px\";\n };\n ChartMenu.prototype.hideParent = function () {\n this.eMenuPanelContainer.style.minWidth = '0';\n };\n ChartMenu.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n if (this.menuPanel && this.menuPanel.isAlive()) {\n this.destroyBean(this.menuPanel);\n }\n };\n ChartMenu.EVENT_DOWNLOAD_CHART = \"downloadChart\";\n ChartMenu.TEMPLATE = \"
\";\n __decorate([\n Autowired('chartTranslationService')\n ], ChartMenu.prototype, \"chartTranslationService\", void 0);\n __decorate([\n PostConstruct\n ], ChartMenu.prototype, \"postConstruct\", null);\n return ChartMenu;\n}(Component));\nexport { ChartMenu };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Component, PostConstruct } from \"@ag-grid-community/core\";\nvar TitleEdit = /** @class */ (function (_super) {\n __extends(TitleEdit, _super);\n function TitleEdit(chartMenu) {\n var _this = _super.call(this, TitleEdit.TEMPLATE) || this;\n _this.chartMenu = chartMenu;\n return _this;\n }\n TitleEdit.prototype.init = function () {\n var _this = this;\n this.addManagedListener(this.getGui(), 'keypress', function (e) {\n if (e.key === 'Enter') {\n _this.endEditing();\n }\n });\n this.addManagedListener(this.getGui(), 'blur', this.endEditing.bind(this));\n };\n /* should be called when the containing component changes to a new chart proxy */\n TitleEdit.prototype.refreshTitle = function (chartController, chartOptionsService) {\n var _this = this;\n this.chartController = chartController;\n this.chartOptionsService = chartOptionsService;\n var chartProxy = this.chartController.getChartProxy();\n if (chartProxy) {\n for (var i = 0; i++; i < this.destroyableChartListeners.length) {\n this.destroyableChartListeners[i]();\n }\n this.destroyableChartListeners = [];\n }\n var chart = chartProxy.getChart();\n var canvas = chart.scene.canvas.element;\n var destroyDbleClickListener = this.addManagedListener(canvas, 'dblclick', function (event) {\n var title = chart.title;\n if (title && title.node.containsPoint(event.offsetX, event.offsetY)) {\n var bbox = title.node.computeBBox();\n var xy = title.node.inverseTransformPoint(bbox.x, bbox.y);\n _this.startEditing(__assign(__assign({}, bbox), xy));\n }\n });\n var wasInTitle = false;\n var destroyMouseMoveListener = this.addManagedListener(canvas, 'mousemove', function (event) {\n var title = chart.title;\n var inTitle = !!(title && title.enabled && title.node.containsPoint(event.offsetX, event.offsetY));\n if (wasInTitle !== inTitle) {\n canvas.style.cursor = inTitle ? 'pointer' : '';\n }\n wasInTitle = inTitle;\n });\n this.destroyableChartListeners = [\n destroyDbleClickListener,\n destroyMouseMoveListener\n ];\n };\n TitleEdit.prototype.startEditing = function (titleBBox) {\n if (this.chartMenu && this.chartMenu.isVisible()) {\n // currently we ignore requests to edit the chart title while the chart menu is showing\n // because the click to edit the chart will also close the chart menu, making the position\n // of the title change.\n return;\n }\n var minimumTargetInputWidth = 300;\n var maximumInputWidth = this.chartController.getChartProxy().getChart().width;\n var inputWidth = Math.max(Math.min(titleBBox.width + 20, maximumInputWidth), minimumTargetInputWidth);\n var inputElement = this.getGui();\n inputElement.classList.add('currently-editing');\n var inputStyle = inputElement.style;\n // match style of input to title that we're editing\n inputStyle.fontFamily = this.chartOptionsService.getChartOption('title.fontFamily');\n inputStyle.fontWeight = this.chartOptionsService.getChartOption('title.fontWeight');\n inputStyle.fontStyle = this.chartOptionsService.getChartOption('title.fontStyle');\n inputStyle.fontSize = this.chartOptionsService.getChartOption('title.fontSize') + 'px';\n inputStyle.color = this.chartOptionsService.getChartOption('title.color');\n // populate the input with the title, unless the title is the placeholder:\n var oldTitle = this.chartOptionsService.getChartOption('title.text');\n var inputValue = oldTitle === this.chartTranslationService.translate('titlePlaceholder') ? '' : oldTitle;\n inputElement.value = inputValue;\n var inputRect = inputElement.getBoundingClientRect();\n inputStyle.left = Math.round(titleBBox.x + titleBBox.width / 2 - inputWidth / 2) + 'px';\n inputStyle.top = Math.round(titleBBox.y + titleBBox.height / 2 - inputRect.height / 2) + 'px';\n inputStyle.width = Math.round(inputWidth) + 'px';\n inputElement.focus();\n };\n TitleEdit.prototype.endEditing = function () {\n var value = this.getGui().value;\n this.chartOptionsService.setChartOption('title.text', value);\n this.eventService.dispatchEvent({ type: 'chartTitleEdit' });\n this.removeCssClass('currently-editing');\n };\n TitleEdit.TEMPLATE = \"\\n \";\n __decorate([\n Autowired('chartTranslationService')\n ], TitleEdit.prototype, \"chartTranslationService\", void 0);\n __decorate([\n PostConstruct\n ], TitleEdit.prototype, \"init\", null);\n return TitleEdit;\n}(Component));\nexport { TitleEdit };\n","// deepMerge\nfunction emptyTarget(value) {\n return Array.isArray(value) ? [] : {};\n}\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n return (options.clone !== false && options.isMergeableObject(value))\n ? deepMerge(emptyTarget(value), value, options)\n : value;\n}\nfunction defaultArrayMerge(target, source, options) {\n return target.concat(source).map(function (element) {\n return cloneUnlessOtherwiseSpecified(element, options);\n });\n}\nfunction getMergeFunction(key, options) {\n if (!options.customMerge) {\n return deepMerge;\n }\n var customMerge = options.customMerge(key);\n return typeof customMerge === 'function' ? customMerge : deepMerge;\n}\nfunction getEnumerableOwnPropertySymbols(target) {\n // @ts-ignore\n return Object.getOwnPropertySymbols\n // @ts-ignore\n ? Object.getOwnPropertySymbols(target).filter(function (symbol) {\n return target.propertyIsEnumerable(symbol);\n })\n : [];\n}\nfunction getKeys(target) {\n return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));\n}\nfunction propertyIsOnObject(object, property) {\n try {\n return property in object;\n }\n catch (_) {\n return false;\n }\n}\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n && !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n && Object.propertyIsEnumerable.call(target, key)); // and also unsafe if they're nonenumerable.\n}\nfunction mergeObject(target, source, options) {\n var destination = {};\n if (options.isMergeableObject(target)) {\n getKeys(target).forEach(function (key) {\n destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n });\n }\n getKeys(source).forEach(function (key) {\n if (propertyIsUnsafe(target, key)) {\n return;\n }\n if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n destination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n }\n else {\n destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n }\n });\n return destination;\n}\nfunction defaultIsMergeableObject(value) {\n return isNonNullObject(value) && !isSpecial(value);\n}\nfunction isNonNullObject(value) {\n return !!value && typeof value === 'object';\n}\nfunction isSpecial(value) {\n var stringValue = Object.prototype.toString.call(value);\n return stringValue === '[object RegExp]' || stringValue === '[object Date]';\n}\nexport function deepMerge(target, source, options) {\n options = options || {};\n options.arrayMerge = options.arrayMerge || defaultArrayMerge;\n options.isMergeableObject = options.isMergeableObject || defaultIsMergeableObject;\n // cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n // implementations can use it. The caller may not replace it.\n options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n var sourceIsArray = Array.isArray(source);\n var targetIsArray = Array.isArray(target);\n var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n if (!sourceAndTargetTypesMatch) {\n return cloneUnlessOtherwiseSpecified(source, options);\n }\n else if (sourceIsArray) {\n return options.arrayMerge(target, source, options);\n }\n else {\n return mergeObject(target, source, options);\n }\n}\n// END - deep merge\nexport function mergeDeep(dest, source, copyUndefined, objectsThatNeedCopy, iteration) {\n if (copyUndefined === void 0) { copyUndefined = true; }\n if (objectsThatNeedCopy === void 0) { objectsThatNeedCopy = []; }\n if (iteration === void 0) { iteration = 0; }\n if (!exists(source)) {\n return;\n }\n iterateObject(source, function (key, sourceValue) {\n var destValue = dest[key];\n if (destValue === sourceValue) {\n return;\n }\n var dontCopyOverSourceObject = iteration == 0 && destValue == null && sourceValue != null && objectsThatNeedCopy.indexOf(key) >= 0;\n if (dontCopyOverSourceObject) {\n // by putting an empty value into destValue first, it means we end up copying over values from\n // the source object, rather than just copying in the source object in it's entirety.\n destValue = {};\n dest[key] = destValue;\n }\n if (typeof destValue === 'object' && typeof sourceValue === 'object' && !Array.isArray(destValue)) {\n mergeDeep(destValue, sourceValue, copyUndefined, objectsThatNeedCopy, iteration++);\n }\n else if (copyUndefined || sourceValue !== undefined) {\n dest[key] = sourceValue;\n }\n });\n}\nfunction iterateObject(object, callback) {\n if (object == null) {\n return;\n }\n if (Array.isArray(object)) {\n forEach(object, function (value, index) { return callback(\"\" + index, value); });\n }\n else {\n forEach(Object.keys(object), function (key) { return callback(key, object[key]); });\n }\n}\nexport function exists(value, allowEmptyString) {\n if (allowEmptyString === void 0) { allowEmptyString = false; }\n return value != null && (allowEmptyString || value !== '');\n}\nfunction forEach(list, action) {\n if (list == null) {\n return;\n }\n for (var i = 0; i < list.length; i++) {\n action(list[i], i);\n }\n}\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { _ } from \"@ag-grid-community/core\";\nimport { CategoryAxis, getChartTheme, themes } from \"ag-charts-community\";\nimport { deepMerge } from \"../utils/object\";\nimport { getSeriesType } from \"../utils/seriesTypeMapper\";\nvar ChartProxy = /** @class */ (function () {\n function ChartProxy(chartProxyParams) {\n this.chartProxyParams = chartProxyParams;\n this.chartType = chartProxyParams.chartType;\n this.crossFiltering = chartProxyParams.crossFiltering;\n this.crossFilterCallback = chartProxyParams.crossFilterCallback;\n this.standaloneChartType = getSeriesType(this.chartType);\n if (this.chartProxyParams.chartOptionsToRestore) {\n this.chartOptions = this.chartProxyParams.chartOptionsToRestore;\n this.chartPalette = this.chartProxyParams.chartPaletteToRestore;\n var themeOverrides = { overrides: this.chartOptions, palette: this.chartPalette };\n this.chartTheme = getChartTheme(__assign({ baseTheme: this.getSelectedTheme() }, themeOverrides));\n return;\n }\n this.chartTheme = this.createChartTheme();\n this.chartOptions = this.convertConfigToOverrides(this.chartTheme.config);\n this.chartPalette = this.chartTheme.palette;\n }\n ChartProxy.prototype.recreateChart = function () {\n var _this = this;\n if (this.chart) {\n this.destroyChart();\n }\n this.chart = this.createChart();\n if (this.crossFiltering) {\n // add event listener to chart canvas to detect when user wishes to reset filters\n var resetFilters_1 = true;\n this.chart.addEventListener('click', function (e) { return _this.crossFilterCallback(e, resetFilters_1); });\n }\n };\n ChartProxy.prototype.getChart = function () {\n return this.chart;\n };\n ChartProxy.prototype.createChartTheme = function () {\n var _this = this;\n var themeName = this.getSelectedTheme();\n var stockTheme = this.isStockTheme(themeName);\n var gridOptionsThemeOverrides = this.chartProxyParams.getGridOptionsChartThemeOverrides();\n var apiThemeOverrides = this.chartProxyParams.apiChartThemeOverrides;\n if (gridOptionsThemeOverrides || apiThemeOverrides) {\n var themeOverrides_1 = {\n overrides: ChartProxy.mergeThemeOverrides(gridOptionsThemeOverrides, apiThemeOverrides)\n };\n var getCustomTheme = function () { return deepMerge(_this.lookupCustomChartTheme(themeName), themeOverrides_1); };\n return getChartTheme(stockTheme ? __assign({ baseTheme: themeName }, themeOverrides_1) : getCustomTheme());\n }\n return getChartTheme(stockTheme ? themeName : this.lookupCustomChartTheme(themeName));\n };\n ChartProxy.prototype.isStockTheme = function (themeName) {\n return _.includes(Object.keys(themes), themeName);\n };\n ChartProxy.prototype.getSelectedTheme = function () {\n var chartThemeName = this.chartProxyParams.getChartThemeName();\n var availableThemes = this.chartProxyParams.getChartThemes();\n if (!_.includes(availableThemes, chartThemeName)) {\n chartThemeName = availableThemes[0];\n }\n return chartThemeName;\n };\n ChartProxy.prototype.lookupCustomChartTheme = function (name) {\n var customChartThemes = this.chartProxyParams.customChartThemes;\n var customChartTheme = customChartThemes && customChartThemes[name];\n if (!customChartTheme) {\n console.warn(\"AG Grid: no stock theme exists with the name '\" + name + \"' and no \" +\n \"custom chart theme with that name was supplied to 'customChartThemes'\");\n }\n return customChartTheme;\n };\n ChartProxy.mergeThemeOverrides = function (gridOptionsThemeOverrides, apiThemeOverrides) {\n if (!gridOptionsThemeOverrides) {\n return apiThemeOverrides;\n }\n if (!apiThemeOverrides) {\n return gridOptionsThemeOverrides;\n }\n return deepMerge(gridOptionsThemeOverrides, apiThemeOverrides);\n };\n ChartProxy.prototype.downloadChart = function () {\n var chart = this.chart;\n var fileName = chart.title ? chart.title.text : 'chart';\n chart.scene.download(fileName);\n };\n ChartProxy.prototype.getChartImageDataURL = function (type) {\n return this.chart.scene.getDataURL(type);\n };\n ChartProxy.prototype.getChartOptions = function () {\n return this.chartOptions;\n };\n ChartProxy.prototype.getChartPalette = function () {\n return this.chartPalette;\n };\n ChartProxy.prototype.transformData = function (data, categoryKey) {\n var usingGroupedCategory = this.chartProxyParams.grouping || this.chart.axes.filter(function (a) { return a instanceof CategoryAxis; }).length < 1;\n if (usingGroupedCategory) {\n return data;\n }\n // replace the values for the selected category with a complex object to allow for duplicated categories\n return data.map(function (d, index) {\n var value = d[categoryKey];\n var valueString = value && value.toString ? value.toString() : '';\n var datum = __assign({}, d);\n datum[categoryKey] = { id: index, value: value, toString: function () { return valueString; } };\n return datum;\n });\n };\n ChartProxy.prototype.convertConfigToOverrides = function (config) {\n var isComboChart = ['columnLineCombo', 'areaColumnCombo', 'customCombo'].includes(this.chartType);\n var overrideObjs = isComboChart ? ['line', 'area', 'column', 'cartesian'] : [this.standaloneChartType];\n var overrides = {};\n overrideObjs.forEach(function (overrideObj) {\n var chartOverrides = deepMerge({}, config[overrideObj]);\n chartOverrides.series = chartOverrides.series[overrideObj];\n // special handing to add the scatter paired mode to the chart options\n if (overrideObj === 'scatter') {\n chartOverrides.paired = true;\n }\n overrides[overrideObj] = chartOverrides;\n });\n return overrides;\n };\n ChartProxy.prototype.destroy = function () {\n this.destroyChart();\n };\n ChartProxy.prototype.destroyChart = function () {\n if (this.chart) {\n this.chart.destroy();\n this.chart = undefined;\n }\n };\n return ChartProxy;\n}());\nexport { ChartProxy };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { ChartProxy } from \"../chartProxy\";\nimport { AreaSeries, CategoryAxis, GroupedCategoryAxis, LineSeries, NumberAxis, TimeAxis } from \"ag-charts-community\";\nvar CartesianChartProxy = /** @class */ (function (_super) {\n __extends(CartesianChartProxy, _super);\n function CartesianChartProxy(params) {\n var _this = _super.call(this, params) || this;\n _this.axisTypeToClassMap = {\n number: NumberAxis,\n category: CategoryAxis,\n groupedCategory: GroupedCategoryAxis,\n time: TimeAxis\n };\n return _this;\n }\n CartesianChartProxy.prototype.updateAxes = function (params) {\n // when grouping recreate chart if the axis is not a 'groupedCategory', otherwise return\n if (params.grouping) {\n if (!(this.axisTypeToClassMap[this.xAxisType] === GroupedCategoryAxis)) {\n this.xAxisType = 'groupedCategory';\n this.recreateChart();\n }\n return;\n }\n // only update axis has changed and recreate the chart, i.e. switching from 'category' to 'time' axis\n var newXAxisType = CartesianChartProxy.isTimeAxis(params) ? 'time' : 'category';\n if (newXAxisType !== this.xAxisType) {\n this.xAxisType = newXAxisType;\n this.recreateChart();\n }\n };\n CartesianChartProxy.prototype.getAxesOptions = function (chartSeriesType) {\n if (chartSeriesType === void 0) { chartSeriesType = this.standaloneChartType; }\n return this.chartOptions[chartSeriesType].axes;\n };\n CartesianChartProxy.prototype.processDataForCrossFiltering = function (data, colId, params) {\n var yKey = colId;\n var atLeastOneSelectedPoint = false;\n if (this.crossFiltering) {\n data.forEach(function (d) {\n d[colId + '-total'] = d[colId] + d[colId + '-filtered-out'];\n if (d[colId + '-filtered-out'] > 0) {\n atLeastOneSelectedPoint = true;\n }\n });\n var lastSelectedChartId = params.getCrossFilteringContext().lastSelectedChartId;\n if (lastSelectedChartId === params.chartId) {\n yKey = colId + '-total';\n }\n }\n return { yKey: yKey, atLeastOneSelectedPoint: atLeastOneSelectedPoint };\n };\n CartesianChartProxy.prototype.updateSeriesForCrossFiltering = function (series, colId, chart, params, atLeastOneSelectedPoint) {\n if (this.crossFiltering) {\n // special custom marker handling to show and hide points\n series.marker.enabled = true;\n series.marker.formatter = function (p) {\n return {\n fill: p.highlighted ? 'yellow' : p.fill,\n size: p.highlighted ? 12 : p.datum[colId] > 0 ? 8 : 0,\n };\n };\n chart.tooltip.delay = 500;\n // make line opaque when some points are deselected\n var ctx = params.getCrossFilteringContext();\n var lastSelectionOnThisChart = ctx.lastSelectedChartId === params.chartId;\n var deselectedPoints = lastSelectionOnThisChart && atLeastOneSelectedPoint;\n if (series instanceof AreaSeries) {\n series.fillOpacity = deselectedPoints ? 0.3 : 1;\n }\n if (series instanceof LineSeries) {\n series.strokeOpacity = deselectedPoints ? 0.3 : 1;\n }\n // add node click cross filtering callback to series\n series.addEventListener('nodeClick', this.crossFilterCallback);\n }\n };\n CartesianChartProxy.isTimeAxis = function (params) {\n if (params.category && params.category.chartDataType) {\n return params.category.chartDataType === 'time';\n }\n var testDatum = params.data[0];\n return (testDatum && testDatum[params.category.id]) instanceof Date;\n };\n return CartesianChartProxy;\n}(ChartProxy));\nexport { CartesianChartProxy };\n","import { Color } from \"@ag-grid-community/core\";\nexport function hexToRGBA(hex, alpha) {\n var r = parseInt(hex.slice(1, 3), 16);\n var g = parseInt(hex.slice(3, 5), 16);\n var b = parseInt(hex.slice(5, 7), 16);\n return alpha ? \"rgba(\" + r + \", \" + g + \", \" + b + \", \" + alpha + \")\" : \"rgba(\" + r + \", \" + g + \", \" + b + \")\";\n}\nexport function changeOpacity(fills, alpha) {\n return fills.map(function (fill) {\n var c = Color.fromString(fill);\n return new Color(c.r, c.g, c.b, alpha).toHexString();\n });\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { _, } from \"@ag-grid-community/core\";\nimport { AgChart, ChartAxisPosition } from \"ag-charts-community\";\nimport { CartesianChartProxy } from \"./cartesianChartProxy\";\nimport { deepMerge } from \"../../utils/object\";\nimport { hexToRGBA } from \"../../utils/color\";\nvar BarChartProxy = /** @class */ (function (_super) {\n __extends(BarChartProxy, _super);\n function BarChartProxy(params) {\n var _this = _super.call(this, params) || this;\n // when the standalone chart type is 'bar' - xAxis is positioned to the 'left'\n _this.xAxisType = params.grouping ? 'groupedCategory' : 'category';\n _this.yAxisType = 'number';\n _this.recreateChart();\n return _this;\n }\n BarChartProxy.prototype.createChart = function () {\n var _a = __read([this.standaloneChartType === 'bar', this.isNormalised()], 2), isBar = _a[0], isNormalised = _a[1];\n return AgChart.create({\n container: this.chartProxyParams.parentElement,\n theme: this.chartTheme,\n axes: this.getAxes(isBar, isNormalised),\n series: this.getSeries(isNormalised),\n });\n };\n BarChartProxy.prototype.update = function (params) {\n this.updateAxes(params);\n var barSeries = this.chart.series[0];\n if (this.crossFiltering) {\n this.updateCrossFilteringSeries(barSeries, params);\n }\n else {\n barSeries.fills = this.chartTheme.palette.fills;\n barSeries.strokes = this.chartTheme.palette.strokes;\n }\n barSeries.data = this.transformData(params.data, params.category.id);\n barSeries.xKey = params.category.id;\n barSeries.xName = params.category.name;\n barSeries.yKeys = params.fields.map(function (f) { return f.colId; });\n barSeries.yNames = params.fields.map(function (f) { return f.displayName; });\n };\n BarChartProxy.prototype.updateCrossFilteringSeries = function (barSeries, params) {\n // add additional filtered out field\n var fields = params.fields;\n fields.forEach(function (field) {\n var crossFilteringField = __assign({}, field);\n crossFilteringField.colId = field.colId + '-filtered-out';\n fields.push(crossFilteringField);\n });\n var palette = this.chartTheme.palette;\n // introduce cross filtering transparent fills\n var fills = [];\n palette.fills.forEach(function (fill) {\n fills.push(fill);\n fills.push(hexToRGBA(fill, '0.3'));\n });\n barSeries.fills = fills;\n // introduce cross filtering transparent strokes\n var strokes = [];\n palette.strokes.forEach(function (stroke) {\n fills.push(stroke);\n fills.push(hexToRGBA(stroke, '0.3'));\n });\n barSeries.strokes = strokes;\n // disable series highlighting by default\n barSeries.highlightStyle.fill = undefined;\n // hide 'filtered out' legend items\n var colIds = params.fields.map(function (f) { return f.colId; });\n barSeries.hideInLegend = colIds.filter(function (colId) { return colId.indexOf('-filtered-out') !== -1; });\n // sync toggling of legend item with hidden 'filtered out' item\n this.chart.legend.addEventListener('click', function (event) {\n barSeries.toggleSeriesItem(event.itemId + '-filtered-out', event.enabled);\n });\n this.chart.tooltip.delay = 500;\n // add node click cross filtering callback to series\n barSeries.addEventListener('nodeClick', this.crossFilterCallback);\n };\n BarChartProxy.prototype.getAxes = function (isBar, normalised) {\n var axisOptions = this.getAxesOptions();\n var axes = [\n __assign(__assign({}, deepMerge(axisOptions[this.xAxisType], axisOptions[this.xAxisType].bottom)), { type: this.xAxisType, position: isBar ? ChartAxisPosition.Left : ChartAxisPosition.Bottom }),\n __assign(__assign({}, deepMerge(axisOptions[this.yAxisType], axisOptions[this.yAxisType].left)), { type: this.yAxisType, position: isBar ? ChartAxisPosition.Bottom : ChartAxisPosition.Left }),\n ];\n // special handling to add a default label formatter to show '%' for normalized charts if none is provided\n if (normalised) {\n var numberAxis = axes[1];\n numberAxis.label = __assign(__assign({}, numberAxis.label), { formatter: function (params) { return Math.round(params.value) + '%'; } });\n }\n return axes;\n };\n BarChartProxy.prototype.getSeries = function (normalised) {\n var groupedCharts = ['groupedColumn', 'groupedBar'];\n var isGrouped = !this.crossFiltering && _.includes(groupedCharts, this.chartType);\n return [__assign(__assign({}, this.chartOptions[this.standaloneChartType].series), { type: this.standaloneChartType, grouped: isGrouped, normalizedTo: normalised ? 100 : undefined })];\n };\n BarChartProxy.prototype.isNormalised = function () {\n var normalisedCharts = ['normalizedColumn', 'normalizedBar'];\n return !this.crossFiltering && _.includes(normalisedCharts, this.chartType);\n };\n return BarChartProxy;\n}(CartesianChartProxy));\nexport { BarChartProxy };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { AgChart, ChartAxisPosition } from \"ag-charts-community\";\nimport { CartesianChartProxy } from \"./cartesianChartProxy\";\nimport { deepMerge } from \"../../utils/object\";\nvar AreaChartProxy = /** @class */ (function (_super) {\n __extends(AreaChartProxy, _super);\n function AreaChartProxy(params) {\n var _this = _super.call(this, params) || this;\n _this.xAxisType = params.grouping ? 'groupedCategory' : 'category';\n _this.yAxisType = 'number';\n _this.recreateChart();\n return _this;\n }\n AreaChartProxy.prototype.createChart = function () {\n return AgChart.create({\n type: 'area',\n container: this.chartProxyParams.parentElement,\n theme: this.chartTheme,\n axes: this.getAxes(),\n });\n };\n AreaChartProxy.prototype.update = function (params) {\n this.updateAxes(params);\n if (this.chartType === 'area') {\n // area charts have multiple series\n this.updateAreaChart(params);\n }\n else {\n // stacked and normalized has a single series\n var areaSeries = this.chart.series[0];\n if (!areaSeries) {\n var seriesDefaults = __assign(__assign({}, this.chartOptions[this.standaloneChartType].series), { type: 'area', normalizedTo: this.chartType === 'normalizedArea' ? 100 : undefined });\n areaSeries = AgChart.createComponent(__assign({}, seriesDefaults), 'area.series');\n if (!areaSeries) {\n return;\n }\n this.chart.addSeries(areaSeries);\n }\n areaSeries.data = this.transformData(params.data, params.category.id);\n areaSeries.xKey = params.category.id;\n areaSeries.xName = params.category.name;\n areaSeries.yKeys = params.fields.map(function (f) { return f.colId; });\n areaSeries.yNames = params.fields.map(function (f) { return f.displayName; });\n areaSeries.fills = this.chartTheme.palette.fills;\n areaSeries.strokes = this.chartTheme.palette.strokes;\n }\n };\n AreaChartProxy.prototype.updateAreaChart = function (params) {\n var _this = this;\n var chart = this.chart;\n if (params.fields.length === 0) {\n chart.removeAllSeries();\n return;\n }\n var fieldIds = params.fields.map(function (f) { return f.colId; });\n var existingSeriesById = chart.series\n .reduceRight(function (map, series, i) {\n var id = series.yKeys[0];\n if (fieldIds.indexOf(id) === i) {\n map.set(id, series);\n }\n else {\n chart.removeSeries(series);\n }\n return map;\n }, new Map());\n var data = this.transformData(params.data, params.category.id);\n var previousSeries;\n var _a = this.chartTheme.palette, fills = _a.fills, strokes = _a.strokes;\n params.fields.forEach(function (f, index) {\n var _a = _this.processDataForCrossFiltering(data, f.colId, params), yKey = _a.yKey, atLeastOneSelectedPoint = _a.atLeastOneSelectedPoint;\n var areaSeries = existingSeriesById.get(f.colId);\n var fill = fills[index % fills.length];\n var stroke = strokes[index % strokes.length];\n if (areaSeries) {\n areaSeries.data = data;\n areaSeries.xKey = params.category.id;\n areaSeries.xName = params.category.name;\n areaSeries.yKeys = [yKey];\n areaSeries.yNames = [f.displayName];\n areaSeries.fills = [fill];\n areaSeries.strokes = [stroke];\n }\n else {\n var seriesOverrides = _this.chartOptions[_this.standaloneChartType].series;\n var seriesDefaults = __assign(__assign({}, seriesOverrides), { type: 'area', normalizedTo: _this.chartType === 'normalizedArea' ? 100 : undefined });\n var options = __assign(__assign({}, seriesDefaults), { data: data, xKey: params.category.id, xName: params.category.name, yKeys: [yKey], yNames: [f.displayName], fills: [fill], strokes: [stroke], marker: __assign(__assign({}, seriesDefaults.marker), { fill: fill,\n stroke: stroke }) });\n areaSeries = AgChart.createComponent(options, 'area.series');\n chart.addSeriesAfter(areaSeries, previousSeries);\n }\n _this.updateSeriesForCrossFiltering(areaSeries, f.colId, chart, params, atLeastOneSelectedPoint);\n previousSeries = areaSeries;\n });\n };\n AreaChartProxy.prototype.getAxes = function () {\n var axisOptions = this.getAxesOptions();\n var options = [\n __assign(__assign({}, deepMerge(axisOptions[this.xAxisType], axisOptions[this.xAxisType].bottom)), { type: this.xAxisType, position: ChartAxisPosition.Bottom, paddingInner: 1, paddingOuter: 0 }),\n __assign(__assign({}, deepMerge(axisOptions[this.yAxisType], axisOptions[this.yAxisType].left)), { type: this.yAxisType, position: ChartAxisPosition.Left }),\n ];\n if (this.xAxisType === 'time') {\n delete options[0].paddingInner;\n delete options[0].paddingOuter;\n }\n return options;\n };\n return AreaChartProxy;\n}(CartesianChartProxy));\nexport { AreaChartProxy };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { AgChart, ChartAxisPosition } from \"ag-charts-community\";\nimport { CartesianChartProxy } from \"./cartesianChartProxy\";\nimport { deepMerge } from \"../../utils/object\";\nvar LineChartProxy = /** @class */ (function (_super) {\n __extends(LineChartProxy, _super);\n function LineChartProxy(params) {\n var _this = _super.call(this, params) || this;\n _this.xAxisType = params.grouping ? 'groupedCategory' : 'category';\n _this.yAxisType = 'number';\n _this.recreateChart();\n return _this;\n }\n LineChartProxy.prototype.createChart = function () {\n return AgChart.create({\n type: 'line',\n container: this.chartProxyParams.parentElement,\n theme: this.chartTheme,\n axes: this.getAxes()\n });\n };\n LineChartProxy.prototype.update = function (params) {\n var _this = this;\n if (params.fields.length === 0) {\n this.chart.removeAllSeries();\n return;\n }\n this.updateAxes(params);\n var chart = this.chart;\n var fields = params.fields;\n var fieldIds = fields.map(function (f) { return f.colId; });\n var data = this.transformData(params.data, params.category.id);\n var existingSeriesById = chart.series.reduceRight(function (map, series, i) {\n var id = series.yKey;\n (fieldIds.indexOf(id) === i) ? map.set(id, series) : chart.removeSeries(series);\n return map;\n }, new Map());\n var previousSeries;\n var _a = this.chartTheme.palette, fills = _a.fills, strokes = _a.strokes;\n fields.forEach(function (f, index) {\n var _a = _this.processDataForCrossFiltering(data, f.colId, params), yKey = _a.yKey, atLeastOneSelectedPoint = _a.atLeastOneSelectedPoint;\n var lineSeries = existingSeriesById.get(f.colId);\n var fill = fills[index % fills.length];\n var stroke = strokes[index % strokes.length];\n if (lineSeries) {\n lineSeries.title = f.displayName;\n lineSeries.data = data;\n lineSeries.xKey = params.category.id;\n lineSeries.xName = params.category.name;\n lineSeries.yKey = yKey;\n lineSeries.yName = f.displayName;\n lineSeries.marker.fill = fill;\n lineSeries.marker.stroke = stroke;\n lineSeries.stroke = fill; // this is deliberate, so that the line colours match the fills of other series\n }\n else {\n var seriesOverrides = _this.chartOptions[_this.standaloneChartType].series;\n var seriesOptions = __assign(__assign({}, seriesOverrides), { type: 'line', title: f.displayName, data: data, xKey: params.category.id, xName: params.category.name, yKey: yKey, yName: f.displayName, stroke: fill, marker: __assign(__assign({}, seriesOverrides.marker), { fill: fill,\n stroke: stroke }) });\n lineSeries = AgChart.createComponent(seriesOptions, 'line.series');\n chart.addSeriesAfter(lineSeries, previousSeries);\n }\n _this.updateSeriesForCrossFiltering(lineSeries, f.colId, chart, params, atLeastOneSelectedPoint);\n previousSeries = lineSeries;\n });\n };\n LineChartProxy.prototype.getAxes = function () {\n var axisOptions = this.getAxesOptions();\n return [\n __assign(__assign({}, deepMerge(axisOptions[this.xAxisType], axisOptions[this.xAxisType].bottom)), { type: this.xAxisType, position: ChartAxisPosition.Bottom }),\n __assign(__assign({}, deepMerge(axisOptions[this.yAxisType], axisOptions[this.yAxisType].left)), { type: this.yAxisType, position: ChartAxisPosition.Left }),\n ];\n };\n return LineChartProxy;\n}(CartesianChartProxy));\nexport { LineChartProxy };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { ChartProxy } from \"../chartProxy\";\nvar PolarChartProxy = /** @class */ (function (_super) {\n __extends(PolarChartProxy, _super);\n function PolarChartProxy(params) {\n return _super.call(this, params) || this;\n }\n PolarChartProxy.prototype.addCrossFilteringTooltipRenderer = function (pieSeries) {\n pieSeries.tooltip.renderer = function (params) {\n var label = params.datum[params.labelKey];\n var ratio = params.datum[params.radiusKey];\n var totalValue = params.angleValue;\n var value = totalValue * ratio;\n return {\n content: label + \": \" + value,\n };\n };\n };\n return PolarChartProxy;\n}(ChartProxy));\nexport { PolarChartProxy };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { AgChart } from \"ag-charts-community\";\nimport { PolarChartProxy } from \"./polarChartProxy\";\nimport { changeOpacity } from \"../../utils/color\";\nvar PieChartProxy = /** @class */ (function (_super) {\n __extends(PieChartProxy, _super);\n function PieChartProxy(params) {\n var _this = _super.call(this, params) || this;\n _this.recreateChart();\n return _this;\n }\n PieChartProxy.prototype.createChart = function () {\n return AgChart.create({\n type: 'pie',\n container: this.chartProxyParams.parentElement,\n theme: this.chartTheme,\n });\n };\n PieChartProxy.prototype.update = function (params) {\n var chart = this.chart;\n if (params.fields.length === 0) {\n chart.removeAllSeries();\n return;\n }\n var field = params.fields[0];\n var angleField = field;\n if (this.crossFiltering) {\n // add additional filtered out field\n var fields_1 = params.fields;\n fields_1.forEach(function (field) {\n var crossFilteringField = __assign({}, field);\n crossFilteringField.colId = field.colId + '-filtered-out';\n fields_1.push(crossFilteringField);\n });\n var filteredOutField_1 = fields_1[1];\n params.data.forEach(function (d) {\n d[field.colId + '-total'] = d[field.colId] + d[filteredOutField_1.colId];\n d[field.colId] = d[field.colId] / d[field.colId + '-total'];\n d[filteredOutField_1.colId] = 1;\n });\n var opaqueSeries = chart.series[1];\n var radiusField = filteredOutField_1;\n opaqueSeries = this.updateSeries(chart, opaqueSeries, angleField, radiusField, params, undefined);\n radiusField = angleField;\n var filteredSeries = chart.series[0];\n this.updateSeries(chart, filteredSeries, angleField, radiusField, params, opaqueSeries);\n }\n else {\n var series = chart.series[0];\n this.updateSeries(chart, series, angleField, angleField, params, undefined);\n }\n };\n PieChartProxy.prototype.updateSeries = function (chart, series, angleField, field, params, opaqueSeries) {\n var existingSeriesId = series && series.angleKey;\n var seriesOverrides = this.chartOptions[this.standaloneChartType].series;\n var pieSeries = series;\n if (existingSeriesId !== field.colId) {\n chart.removeSeries(series);\n var options = __assign(__assign({}, seriesOverrides), { type: 'pie', angleKey: this.crossFiltering ? angleField.colId + '-total' : angleField.colId, radiusKey: this.crossFiltering ? field.colId : undefined });\n pieSeries = AgChart.createComponent(options, 'pie.series');\n pieSeries.fills = this.chartTheme.palette.fills;\n pieSeries.strokes = this.chartTheme.palette.strokes;\n pieSeries.callout.colors = this.chartTheme.palette.strokes;\n if (this.crossFiltering && pieSeries && !pieSeries.tooltip.renderer) {\n // only add renderer if user hasn't provided one\n this.addCrossFilteringTooltipRenderer(pieSeries);\n }\n }\n pieSeries.angleName = field.displayName;\n pieSeries.labelKey = params.category.id;\n pieSeries.labelName = params.category.name;\n pieSeries.data = params.data;\n if (this.crossFiltering) {\n pieSeries.radiusMin = 0;\n pieSeries.radiusMax = 1;\n var isOpaqueSeries = !opaqueSeries;\n if (isOpaqueSeries) {\n pieSeries.fills = changeOpacity(pieSeries.fills, 0.3);\n pieSeries.strokes = changeOpacity(pieSeries.strokes, 0.3);\n pieSeries.callout.colors = changeOpacity(pieSeries.strokes, 0.3);\n pieSeries.showInLegend = false;\n }\n else {\n chart.legend.addEventListener('click', function (event) {\n if (opaqueSeries) {\n opaqueSeries.toggleSeriesItem(event.itemId, event.enabled);\n }\n });\n }\n chart.tooltip.delay = 500;\n // disable series highlighting by default\n pieSeries.highlightStyle.fill = undefined;\n pieSeries.addEventListener(\"nodeClick\", this.crossFilterCallback);\n }\n chart.addSeries(pieSeries);\n return pieSeries;\n };\n return PieChartProxy;\n}(PolarChartProxy));\nexport { PieChartProxy };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { AgChart } from \"ag-charts-community\";\nimport { _ } from \"@ag-grid-community/core\";\nimport { PolarChartProxy } from \"./polarChartProxy\";\nimport { hexToRGBA } from \"../../utils/color\";\nvar DoughnutChartProxy = /** @class */ (function (_super) {\n __extends(DoughnutChartProxy, _super);\n function DoughnutChartProxy(params) {\n var _this = _super.call(this, params) || this;\n _this.recreateChart();\n return _this;\n }\n DoughnutChartProxy.prototype.createChart = function () {\n return AgChart.create({\n type: 'pie',\n container: this.chartProxyParams.parentElement,\n theme: this.chartTheme,\n });\n };\n DoughnutChartProxy.prototype.update = function (params) {\n var _this = this;\n if (params.fields.length === 0) {\n this.chart.removeAllSeries();\n return;\n }\n var doughnutChart = this.chart;\n var fieldIds = params.fields.map(function (f) { return f.colId; });\n var seriesMap = {};\n doughnutChart.series.forEach(function (series) {\n var pieSeries = series;\n var id = pieSeries.angleKey;\n if (_.includes(fieldIds, id)) {\n seriesMap[id] = pieSeries;\n }\n });\n var fills = this.chartTheme.palette.fills;\n var strokes = this.chartTheme.palette.strokes;\n var seriesOverrides = this.chartOptions[this.standaloneChartType].series;\n var numFields = params.fields.length;\n var offset = 0;\n if (this.crossFiltering) {\n params.fields.forEach(function (field, index) {\n var filteredOutField = __assign({}, field);\n filteredOutField.colId = field.colId + '-filtered-out';\n params.data.forEach(function (d) {\n d[field.colId + '-total'] = d[field.colId] + d[filteredOutField.colId];\n d[field.colId] = d[field.colId] / d[field.colId + '-total'];\n d[filteredOutField.colId] = 1;\n });\n var _a = _this.updateSeries({\n seriesMap: seriesMap,\n angleField: field,\n field: filteredOutField,\n seriesDefaults: seriesOverrides,\n index: index,\n params: params,\n fills: fills,\n strokes: strokes,\n doughnutChart: doughnutChart,\n offset: offset,\n numFields: numFields,\n opaqueSeries: undefined\n }), updatedOffset = _a.updatedOffset, pieSeries = _a.pieSeries;\n _this.updateSeries({\n seriesMap: seriesMap,\n angleField: field,\n field: field,\n seriesDefaults: seriesOverrides,\n index: index,\n params: params,\n fills: fills,\n strokes: strokes,\n doughnutChart: doughnutChart,\n offset: offset,\n numFields: numFields,\n opaqueSeries: pieSeries\n });\n offset = updatedOffset;\n });\n }\n else {\n params.fields.forEach(function (f, index) {\n var updatedOffset = _this.updateSeries({\n seriesMap: seriesMap,\n angleField: f,\n field: f,\n seriesDefaults: seriesOverrides,\n index: index,\n params: params,\n fills: fills,\n strokes: strokes,\n doughnutChart: doughnutChart,\n offset: offset,\n numFields: numFields,\n opaqueSeries: undefined\n }).updatedOffset;\n offset = updatedOffset;\n });\n }\n // Because repaints are automatic, it's important to remove/add/update series at once,\n // so that we don't get painted twice.\n doughnutChart.series = _.values(seriesMap);\n };\n DoughnutChartProxy.prototype.updateSeries = function (updateParams) {\n var existingSeries = updateParams.seriesMap[updateParams.field.colId];\n var seriesOptions = __assign(__assign({}, updateParams.seriesDefaults), { type: 'pie', angleKey: this.crossFiltering ? updateParams.angleField.colId + '-total' : updateParams.angleField.colId, radiusKey: this.crossFiltering ? updateParams.field.colId : undefined, title: __assign(__assign({}, updateParams.seriesDefaults.title), { text: updateParams.seriesDefaults.title.text || updateParams.field.displayName }) });\n var pieSeries = existingSeries || AgChart.createComponent(seriesOptions, 'pie.series');\n if (pieSeries.title) {\n pieSeries.title.showInLegend = updateParams.numFields > 1;\n }\n if (!existingSeries) {\n if (this.crossFiltering && !pieSeries.tooltip.renderer) {\n // only add renderer if user hasn't provided one\n this.addCrossFilteringTooltipRenderer(pieSeries);\n }\n }\n pieSeries.angleName = updateParams.field.displayName;\n pieSeries.labelKey = updateParams.params.category.id;\n pieSeries.labelName = updateParams.params.category.name;\n pieSeries.data = updateParams.params.data;\n if (this.crossFiltering) {\n pieSeries.radiusMin = 0;\n pieSeries.radiusMax = 1;\n var isOpaqueSeries = !updateParams.opaqueSeries;\n if (isOpaqueSeries) {\n pieSeries.fills = updateParams.fills.map(function (fill) { return hexToRGBA(fill, '0.3'); });\n pieSeries.strokes = updateParams.strokes.map(function (stroke) { return hexToRGBA(stroke, '0.3'); });\n pieSeries.showInLegend = false;\n }\n else {\n updateParams.doughnutChart.legend.addEventListener('click', function (event) {\n if (updateParams.opaqueSeries) {\n updateParams.opaqueSeries.toggleSeriesItem(event.itemId, event.enabled);\n }\n });\n pieSeries.fills = updateParams.fills;\n pieSeries.strokes = updateParams.strokes;\n pieSeries.callout.colors = updateParams.strokes;\n }\n // disable series highlighting by default\n pieSeries.highlightStyle.fill = undefined;\n pieSeries.addEventListener('nodeClick', this.crossFilterCallback);\n updateParams.doughnutChart.tooltip.delay = 500;\n }\n else {\n pieSeries.fills = updateParams.fills;\n pieSeries.strokes = updateParams.strokes;\n pieSeries.callout.colors = updateParams.strokes;\n }\n var offsetAmount = updateParams.numFields > 1 ? 20 : 40;\n pieSeries.outerRadiusOffset = updateParams.offset;\n updateParams.offset -= offsetAmount;\n pieSeries.innerRadiusOffset = updateParams.offset;\n updateParams.offset -= offsetAmount;\n if (!existingSeries) {\n updateParams.seriesMap[updateParams.field.colId] = pieSeries;\n }\n return { updatedOffset: updateParams.offset, pieSeries: pieSeries };\n };\n return DoughnutChartProxy;\n}(PolarChartProxy));\nexport { DoughnutChartProxy };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n};\nimport { AgChart, ChartAxisPosition } from \"ag-charts-community\";\nimport { ChartDataModel } from \"../../chartDataModel\";\nimport { CartesianChartProxy } from \"./cartesianChartProxy\";\nimport { deepMerge } from \"../../utils/object\";\nimport { hexToRGBA } from \"../../utils/color\";\nvar ScatterChartProxy = /** @class */ (function (_super) {\n __extends(ScatterChartProxy, _super);\n function ScatterChartProxy(params) {\n var _this = _super.call(this, params) || this;\n _this.xAxisType = 'number';\n _this.yAxisType = 'number';\n _this.recreateChart();\n return _this;\n }\n ScatterChartProxy.prototype.createChart = function () {\n return AgChart.create({\n type: 'scatter',\n container: this.chartProxyParams.parentElement,\n theme: this.chartTheme,\n axes: this.getAxes()\n });\n };\n ScatterChartProxy.prototype.update = function (params) {\n var _this = this;\n if (params.fields.length < 2) {\n this.chart.removeAllSeries();\n return;\n }\n var fields = params.fields;\n if (this.crossFiltering) {\n // add additional filtered out field\n fields.forEach(function (field) {\n var crossFilteringField = __assign({}, field);\n crossFilteringField.colId = field.colId + '-filtered-out';\n fields.push(crossFilteringField);\n });\n }\n var paired = this.chartOptions[this.standaloneChartType].paired;\n var seriesDefinitions = this.getSeriesDefinitions(fields, paired);\n var dataDomain;\n if (this.crossFiltering) {\n dataDomain = this.getCrossFilteringDataDomain(seriesDefinitions, params);\n }\n var chart = this.chart;\n var existingSeriesById = chart.series.reduceRight(function (map, series, i) {\n var matchingIndex = seriesDefinitions.findIndex(function (s) {\n return s.xField.colId === series.xKey &&\n s.yField.colId === series.yKey &&\n ((!s.sizeField && !series.sizeKey) || (s.sizeField && s.sizeField.colId === series.sizeKey));\n });\n if (matchingIndex === i) {\n map.set(series.yKey, series);\n }\n else {\n chart.removeSeries(series);\n }\n return map;\n }, new Map());\n var _a = this.chartTheme.palette, fills = _a.fills, strokes = _a.strokes;\n if (this.crossFiltering) {\n // introduce cross filtering transparent fills\n var fillsMod_1 = [];\n fills.forEach(function (fill) {\n fillsMod_1.push(fill);\n fillsMod_1.push(hexToRGBA(fill, '0.3'));\n });\n fills = fillsMod_1;\n // introduce cross filtering transparent strokes\n var strokesMod_1 = [];\n strokes.forEach(function (stroke) {\n strokesMod_1.push(stroke);\n strokesMod_1.push(hexToRGBA(stroke, '0.3'));\n });\n strokes = strokesMod_1;\n }\n var labelFieldDefinition = params.category.id === ChartDataModel.DEFAULT_CATEGORY ? undefined : params.category;\n var previousSeries;\n var seriesOverrides = this.chartOptions[this.standaloneChartType].series;\n seriesDefinitions.forEach(function (seriesDefinition, index) {\n var existingSeries = existingSeriesById.get(seriesDefinition.yField.colId);\n var series = existingSeries || AgChart.createComponent(__assign(__assign({}, seriesOverrides), { type: 'scatter' }), 'scatter.series');\n if (!series) {\n return;\n }\n var _a = seriesDefinition, xFieldDefinition = _a.xField, yFieldDefinition = _a.yField, sizeFieldDefinition = _a.sizeField;\n series.title = yFieldDefinition.displayName + \" vs \" + xFieldDefinition.displayName;\n series.xKey = xFieldDefinition.colId;\n series.xName = xFieldDefinition.displayName;\n series.yKey = yFieldDefinition.colId;\n series.yName = yFieldDefinition.displayName;\n series.data = params.data;\n series.fill = fills[index % fills.length];\n series.stroke = strokes[index % strokes.length];\n if (sizeFieldDefinition) {\n series.sizeKey = sizeFieldDefinition.colId;\n series.sizeName = sizeFieldDefinition.displayName;\n }\n else {\n series.sizeKey = undefined;\n }\n if (labelFieldDefinition) {\n series.labelKey = labelFieldDefinition.id;\n series.labelName = labelFieldDefinition.name;\n }\n else {\n series.labelKey = series.yKey;\n }\n var isFilteredOutYKey = yFieldDefinition.colId.indexOf('-filtered-out') > -1;\n if (_this.crossFiltering) {\n if (!isFilteredOutYKey) {\n // sync toggling of legend item with hidden 'filtered out' item\n chart.legend.addEventListener('click', function (event) {\n series.toggleSeriesItem(event.itemId + '-filtered-out', event.enabled);\n });\n }\n if (dataDomain) {\n series.marker.domain = dataDomain;\n }\n chart.tooltip.delay = 500;\n // hide 'filtered out' legend items\n if (isFilteredOutYKey) {\n series.showInLegend = false;\n }\n // add node click cross filtering callback to series\n series.addEventListener('nodeClick', _this.crossFilterCallback);\n }\n if (!existingSeries) {\n chart.addSeriesAfter(series, previousSeries);\n }\n previousSeries = series;\n });\n };\n ScatterChartProxy.prototype.getSeriesDefinitions = function (fields, paired) {\n if (fields.length < 2) {\n return [];\n }\n var isBubbleChart = this.chartType === 'bubble';\n if (paired) {\n if (isBubbleChart) {\n return fields.map(function (currentXField, i) { return i % 3 === 0 ? ({\n xField: currentXField,\n yField: fields[i + 1],\n sizeField: fields[i + 2],\n }) : null; }).filter(function (x) { return x && x.yField && x.sizeField; });\n }\n return fields.map(function (currentXField, i) { return i % 2 === 0 ? ({\n xField: currentXField,\n yField: fields[i + 1],\n }) : null; }).filter(function (x) { return x && x.yField; });\n }\n var xField = fields[0];\n if (isBubbleChart) {\n return fields\n .map(function (yField, i) { return i % 2 === 1 ? ({\n xField: xField,\n yField: yField,\n sizeField: fields[i + 1],\n }) : null; })\n .filter(function (x) { return x && x.sizeField; });\n }\n return fields.filter(function (value, i) { return i > 0; }).map(function (yField) { return ({ xField: xField, yField: yField }); });\n };\n ScatterChartProxy.prototype.getCrossFilteringDataDomain = function (seriesDefinitions, params) {\n var domain;\n if (seriesDefinitions[0] && seriesDefinitions[0].sizeField) {\n var sizeColId_1 = seriesDefinitions[0].sizeField.colId;\n var allSizePoints_1 = [];\n params.data.forEach(function (d) {\n if (typeof d[sizeColId_1] !== 'undefined') {\n allSizePoints_1.push(d[sizeColId_1]);\n }\n if (typeof d[sizeColId_1 + '-filtered-out'] !== 'undefined') {\n allSizePoints_1.push(d[sizeColId_1 + '-filtered-out']);\n }\n });\n if (allSizePoints_1.length > 0) {\n domain = [Math.min.apply(Math, __spread(allSizePoints_1)), Math.max.apply(Math, __spread(allSizePoints_1))];\n }\n }\n return domain;\n };\n ScatterChartProxy.prototype.getAxes = function () {\n var axisOptions = this.getAxesOptions();\n return [\n __assign(__assign({}, deepMerge(axisOptions[this.xAxisType], axisOptions[this.xAxisType].bottom)), { type: this.xAxisType, position: ChartAxisPosition.Bottom }),\n __assign(__assign({}, deepMerge(axisOptions[this.yAxisType], axisOptions[this.yAxisType].left)), { type: this.yAxisType, position: ChartAxisPosition.Left }),\n ];\n };\n return ScatterChartProxy;\n}(CartesianChartProxy));\nexport { ScatterChartProxy };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { AgChart, ChartAxisPosition } from \"ag-charts-community\";\nimport { CartesianChartProxy } from \"./cartesianChartProxy\";\nimport { deepMerge } from \"../../utils/object\";\nvar HistogramChartProxy = /** @class */ (function (_super) {\n __extends(HistogramChartProxy, _super);\n function HistogramChartProxy(params) {\n var _this = _super.call(this, params) || this;\n _this.xAxisType = 'number';\n _this.yAxisType = 'number';\n _this.recreateChart();\n return _this;\n }\n HistogramChartProxy.prototype.createChart = function () {\n return AgChart.create({\n container: this.chartProxyParams.parentElement,\n theme: this.chartTheme,\n axes: this.getAxes(),\n series: [__assign(__assign({}, this.chartOptions[this.standaloneChartType].series), { type: 'histogram' })]\n });\n };\n HistogramChartProxy.prototype.update = function (params) {\n var _a = __read(params.fields, 1), xField = _a[0];\n var chart = this.chart;\n var series = chart.series[0];\n series.data = params.data;\n series.xKey = xField.colId;\n series.xName = xField.displayName;\n // for now, only constant width is supported via integrated charts\n series.areaPlot = false;\n series.fill = this.chartTheme.palette.fills[0];\n series.stroke = this.chartTheme.palette.strokes[0];\n };\n HistogramChartProxy.prototype.getAxes = function () {\n var axisOptions = this.getAxesOptions();\n return [\n __assign(__assign({}, deepMerge(axisOptions[this.xAxisType], axisOptions[this.xAxisType].bottom)), { type: this.xAxisType, position: ChartAxisPosition.Bottom }),\n __assign(__assign({}, deepMerge(axisOptions[this.yAxisType], axisOptions[this.yAxisType].left)), { type: this.yAxisType, position: ChartAxisPosition.Left }),\n ];\n };\n return HistogramChartProxy;\n}(CartesianChartProxy));\nexport { HistogramChartProxy };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, BeanStub, Events } from \"@ag-grid-community/core\";\nimport { AreaSeries, BarSeries, CategoryAxis, GroupedCategoryAxis, HistogramSeries, LineSeries, NumberAxis, PieSeries, ScatterSeries, TimeAxis } from \"ag-charts-community\";\nimport { getSeriesType } from \"../utils/seriesTypeMapper\";\nvar ChartOptionsService = /** @class */ (function (_super) {\n __extends(ChartOptionsService, _super);\n function ChartOptionsService(chartController) {\n var _this = _super.call(this) || this;\n _this.chartController = chartController;\n return _this;\n }\n ChartOptionsService.prototype.getChartType = function () {\n return this.chartController.getChartType();\n };\n ChartOptionsService.prototype.getChartOption = function (expression) {\n return _.get(this.getChart(), expression, undefined);\n };\n ChartOptionsService.prototype.setChartOption = function (expression, value) {\n var _this = this;\n // update chart options\n this.chartController.getChartSeriesTypes().forEach(function (optionsType) {\n var options = _.get(_this.getChartOptions(), \"\" + optionsType, undefined);\n _.set(options, expression, value);\n });\n // update chart\n _.set(this.getChart(), expression, value);\n this.raiseChartOptionsChangedEvent();\n };\n ChartOptionsService.prototype.getAxisProperty = function (expression) {\n return _.get(this.getChart().axes[0], expression, undefined);\n };\n ChartOptionsService.prototype.setAxisProperty = function (expression, value) {\n var _this = this;\n var chart = this.getChart();\n chart.axes.forEach(function (axis) {\n // update axis options\n _this.updateAxisOptions(axis, expression, value);\n // update chart axis\n _.set(axis, expression, value);\n });\n // chart axis properties are not reactive, need to schedule a layout\n chart.layoutPending = true;\n this.raiseChartOptionsChangedEvent();\n };\n ChartOptionsService.prototype.getLabelRotation = function (axisType) {\n var axis = this.getAxis(axisType);\n return _.get(axis, 'label.rotation', undefined);\n };\n ChartOptionsService.prototype.setLabelRotation = function (axisType, value) {\n var expression = 'label.rotation';\n // update chart\n var chartAxis = this.getAxis(axisType);\n _.set(chartAxis, expression, value);\n // chart axis properties are not reactive, need to schedule a layout\n this.getChart().layoutPending = true;\n // do not update axis options when the default category is selected\n if (chartAxis && !this.chartController.isDefaultCategorySelected()) {\n this.updateAxisOptions(chartAxis, expression, value);\n this.raiseChartOptionsChangedEvent();\n }\n };\n ChartOptionsService.prototype.getSeriesOption = function (expression, seriesType) {\n var series = this.getChart().series.find(function (s) { return ChartOptionsService.isMatchingSeries(seriesType, s); });\n return _.get(series, expression, undefined);\n };\n ChartOptionsService.prototype.setSeriesOption = function (expression, value, seriesType) {\n // update series options\n var options = this.getChartOptions();\n if (!options[seriesType]) {\n options[seriesType] = {};\n }\n _.set(options[seriesType].series, expression, value);\n // update chart series\n this.getChart().series.forEach(function (s) {\n if (ChartOptionsService.isMatchingSeries(seriesType, s)) {\n _.set(s, expression, value);\n }\n });\n this.raiseChartOptionsChangedEvent();\n };\n ChartOptionsService.prototype.getPairedMode = function () {\n var optionsType = getSeriesType(this.getChartType());\n return _.get(this.getChartOptions(), optionsType + \".paired\", undefined);\n };\n ChartOptionsService.prototype.setPairedMode = function (paired) {\n var optionsType = getSeriesType(this.getChartType());\n var options = _.get(this.getChartOptions(), \"\" + optionsType, undefined);\n _.set(options, 'paired', paired);\n };\n ChartOptionsService.prototype.getChart = function () {\n return this.chartController.getChartProxy().getChart();\n };\n ChartOptionsService.prototype.getChartOptions = function () {\n return this.chartController.getChartProxy().getChartOptions();\n };\n ChartOptionsService.prototype.getAxis = function (axisType) {\n var chart = this.getChart();\n if (!chart.axes || chart.axes.length < 1) {\n return undefined;\n }\n if (axisType === 'xAxis') {\n return (chart.axes && chart.axes[0].direction === 'x') ? chart.axes[0] : chart.axes[1];\n }\n return (chart.axes && chart.axes[1].direction === 'y') ? chart.axes[1] : chart.axes[0];\n };\n ChartOptionsService.prototype.updateAxisOptions = function (chartAxis, expression, value) {\n var optionsType = getSeriesType(this.getChartType());\n var axisOptions = this.getChartOptions()[optionsType].axes;\n if (chartAxis instanceof NumberAxis) {\n _.set(axisOptions.number, expression, value);\n }\n else if (chartAxis instanceof CategoryAxis) {\n _.set(axisOptions.category, expression, value);\n }\n else if (chartAxis instanceof TimeAxis) {\n _.set(axisOptions.time, expression, value);\n }\n else if (chartAxis instanceof GroupedCategoryAxis) {\n _.set(axisOptions.groupedCategory, expression, value);\n }\n };\n ChartOptionsService.prototype.raiseChartOptionsChangedEvent = function () {\n var chartModel = this.chartController.getChartModel();\n var event = Object.freeze({\n type: Events.EVENT_CHART_OPTIONS_CHANGED,\n chartId: chartModel.chartId,\n chartType: chartModel.chartType,\n chartThemeName: chartModel.chartThemeName,\n chartOptions: chartModel.chartOptions,\n api: this.gridApi,\n columnApi: this.columnApi,\n });\n this.eventService.dispatchEvent(event);\n };\n ChartOptionsService.isMatchingSeries = function (seriesType, series) {\n return seriesType === 'area' && series instanceof AreaSeries ? true :\n seriesType === 'bar' && series instanceof BarSeries ? true :\n seriesType === 'column' && series instanceof BarSeries ? true :\n seriesType === 'histogram' && series instanceof HistogramSeries ? true :\n seriesType === 'line' && series instanceof LineSeries ? true :\n seriesType === 'pie' && series instanceof PieSeries ? true :\n seriesType === 'scatter' && series instanceof ScatterSeries;\n };\n ChartOptionsService.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n __decorate([\n Autowired('gridApi')\n ], ChartOptionsService.prototype, \"gridApi\", void 0);\n __decorate([\n Autowired('columnApi')\n ], ChartOptionsService.prototype, \"columnApi\", void 0);\n return ChartOptionsService;\n}(BeanStub));\nexport { ChartOptionsService };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { AgChart, ChartAxisPosition } from \"ag-charts-community\";\nimport { _ } from \"@ag-grid-community/core\";\nimport { CartesianChartProxy } from \"../cartesian/cartesianChartProxy\";\nimport { deepMerge } from \"../../utils/object\";\nimport { getSeriesType } from \"../../utils/seriesTypeMapper\";\nvar ComboChartProxy = /** @class */ (function (_super) {\n __extends(ComboChartProxy, _super);\n function ComboChartProxy(params) {\n var _this = _super.call(this, params) || this;\n _this.xAxisType = params.grouping ? 'groupedCategory' : 'category';\n _this.yAxisType = 'number';\n _this.recreateChart();\n return _this;\n }\n ComboChartProxy.prototype.createChart = function () {\n return AgChart.create({\n container: this.chartProxyParams.parentElement,\n theme: this.chartTheme,\n });\n };\n ComboChartProxy.prototype.update = function (params) {\n var category = params.category, data = params.data;\n var options = {\n data: this.transformData(data, category.id)\n };\n if (this.seriesChanged(params)) {\n options.series = this.getSeriesOptions(params);\n options.axes = this.getAxes(params);\n }\n AgChart.update(this.chart, options);\n };\n ComboChartProxy.prototype.seriesChanged = function (params) {\n var seriesChartTypes = params.seriesChartTypes;\n var seriesChartTypesChanged = !_.areEqual(this.prevSeriesChartTypes, seriesChartTypes, function (s1, s2) { return s1.colId === s2.colId && s1.chartType === s2.chartType && s1.secondaryAxis === s2.secondaryAxis; });\n // cache a cloned copy of `seriesChartTypes` for subsequent comparisons\n this.prevSeriesChartTypes = seriesChartTypes.map(function (s) { return (__assign({}, s)); });\n // check if any fields have changed\n var fields = params.fields.map(function (f) { return f.colId; }).join();\n var fieldsChanged = this.prevFields !== fields;\n this.prevFields = fields;\n // check if the category has changed\n var categoryId = params.category.id;\n var categoryChanged = this.prevCategoryId !== categoryId;\n this.prevCategoryId = categoryId;\n return seriesChartTypesChanged || fieldsChanged || categoryChanged;\n };\n ComboChartProxy.prototype.getSeriesOptions = function (params) {\n var _this = this;\n var fields = params.fields, category = params.category, seriesChartTypes = params.seriesChartTypes;\n return fields.map(function (field) {\n var seriesChartType = seriesChartTypes.find(function (s) { return s.colId === field.colId; });\n if (seriesChartType) {\n var chartType = seriesChartType.chartType;\n return __assign(__assign({}, _this.extractSeriesOverrides(seriesChartType)), { type: getSeriesType(chartType), xKey: category.id, yKey: field.colId, yName: field.displayName, grouped: ['groupedColumn', 'groupedBar', 'groupedArea'].includes(chartType), stacked: ['stackedArea', 'stackedColumn'].includes(chartType) });\n }\n });\n };\n ComboChartProxy.prototype.getAxes = function (updateParams) {\n var _this = this;\n this.xAxisType = updateParams.grouping ? 'groupedCategory' : 'category';\n var fields = updateParams ? updateParams.fields : [];\n var fieldsMap = new Map(fields.map(function (f) { return [f.colId, f]; }));\n var _a = this.getYKeys(fields, updateParams.seriesChartTypes), primaryYKeys = _a.primaryYKeys, secondaryYKeys = _a.secondaryYKeys;\n var _b = this.getAxisOptions(), bottomOptions = _b.bottomOptions, leftOptions = _b.leftOptions, rightOptions = _b.rightOptions;\n var axes = [\n __assign(__assign({}, bottomOptions), { type: this.xAxisType, position: ChartAxisPosition.Bottom, gridStyle: [\n { strokeWidth: 0 },\n ] }),\n ];\n if (primaryYKeys.length > 0) {\n axes.push(__assign(__assign({}, leftOptions), { type: this.yAxisType, keys: primaryYKeys, position: ChartAxisPosition.Left, title: __assign({}, deepMerge(leftOptions.title, {\n enabled: true,\n text: primaryYKeys.map(function (key) {\n var field = fieldsMap.get(key);\n return field ? field.displayName : key;\n }).join(' / '),\n })) }));\n }\n if (secondaryYKeys.length > 0) {\n secondaryYKeys.forEach(function (secondaryYKey, i) {\n var field = fieldsMap.get(secondaryYKey);\n var secondaryAxisIsVisible = field && field.colId === secondaryYKey;\n if (!secondaryAxisIsVisible) {\n return;\n }\n var secondaryAxisOptions = __assign(__assign({}, rightOptions), { type: _this.yAxisType, keys: [secondaryYKey], position: ChartAxisPosition.Right, title: __assign({}, deepMerge(rightOptions.title, {\n enabled: true,\n text: field ? field.displayName : secondaryYKey,\n })) });\n var primaryYAxis = primaryYKeys.some(function (primaryYKey) { return !!fieldsMap.get(primaryYKey); });\n var lastSecondaryAxis = i === secondaryYKeys.length - 1;\n if (!primaryYAxis && lastSecondaryAxis) {\n // don't remove grid lines from the secondary axis closest to the chart, i.e. last supplied\n }\n else {\n secondaryAxisOptions.gridStyle = [\n { strokeWidth: 0 },\n ];\n }\n axes.push(secondaryAxisOptions);\n });\n }\n return axes;\n };\n ComboChartProxy.prototype.getAxisOptions = function () {\n var axisOptions = this.getAxesOptions('cartesian');\n return {\n bottomOptions: deepMerge(axisOptions[this.xAxisType], axisOptions[this.xAxisType].bottom),\n leftOptions: deepMerge(axisOptions[this.yAxisType], axisOptions[this.yAxisType].left),\n rightOptions: deepMerge(axisOptions[this.yAxisType], axisOptions[this.yAxisType].right),\n };\n };\n ComboChartProxy.prototype.getYKeys = function (fields, seriesChartTypes) {\n var primaryYKeys = [];\n var secondaryYKeys = [];\n fields.forEach(function (field) {\n var colId = field.colId;\n var seriesChartType = seriesChartTypes.find(function (s) { return s.colId === colId; });\n if (seriesChartType) {\n seriesChartType.secondaryAxis ? secondaryYKeys.push(colId) : primaryYKeys.push(colId);\n }\n });\n return { primaryYKeys: primaryYKeys, secondaryYKeys: secondaryYKeys };\n };\n ComboChartProxy.prototype.extractSeriesOverrides = function (seriesChartType) {\n var seriesOverrides = this.chartOptions[getSeriesType(seriesChartType.chartType)].series;\n // TODO: remove once `yKeys` and `yNames` have been removed from the options\n delete seriesOverrides.yKeys;\n delete seriesOverrides.yNames;\n return seriesOverrides;\n };\n return ComboChartProxy;\n}(CartesianChartProxy));\nexport { ComboChartProxy };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, AgDialog, Autowired, Component, Events, PostConstruct, RefSelector } from \"@ag-grid-community/core\";\nimport { ChartMenu } from \"./menu/chartMenu\";\nimport { TitleEdit } from \"./chartTitle/titleEdit\";\nimport { ChartController } from \"./chartController\";\nimport { ChartDataModel } from \"./chartDataModel\";\nimport { BarChartProxy } from \"./chartProxies/cartesian/barChartProxy\";\nimport { AreaChartProxy } from \"./chartProxies/cartesian/areaChartProxy\";\nimport { LineChartProxy } from \"./chartProxies/cartesian/lineChartProxy\";\nimport { PieChartProxy } from \"./chartProxies/polar/pieChartProxy\";\nimport { DoughnutChartProxy } from \"./chartProxies/polar/doughnutChartProxy\";\nimport { ScatterChartProxy } from \"./chartProxies/cartesian/scatterChartProxy\";\nimport { HistogramChartProxy } from \"./chartProxies/cartesian/histogramChartProxy\";\nimport { ChartOptionsService } from \"./services/chartOptionsService\";\nimport { ComboChartProxy } from \"./chartProxies/combo/comboChartProxy\";\nvar GridChartComp = /** @class */ (function (_super) {\n __extends(GridChartComp, _super);\n function GridChartComp(params) {\n var _this = _super.call(this, GridChartComp.TEMPLATE) || this;\n _this.params = params;\n return _this;\n }\n GridChartComp.prototype.init = function () {\n var availableChartThemes = this.gridOptionsWrapper.getChartThemes();\n if (availableChartThemes.length < 1) {\n throw new Error('Cannot create chart: no chart themes are available to be used.');\n }\n var chartThemeName = this.params.chartThemeName;\n if (!_.includes(availableChartThemes, chartThemeName)) {\n chartThemeName = availableChartThemes[0];\n }\n var modelParams = {\n chartId: this.params.chartId,\n pivotChart: this.params.pivotChart,\n chartType: this.params.chartType,\n chartThemeName: chartThemeName,\n aggFunc: this.params.aggFunc,\n cellRange: this.params.cellRange,\n suppressChartRanges: this.params.suppressChartRanges,\n unlinkChart: this.params.unlinkChart,\n crossFiltering: this.params.crossFiltering,\n seriesChartTypes: this.params.seriesChartTypes,\n };\n var isRtl = this.gridOptionsWrapper.isEnableRtl();\n this.addCssClass(isRtl ? 'ag-rtl' : 'ag-ltr');\n // only the chart controller interacts with the chart model\n var model = this.createBean(new ChartDataModel(modelParams));\n this.chartController = this.createManagedBean(new ChartController(model));\n this.validateCustomThemes();\n // create chart before dialog to ensure dialog is correct size\n this.createChart();\n if (this.params.insideDialog) {\n this.addDialog();\n }\n this.addMenu();\n this.addTitleEditComp();\n this.addManagedListener(this.getGui(), 'focusin', this.setActiveChartCellRange.bind(this));\n this.addManagedListener(this.chartController, ChartController.EVENT_CHART_UPDATED, this.refresh.bind(this));\n if (this.chartMenu) {\n // chart menu may not exist, i.e. cross filtering\n this.addManagedListener(this.chartMenu, ChartMenu.EVENT_DOWNLOAD_CHART, this.downloadChart.bind(this));\n }\n this.refresh();\n this.raiseChartCreatedEvent();\n };\n GridChartComp.prototype.validateCustomThemes = function () {\n var suppliedThemes = this.gridOptionsWrapper.getChartThemes();\n var customChartThemes = this.gridOptionsWrapper.getCustomChartThemes();\n if (customChartThemes) {\n _.getAllKeysInObjects([customChartThemes]).forEach(function (customThemeName) {\n if (!_.includes(suppliedThemes, customThemeName)) {\n console.warn(\"AG Grid: a custom chart theme with the name '\" + customThemeName + \"' has been \" +\n \"supplied but not added to the 'chartThemes' list\");\n }\n });\n }\n };\n GridChartComp.prototype.createChart = function () {\n var _this = this;\n // if chart already exists, destroy it and remove it from DOM\n if (this.chartProxy) {\n this.chartProxy.destroy();\n }\n var crossFilterCallback = function (event, reset) {\n var ctx = _this.params.crossFilteringContext;\n ctx.lastSelectedChartId = reset ? '' : _this.chartController.getChartId();\n _this.crossFilterService.filter(event, reset);\n };\n var chartType = this.chartController.getChartType();\n var chartProxyParams = {\n chartType: chartType,\n getChartThemeName: this.getChartThemeName.bind(this),\n getChartThemes: this.getChartThemes.bind(this),\n customChartThemes: this.gridOptionsWrapper.getCustomChartThemes(),\n getGridOptionsChartThemeOverrides: this.getGridOptionsChartThemeOverrides.bind(this),\n apiChartThemeOverrides: this.params.chartThemeOverrides,\n crossFiltering: this.params.crossFiltering,\n crossFilterCallback: crossFilterCallback,\n parentElement: this.eChart,\n grouping: this.chartController.isGrouping(),\n chartOptionsToRestore: this.params.chartOptionsToRestore,\n chartPaletteToRestore: this.params.chartPaletteToRestore,\n seriesChartTypes: this.chartController.getSeriesChartTypes()\n };\n // ensure 'restoring' options are not reused when switching chart types\n this.params.chartOptionsToRestore = undefined;\n // set local state used to detect when chart changes\n this.chartType = chartType;\n this.chartThemeName = this.chartController.getChartThemeName();\n this.chartProxy = GridChartComp.createChartProxy(chartProxyParams);\n if (!this.chartProxy) {\n console.warn('AG Grid: invalid chart type supplied: ', chartProxyParams.chartType);\n return;\n }\n var canvas = this.eChart.querySelector('canvas');\n if (canvas) {\n canvas.classList.add('ag-charts-canvas');\n }\n this.chartController.setChartProxy(this.chartProxy);\n this.chartOptionsService = this.createBean(new ChartOptionsService(this.chartController));\n this.titleEdit && this.titleEdit.refreshTitle(this.chartController, this.chartOptionsService);\n };\n GridChartComp.prototype.getChartThemeName = function () {\n return this.chartController.getChartThemeName();\n };\n GridChartComp.prototype.getChartThemes = function () {\n return this.chartController.getThemes();\n };\n GridChartComp.prototype.getGridOptionsChartThemeOverrides = function () {\n return this.gridOptionsWrapper.getChartThemeOverrides();\n };\n GridChartComp.createChartProxy = function (chartProxyParams) {\n switch (chartProxyParams.chartType) {\n case 'column':\n case 'bar':\n case 'groupedColumn':\n case 'stackedColumn':\n case 'normalizedColumn':\n case 'groupedBar':\n case 'stackedBar':\n case 'normalizedBar':\n return new BarChartProxy(chartProxyParams);\n case 'pie':\n return new PieChartProxy(chartProxyParams);\n case 'doughnut':\n return new DoughnutChartProxy(chartProxyParams);\n case 'area':\n case 'stackedArea':\n case 'normalizedArea':\n return new AreaChartProxy(chartProxyParams);\n case 'line':\n return new LineChartProxy(chartProxyParams);\n case 'scatter':\n case 'bubble':\n return new ScatterChartProxy(chartProxyParams);\n case 'histogram':\n return new HistogramChartProxy(chartProxyParams);\n case 'columnLineCombo':\n case 'areaColumnCombo':\n case 'customCombo':\n return new ComboChartProxy(chartProxyParams);\n default:\n throw \"AG Grid: Unable to create chart as an invalid chartType = '\" + chartProxyParams.chartType + \"' was supplied.\";\n }\n };\n GridChartComp.prototype.addDialog = function () {\n var _this = this;\n var title = this.chartTranslationService.translate(this.params.pivotChart ? 'pivotChartTitle' : 'rangeChartTitle');\n var _a = this.getBestDialogSize(), width = _a.width, height = _a.height;\n this.chartDialog = new AgDialog({\n resizable: true,\n movable: true,\n maximizable: true,\n title: title,\n width: width,\n height: height,\n component: this,\n centered: true,\n closable: true\n });\n this.getContext().createBean(this.chartDialog);\n this.chartDialog.addEventListener(AgDialog.EVENT_DESTROYED, function () { return _this.destroy(); });\n };\n GridChartComp.prototype.getBestDialogSize = function () {\n var popupParent = this.popupService.getPopupParent();\n var maxWidth = _.getAbsoluteWidth(popupParent) * 0.75;\n var maxHeight = _.getAbsoluteHeight(popupParent) * 0.75;\n var ratio = 0.553;\n var chart = this.chartProxy.getChart();\n var width = this.params.insideDialog ? 850 : chart.width;\n var height = this.params.insideDialog ? 470 : chart.height;\n if (width > maxWidth || height > maxHeight) {\n width = Math.min(width, maxWidth);\n height = Math.round(width * ratio);\n if (height > maxHeight) {\n height = maxHeight;\n width = Math.min(width, Math.round(height / ratio));\n }\n }\n return { width: width, height: height };\n };\n GridChartComp.prototype.addMenu = function () {\n if (!this.params.crossFiltering) {\n this.chartMenu = this.createBean(new ChartMenu(this.eChartContainer, this.eMenuContainer, this.chartController, this.chartOptionsService));\n this.eChartContainer.appendChild(this.chartMenu.getGui());\n }\n };\n GridChartComp.prototype.addTitleEditComp = function () {\n this.titleEdit = this.createBean(new TitleEdit(this.chartMenu));\n this.eTitleEditContainer.appendChild(this.titleEdit.getGui());\n if (this.chartProxy) {\n this.titleEdit.refreshTitle(this.chartController, this.chartOptionsService);\n }\n };\n GridChartComp.prototype.refresh = function () {\n if (this.shouldRecreateChart()) {\n this.createChart();\n }\n this.updateChart();\n };\n GridChartComp.prototype.shouldRecreateChart = function () {\n return this.chartType !== this.chartController.getChartType() || this.chartThemeName !== this.chartController.getChartThemeName();\n };\n GridChartComp.prototype.getCurrentChartType = function () {\n return this.chartType;\n };\n GridChartComp.prototype.getChartModel = function () {\n return this.chartController.getChartModel();\n };\n GridChartComp.prototype.getChartImageDataURL = function (fileFormat) {\n return this.chartProxy.getChartImageDataURL(fileFormat);\n };\n GridChartComp.prototype.updateChart = function () {\n var _this = this;\n var chartProxy = this.chartProxy;\n var selectedCols = this.chartController.getSelectedValueColState();\n var fields = selectedCols.map(function (c) { return ({ colId: c.colId, displayName: c.displayName }); });\n var data = this.chartController.getChartData();\n var chartEmpty = this.handleEmptyChart(data, fields);\n if (chartEmpty) {\n return;\n }\n var selectedDimension = this.chartController.getSelectedDimension();\n var chartUpdateParams = {\n data: data,\n grouping: this.chartController.isGrouping(),\n category: {\n id: selectedDimension.colId,\n name: selectedDimension.displayName,\n chartDataType: this.getChartDataType(selectedDimension.colId)\n },\n fields: fields,\n chartId: this.chartController.getChartId(),\n getCrossFilteringContext: function () { return _this.params.crossFilteringContext; },\n seriesChartTypes: this.chartController.getSeriesChartTypes()\n };\n chartProxy.update(chartUpdateParams);\n this.titleEdit.refreshTitle(this.chartController, this.chartOptionsService);\n };\n GridChartComp.prototype.getChartDataType = function (colId) {\n var column = this.columnModel.getPrimaryColumn(colId);\n return column ? column.getColDef().chartDataType : undefined;\n };\n GridChartComp.prototype.handleEmptyChart = function (data, fields) {\n var container = this.chartProxy.getChart().container;\n var pivotModeDisabled = this.chartController.isPivotChart() && !this.chartController.isPivotMode();\n var minFieldsRequired = 1;\n if (this.chartController.isActiveXYChart()) {\n minFieldsRequired = this.chartController.getChartType() === 'bubble' ? 3 : 2;\n }\n var isEmptyChart = fields.length < minFieldsRequired || data.length === 0;\n if (container) {\n var isEmpty = pivotModeDisabled || isEmptyChart;\n _.setDisplayed(this.eChart, !isEmpty);\n _.setDisplayed(this.eEmpty, isEmpty);\n }\n if (pivotModeDisabled) {\n this.eEmpty.innerText = this.chartTranslationService.translate('pivotChartRequiresPivotMode');\n return true;\n }\n if (isEmptyChart) {\n this.eEmpty.innerText = this.chartTranslationService.translate('noDataToChart');\n return true;\n }\n return false;\n };\n GridChartComp.prototype.downloadChart = function () {\n this.chartProxy.downloadChart();\n };\n GridChartComp.prototype.getChartId = function () {\n return this.chartController.getChartId();\n };\n GridChartComp.prototype.getUnderlyingChart = function () {\n return this.chartProxy.getChart();\n };\n GridChartComp.prototype.refreshCanvasSize = function () {\n if (!this.params.insideDialog) {\n return;\n }\n var eChart = this.eChart;\n if (this.chartMenu.isVisible()) {\n // we don't want the menu showing to affect the chart options\n var chart = this.chartProxy.getChart();\n chart.height = _.getInnerHeight(eChart);\n chart.width = _.getInnerWidth(eChart);\n }\n };\n GridChartComp.prototype.setActiveChartCellRange = function (focusEvent) {\n if (this.getGui().contains(focusEvent.relatedTarget)) {\n return;\n }\n this.chartController.setChartRange(true);\n this.gridApi.focusService.clearFocusedCell();\n };\n GridChartComp.prototype.raiseChartCreatedEvent = function () {\n var event = Object.freeze({\n type: Events.EVENT_CHART_CREATED,\n chartId: this.chartController.getChartId(),\n api: this.gridApi,\n columnApi: this.columnApi,\n });\n this.eventService.dispatchEvent(event);\n };\n GridChartComp.prototype.raiseChartDestroyedEvent = function () {\n var event = Object.freeze({\n type: Events.EVENT_CHART_DESTROYED,\n chartId: this.chartController.getChartId(),\n api: this.gridApi,\n columnApi: this.columnApi,\n });\n this.eventService.dispatchEvent(event);\n };\n GridChartComp.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n if (this.chartProxy) {\n this.chartProxy.destroy();\n }\n this.destroyBean(this.chartMenu);\n // don't want to invoke destroy() on the Dialog (prevents destroy loop)\n if (this.chartDialog && this.chartDialog.isAlive()) {\n this.destroyBean(this.chartDialog);\n }\n // if the user is providing containers for the charts, we need to clean up, otherwise the old chart\n // data will still be visible although the chart is no longer bound to the grid\n var eGui = this.getGui();\n _.clearElement(eGui);\n // remove from parent, so if user provided container, we detach from the provided dom element\n _.removeFromParent(eGui);\n this.raiseChartDestroyedEvent();\n };\n GridChartComp.TEMPLATE = \"
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\";\n __decorate([\n RefSelector('eChart')\n ], GridChartComp.prototype, \"eChart\", void 0);\n __decorate([\n RefSelector('eChartContainer')\n ], GridChartComp.prototype, \"eChartContainer\", void 0);\n __decorate([\n RefSelector('eMenuContainer')\n ], GridChartComp.prototype, \"eMenuContainer\", void 0);\n __decorate([\n RefSelector('eEmpty')\n ], GridChartComp.prototype, \"eEmpty\", void 0);\n __decorate([\n RefSelector('eTitleEditContainer')\n ], GridChartComp.prototype, \"eTitleEditContainer\", void 0);\n __decorate([\n Autowired('environment')\n ], GridChartComp.prototype, \"environment\", void 0);\n __decorate([\n Autowired('columnModel')\n ], GridChartComp.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired('chartCrossFilterService')\n ], GridChartComp.prototype, \"crossFilterService\", void 0);\n __decorate([\n Autowired('chartTranslationService')\n ], GridChartComp.prototype, \"chartTranslationService\", void 0);\n __decorate([\n Autowired('gridApi')\n ], GridChartComp.prototype, \"gridApi\", void 0);\n __decorate([\n Autowired('columnApi')\n ], GridChartComp.prototype, \"columnApi\", void 0);\n __decorate([\n Autowired('popupService')\n ], GridChartComp.prototype, \"popupService\", void 0);\n __decorate([\n PostConstruct\n ], GridChartComp.prototype, \"init\", null);\n return GridChartComp;\n}(Component));\nexport { GridChartComp };\n","// the line below is automatically modified during releases - do not modify\n// (see scripts/release/updateChartModel.js)\nexport var CURRENT_VERSION = \"27.3.0\";\nexport function upgradeChartModel(model) {\n if (model.version == null) {\n // First release with version field.\n model.version = \"27.1.0\";\n }\n var _a = versionParts(model.version), major = _a.major, minor = _a.minor, patch = _a.patch;\n // TODO: Add some transforms as the model changes over time.\n // if (major < 28) {\n // model = migrateToV28Model(model);\n // }\n return model;\n}\nfunction versionParts(version) {\n var split = typeof version === 'string' ?\n version.split('.').map(function (v) { return Number(v); }) :\n [];\n if (split.length !== 3 || split.some(function (v) { return isNaN(v); })) {\n throw new Error('AG Grid - Illegal version string: ' + version);\n }\n return {\n major: split[0],\n minor: split[1],\n patch: split[2],\n };\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport { _, Autowired, BeanStub, Events, NumberSequence, PostConstruct, PreDestroy, Qualifier, ServerSideTransactionResultStatus } from \"@ag-grid-community/core\";\nimport { PartialStoreBlock } from \"../blocks/partialStoreBlock\";\nvar FindResult;\n(function (FindResult) {\n FindResult[FindResult[\"FOUND\"] = 0] = \"FOUND\";\n FindResult[FindResult[\"CONTINUE_FIND\"] = 1] = \"CONTINUE_FIND\";\n FindResult[FindResult[\"BREAK_FIND\"] = 2] = \"BREAK_FIND\";\n})(FindResult || (FindResult = {}));\nvar PartialStore = /** @class */ (function (_super) {\n __extends(PartialStore, _super);\n function PartialStore(ssrmParams, storeParams, parentRowNode) {\n var _this = _super.call(this) || this;\n _this.blocks = {};\n _this.blockHeights = {};\n _this.lastRowIndexKnown = false;\n // this will always be zero for the top level cache only,\n // all the other ones change as the groups open and close\n _this.displayIndexStart = 0;\n _this.displayIndexEnd = 0; // not sure if setting this one to zero is necessary\n _this.cacheTopPixel = 0;\n _this.info = {};\n _this.ssrmParams = ssrmParams;\n _this.storeParams = storeParams;\n _this.parentRowNode = parentRowNode;\n _this.rowCount = PartialStore.INITIAL_ROW_COUNT;\n return _this;\n }\n PartialStore.prototype.postConstruct = function () {\n this.defaultRowHeight = this.gridOptionsWrapper.getRowHeightAsNumber();\n };\n PartialStore.prototype.destroyAllBlocks = function () {\n var _this = this;\n this.getBlocksInOrder().forEach(function (block) { return _this.destroyBlock(block); });\n };\n PartialStore.prototype.setBeans = function (loggerFactory) {\n this.logger = loggerFactory.create('ServerSideCache');\n };\n PartialStore.prototype.getRowCount = function () {\n return this.rowCount;\n };\n PartialStore.prototype.isLastRowIndexKnown = function () {\n return this.lastRowIndexKnown;\n };\n PartialStore.prototype.retryLoads = function () {\n this.getBlocksInOrder().forEach(function (block) { return block.retryLoads(); });\n };\n PartialStore.prototype.onBlockLoadFailed = function (block) {\n block.setData([], true);\n this.fireCacheUpdatedEvent();\n };\n PartialStore.prototype.onBlockLoaded = function (block, params) {\n this.logger.log(\"onPageLoaded: page = \" + block.getId() + \", lastRow = \" + params.rowCount);\n if (params.storeInfo) {\n Object.assign(this.info, params.storeInfo);\n }\n if (!params.rowData) {\n var message_1 = 'AG Grid: \"params.rowData\" is missing from Server-Side Row Model success() callback. Please use the \"rowData\" attribute. If no data is returned, set an empty list.';\n _.doOnce(function () { return console.warn(message_1, params); }, 'InfiniteStore.noData');\n }\n var finalRowCount = params.rowCount != null && params.rowCount >= 0 ? params.rowCount : undefined;\n // if we are not active, then we ignore all events, otherwise we could end up getting the\n // grid to refresh even though we are no longer the active cache\n if (!this.isAlive()) {\n return;\n }\n this.checkRowCount(block, finalRowCount);\n block.setData(params.rowData);\n // if the virtualRowCount is shortened, then it's possible blocks exist that are no longer\n // in the valid range. so we must remove these. this can happen if the datasource returns a\n // result and sets lastRow to something less than virtualRowCount (can happen if user scrolls\n // down, server reduces dataset size).\n this.destroyAllBlocksPastVirtualRowCount();\n this.fireCacheUpdatedEvent();\n };\n PartialStore.prototype.purgeBlocksIfNeeded = function (blockToExclude) {\n var _this = this;\n // we exclude checking for the page just created, as this has yet to be accessed and hence\n // the lastAccessed stamp will not be updated for the first time yet\n var blocksForPurging = this.getBlocksInOrder().filter(function (b) { return b != blockToExclude; });\n var lastAccessedComparator = function (a, b) { return b.getLastAccessed() - a.getLastAccessed(); };\n blocksForPurging.sort(lastAccessedComparator);\n // we remove (maxBlocksInCache - 1) as we already excluded the 'just created' page.\n // in other words, after the splice operation below, we have taken out the blocks\n // we want to keep, which means we are left with blocks that we can potentially purge\n var maxBlocksProvided = this.storeParams.maxBlocksInCache > 0;\n var blocksToKeep = maxBlocksProvided ? this.storeParams.maxBlocksInCache - 1 : null;\n var emptyBlocksToKeep = PartialStore.MAX_EMPTY_BLOCKS_TO_KEEP - 1;\n blocksForPurging.forEach(function (block, index) {\n var purgeBecauseBlockEmpty = block.getState() === PartialStoreBlock.STATE_WAITING_TO_LOAD && index >= emptyBlocksToKeep;\n var purgeBecauseCacheFull = maxBlocksProvided ? index >= blocksToKeep : false;\n if (purgeBecauseBlockEmpty || purgeBecauseCacheFull) {\n // we never purge blocks if they are open, as purging them would mess up with\n // our indexes, it would be very messy to restore the purged block to it's\n // previous state if it had open children.\n if (block.isAnyNodeOpen()) {\n return;\n }\n // if the block currently has rows been displayed, then don't remove it either.\n // this can happen if user has maxBlocks=2, and blockSize=5 (thus 10 max rows in cache)\n // but the screen is showing 20 rows, so at least 4 blocks are needed.\n if (_this.isBlockCurrentlyDisplayed(block)) {\n return;\n }\n // don't want to loose keyboard focus, so keyboard navigation can continue. so keep focused blocks.\n if (_this.isBlockFocused(block)) {\n return;\n }\n // at this point, block is not needed, and no open nodes, so burn baby burn\n _this.destroyBlock(block);\n }\n });\n };\n PartialStore.prototype.isBlockFocused = function (block) {\n var focusedCell = this.focusService.getFocusCellToUseAfterRefresh();\n if (!focusedCell) {\n return false;\n }\n if (focusedCell.rowPinned != null) {\n return false;\n }\n var blockIndexStart = block.getDisplayIndexStart();\n var blockIndexEnd = block.getDisplayIndexEnd();\n if (blockIndexEnd == null || blockIndexStart == null) {\n return false;\n }\n var hasFocus = focusedCell.rowIndex >= blockIndexStart && focusedCell.rowIndex < blockIndexEnd;\n return hasFocus;\n };\n PartialStore.prototype.isBlockCurrentlyDisplayed = function (block) {\n var startIndex = block.getDisplayIndexStart();\n var endIndex = block.getDisplayIndexEnd() - 1;\n return this.rowRenderer.isRangeInRenderedViewport(startIndex, endIndex);\n };\n PartialStore.prototype.removeDuplicateNode = function (id) {\n this.getBlocksInOrder().forEach(function (block) { return block.removeDuplicateNode(id); });\n };\n PartialStore.prototype.checkRowCount = function (block, lastRow) {\n // if client provided a last row, we always use it, as it could change between server calls\n // if user deleted data and then called refresh on the grid.\n if (typeof lastRow === 'number' && lastRow >= 0) {\n this.rowCount = lastRow;\n this.lastRowIndexKnown = true;\n }\n else if (!this.lastRowIndexKnown) {\n // otherwise, see if we need to add some virtual rows\n var lastRowIndex = (block.getId() + 1) * this.storeParams.cacheBlockSize;\n var lastRowIndexPlusOverflow = lastRowIndex + PartialStore.OVERFLOW_SIZE;\n if (this.rowCount < lastRowIndexPlusOverflow) {\n this.rowCount = lastRowIndexPlusOverflow;\n }\n }\n };\n PartialStore.prototype.forEachNodeDeep = function (callback, sequence) {\n if (sequence === void 0) { sequence = new NumberSequence(); }\n this.getBlocksInOrder().forEach(function (block) { return block.forEachNodeDeep(callback, sequence); });\n };\n PartialStore.prototype.forEachNodeDeepAfterFilterAndSort = function (callback, sequence) {\n if (sequence === void 0) { sequence = new NumberSequence(); }\n this.getBlocksInOrder().forEach(function (block) { return block.forEachNodeAfterFilterAndSort(callback, sequence); });\n };\n PartialStore.prototype.getBlocksInOrder = function () {\n // get all page id's as NUMBERS (not strings, as we need to sort as numbers) and in descending order\n var blockComparator = function (a, b) { return a.getId() - b.getId(); };\n var blocks = _.getAllValuesInObject(this.blocks).sort(blockComparator);\n return blocks;\n };\n PartialStore.prototype.destroyBlock = function (block) {\n delete this.blocks[block.getId()];\n this.destroyBean(block);\n this.rowNodeBlockLoader.removeBlock(block);\n };\n // gets called 1) row count changed 2) cache purged 3) items inserted\n PartialStore.prototype.fireCacheUpdatedEvent = function () {\n // this results in row model firing ModelUpdated.\n // server side row model also updates the row indexes first\n var event = {\n type: Events.EVENT_STORE_UPDATED\n };\n this.eventService.dispatchEvent(event);\n };\n PartialStore.prototype.destroyAllBlocksPastVirtualRowCount = function () {\n var _this = this;\n var blocksToDestroy = [];\n this.getBlocksInOrder().forEach(function (block) {\n var startRow = block.getId() * _this.storeParams.cacheBlockSize;\n if (startRow >= _this.rowCount) {\n blocksToDestroy.push(block);\n }\n });\n if (blocksToDestroy.length > 0) {\n blocksToDestroy.forEach(function (block) { return _this.destroyBlock(block); });\n }\n };\n PartialStore.prototype.refreshStore = function (purge) {\n var noBlocksToRefresh = this.getRowCount() == 0;\n if (noBlocksToRefresh || purge) {\n this.resetStore();\n }\n else {\n this.refreshBlocks();\n }\n this.fireCacheUpdatedEvent();\n };\n PartialStore.prototype.refreshBlocks = function () {\n this.getBlocksInOrder().forEach(function (block) {\n block.refresh();\n });\n this.lastRowIndexKnown = false;\n this.rowNodeBlockLoader.checkBlockToLoad();\n };\n PartialStore.prototype.resetStore = function () {\n this.destroyAllBlocks();\n this.lastRowIndexKnown = false;\n // if zero rows in the cache, we need to get the SSRM to start asking for rows again.\n // otherwise if set to zero rows last time, and we don't update the row count, then after\n // the purge there will still be zero rows, meaning the SSRM won't request any rows.\n // to kick things off, at least one row needs to be asked for.\n if (this.columnModel.isAutoRowHeightActive || this.rowCount === 0) {\n this.rowCount = PartialStore.INITIAL_ROW_COUNT;\n }\n };\n PartialStore.prototype.getRowNodesInRange = function (firstInRange, lastInRange) {\n var result = [];\n var lastBlockId = -1;\n var inActiveRange = false;\n // if only one node passed, we start the selection at the top\n if (_.missing(firstInRange)) {\n inActiveRange = true;\n }\n var foundGapInSelection = false;\n this.getBlocksInOrder().forEach(function (block) {\n if (foundGapInSelection) {\n return;\n }\n if (inActiveRange && (lastBlockId + 1 !== block.getId())) {\n foundGapInSelection = true;\n return;\n }\n lastBlockId = block.getId();\n block.forEachNodeShallow(function (rowNode) {\n var hitFirstOrLast = rowNode === firstInRange || rowNode === lastInRange;\n if (inActiveRange || hitFirstOrLast) {\n result.push(rowNode);\n }\n if (hitFirstOrLast) {\n inActiveRange = !inActiveRange;\n }\n });\n });\n // inActiveRange will be still true if we never hit the second rowNode\n var invalidRange = foundGapInSelection || inActiveRange;\n return invalidRange ? [] : result;\n };\n PartialStore.prototype.findBlockAndExecute = function (matchBlockFunc, blockFoundFunc, blockNotFoundFunc) {\n var blockFound = false;\n var breakSearch = false;\n var lastBlock = null;\n var res;\n this.getBlocksInOrder().forEach(function (block) {\n if (blockFound || breakSearch) {\n return;\n }\n var comparatorResult = matchBlockFunc(block);\n if (comparatorResult == FindResult.FOUND) {\n res = blockFoundFunc(block);\n blockFound = true;\n }\n else if (comparatorResult == FindResult.CONTINUE_FIND) {\n lastBlock = block;\n }\n else if (comparatorResult == FindResult.BREAK_FIND) {\n breakSearch = true;\n }\n });\n if (!blockFound) {\n res = blockNotFoundFunc(lastBlock);\n }\n return res;\n };\n PartialStore.prototype.getRowBounds = function (index) {\n var _this = this;\n var matchBlockFunc = function (block) {\n if (block.isDisplayIndexInBlock(index)) {\n return FindResult.FOUND;\n }\n else {\n return block.isBlockBefore(index) ? FindResult.CONTINUE_FIND : FindResult.BREAK_FIND;\n }\n };\n var blockFoundFunc = function (foundBlock) {\n return foundBlock.getRowBounds(index);\n };\n var blockNotFoundFunc = function (previousBlock) {\n var nextRowTop;\n var nextRowIndex;\n if (previousBlock !== null) {\n nextRowTop = previousBlock.getBlockTopPx() + previousBlock.getBlockHeightPx();\n nextRowIndex = previousBlock.getDisplayIndexEnd();\n }\n else {\n nextRowTop = _this.cacheTopPixel;\n nextRowIndex = _this.displayIndexStart;\n }\n var rowsBetween = index - nextRowIndex;\n return {\n rowHeight: _this.defaultRowHeight,\n rowTop: nextRowTop + rowsBetween * _this.defaultRowHeight\n };\n };\n return this.findBlockAndExecute(matchBlockFunc, blockFoundFunc, blockNotFoundFunc);\n };\n PartialStore.prototype.getRowIndexAtPixel = function (pixel) {\n var _this = this;\n var matchBlockFunc = function (block) {\n if (block.isPixelInRange(pixel)) {\n return FindResult.FOUND;\n }\n else {\n return block.getBlockTopPx() < pixel ? FindResult.CONTINUE_FIND : FindResult.BREAK_FIND;\n }\n };\n var blockFoundFunc = function (foundBlock) {\n return foundBlock.getRowIndexAtPixel(pixel);\n };\n var blockNotFoundFunc = function (previousBlock) {\n var nextRowTop;\n var nextRowIndex;\n if (previousBlock) {\n nextRowTop = previousBlock.getBlockTopPx() + previousBlock.getBlockHeightPx();\n nextRowIndex = previousBlock.getDisplayIndexEnd();\n }\n else {\n nextRowTop = _this.cacheTopPixel;\n nextRowIndex = _this.displayIndexStart;\n }\n // we start at the last loaded block before this block, and go down\n // block by block, adding in the block sizes (using cached sizes if available)\n // until we get to a block that does should have the pixel\n var blockSize = _this.storeParams.cacheBlockSize;\n var defaultBlockHeight = _this.defaultRowHeight * blockSize;\n var nextBlockId = previousBlock ? (previousBlock.getId() + 1) : 0;\n var getBlockDetails = function (id) {\n var cachedBlockHeight = _this.getCachedBlockHeight(id);\n var blockHeight = cachedBlockHeight != null ? cachedBlockHeight : defaultBlockHeight;\n var pixelInBlock = pixel <= (blockHeight + nextRowTop);\n return {\n height: blockHeight, pixelInBlock: pixelInBlock\n };\n };\n var blockDetails = getBlockDetails(nextBlockId);\n while (!blockDetails.pixelInBlock) {\n nextRowTop += blockDetails.height;\n nextRowIndex += blockSize;\n nextBlockId++;\n blockDetails = getBlockDetails(nextBlockId);\n }\n var pixelsBetween = pixel - nextRowTop;\n var rowHeight = blockDetails.height / blockSize;\n var rowsBetween = Math.floor(pixelsBetween / rowHeight) | 0;\n return nextRowIndex + rowsBetween;\n };\n var result = this.findBlockAndExecute(matchBlockFunc, blockFoundFunc, blockNotFoundFunc);\n var lastAllowedIndex = this.getDisplayIndexEnd() - 1;\n result = Math.min(result, lastAllowedIndex);\n return result;\n };\n PartialStore.prototype.clearDisplayIndexes = function () {\n this.displayIndexStart = undefined;\n this.displayIndexEnd = undefined;\n this.getBlocksInOrder().forEach(function (block) { return block.clearDisplayIndexes(); });\n };\n PartialStore.prototype.setDisplayIndexes = function (displayIndexSeq, nextRowTop) {\n var _this = this;\n this.displayIndexStart = displayIndexSeq.peek();\n this.cacheTopPixel = nextRowTop.value;\n var lastBlockId = -1;\n var blockSize = this.storeParams.cacheBlockSize;\n this.getBlocksInOrder().forEach(function (currentBlock) {\n // if we skipped blocks, then we need to skip the row indexes. we assume that all missing\n // blocks are made up of closed RowNodes only (if they were groups), as we never expire from\n // the cache if any row nodes are open.\n var blockId = currentBlock.getId();\n var blocksSkippedCount = blockId - lastBlockId - 1;\n var rowsSkippedCount = blocksSkippedCount * blockSize;\n if (rowsSkippedCount > 0) {\n displayIndexSeq.skip(rowsSkippedCount);\n }\n for (var i = 1; i <= blocksSkippedCount; i++) {\n var blockToAddId = blockId - i;\n if (_.exists(_this.blockHeights[blockToAddId])) {\n nextRowTop.value += _this.blockHeights[blockToAddId];\n }\n else {\n nextRowTop.value += blockSize * _this.defaultRowHeight;\n }\n }\n lastBlockId = blockId;\n currentBlock.setDisplayIndexes(displayIndexSeq, nextRowTop);\n _this.blockHeights[blockId] = currentBlock.getBlockHeightPx();\n });\n // if any blocks missing at the end, need to increase the row index for them also\n // eg if block size = 10, we have total rows of 25 (indexes 0 .. 24), but first 2 blocks loaded (because\n // last row was ejected from cache), then:\n // lastVisitedRow = 19, virtualRowCount = 25, rows not accounted for = 5 (24 - 19)\n var lastVisitedRow = ((lastBlockId + 1) * blockSize) - 1;\n var rowCount = this.getRowCount();\n var rowsNotAccountedFor = rowCount - lastVisitedRow - 1;\n if (rowsNotAccountedFor > 0) {\n displayIndexSeq.skip(rowsNotAccountedFor);\n nextRowTop.value += rowsNotAccountedFor * this.defaultRowHeight;\n }\n this.displayIndexEnd = displayIndexSeq.peek();\n this.cacheHeightPixels = nextRowTop.value - this.cacheTopPixel;\n };\n // gets called in a) init() above and b) by the grid\n PartialStore.prototype.getRowUsingDisplayIndex = function (displayRowIndex, dontCreateBlock) {\n var _this = this;\n if (dontCreateBlock === void 0) { dontCreateBlock = false; }\n // this can happen if asking for a row that doesn't exist in the model,\n // eg if a cell range is selected, and the user filters so rows no longer exists\n if (!this.isDisplayIndexInStore(displayRowIndex)) {\n return undefined;\n }\n var matchBlockFunc = function (block) {\n if (block.isDisplayIndexInBlock(displayRowIndex)) {\n return FindResult.FOUND;\n }\n else {\n return block.isBlockBefore(displayRowIndex) ? FindResult.CONTINUE_FIND : FindResult.BREAK_FIND;\n }\n };\n var blockFoundFunc = function (foundBlock) {\n return foundBlock.getRowUsingDisplayIndex(displayRowIndex);\n };\n var blockNotFoundFunc = function (previousBlock) {\n if (dontCreateBlock) {\n return;\n }\n var blockNumber;\n var displayIndexStart;\n var nextRowTop;\n var blockSize = _this.storeParams.cacheBlockSize;\n // because missing blocks are always fully closed, we can work out\n // the start index of the block we want by hopping from the closest block,\n // as we know the row count in closed blocks is equal to the page size\n if (previousBlock) {\n blockNumber = previousBlock.getId() + 1;\n displayIndexStart = previousBlock.getDisplayIndexEnd();\n nextRowTop = previousBlock.getBlockHeightPx() + previousBlock.getBlockTopPx();\n var isInRange = function () {\n return displayRowIndex >= displayIndexStart && displayRowIndex < (displayIndexStart + blockSize);\n };\n while (!isInRange()) {\n displayIndexStart += blockSize;\n var cachedBlockHeight = _this.blockHeights[blockNumber];\n if (_.exists(cachedBlockHeight)) {\n nextRowTop += cachedBlockHeight;\n }\n else {\n nextRowTop += _this.defaultRowHeight * blockSize;\n }\n blockNumber++;\n }\n }\n else {\n var localIndex = displayRowIndex - _this.displayIndexStart;\n blockNumber = Math.floor(localIndex / blockSize);\n displayIndexStart = _this.displayIndexStart + (blockNumber * blockSize);\n nextRowTop = _this.cacheTopPixel + (blockNumber * blockSize * _this.defaultRowHeight);\n }\n _this.logger.log(\"block missing, rowIndex = \" + displayRowIndex + \", creating #\" + blockNumber + \", displayIndexStart = \" + displayIndexStart);\n var newBlock = _this.createBlock(blockNumber, displayIndexStart, { value: nextRowTop });\n return newBlock.getRowUsingDisplayIndex(displayRowIndex);\n };\n return this.findBlockAndExecute(matchBlockFunc, blockFoundFunc, blockNotFoundFunc);\n };\n PartialStore.prototype.getTopLevelRowDisplayedIndex = function (topLevelIndex) {\n var blockSize = this.storeParams.cacheBlockSize;\n var blockId = Math.floor(topLevelIndex / blockSize);\n var matchBlockFunc = function (block) {\n if (block.getId() === blockId) {\n return FindResult.FOUND;\n }\n return block.getId() < blockId ? FindResult.CONTINUE_FIND : FindResult.BREAK_FIND;\n };\n var blockFoundFunc = function (foundBlock) {\n var rowNode = foundBlock.getRowUsingLocalIndex(topLevelIndex);\n return rowNode.rowIndex;\n };\n var blockNotFoundFunc = function (previousBlock) {\n if (!previousBlock) {\n return topLevelIndex;\n }\n // note: the local index is the same as the top level index, two terms for same thing\n //\n // get index of the last row before this row\n // eg if blocksize = 100, then:\n // last row of first block is 99 (100 * 1) -1;\n // last row of second block is 199 (100 * 2) -1;\n var lastRowTopLevelIndex = (blockSize * (previousBlock.getId() + 1)) - 1;\n // get the last top level node in the block before the wanted block. this will be the last\n // loaded displayed top level node.\n var lastRowNode = previousBlock.getRowUsingLocalIndex(lastRowTopLevelIndex);\n // we want the index of the last displayed node, not just the top level node, so if the last top level node\n // is open, we get the index of the last displayed child node.\n var lastDisplayedNodeIndexInBlockBefore;\n if (lastRowNode.expanded && lastRowNode.childStore) {\n var serverSideCache = lastRowNode.childStore;\n lastDisplayedNodeIndexInBlockBefore = serverSideCache.getDisplayIndexEnd() - 1;\n }\n else if (lastRowNode.expanded && lastRowNode.detailNode) {\n lastDisplayedNodeIndexInBlockBefore = lastRowNode.detailNode.rowIndex;\n }\n else {\n lastDisplayedNodeIndexInBlockBefore = lastRowNode.rowIndex;\n }\n // we are guaranteed no rows are open. so the difference between the topTopIndex will be the\n // same as the difference between the displayed index\n var indexDiff = topLevelIndex - lastRowTopLevelIndex;\n return lastDisplayedNodeIndexInBlockBefore + indexDiff;\n };\n return this.findBlockAndExecute(matchBlockFunc, blockFoundFunc, blockNotFoundFunc);\n };\n PartialStore.prototype.addStoreStates = function (result) {\n result.push({\n type: 'partial',\n route: this.parentRowNode.getGroupKeys(),\n rowCount: this.rowCount,\n lastRowIndexKnown: this.lastRowIndexKnown,\n info: this.info,\n maxBlocksInCache: this.storeParams.maxBlocksInCache,\n cacheBlockSize: this.storeParams.cacheBlockSize\n });\n this.forEachChildStoreShallow(function (childStore) { return childStore.addStoreStates(result); });\n };\n PartialStore.prototype.getCachedBlockHeight = function (blockNumber) {\n return this.blockHeights[blockNumber];\n };\n PartialStore.prototype.createBlock = function (blockNumber, displayIndex, nextRowTop) {\n var block = this.createBean(new PartialStoreBlock(blockNumber, this.parentRowNode, this.ssrmParams, this.storeParams, this));\n block.setDisplayIndexes(new NumberSequence(displayIndex), nextRowTop);\n this.blocks[block.getId()] = block;\n this.purgeBlocksIfNeeded(block);\n this.rowNodeBlockLoader.addBlock(block);\n return block;\n };\n PartialStore.prototype.getDisplayIndexEnd = function () {\n return this.displayIndexEnd;\n };\n PartialStore.prototype.isDisplayIndexInStore = function (displayIndex) {\n if (this.getRowCount() === 0) {\n return false;\n }\n return displayIndex >= this.displayIndexStart && displayIndex < this.displayIndexEnd;\n };\n PartialStore.prototype.applyTransaction = function (transaction) {\n return { status: ServerSideTransactionResultStatus.StoreWrongType };\n };\n PartialStore.prototype.getChildStore = function (keys) {\n var _this = this;\n var findNodeCallback = function (key) {\n var nextNode = null;\n _this.getBlocksInOrder().forEach(function (block) {\n block.forEachNodeShallow(function (rowNode) {\n if (rowNode.key === key) {\n nextNode = rowNode;\n }\n }, new NumberSequence());\n });\n return nextNode;\n };\n return this.storeUtils.getChildStore(keys, this, findNodeCallback);\n };\n PartialStore.prototype.isPixelInRange = function (pixel) {\n if (this.getRowCount() === 0) {\n return false;\n }\n return pixel >= this.cacheTopPixel && pixel < (this.cacheTopPixel + this.cacheHeightPixels);\n };\n PartialStore.prototype.refreshAfterFilter = function (params) {\n this.resetStore();\n };\n PartialStore.prototype.refreshAfterSort = function (params) {\n if (this.storeUtils.isServerRefreshNeeded(this.parentRowNode, this.ssrmParams.rowGroupCols, params)) {\n this.resetStore();\n return;\n }\n // call refreshAfterSort on children, as we did not purge.\n // if we did purge, no need to do this as all children were destroyed\n this.forEachChildStoreShallow(function (store) { return store.refreshAfterSort(params); });\n };\n PartialStore.prototype.forEachChildStoreShallow = function (callback) {\n this.getBlocksInOrder().forEach(function (block) {\n if (block.isGroupLevel()) {\n var innerCallback = function (rowNode) {\n var nextCache = rowNode.childStore;\n if (nextCache) {\n callback(nextCache);\n }\n };\n block.forEachNodeShallow(innerCallback, new NumberSequence());\n }\n });\n };\n // this property says how many empty blocks should be in a cache, eg if scrolls down fast and creates 10\n // blocks all for loading, the grid will only load the last 2 - it will assume the blocks the user quickly\n // scrolled over are not needed to be loaded.\n PartialStore.MAX_EMPTY_BLOCKS_TO_KEEP = 2;\n PartialStore.INITIAL_ROW_COUNT = 1;\n PartialStore.OVERFLOW_SIZE = 1;\n __decorate([\n Autowired('rowRenderer')\n ], PartialStore.prototype, \"rowRenderer\", void 0);\n __decorate([\n Autowired('rowNodeBlockLoader')\n ], PartialStore.prototype, \"rowNodeBlockLoader\", void 0);\n __decorate([\n Autowired('ssrmStoreUtils')\n ], PartialStore.prototype, \"storeUtils\", void 0);\n __decorate([\n Autowired(\"focusService\")\n ], PartialStore.prototype, \"focusService\", void 0);\n __decorate([\n Autowired(\"columnModel\")\n ], PartialStore.prototype, \"columnModel\", void 0);\n __decorate([\n PostConstruct\n ], PartialStore.prototype, \"postConstruct\", null);\n __decorate([\n PreDestroy\n ], PartialStore.prototype, \"destroyAllBlocks\", null);\n __decorate([\n __param(0, Qualifier('loggerFactory'))\n ], PartialStore.prototype, \"setBeans\", null);\n return PartialStore;\n}(BeanStub));\nexport { PartialStore };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Bean, BeanStub, Optional, PreDestroy } from \"@ag-grid-community/core\";\nimport { GridChartComp } from \"./chartComp/gridChartComp\";\nimport { CURRENT_VERSION, upgradeChartModel } from \"./chartModelMigration\";\nvar ChartService = /** @class */ (function (_super) {\n __extends(ChartService, _super);\n function ChartService() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n // we destroy all charts bound to this grid when grid is destroyed. activeCharts contains all charts, including\n // those in developer provided containers.\n _this.activeCharts = new Set();\n _this.activeChartComps = new Set();\n // this shared (singleton) context is used by cross filtering in line and area charts\n _this.crossFilteringContext = {\n lastSelectedChartId: '',\n };\n return _this;\n }\n ChartService.prototype.getChartModels = function () {\n var models = [];\n var versionedModel = function (c) {\n return __assign(__assign({}, c), { version: CURRENT_VERSION });\n };\n this.activeChartComps.forEach(function (c) { return models.push(versionedModel(c.getChartModel())); });\n return models;\n };\n ChartService.prototype.getChartRef = function (chartId) {\n var chartRef;\n this.activeCharts.forEach(function (cr) {\n if (cr.chartId === chartId) {\n chartRef = cr;\n }\n });\n return chartRef;\n };\n ChartService.prototype.getChartImageDataURL = function (params) {\n var url;\n this.activeChartComps.forEach(function (c) {\n if (c.getChartId() === params.chartId) {\n url = c.getChartImageDataURL(params.fileFormat);\n }\n });\n return url;\n };\n ChartService.prototype.createChartFromCurrentRange = function (chartType) {\n if (chartType === void 0) { chartType = 'groupedColumn'; }\n var selectedRange = this.getSelectedRange();\n return this.createChart(selectedRange, chartType);\n };\n ChartService.prototype.restoreChart = function (model, chartContainer) {\n var _this = this;\n if (!model) {\n console.warn(\"AG Grid - unable to restore chart as no chart model is provided\");\n return;\n }\n if (model.version !== CURRENT_VERSION) {\n model = upgradeChartModel(model);\n }\n var params = {\n cellRange: model.cellRange,\n chartType: model.chartType,\n chartThemeName: model.chartThemeName,\n chartContainer: chartContainer,\n suppressChartRanges: model.suppressChartRanges,\n aggFunc: model.aggFunc,\n unlinkChart: model.unlinkChart,\n seriesChartTypes: model.seriesChartTypes\n };\n var getCellRange = function (cellRangeParams) {\n return _this.rangeService\n ? _this.rangeService.createCellRangeFromCellRangeParams(cellRangeParams)\n : undefined;\n };\n if (model.modelType === 'pivot') {\n // if required enter pivot mode\n if (!this.columnModel.isPivotMode()) {\n this.columnModel.setPivotMode(true, \"pivotChart\");\n }\n // pivot chart range contains all visible column without a row range to include all rows\n var columns = this.columnModel.getAllDisplayedColumns().map(function (col) { return col.getColId(); });\n var chartAllRangeParams = { rowStartIndex: null, rowEndIndex: null, columns: columns };\n var cellRange_1 = getCellRange(chartAllRangeParams);\n if (!cellRange_1) {\n console.warn(\"AG Grid - unable to create chart as there are no columns in the grid.\");\n return;\n }\n return this.createChart(cellRange_1, params.chartType, params.chartThemeName, true, true, params.chartContainer, undefined, undefined, params.unlinkChart, false, model.chartOptions);\n }\n var cellRange = getCellRange(params.cellRange);\n if (!cellRange) {\n console.warn(\"AG Grid - unable to create chart as no range is selected\");\n return;\n }\n return this.createChart(cellRange, params.chartType, params.chartThemeName, false, params.suppressChartRanges, params.chartContainer, params.aggFunc, undefined, params.unlinkChart, false, model.chartOptions, model.chartPalette, params.seriesChartTypes);\n };\n ChartService.prototype.createRangeChart = function (params) {\n var cellRange = this.rangeService\n ? this.rangeService.createCellRangeFromCellRangeParams(params.cellRange)\n : undefined;\n if (!cellRange) {\n console.warn(\"AG Grid - unable to create chart as no range is selected\");\n return;\n }\n return this.createChart(cellRange, params.chartType, params.chartThemeName, false, params.suppressChartRanges, params.chartContainer, params.aggFunc, params.chartThemeOverrides, params.unlinkChart, undefined, undefined, undefined, params.seriesChartTypes);\n };\n ChartService.prototype.createPivotChart = function (params) {\n // if required enter pivot mode\n if (!this.columnModel.isPivotMode()) {\n this.columnModel.setPivotMode(true, \"pivotChart\");\n }\n // pivot chart range contains all visible column without a row range to include all rows\n var chartAllRangeParams = {\n rowStartIndex: null,\n rowEndIndex: null,\n columns: this.columnModel.getAllDisplayedColumns().map(function (col) { return col.getColId(); })\n };\n var cellRange = this.rangeService\n ? this.rangeService.createCellRangeFromCellRangeParams(chartAllRangeParams)\n : undefined;\n if (!cellRange) {\n console.warn(\"AG Grid - unable to create chart as there are no columns in the grid.\");\n return;\n }\n return this.createChart(cellRange, params.chartType, params.chartThemeName, true, true, params.chartContainer, undefined, params.chartThemeOverrides, params.unlinkChart);\n };\n ChartService.prototype.createCrossFilterChart = function (params) {\n var cellRange = this.rangeService\n ? this.rangeService.createCellRangeFromCellRangeParams(params.cellRange)\n : undefined;\n if (!cellRange) {\n console.warn(\"AG Grid - unable to create chart as no range is selected\");\n return;\n }\n var crossFiltering = true;\n var suppressChartRangesSupplied = typeof params.suppressChartRanges !== 'undefined' && params.suppressChartRanges !== null;\n var suppressChartRanges = suppressChartRangesSupplied ? params.suppressChartRanges : true;\n return this.createChart(cellRange, params.chartType, params.chartThemeName, false, suppressChartRanges, params.chartContainer, params.aggFunc, params.chartThemeOverrides, params.unlinkChart, crossFiltering);\n };\n ChartService.prototype.createChart = function (cellRange, chartType, chartThemeName, pivotChart, suppressChartRanges, container, aggFunc, chartThemeOverrides, unlinkChart, crossFiltering, chartOptionsToRestore, chartPaletteToRestore, seriesChartTypes) {\n var _this = this;\n if (pivotChart === void 0) { pivotChart = false; }\n if (suppressChartRanges === void 0) { suppressChartRanges = false; }\n if (unlinkChart === void 0) { unlinkChart = false; }\n if (crossFiltering === void 0) { crossFiltering = false; }\n var createChartContainerFunc = this.gridOptionsWrapper.getCreateChartContainerFunc();\n var params = {\n chartId: this.generateId(),\n pivotChart: pivotChart,\n cellRange: cellRange,\n chartType: chartType,\n chartThemeName: chartThemeName,\n insideDialog: !(container || createChartContainerFunc),\n suppressChartRanges: suppressChartRanges,\n aggFunc: aggFunc,\n chartThemeOverrides: chartThemeOverrides,\n unlinkChart: unlinkChart,\n crossFiltering: crossFiltering,\n crossFilteringContext: this.crossFilteringContext,\n chartOptionsToRestore: chartOptionsToRestore,\n chartPaletteToRestore: chartPaletteToRestore,\n seriesChartTypes: seriesChartTypes\n };\n var chartComp = new GridChartComp(params);\n this.context.createBean(chartComp);\n var chartRef = this.createChartRef(chartComp);\n if (container) {\n // if container exists, means developer initiated chart create via API, so place in provided container\n container.appendChild(chartComp.getGui());\n // if the chart container was placed outside of an element that\n // has the grid's theme, we manually add the current theme to\n // make sure all styles for the chartMenu are rendered correctly\n var theme = this.environment.getTheme();\n if (theme.el && !theme.el.contains(container)) {\n container.classList.add(theme.theme);\n }\n }\n else if (createChartContainerFunc) {\n // otherwise user created chart via grid UI, check if developer provides containers (eg if the application\n // is using its own dialogs rather than the grid provided dialogs)\n createChartContainerFunc(chartRef);\n }\n else {\n // add listener to remove from active charts list when charts are destroyed, e.g. closing chart dialog\n chartComp.addEventListener(GridChartComp.EVENT_DESTROYED, function () {\n _this.activeChartComps.delete(chartComp);\n _this.activeCharts.delete(chartRef);\n });\n }\n return chartRef;\n };\n ChartService.prototype.createChartRef = function (chartComp) {\n var _this = this;\n var chartRef = {\n destroyChart: function () {\n if (_this.activeCharts.has(chartRef)) {\n _this.context.destroyBean(chartComp);\n _this.activeChartComps.delete(chartComp);\n _this.activeCharts.delete(chartRef);\n }\n },\n chartElement: chartComp.getGui(),\n chart: chartComp.getUnderlyingChart(),\n chartId: chartComp.getChartModel().chartId\n };\n this.activeCharts.add(chartRef);\n this.activeChartComps.add(chartComp);\n return chartRef;\n };\n ChartService.prototype.getSelectedRange = function () {\n var ranges = this.rangeService.getCellRanges();\n return ranges.length > 0 ? ranges[0] : {};\n };\n ChartService.prototype.generateId = function () {\n return 'id-' + Math.random().toString(36).substr(2, 16);\n };\n ChartService.prototype.destroyAllActiveCharts = function () {\n this.activeCharts.forEach(function (chart) { return chart.destroyChart(); });\n };\n __decorate([\n Optional('rangeService')\n ], ChartService.prototype, \"rangeService\", void 0);\n __decorate([\n Autowired('columnModel')\n ], ChartService.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired('environment')\n ], ChartService.prototype, \"environment\", void 0);\n __decorate([\n PreDestroy\n ], ChartService.prototype, \"destroyAllActiveCharts\", null);\n ChartService = __decorate([\n Bean('chartService')\n ], ChartService);\n return ChartService;\n}(BeanStub));\nexport { ChartService };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Bean, BeanStub } from \"@ag-grid-community/core\";\nvar ChartTranslationService = /** @class */ (function (_super) {\n __extends(ChartTranslationService, _super);\n function ChartTranslationService() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ChartTranslationService_1 = ChartTranslationService;\n ChartTranslationService.prototype.translate = function (toTranslate, defaultText) {\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n var defaultTranslation = ChartTranslationService_1.DEFAULT_TRANSLATIONS[toTranslate] || defaultText;\n return translate(toTranslate, defaultTranslation);\n };\n var ChartTranslationService_1;\n ChartTranslationService.DEFAULT_TRANSLATIONS = {\n pivotChartTitle: 'Pivot Chart',\n rangeChartTitle: 'Range Chart',\n settings: 'Settings',\n data: 'Data',\n format: 'Format',\n categories: 'Categories',\n defaultCategory: '(None)',\n series: 'Series',\n xyValues: 'X Y Values',\n paired: 'Paired Mode',\n axis: 'Axis',\n navigator: 'Navigator',\n color: 'Color',\n thickness: 'Thickness',\n xType: 'X Type',\n automatic: 'Automatic',\n category: 'Category',\n number: 'Number',\n time: 'Time',\n xRotation: 'X Rotation',\n yRotation: 'Y Rotation',\n ticks: 'Ticks',\n width: 'Width',\n height: 'Height',\n length: 'Length',\n padding: 'Padding',\n spacing: 'Spacing',\n chart: 'Chart',\n title: 'Title',\n titlePlaceholder: 'Chart title - double click to edit',\n background: 'Background',\n font: 'Font',\n top: 'Top',\n right: 'Right',\n bottom: 'Bottom',\n left: 'Left',\n labels: 'Labels',\n size: 'Size',\n shape: 'Shape',\n minSize: 'Minimum Size',\n maxSize: 'Maximum Size',\n legend: 'Legend',\n position: 'Position',\n markerSize: 'Marker Size',\n markerStroke: 'Marker Stroke',\n markerPadding: 'Marker Padding',\n itemSpacing: 'Item Spacing',\n itemPaddingX: 'Item Padding X',\n itemPaddingY: 'Item Padding Y',\n layoutHorizontalSpacing: 'Horizontal Spacing',\n layoutVerticalSpacing: 'Vertical Spacing',\n strokeWidth: 'Stroke Width',\n offset: 'Offset',\n offsets: 'Offsets',\n tooltips: 'Tooltips',\n callout: 'Callout',\n markers: 'Markers',\n shadow: 'Shadow',\n blur: 'Blur',\n xOffset: 'X Offset',\n yOffset: 'Y Offset',\n lineWidth: 'Line Width',\n lineDash: 'Line Dash',\n normal: 'Normal',\n bold: 'Bold',\n italic: 'Italic',\n boldItalic: 'Bold Italic',\n predefined: 'Predefined',\n fillOpacity: 'Fill Opacity',\n strokeOpacity: 'Line Opacity',\n histogramBinCount: 'Bin count',\n columnGroup: 'Column',\n barGroup: 'Bar',\n pieGroup: 'Pie',\n lineGroup: 'Line',\n scatterGroup: 'X Y (Scatter)',\n areaGroup: 'Area',\n histogramGroup: 'Histogram',\n combinationGroup: 'Combination',\n groupedColumnTooltip: 'Grouped',\n stackedColumnTooltip: 'Stacked',\n normalizedColumnTooltip: '100% Stacked',\n groupedBarTooltip: 'Grouped',\n stackedBarTooltip: 'Stacked',\n normalizedBarTooltip: '100% Stacked',\n pieTooltip: 'Pie',\n doughnutTooltip: 'Doughnut',\n lineTooltip: 'Line',\n groupedAreaTooltip: 'Area',\n stackedAreaTooltip: 'Stacked',\n normalizedAreaTooltip: '100% Stacked',\n scatterTooltip: 'Scatter',\n bubbleTooltip: 'Bubble',\n histogramTooltip: 'Histogram',\n columnLineComboTooltip: 'Column & Line',\n areaColumnComboTooltip: 'Area & Column',\n customComboTooltip: 'Custom Combination',\n noDataToChart: 'No data available to be charted.',\n pivotChartRequiresPivotMode: 'Pivot Chart requires Pivot Mode enabled.',\n chartSettingsToolbarTooltip: 'Menu',\n chartLinkToolbarTooltip: 'Linked to Grid',\n chartUnlinkToolbarTooltip: 'Unlinked from Grid',\n chartDownloadToolbarTooltip: 'Download Chart',\n seriesChartType: 'Series Chart Type',\n seriesType: 'Series Type',\n secondaryAxis: 'Secondary Axis',\n };\n ChartTranslationService = ChartTranslationService_1 = __decorate([\n Bean(\"chartTranslationService\")\n ], ChartTranslationService);\n return ChartTranslationService;\n}(BeanStub));\nexport { ChartTranslationService };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, Bean, BeanStub } from \"@ag-grid-community/core\";\nvar ChartCrossFilterService = /** @class */ (function (_super) {\n __extends(ChartCrossFilterService, _super);\n function ChartCrossFilterService() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ChartCrossFilterService_1 = ChartCrossFilterService;\n ChartCrossFilterService.prototype.filter = function (event, reset) {\n if (reset === void 0) { reset = false; }\n var filterModel = this.gridApi.getFilterModel();\n // filters should be reset when user clicks on canvas background\n if (reset) {\n this.resetFilters(filterModel);\n return;\n }\n var colId = ChartCrossFilterService_1.extractFilterColId(event);\n if (this.isValidColumnFilter(colId)) {\n // update filters based on current chart selections\n this.updateFilters(filterModel, event, colId);\n }\n else {\n console.warn(\"AG Grid: cross filtering requires a 'agSetColumnFilter' or 'agMultiColumnFilter' \" +\n \"to be defined on the column with id: '\" + colId + \"'\");\n }\n };\n ChartCrossFilterService.prototype.resetFilters = function (filterModel) {\n var filtersExist = Object.keys(filterModel).length > 0;\n if (filtersExist) {\n // only reset filters / charts when necessary to prevent undesirable flickering effect\n this.gridApi.setFilterModel(null);\n this.gridApi.onFilterChanged();\n }\n };\n ChartCrossFilterService.prototype.updateFilters = function (filterModel, event, colId) {\n var _a;\n var dataKey = ChartCrossFilterService_1.extractFilterColId(event);\n var rawValue = event.datum[dataKey];\n if (rawValue === undefined) {\n return;\n }\n var selectedValue = rawValue.toString();\n if (event.event.metaKey || event.event.ctrlKey) {\n var existingGridValues = this.getCurrentGridValuesForCategory(colId);\n var valueAlreadyExists = _.includes(existingGridValues, selectedValue);\n var updatedValues = void 0;\n if (valueAlreadyExists) {\n updatedValues = existingGridValues.filter(function (v) { return v !== selectedValue; });\n }\n else {\n updatedValues = existingGridValues;\n updatedValues.push(selectedValue);\n }\n filterModel[colId] = this.getUpdatedFilterModel(colId, updatedValues);\n }\n else {\n var updatedValues = [selectedValue];\n filterModel = (_a = {}, _a[colId] = this.getUpdatedFilterModel(colId, updatedValues), _a);\n }\n this.gridApi.setFilterModel(filterModel);\n };\n ChartCrossFilterService.prototype.getUpdatedFilterModel = function (colId, updatedValues) {\n var columnFilterType = this.getColumnFilterType(colId);\n if (columnFilterType === 'agMultiColumnFilter') {\n return { filterType: 'multi', filterModels: [null, { filterType: 'set', values: updatedValues }] };\n }\n return { filterType: 'set', values: updatedValues };\n };\n ChartCrossFilterService.prototype.getCurrentGridValuesForCategory = function (colId) {\n var _this = this;\n var filteredValues = [];\n var column = this.getColumnById(colId);\n this.gridApi.forEachNodeAfterFilter(function (rowNode) {\n if (column && !rowNode.group) {\n var value = _this.valueService.getValue(column, rowNode) + '';\n if (!filteredValues.includes(value)) {\n filteredValues.push(value);\n }\n }\n });\n return filteredValues;\n };\n ChartCrossFilterService.extractFilterColId = function (event) {\n return event.xKey ? event.xKey : event.labelKey;\n };\n ChartCrossFilterService.prototype.isValidColumnFilter = function (colId) {\n if (colId.indexOf('-filtered-out')) {\n colId = colId.replace('-filtered-out', '');\n }\n var filterType = this.getColumnFilterType(colId);\n if (typeof filterType === 'boolean') {\n return filterType;\n }\n return _.includes(['agSetColumnFilter', 'agMultiColumnFilter'], filterType);\n };\n ChartCrossFilterService.prototype.getColumnFilterType = function (colId) {\n var gridColumn = this.getColumnById(colId);\n if (gridColumn) {\n var colDef = gridColumn.getColDef();\n return colDef.filter != null ? colDef.filter : colDef.filterFramework;\n }\n };\n ChartCrossFilterService.prototype.getColumnById = function (colId) {\n return this.columnModel.getGridColumn(colId);\n };\n var ChartCrossFilterService_1;\n __decorate([\n Autowired('gridApi')\n ], ChartCrossFilterService.prototype, \"gridApi\", void 0);\n __decorate([\n Autowired('columnModel')\n ], ChartCrossFilterService.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired('valueService')\n ], ChartCrossFilterService.prototype, \"valueService\", void 0);\n ChartCrossFilterService = ChartCrossFilterService_1 = __decorate([\n Bean(\"chartCrossFilterService\")\n ], ChartCrossFilterService);\n return ChartCrossFilterService;\n}(BeanStub));\nexport { ChartCrossFilterService };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n};\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nimport { Autowired, Bean, Constants, Events, PostConstruct, BeanStub, AutoScrollService, _ } from \"@ag-grid-community/core\";\nvar RangeService = /** @class */ (function (_super) {\n __extends(RangeService, _super);\n function RangeService() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.cellRanges = [];\n _this.bodyScrollListener = _this.onBodyScroll.bind(_this);\n _this.dragging = false;\n return _this;\n }\n RangeService.prototype.init = function () {\n var _this = this;\n this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, function () { return _this.onColumnsChanged(); });\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_VISIBLE, this.onColumnsChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_VALUE_CHANGED, this.onColumnsChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, function () { return _this.removeAllCellRanges(); });\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_ROW_GROUP_CHANGED, function () { return _this.removeAllCellRanges(); });\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PIVOT_CHANGED, function () { return _this.removeAllCellRanges(); });\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_GROUP_OPENED, this.refreshLastRangeStart.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_MOVED, this.refreshLastRangeStart.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PINNED, this.refreshLastRangeStart.bind(this));\n this.ctrlsService.whenReady(function () {\n var gridBodyCtrl = _this.ctrlsService.getGridBodyCtrl();\n _this.autoScrollService = new AutoScrollService({\n scrollContainer: gridBodyCtrl.getBodyViewportElement(),\n scrollAxis: 'xy',\n getVerticalPosition: function () { return gridBodyCtrl.getScrollFeature().getVScrollPosition().top; },\n setVerticalPosition: function (position) { return gridBodyCtrl.getScrollFeature().setVerticalScrollPosition(position); },\n getHorizontalPosition: function () { return gridBodyCtrl.getScrollFeature().getHScrollPosition().left; },\n setHorizontalPosition: function (position) { return gridBodyCtrl.getScrollFeature().setHorizontalScrollPosition(position); },\n shouldSkipVerticalScroll: function () { return _this.gridOptionsWrapper.getDomLayout() !== Constants.DOM_LAYOUT_NORMAL; },\n shouldSkipHorizontalScroll: function () { return gridBodyCtrl.getScrollFeature().isHorizontalScrollShowing(); }\n });\n });\n };\n // Called for both columns loaded & column visibility events\n RangeService.prototype.onColumnsChanged = function () {\n var _this = this;\n // first move start column in last cell range (i.e. series chart range)\n this.refreshLastRangeStart();\n var allColumns = this.columnModel.getAllDisplayedColumns();\n // check that the columns in each range still exist and are visible\n this.cellRanges.forEach(function (cellRange) {\n var beforeCols = cellRange.columns;\n // remove hidden or removed cols from cell range\n cellRange.columns = cellRange.columns.filter(function (col) { return col.isVisible() && allColumns.indexOf(col) !== -1; });\n var colsInRangeChanged = !_.areEqual(beforeCols, cellRange.columns);\n if (colsInRangeChanged) {\n // notify users and other parts of grid (i.e. status panel) that range has changed\n _this.dispatchChangedEvent(false, true, cellRange.id);\n }\n });\n // Remove empty cell ranges\n var countBefore = this.cellRanges.length;\n this.cellRanges = this.cellRanges.filter(function (range) { return range.columns.length > 0; });\n if (countBefore > this.cellRanges.length) {\n this.dispatchChangedEvent(false, true);\n }\n };\n RangeService.prototype.refreshLastRangeStart = function () {\n var lastRange = _.last(this.cellRanges);\n if (!lastRange) {\n return;\n }\n this.refreshRangeStart(lastRange);\n };\n RangeService.prototype.isContiguousRange = function (cellRange) {\n var rangeColumns = cellRange.columns;\n if (!rangeColumns.length) {\n return false;\n }\n var allColumns = this.columnModel.getAllDisplayedColumns();\n var allPositions = rangeColumns.map(function (c) { return allColumns.indexOf(c); }).sort(function (a, b) { return a - b; });\n return _.last(allPositions) - allPositions[0] + 1 === rangeColumns.length;\n };\n RangeService.prototype.getRangeStartRow = function (cellRange) {\n if (cellRange.startRow && cellRange.endRow) {\n return this.rowPositionUtils.before(cellRange.startRow, cellRange.endRow) ?\n cellRange.startRow : cellRange.endRow;\n }\n var rowPinned = this.pinnedRowModel.getPinnedTopRowCount() > 0 ? Constants.PINNED_TOP : null;\n return { rowIndex: 0, rowPinned: rowPinned };\n };\n RangeService.prototype.getRangeEndRow = function (cellRange) {\n if (cellRange.startRow && cellRange.endRow) {\n return this.rowPositionUtils.before(cellRange.startRow, cellRange.endRow) ?\n cellRange.endRow : cellRange.startRow;\n }\n var pinnedBottomRowCount = this.pinnedRowModel.getPinnedBottomRowCount();\n var pinnedBottom = pinnedBottomRowCount > 0;\n if (pinnedBottom) {\n return {\n rowIndex: pinnedBottomRowCount - 1,\n rowPinned: Constants.PINNED_BOTTOM\n };\n }\n return {\n rowIndex: this.rowModel.getRowCount() - 1,\n rowPinned: null\n };\n };\n RangeService.prototype.setRangeToCell = function (cell, appendRange) {\n if (appendRange === void 0) { appendRange = false; }\n if (!this.gridOptionsWrapper.isEnableRangeSelection()) {\n return;\n }\n var columns = this.calculateColumnsBetween(cell.column, cell.column);\n if (!columns) {\n return;\n }\n var suppressMultiRangeSelections = this.gridOptionsWrapper.isSuppressMultiRangeSelection();\n // if not appending, then clear previous range selections\n if (suppressMultiRangeSelections || !appendRange || _.missing(this.cellRanges)) {\n this.removeAllCellRanges(true);\n }\n var rowForCell = {\n rowIndex: cell.rowIndex,\n rowPinned: cell.rowPinned\n };\n // if there is already a range for this cell, then we reuse the same range, otherwise the user\n // can ctrl & click a cell many times and hit ctrl+c, which would result in the cell getting copied\n // many times to the clipboard.\n var cellRange;\n for (var i = 0; i < this.cellRanges.length; i++) {\n var range = this.cellRanges[i];\n var matches = \n // check cols are same\n (range.columns && range.columns.length === 1 && range.columns[0] === cell.column) &&\n // check rows are same\n this.rowPositionUtils.sameRow(rowForCell, range.startRow) &&\n this.rowPositionUtils.sameRow(rowForCell, range.endRow);\n if (matches) {\n cellRange = range;\n break;\n }\n }\n if (cellRange) {\n // we need it at the end of the list, as the dragStart picks the last created\n // range as the start point for the drag\n if (_.last(this.cellRanges) !== cellRange) {\n _.removeFromArray(this.cellRanges, cellRange);\n this.cellRanges.push(cellRange);\n }\n }\n else {\n cellRange = {\n startRow: rowForCell,\n endRow: rowForCell,\n columns: columns,\n startColumn: cell.column\n };\n this.cellRanges.push(cellRange);\n }\n this.setNewestRangeStartCell(cell);\n this.onDragStop();\n this.dispatchChangedEvent(true, true, cellRange.id);\n };\n RangeService.prototype.extendLatestRangeToCell = function (cellPosition) {\n if (this.isEmpty() || !this.newestRangeStartCell) {\n return;\n }\n var cellRange = _.last(this.cellRanges);\n this.updateRangeEnd(cellRange, cellPosition);\n };\n RangeService.prototype.updateRangeEnd = function (cellRange, cellPosition, silent) {\n if (silent === void 0) { silent = false; }\n var endColumn = cellPosition.column;\n var colsToAdd = this.calculateColumnsBetween(cellRange.startColumn, endColumn);\n if (!colsToAdd || this.isLastCellOfRange(cellRange, cellPosition)) {\n return;\n }\n cellRange.columns = colsToAdd;\n cellRange.endRow = { rowIndex: cellPosition.rowIndex, rowPinned: cellPosition.rowPinned };\n if (!silent) {\n this.dispatchChangedEvent(true, true, cellRange.id);\n }\n };\n RangeService.prototype.refreshRangeStart = function (cellRange) {\n var startColumn = cellRange.startColumn, columns = cellRange.columns;\n var moveColInCellRange = function (colToMove, moveToFront) {\n var otherCols = cellRange.columns.filter(function (col) { return col !== colToMove; });\n if (colToMove) {\n cellRange.startColumn = colToMove;\n cellRange.columns = moveToFront ? __spread([colToMove], otherCols) : __spread(otherCols, [colToMove]);\n }\n else {\n cellRange.columns = otherCols;\n }\n };\n var _a = this.getRangeEdgeColumns(cellRange), left = _a.left, right = _a.right;\n var shouldMoveLeftCol = startColumn === columns[0] && startColumn !== left;\n if (shouldMoveLeftCol) {\n moveColInCellRange(left, true);\n return;\n }\n var shouldMoveRightCol = startColumn === _.last(columns) && startColumn === right;\n if (shouldMoveRightCol) {\n moveColInCellRange(right, false);\n return;\n }\n };\n RangeService.prototype.getRangeEdgeColumns = function (cellRange) {\n var allColumns = this.columnModel.getAllDisplayedColumns();\n var allIndices = cellRange.columns\n .map(function (c) { return allColumns.indexOf(c); })\n .filter(function (i) { return i > -1; })\n .sort(function (a, b) { return a - b; });\n return {\n left: allColumns[allIndices[0]],\n right: allColumns[_.last(allIndices)]\n };\n };\n // returns true if successful, false if not successful\n RangeService.prototype.extendLatestRangeInDirection = function (event) {\n if (this.isEmpty() || !this.newestRangeStartCell) {\n return;\n }\n var key = event.key;\n var ctrlKey = event.ctrlKey || event.metaKey;\n var lastRange = _.last(this.cellRanges);\n var startCell = this.newestRangeStartCell;\n var firstCol = lastRange.columns[0];\n var lastCol = _.last(lastRange.columns);\n // find the cell that is at the furthest away corner from the starting cell\n var endCellIndex = lastRange.endRow.rowIndex;\n var endCellFloating = lastRange.endRow.rowPinned;\n var endCellColumn = startCell.column === firstCol ? lastCol : firstCol;\n var endCell = { column: endCellColumn, rowIndex: endCellIndex, rowPinned: endCellFloating };\n var newEndCell = this.cellNavigationService.getNextCellToFocus(key, endCell, ctrlKey);\n // if user is at end of grid, so no cell to extend to, we return false\n if (!newEndCell) {\n return;\n }\n this.setCellRange({\n rowStartIndex: startCell.rowIndex,\n rowStartPinned: startCell.rowPinned,\n rowEndIndex: newEndCell.rowIndex,\n rowEndPinned: newEndCell.rowPinned,\n columnStart: startCell.column,\n columnEnd: newEndCell.column\n });\n return newEndCell;\n };\n RangeService.prototype.setCellRange = function (params) {\n if (!this.gridOptionsWrapper.isEnableRangeSelection()) {\n return;\n }\n this.removeAllCellRanges(true);\n this.addCellRange(params);\n };\n RangeService.prototype.setCellRanges = function (cellRanges) {\n var _this = this;\n if (_.shallowCompare(this.cellRanges, cellRanges)) {\n return;\n }\n this.removeAllCellRanges(true);\n cellRanges.forEach(function (newRange) {\n if (newRange.columns && newRange.startRow) {\n _this.setNewestRangeStartCell({\n rowIndex: newRange.startRow.rowIndex,\n rowPinned: newRange.startRow.rowPinned,\n column: newRange.columns[0]\n });\n }\n _this.cellRanges.push(newRange);\n });\n this.dispatchChangedEvent(false, true);\n };\n RangeService.prototype.setNewestRangeStartCell = function (position) {\n this.newestRangeStartCell = position;\n };\n RangeService.prototype.createCellRangeFromCellRangeParams = function (params) {\n var _this = this;\n var columns;\n var startsOnTheRight = false;\n if (params.columns) {\n columns = params.columns.map(function (c) { return _this.columnModel.getColumnWithValidation(c); }).filter(function (c) { return c; });\n }\n else {\n var columnStart = this.columnModel.getColumnWithValidation(params.columnStart);\n var columnEnd = this.columnModel.getColumnWithValidation(params.columnEnd);\n if (!columnStart || !columnEnd) {\n return;\n }\n columns = this.calculateColumnsBetween(columnStart, columnEnd);\n if (columns && columns.length) {\n startsOnTheRight = columns[0] !== columnStart;\n }\n }\n if (!columns) {\n return;\n }\n var startRow = params.rowStartIndex != null ? {\n rowIndex: params.rowStartIndex,\n rowPinned: params.rowStartPinned || null\n } : undefined;\n var endRow = params.rowEndIndex != null ? {\n rowIndex: params.rowEndIndex,\n rowPinned: params.rowEndPinned || null\n } : undefined;\n return {\n startRow: startRow,\n endRow: endRow,\n columns: columns,\n startColumn: startsOnTheRight ? _.last(columns) : columns[0]\n };\n };\n RangeService.prototype.addCellRange = function (params) {\n if (!this.gridOptionsWrapper.isEnableRangeSelection()) {\n return;\n }\n var newRange = this.createCellRangeFromCellRangeParams(params);\n if (newRange) {\n if (newRange.startRow) {\n this.setNewestRangeStartCell({\n rowIndex: newRange.startRow.rowIndex,\n rowPinned: newRange.startRow.rowPinned,\n column: newRange.startColumn\n });\n }\n this.cellRanges.push(newRange);\n this.dispatchChangedEvent(false, true, newRange.id);\n }\n };\n RangeService.prototype.getCellRanges = function () {\n return this.cellRanges;\n };\n RangeService.prototype.isEmpty = function () {\n return this.cellRanges.length === 0;\n };\n RangeService.prototype.isMoreThanOneCell = function () {\n var len = this.cellRanges.length;\n if (len === 0) {\n return false;\n }\n if (len > 1) {\n return true; // Assumes a cell range must contain at least one cell\n }\n // only one range, return true if range has more than one\n var range = this.cellRanges[0];\n var startRow = this.getRangeStartRow(range);\n var endRow = this.getRangeEndRow(range);\n return startRow.rowPinned !== endRow.rowPinned ||\n startRow.rowIndex !== endRow.rowIndex ||\n range.columns.length !== 1;\n };\n RangeService.prototype.areAllRangesAbleToMerge = function () {\n var e_1, _a;\n var _this = this;\n var rowToColumnMap = new Map();\n var len = this.cellRanges.length;\n if (len <= 1)\n return true;\n this.cellRanges.forEach(function (range) {\n var topRow = _this.getRangeStartRow(range);\n var bottomRow = _this.getRangeEndRow(range);\n var currentRow = topRow;\n var _loop_1 = function () {\n var rowName = (currentRow.rowPinned || 'normal') + \"_\" + currentRow.rowIndex;\n var columns = rowToColumnMap.get(rowName);\n var currentRangeColIds = range.columns.map(function (col) { return col.getId(); });\n if (columns) {\n var filteredColumns = currentRangeColIds.filter(function (col) { return columns.indexOf(col) === -1; });\n columns.push.apply(columns, __spread(filteredColumns));\n }\n else {\n rowToColumnMap.set(rowName, currentRangeColIds);\n }\n if (_this.rowPositionUtils.sameRow(currentRow, bottomRow)) {\n return \"break\";\n }\n currentRow = _this.cellNavigationService.getRowBelow(currentRow);\n };\n while (currentRow) {\n var state_1 = _loop_1();\n if (state_1 === \"break\")\n break;\n }\n });\n var columnsString;\n try {\n for (var _b = __values(rowToColumnMap.values()), _c = _b.next(); !_c.done; _c = _b.next()) {\n var val = _c.value;\n var currentValString = val.sort().join();\n if (columnsString === undefined) {\n columnsString = currentValString;\n continue;\n }\n if (columnsString !== currentValString) {\n return false;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return true;\n };\n RangeService.prototype.removeAllCellRanges = function (silent) {\n if (this.isEmpty()) {\n return;\n }\n this.onDragStop();\n this.cellRanges.length = 0;\n if (!silent) {\n this.dispatchChangedEvent(false, true);\n }\n };\n // as the user is dragging outside of the panel, the div starts to scroll, which in turn\n // means we are selection more (or less) cells, but the mouse isn't moving, so we recalculate\n // the selection my mimicking a new mouse event\n RangeService.prototype.onBodyScroll = function () {\n if (this.dragging && this.lastMouseEvent) {\n this.onDragging(this.lastMouseEvent);\n }\n };\n RangeService.prototype.isCellInAnyRange = function (cell) {\n return this.getCellRangeCount(cell) > 0;\n };\n RangeService.prototype.isCellInSpecificRange = function (cell, range) {\n var columnInRange = range.columns !== null && _.includes(range.columns, cell.column);\n var rowInRange = this.isRowInRange(cell.rowIndex, cell.rowPinned, range);\n return columnInRange && rowInRange;\n };\n RangeService.prototype.isLastCellOfRange = function (cellRange, cell) {\n var startRow = cellRange.startRow, endRow = cellRange.endRow;\n var lastRow = this.rowPositionUtils.before(startRow, endRow) ? endRow : startRow;\n var isLastRow = cell.rowIndex === lastRow.rowIndex && cell.rowPinned === lastRow.rowPinned;\n var rangeFirstIndexColumn = cellRange.columns[0];\n var rangeLastIndexColumn = _.last(cellRange.columns);\n var lastRangeColumn = cellRange.startColumn === rangeFirstIndexColumn ? rangeLastIndexColumn : rangeFirstIndexColumn;\n var isLastColumn = cell.column === lastRangeColumn;\n return isLastColumn && isLastRow;\n };\n RangeService.prototype.isBottomRightCell = function (cellRange, cell) {\n var allColumns = this.columnModel.getAllDisplayedColumns();\n var allPositions = cellRange.columns.map(function (c) { return allColumns.indexOf(c); }).sort(function (a, b) { return a - b; });\n var startRow = cellRange.startRow, endRow = cellRange.endRow;\n var lastRow = this.rowPositionUtils.before(startRow, endRow) ? endRow : startRow;\n var isRightColumn = allColumns.indexOf(cell.column) === _.last(allPositions);\n var isLastRow = cell.rowIndex === lastRow.rowIndex && _.makeNull(cell.rowPinned) === _.makeNull(lastRow.rowPinned);\n return isRightColumn && isLastRow;\n };\n // returns the number of ranges this cell is in\n RangeService.prototype.getCellRangeCount = function (cell) {\n var _this = this;\n if (this.isEmpty()) {\n return 0;\n }\n return this.cellRanges.filter(function (cellRange) { return _this.isCellInSpecificRange(cell, cellRange); }).length;\n };\n RangeService.prototype.isRowInRange = function (rowIndex, floating, cellRange) {\n var firstRow = this.getRangeStartRow(cellRange);\n var lastRow = this.getRangeEndRow(cellRange);\n var thisRow = { rowIndex: rowIndex, rowPinned: floating || null };\n // compare rowPinned with == instead of === because it can be `null` or `undefined`\n var equalsFirstRow = thisRow.rowIndex === firstRow.rowIndex && thisRow.rowPinned == firstRow.rowPinned;\n var equalsLastRow = thisRow.rowIndex === lastRow.rowIndex && thisRow.rowPinned == lastRow.rowPinned;\n if (equalsFirstRow || equalsLastRow) {\n return true;\n }\n var afterFirstRow = !this.rowPositionUtils.before(thisRow, firstRow);\n var beforeLastRow = this.rowPositionUtils.before(thisRow, lastRow);\n return afterFirstRow && beforeLastRow;\n };\n RangeService.prototype.getDraggingRange = function () {\n return this.draggingRange;\n };\n RangeService.prototype.onDragStart = function (mouseEvent) {\n if (!this.gridOptionsWrapper.isEnableRangeSelection()) {\n return;\n }\n var ctrlKey = mouseEvent.ctrlKey, metaKey = mouseEvent.metaKey, shiftKey = mouseEvent.shiftKey;\n // ctrlKey for windows, metaKey for Apple\n var multiKeyPressed = ctrlKey || metaKey;\n var allowMulti = !this.gridOptionsWrapper.isSuppressMultiRangeSelection();\n var multiSelectKeyPressed = allowMulti ? multiKeyPressed : false;\n var extendRange = shiftKey && _.existsAndNotEmpty(this.cellRanges);\n if (!multiSelectKeyPressed && (!extendRange || _.exists(_.last(this.cellRanges).type))) {\n this.removeAllCellRanges(true);\n }\n // The DragService used by this service (RangeService), automatically adds a `mousemove`\n // listener the document of the page that will then call `onDragging`. If you are in a shadow DOM\n // DOM elements outside your component's wrapper will be inaccessible to you, so here, we add a \n // temporary `mousemove` listener to the gridPanel to be able to update the last hovered cell.\n this.cellHoverListener = this.addManagedListener(this.ctrlsService.getGridCtrl().getGui(), 'mousemove', this.updateValuesOnMove.bind(this));\n // This is the mouse start event, so we need to call `updateValuesOnMove` \n // manually once to get the necessary variables initiated.\n this.updateValuesOnMove(mouseEvent);\n if (!this.lastCellHovered) {\n return;\n }\n this.dragging = true;\n this.lastMouseEvent = mouseEvent;\n if (!extendRange) {\n this.setNewestRangeStartCell(this.lastCellHovered);\n }\n // if we didn't clear the ranges, then dragging means the user clicked, and when the\n // user clicks it means a range of one cell was created. we need to extend this range\n // rather than creating another range. otherwise we end up with two distinct ranges\n // from a drag operation (one from click, and one from drag).\n if (this.cellRanges.length > 0) {\n this.draggingRange = _.last(this.cellRanges);\n }\n else {\n var mouseRowPosition = {\n rowIndex: this.lastCellHovered.rowIndex,\n rowPinned: this.lastCellHovered.rowPinned\n };\n this.draggingRange = {\n startRow: mouseRowPosition,\n endRow: mouseRowPosition,\n columns: [this.lastCellHovered.column],\n startColumn: this.newestRangeStartCell.column\n };\n this.cellRanges.push(this.draggingRange);\n }\n this.ctrlsService.getGridBodyCtrl().addScrollEventListener(this.bodyScrollListener);\n this.dispatchChangedEvent(true, false, this.draggingRange.id);\n };\n RangeService.prototype.updateValuesOnMove = function (mouseEvent) {\n var cell = this.mouseEventService.getCellPositionForEvent(mouseEvent);\n this.cellHasChanged = false;\n if (!cell || (this.lastCellHovered && this.cellPositionUtils.equals(cell, this.lastCellHovered))) {\n return;\n }\n if (this.lastCellHovered) {\n this.cellHasChanged = true;\n }\n this.lastCellHovered = cell;\n };\n RangeService.prototype.onDragging = function (mouseEvent) {\n var _this = this;\n if (!this.dragging || !mouseEvent) {\n return;\n }\n this.lastMouseEvent = mouseEvent;\n var cellPosition = this.lastCellHovered;\n var isMouseAndStartInPinned = function (position) {\n return cellPosition && cellPosition.rowPinned === position && _this.newestRangeStartCell.rowPinned === position;\n };\n var skipVerticalScroll = isMouseAndStartInPinned('top') || isMouseAndStartInPinned('bottom');\n this.autoScrollService.check(mouseEvent, skipVerticalScroll);\n if (!this.cellHasChanged) {\n return;\n }\n var columns = this.calculateColumnsBetween(this.newestRangeStartCell.column, cellPosition.column);\n if (!columns) {\n return;\n }\n this.draggingRange.endRow = {\n rowIndex: cellPosition.rowIndex,\n rowPinned: cellPosition.rowPinned\n };\n this.draggingRange.columns = columns;\n this.dispatchChangedEvent(false, false, this.draggingRange.id);\n };\n RangeService.prototype.onDragStop = function () {\n if (this.cellHoverListener) {\n this.cellHoverListener();\n this.cellHoverListener = undefined;\n }\n if (!this.dragging) {\n return;\n }\n var id = this.draggingRange.id;\n this.autoScrollService.ensureCleared();\n this.ctrlsService.getGridBodyCtrl().removeScrollEventListener(this.bodyScrollListener);\n this.lastMouseEvent = null;\n this.dragging = false;\n this.draggingRange = undefined;\n this.lastCellHovered = undefined;\n this.dispatchChangedEvent(false, true, id);\n };\n RangeService.prototype.dispatchChangedEvent = function (started, finished, id) {\n var event = Object.freeze({\n type: Events.EVENT_RANGE_SELECTION_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi,\n started: started,\n finished: finished,\n id: id,\n });\n this.eventService.dispatchEvent(event);\n };\n RangeService.prototype.calculateColumnsBetween = function (columnFrom, columnTo) {\n var allColumns = this.columnModel.getAllDisplayedColumns();\n var isSameColumn = columnFrom === columnTo;\n var fromIndex = allColumns.indexOf(columnFrom);\n if (fromIndex < 0) {\n console.warn(\"AG Grid: column \" + columnFrom.getId() + \" is not visible\");\n return;\n }\n var toIndex = isSameColumn ? fromIndex : allColumns.indexOf(columnTo);\n if (toIndex < 0) {\n console.warn(\"AG Grid: column \" + columnTo.getId() + \" is not visible\");\n return;\n }\n if (isSameColumn) {\n return [columnFrom];\n }\n var firstIndex = Math.min(fromIndex, toIndex);\n var lastIndex = firstIndex === fromIndex ? toIndex : fromIndex;\n var columns = [];\n for (var i = firstIndex; i <= lastIndex; i++) {\n columns.push(allColumns[i]);\n }\n return columns;\n };\n __decorate([\n Autowired('rowModel')\n ], RangeService.prototype, \"rowModel\", void 0);\n __decorate([\n Autowired('columnModel')\n ], RangeService.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired('mouseEventService')\n ], RangeService.prototype, \"mouseEventService\", void 0);\n __decorate([\n Autowired('columnApi')\n ], RangeService.prototype, \"columnApi\", void 0);\n __decorate([\n Autowired('gridApi')\n ], RangeService.prototype, \"gridApi\", void 0);\n __decorate([\n Autowired('cellNavigationService')\n ], RangeService.prototype, \"cellNavigationService\", void 0);\n __decorate([\n Autowired(\"pinnedRowModel\")\n ], RangeService.prototype, \"pinnedRowModel\", void 0);\n __decorate([\n Autowired('rowPositionUtils')\n ], RangeService.prototype, \"rowPositionUtils\", void 0);\n __decorate([\n Autowired('cellPositionUtils')\n ], RangeService.prototype, \"cellPositionUtils\", void 0);\n __decorate([\n Autowired('ctrlsService')\n ], RangeService.prototype, \"ctrlsService\", void 0);\n __decorate([\n PostConstruct\n ], RangeService.prototype, \"init\", null);\n RangeService = __decorate([\n Bean('rangeService')\n ], RangeService);\n return RangeService;\n}(BeanStub));\nexport { RangeService };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Component, PostConstruct, _, SelectionHandleType } from \"@ag-grid-community/core\";\nvar AbstractSelectionHandle = /** @class */ (function (_super) {\n __extends(AbstractSelectionHandle, _super);\n function AbstractSelectionHandle() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.changedCalculatedValues = false;\n _this.dragging = false;\n _this.shouldDestroyOnEndDragging = false;\n return _this;\n }\n AbstractSelectionHandle.prototype.init = function () {\n var _this = this;\n this.dragService.addDragSource({\n dragStartPixels: 0,\n eElement: this.getGui(),\n onDragStart: this.onDragStart.bind(this),\n onDragging: function (e) {\n _this.dragging = true;\n _this.rangeService.autoScrollService.check(e);\n if (_this.changedCalculatedValues) {\n _this.onDrag(e);\n _this.changedCalculatedValues = false;\n }\n },\n onDragStop: function (e) {\n _this.dragging = false;\n _this.onDragEnd(e);\n _this.clearValues();\n _this.rangeService.autoScrollService.ensureCleared();\n // TODO: this causes a bug where if there are multiple grids in the same page, all of them will\n // be affected by a drag on any. Move it to the root element.\n document.body.classList.remove(_this.getDraggingCssClass());\n if (_this.shouldDestroyOnEndDragging) {\n _this.destroy();\n }\n }\n });\n this.addManagedListener(this.getGui(), 'mousedown', this.preventRangeExtension.bind(this));\n };\n AbstractSelectionHandle.prototype.isDragging = function () {\n return this.dragging;\n };\n AbstractSelectionHandle.prototype.getCellCtrl = function () {\n return this.cellCtrl;\n };\n AbstractSelectionHandle.prototype.setCellCtrl = function (cellComp) {\n this.cellCtrl = cellComp;\n };\n AbstractSelectionHandle.prototype.getCellRange = function () {\n return this.cellRange;\n };\n AbstractSelectionHandle.prototype.setCellRange = function (range) {\n this.cellRange = range;\n };\n AbstractSelectionHandle.prototype.getRangeStartRow = function () {\n return this.rangeStartRow;\n };\n AbstractSelectionHandle.prototype.setRangeStartRow = function (row) {\n this.rangeStartRow = row;\n };\n AbstractSelectionHandle.prototype.getRangeEndRow = function () {\n return this.rangeEndRow;\n };\n AbstractSelectionHandle.prototype.setRangeEndRow = function (row) {\n this.rangeEndRow = row;\n };\n AbstractSelectionHandle.prototype.getLastCellHovered = function () {\n return this.lastCellHovered;\n };\n AbstractSelectionHandle.prototype.preventRangeExtension = function (e) {\n e.preventDefault();\n e.stopPropagation();\n };\n AbstractSelectionHandle.prototype.onDragStart = function (e) {\n this.cellHoverListener = this.addManagedListener(this.ctrlsService.getGridCtrl().getGui(), 'mousemove', this.updateValuesOnMove.bind(this));\n document.body.classList.add(this.getDraggingCssClass());\n };\n AbstractSelectionHandle.prototype.getDraggingCssClass = function () {\n return \"ag-dragging-\" + (this.type === SelectionHandleType.FILL ? 'fill' : 'range') + \"-handle\";\n };\n AbstractSelectionHandle.prototype.updateValuesOnMove = function (e) {\n var cell = this.mouseEventService.getCellPositionForEvent(e);\n if (!cell || (this.lastCellHovered && this.cellPositionUtils.equals(cell, this.lastCellHovered))) {\n return;\n }\n this.lastCellHovered = cell;\n this.changedCalculatedValues = true;\n };\n AbstractSelectionHandle.prototype.getType = function () {\n return this.type;\n };\n AbstractSelectionHandle.prototype.refresh = function (cellCtrl) {\n var oldCellComp = this.getCellCtrl();\n var eGui = this.getGui();\n var cellRange = _.last(this.rangeService.getCellRanges());\n var start = cellRange.startRow;\n var end = cellRange.endRow;\n if (start && end) {\n var isBefore = this.rowPositionUtils.before(end, start);\n if (isBefore) {\n this.setRangeStartRow(end);\n this.setRangeEndRow(start);\n }\n else {\n this.setRangeStartRow(start);\n this.setRangeEndRow(end);\n }\n }\n if (oldCellComp !== cellCtrl || !_.isVisible(eGui)) {\n this.setCellCtrl(cellCtrl);\n var eParentOfValue = cellCtrl.getComp().getParentOfValue();\n if (eParentOfValue) {\n eParentOfValue.appendChild(eGui);\n }\n }\n this.setCellRange(cellRange);\n };\n AbstractSelectionHandle.prototype.clearValues = function () {\n this.lastCellHovered = undefined;\n this.removeListeners();\n };\n AbstractSelectionHandle.prototype.removeListeners = function () {\n if (this.cellHoverListener) {\n this.cellHoverListener();\n this.cellHoverListener = undefined;\n }\n };\n AbstractSelectionHandle.prototype.destroy = function () {\n if (!this.shouldDestroyOnEndDragging && this.isDragging()) {\n _.setDisplayed(this.getGui(), false);\n this.shouldDestroyOnEndDragging = true;\n return;\n }\n this.shouldDestroyOnEndDragging = false;\n _super.prototype.destroy.call(this);\n this.removeListeners();\n var eGui = this.getGui();\n if (eGui.parentElement) {\n eGui.parentElement.removeChild(eGui);\n }\n };\n __decorate([\n Autowired(\"rowRenderer\")\n ], AbstractSelectionHandle.prototype, \"rowRenderer\", void 0);\n __decorate([\n Autowired(\"dragService\")\n ], AbstractSelectionHandle.prototype, \"dragService\", void 0);\n __decorate([\n Autowired(\"rangeService\")\n ], AbstractSelectionHandle.prototype, \"rangeService\", void 0);\n __decorate([\n Autowired(\"mouseEventService\")\n ], AbstractSelectionHandle.prototype, \"mouseEventService\", void 0);\n __decorate([\n Autowired(\"columnModel\")\n ], AbstractSelectionHandle.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired(\"cellNavigationService\")\n ], AbstractSelectionHandle.prototype, \"cellNavigationService\", void 0);\n __decorate([\n Autowired(\"navigationService\")\n ], AbstractSelectionHandle.prototype, \"navigationService\", void 0);\n __decorate([\n Autowired('rowPositionUtils')\n ], AbstractSelectionHandle.prototype, \"rowPositionUtils\", void 0);\n __decorate([\n Autowired('cellPositionUtils')\n ], AbstractSelectionHandle.prototype, \"cellPositionUtils\", void 0);\n __decorate([\n Autowired('ctrlsService')\n ], AbstractSelectionHandle.prototype, \"ctrlsService\", void 0);\n __decorate([\n PostConstruct\n ], AbstractSelectionHandle.prototype, \"init\", null);\n return AbstractSelectionHandle;\n}(Component));\nexport { AbstractSelectionHandle };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n};\nimport { Autowired, Events, SelectionHandleType, _ } from '@ag-grid-community/core';\nimport { AbstractSelectionHandle } from \"./abstractSelectionHandle\";\nvar FillHandle = /** @class */ (function (_super) {\n __extends(FillHandle, _super);\n function FillHandle() {\n var _this = _super.call(this, FillHandle.TEMPLATE) || this;\n _this.markedCells = [];\n _this.cellValues = [];\n _this.isUp = false;\n _this.isLeft = false;\n _this.isReduce = false;\n _this.type = SelectionHandleType.FILL;\n return _this;\n }\n FillHandle.prototype.updateValuesOnMove = function (e) {\n _super.prototype.updateValuesOnMove.call(this, e);\n if (!this.initialXY) {\n this.initialXY = this.mouseEventService.getNormalisedPosition(e);\n }\n var _a = this.initialXY, x = _a.x, y = _a.y;\n var _b = this.mouseEventService.getNormalisedPosition(e), newX = _b.x, newY = _b.y;\n var diffX = Math.abs(x - newX);\n var diffY = Math.abs(y - newY);\n var allowedDirection = this.gridOptionsWrapper.getFillHandleDirection();\n var direction;\n if (allowedDirection === 'xy') {\n direction = diffX > diffY ? 'x' : 'y';\n }\n else {\n direction = allowedDirection;\n }\n if (direction !== this.dragAxis) {\n this.dragAxis = direction;\n this.changedCalculatedValues = true;\n }\n };\n FillHandle.prototype.onDrag = function (e) {\n if (!this.initialPosition) {\n var cellCtrl = this.getCellCtrl();\n if (!cellCtrl) {\n return;\n }\n this.initialPosition = cellCtrl.getCellPosition();\n }\n var lastCellHovered = this.getLastCellHovered();\n if (lastCellHovered) {\n this.markPathFrom(this.initialPosition, lastCellHovered);\n }\n };\n FillHandle.prototype.onDragEnd = function (e) {\n this.initialXY = null;\n if (!this.markedCells.length) {\n return;\n }\n var isX = this.dragAxis === 'x';\n var initialRange = this.getCellRange();\n var colLen = initialRange.columns.length;\n var rangeStartRow = this.getRangeStartRow();\n var rangeEndRow = this.getRangeEndRow();\n var finalRange;\n if (!this.isUp && !this.isLeft) {\n finalRange = this.rangeService.createCellRangeFromCellRangeParams({\n rowStartIndex: rangeStartRow.rowIndex,\n rowStartPinned: rangeStartRow.rowPinned,\n columnStart: initialRange.columns[0],\n rowEndIndex: isX ? rangeEndRow.rowIndex : this.lastCellMarked.rowIndex,\n rowEndPinned: isX ? rangeEndRow.rowPinned : this.lastCellMarked.rowPinned,\n columnEnd: isX ? this.lastCellMarked.column : initialRange.columns[colLen - 1]\n });\n }\n else {\n var startRow = isX ? rangeStartRow : this.lastCellMarked;\n finalRange = this.rangeService.createCellRangeFromCellRangeParams({\n rowStartIndex: startRow.rowIndex,\n rowStartPinned: startRow.rowPinned,\n columnStart: isX ? this.lastCellMarked.column : initialRange.columns[0],\n rowEndIndex: rangeEndRow.rowIndex,\n rowEndPinned: rangeEndRow.rowPinned,\n columnEnd: initialRange.columns[colLen - 1]\n });\n }\n if (finalRange) {\n // raising fill events for undo / redo\n this.raiseFillStartEvent();\n this.handleValueChanged(initialRange, finalRange, e);\n this.rangeService.setCellRanges([finalRange]);\n this.raiseFillEndEvent(initialRange, finalRange);\n }\n };\n FillHandle.prototype.raiseFillStartEvent = function () {\n var fillStartEvent = {\n type: Events.EVENT_FILL_START,\n columnApi: this.gridOptionsWrapper.getColumnApi(),\n api: this.gridOptionsWrapper.getApi()\n };\n this.eventService.dispatchEvent(fillStartEvent);\n };\n FillHandle.prototype.raiseFillEndEvent = function (initialRange, finalRange) {\n var fillEndEvent = {\n type: Events.EVENT_FILL_END,\n columnApi: this.gridOptionsWrapper.getColumnApi(),\n api: this.gridOptionsWrapper.getApi(),\n initialRange: initialRange,\n finalRange: finalRange\n };\n this.eventService.dispatchEvent(fillEndEvent);\n };\n FillHandle.prototype.handleValueChanged = function (initialRange, finalRange, e) {\n var _this = this;\n var initialRangeEndRow = this.rangeService.getRangeEndRow(initialRange);\n var initialRangeStartRow = this.rangeService.getRangeStartRow(initialRange);\n var finalRangeEndRow = this.rangeService.getRangeEndRow(finalRange);\n var finalRangeStartRow = this.rangeService.getRangeStartRow(finalRange);\n var isVertical = this.dragAxis === 'y';\n // if the range is being reduced in size, all we need to do is\n // clear the cells that are no longer part of the range\n if (this.isReduce && !this.gridOptionsWrapper.isSuppressClearOnFillReduction()) {\n var columns = isVertical\n ? initialRange.columns\n : initialRange.columns.filter(function (col) { return finalRange.columns.indexOf(col) < 0; });\n var startRow = isVertical ? this.cellNavigationService.getRowBelow(finalRangeEndRow) : finalRangeStartRow;\n if (startRow) {\n this.clearCellsInRange(startRow, initialRangeEndRow, columns);\n }\n return;\n }\n var withinInitialRange = true;\n var values = [];\n var initialValues = [];\n var idx = 0;\n var resetValues = function () {\n values.length = 0;\n initialValues.length = 0;\n idx = 0;\n };\n var iterateAcrossCells = function (column, columns) {\n var currentRow = _this.isUp ? initialRangeEndRow : initialRangeStartRow;\n var finished = false;\n if (isVertical) {\n withinInitialRange = true;\n resetValues();\n }\n var _loop_1 = function () {\n var rowNode = _this.rowPositionUtils.getRowNode(currentRow);\n if (!rowNode) {\n return \"break\";\n }\n if (isVertical && column) {\n fillValues(values, column, rowNode, function () {\n return !_this.rowPositionUtils.sameRow(currentRow, _this.isUp ? initialRangeStartRow : initialRangeEndRow);\n });\n }\n else if (columns) {\n withinInitialRange = true;\n resetValues();\n columns.forEach(function (col) { return fillValues(values, col, rowNode, function () { return col !== (_this.isLeft ? initialRange.columns[0] : _.last(initialRange.columns)); }); });\n }\n finished = _this.rowPositionUtils.sameRow(currentRow, _this.isUp ? finalRangeStartRow : finalRangeEndRow);\n currentRow = _this.isUp\n ? _this.cellNavigationService.getRowAbove(currentRow)\n : _this.cellNavigationService.getRowBelow(currentRow);\n };\n while (!finished && currentRow) {\n var state_1 = _loop_1();\n if (state_1 === \"break\")\n break;\n }\n };\n var fillValues = function (currentValues, col, rowNode, updateInitialSet) {\n var currentValue;\n var skipValue = false;\n if (withinInitialRange) {\n currentValue = _this.valueService.getValue(col, rowNode);\n initialValues.push(currentValue);\n withinInitialRange = updateInitialSet();\n }\n else {\n var _a = _this.processValues(e, currentValues, initialValues, col, rowNode, idx++), value = _a.value, fromUserFunction = _a.fromUserFunction;\n currentValue = value;\n if (col.isCellEditable(rowNode)) {\n var cellValue = _this.valueService.getValue(col, rowNode);\n if (!fromUserFunction || cellValue !== currentValue) {\n rowNode.setDataValue(col, currentValue);\n }\n else {\n skipValue = true;\n }\n }\n }\n if (!skipValue) {\n currentValues.push(currentValue);\n }\n };\n if (isVertical) {\n initialRange.columns.forEach(function (col) {\n iterateAcrossCells(col);\n });\n }\n else {\n var columns = this.isLeft ? __spread(finalRange.columns).reverse() : finalRange.columns;\n iterateAcrossCells(undefined, columns);\n }\n };\n FillHandle.prototype.clearCellsInRange = function (startRow, endRow, columns) {\n var currentRow = startRow;\n var finished = false;\n var _loop_2 = function () {\n var rowNode = this_1.rowPositionUtils.getRowNode(currentRow);\n // should never happen, defensive programming\n if (!rowNode) {\n return \"break\";\n }\n columns.forEach(function (col) {\n if (col.isCellEditable(rowNode)) {\n rowNode.setDataValue(col, null);\n }\n });\n finished = this_1.rowPositionUtils.sameRow(currentRow, endRow);\n currentRow = this_1.cellNavigationService.getRowBelow(currentRow);\n };\n var this_1 = this;\n while (!finished && currentRow) {\n var state_2 = _loop_2();\n if (state_2 === \"break\")\n break;\n }\n };\n FillHandle.prototype.processValues = function (event, values, initialValues, col, rowNode, idx) {\n var userFillOperation = this.gridOptionsWrapper.getFillOperation();\n var isVertical = this.dragAxis === 'y';\n var direction;\n if (isVertical) {\n direction = this.isUp ? 'up' : 'down';\n }\n else {\n direction = this.isLeft ? 'left' : 'right';\n }\n if (userFillOperation) {\n var params = {\n event: event,\n values: values,\n initialValues: initialValues,\n currentIndex: idx,\n currentCellValue: this.valueService.getValue(col, rowNode),\n direction: direction,\n column: col,\n rowNode: rowNode\n };\n var userResult = userFillOperation(params);\n if (userResult !== false) {\n return { value: userResult, fromUserFunction: true };\n }\n }\n var allNumbers = !values.some(function (val) {\n var asFloat = parseFloat(val);\n return isNaN(asFloat) || asFloat.toString() !== val.toString();\n });\n // values should be copied in order if the alt key is pressed\n // or if the values contain strings and numbers\n // However, if we only have one initial value selected, and that\n // value is a number and we are also pressing alt, then we should\n // increment or decrement the value by 1 based on direction.\n if (event.altKey || !allNumbers) {\n if (allNumbers && initialValues.length === 1) {\n var multiplier = (this.isUp || this.isLeft) ? -1 : 1;\n return { value: parseFloat(_.last(values)) + 1 * multiplier, fromUserFunction: false };\n }\n return { value: values[idx % values.length], fromUserFunction: false };\n }\n return { value: _.last(_.findLineByLeastSquares(values.map(Number))), fromUserFunction: false };\n };\n FillHandle.prototype.clearValues = function () {\n this.clearMarkedPath();\n this.clearCellValues();\n this.lastCellMarked = undefined;\n _super.prototype.clearValues.call(this);\n };\n FillHandle.prototype.clearMarkedPath = function () {\n this.markedCells.forEach(function (cell) {\n var comp = cell.getComp();\n comp.addOrRemoveCssClass('ag-selection-fill-top', false);\n comp.addOrRemoveCssClass('ag-selection-fill-right', false);\n comp.addOrRemoveCssClass('ag-selection-fill-bottom', false);\n comp.addOrRemoveCssClass('ag-selection-fill-left', false);\n });\n this.markedCells.length = 0;\n this.isUp = false;\n this.isLeft = false;\n this.isReduce = false;\n };\n FillHandle.prototype.clearCellValues = function () {\n this.cellValues.length = 0;\n };\n FillHandle.prototype.markPathFrom = function (initialPosition, currentPosition) {\n this.clearMarkedPath();\n this.clearCellValues();\n if (this.dragAxis === 'y') {\n if (this.rowPositionUtils.sameRow(currentPosition, initialPosition)) {\n return;\n }\n var isBefore = this.rowPositionUtils.before(currentPosition, initialPosition);\n var rangeStartRow = this.getRangeStartRow();\n var rangeEndRow = this.getRangeEndRow();\n if (isBefore && ((currentPosition.rowPinned == rangeStartRow.rowPinned &&\n currentPosition.rowIndex >= rangeStartRow.rowIndex) ||\n (rangeStartRow.rowPinned != rangeEndRow.rowPinned &&\n currentPosition.rowPinned == rangeEndRow.rowPinned &&\n currentPosition.rowIndex <= rangeEndRow.rowIndex))) {\n this.reduceVertical(initialPosition, currentPosition);\n this.isReduce = true;\n }\n else {\n this.extendVertical(initialPosition, currentPosition, isBefore);\n this.isReduce = false;\n }\n }\n else {\n var initialColumn = initialPosition.column;\n var currentColumn = currentPosition.column;\n if (initialColumn === currentColumn) {\n return;\n }\n var displayedColumns = this.columnModel.getAllDisplayedColumns();\n var initialIndex = displayedColumns.indexOf(initialColumn);\n var currentIndex = displayedColumns.indexOf(currentColumn);\n if (currentIndex <= initialIndex && currentIndex >= displayedColumns.indexOf(this.getCellRange().columns[0])) {\n this.reduceHorizontal(initialPosition, currentPosition);\n this.isReduce = true;\n }\n else {\n this.extendHorizontal(initialPosition, currentPosition, currentIndex < initialIndex);\n this.isReduce = false;\n }\n }\n this.lastCellMarked = currentPosition;\n };\n FillHandle.prototype.extendVertical = function (initialPosition, endPosition, isMovingUp) {\n var _a = this, navigationService = _a.navigationService, rangeService = _a.rangeService;\n var row = initialPosition;\n do {\n var cellRange = this.getCellRange();\n var colLen = cellRange.columns.length;\n for (var i = 0; i < colLen; i++) {\n var column = cellRange.columns[i];\n var rowPos = { rowIndex: row.rowIndex, rowPinned: row.rowPinned };\n var cellPos = __assign(__assign({}, rowPos), { column: column });\n var cellInRange = rangeService.isCellInSpecificRange(cellPos, cellRange);\n var isInitialRow = this.rowPositionUtils.sameRow(row, initialPosition);\n if (isMovingUp) {\n this.isUp = true;\n }\n if (!isInitialRow) {\n var cell = navigationService.getCellByPosition(cellPos);\n if (cell) {\n this.markedCells.push(cell);\n var cellCtrl = cell.getComp();\n if (!cellInRange) {\n cellCtrl.addOrRemoveCssClass('ag-selection-fill-left', i === 0);\n cellCtrl.addOrRemoveCssClass('ag-selection-fill-right', i === colLen - 1);\n }\n cellCtrl.addOrRemoveCssClass(isMovingUp ? 'ag-selection-fill-top' : 'ag-selection-fill-bottom', this.rowPositionUtils.sameRow(row, endPosition));\n }\n }\n }\n if (this.rowPositionUtils.sameRow(row, endPosition)) {\n break;\n }\n } while (\n // tslint:disable-next-line\n row = isMovingUp\n ? this.cellNavigationService.getRowAbove(row)\n : this.cellNavigationService.getRowBelow(row));\n };\n FillHandle.prototype.reduceVertical = function (initialPosition, endPosition) {\n var row = initialPosition;\n do {\n var cellRange = this.getCellRange();\n var colLen = cellRange.columns.length;\n var isLastRow = this.rowPositionUtils.sameRow(row, endPosition);\n for (var i = 0; i < colLen; i++) {\n var rowPos = { rowIndex: row.rowIndex, rowPinned: row.rowPinned };\n var celPos = __assign(__assign({}, rowPos), { column: cellRange.columns[i] });\n var cell = this.navigationService.getCellByPosition(celPos);\n if (cell) {\n this.markedCells.push(cell);\n var cellComp = cell.getComp();\n cellComp.addOrRemoveCssClass('ag-selection-fill-bottom', this.rowPositionUtils.sameRow(row, endPosition));\n }\n }\n if (isLastRow) {\n break;\n }\n // tslint:disable-next-line\n } while (row = this.cellNavigationService.getRowAbove(row));\n };\n FillHandle.prototype.extendHorizontal = function (initialPosition, endPosition, isMovingLeft) {\n var _this = this;\n var allCols = this.columnModel.getAllDisplayedColumns();\n var startCol = allCols.indexOf(isMovingLeft ? endPosition.column : initialPosition.column);\n var endCol = allCols.indexOf(isMovingLeft ? this.getCellRange().columns[0] : endPosition.column);\n var offset = isMovingLeft ? 0 : 1;\n var colsToMark = allCols.slice(startCol + offset, endCol + offset);\n var rangeStartRow = this.getRangeStartRow();\n var rangeEndRow = this.getRangeEndRow();\n colsToMark.forEach(function (column) {\n var row = rangeStartRow;\n var isLastRow = false;\n do {\n isLastRow = _this.rowPositionUtils.sameRow(row, rangeEndRow);\n var cell = _this.navigationService.getCellByPosition({\n rowIndex: row.rowIndex,\n rowPinned: row.rowPinned,\n column: column\n });\n if (cell) {\n _this.markedCells.push(cell);\n var cellComp = cell.getComp();\n cellComp.addOrRemoveCssClass('ag-selection-fill-top', _this.rowPositionUtils.sameRow(row, rangeStartRow));\n cellComp.addOrRemoveCssClass('ag-selection-fill-bottom', _this.rowPositionUtils.sameRow(row, rangeEndRow));\n if (isMovingLeft) {\n _this.isLeft = true;\n cellComp.addOrRemoveCssClass('ag-selection-fill-left', column === colsToMark[0]);\n }\n else {\n cellComp.addOrRemoveCssClass('ag-selection-fill-right', column === _.last(colsToMark));\n }\n }\n row = _this.cellNavigationService.getRowBelow(row);\n } while (!isLastRow);\n });\n };\n FillHandle.prototype.reduceHorizontal = function (initialPosition, endPosition) {\n var _this = this;\n var allCols = this.columnModel.getAllDisplayedColumns();\n var startCol = allCols.indexOf(endPosition.column);\n var endCol = allCols.indexOf(initialPosition.column);\n var colsToMark = allCols.slice(startCol, endCol);\n var rangeStartRow = this.getRangeStartRow();\n var rangeEndRow = this.getRangeEndRow();\n colsToMark.forEach(function (column) {\n var row = rangeStartRow;\n var isLastRow = false;\n do {\n isLastRow = _this.rowPositionUtils.sameRow(row, rangeEndRow);\n var cell = _this.navigationService.getCellByPosition({\n rowIndex: row.rowIndex,\n rowPinned: row.rowPinned,\n column: column\n });\n if (cell) {\n _this.markedCells.push(cell);\n var cellComp = cell.getComp();\n cellComp.addOrRemoveCssClass('ag-selection-fill-right', column === colsToMark[0]);\n }\n row = _this.cellNavigationService.getRowBelow(row);\n } while (!isLastRow);\n });\n };\n FillHandle.prototype.refresh = function (cellCtrl) {\n var cellRange = this.rangeService.getCellRanges()[0];\n var isColumnRange = !cellRange.startRow || !cellRange.endRow;\n if (isColumnRange) {\n this.destroy();\n return;\n }\n _super.prototype.refresh.call(this, cellCtrl);\n };\n FillHandle.TEMPLATE = \"
\";\n __decorate([\n Autowired('valueService')\n ], FillHandle.prototype, \"valueService\", void 0);\n return FillHandle;\n}(AbstractSelectionHandle));\nexport { FillHandle };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { CellRangeType, SelectionHandleType, _ } from \"@ag-grid-community/core\";\nimport { AbstractSelectionHandle } from \"./abstractSelectionHandle\";\nvar RangeHandle = /** @class */ (function (_super) {\n __extends(RangeHandle, _super);\n function RangeHandle() {\n var _this = _super.call(this, RangeHandle.TEMPLATE) || this;\n _this.type = SelectionHandleType.RANGE;\n _this.rangeFixed = false;\n return _this;\n }\n RangeHandle.prototype.onDrag = function (e) {\n var lastCellHovered = this.getLastCellHovered();\n if (!lastCellHovered) {\n return;\n }\n var cellRanges = this.rangeService.getCellRanges();\n var lastRange = _.last(cellRanges);\n if (!this.rangeFixed) {\n this.fixRangeStartEnd(lastRange);\n this.rangeFixed = true;\n }\n this.endPosition = {\n rowIndex: lastCellHovered.rowIndex,\n rowPinned: lastCellHovered.rowPinned,\n column: lastCellHovered.column\n };\n // check if the cell ranges are for a chart\n if (cellRanges.length === 2 && cellRanges[0].type === CellRangeType.DIMENSION && lastRange.type === CellRangeType.VALUE) {\n var rowChanged = !this.rowPositionUtils.sameRow(this.endPosition, this.rangeService.getRangeEndRow(lastRange));\n if (rowChanged) {\n // ensure the dimension range is kept in sync with the value range (which has the handle)\n this.rangeService.updateRangeEnd(cellRanges[0], __assign(__assign({}, this.endPosition), { column: cellRanges[0].columns[0] }), true);\n }\n }\n this.rangeService.extendLatestRangeToCell(this.endPosition);\n };\n RangeHandle.prototype.onDragEnd = function (e) {\n var cellRange = _.last(this.rangeService.getCellRanges());\n this.fixRangeStartEnd(cellRange);\n this.rangeFixed = false;\n };\n RangeHandle.prototype.fixRangeStartEnd = function (cellRange) {\n var startRow = this.rangeService.getRangeStartRow(cellRange);\n var endRow = this.rangeService.getRangeEndRow(cellRange);\n var column = cellRange.columns[0];\n cellRange.startRow = startRow;\n cellRange.endRow = endRow;\n cellRange.startColumn = column;\n };\n RangeHandle.TEMPLATE = \"
\";\n return RangeHandle;\n}(AbstractSelectionHandle));\nexport { RangeHandle };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Bean, BeanStub, SelectionHandleType } from \"@ag-grid-community/core\";\nimport { RangeHandle } from \"./rangeHandle\";\nimport { FillHandle } from \"./fillHandle\";\nvar SelectionHandleFactory = /** @class */ (function (_super) {\n __extends(SelectionHandleFactory, _super);\n function SelectionHandleFactory() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SelectionHandleFactory.prototype.createSelectionHandle = function (type) {\n return this.createBean(type === SelectionHandleType.RANGE ? new RangeHandle() : new FillHandle());\n };\n SelectionHandleFactory = __decorate([\n Bean('selectionHandleFactory')\n ], SelectionHandleFactory);\n return SelectionHandleFactory;\n}(BeanStub));\nexport { SelectionHandleFactory };\n","import { ModuleNames } from \"@ag-grid-community/core\";\nimport { EnterpriseCoreModule } from \"@ag-grid-enterprise/core\";\nimport { RangeService } from \"./rangeSelection/rangeService\";\nimport { FillHandle } from \"./rangeSelection/fillHandle\";\nimport { RangeHandle } from \"./rangeSelection/rangeHandle\";\nimport { SelectionHandleFactory } from \"./rangeSelection/selectionHandleFactory\";\nexport var RangeSelectionModule = {\n moduleName: ModuleNames.RangeSelectionModule,\n beans: [RangeService, SelectionHandleFactory],\n agStackComponents: [\n { componentName: 'AgFillHandle', componentClass: FillHandle },\n { componentName: 'AgRangeHandle', componentClass: RangeHandle }\n ],\n dependantModules: [\n EnterpriseCoreModule\n ]\n};\n","import { ModuleNames } from \"@ag-grid-community/core\";\nimport { EnterpriseCoreModule } from \"@ag-grid-enterprise/core\";\nimport { ChartService } from \"./charts/chartService\";\nimport { ChartTranslationService } from \"./charts/chartComp/services/chartTranslationService\";\nimport { ChartCrossFilterService } from \"./charts/chartComp/services/chartCrossFilterService\";\nimport { RangeSelectionModule } from \"@ag-grid-enterprise/range-selection\";\nexport var GridChartsModule = {\n moduleName: ModuleNames.GridChartsModule,\n beans: [\n ChartService, ChartTranslationService, ChartCrossFilterService\n ],\n dependantModules: [\n RangeSelectionModule,\n EnterpriseCoreModule\n ]\n};\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, BeanStub, RowNode, Events, _ } from \"@ag-grid-community/core\";\nvar DetailCellRendererCtrl = /** @class */ (function (_super) {\n __extends(DetailCellRendererCtrl, _super);\n function DetailCellRendererCtrl() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.loadRowDataVersion = 0;\n _this.needRefresh = false;\n return _this;\n }\n DetailCellRendererCtrl.prototype.init = function (comp, params) {\n var _this = this;\n this.params = params;\n this.comp = comp;\n var doNothingBecauseInsidePinnedSection = params.pinned != null;\n if (doNothingBecauseInsidePinnedSection) {\n return;\n }\n this.setAutoHeightClasses();\n this.setupRefreshStrategy();\n this.addThemeToDetailGrid();\n this.createDetailGrid();\n this.loadRowData();\n this.addManagedListener(params.node.parent, RowNode.EVENT_DATA_CHANGED, function () {\n _this.needRefresh = true;\n });\n this.addManagedListener(this.eventService, Events.EVENT_FULL_WIDTH_ROW_FOCUSED, this.onFullWidthRowFocused.bind(this));\n };\n DetailCellRendererCtrl.prototype.onFullWidthRowFocused = function (e) {\n var params = this.params;\n var row = { rowIndex: params.node.rowIndex, rowPinned: params.node.rowPinned };\n var eventRow = { rowIndex: e.rowIndex, rowPinned: e.rowPinned };\n var isSameRow = this.rowPositionUtils.sameRow(row, eventRow);\n if (!isSameRow) {\n return;\n }\n this.focusService.focusInto(this.comp.getGui(), e.fromBelow);\n };\n DetailCellRendererCtrl.prototype.setAutoHeightClasses = function () {\n var autoHeight = this.gridOptionsWrapper.isDetailRowAutoHeight();\n var parentClass = autoHeight ? 'ag-details-row-auto-height' : 'ag-details-row-fixed-height';\n var detailClass = autoHeight ? 'ag-details-grid-auto-height' : 'ag-details-grid-fixed-height';\n this.comp.addOrRemoveCssClass(parentClass, true);\n this.comp.addOrRemoveDetailGridCssClass(detailClass, true);\n };\n DetailCellRendererCtrl.prototype.setupRefreshStrategy = function () {\n if (this.params.suppressRefresh) {\n console.warn(\"AG Grid: as of v23.2.0, cellRendererParams.suppressRefresh for Detail Cell Renderer is no \" +\n \"longer used. Please set cellRendererParams.refreshStrategy = 'nothing' instead.\");\n this.refreshStrategy = 'nothing';\n return;\n }\n var providedStrategy = this.params.refreshStrategy;\n var validSelection = providedStrategy == 'everything' || providedStrategy == 'nothing' || providedStrategy == 'rows';\n if (validSelection) {\n this.refreshStrategy = providedStrategy;\n return;\n }\n if (providedStrategy != null) {\n console.warn(\"AG Grid: invalid cellRendererParams.refreshStrategy = '\" + providedStrategy +\n \"' supplied, defaulting to refreshStrategy = 'rows'.\");\n }\n this.refreshStrategy = 'rows';\n };\n DetailCellRendererCtrl.prototype.addThemeToDetailGrid = function () {\n // this is needed by environment service of the child grid, the class needs to be on\n // the grid div itself - the browser's CSS on the other hand just inherits from the parent grid theme.\n var theme = this.environment.getTheme().theme;\n if (theme) {\n this.comp.addOrRemoveDetailGridCssClass(theme, true);\n }\n };\n DetailCellRendererCtrl.prototype.createDetailGrid = function () {\n if (_.missing(this.params.detailGridOptions)) {\n console.warn('AG Grid: could not find detail grid options for master detail, ' +\n 'please set gridOptions.detailCellRendererParams.detailGridOptions');\n return;\n }\n var autoHeight = this.gridOptionsWrapper.isDetailRowAutoHeight();\n // we clone the detail grid options, as otherwise it would be shared\n // across many instances, and that would be a problem because we set\n // api and columnApi into gridOptions\n var gridOptions = __assign({}, this.params.detailGridOptions);\n if (autoHeight) {\n gridOptions.domLayout = 'autoHeight';\n }\n this.comp.setDetailGrid(gridOptions);\n };\n DetailCellRendererCtrl.prototype.registerDetailWithMaster = function (api, columnApi) {\n var rowId = this.params.node.id;\n var masterGridApi = this.params.api;\n var gridInfo = {\n id: rowId,\n api: api,\n columnApi: columnApi\n };\n var rowNode = this.params.node;\n // register with api\n masterGridApi.addDetailGridInfo(rowId, gridInfo);\n // register with node\n rowNode.detailGridInfo = gridInfo;\n this.addDestroyFunc(function () {\n // the gridInfo can be stale if a refresh happens and\n // a new row is created before the old one is destroyed.\n if (rowNode.detailGridInfo !== gridInfo) {\n return;\n }\n masterGridApi.removeDetailGridInfo(rowId); // unregister from api\n rowNode.detailGridInfo = null; // unregister from node\n });\n };\n DetailCellRendererCtrl.prototype.loadRowData = function () {\n var _this = this;\n // in case a refresh happens before the last refresh completes (as we depend on async\n // application logic) we keep track on what the latest call was.\n this.loadRowDataVersion++;\n var versionThisCall = this.loadRowDataVersion;\n var userFunc = this.params.getDetailRowData;\n if (!userFunc) {\n console.warn('AG Grid: could not find getDetailRowData for master / detail, ' +\n 'please set gridOptions.detailCellRendererParams.getDetailRowData');\n return;\n }\n var successCallback = function (rowData) {\n var mostRecentCall = _this.loadRowDataVersion === versionThisCall;\n if (mostRecentCall) {\n _this.comp.setRowData(rowData);\n }\n };\n var funcParams = {\n node: this.params.node,\n // we take data from node, rather than params.data\n // as the data could have been updated with new instance\n data: this.params.node.data,\n successCallback: successCallback,\n context: this.gridOptionsWrapper.getContext()\n };\n userFunc(funcParams);\n };\n DetailCellRendererCtrl.prototype.refresh = function () {\n var GET_GRID_TO_REFRESH = false;\n var GET_GRID_TO_DO_NOTHING = true;\n // if we return true, it means we pretend to the grid\n // that we have refreshed, so refresh will never happen.\n var doNotRefresh = !this.needRefresh || this.refreshStrategy === 'nothing';\n if (doNotRefresh) {\n // we do nothing in this refresh method, and also tell the grid to do nothing\n return GET_GRID_TO_DO_NOTHING;\n }\n // reset flag, so don't refresh again until more data changes.\n this.needRefresh = false;\n if (this.refreshStrategy === 'everything') {\n // we want full refresh, so tell the grid to destroy and recreate this cell\n return GET_GRID_TO_REFRESH;\n }\n else {\n // do the refresh here, and tell the grid to do nothing\n this.loadRowData();\n return GET_GRID_TO_DO_NOTHING;\n }\n };\n __decorate([\n Autowired('environment')\n ], DetailCellRendererCtrl.prototype, \"environment\", void 0);\n __decorate([\n Autowired('rowPositionUtils')\n ], DetailCellRendererCtrl.prototype, \"rowPositionUtils\", void 0);\n __decorate([\n Autowired('focusService')\n ], DetailCellRendererCtrl.prototype, \"focusService\", void 0);\n return DetailCellRendererCtrl;\n}(BeanStub));\nexport { DetailCellRendererCtrl };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Component, Grid, RefSelector, _ } from \"@ag-grid-community/core\";\nimport { DetailCellRendererCtrl } from \"./detailCellRendererCtrl\";\nvar DetailCellRenderer = /** @class */ (function (_super) {\n __extends(DetailCellRenderer, _super);\n function DetailCellRenderer() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n DetailCellRenderer.prototype.init = function (params) {\n var _this = this;\n this.params = params;\n this.selectAndSetTemplate();\n var compProxy = {\n addOrRemoveCssClass: function (cssClassName, on) { return _this.addOrRemoveCssClass(cssClassName, on); },\n addOrRemoveDetailGridCssClass: function (cssClassName, on) { return _this.eDetailGrid.classList.toggle(cssClassName, on); },\n setDetailGrid: function (gridOptions) { return _this.setDetailGrid(gridOptions); },\n setRowData: function (rowData) { return _this.setRowData(rowData); },\n getGui: function () { return _this.eDetailGrid; }\n };\n this.ctrl = this.createManagedBean(new DetailCellRendererCtrl());\n this.ctrl.init(compProxy, params);\n };\n DetailCellRenderer.prototype.refresh = function () {\n return this.ctrl && this.ctrl.refresh();\n };\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n DetailCellRenderer.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n DetailCellRenderer.prototype.selectAndSetTemplate = function () {\n var _this = this;\n if (this.params.pinned) {\n this.setTemplate('
');\n return;\n }\n var setDefaultTemplate = function () {\n _this.setTemplate(DetailCellRenderer.TEMPLATE);\n };\n if (_.missing(this.params.template)) {\n // use default template\n setDefaultTemplate();\n }\n else {\n // use user provided template\n if (typeof this.params.template === 'string') {\n this.setTemplate(this.params.template);\n }\n else if (typeof this.params.template === 'function') {\n var templateFunc = this.params.template;\n var template = templateFunc(this.params);\n this.setTemplate(template);\n }\n else {\n console.warn('AG Grid: detailCellRendererParams.template should be function or string');\n setDefaultTemplate();\n }\n }\n if (this.eDetailGrid == null) {\n console.warn('AG Grid: reference to eDetailGrid was missing from the details template. ' +\n 'Please add ref=\"eDetailGrid\" to the template.');\n }\n };\n DetailCellRenderer.prototype.setDetailGrid = function (gridOptions) {\n if (!this.eDetailGrid) {\n return;\n }\n // AG-1715\n // this is only needed when reactUi=false, once we remove the old way\n // of doing react, and Master / Details is all native React, then we\n // can remove this code.\n var agGridReact = this.context.getBean('agGridReact');\n var agGridReactCloned = agGridReact ? _.cloneObject(agGridReact) : undefined;\n // when we create detail grid, the detail grid needs frameworkComponentWrapper so that\n // it created child components correctly, ie Angular detail grid can have Angular cell renderer.\n // this is only used by Angular and Vue, as React uses native React AG Grid detail grids\n var frameworkComponentWrapper = this.context.getBean('frameworkComponentWrapper');\n var frameworkOverrides = this.getFrameworkOverrides();\n // tslint:disable-next-line\n new Grid(this.eDetailGrid, gridOptions, {\n frameworkOverrides: frameworkOverrides,\n providedBeanInstances: {\n agGridReact: agGridReactCloned,\n frameworkComponentWrapper: frameworkComponentWrapper\n }\n });\n this.detailApi = gridOptions.api;\n this.ctrl.registerDetailWithMaster(gridOptions.api, gridOptions.columnApi);\n this.addDestroyFunc(function () {\n if (gridOptions.api) {\n gridOptions.api.destroy();\n }\n });\n };\n DetailCellRenderer.prototype.setRowData = function (rowData) {\n // ensure detail grid api still exists (grid may be destroyed when async call tries to set data)\n this.detailApi && this.detailApi.setRowData(rowData);\n };\n DetailCellRenderer.TEMPLATE = \"
\\n
\\n
\";\n __decorate([\n RefSelector('eDetailGrid')\n ], DetailCellRenderer.prototype, \"eDetailGrid\", void 0);\n return DetailCellRenderer;\n}(Component));\nexport { DetailCellRenderer };\n","import { ModuleNames } from \"@ag-grid-community/core\";\nimport { EnterpriseCoreModule } from \"@ag-grid-enterprise/core\";\nimport { DetailCellRenderer } from \"./masterDetail/detailCellRenderer\";\nimport { DetailCellRendererCtrl } from \"./masterDetail/detailCellRendererCtrl\";\nexport var MasterDetailModule = {\n moduleName: ModuleNames.MasterDetailModule,\n beans: [],\n userComponents: [\n { componentName: 'agDetailCellRenderer', componentClass: DetailCellRenderer }\n ],\n controllers: [\n { controllerName: 'detailCellRenderer', controllerClass: DetailCellRendererCtrl }\n ],\n dependantModules: [\n EnterpriseCoreModule\n ]\n};\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, Bean, BeanStub, Column, Constants, ModuleNames, ModuleRegistry, PostConstruct, AgPromise, TabbedLayout, AgMenuList, AgMenuItemComponent } from '@ag-grid-community/core';\nimport { PrimaryColsPanel } from '@ag-grid-enterprise/column-tool-panel';\nvar EnterpriseMenuFactory = /** @class */ (function (_super) {\n __extends(EnterpriseMenuFactory, _super);\n function EnterpriseMenuFactory() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n EnterpriseMenuFactory.prototype.hideActiveMenu = function () {\n this.destroyBean(this.activeMenu);\n };\n EnterpriseMenuFactory.prototype.showMenuAfterMouseEvent = function (column, mouseEvent, defaultTab) {\n var _this = this;\n this.showMenu(column, function (menu) {\n var ePopup = menu.getGui();\n _this.popupService.positionPopupUnderMouseEvent({\n type: 'columnMenu',\n column: column,\n mouseEvent: mouseEvent,\n ePopup: ePopup\n });\n if (defaultTab) {\n menu.showTab(defaultTab);\n }\n }, 'columnMenu', defaultTab, undefined, mouseEvent.target);\n };\n EnterpriseMenuFactory.prototype.showMenuAfterButtonClick = function (column, eventSource, containerType, defaultTab, restrictToTabs) {\n var _this = this;\n var multiplier = -1;\n var alignSide = 'left';\n if (this.gridOptionsWrapper.isEnableRtl()) {\n multiplier = 1;\n alignSide = 'right';\n }\n this.showMenu(column, function (menu) {\n var ePopup = menu.getGui();\n _this.popupService.positionPopupUnderComponent({\n type: containerType,\n column: column,\n eventSource: eventSource,\n ePopup: ePopup,\n alignSide: alignSide,\n nudgeX: 9 * multiplier,\n nudgeY: -23,\n keepWithinBounds: true\n });\n if (defaultTab) {\n menu.showTab(defaultTab);\n }\n }, containerType, defaultTab, restrictToTabs, eventSource);\n };\n EnterpriseMenuFactory.prototype.showMenu = function (column, positionCallback, containerType, defaultTab, restrictToTabs, eventSource) {\n var _this = this;\n var menu = this.createBean(new EnterpriseMenu(column, this.lastSelectedTab, restrictToTabs));\n var eMenuGui = menu.getGui();\n var anchorToElement = eventSource || this.ctrlsService.getGridBodyCtrl().getGui();\n var closedFuncs = [];\n closedFuncs.push(function (e) {\n _this.destroyBean(menu);\n column.setMenuVisible(false, 'contextMenu');\n var isKeyboardEvent = e instanceof KeyboardEvent;\n if (isKeyboardEvent && eventSource && _.isVisible(eventSource)) {\n var focusableEl = _this.focusService.findTabbableParent(eventSource);\n if (focusableEl) {\n focusableEl.focus();\n }\n }\n });\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n // need to show filter before positioning, as only after filter\n // is visible can we find out what the width of it is\n var addPopupRes = this.popupService.addPopup({\n modal: true,\n eChild: eMenuGui,\n closeOnEsc: true,\n closedCallback: function (e) {\n closedFuncs.forEach(function (f) { return f(e); });\n },\n afterGuiAttached: function (params) { return menu.afterGuiAttached(Object.assign({}, { container: containerType }, params)); },\n positionCallback: function () { return positionCallback(menu); },\n anchorToElement: anchorToElement,\n ariaLabel: translate('ariaLabelColumnMenu', 'Column Menu')\n });\n if (addPopupRes) {\n // if user starts showing / hiding columns, or otherwise move the underlying column\n // for this menu, we want to stop tracking the menu with the column position. otherwise\n // the menu would move as the user is using the columns tab inside the menu.\n var stopAnchoringPromise = addPopupRes.stopAnchoringPromise;\n if (stopAnchoringPromise) {\n stopAnchoringPromise.then(function (stopAnchoringFunc) {\n column.addEventListener(Column.EVENT_LEFT_CHANGED, stopAnchoringFunc);\n column.addEventListener(Column.EVENT_VISIBLE_CHANGED, stopAnchoringFunc);\n closedFuncs.push(function () {\n column.removeEventListener(Column.EVENT_LEFT_CHANGED, stopAnchoringFunc);\n column.removeEventListener(Column.EVENT_VISIBLE_CHANGED, stopAnchoringFunc);\n });\n });\n }\n }\n if (!defaultTab) {\n menu.showTabBasedOnPreviousSelection();\n // reposition the menu because the method above could load\n // an element that is bigger than enterpriseMenu header.\n positionCallback(menu);\n }\n menu.addEventListener(EnterpriseMenu.EVENT_TAB_SELECTED, function (event) {\n _this.lastSelectedTab = event.key;\n });\n column.setMenuVisible(true, 'contextMenu');\n this.activeMenu = menu;\n menu.addEventListener(BeanStub.EVENT_DESTROYED, function () {\n if (_this.activeMenu === menu) {\n _this.activeMenu = null;\n }\n });\n };\n EnterpriseMenuFactory.prototype.isMenuEnabled = function (column) {\n return column.getMenuTabs(EnterpriseMenu.TABS_DEFAULT).length > 0;\n };\n __decorate([\n Autowired('popupService')\n ], EnterpriseMenuFactory.prototype, \"popupService\", void 0);\n __decorate([\n Autowired('focusService')\n ], EnterpriseMenuFactory.prototype, \"focusService\", void 0);\n __decorate([\n Autowired('ctrlsService')\n ], EnterpriseMenuFactory.prototype, \"ctrlsService\", void 0);\n EnterpriseMenuFactory = __decorate([\n Bean('menuFactory')\n ], EnterpriseMenuFactory);\n return EnterpriseMenuFactory;\n}(BeanStub));\nexport { EnterpriseMenuFactory };\nvar EnterpriseMenu = /** @class */ (function (_super) {\n __extends(EnterpriseMenu, _super);\n function EnterpriseMenu(column, initialSelection, restrictTo) {\n var _this = _super.call(this) || this;\n _this.tabFactories = {};\n _this.includeChecks = {};\n _this.column = column;\n _this.initialSelection = initialSelection;\n _this.tabFactories[EnterpriseMenu.TAB_GENERAL] = _this.createMainPanel.bind(_this);\n _this.tabFactories[EnterpriseMenu.TAB_FILTER] = _this.createFilterPanel.bind(_this);\n _this.tabFactories[EnterpriseMenu.TAB_COLUMNS] = _this.createColumnsPanel.bind(_this);\n _this.includeChecks[EnterpriseMenu.TAB_GENERAL] = function () { return true; };\n _this.includeChecks[EnterpriseMenu.TAB_FILTER] = function () { return column.isFilterAllowed(); };\n _this.includeChecks[EnterpriseMenu.TAB_COLUMNS] = function () { return true; };\n _this.restrictTo = restrictTo;\n return _this;\n }\n EnterpriseMenu.prototype.init = function () {\n var _this = this;\n var tabs = this.getTabsToCreate().map(function (name) { return _this.createTab(name); });\n this.tabbedLayout = new TabbedLayout({\n items: tabs,\n cssClass: 'ag-menu',\n onActiveItemClicked: this.onHidePopup.bind(this),\n onItemClicked: this.onTabItemClicked.bind(this)\n });\n this.createBean(this.tabbedLayout);\n if (this.mainMenuList) {\n this.mainMenuList.setParentComponent(this.tabbedLayout);\n }\n };\n EnterpriseMenu.prototype.getTabsToCreate = function () {\n var _this = this;\n if (this.restrictTo) {\n return this.restrictTo;\n }\n return this.column.getMenuTabs(EnterpriseMenu.TABS_DEFAULT)\n .filter(function (tabName) { return _this.isValidMenuTabItem(tabName); })\n .filter(function (tabName) { return _this.isNotSuppressed(tabName); })\n .filter(function (tabName) { return _this.isModuleLoaded(tabName); });\n };\n EnterpriseMenu.prototype.isModuleLoaded = function (menuTabName) {\n if (menuTabName === EnterpriseMenu.TAB_COLUMNS) {\n return ModuleRegistry.isRegistered(ModuleNames.ColumnToolPanelModule);\n }\n return true;\n };\n EnterpriseMenu.prototype.isValidMenuTabItem = function (menuTabName) {\n var isValid = true;\n var itemsToConsider = EnterpriseMenu.TABS_DEFAULT;\n if (this.restrictTo != null) {\n isValid = this.restrictTo.indexOf(menuTabName) > -1;\n itemsToConsider = this.restrictTo;\n }\n isValid = isValid && EnterpriseMenu.TABS_DEFAULT.indexOf(menuTabName) > -1;\n if (!isValid) {\n console.warn(\"AG Grid: Trying to render an invalid menu item '\" + menuTabName + \"'. Check that your 'menuTabs' contains one of [\" + itemsToConsider + \"]\");\n }\n return isValid;\n };\n EnterpriseMenu.prototype.isNotSuppressed = function (menuTabName) {\n return this.includeChecks[menuTabName]();\n };\n EnterpriseMenu.prototype.createTab = function (name) {\n return this.tabFactories[name]();\n };\n EnterpriseMenu.prototype.showTabBasedOnPreviousSelection = function () {\n // show the tab the user was on last time they had a menu open\n this.showTab(this.initialSelection);\n };\n EnterpriseMenu.prototype.showTab = function (toShow) {\n if (this.tabItemColumns && toShow === EnterpriseMenu.TAB_COLUMNS) {\n this.tabbedLayout.showItem(this.tabItemColumns);\n }\n else if (this.tabItemFilter && toShow === EnterpriseMenu.TAB_FILTER) {\n this.tabbedLayout.showItem(this.tabItemFilter);\n }\n else if (this.tabItemGeneral && toShow === EnterpriseMenu.TAB_GENERAL) {\n this.tabbedLayout.showItem(this.tabItemGeneral);\n }\n else {\n this.tabbedLayout.showFirstItem();\n }\n };\n EnterpriseMenu.prototype.onTabItemClicked = function (event) {\n var key = null;\n switch (event.item) {\n case this.tabItemColumns:\n key = EnterpriseMenu.TAB_COLUMNS;\n break;\n case this.tabItemFilter:\n key = EnterpriseMenu.TAB_FILTER;\n break;\n case this.tabItemGeneral:\n key = EnterpriseMenu.TAB_GENERAL;\n break;\n }\n if (key) {\n this.activateTab(key);\n }\n };\n EnterpriseMenu.prototype.activateTab = function (tab) {\n var ev = {\n type: EnterpriseMenu.EVENT_TAB_SELECTED,\n key: tab\n };\n this.dispatchEvent(ev);\n };\n EnterpriseMenu.prototype.getMenuItems = function () {\n var defaultMenuOptions = this.getDefaultMenuOptions();\n var result;\n var userFunc = this.gridOptionsWrapper.getMainMenuItemsFunc();\n if (userFunc) {\n result = userFunc({\n column: this.column,\n defaultItems: defaultMenuOptions\n });\n }\n else {\n result = defaultMenuOptions;\n }\n // GUI looks weird when two separators are side by side. this can happen accidentally\n // if we remove items from the menu then two separators can edit up adjacent.\n _.removeRepeatsFromArray(result, EnterpriseMenu.MENU_ITEM_SEPARATOR);\n return result;\n };\n EnterpriseMenu.prototype.getDefaultMenuOptions = function () {\n var result = [];\n var allowPinning = !this.column.getColDef().lockPinned;\n var rowGroupCount = this.columnModel.getRowGroupColumns().length;\n var doingGrouping = rowGroupCount > 0;\n var groupedByThisColumn = this.columnModel.getRowGroupColumns().indexOf(this.column) >= 0;\n var allowValue = this.column.isAllowValue();\n var allowRowGroup = this.column.isAllowRowGroup();\n var isPrimary = this.column.isPrimary();\n var pivotModeOn = this.columnModel.isPivotMode();\n var isInMemoryRowModel = this.rowModel.getType() === Constants.ROW_MODEL_TYPE_CLIENT_SIDE;\n var usingTreeData = this.gridOptionsWrapper.isTreeData();\n var allowValueAgg = \n // if primary, then only allow aggValue if grouping and it's a value columns\n (isPrimary && doingGrouping && allowValue)\n // secondary columns can always have aggValue, as it means it's a pivot value column\n || !isPrimary;\n if (allowPinning) {\n result.push('pinSubMenu');\n }\n if (allowValueAgg) {\n result.push('valueAggSubMenu');\n }\n if (allowPinning || allowValueAgg) {\n result.push(EnterpriseMenu.MENU_ITEM_SEPARATOR);\n }\n result.push('autoSizeThis');\n result.push('autoSizeAll');\n result.push(EnterpriseMenu.MENU_ITEM_SEPARATOR);\n if (allowRowGroup && this.column.isPrimary()) {\n if (groupedByThisColumn) {\n result.push('rowUnGroup');\n }\n else {\n result.push('rowGroup');\n }\n }\n result.push(EnterpriseMenu.MENU_ITEM_SEPARATOR);\n result.push('resetColumns');\n // only add grouping expand/collapse if grouping in the InMemoryRowModel\n // if pivoting, we only have expandable groups if grouping by 2 or more columns\n // as the lowest level group is not expandable while pivoting.\n // if not pivoting, then any active row group can be expanded.\n var allowExpandAndContract = isInMemoryRowModel && (usingTreeData || rowGroupCount > (pivotModeOn ? 1 : 0));\n if (allowExpandAndContract) {\n result.push('expandAll');\n result.push('contractAll');\n }\n return result;\n };\n EnterpriseMenu.prototype.createMainPanel = function () {\n this.mainMenuList = this.createManagedBean(new AgMenuList());\n var menuItems = this.getMenuItems();\n var menuItemsMapped = this.menuItemMapper.mapWithStockItems(menuItems, this.column);\n this.mainMenuList.addMenuItems(menuItemsMapped);\n this.mainMenuList.addEventListener(AgMenuItemComponent.EVENT_MENU_ITEM_SELECTED, this.onHidePopup.bind(this));\n this.tabItemGeneral = {\n title: _.createIconNoSpan('menu', this.gridOptionsWrapper, this.column),\n titleLabel: EnterpriseMenu.TAB_GENERAL.replace('MenuTab', ''),\n bodyPromise: AgPromise.resolve(this.mainMenuList.getGui()),\n name: EnterpriseMenu.TAB_GENERAL\n };\n return this.tabItemGeneral;\n };\n EnterpriseMenu.prototype.onHidePopup = function (event) {\n var keyboardEvent;\n if (event && event.event && event.event instanceof KeyboardEvent) {\n keyboardEvent = event.event;\n }\n this.hidePopupFunc(keyboardEvent && { keyboardEvent: keyboardEvent });\n // this method only gets called when the menu was closed by selection an option\n // in this case we highlight the cell that was previously highlighted\n var focusedCell = this.focusService.getFocusedCell();\n var eDocument = this.gridOptionsWrapper.getDocument();\n if (eDocument.activeElement === eDocument.body && focusedCell) {\n var rowIndex = focusedCell.rowIndex, rowPinned = focusedCell.rowPinned, column = focusedCell.column;\n this.focusService.setFocusedCell(rowIndex, column, rowPinned, true);\n }\n };\n EnterpriseMenu.prototype.createFilterPanel = function () {\n var _a;\n var filterWrapper = this.filterManager.getOrCreateFilterWrapper(this.column, 'COLUMN_MENU');\n if (!filterWrapper) {\n throw new Error('AG Grid - Unable to instantiate filter');\n }\n var afterFilterAttachedCallback = function (params) {\n var _a;\n if (!((_a = filterWrapper) === null || _a === void 0 ? void 0 : _a.filterPromise)) {\n return;\n }\n // slightly odd block this - this promise will always have been resolved by the time it gets here, so won't be\n // async (_unless_ in react or similar, but if so why not encountered before now?).\n // I'd suggest a future improvement would be to remove/replace this promise as this block just wont work if it is\n // async and is confusing if you don't have this context\n filterWrapper.filterPromise.then(function (filter) {\n if (filter && filter.afterGuiAttached) {\n filter.afterGuiAttached(params);\n }\n });\n };\n this.tabItemFilter = {\n title: _.createIconNoSpan('filter', this.gridOptionsWrapper, this.column),\n titleLabel: EnterpriseMenu.TAB_FILTER.replace('MenuTab', ''),\n bodyPromise: (_a = filterWrapper) === null || _a === void 0 ? void 0 : _a.guiPromise,\n afterAttachedCallback: afterFilterAttachedCallback,\n name: EnterpriseMenu.TAB_FILTER\n };\n return this.tabItemFilter;\n };\n EnterpriseMenu.prototype.createColumnsPanel = function () {\n var eWrapperDiv = document.createElement('div');\n eWrapperDiv.classList.add('ag-menu-column-select-wrapper');\n this.columnSelectPanel = this.createManagedBean(new PrimaryColsPanel());\n var columnsMenuParams = this.column.getColDef().columnsMenuParams;\n if (!columnsMenuParams) {\n columnsMenuParams = {};\n }\n this.columnSelectPanel.init(false, {\n suppressColumnMove: false,\n suppressValues: false,\n suppressPivots: false,\n suppressRowGroups: false,\n suppressPivotMode: false,\n contractColumnSelection: !!columnsMenuParams.contractColumnSelection,\n suppressColumnExpandAll: !!columnsMenuParams.suppressColumnExpandAll,\n suppressColumnFilter: !!columnsMenuParams.suppressColumnFilter,\n suppressColumnSelectAll: !!columnsMenuParams.suppressColumnSelectAll,\n suppressSyncLayoutWithGrid: !!columnsMenuParams.suppressSyncLayoutWithGrid,\n api: this.gridApi,\n columnApi: this.columnApi,\n context: this.gridOptionsWrapper.getContext()\n }, 'columnMenu');\n var columnSelectPanelGui = this.columnSelectPanel.getGui();\n columnSelectPanelGui.classList.add('ag-menu-column-select');\n eWrapperDiv.appendChild(columnSelectPanelGui);\n this.tabItemColumns = {\n title: _.createIconNoSpan('columns', this.gridOptionsWrapper, this.column),\n titleLabel: EnterpriseMenu.TAB_COLUMNS.replace('MenuTab', ''),\n bodyPromise: AgPromise.resolve(eWrapperDiv),\n name: EnterpriseMenu.TAB_COLUMNS\n };\n return this.tabItemColumns;\n };\n EnterpriseMenu.prototype.afterGuiAttached = function (params) {\n var container = params.container, hidePopup = params.hidePopup;\n this.tabbedLayout.setAfterAttachedParams({ container: container, hidePopup: hidePopup });\n if (hidePopup) {\n this.hidePopupFunc = hidePopup;\n this.addDestroyFunc(hidePopup);\n }\n };\n EnterpriseMenu.prototype.getGui = function () {\n return this.tabbedLayout.getGui();\n };\n EnterpriseMenu.EVENT_TAB_SELECTED = 'tabSelected';\n EnterpriseMenu.TAB_FILTER = 'filterMenuTab';\n EnterpriseMenu.TAB_GENERAL = 'generalMenuTab';\n EnterpriseMenu.TAB_COLUMNS = 'columnsMenuTab';\n EnterpriseMenu.TABS_DEFAULT = [EnterpriseMenu.TAB_GENERAL, EnterpriseMenu.TAB_FILTER, EnterpriseMenu.TAB_COLUMNS];\n EnterpriseMenu.MENU_ITEM_SEPARATOR = 'separator';\n __decorate([\n Autowired('columnModel')\n ], EnterpriseMenu.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired('filterManager')\n ], EnterpriseMenu.prototype, \"filterManager\", void 0);\n __decorate([\n Autowired('gridApi')\n ], EnterpriseMenu.prototype, \"gridApi\", void 0);\n __decorate([\n Autowired('columnApi')\n ], EnterpriseMenu.prototype, \"columnApi\", void 0);\n __decorate([\n Autowired('menuItemMapper')\n ], EnterpriseMenu.prototype, \"menuItemMapper\", void 0);\n __decorate([\n Autowired('rowModel')\n ], EnterpriseMenu.prototype, \"rowModel\", void 0);\n __decorate([\n Autowired('focusService')\n ], EnterpriseMenu.prototype, \"focusService\", void 0);\n __decorate([\n PostConstruct\n ], EnterpriseMenu.prototype, \"init\", null);\n return EnterpriseMenu;\n}(BeanStub));\nexport { EnterpriseMenu };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, AgMenuItemComponent, AgMenuList, Autowired, Bean, BeanStub, Component, ModuleNames, ModuleRegistry, Optional, PostConstruct } from \"@ag-grid-community/core\";\nvar CSS_MENU = 'ag-menu';\nvar CSS_CONTEXT_MENU_OPEN = 'ag-context-menu-open';\nvar ContextMenuFactory = /** @class */ (function (_super) {\n __extends(ContextMenuFactory, _super);\n function ContextMenuFactory() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ContextMenuFactory.prototype.hideActiveMenu = function () {\n this.destroyBean(this.activeMenu);\n };\n ContextMenuFactory.prototype.getMenuItems = function (node, column, value) {\n var defaultMenuOptions = [];\n if (_.exists(node) && ModuleRegistry.isRegistered(ModuleNames.ClipboardModule)) {\n if (column) {\n // only makes sense if column exists, could have originated from a row\n defaultMenuOptions.push('copy', 'copyWithHeaders', 'copyWithGroupHeaders', 'paste', 'separator');\n }\n }\n if (this.gridOptionsWrapper.isEnableCharts() &&\n ModuleRegistry.isRegistered(ModuleNames.RangeSelectionModule) &&\n ModuleRegistry.isRegistered(ModuleNames.GridChartsModule)) {\n if (this.columnModel.isPivotMode()) {\n defaultMenuOptions.push('pivotChart');\n }\n if (this.rangeService && !this.rangeService.isEmpty()) {\n defaultMenuOptions.push('chartRange');\n }\n }\n if (_.exists(node)) {\n // if user clicks a cell\n var csvModuleMissing = !ModuleRegistry.isRegistered(ModuleNames.CsvExportModule);\n var excelModuleMissing = !ModuleRegistry.isRegistered(ModuleNames.ExcelExportModule);\n var suppressExcel = this.gridOptionsWrapper.isSuppressExcelExport() || excelModuleMissing;\n var suppressCsv = this.gridOptionsWrapper.isSuppressCsvExport() || csvModuleMissing;\n var onIPad = _.isIOSUserAgent();\n var anyExport = !onIPad && (!suppressExcel || !suppressCsv);\n if (anyExport) {\n defaultMenuOptions.push('export');\n }\n }\n if (this.gridOptionsWrapper.getContextMenuItemsFunc()) {\n var userFunc = this.gridOptionsWrapper.getContextMenuItemsFunc();\n var params = {\n node: node,\n column: column,\n value: value,\n defaultItems: defaultMenuOptions.length ? defaultMenuOptions : undefined,\n };\n return userFunc ? userFunc(params) : undefined;\n }\n return defaultMenuOptions;\n };\n ContextMenuFactory.prototype.onContextMenu = function (mouseEvent, touchEvent, rowNode, column, value, anchorToElement) {\n // to allow us to debug in chrome, we ignore the event if ctrl is pressed.\n // not everyone wants this, so first 'if' below allows to turn this hack off.\n if (!this.gridOptionsWrapper.isAllowContextMenuWithControlKey()) {\n // then do the check\n if (mouseEvent && (mouseEvent.ctrlKey || mouseEvent.metaKey)) {\n return;\n }\n }\n // need to do this regardless of context menu showing or not, so doing\n // before the isSuppressContextMenu() check\n if (mouseEvent) {\n this.blockMiddleClickScrollsIfNeeded(mouseEvent);\n }\n if (this.gridOptionsWrapper.isSuppressContextMenu()) {\n return;\n }\n var eventOrTouch = mouseEvent ? mouseEvent : touchEvent.touches[0];\n if (this.showMenu(rowNode, column, value, eventOrTouch, anchorToElement)) {\n var event_1 = mouseEvent ? mouseEvent : touchEvent;\n event_1.preventDefault();\n }\n };\n ContextMenuFactory.prototype.blockMiddleClickScrollsIfNeeded = function (mouseEvent) {\n // if we don't do this, then middle click will never result in a 'click' event, as 'mousedown'\n // will be consumed by the browser to mean 'scroll' (as you can scroll with the middle mouse\n // button in the browser). so this property allows the user to receive middle button clicks if\n // they want.\n var gridOptionsWrapper = this.gridOptionsWrapper;\n var which = mouseEvent.which;\n if (gridOptionsWrapper.isSuppressMiddleClickScrolls() && which === 2) {\n mouseEvent.preventDefault();\n }\n };\n ContextMenuFactory.prototype.showMenu = function (node, column, value, mouseEvent, anchorToElement) {\n var _this = this;\n var menuItems = this.getMenuItems(node, column, value);\n var eGridBodyGui = this.ctrlsService.getGridBodyCtrl().getGui();\n if (menuItems === undefined || _.missingOrEmpty(menuItems)) {\n return false;\n }\n var menu = new ContextMenu(menuItems);\n this.createBean(menu);\n var eMenuGui = menu.getGui();\n var positionParams = {\n column: column,\n rowNode: node,\n type: 'contextMenu',\n mouseEvent: mouseEvent,\n ePopup: eMenuGui,\n // move one pixel away so that accidentally double clicking\n // won't show the browser's contextmenu\n nudgeY: 1\n };\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n var addPopupRes = this.popupService.addPopup({\n modal: true,\n eChild: eMenuGui,\n closeOnEsc: true,\n closedCallback: function () {\n eGridBodyGui.classList.remove(CSS_CONTEXT_MENU_OPEN);\n _this.destroyBean(menu);\n },\n click: mouseEvent,\n positionCallback: function () {\n _this.popupService.positionPopupUnderMouseEvent(Object.assign({}, {\n nudgeX: _this.gridOptionsWrapper.isEnableRtl() ? (eMenuGui.offsetWidth + 1) * -1 : 1\n }, positionParams));\n },\n // so when browser is scrolled down, or grid is scrolled, context menu stays with cell\n anchorToElement: anchorToElement,\n ariaLabel: translate('ariaLabelContextMenu', 'Context Menu')\n });\n if (addPopupRes) {\n eGridBodyGui.classList.add(CSS_CONTEXT_MENU_OPEN);\n menu.afterGuiAttached({ container: 'contextMenu', hidePopup: addPopupRes.hideFunc });\n }\n // there should never be an active menu at this point, however it was found\n // that you could right click a second time just 1 or 2 pixels from the first\n // click, and another menu would pop up. so somehow the logic for closing the\n // first menu (clicking outside should close it) was glitchy somehow. an easy\n // way to avoid this is just remove the old context menu here if it exists.\n if (this.activeMenu) {\n this.hideActiveMenu();\n }\n this.activeMenu = menu;\n menu.addEventListener(BeanStub.EVENT_DESTROYED, function () {\n if (_this.activeMenu === menu) {\n _this.activeMenu = null;\n }\n });\n // hide the popup if something gets selected\n if (addPopupRes) {\n menu.addEventListener(AgMenuItemComponent.EVENT_MENU_ITEM_SELECTED, addPopupRes.hideFunc);\n }\n return true;\n };\n __decorate([\n Autowired('popupService')\n ], ContextMenuFactory.prototype, \"popupService\", void 0);\n __decorate([\n Optional('rangeService')\n ], ContextMenuFactory.prototype, \"rangeService\", void 0);\n __decorate([\n Autowired('ctrlsService')\n ], ContextMenuFactory.prototype, \"ctrlsService\", void 0);\n __decorate([\n Autowired('columnModel')\n ], ContextMenuFactory.prototype, \"columnModel\", void 0);\n ContextMenuFactory = __decorate([\n Bean('contextMenuFactory')\n ], ContextMenuFactory);\n return ContextMenuFactory;\n}(BeanStub));\nexport { ContextMenuFactory };\nvar ContextMenu = /** @class */ (function (_super) {\n __extends(ContextMenu, _super);\n function ContextMenu(menuItems) {\n var _this = _super.call(this, /* html */ \"
\") || this;\n _this.menuList = null;\n _this.focusedCell = null;\n _this.menuItems = menuItems;\n return _this;\n }\n ContextMenu.prototype.addMenuItems = function () {\n var _this = this;\n var menuList = this.createBean(new AgMenuList());\n var menuItemsMapped = this.menuItemMapper.mapWithStockItems(this.menuItems, null);\n menuList.addMenuItems(menuItemsMapped);\n this.appendChild(menuList);\n this.menuList = menuList;\n menuList.addEventListener(AgMenuItemComponent.EVENT_MENU_ITEM_SELECTED, function (e) { return _this.dispatchEvent(e); });\n };\n ContextMenu.prototype.afterGuiAttached = function (params) {\n if (params.hidePopup) {\n this.addDestroyFunc(params.hidePopup);\n }\n this.focusedCell = this.focusService.getFocusedCell();\n if (this.menuList) {\n this.focusService.focusInto(this.menuList.getGui());\n }\n };\n ContextMenu.prototype.restoreFocusedCell = function () {\n var currentFocusedCell = this.focusService.getFocusedCell();\n if (currentFocusedCell && this.focusedCell && this.cellPositionUtils.equals(currentFocusedCell, this.focusedCell)) {\n var _a = this.focusedCell, rowIndex = _a.rowIndex, rowPinned = _a.rowPinned, column = _a.column;\n var doc = this.gridOptionsWrapper.getDocument();\n if (doc.activeElement === doc.body) {\n this.focusService.setFocusedCell(rowIndex, column, rowPinned, true);\n }\n }\n };\n ContextMenu.prototype.destroy = function () {\n this.restoreFocusedCell();\n _super.prototype.destroy.call(this);\n };\n __decorate([\n Autowired('menuItemMapper')\n ], ContextMenu.prototype, \"menuItemMapper\", void 0);\n __decorate([\n Autowired('focusService')\n ], ContextMenu.prototype, \"focusService\", void 0);\n __decorate([\n Autowired('cellPositionUtils')\n ], ContextMenu.prototype, \"cellPositionUtils\", void 0);\n __decorate([\n PostConstruct\n ], ContextMenu.prototype, \"addMenuItems\", null);\n return ContextMenu;\n}(Component));\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, Bean, BeanStub, Constants, ModuleNames, ModuleRegistry, Optional } from '@ag-grid-community/core';\nvar MenuItemMapper = /** @class */ (function (_super) {\n __extends(MenuItemMapper, _super);\n function MenuItemMapper() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n MenuItemMapper.prototype.mapWithStockItems = function (originalList, column) {\n var _this = this;\n if (!originalList) {\n return [];\n }\n var resultList = [];\n originalList.forEach(function (menuItemOrString) {\n var result;\n if (typeof menuItemOrString === 'string') {\n result = _this.getStockMenuItem(menuItemOrString, column);\n }\n else {\n result = menuItemOrString;\n }\n // if no mapping, can happen when module is not loaded but user tries to use module anyway\n if (!result) {\n return;\n }\n var resultDef = result;\n var subMenu = resultDef.subMenu;\n if (subMenu && subMenu instanceof Array) {\n resultDef.subMenu = _this.mapWithStockItems(resultDef.subMenu, column);\n }\n if (result != null) {\n resultList.push(result);\n }\n });\n return resultList;\n };\n MenuItemMapper.prototype.getStockMenuItem = function (key, column) {\n var _this = this;\n var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n var skipHeaderOnAutoSize = this.gridOptionsWrapper.isSkipHeaderOnAutoSize();\n switch (key) {\n case 'pinSubMenu':\n return {\n name: localeTextFunc('pinColumn', 'Pin Column'),\n icon: _.createIconNoSpan('menuPin', this.gridOptionsWrapper, null),\n subMenu: ['pinLeft', 'pinRight', 'clearPinned']\n };\n case 'pinLeft':\n return {\n name: localeTextFunc('pinLeft', 'Pin Left'),\n action: function () { return _this.columnModel.setColumnPinned(column, Constants.PINNED_LEFT, \"contextMenu\"); },\n checked: !!column && column.isPinnedLeft()\n };\n case 'pinRight':\n return {\n name: localeTextFunc('pinRight', 'Pin Right'),\n action: function () { return _this.columnModel.setColumnPinned(column, Constants.PINNED_RIGHT, \"contextMenu\"); },\n checked: !!column && column.isPinnedRight()\n };\n case 'clearPinned':\n return {\n name: localeTextFunc('noPin', 'No Pin'),\n action: function () { return _this.columnModel.setColumnPinned(column, null, \"contextMenu\"); },\n checked: !!column && !column.isPinned()\n };\n case 'valueAggSubMenu':\n if (ModuleRegistry.assertRegistered(ModuleNames.RowGroupingModule, 'Aggregation from Menu')) {\n return {\n name: localeTextFunc('valueAggregation', 'Value Aggregation'),\n icon: _.createIconNoSpan('menuValue', this.gridOptionsWrapper, null),\n subMenu: this.createAggregationSubMenu(column)\n };\n }\n else {\n return null;\n }\n case 'autoSizeThis':\n return {\n name: localeTextFunc('autosizeThiscolumn', 'Autosize This Column'),\n action: function () { return _this.columnModel.autoSizeColumn(column, skipHeaderOnAutoSize, \"contextMenu\"); }\n };\n case 'autoSizeAll':\n return {\n name: localeTextFunc('autosizeAllColumns', 'Autosize All Columns'),\n action: function () { return _this.columnModel.autoSizeAllColumns(skipHeaderOnAutoSize, \"contextMenu\"); }\n };\n case 'rowGroup':\n return {\n name: localeTextFunc('groupBy', 'Group by') + ' ' + _.escapeString(this.columnModel.getDisplayNameForColumn(column, 'header')),\n action: function () { return _this.columnModel.addRowGroupColumn(column, \"contextMenu\"); },\n icon: _.createIconNoSpan('menuAddRowGroup', this.gridOptionsWrapper, null)\n };\n case 'rowUnGroup':\n return {\n name: localeTextFunc('ungroupBy', 'Un-Group by') + ' ' + _.escapeString(this.columnModel.getDisplayNameForColumn(column, 'header')),\n action: function () { return _this.columnModel.removeRowGroupColumn(column, \"contextMenu\"); },\n icon: _.createIconNoSpan('menuRemoveRowGroup', this.gridOptionsWrapper, null)\n };\n case 'resetColumns':\n return {\n name: localeTextFunc('resetColumns', 'Reset Columns'),\n action: function () { return _this.columnModel.resetColumnState(\"contextMenu\"); }\n };\n case 'expandAll':\n return {\n name: localeTextFunc('expandAll', 'Expand All'),\n action: function () { return _this.gridApi.expandAll(); }\n };\n case 'contractAll':\n return {\n name: localeTextFunc('collapseAll', 'Collapse All'),\n action: function () { return _this.gridApi.collapseAll(); }\n };\n case 'copy':\n if (ModuleRegistry.assertRegistered(ModuleNames.ClipboardModule, 'Copy from Menu')) {\n return {\n name: localeTextFunc('copy', 'Copy'),\n shortcut: localeTextFunc('ctrlC', 'Ctrl+C'),\n icon: _.createIconNoSpan('clipboardCopy', this.gridOptionsWrapper, null),\n action: function () { return _this.clipboardService.copyToClipboard(); }\n };\n }\n else {\n return null;\n }\n case 'copyWithHeaders':\n if (ModuleRegistry.assertRegistered(ModuleNames.ClipboardModule, 'Copy with Headers from Menu')) {\n return {\n name: localeTextFunc('copyWithHeaders', 'Copy with Headers'),\n // shortcut: localeTextFunc('ctrlC','Ctrl+C'),\n icon: _.createIconNoSpan('clipboardCopy', this.gridOptionsWrapper, null),\n action: function () { return _this.clipboardService.copyToClipboard({ includeHeaders: true }); }\n };\n }\n else {\n return null;\n }\n case 'copyWithGroupHeaders':\n if (ModuleRegistry.assertRegistered(ModuleNames.ClipboardModule, 'Copy with Group Headers from Menu')) {\n return {\n name: localeTextFunc('copyWithGroupHeaders', 'Copy with Group Headers'),\n // shortcut: localeTextFunc('ctrlC','Ctrl+C'),\n icon: _.createIconNoSpan('clipboardCopy', this.gridOptionsWrapper, null),\n action: function () { return _this.clipboardService.copyToClipboard({ includeHeaders: true, includeGroupHeaders: true }); }\n };\n }\n else {\n return null;\n }\n case 'paste':\n if (ModuleRegistry.assertRegistered(ModuleNames.ClipboardModule, 'Paste from Clipboard')) {\n return {\n name: localeTextFunc('paste', 'Paste'),\n shortcut: localeTextFunc('ctrlV', 'Ctrl+V'),\n disabled: true,\n icon: _.createIconNoSpan('clipboardPaste', this.gridOptionsWrapper, null),\n action: function () { return _this.clipboardService.pasteFromClipboard(); }\n };\n }\n else {\n return null;\n }\n case 'export':\n var exportSubMenuItems = [];\n var csvModuleLoaded = ModuleRegistry.isRegistered(ModuleNames.CsvExportModule);\n var excelModuleLoaded = ModuleRegistry.isRegistered(ModuleNames.ExcelExportModule);\n if (!this.gridOptionsWrapper.isSuppressCsvExport() && csvModuleLoaded) {\n exportSubMenuItems.push('csvExport');\n }\n if (!this.gridOptionsWrapper.isSuppressExcelExport() && excelModuleLoaded) {\n exportSubMenuItems.push('excelExport');\n }\n return {\n name: localeTextFunc('export', 'Export'),\n subMenu: exportSubMenuItems,\n icon: _.createIconNoSpan('save', this.gridOptionsWrapper, null),\n };\n case 'csvExport':\n return {\n name: localeTextFunc('csvExport', 'CSV Export'),\n icon: _.createIconNoSpan('csvExport', this.gridOptionsWrapper, null),\n action: function () { return _this.gridApi.exportDataAsCsv({}); }\n };\n case 'excelExport':\n return {\n name: localeTextFunc('excelExport', 'Excel Export'),\n icon: _.createIconNoSpan('excelExport', this.gridOptionsWrapper, null),\n action: function () { return _this.gridApi.exportDataAsExcel(); }\n };\n case 'separator':\n return 'separator';\n default:\n var chartMenuItem = this.getChartItems(key);\n if (chartMenuItem) {\n return chartMenuItem;\n }\n else {\n console.warn(\"AG Grid: unknown menu item type \" + key);\n return null;\n }\n }\n };\n MenuItemMapper.prototype.getChartItems = function (key) {\n var _this = this;\n var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n var pivotChartMenuItem = function (localeKey, defaultText, chartType) {\n return {\n name: localeTextFunc(localeKey, defaultText),\n action: function () { return _this.chartService.createPivotChart({ chartType: chartType }); }\n };\n };\n var rangeChartMenuItem = function (localeKey, defaultText, chartType) {\n return {\n name: localeTextFunc(localeKey, defaultText),\n action: function () { return _this.chartService.createChartFromCurrentRange(chartType); }\n };\n };\n switch (key) {\n case 'pivotChart':\n return {\n name: localeTextFunc('pivotChart', 'Pivot Chart'),\n subMenu: [\n 'pivotColumnChart',\n 'pivotBarChart',\n 'pivotPieChart',\n 'pivotLineChart',\n 'pivotXYChart',\n 'pivotAreaChart'\n ],\n icon: _.createIconNoSpan('chart', this.gridOptionsWrapper, null),\n };\n case 'chartRange':\n return {\n name: localeTextFunc('chartRange', 'Chart Range'),\n subMenu: [\n 'rangeColumnChart',\n 'rangeBarChart',\n 'rangePieChart',\n 'rangeLineChart',\n 'rangeXYChart',\n 'rangeAreaChart',\n 'rangeHistogramChart',\n 'rangeCombinationChart'\n ],\n icon: _.createIconNoSpan('chart', this.gridOptionsWrapper, null),\n };\n case 'pivotColumnChart':\n return {\n name: localeTextFunc('columnChart', 'Column'),\n subMenu: ['pivotGroupedColumn', 'pivotStackedColumn', 'pivotNormalizedColumn']\n };\n case 'pivotGroupedColumn':\n return pivotChartMenuItem('groupedColumn', 'Grouped‎', 'groupedColumn');\n case 'pivotStackedColumn':\n return pivotChartMenuItem('stackedColumn', 'Stacked‎', 'stackedColumn');\n case 'pivotNormalizedColumn':\n return pivotChartMenuItem('normalizedColumn', '100% Stacked‎', 'normalizedColumn');\n case 'rangeColumnChart':\n return {\n name: localeTextFunc('columnChart', 'Column'),\n subMenu: ['rangeGroupedColumn', 'rangeStackedColumn', 'rangeNormalizedColumn']\n };\n case 'rangeGroupedColumn':\n return rangeChartMenuItem('groupedColumn', 'Grouped‎', 'groupedColumn');\n case 'rangeStackedColumn':\n return rangeChartMenuItem('stackedColumn', 'Stacked‎', 'stackedColumn');\n case 'rangeNormalizedColumn':\n return rangeChartMenuItem('normalizedColumn', '100% Stacked‎', 'normalizedColumn');\n case 'pivotBarChart':\n return {\n name: localeTextFunc('barChart', 'Bar'),\n subMenu: ['pivotGroupedBar', 'pivotStackedBar', 'pivotNormalizedBar']\n };\n case 'pivotGroupedBar':\n return pivotChartMenuItem('groupedBar', 'Grouped‎', 'groupedBar');\n case 'pivotStackedBar':\n return pivotChartMenuItem('stackedBar', 'Stacked‎', 'stackedBar');\n case 'pivotNormalizedBar':\n return pivotChartMenuItem('normalizedBar', '100% Stacked‎', 'normalizedBar');\n case 'rangeBarChart':\n return {\n name: localeTextFunc('barChart', 'Bar'),\n subMenu: ['rangeGroupedBar', 'rangeStackedBar', 'rangeNormalizedBar']\n };\n case 'rangeGroupedBar':\n return rangeChartMenuItem('groupedBar', 'Grouped‎', 'groupedBar');\n case 'rangeStackedBar':\n return rangeChartMenuItem('stackedBar', 'Stacked‎', 'stackedBar');\n case 'rangeNormalizedBar':\n return rangeChartMenuItem('normalizedBar', '100% Stacked‎', 'normalizedBar');\n case 'pivotPieChart':\n return {\n name: localeTextFunc('pieChart', 'Pie'),\n subMenu: ['pivotPie', 'pivotDoughnut']\n };\n case 'pivotPie':\n return pivotChartMenuItem('pie', 'Pie‎', 'pie');\n case 'pivotDoughnut':\n return pivotChartMenuItem('doughnut', 'Doughnut‎', 'doughnut');\n case 'rangePieChart':\n return {\n name: localeTextFunc('pieChart', 'Pie'),\n subMenu: ['rangePie', 'rangeDoughnut']\n };\n case 'rangePie':\n return rangeChartMenuItem('pie', 'Pie‎', 'pie');\n case 'rangeDoughnut':\n return rangeChartMenuItem('doughnut', 'Doughnut‎', 'doughnut');\n case 'pivotLineChart':\n return pivotChartMenuItem('line', 'Line‎', 'line');\n case 'rangeLineChart':\n return rangeChartMenuItem('line', 'Line‎', 'line');\n case 'pivotXYChart':\n return {\n name: localeTextFunc('xyChart', 'X Y (Scatter)'),\n subMenu: ['pivotScatter', 'pivotBubble']\n };\n case 'pivotScatter':\n return pivotChartMenuItem('scatter', 'Scatter‎', 'scatter');\n case 'pivotBubble':\n return pivotChartMenuItem('bubble', 'Bubble‎', 'bubble');\n case 'rangeXYChart':\n return {\n name: localeTextFunc('xyChart', 'X Y (Scatter)'),\n subMenu: ['rangeScatter', 'rangeBubble']\n };\n case 'rangeScatter':\n return rangeChartMenuItem('scatter', 'Scatter‎', 'scatter');\n case 'rangeBubble':\n return rangeChartMenuItem('bubble', 'Bubble‎', 'bubble');\n case 'pivotAreaChart':\n return {\n name: localeTextFunc('areaChart', 'Area'),\n subMenu: ['pivotArea', 'pivotStackedArea', 'pivotNormalizedArea']\n };\n case 'pivotArea':\n return pivotChartMenuItem('area', 'Area‎', 'area');\n case 'pivotStackedArea':\n return pivotChartMenuItem('stackedArea', 'Stacked‎', 'stackedArea');\n case 'pivotNormalizedArea':\n return pivotChartMenuItem('normalizedArea', '100% Stacked‎', 'normalizedArea');\n case 'rangeAreaChart':\n return {\n name: localeTextFunc('areaChart', 'Area'),\n subMenu: ['rangeArea', 'rangeStackedArea', 'rangeNormalizedArea']\n };\n case 'rangeArea':\n return rangeChartMenuItem('area', 'Area‎', 'area');\n case 'rangeStackedArea':\n return rangeChartMenuItem('stackedArea', 'Stacked‎', 'stackedArea');\n case 'rangeNormalizedArea':\n return rangeChartMenuItem('normalizedArea', '100% Stacked‎', 'normalizedArea');\n case 'rangeHistogramChart':\n return rangeChartMenuItem('histogramChart', 'Histogram‎', 'histogram');\n case 'rangeColumnLineCombo':\n return rangeChartMenuItem('columnLineCombo', 'Column & Line‎', 'columnLineCombo');\n case 'rangeAreaColumnCombo':\n return rangeChartMenuItem('AreaColumnCombo', 'Area & Column‎', 'areaColumnCombo');\n case 'rangeCombinationChart':\n return {\n name: localeTextFunc('combinationChart', 'Combination'),\n subMenu: ['rangeColumnLineCombo', 'rangeAreaColumnCombo']\n };\n default:\n return null;\n }\n };\n MenuItemMapper.prototype.createAggregationSubMenu = function (column) {\n var _this = this;\n var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n var columnIsAlreadyAggValue = column.isValueActive();\n var funcNames = this.aggFuncService.getFuncNames(column);\n var columnToUse;\n if (column.isPrimary()) {\n columnToUse = column;\n }\n else {\n var pivotValueColumn = column.getColDef().pivotValueColumn;\n columnToUse = _.exists(pivotValueColumn) ? pivotValueColumn : undefined;\n }\n var result = [];\n funcNames.forEach(function (funcName) {\n result.push({\n name: localeTextFunc(funcName, funcName),\n action: function () {\n _this.columnModel.setColumnAggFunc(columnToUse, funcName, \"contextMenu\");\n _this.columnModel.addValueColumn(columnToUse, \"contextMenu\");\n },\n checked: columnIsAlreadyAggValue && columnToUse.getAggFunc() === funcName\n });\n });\n return result;\n };\n __decorate([\n Autowired('columnModel')\n ], MenuItemMapper.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired('gridApi')\n ], MenuItemMapper.prototype, \"gridApi\", void 0);\n __decorate([\n Optional('clipboardService')\n ], MenuItemMapper.prototype, \"clipboardService\", void 0);\n __decorate([\n Optional('aggFuncService')\n ], MenuItemMapper.prototype, \"aggFuncService\", void 0);\n __decorate([\n Optional('chartService')\n ], MenuItemMapper.prototype, \"chartService\", void 0);\n MenuItemMapper = __decorate([\n Bean('menuItemMapper')\n ], MenuItemMapper);\n return MenuItemMapper;\n}(BeanStub));\nexport { MenuItemMapper };\n","import { ModuleNames } from \"@ag-grid-community/core\";\nimport { EnterpriseCoreModule } from \"@ag-grid-enterprise/core\";\nimport { EnterpriseMenuFactory } from \"./menu/enterpriseMenu\";\nimport { ContextMenuFactory } from \"./menu/contextMenu\";\nimport { MenuItemMapper } from \"./menu/menuItemMapper\";\nexport var MenuModule = {\n moduleName: ModuleNames.MenuModule,\n beans: [EnterpriseMenuFactory, ContextMenuFactory, MenuItemMapper],\n dependantModules: [\n EnterpriseCoreModule\n ]\n};\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { ProvidedFilter, AgPromise, Autowired, AgGroupComponent, TabGuardComp, AgMenuItemComponent, PostConstruct, _ } from '@ag-grid-community/core';\nvar MultiFilter = /** @class */ (function (_super) {\n __extends(MultiFilter, _super);\n function MultiFilter() {\n var _this = _super.call(this, /* html */ \"
\") || this;\n _this.filterDefs = [];\n _this.filters = [];\n _this.guiDestroyFuncs = [];\n _this.activeFilterIndices = [];\n _this.lastActivatedMenuItem = null;\n _this.afterFiltersReadyFuncs = [];\n return _this;\n }\n MultiFilter.prototype.postConstruct = function () {\n var _this = this;\n this.initialiseTabGuard({\n onFocusIn: function (e) { return _this.onFocusIn(e); }\n });\n };\n MultiFilter.getFilterDefs = function (params) {\n var filters = params.filters;\n return filters && filters.length > 0 ?\n filters :\n [{ filter: 'agTextColumnFilter' }, { filter: 'agSetColumnFilter' }];\n };\n MultiFilter.prototype.init = function (params) {\n var _this = this;\n this.params = params;\n this.filterDefs = MultiFilter.getFilterDefs(params);\n var column = params.column, filterChangedCallback = params.filterChangedCallback;\n this.column = column;\n this.filterChangedCallback = filterChangedCallback;\n var filterPromises = [];\n this.filterDefs.forEach(function (filterDef, index) {\n var filterPromise = _this.createFilter(filterDef, index);\n if (filterPromise != null) {\n filterPromises.push(filterPromise);\n }\n });\n // we have to refresh the GUI here to ensure that Angular components are not rendered in odd places\n return AgPromise\n .all(filterPromises)\n .then(function (filters) {\n _this.filters = filters;\n _this.refreshGui('columnMenu');\n _this.afterFiltersReadyFuncs.forEach(function (f) { return f(); });\n _this.afterFiltersReadyFuncs.length = 0;\n });\n };\n MultiFilter.prototype.refreshGui = function (container) {\n var _this = this;\n if (container === this.lastOpenedInContainer) {\n return;\n }\n this.removeAllChildrenExceptTabGuards();\n this.destroyChildren();\n this.filters.forEach(function (filter, index) {\n if (index > 0) {\n _this.appendChild(_.loadTemplate(/* html */ \"
\"));\n }\n var filterDef = _this.filterDefs[index];\n var filterTitle = _this.getFilterTitle(filter, filterDef);\n var filterGui;\n if (filterDef.display === 'subMenu' && container !== 'toolPanel') {\n // prevent sub-menu being used in tool panel\n var menuItem = _this.insertFilterMenu(filter, filterTitle);\n filterGui = menuItem.getGui();\n }\n else if (filterDef.display === 'subMenu' || filterDef.display === 'accordion') {\n // sub-menus should appear as groups in the tool panel\n var group = _this.insertFilterGroup(filter, filterTitle);\n filterGui = group.getGui();\n }\n else {\n // display inline\n filterGui = filter.getGui();\n }\n _this.appendChild(filterGui);\n });\n this.lastOpenedInContainer = container;\n };\n MultiFilter.prototype.getFilterTitle = function (filter, filterDef) {\n if (filterDef.title != null) {\n return filterDef.title;\n }\n var filterWithoutType = filter;\n return typeof filterWithoutType.getFilterTitle === 'function' ? filterWithoutType.getFilterTitle() : 'Filter';\n };\n MultiFilter.prototype.destroyChildren = function () {\n this.guiDestroyFuncs.forEach(function (func) { return func(); });\n this.guiDestroyFuncs.length = 0;\n };\n MultiFilter.prototype.insertFilterMenu = function (filter, name) {\n var _this = this;\n var menuItem = this.createBean(new AgMenuItemComponent({\n name: name,\n subMenu: filter,\n cssClasses: ['ag-multi-filter-menu-item'],\n isCompact: true,\n isAnotherSubMenuOpen: function () { return false; },\n }));\n menuItem.setParentComponent(this);\n this.guiDestroyFuncs.push(function () { return _this.destroyBean(menuItem); });\n this.addManagedListener(menuItem, AgMenuItemComponent.EVENT_MENU_ITEM_ACTIVATED, function (event) {\n if (_this.lastActivatedMenuItem && _this.lastActivatedMenuItem !== event.menuItem) {\n _this.lastActivatedMenuItem.deactivate();\n }\n _this.lastActivatedMenuItem = event.menuItem;\n });\n menuItem.addGuiEventListener('focusin', function () { return menuItem.activate(); });\n menuItem.addGuiEventListener('focusout', function () {\n if (!menuItem.isSubMenuOpen()) {\n menuItem.deactivate();\n }\n });\n return menuItem;\n };\n MultiFilter.prototype.insertFilterGroup = function (filter, title) {\n var _this = this;\n var group = this.createBean(new AgGroupComponent({\n title: title,\n cssIdentifier: 'multi-filter',\n }));\n this.guiDestroyFuncs.push(function () { return _this.destroyBean(group); });\n group.addItem(filter.getGui());\n group.toggleGroupExpand(false);\n if (filter.afterGuiAttached) {\n var params_1 = { container: this.lastOpenedInContainer, suppressFocus: true };\n group.addManagedListener(group, AgGroupComponent.EVENT_EXPANDED, function () { return filter.afterGuiAttached(params_1); });\n }\n return group;\n };\n MultiFilter.prototype.isFilterActive = function () {\n return this.filters.some(function (filter) { return filter.isFilterActive(); });\n };\n MultiFilter.prototype.getLastActiveFilterIndex = function () {\n return this.activeFilterIndices.length > 0 ? this.activeFilterIndices[this.activeFilterIndices.length - 1] : null;\n };\n MultiFilter.prototype.doesFilterPass = function (params, filterToSkip) {\n var rowPasses = true;\n this.filters.forEach(function (filter) {\n if (!rowPasses || filter === filterToSkip || !filter.isFilterActive()) {\n return;\n }\n rowPasses = filter.doesFilterPass(params);\n });\n return rowPasses;\n };\n MultiFilter.prototype.getFilterType = function () {\n return 'multi';\n };\n MultiFilter.prototype.getModelFromUi = function () {\n var model = {\n filterType: this.getFilterType(),\n filterModels: this.filters.map(function (filter) {\n var providedFilter = filter;\n if (typeof providedFilter.getModelFromUi === 'function') {\n return providedFilter.getModelFromUi();\n }\n return null;\n })\n };\n return model;\n };\n MultiFilter.prototype.getModel = function () {\n if (!this.isFilterActive()) {\n return null;\n }\n var model = {\n filterType: this.getFilterType(),\n filterModels: this.filters.map(function (filter) {\n if (filter.isFilterActive()) {\n return filter.getModel();\n }\n return null;\n })\n };\n return model;\n };\n MultiFilter.prototype.setModel = function (model) {\n var _this = this;\n var setFilterModel = function (filter, filterModel) {\n return new AgPromise(function (resolve) {\n var promise = filter.setModel(filterModel);\n promise ? promise.then(function () { return resolve(); }) : resolve();\n });\n };\n var promises = [];\n if (model == null) {\n promises = this.filters.map(function (filter, index) {\n var res = setFilterModel(filter, null);\n _this.updateActiveList(index);\n return res;\n });\n }\n else {\n this.filters.forEach(function (filter, index) {\n var filterModel = model.filterModels.length > index ? model.filterModels[index] : null;\n var res = setFilterModel(filter, filterModel);\n promises.push(res);\n _this.updateActiveList(index);\n });\n }\n return AgPromise.all(promises).then(function () { });\n };\n MultiFilter.prototype.applyModel = function () {\n var result = false;\n this.filters.forEach(function (filter) {\n if (filter instanceof ProvidedFilter) {\n result = filter.applyModel() || result;\n }\n });\n return result;\n };\n MultiFilter.prototype.getChildFilterInstance = function (index) {\n return this.filters[index];\n };\n MultiFilter.prototype.afterGuiAttached = function (params) {\n if (params) {\n this.refreshGui(params.container);\n }\n var filters = this.params.filters;\n var suppressFocus = filters && filters.some(function (filter) { return filter.display && filter.display !== 'inline'; });\n this.executeFunctionIfExists('afterGuiAttached', __assign(__assign({}, params || {}), { suppressFocus: suppressFocus }));\n var eDocument = this.gridOptionsWrapper.getDocument();\n var activeEl = eDocument.activeElement;\n // if suppress focus is true, we might run into two scenarios:\n // 1 - we are loading the filter for the first time and the component isn't ready,\n // which means the document will have focus.\n // 2 - The focus will be somewhere inside the component due to auto focus\n // In both cases we need to force the focus somewhere valid but outside the filter.\n if (suppressFocus && (activeEl === eDocument.body || this.getGui().contains(activeEl))) {\n // reset focus to the top of the container, and blur\n this.forceFocusOutOfContainer(true);\n }\n };\n MultiFilter.prototype.onAnyFilterChanged = function () {\n this.executeFunctionIfExists('onAnyFilterChanged');\n };\n MultiFilter.prototype.onNewRowsLoaded = function () {\n this.executeFunctionIfExists('onNewRowsLoaded');\n };\n MultiFilter.prototype.destroy = function () {\n var _this = this;\n this.filters.forEach(function (filter) {\n filter.setModel(null);\n _this.destroyBean(filter);\n });\n this.filters.length = 0;\n this.destroyChildren();\n _super.prototype.destroy.call(this);\n };\n MultiFilter.prototype.executeFunctionIfExists = function (name) {\n var params = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n params[_i - 1] = arguments[_i];\n }\n // The first filter is always the \"dominant\" one. By iterating in reverse order we ensure the first filter\n // always gets the last say\n _.forEachReverse(this.filters, function (filter) {\n var func = filter[name];\n if (typeof func === 'function') {\n func.apply(filter, params);\n }\n });\n };\n MultiFilter.prototype.createFilter = function (filterDef, index) {\n var _this = this;\n var _a = this.params, filterModifiedCallback = _a.filterModifiedCallback, doesRowPassOtherFilter = _a.doesRowPassOtherFilter;\n var filterInstance;\n var filterParams = __assign(__assign({}, this.filterManager.createFilterParams(this.column, this.column.getColDef())), { filterModifiedCallback: filterModifiedCallback, filterChangedCallback: function (additionalEventAttributes) {\n _this.executeWhenAllFiltersReady(function () { return _this.filterChanged(index, additionalEventAttributes); });\n }, doesRowPassOtherFilter: function (node) {\n return doesRowPassOtherFilter(node) && _this.doesFilterPass({ node: node, data: node.data }, filterInstance);\n } });\n var compDetails = this.userComponentFactory.getFilterDetails(filterDef, filterParams, 'agTextColumnFilter');\n if (!compDetails) {\n return null;\n }\n var filterPromise = compDetails.newAgStackInstance();\n if (filterPromise) {\n filterPromise.then(function (filter) { return filterInstance = filter; });\n }\n return filterPromise;\n };\n MultiFilter.prototype.executeWhenAllFiltersReady = function (action) {\n if (this.filters && this.filters.length > 0) {\n action();\n }\n else {\n this.afterFiltersReadyFuncs.push(action);\n }\n };\n MultiFilter.prototype.updateActiveList = function (index) {\n var changedFilter = this.filters[index];\n _.removeFromArray(this.activeFilterIndices, index);\n if (changedFilter.isFilterActive()) {\n this.activeFilterIndices.push(index);\n }\n };\n MultiFilter.prototype.filterChanged = function (index, additionalEventAttributes) {\n this.updateActiveList(index);\n this.filterChangedCallback(additionalEventAttributes);\n var changedFilter = this.filters[index];\n this.filters.forEach(function (filter) {\n if (filter === changedFilter) {\n return;\n }\n if (typeof filter.onAnyFilterChanged === 'function') {\n filter.onAnyFilterChanged();\n }\n });\n };\n MultiFilter.prototype.onFocusIn = function (e) {\n if (this.lastActivatedMenuItem != null && !this.lastActivatedMenuItem.getGui().contains(e.target)) {\n this.lastActivatedMenuItem.deactivate();\n this.lastActivatedMenuItem = null;\n }\n return true;\n };\n __decorate([\n Autowired('filterManager')\n ], MultiFilter.prototype, \"filterManager\", void 0);\n __decorate([\n Autowired('userComponentFactory')\n ], MultiFilter.prototype, \"userComponentFactory\", void 0);\n __decorate([\n PostConstruct\n ], MultiFilter.prototype, \"postConstruct\", null);\n return MultiFilter;\n}(TabGuardComp));\nexport { MultiFilter };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Component, _, Autowired, AgPromise, } from '@ag-grid-community/core';\nimport { MultiFilter } from './multiFilter';\nvar MultiFloatingFilterComp = /** @class */ (function (_super) {\n __extends(MultiFloatingFilterComp, _super);\n function MultiFloatingFilterComp() {\n var _this = _super.call(this, /* html */ \"
\") || this;\n _this.floatingFilters = [];\n return _this;\n }\n MultiFloatingFilterComp.prototype.init = function (params) {\n var _this = this;\n this.params = params;\n var filterParams = params.filterParams;\n var floatingFilterPromises = [];\n MultiFilter.getFilterDefs(filterParams).forEach(function (filterDef, index) {\n var floatingFilterParams = __assign(__assign({}, params), { \n // set the parent filter instance for each floating filter to the relevant child filter instance\n parentFilterInstance: function (callback) {\n _this.parentMultiFilterInstance(function (parent) {\n var child = parent.getChildFilterInstance(index);\n if (child == null) {\n return;\n }\n callback(child);\n });\n } });\n var floatingFilterPromise = _this.createFloatingFilter(filterDef, floatingFilterParams);\n if (floatingFilterPromise != null) {\n floatingFilterPromises.push(floatingFilterPromise);\n }\n });\n return AgPromise.all(floatingFilterPromises).then(function (floatingFilters) {\n floatingFilters.forEach(function (floatingFilter, index) {\n _this.floatingFilters.push(floatingFilter);\n var gui = floatingFilter.getGui();\n _this.appendChild(gui);\n if (index > 0) {\n _.setDisplayed(gui, false);\n }\n });\n });\n };\n MultiFloatingFilterComp.prototype.onParentModelChanged = function (model, event) {\n var _this = this;\n // We don't want to update the floating filter if the floating filter caused the change,\n // because the UI is already in sync. if we didn't do this, the UI would behave strangely\n // as it would be updating as the user is typing\n if (event && event.afterFloatingFilter) {\n return;\n }\n this.parentMultiFilterInstance(function (parent) {\n if (model == null) {\n _this.floatingFilters.forEach(function (filter, i) {\n filter.onParentModelChanged(null, event);\n _.setDisplayed(filter.getGui(), i === 0);\n });\n }\n else {\n var lastActiveFloatingFilterIndex_1 = parent.getLastActiveFilterIndex();\n _this.floatingFilters.forEach(function (filter, i) {\n var filterModel = model.filterModels.length > i ? model.filterModels[i] : null;\n filter.onParentModelChanged(filterModel, event);\n var shouldShow = lastActiveFloatingFilterIndex_1 == null ? i === 0 : i === lastActiveFloatingFilterIndex_1;\n _.setDisplayed(filter.getGui(), shouldShow);\n });\n }\n });\n };\n MultiFloatingFilterComp.prototype.destroy = function () {\n this.destroyBeans(this.floatingFilters);\n this.floatingFilters.length = 0;\n _super.prototype.destroy.call(this);\n };\n MultiFloatingFilterComp.prototype.createFloatingFilter = function (filterDef, params) {\n var defaultComponentName = this.userComponentFactory.getDefaultFloatingFilterType(filterDef) || 'agTextColumnFloatingFilter';\n var compDetails = this.userComponentFactory.getFloatingFilterCompDetails(filterDef, params, defaultComponentName);\n return compDetails ? compDetails.newAgStackInstance() : null;\n };\n MultiFloatingFilterComp.prototype.parentMultiFilterInstance = function (cb) {\n this.params.parentFilterInstance(function (parent) {\n if (!(parent instanceof MultiFilter)) {\n throw new Error('AG Grid - MultiFloatingFilterComp expects MultiFilter as it\\'s parent');\n }\n cb(parent);\n });\n };\n __decorate([\n Autowired('userComponentFactory')\n ], MultiFloatingFilterComp.prototype, \"userComponentFactory\", void 0);\n return MultiFloatingFilterComp;\n}(Component));\nexport { MultiFloatingFilterComp };\n","import { ModuleNames } from '@ag-grid-community/core';\nimport { EnterpriseCoreModule } from '@ag-grid-enterprise/core';\nimport { MultiFilter } from './multiFilter/multiFilter';\nimport { MultiFloatingFilterComp } from './multiFilter/multiFloatingFilter';\nexport var MultiFilterModule = {\n moduleName: ModuleNames.MultiFilterModule,\n beans: [],\n userComponents: [\n { componentName: 'agMultiColumnFilter', componentClass: MultiFilter },\n { componentName: 'agMultiColumnFloatingFilter', componentClass: MultiFloatingFilterComp },\n ],\n dependantModules: [\n EnterpriseCoreModule\n ]\n};\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, Component } from \"@ag-grid-community/core\";\nvar RichSelectRow = /** @class */ (function (_super) {\n __extends(RichSelectRow, _super);\n function RichSelectRow(params) {\n var _this = _super.call(this, /* html */ \"
\") || this;\n _this.params = params;\n return _this;\n }\n RichSelectRow.prototype.setState = function (value, valueFormatted, selected) {\n var rendererSuccessful = this.populateWithRenderer(value, valueFormatted);\n if (!rendererSuccessful) {\n this.populateWithoutRenderer(value, valueFormatted);\n }\n this.addOrRemoveCssClass('ag-rich-select-row-selected', selected);\n };\n RichSelectRow.prototype.populateWithoutRenderer = function (value, valueFormatted) {\n var valueFormattedExits = valueFormatted !== null && valueFormatted !== undefined;\n var valueToRender = valueFormattedExits ? valueFormatted : value;\n if (_.exists(valueToRender) && valueToRender !== '') {\n // not using innerHTML to prevent injection of HTML\n // https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML#Security_considerations\n this.getGui().textContent = valueToRender.toString();\n }\n else {\n // putting in blank, so if missing, at least the user can click on it\n this.getGui().innerHTML = ' ';\n }\n };\n RichSelectRow.prototype.populateWithRenderer = function (value, valueFormatted) {\n var _this = this;\n // bad coder here - we are not populating all values of the cellRendererParams\n var params = {\n value: value,\n valueFormatted: valueFormatted,\n api: this.gridOptionsWrapper.getApi()\n };\n var compDetails = this.userComponentFactory.getCellRendererDetails(this.params, params);\n var cellRendererPromise = compDetails ? compDetails.newAgStackInstance() : undefined;\n if (cellRendererPromise != null) {\n _.bindCellRendererToHtmlElement(cellRendererPromise, this.getGui());\n }\n else {\n this.getGui().innerText = params.valueFormatted != null ? params.valueFormatted : params.value;\n }\n if (cellRendererPromise) {\n cellRendererPromise.then(function (childComponent) {\n _this.addDestroyFunc(function () {\n _this.getContext().destroyBean(childComponent);\n });\n });\n return true;\n }\n return false;\n };\n __decorate([\n Autowired('userComponentFactory')\n ], RichSelectRow.prototype, \"userComponentFactory\", void 0);\n return RichSelectRow;\n}(Component));\nexport { RichSelectRow };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, PopupComponent, RefSelector, VirtualList, KeyCode, _, } from \"@ag-grid-community/core\";\nimport { RichSelectRow } from \"./richSelectRow\";\nvar RichSelectCellEditor = /** @class */ (function (_super) {\n __extends(RichSelectCellEditor, _super);\n function RichSelectCellEditor() {\n var _this = _super.call(this, RichSelectCellEditor.TEMPLATE) || this;\n _this.selectionConfirmed = false;\n _this.searchString = '';\n return _this;\n }\n RichSelectCellEditor.prototype.init = function (params) {\n this.params = params;\n this.selectedValue = params.value;\n this.originalSelectedValue = params.value;\n this.focusAfterAttached = params.cellStartedEdit;\n var icon = _.createIconNoSpan('smallDown', this.gridOptionsWrapper);\n icon.classList.add('ag-rich-select-value-icon');\n this.eValue.appendChild(icon);\n this.virtualList = this.getContext().createBean(new VirtualList('rich-select'));\n this.virtualList.setComponentCreator(this.createRowComponent.bind(this));\n this.eList.appendChild(this.virtualList.getGui());\n if (_.exists(this.params.cellHeight)) {\n this.virtualList.setRowHeight(this.params.cellHeight);\n }\n this.renderSelectedValue();\n if (_.missing(params.values)) {\n console.warn('AG Grid: richSelectCellEditor requires values for it to work');\n return;\n }\n var values = params.values;\n this.virtualList.setModel({\n getRowCount: function () { return values.length; },\n getRow: function (index) { return values[index]; }\n });\n this.addGuiEventListener('keydown', this.onKeyDown.bind(this));\n var virtualListGui = this.virtualList.getGui();\n this.addManagedListener(virtualListGui, 'click', this.onClick.bind(this));\n this.addManagedListener(virtualListGui, 'mousemove', this.onMouseMove.bind(this));\n var debounceDelay = _.exists(params.searchDebounceDelay) ? params.searchDebounceDelay : 300;\n this.clearSearchString = _.debounce(this.clearSearchString, debounceDelay);\n if (_.exists(params.charPress)) {\n this.searchText(params.charPress);\n }\n };\n RichSelectCellEditor.prototype.onKeyDown = function (event) {\n var key = event.key;\n event.preventDefault();\n switch (key) {\n case KeyCode.ENTER:\n this.onEnterKeyDown();\n break;\n case KeyCode.TAB:\n this.confirmSelection();\n break;\n case KeyCode.DOWN:\n case KeyCode.UP:\n this.onNavigationKeyPressed(event, key);\n break;\n default:\n this.searchText(event);\n }\n };\n RichSelectCellEditor.prototype.confirmSelection = function () {\n this.selectionConfirmed = true;\n };\n RichSelectCellEditor.prototype.onEnterKeyDown = function () {\n this.confirmSelection();\n this.params.stopEditing();\n };\n RichSelectCellEditor.prototype.onNavigationKeyPressed = function (event, key) {\n // if we don't preventDefault the page body and/or grid scroll will move.\n event.preventDefault();\n var oldIndex = this.params.values.indexOf(this.selectedValue);\n var newIndex = key === KeyCode.UP ? oldIndex - 1 : oldIndex + 1;\n if (newIndex >= 0 && newIndex < this.params.values.length) {\n var valueToSelect = this.params.values[newIndex];\n this.setSelectedValue(valueToSelect);\n }\n };\n RichSelectCellEditor.prototype.searchText = function (key) {\n if (typeof key !== 'string') {\n var keyString = key.key;\n if (keyString === KeyCode.BACKSPACE) {\n this.searchString = this.searchString.slice(0, -1);\n keyString = '';\n }\n else if (!_.isEventFromPrintableCharacter(key)) {\n return;\n }\n this.searchText(keyString);\n return;\n }\n this.searchString += key;\n this.runSearch();\n this.clearSearchString();\n };\n RichSelectCellEditor.prototype.runSearch = function () {\n var _this = this;\n var values = this.params.values;\n var searchStrings;\n if (typeof values[0] === 'number' || typeof values[0] === 'string') {\n searchStrings = values.map(String);\n }\n if (typeof values[0] === 'object' && this.params.colDef.keyCreator) {\n searchStrings = values.map(function (value) {\n var keyParams = {\n value: value,\n colDef: _this.params.colDef,\n column: _this.params.column,\n node: _this.params.node,\n data: _this.params.data,\n api: _this.gridOptionsWrapper.getApi(),\n columnApi: _this.gridOptionsWrapper.getColumnApi(),\n context: _this.gridOptionsWrapper.getContext()\n };\n return _this.params.colDef.keyCreator(keyParams);\n });\n }\n if (!searchStrings) {\n return;\n }\n var topSuggestion = _.fuzzySuggestions(this.searchString, searchStrings, true, true)[0];\n if (!topSuggestion) {\n return;\n }\n var topSuggestionIndex = searchStrings.indexOf(topSuggestion);\n var topValue = values[topSuggestionIndex];\n this.setSelectedValue(topValue);\n };\n RichSelectCellEditor.prototype.clearSearchString = function () {\n this.searchString = '';\n };\n RichSelectCellEditor.prototype.renderSelectedValue = function () {\n var _this = this;\n var valueFormatted = this.params.formatValue(this.selectedValue);\n var eValue = this.eValue;\n var params = {\n value: this.selectedValue,\n valueFormatted: valueFormatted,\n api: this.gridOptionsWrapper.getApi()\n };\n var compDetails = this.userComponentFactory.getCellRendererDetails(this.params, params);\n var promise = compDetails ? compDetails.newAgStackInstance() : undefined;\n if (promise) {\n _.bindCellRendererToHtmlElement(promise, eValue);\n promise.then(function (renderer) {\n _this.addDestroyFunc(function () { return _this.getContext().destroyBean(renderer); });\n });\n }\n else {\n if (_.exists(this.selectedValue)) {\n eValue.innerHTML = valueFormatted;\n }\n else {\n _.clearElement(eValue);\n }\n }\n };\n RichSelectCellEditor.prototype.setSelectedValue = function (value) {\n if (this.selectedValue === value) {\n return;\n }\n var index = this.params.values.indexOf(value);\n if (index === -1) {\n return;\n }\n this.selectedValue = value;\n this.virtualList.ensureIndexVisible(index);\n this.virtualList.refresh();\n };\n RichSelectCellEditor.prototype.createRowComponent = function (value) {\n var valueFormatted = this.params.formatValue(value);\n var row = new RichSelectRow(this.params);\n this.getContext().createBean(row);\n row.setState(value, valueFormatted, value === this.selectedValue);\n return row;\n };\n RichSelectCellEditor.prototype.onMouseMove = function (mouseEvent) {\n var rect = this.virtualList.getGui().getBoundingClientRect();\n var scrollTop = this.virtualList.getScrollTop();\n var mouseY = mouseEvent.clientY - rect.top + scrollTop;\n var row = Math.floor(mouseY / this.virtualList.getRowHeight());\n var value = this.params.values[row];\n // not using utils.exist() as want empty string test to pass\n if (value !== undefined) {\n this.setSelectedValue(value);\n }\n };\n RichSelectCellEditor.prototype.onClick = function () {\n this.confirmSelection();\n this.params.stopEditing();\n };\n // we need to have the gui attached before we can draw the virtual rows, as the\n // virtual row logic needs info about the gui state\n RichSelectCellEditor.prototype.afterGuiAttached = function () {\n var selectedIndex = this.params.values.indexOf(this.selectedValue);\n // we have to call this here to get the list to have the right height, ie\n // otherwise it would not have scrolls yet and ensureIndexVisible would do nothing\n this.virtualList.refresh();\n if (selectedIndex >= 0) {\n this.virtualList.ensureIndexVisible(selectedIndex);\n }\n // we call refresh again, as the list could of moved, and we need to render the new rows\n this.virtualList.refresh();\n if (this.focusAfterAttached) {\n this.getGui().focus();\n }\n };\n RichSelectCellEditor.prototype.getValue = function () {\n // NOTE: we don't use valueParser for Set Filter. The user should provide values that are to be\n // set into the data. valueParser only really makese sense when the user is typing in text (not picking\n // form a set).\n return this.selectionConfirmed ? this.selectedValue : this.originalSelectedValue;\n };\n // tab index is needed so we can focus, which is needed for keyboard events\n RichSelectCellEditor.TEMPLATE = \"
\\n
\\n
\\n
\";\n __decorate([\n Autowired('userComponentFactory')\n ], RichSelectCellEditor.prototype, \"userComponentFactory\", void 0);\n __decorate([\n RefSelector('eValue')\n ], RichSelectCellEditor.prototype, \"eValue\", void 0);\n __decorate([\n RefSelector('eList')\n ], RichSelectCellEditor.prototype, \"eList\", void 0);\n return RichSelectCellEditor;\n}(PopupComponent));\nexport { RichSelectCellEditor };\n","import { ModuleNames } from \"@ag-grid-community/core\";\nimport { EnterpriseCoreModule } from \"@ag-grid-enterprise/core\";\nimport { RichSelectCellEditor } from \"./richSelect/richSelectCellEditor\";\nexport var RichSelectModule = {\n moduleName: ModuleNames.RichSelectModule,\n beans: [],\n userComponents: [\n { componentName: 'agRichSelect', componentClass: RichSelectCellEditor },\n { componentName: 'agRichSelectCellEditor', componentClass: RichSelectCellEditor }\n ],\n dependantModules: [\n EnterpriseCoreModule\n ]\n};\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, Bean, BeanStub, Constants, Events, NumberSequence, PostConstruct, PreDestroy, RowNode } from \"@ag-grid-community/core\";\nvar ServerSideRowModel = /** @class */ (function (_super) {\n __extends(ServerSideRowModel, _super);\n function ServerSideRowModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.pauseStoreUpdateListening = false;\n _this.started = false;\n return _this;\n }\n // we don't implement as lazy row heights is not supported in this row model\n ServerSideRowModel.prototype.ensureRowHeightsValid = function () { return false; };\n ServerSideRowModel.prototype.start = function () {\n this.started = true;\n var datasource = this.gridOptionsWrapper.getServerSideDatasource();\n if (datasource) {\n this.setDatasource(datasource);\n }\n };\n ServerSideRowModel.prototype.destroyDatasource = function () {\n if (!this.datasource) {\n return;\n }\n if (this.datasource.destroy) {\n this.datasource.destroy();\n }\n this.rowRenderer.datasourceChanged();\n this.datasource = undefined;\n };\n ServerSideRowModel.prototype.addEventListeners = function () {\n this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.onColumnEverything.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_STORE_UPDATED, this.onStoreUpdated.bind(this));\n var resetListener = this.resetRootStore.bind(this);\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_VALUE_CHANGED, resetListener);\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PIVOT_CHANGED, resetListener);\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_ROW_GROUP_CHANGED, resetListener);\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, resetListener);\n this.verifyProps();\n };\n ServerSideRowModel.prototype.verifyProps = function () {\n if (this.gridOptionsWrapper.getInitialGroupOrderComparator() != null) {\n var message_1 = \"AG Grid: initialGroupOrderComparator cannot be used with Server Side Row Model. If using Full Store, then provide the rows to the grid in the desired sort order. If using Partial Store, then sorting is done on the server side, nothing to do with the client.\";\n _.doOnce(function () { return console.warn(message_1); }, 'SSRM.InitialGroupOrderComparator');\n }\n if (this.gridOptionsWrapper.isRowSelection() && this.gridOptionsWrapper.getRowIdFunc() == null) {\n var message_2 = \"AG Grid: getRowId callback must be provided for Server Side Row Model selection to work correctly.\";\n _.doOnce(function () { return console.warn(message_2); }, 'SSRM.SelectionNeedsRowNodeIdFunc');\n }\n };\n ServerSideRowModel.prototype.setDatasource = function (datasource) {\n // sometimes React, due to async, can call gridApi.setDatasource() before we have started.\n // this happens when React app does this:\n // useEffect(() => setDatasource(ds), []);\n // thus if we set the datasource before the grid UI has finished initialising, we do not set it,\n // and the ssrm.start() method will set the datasoure when the grid is ready.\n if (!this.started) {\n return;\n }\n this.destroyDatasource();\n this.datasource = datasource;\n this.resetRootStore();\n };\n ServerSideRowModel.prototype.isLastRowIndexKnown = function () {\n var cache = this.getRootStore();\n if (!cache) {\n return false;\n }\n return cache.isLastRowIndexKnown();\n };\n ServerSideRowModel.prototype.onColumnEverything = function () {\n // this is a hack for one customer only, so they can suppress the resetting of the columns.\n // The problem the customer had was they were api.setColumnDefs() after the data source came\n // back with data. So this stops the reload from the grid after the data comes back.\n // Once we have \"AG-1591 Allow delta changes to columns\" fixed, then this hack can be taken out.\n if (this.gridOptionsWrapper.isSuppressEnterpriseResetOnNewColumns()) {\n return;\n }\n // every other customer can continue as normal and have it working!!!\n // if first time, alwasy reset\n if (!this.storeParams) {\n this.resetRootStore();\n return;\n }\n // check if anything pertaining to fetching data has changed, and if it has, reset, but if\n // it has not, don't reset\n var rowGroupColumnVos = this.columnsToValueObjects(this.columnModel.getRowGroupColumns());\n var valueColumnVos = this.columnsToValueObjects(this.columnModel.getValueColumns());\n var pivotColumnVos = this.columnsToValueObjects(this.columnModel.getPivotColumns());\n var sortModelDifferent = !_.jsonEquals(this.storeParams.sortModel, this.sortController.getSortModel());\n var rowGroupDifferent = !_.jsonEquals(this.storeParams.rowGroupCols, rowGroupColumnVos);\n var pivotDifferent = !_.jsonEquals(this.storeParams.pivotCols, pivotColumnVos);\n var valuesDifferent = !_.jsonEquals(this.storeParams.valueCols, valueColumnVos);\n var resetRequired = sortModelDifferent || rowGroupDifferent || pivotDifferent || valuesDifferent;\n if (resetRequired) {\n this.resetRootStore();\n }\n };\n ServerSideRowModel.prototype.destroyRootStore = function () {\n if (!this.rootNode || !this.rootNode.childStore) {\n return;\n }\n this.rootNode.childStore = this.destroyBean(this.rootNode.childStore);\n this.nodeManager.clear();\n };\n ServerSideRowModel.prototype.refreshAfterSort = function (newSortModel, params) {\n if (this.storeParams) {\n this.storeParams.sortModel = newSortModel;\n }\n var rootStore = this.getRootStore();\n if (!rootStore) {\n return;\n }\n rootStore.refreshAfterSort(params);\n this.onStoreUpdated();\n };\n ServerSideRowModel.prototype.resetRootStore = function () {\n this.destroyRootStore();\n this.rootNode = new RowNode(this.beans);\n this.rootNode.group = true;\n this.rootNode.level = -1;\n if (this.datasource) {\n this.storeParams = this.createStoreParams();\n this.rootNode.childStore = this.createBean(this.storeFactory.createStore(this.storeParams, this.rootNode));\n this.updateRowIndexesAndBounds();\n }\n // this event: 1) clears selection 2) updates filters 3) shows/hides 'no rows' overlay\n var rowDataChangedEvent = {\n type: Events.EVENT_ROW_DATA_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(rowDataChangedEvent);\n // this gets the row to render rows (or remove the previously rendered rows, as it's blank to start).\n // important to NOT pass in an event with keepRenderedRows or animate, as we want the renderer\n // to treat the rows as new rows, as it's all new data\n this.dispatchModelUpdated(true);\n };\n ServerSideRowModel.prototype.columnsToValueObjects = function (columns) {\n var _this = this;\n return columns.map(function (col) { return ({\n id: col.getId(),\n aggFunc: col.getAggFunc(),\n displayName: _this.columnModel.getDisplayNameForColumn(col, 'model'),\n field: col.getColDef().field\n }); });\n };\n ServerSideRowModel.prototype.createStoreParams = function () {\n var rowGroupColumnVos = this.columnsToValueObjects(this.columnModel.getRowGroupColumns());\n var valueColumnVos = this.columnsToValueObjects(this.columnModel.getValueColumns());\n var pivotColumnVos = this.columnsToValueObjects(this.columnModel.getPivotColumns());\n var dynamicRowHeight = this.gridOptionsWrapper.isDynamicRowHeight();\n var params = {\n // the columns the user has grouped and aggregated by\n valueCols: valueColumnVos,\n rowGroupCols: rowGroupColumnVos,\n pivotCols: pivotColumnVos,\n pivotMode: this.columnModel.isPivotMode(),\n // sort and filter model\n filterModel: this.filterManager.getFilterModel(),\n sortModel: this.sortListener.extractSortModel(),\n datasource: this.datasource,\n lastAccessedSequence: new NumberSequence(),\n // blockSize: blockSize == null ? 100 : blockSize,\n dynamicRowHeight: dynamicRowHeight\n };\n return params;\n };\n ServerSideRowModel.prototype.getParams = function () {\n return this.storeParams;\n };\n ServerSideRowModel.prototype.dispatchModelUpdated = function (reset) {\n if (reset === void 0) { reset = false; }\n var modelUpdatedEvent = {\n type: Events.EVENT_MODEL_UPDATED,\n api: this.gridApi,\n columnApi: this.columnApi,\n animate: !reset,\n keepRenderedRows: !reset,\n newPage: false,\n newData: false\n };\n this.eventService.dispatchEvent(modelUpdatedEvent);\n };\n ServerSideRowModel.prototype.onStoreUpdated = function () {\n // sometimes if doing a batch update, we do the batch first,\n // then call onStoreUpdated manually. eg expandAll() method.\n if (this.pauseStoreUpdateListening) {\n return;\n }\n this.updateRowIndexesAndBounds();\n this.dispatchModelUpdated();\n };\n ServerSideRowModel.prototype.onRowHeightChanged = function () {\n this.updateRowIndexesAndBounds();\n this.dispatchModelUpdated();\n };\n ServerSideRowModel.prototype.updateRowIndexesAndBounds = function () {\n var rootStore = this.getRootStore();\n if (!rootStore) {\n return;\n }\n rootStore.setDisplayIndexes(new NumberSequence(), { value: 0 });\n };\n ServerSideRowModel.prototype.retryLoads = function () {\n var rootStore = this.getRootStore();\n if (!rootStore) {\n return;\n }\n rootStore.retryLoads();\n this.onStoreUpdated();\n };\n ServerSideRowModel.prototype.getRow = function (index) {\n var rootStore = this.getRootStore();\n if (!rootStore) {\n return undefined;\n }\n return rootStore.getRowUsingDisplayIndex(index);\n };\n ServerSideRowModel.prototype.expandAll = function (value) {\n // if we don't pause store updating, we are needlessly\n // recalculating row-indexes etc, and also getting rendering\n // engine to re-render (listens on ModelUpdated event)\n this.pauseStoreUpdateListening = true;\n this.forEachNode(function (node) {\n if (node.group) {\n node.setExpanded(value);\n }\n });\n this.pauseStoreUpdateListening = false;\n this.onStoreUpdated();\n };\n ServerSideRowModel.prototype.refreshAfterFilter = function (newFilterModel, params) {\n if (this.storeParams) {\n this.storeParams.filterModel = newFilterModel;\n }\n var rootStore = this.getRootStore();\n if (!rootStore) {\n return;\n }\n rootStore.refreshAfterFilter(params);\n this.onStoreUpdated();\n };\n ServerSideRowModel.prototype.getRootStore = function () {\n if (this.rootNode && this.rootNode.childStore) {\n return this.rootNode.childStore;\n }\n };\n ServerSideRowModel.prototype.getRowCount = function () {\n var rootStore = this.getRootStore();\n if (!rootStore) {\n return 0;\n }\n return rootStore.getDisplayIndexEnd();\n };\n ServerSideRowModel.prototype.getTopLevelRowCount = function () {\n var rootStore = this.getRootStore();\n if (!rootStore) {\n return 1;\n }\n return rootStore.getRowCount();\n };\n ServerSideRowModel.prototype.getTopLevelRowDisplayedIndex = function (topLevelIndex) {\n var rootStore = this.getRootStore();\n if (!rootStore) {\n return topLevelIndex;\n }\n return rootStore.getTopLevelRowDisplayedIndex(topLevelIndex);\n };\n ServerSideRowModel.prototype.getRowBounds = function (index) {\n var rootStore = this.getRootStore();\n if (!rootStore) {\n var rowHeight = this.gridOptionsWrapper.getRowHeightAsNumber();\n return {\n rowTop: 0,\n rowHeight: rowHeight\n };\n }\n return rootStore.getRowBounds(index);\n };\n ServerSideRowModel.prototype.getRowIndexAtPixel = function (pixel) {\n var rootStore = this.getRootStore();\n if (pixel <= 0 || !rootStore) {\n return 0;\n }\n return rootStore.getRowIndexAtPixel(pixel);\n };\n ServerSideRowModel.prototype.isEmpty = function () {\n return false;\n };\n ServerSideRowModel.prototype.isRowsToRender = function () {\n return this.getRootStore() != null && this.getRowCount() > 0;\n };\n ServerSideRowModel.prototype.getType = function () {\n return Constants.ROW_MODEL_TYPE_SERVER_SIDE;\n };\n ServerSideRowModel.prototype.forEachNode = function (callback) {\n var rootStore = this.getRootStore();\n if (!rootStore) {\n return;\n }\n rootStore.forEachNodeDeep(callback);\n };\n ServerSideRowModel.prototype.forEachNodeAfterFilterAndSort = function (callback) {\n var rootStore = this.getRootStore();\n if (!rootStore) {\n return;\n }\n rootStore.forEachNodeDeepAfterFilterAndSort(callback);\n };\n ServerSideRowModel.prototype.executeOnStore = function (route, callback) {\n var rootStore = this.getRootStore();\n if (!rootStore) {\n return;\n }\n var storeToExecuteOn = rootStore.getChildStore(route);\n if (storeToExecuteOn) {\n callback(storeToExecuteOn);\n }\n };\n ServerSideRowModel.prototype.refreshStore = function (params) {\n if (params === void 0) { params = {}; }\n var route = params.route ? params.route : [];\n this.executeOnStore(route, function (store) { return store.refreshStore(params.purge == true); });\n };\n ServerSideRowModel.prototype.getStoreState = function () {\n var res = [];\n var rootStore = this.getRootStore();\n if (rootStore) {\n rootStore.addStoreStates(res);\n }\n return res;\n };\n ServerSideRowModel.prototype.getNodesInRangeForSelection = function (firstInRange, lastInRange) {\n if (_.exists(lastInRange) && firstInRange.parent !== lastInRange.parent) {\n return [];\n }\n return firstInRange.parent.childStore.getRowNodesInRange(lastInRange, firstInRange);\n };\n ServerSideRowModel.prototype.getRowNode = function (id) {\n var result;\n this.forEachNode(function (rowNode) {\n if (rowNode.id === id) {\n result = rowNode;\n }\n if (rowNode.detailNode && rowNode.detailNode.id === id) {\n result = rowNode.detailNode;\n }\n });\n return result;\n };\n ServerSideRowModel.prototype.isRowPresent = function (rowNode) {\n var foundRowNode = this.getRowNode(rowNode.id);\n return !!foundRowNode;\n };\n __decorate([\n Autowired('columnModel')\n ], ServerSideRowModel.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired('filterManager')\n ], ServerSideRowModel.prototype, \"filterManager\", void 0);\n __decorate([\n Autowired('sortController')\n ], ServerSideRowModel.prototype, \"sortController\", void 0);\n __decorate([\n Autowired('gridApi')\n ], ServerSideRowModel.prototype, \"gridApi\", void 0);\n __decorate([\n Autowired('columnApi')\n ], ServerSideRowModel.prototype, \"columnApi\", void 0);\n __decorate([\n Autowired('rowRenderer')\n ], ServerSideRowModel.prototype, \"rowRenderer\", void 0);\n __decorate([\n Autowired('ssrmSortService')\n ], ServerSideRowModel.prototype, \"sortListener\", void 0);\n __decorate([\n Autowired('ssrmNodeManager')\n ], ServerSideRowModel.prototype, \"nodeManager\", void 0);\n __decorate([\n Autowired('ssrmStoreFactory')\n ], ServerSideRowModel.prototype, \"storeFactory\", void 0);\n __decorate([\n Autowired('beans')\n ], ServerSideRowModel.prototype, \"beans\", void 0);\n __decorate([\n PreDestroy\n ], ServerSideRowModel.prototype, \"destroyDatasource\", null);\n __decorate([\n PostConstruct\n ], ServerSideRowModel.prototype, \"addEventListeners\", null);\n __decorate([\n PreDestroy\n ], ServerSideRowModel.prototype, \"destroyRootStore\", null);\n ServerSideRowModel = __decorate([\n Bean('rowModel')\n ], ServerSideRowModel);\n return ServerSideRowModel;\n}(BeanStub));\nexport { ServerSideRowModel };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, Bean, BeanStub } from \"@ag-grid-community/core\";\nvar StoreUtils = /** @class */ (function (_super) {\n __extends(StoreUtils, _super);\n function StoreUtils() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n StoreUtils.prototype.loadFromDatasource = function (p) {\n var storeParams = p.storeParams, parentBlock = p.parentBlock, parentNode = p.parentNode;\n var groupKeys = parentNode.getGroupKeys();\n if (!storeParams.datasource) {\n return;\n }\n var request = {\n startRow: p.startRow,\n endRow: p.endRow,\n rowGroupCols: storeParams.rowGroupCols,\n valueCols: storeParams.valueCols,\n pivotCols: storeParams.pivotCols,\n pivotMode: storeParams.pivotMode,\n groupKeys: groupKeys,\n filterModel: storeParams.filterModel,\n sortModel: storeParams.sortModel\n };\n var getRowsParams = {\n successCallback: p.successCallback,\n success: p.success,\n failCallback: p.failCallback,\n fail: p.fail,\n request: request,\n parentNode: p.parentNode,\n api: this.gridApi,\n columnApi: this.columnApi,\n context: this.gridOptionsWrapper.getContext()\n };\n window.setTimeout(function () {\n if (!storeParams.datasource || !parentBlock.isAlive()) {\n // failCallback() is important, to reduce the 'RowNodeBlockLoader.activeBlockLoadsCount' count\n p.failCallback();\n return;\n }\n storeParams.datasource.getRows(getRowsParams);\n }, 0);\n };\n StoreUtils.prototype.getChildStore = function (keys, currentCache, findNodeFunc) {\n if (_.missingOrEmpty(keys)) {\n return currentCache;\n }\n var nextKey = keys[0];\n var nextNode = findNodeFunc(nextKey);\n if (nextNode) {\n var keyListForNextLevel = keys.slice(1, keys.length);\n var nextStore = nextNode.childStore;\n return nextStore ? nextStore.getChildStore(keyListForNextLevel) : null;\n }\n return null;\n };\n StoreUtils.prototype.isServerRefreshNeeded = function (parentRowNode, rowGroupCols, params) {\n if (params.alwaysReset || params.valueColChanged || params.secondaryColChanged) {\n return true;\n }\n var level = parentRowNode.level + 1;\n var grouping = level < rowGroupCols.length;\n var leafNodes = !grouping;\n if (leafNodes) {\n return true;\n }\n var colIdThisGroup = rowGroupCols[level].id;\n var actionOnThisGroup = params.changedColumns.indexOf(colIdThisGroup) > -1;\n if (actionOnThisGroup) {\n return true;\n }\n return false;\n };\n __decorate([\n Autowired('columnApi')\n ], StoreUtils.prototype, \"columnApi\", void 0);\n __decorate([\n Autowired('gridApi')\n ], StoreUtils.prototype, \"gridApi\", void 0);\n StoreUtils = __decorate([\n Bean('ssrmStoreUtils')\n ], StoreUtils);\n return StoreUtils;\n}(BeanStub));\nexport { StoreUtils };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, Bean, BeanStub, PostConstruct, RowNode } from \"@ag-grid-community/core\";\nvar BlockUtils = /** @class */ (function (_super) {\n __extends(BlockUtils, _super);\n function BlockUtils() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n BlockUtils.prototype.postConstruct = function () {\n this.rowHeight = this.gridOptionsWrapper.getRowHeightAsNumber();\n this.usingTreeData = this.gridOptionsWrapper.isTreeData();\n this.usingMasterDetail = this.gridOptionsWrapper.isMasterDetail();\n };\n BlockUtils.prototype.createRowNode = function (params) {\n var rowNode = new RowNode(this.beans);\n var rowHeight = params.rowHeight != null ? params.rowHeight : this.rowHeight;\n rowNode.setRowHeight(rowHeight);\n rowNode.group = params.group;\n rowNode.leafGroup = params.leafGroup;\n rowNode.level = params.level;\n rowNode.uiLevel = params.level;\n rowNode.parent = params.parent;\n // stub gets set to true here, and then false when this rowNode gets it's data\n rowNode.stub = true;\n if (rowNode.group) {\n rowNode.expanded = false;\n rowNode.field = params.field;\n rowNode.rowGroupColumn = params.rowGroupColumn;\n }\n return rowNode;\n };\n BlockUtils.prototype.destroyRowNodes = function (rowNodes) {\n if (rowNodes) {\n rowNodes.forEach(this.destroyRowNode.bind(this));\n }\n };\n BlockUtils.prototype.destroyRowNode = function (rowNode) {\n if (rowNode.childStore) {\n this.destroyBean(rowNode.childStore);\n rowNode.childStore = null;\n }\n // this is needed, so row render knows to fade out the row, otherwise it\n // sees row top is present, and thinks the row should be shown. maybe\n // rowNode should have a flag on whether it is visible???\n rowNode.clearRowTopAndRowIndex();\n if (rowNode.id != null) {\n this.nodeManager.removeNode(rowNode);\n }\n };\n BlockUtils.prototype.setTreeGroupInfo = function (rowNode) {\n var isGroupFunc = this.gridOptionsWrapper.getIsServerSideGroupFunc();\n var getKeyFunc = this.gridOptionsWrapper.getServerSideGroupKeyFunc();\n if (isGroupFunc != null) {\n rowNode.setGroup(isGroupFunc(rowNode.data));\n if (rowNode.group && getKeyFunc != null) {\n rowNode.key = getKeyFunc(rowNode.data);\n }\n }\n if (!rowNode.group && rowNode.childStore != null) {\n this.destroyBean(rowNode.childStore);\n rowNode.childStore = null;\n }\n };\n BlockUtils.prototype.setRowGroupInfo = function (rowNode) {\n rowNode.key = this.valueService.getValue(rowNode.rowGroupColumn, rowNode);\n if (rowNode.key === null || rowNode.key === undefined) {\n _.doOnce(function () {\n console.warn(\"AG Grid: null and undefined values are not allowed for server side row model keys\");\n if (rowNode.rowGroupColumn) {\n console.warn(\"column = \" + rowNode.rowGroupColumn.getId());\n }\n console.warn(\"data is \", rowNode.data);\n }, 'ServerSideBlock-CannotHaveNullOrUndefinedForKey');\n }\n };\n BlockUtils.prototype.setMasterDetailInfo = function (rowNode) {\n var isMasterFunc = this.gridOptionsWrapper.getIsRowMasterFunc();\n if (isMasterFunc != null) {\n rowNode.master = isMasterFunc(rowNode.data);\n }\n else {\n rowNode.master = true;\n }\n };\n BlockUtils.prototype.updateDataIntoRowNode = function (rowNode, data) {\n rowNode.updateData(data);\n if (this.usingTreeData) {\n this.setTreeGroupInfo(rowNode);\n }\n else if (rowNode.group) {\n // it's not possible for a node to change whether it's a group or not\n // when doing row grouping (as only rows at certain levels are groups),\n // so nothing to do here\n }\n else if (this.usingMasterDetail) {\n // this should be implemented, however it's not the use case i'm currently\n // programming, so leaving for another day. to test this, create an example\n // where whether a master row is expandable or not is dynamic\n }\n };\n BlockUtils.prototype.setDataIntoRowNode = function (rowNode, data, defaultId, cachedRowHeight) {\n rowNode.stub = false;\n if (_.exists(data)) {\n rowNode.setDataAndId(data, defaultId);\n if (this.usingTreeData) {\n this.setTreeGroupInfo(rowNode);\n }\n else if (rowNode.group) {\n this.setRowGroupInfo(rowNode);\n }\n else if (this.usingMasterDetail) {\n this.setMasterDetailInfo(rowNode);\n }\n }\n else {\n rowNode.setDataAndId(undefined, undefined);\n rowNode.key = null;\n }\n if (this.usingTreeData || rowNode.group) {\n this.setGroupDataIntoRowNode(rowNode);\n this.setChildCountIntoRowNode(rowNode);\n }\n // this needs to be done AFTER setGroupDataIntoRowNode(), as the height can depend on the group data\n // getting set, if it's a group node and colDef.autoHeight=true\n if (_.exists(data)) {\n rowNode.setRowHeight(this.gridOptionsWrapper.getRowHeightForNode(rowNode, false, cachedRowHeight).height);\n }\n };\n BlockUtils.prototype.setChildCountIntoRowNode = function (rowNode) {\n var getChildCount = this.gridOptionsWrapper.getChildCountFunc();\n if (getChildCount) {\n rowNode.allChildrenCount = getChildCount(rowNode.data);\n }\n };\n BlockUtils.prototype.setGroupDataIntoRowNode = function (rowNode) {\n var _this = this;\n var groupDisplayCols = this.columnModel.getGroupDisplayColumns();\n var usingTreeData = this.gridOptionsWrapper.isTreeData();\n groupDisplayCols.forEach(function (col) {\n if (rowNode.groupData == null) {\n rowNode.groupData = {};\n }\n if (usingTreeData) {\n rowNode.groupData[col.getColId()] = rowNode.key;\n }\n else if (col.isRowGroupDisplayed(rowNode.rowGroupColumn.getId())) {\n var groupValue = _this.valueService.getValue(rowNode.rowGroupColumn, rowNode);\n rowNode.groupData[col.getColId()] = groupValue;\n }\n });\n };\n BlockUtils.prototype.clearDisplayIndex = function (rowNode) {\n rowNode.clearRowTopAndRowIndex();\n var hasChildStore = rowNode.group && _.exists(rowNode.childStore);\n if (hasChildStore) {\n var childStore = rowNode.childStore;\n childStore.clearDisplayIndexes();\n }\n var hasDetailNode = rowNode.master && rowNode.detailNode;\n if (hasDetailNode) {\n rowNode.detailNode.clearRowTopAndRowIndex();\n }\n };\n BlockUtils.prototype.setDisplayIndex = function (rowNode, displayIndexSeq, nextRowTop) {\n // set this row\n rowNode.setRowIndex(displayIndexSeq.next());\n rowNode.setRowTop(nextRowTop.value);\n nextRowTop.value += rowNode.rowHeight;\n // set child for master / detail\n var hasDetailRow = rowNode.master;\n if (hasDetailRow) {\n if (rowNode.expanded && rowNode.detailNode) {\n rowNode.detailNode.setRowIndex(displayIndexSeq.next());\n rowNode.detailNode.setRowTop(nextRowTop.value);\n nextRowTop.value += rowNode.detailNode.rowHeight;\n }\n else if (rowNode.detailNode) {\n rowNode.detailNode.clearRowTopAndRowIndex();\n }\n }\n // set children for SSRM child rows\n var hasChildStore = rowNode.group && _.exists(rowNode.childStore);\n if (hasChildStore) {\n var childStore = rowNode.childStore;\n if (rowNode.expanded) {\n childStore.setDisplayIndexes(displayIndexSeq, nextRowTop);\n }\n else {\n // we need to clear the row tops, as the row renderer depends on\n // this to know if the row should be faded out\n childStore.clearDisplayIndexes();\n }\n }\n };\n BlockUtils.prototype.binarySearchForDisplayIndex = function (displayRowIndex, rowNodes) {\n var bottomPointer = 0;\n var topPointer = rowNodes.length - 1;\n if (_.missing(topPointer) || _.missing(bottomPointer)) {\n console.warn(\"AG Grid: error: topPointer = \" + topPointer + \", bottomPointer = \" + bottomPointer);\n return undefined;\n }\n while (true) {\n var midPointer = Math.floor((bottomPointer + topPointer) / 2);\n var currentRowNode = rowNodes[midPointer];\n // first check current row for index\n if (currentRowNode.rowIndex === displayRowIndex) {\n return currentRowNode;\n }\n // then check if current row contains a detail row with the index\n var expandedMasterRow = currentRowNode.master && currentRowNode.expanded;\n var detailNode = currentRowNode.detailNode;\n if (expandedMasterRow && detailNode && detailNode.rowIndex === displayRowIndex) {\n return currentRowNode.detailNode;\n }\n // then check if child cache contains index\n var childStore = currentRowNode.childStore;\n if (currentRowNode.expanded && childStore && childStore.isDisplayIndexInStore(displayRowIndex)) {\n return childStore.getRowUsingDisplayIndex(displayRowIndex);\n }\n // otherwise adjust pointers to continue searching for index\n if (currentRowNode.rowIndex < displayRowIndex) {\n bottomPointer = midPointer + 1;\n }\n else if (currentRowNode.rowIndex > displayRowIndex) {\n topPointer = midPointer - 1;\n }\n else {\n console.warn(\"AG Grid: error: unable to locate rowIndex = \" + displayRowIndex + \" in cache\");\n return undefined;\n }\n }\n };\n BlockUtils.prototype.extractRowBounds = function (rowNode, index) {\n var extractRowBounds = function (currentRowNode) { return ({\n rowHeight: currentRowNode.rowHeight,\n rowTop: currentRowNode.rowTop\n }); };\n if (rowNode.rowIndex === index) {\n return extractRowBounds(rowNode);\n }\n if (rowNode.group && rowNode.expanded && _.exists(rowNode.childStore)) {\n var childStore = rowNode.childStore;\n if (childStore.isDisplayIndexInStore(index)) {\n return childStore.getRowBounds(index);\n }\n }\n else if (rowNode.master && rowNode.expanded && _.exists(rowNode.detailNode)) {\n if (rowNode.detailNode.rowIndex === index) {\n return extractRowBounds(rowNode.detailNode);\n }\n }\n };\n BlockUtils.prototype.getIndexAtPixel = function (rowNode, pixel) {\n // first check if pixel is in range of current row\n if (rowNode.isPixelInRange(pixel)) {\n return rowNode.rowIndex;\n }\n // then check if current row contains a detail row with pixel in range\n var expandedMasterRow = rowNode.master && rowNode.expanded;\n var detailNode = rowNode.detailNode;\n if (expandedMasterRow && detailNode && detailNode.isPixelInRange(pixel)) {\n return rowNode.detailNode.rowIndex;\n }\n // then check if it's a group row with a child cache with pixel in range\n if (rowNode.group && rowNode.expanded && _.exists(rowNode.childStore)) {\n var childStore = rowNode.childStore;\n if (childStore.isPixelInRange(pixel)) {\n return childStore.getRowIndexAtPixel(pixel);\n }\n }\n return null;\n // pixel is not within this row node or it's children / detail, so return undefined\n };\n BlockUtils.prototype.createNodeIdPrefix = function (parentRowNode) {\n var parts = [];\n var rowNode = parentRowNode;\n // pull keys from all parent nodes, but do not include the root node\n while (rowNode && rowNode.level >= 0) {\n parts.push(rowNode.key);\n rowNode = rowNode.parent;\n }\n if (parts.length > 0) {\n return parts.reverse().join('-');\n }\n // no prefix, so node id's are left as they are\n return undefined;\n };\n BlockUtils.prototype.checkOpenByDefault = function (rowNode) {\n if (!rowNode.isExpandable()) {\n return;\n }\n var userFunc = this.gridOptionsWrapper.getIsServerSideGroupOpenByDefaultFunc();\n if (!userFunc) {\n return;\n }\n var params = {\n data: rowNode.data,\n rowNode: rowNode\n };\n var userFuncRes = userFunc(params);\n if (userFuncRes) {\n // we do this in a timeout, so that we don't expand a row node while in the middle\n // of setting up rows, setting up rows is complex enough without another chunk of work\n // getting added to the call stack. this is also helpful as openByDefault may or may\n // not happen (so makes setting up rows more deterministic by expands never happening)\n // and also checkOpenByDefault is shard with both store types, so easier control how it\n // impacts things by keeping it in new VM turn.\n window.setTimeout(function () { return rowNode.setExpanded(true); }, 0);\n }\n };\n __decorate([\n Autowired('valueService')\n ], BlockUtils.prototype, \"valueService\", void 0);\n __decorate([\n Autowired('columnModel')\n ], BlockUtils.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired('ssrmNodeManager')\n ], BlockUtils.prototype, \"nodeManager\", void 0);\n __decorate([\n Autowired('beans')\n ], BlockUtils.prototype, \"beans\", void 0);\n __decorate([\n PostConstruct\n ], BlockUtils.prototype, \"postConstruct\", null);\n BlockUtils = __decorate([\n Bean('ssrmBlockUtils')\n ], BlockUtils);\n return BlockUtils;\n}(BeanStub));\nexport { BlockUtils };\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Bean, PreDestroy } from \"@ag-grid-community/core\";\nvar NodeManager = /** @class */ (function () {\n function NodeManager() {\n this.rowNodes = {};\n }\n NodeManager.prototype.addRowNode = function (rowNode) {\n var id = rowNode.id;\n if (this.rowNodes[id]) {\n console.warn(\"AG Grid: Duplicate node id \" + rowNode.id + \". Row ID's are provided via the getRowId() callback. Please modify the getRowId() callback code to provide unique row id values.\");\n console.warn('first instance', this.rowNodes[id].data);\n console.warn('second instance', rowNode.data);\n }\n this.rowNodes[id] = rowNode;\n };\n NodeManager.prototype.removeNode = function (rowNode) {\n var id = rowNode.id;\n if (this.rowNodes[id]) {\n this.rowNodes[id] = undefined;\n }\n };\n NodeManager.prototype.clear = function () {\n this.rowNodes = {};\n };\n __decorate([\n PreDestroy\n ], NodeManager.prototype, \"clear\", null);\n NodeManager = __decorate([\n Bean('ssrmNodeManager')\n ], NodeManager);\n return NodeManager;\n}());\nexport { NodeManager };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Bean, BeanStub, Events, PostConstruct, ServerSideTransactionResultStatus } from \"@ag-grid-community/core\";\nvar TransactionManager = /** @class */ (function (_super) {\n __extends(TransactionManager, _super);\n function TransactionManager() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.asyncTransactions = [];\n return _this;\n }\n TransactionManager.prototype.postConstruct = function () {\n // only want to be active if SSRM active, otherwise would be interfering with other row models\n if (!this.gridOptionsWrapper.isRowModelServerSide()) {\n return;\n }\n };\n TransactionManager.prototype.applyTransactionAsync = function (transaction, callback) {\n if (this.asyncTransactionsTimeout == null) {\n this.scheduleExecuteAsync();\n }\n this.asyncTransactions.push({ transaction: transaction, callback: callback });\n };\n TransactionManager.prototype.scheduleExecuteAsync = function () {\n var _this = this;\n var waitMillis = this.gridOptionsWrapper.getAsyncTransactionWaitMillis();\n this.asyncTransactionsTimeout = window.setTimeout(function () {\n _this.executeAsyncTransactions();\n }, waitMillis);\n };\n TransactionManager.prototype.executeAsyncTransactions = function () {\n var _this = this;\n if (!this.asyncTransactions) {\n return;\n }\n var resultFuncs = [];\n var resultsForEvent = [];\n var transactionsToRetry = [];\n var atLeastOneTransactionApplied = false;\n this.asyncTransactions.forEach(function (txWrapper) {\n var result;\n _this.serverSideRowModel.executeOnStore(txWrapper.transaction.route, function (cache) {\n result = cache.applyTransaction(txWrapper.transaction);\n });\n if (result == undefined) {\n result = { status: ServerSideTransactionResultStatus.StoreNotFound };\n }\n resultsForEvent.push(result);\n var retryTransaction = result.status == ServerSideTransactionResultStatus.StoreLoading;\n if (retryTransaction) {\n transactionsToRetry.push(txWrapper);\n return;\n }\n if (txWrapper.callback) {\n resultFuncs.push(function () { return txWrapper.callback(result); });\n }\n if (result.status === ServerSideTransactionResultStatus.Applied) {\n atLeastOneTransactionApplied = true;\n }\n });\n // do callbacks in next VM turn so it's async\n if (resultFuncs.length > 0) {\n window.setTimeout(function () {\n resultFuncs.forEach(function (func) { return func(); });\n }, 0);\n }\n this.asyncTransactionsTimeout = undefined;\n // this will be empty list if nothing to retry\n this.asyncTransactions = transactionsToRetry;\n if (atLeastOneTransactionApplied) {\n this.valueCache.onDataChanged();\n this.eventService.dispatchEvent({ type: Events.EVENT_STORE_UPDATED });\n }\n if (resultsForEvent.length > 0) {\n var event_1 = {\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi(),\n type: Events.EVENT_ASYNC_TRANSACTIONS_FLUSHED,\n results: resultsForEvent\n };\n this.eventService.dispatchEvent(event_1);\n }\n };\n TransactionManager.prototype.flushAsyncTransactions = function () {\n // the timeout could be missing, if we are flushing due to row data loaded\n if (this.asyncTransactionsTimeout != null) {\n clearTimeout(this.asyncTransactionsTimeout);\n }\n this.executeAsyncTransactions();\n };\n TransactionManager.prototype.applyTransaction = function (transaction) {\n var res;\n this.serverSideRowModel.executeOnStore(transaction.route, function (store) {\n res = store.applyTransaction(transaction);\n });\n if (res) {\n this.valueCache.onDataChanged();\n this.eventService.dispatchEvent({ type: Events.EVENT_STORE_UPDATED });\n return res;\n }\n else {\n return { status: ServerSideTransactionResultStatus.StoreNotFound };\n }\n };\n __decorate([\n Autowired('rowNodeBlockLoader')\n ], TransactionManager.prototype, \"rowNodeBlockLoader\", void 0);\n __decorate([\n Autowired('valueCache')\n ], TransactionManager.prototype, \"valueCache\", void 0);\n __decorate([\n Autowired('rowModel')\n ], TransactionManager.prototype, \"serverSideRowModel\", void 0);\n __decorate([\n PostConstruct\n ], TransactionManager.prototype, \"postConstruct\", null);\n TransactionManager = __decorate([\n Bean('ssrmTransactionManager')\n ], TransactionManager);\n return TransactionManager;\n}(BeanStub));\nexport { TransactionManager };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, BeanStub, Events, PostConstruct, RowNode, Bean } from \"@ag-grid-community/core\";\nvar ExpandListener = /** @class */ (function (_super) {\n __extends(ExpandListener, _super);\n function ExpandListener() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ExpandListener.prototype.postConstruct = function () {\n // only want to be active if SSRM active, otherwise would be interfering with other row models\n if (!this.gridOptionsWrapper.isRowModelServerSide()) {\n return;\n }\n this.addManagedListener(this.eventService, Events.EVENT_ROW_GROUP_OPENED, this.onRowGroupOpened.bind(this));\n };\n ExpandListener.prototype.onRowGroupOpened = function (event) {\n var rowNode = event.node;\n if (rowNode.expanded) {\n if (rowNode.master) {\n this.createDetailNode(rowNode);\n }\n else if (_.missing(rowNode.childStore)) {\n var storeParams = this.serverSideRowModel.getParams();\n rowNode.childStore = this.createBean(this.storeFactory.createStore(storeParams, rowNode));\n }\n }\n else if (this.gridOptionsWrapper.isPurgeClosedRowNodes() && _.exists(rowNode.childStore)) {\n rowNode.childStore = this.destroyBean(rowNode.childStore);\n }\n var storeUpdatedEvent = { type: Events.EVENT_STORE_UPDATED };\n this.eventService.dispatchEvent(storeUpdatedEvent);\n };\n ExpandListener.prototype.createDetailNode = function (masterNode) {\n if (_.exists(masterNode.detailNode)) {\n return masterNode.detailNode;\n }\n var detailNode = new RowNode(this.beans);\n detailNode.detail = true;\n detailNode.selectable = false;\n detailNode.parent = masterNode;\n if (_.exists(masterNode.id)) {\n detailNode.id = 'detail_' + masterNode.id;\n }\n detailNode.data = masterNode.data;\n detailNode.level = masterNode.level + 1;\n var defaultDetailRowHeight = 200;\n var rowHeight = this.gridOptionsWrapper.getRowHeightForNode(detailNode).height;\n detailNode.rowHeight = rowHeight ? rowHeight : defaultDetailRowHeight;\n masterNode.detailNode = detailNode;\n return detailNode;\n };\n __decorate([\n Autowired('rowModel')\n ], ExpandListener.prototype, \"serverSideRowModel\", void 0);\n __decorate([\n Autowired('ssrmStoreFactory')\n ], ExpandListener.prototype, \"storeFactory\", void 0);\n __decorate([\n Autowired('beans')\n ], ExpandListener.prototype, \"beans\", void 0);\n __decorate([\n PostConstruct\n ], ExpandListener.prototype, \"postConstruct\", null);\n ExpandListener = __decorate([\n Bean('ssrmExpandListener')\n ], ExpandListener);\n return ExpandListener;\n}(BeanStub));\nexport { ExpandListener };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, Bean, BeanStub, Constants, Events, PostConstruct } from \"@ag-grid-community/core\";\nvar SortListener = /** @class */ (function (_super) {\n __extends(SortListener, _super);\n function SortListener() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SortListener.prototype.postConstruct = function () {\n // only want to be active if SSRM active, otherwise would be interfering with other row models\n if (!this.gridOptionsWrapper.isRowModelServerSide()) {\n return;\n }\n this.addManagedListener(this.eventService, Events.EVENT_SORT_CHANGED, this.onSortChanged.bind(this));\n };\n SortListener.prototype.extractSortModel = function () {\n var sortModel = this.sortController.getSortModel();\n // when using tree data we just return the sort model with the 'ag-Grid-AutoColumn' as is, i.e not broken out\n // into it's constitute group columns as they are not defined up front and can vary per node.\n if (this.gridOptionsWrapper.isTreeData()) {\n return sortModel;\n }\n // it autoCol is active, we don't want to send this to the server. instead we want to\n // send the\n this.replaceAutoGroupColumnWithActualRowGroupColumns(sortModel);\n this.removeMultiColumnPrefixOnColumnIds(sortModel);\n return sortModel;\n };\n SortListener.prototype.removeMultiColumnPrefixOnColumnIds = function (sortModel) {\n if (this.gridOptionsWrapper.isGroupMultiAutoColumn()) {\n var multiColumnPrefix = Constants.GROUP_AUTO_COLUMN_ID + \"-\";\n for (var i = 0; i < sortModel.length; ++i) {\n if (sortModel[i].colId.indexOf(multiColumnPrefix) > -1) {\n sortModel[i].colId = sortModel[i].colId.substr(multiColumnPrefix.length);\n }\n }\n }\n };\n SortListener.prototype.replaceAutoGroupColumnWithActualRowGroupColumns = function (sortModel) {\n // find index of auto group column in sort model\n var autoGroupSortModel = sortModel.find(function (sm) { return sm.colId == Constants.GROUP_AUTO_COLUMN_ID; });\n // replace auto column with individual group columns\n if (autoGroupSortModel) {\n // remove auto group column\n var autoGroupIndex = sortModel.indexOf(autoGroupSortModel);\n _.removeFromArray(sortModel, autoGroupSortModel);\n var isNotInSortModel = function (col) { return sortModel.filter(function (sm) { return sm.colId === col.getColId(); }).length == 0; };\n var mapColumnToSortModel = function (col) { return ({ colId: col.getId(), sort: autoGroupSortModel.sort }); };\n var newModels = this.columnModel.getRowGroupColumns()\n .filter(isNotInSortModel)\n .map(mapColumnToSortModel);\n _.insertArrayIntoArray(sortModel, newModels, autoGroupIndex);\n }\n };\n SortListener.prototype.onSortChanged = function () {\n var storeParams = this.serverSideRowModel.getParams();\n if (!storeParams) {\n return;\n } // params is undefined if no datasource set\n var newSortModel = this.extractSortModel();\n var oldSortModel = storeParams.sortModel;\n var changedColumns = this.findChangedColumnsInSort(newSortModel, oldSortModel);\n var valueColChanged = this.listenerUtils.isSortingWithValueColumn(changedColumns);\n var secondaryColChanged = this.listenerUtils.isSortingWithSecondaryColumn(changedColumns);\n var alwaysReset = this.gridOptionsWrapper.isServerSideSortingAlwaysResets();\n var params = {\n valueColChanged: valueColChanged,\n secondaryColChanged: secondaryColChanged,\n alwaysReset: alwaysReset,\n changedColumns: changedColumns\n };\n this.serverSideRowModel.refreshAfterSort(newSortModel, params);\n };\n // returns back all the cols that were effected by the sorting. eg if we were sorting by col A,\n // and now we are sorting by col B, the list of impacted cols should be A and B. so if a cache\n // is impacted by sorting on A or B then it needs to be refreshed. this includes where the cache\n // was previously sorted by A and then the A sort now needs to be cleared.\n SortListener.prototype.findChangedColumnsInSort = function (newSortModel, oldSortModel) {\n var allColsInBothSorts = [];\n [newSortModel, oldSortModel].forEach(function (sortModel) {\n if (sortModel) {\n var ids = sortModel.map(function (sm) { return sm.colId; });\n allColsInBothSorts = allColsInBothSorts.concat(ids);\n }\n });\n var differentSorts = function (oldSortItem, newSortItem) {\n var oldSort = oldSortItem ? oldSortItem.sort : null;\n var newSort = newSortItem ? newSortItem.sort : null;\n return oldSort !== newSort;\n };\n var differentIndexes = function (oldSortItem, newSortItem) {\n var oldIndex = oldSortItem ? oldSortModel.indexOf(oldSortItem) : -1;\n var newIndex = newSortItem ? newSortModel.indexOf(newSortItem) : -1;\n return oldIndex !== newIndex;\n };\n return allColsInBothSorts.filter(function (colId) {\n var oldSortItem = oldSortModel.find(function (sm) { return sm.colId === colId; });\n var newSortItem = newSortModel.find(function (sm) { return sm.colId === colId; });\n return differentSorts(oldSortItem, newSortItem) || differentIndexes(oldSortItem, newSortItem);\n });\n };\n __decorate([\n Autowired('sortController')\n ], SortListener.prototype, \"sortController\", void 0);\n __decorate([\n Autowired('columnModel')\n ], SortListener.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired('rowModel')\n ], SortListener.prototype, \"serverSideRowModel\", void 0);\n __decorate([\n Autowired('ssrmListenerUtils')\n ], SortListener.prototype, \"listenerUtils\", void 0);\n __decorate([\n PostConstruct\n ], SortListener.prototype, \"postConstruct\", null);\n SortListener = __decorate([\n Bean('ssrmSortService')\n ], SortListener);\n return SortListener;\n}(BeanStub));\nexport { SortListener };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Bean, BeanStub, Events, PostConstruct } from \"@ag-grid-community/core\";\nvar FilterListener = /** @class */ (function (_super) {\n __extends(FilterListener, _super);\n function FilterListener() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n FilterListener.prototype.postConstruct = function () {\n // only want to be active if SSRM active, otherwise would be interfering with other row models\n if (!this.gridOptionsWrapper.isRowModelServerSide()) {\n return;\n }\n this.addManagedListener(this.eventService, Events.EVENT_FILTER_CHANGED, this.onFilterChanged.bind(this));\n };\n FilterListener.prototype.onFilterChanged = function () {\n var storeParams = this.serverSideRowModel.getParams();\n if (!storeParams) {\n return;\n } // params is undefined if no datasource set\n var newModel = this.filterManager.getFilterModel();\n var oldModel = storeParams ? storeParams.filterModel : {};\n var changedColumns = this.findChangedColumns(newModel, oldModel);\n var valueColChanged = this.listenerUtils.isSortingWithValueColumn(changedColumns);\n var secondaryColChanged = this.listenerUtils.isSortingWithSecondaryColumn(changedColumns);\n var alwaysReset = this.gridOptionsWrapper.isServerSideFilteringAlwaysResets();\n var params = {\n valueColChanged: valueColChanged,\n secondaryColChanged: secondaryColChanged,\n alwaysReset: alwaysReset,\n changedColumns: changedColumns\n };\n this.serverSideRowModel.refreshAfterFilter(newModel, params);\n };\n FilterListener.prototype.findChangedColumns = function (oldModel, newModel) {\n var allColKeysMap = {};\n Object.keys(oldModel).forEach(function (key) { return allColKeysMap[key] = true; });\n Object.keys(newModel).forEach(function (key) { return allColKeysMap[key] = true; });\n var res = [];\n Object.keys(allColKeysMap).forEach(function (key) {\n var oldJson = JSON.stringify(oldModel[key]);\n var newJson = JSON.stringify(newModel[key]);\n var filterChanged = oldJson != newJson;\n if (filterChanged) {\n res.push(key);\n }\n });\n return res;\n };\n __decorate([\n Autowired('rowModel')\n ], FilterListener.prototype, \"serverSideRowModel\", void 0);\n __decorate([\n Autowired('filterManager')\n ], FilterListener.prototype, \"filterManager\", void 0);\n __decorate([\n Autowired('ssrmListenerUtils')\n ], FilterListener.prototype, \"listenerUtils\", void 0);\n __decorate([\n PostConstruct\n ], FilterListener.prototype, \"postConstruct\", null);\n FilterListener = __decorate([\n Bean('ssrmFilterListener')\n ], FilterListener);\n return FilterListener;\n}(BeanStub));\nexport { FilterListener };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nimport { Autowired, NumberSequence, PostConstruct, PreDestroy, Qualifier, RowNodeBlock } from \"@ag-grid-community/core\";\nvar PartialStoreBlock = /** @class */ (function (_super) {\n __extends(PartialStoreBlock, _super);\n function PartialStoreBlock(blockNumber, parentRowNode, ssrmParams, storeParams, parentStore) {\n var _this = _super.call(this, blockNumber) || this;\n _this.ssrmParams = ssrmParams;\n _this.storeParams = storeParams;\n _this.parentRowNode = parentRowNode;\n // we don't need to calculate these now, as the inputs don't change,\n // however it makes the code easier to read if we work them out up front\n _this.startRow = blockNumber * storeParams.cacheBlockSize;\n _this.parentStore = parentStore;\n _this.level = parentRowNode.level + 1;\n _this.groupLevel = ssrmParams.rowGroupCols ? _this.level < ssrmParams.rowGroupCols.length : undefined;\n _this.leafGroup = ssrmParams.rowGroupCols ? _this.level === ssrmParams.rowGroupCols.length - 1 : false;\n return _this;\n }\n PartialStoreBlock.prototype.postConstruct = function () {\n this.usingTreeData = this.gridOptionsWrapper.isTreeData();\n if (!this.usingTreeData && this.groupLevel) {\n var groupColVo = this.ssrmParams.rowGroupCols[this.level];\n this.groupField = groupColVo.field;\n this.rowGroupColumn = this.columnModel.getRowGroupColumns()[this.level];\n }\n this.nodeIdPrefix = this.blockUtils.createNodeIdPrefix(this.parentRowNode);\n this.setData([]);\n };\n PartialStoreBlock.prototype.isDisplayIndexInBlock = function (displayIndex) {\n return displayIndex >= this.displayIndexStart && displayIndex < this.displayIndexEnd;\n };\n PartialStoreBlock.prototype.isBlockBefore = function (displayIndex) {\n return displayIndex >= this.displayIndexEnd;\n };\n PartialStoreBlock.prototype.getDisplayIndexStart = function () {\n return this.displayIndexStart;\n };\n PartialStoreBlock.prototype.getDisplayIndexEnd = function () {\n return this.displayIndexEnd;\n };\n PartialStoreBlock.prototype.getBlockHeightPx = function () {\n return this.blockHeightPx;\n };\n PartialStoreBlock.prototype.getBlockTopPx = function () {\n return this.blockTopPx;\n };\n PartialStoreBlock.prototype.isGroupLevel = function () {\n return this.groupLevel;\n };\n PartialStoreBlock.prototype.getGroupField = function () {\n return this.groupField;\n };\n PartialStoreBlock.prototype.prefixId = function (id) {\n if (this.nodeIdPrefix != null) {\n return this.nodeIdPrefix + '-' + id;\n }\n else {\n return id.toString();\n }\n };\n PartialStoreBlock.prototype.getBlockStateJson = function () {\n return {\n id: this.prefixId(this.getId()),\n state: {\n blockNumber: this.getId(),\n startRow: this.startRow,\n endRow: this.startRow + this.storeParams.cacheBlockSize,\n pageStatus: this.getState()\n }\n };\n };\n PartialStoreBlock.prototype.isAnyNodeOpen = function () {\n var openNodeCount = this.rowNodes.filter(function (node) { return node.expanded; }).length;\n return openNodeCount > 0;\n };\n // this method is repeated, see forEachRowNode, why?\n PartialStoreBlock.prototype.forEachNode = function (callback, sequence, includeChildren, filterAndSort) {\n if (sequence === void 0) { sequence = new NumberSequence(); }\n this.rowNodes.forEach(function (rowNode) {\n callback(rowNode, sequence.next());\n // this will only every happen for server side row model, as infinite\n // row model doesn't have groups\n if (includeChildren && rowNode.childStore) {\n var childStore = rowNode.childStore;\n if (filterAndSort) {\n childStore.forEachNodeDeepAfterFilterAndSort(callback, sequence);\n }\n else {\n childStore.forEachNodeDeep(callback, sequence);\n }\n }\n });\n };\n PartialStoreBlock.prototype.forEachNodeDeep = function (callback, sequence) {\n this.forEachNode(callback, sequence, true, false);\n };\n PartialStoreBlock.prototype.forEachNodeAfterFilterAndSort = function (callback, sequence) {\n this.forEachNode(callback, sequence, true, true);\n };\n PartialStoreBlock.prototype.forEachNodeShallow = function (callback, sequence) {\n this.forEachNode(callback, sequence, false, false);\n };\n PartialStoreBlock.prototype.getLastAccessed = function () {\n return this.lastAccessed;\n };\n PartialStoreBlock.prototype.getRowUsingLocalIndex = function (rowIndex) {\n return this.rowNodes[rowIndex - this.startRow];\n };\n PartialStoreBlock.prototype.touchLastAccessed = function () {\n this.lastAccessed = this.ssrmParams.lastAccessedSequence.next();\n };\n PartialStoreBlock.prototype.processServerFail = function () {\n this.parentStore.onBlockLoadFailed(this);\n };\n PartialStoreBlock.prototype.retryLoads = function () {\n if (this.getState() === RowNodeBlock.STATE_FAILED) {\n this.setStateWaitingToLoad();\n this.rowNodeBlockLoader.checkBlockToLoad();\n this.setData();\n }\n this.forEachNodeShallow(function (node) {\n if (node.childStore) {\n node.childStore.retryLoads();\n }\n });\n };\n PartialStoreBlock.prototype.processServerResult = function (params) {\n this.parentStore.onBlockLoaded(this, params);\n };\n PartialStoreBlock.prototype.setData = function (rows, failedLoad) {\n if (rows === void 0) { rows = []; }\n if (failedLoad === void 0) { failedLoad = false; }\n this.destroyRowNodes();\n var storeRowCount = this.parentStore.getRowCount();\n var startRow = this.getId() * this.storeParams.cacheBlockSize;\n var endRow = Math.min(startRow + this.storeParams.cacheBlockSize, storeRowCount);\n var rowsToCreate = endRow - startRow;\n // when using autoHeight, we default the row heights to a height to fill the old height of the block.\n // we only ever do this to autoHeight, as we could be setting invalid heights (especially if different\n // number of rows in the block due to a filter, less rows would mean bigger rows), and autoHeight is\n // the only pattern that will automatically correct this. we check for visible autoHeight cols,\n // to omit the case where all autoHeight cols are hidden.\n var showingAutoHeightCols = this.columnModel.getAllDisplayedAutoHeightCols().length > 0;\n var cachedBlockHeight = showingAutoHeightCols ? this.parentStore.getCachedBlockHeight(this.getId()) : undefined;\n var cachedRowHeight = cachedBlockHeight ? Math.round(cachedBlockHeight / rowsToCreate) : undefined;\n for (var i = 0; i < rowsToCreate; i++) {\n var rowNode = this.blockUtils.createRowNode({\n field: this.groupField,\n group: this.groupLevel,\n leafGroup: this.leafGroup,\n level: this.level,\n parent: this.parentRowNode,\n rowGroupColumn: this.rowGroupColumn,\n rowHeight: cachedRowHeight\n });\n var dataLoadedForThisRow = i < rows.length;\n if (dataLoadedForThisRow) {\n var data = rows[i];\n var defaultId = this.prefixId(this.startRow + i);\n this.blockUtils.setDataIntoRowNode(rowNode, data, defaultId, cachedRowHeight);\n var newId = rowNode.id;\n this.parentStore.removeDuplicateNode(newId);\n this.nodeManager.addRowNode(rowNode);\n this.allNodesMap[rowNode.id] = rowNode;\n this.blockUtils.checkOpenByDefault(rowNode);\n }\n this.rowNodes.push(rowNode);\n if (failedLoad) {\n rowNode.failedLoad = true;\n }\n }\n };\n // to safeguard the grid against duplicate nodes, when a row is loaded, we check\n // for another row in the same cache. if another row does exist, we delete it.\n // this covers for when user refreshes the store (which typically happens after a\n // data change) and the same row ends up coming back in a different block, and the\n // new block finishes refreshing before the old block has finished refreshing.\n PartialStoreBlock.prototype.removeDuplicateNode = function (id) {\n // we don't remove duplicates if this block is loaded, as that's a duplicate ID.\n // we are only interested in removing rows in blocks that are in the middle of a refresh,\n // ie two blocks, A and B, both are refreshed (as in the same cache) but A comes back\n // first and some rows have moved from B to A, we must remove the old rows from B.\n // however if B is not also getting refreshed (ie it's loaded) this is a bug\n // we need to tell the application about, as they provided duplicate ID's (done in Node Manager)\n if (this.getState() == RowNodeBlock.STATE_LOADED) {\n return;\n }\n var rowNode = this.allNodesMap[id];\n if (!rowNode) {\n return;\n }\n this.blockUtils.destroyRowNode(rowNode);\n var index = this.rowNodes.indexOf(rowNode);\n var stubRowNode = this.blockUtils.createRowNode({ field: this.groupField, group: this.groupLevel, leafGroup: this.leafGroup,\n level: this.level, parent: this.parentRowNode, rowGroupColumn: this.rowGroupColumn });\n this.rowNodes[index] = stubRowNode;\n };\n PartialStoreBlock.prototype.refresh = function () {\n if (this.getState() !== RowNodeBlock.STATE_WAITING_TO_LOAD) {\n this.setStateWaitingToLoad();\n }\n };\n PartialStoreBlock.prototype.destroyRowNodes = function () {\n this.blockUtils.destroyRowNodes(this.rowNodes);\n this.rowNodes = [];\n this.allNodesMap = {};\n };\n PartialStoreBlock.prototype.setBeans = function (loggerFactory) {\n this.logger = loggerFactory.create('ServerSideBlock');\n };\n PartialStoreBlock.prototype.getRowUsingDisplayIndex = function (displayRowIndex) {\n this.touchLastAccessed();\n var res = this.blockUtils.binarySearchForDisplayIndex(displayRowIndex, this.rowNodes);\n return res;\n };\n PartialStoreBlock.prototype.loadFromDatasource = function () {\n this.storeUtils.loadFromDatasource({\n startRow: this.startRow,\n endRow: this.startRow + this.storeParams.cacheBlockSize,\n parentBlock: this,\n parentNode: this.parentRowNode,\n storeParams: this.ssrmParams,\n successCallback: this.pageLoaded.bind(this, this.getVersion()),\n success: this.success.bind(this, this.getVersion()),\n failCallback: this.pageLoadFailed.bind(this, this.getVersion()),\n fail: this.pageLoadFailed.bind(this, this.getVersion())\n });\n };\n PartialStoreBlock.prototype.isPixelInRange = function (pixel) {\n return pixel >= this.blockTopPx && pixel < (this.blockTopPx + this.blockHeightPx);\n };\n PartialStoreBlock.prototype.getRowBounds = function (index) {\n var e_1, _a;\n this.touchLastAccessed();\n var res;\n try {\n for (var _b = __values(this.rowNodes), _c = _b.next(); !_c.done; _c = _b.next()) {\n var rowNode = _c.value;\n res = this.blockUtils.extractRowBounds(rowNode, index);\n if (res != null) {\n break;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return res;\n };\n PartialStoreBlock.prototype.getRowIndexAtPixel = function (pixel) {\n var e_2, _a;\n this.touchLastAccessed();\n var res = null;\n try {\n for (var _b = __values(this.rowNodes), _c = _b.next(); !_c.done; _c = _b.next()) {\n var rowNode = _c.value;\n res = this.blockUtils.getIndexAtPixel(rowNode, pixel);\n if (res != null) {\n break;\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return res;\n };\n PartialStoreBlock.prototype.clearDisplayIndexes = function () {\n var _this = this;\n this.displayIndexEnd = undefined;\n this.displayIndexStart = undefined;\n this.rowNodes.forEach(function (rowNode) { return _this.blockUtils.clearDisplayIndex(rowNode); });\n };\n PartialStoreBlock.prototype.setDisplayIndexes = function (displayIndexSeq, nextRowTop) {\n var _this = this;\n this.displayIndexStart = displayIndexSeq.peek();\n this.blockTopPx = nextRowTop.value;\n this.rowNodes.forEach(function (rowNode) { return _this.blockUtils.setDisplayIndex(rowNode, displayIndexSeq, nextRowTop); });\n this.displayIndexEnd = displayIndexSeq.peek();\n this.blockHeightPx = nextRowTop.value - this.blockTopPx;\n };\n __decorate([\n Autowired('columnModel')\n ], PartialStoreBlock.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired('ssrmStoreUtils')\n ], PartialStoreBlock.prototype, \"storeUtils\", void 0);\n __decorate([\n Autowired('ssrmBlockUtils')\n ], PartialStoreBlock.prototype, \"blockUtils\", void 0);\n __decorate([\n Autowired('ssrmNodeManager')\n ], PartialStoreBlock.prototype, \"nodeManager\", void 0);\n __decorate([\n Autowired('rowNodeBlockLoader')\n ], PartialStoreBlock.prototype, \"rowNodeBlockLoader\", void 0);\n __decorate([\n PostConstruct\n ], PartialStoreBlock.prototype, \"postConstruct\", null);\n __decorate([\n PreDestroy\n ], PartialStoreBlock.prototype, \"destroyRowNodes\", null);\n __decorate([\n __param(0, Qualifier('loggerFactory'))\n ], PartialStoreBlock.prototype, \"setBeans\", null);\n return PartialStoreBlock;\n}(RowNodeBlock));\nexport { PartialStoreBlock };\n","import { Constants, AgPromise, TextFilter, EventService, _ } from '@ag-grid-community/core';\nimport { ClientSideValuesExtractor } from '../clientSideValueExtractor';\nexport var SetFilterModelValuesType;\n(function (SetFilterModelValuesType) {\n SetFilterModelValuesType[SetFilterModelValuesType[\"PROVIDED_LIST\"] = 0] = \"PROVIDED_LIST\";\n SetFilterModelValuesType[SetFilterModelValuesType[\"PROVIDED_CALLBACK\"] = 1] = \"PROVIDED_CALLBACK\";\n SetFilterModelValuesType[SetFilterModelValuesType[\"TAKEN_FROM_GRID_VALUES\"] = 2] = \"TAKEN_FROM_GRID_VALUES\";\n})(SetFilterModelValuesType || (SetFilterModelValuesType = {}));\nvar NULL_SUBSTITUTE = '____';\nvar SetValueModel = /** @class */ (function () {\n function SetValueModel(filterParams, setIsLoading, valueFormatterService, translate, caseFormat) {\n var _this = this;\n this.filterParams = filterParams;\n this.setIsLoading = setIsLoading;\n this.valueFormatterService = valueFormatterService;\n this.translate = translate;\n this.caseFormat = caseFormat;\n this.localEventService = new EventService();\n this.miniFilterText = null;\n // The lookup for a set is much faster than the lookup for an array, especially when the length of the array is\n // thousands of records long, so where lookups are important we use a set.\n /** Values provided to the filter for use. */\n this.providedValues = null;\n /** All possible values for the filter, sorted if required. */\n this.allValues = [];\n /** Remaining values when filters from other columns have been applied. */\n this.availableValues = new Set();\n /** All values that are currently displayed, after the mini-filter has been applied. */\n this.displayedValues = [];\n /** Values that have been selected for this filter. */\n this.selectedValues = new Set();\n this.initialised = false;\n var column = filterParams.column, colDef = filterParams.colDef, textFormatter = filterParams.textFormatter, doesRowPassOtherFilter = filterParams.doesRowPassOtherFilter, suppressSorting = filterParams.suppressSorting, comparator = filterParams.comparator, rowModel = filterParams.rowModel, values = filterParams.values, caseSensitive = filterParams.caseSensitive;\n this.column = column;\n this.formatter = textFormatter || TextFilter.DEFAULT_FORMATTER;\n this.doesRowPassOtherFilters = doesRowPassOtherFilter;\n this.suppressSorting = suppressSorting || false;\n this.comparator = comparator || colDef.comparator || _.defaultComparator;\n if (rowModel.getType() === Constants.ROW_MODEL_TYPE_CLIENT_SIDE) {\n this.clientSideValuesExtractor = new ClientSideValuesExtractor(rowModel, this.filterParams, this.caseFormat);\n }\n if (values == null) {\n this.valuesType = SetFilterModelValuesType.TAKEN_FROM_GRID_VALUES;\n }\n else {\n this.valuesType = Array.isArray(values) ?\n SetFilterModelValuesType.PROVIDED_LIST :\n SetFilterModelValuesType.PROVIDED_CALLBACK;\n this.providedValues = values;\n }\n this.updateAllValues().then(function (updatedValues) { return _this.resetSelectionState(updatedValues || []); });\n }\n SetValueModel.prototype.addEventListener = function (eventType, listener, async) {\n this.localEventService.addEventListener(eventType, listener, async);\n };\n SetValueModel.prototype.removeEventListener = function (eventType, listener, async) {\n this.localEventService.removeEventListener(eventType, listener, async);\n };\n /**\n * Re-fetches the values used in the filter from the value source.\n * If keepSelection is false, the filter selection will be reset to everything selected,\n * otherwise the current selection will be preserved.\n */\n SetValueModel.prototype.refreshValues = function () {\n var currentModel = this.getModel();\n this.updateAllValues();\n // ensure model is updated for new values\n return this.setModel(currentModel);\n };\n /**\n * Overrides the current values being used for the set filter.\n * If keepSelection is false, the filter selection will be reset to everything selected,\n * otherwise the current selection will be preserved.\n */\n SetValueModel.prototype.overrideValues = function (valuesToUse) {\n var _this = this;\n return new AgPromise(function (resolve) {\n // wait for any existing values to be populated before overriding\n _this.allValuesPromise.then(function () {\n _this.valuesType = SetFilterModelValuesType.PROVIDED_LIST;\n _this.providedValues = valuesToUse;\n _this.refreshValues().then(function () { return resolve(); });\n });\n });\n };\n SetValueModel.prototype.refreshAfterAnyFilterChanged = function () {\n var _this = this;\n return this.showAvailableOnly() ?\n this.allValuesPromise.then(function (values) { return _this.updateAvailableValues(values || []); }) :\n AgPromise.resolve();\n };\n SetValueModel.prototype.isInitialised = function () {\n return this.initialised;\n };\n SetValueModel.prototype.updateAllValues = function () {\n var _this = this;\n this.allValuesPromise = new AgPromise(function (resolve) {\n switch (_this.valuesType) {\n case SetFilterModelValuesType.TAKEN_FROM_GRID_VALUES:\n case SetFilterModelValuesType.PROVIDED_LIST: {\n var values = _this.valuesType === SetFilterModelValuesType.TAKEN_FROM_GRID_VALUES ?\n _this.getValuesFromRows(false) :\n _.values(_this.uniqueValues(_.toStrings(_this.providedValues) || []));\n var sortedValues = _this.sortValues(values || []);\n _this.allValues = sortedValues;\n resolve(sortedValues);\n break;\n }\n case SetFilterModelValuesType.PROVIDED_CALLBACK: {\n _this.setIsLoading(true);\n var callback_1 = _this.providedValues;\n var _a = _this.filterParams, columnApi = _a.columnApi, api = _a.api, context = _a.context, column = _a.column, colDef = _a.colDef;\n var params_1 = {\n success: function (values) {\n var processedValues = _.values(_this.uniqueValues(_.toStrings(values) || []));\n _this.setIsLoading(false);\n var sortedValues = _this.sortValues(processedValues || []);\n _this.allValues = sortedValues;\n resolve(sortedValues);\n },\n colDef: colDef,\n column: column,\n columnApi: columnApi,\n api: api,\n context: context,\n };\n window.setTimeout(function () { return callback_1(params_1); }, 0);\n break;\n }\n default:\n throw new Error('Unrecognised valuesType');\n }\n });\n this.allValuesPromise.then(function (values) { return _this.updateAvailableValues(values || []); }).then(function () { return _this.initialised = true; });\n return this.allValuesPromise;\n };\n SetValueModel.prototype.setValuesType = function (value) {\n this.valuesType = value;\n };\n SetValueModel.prototype.getValuesType = function () {\n return this.valuesType;\n };\n SetValueModel.prototype.isValueAvailable = function (value) {\n return this.availableValues.has(value);\n };\n SetValueModel.prototype.showAvailableOnly = function () {\n return this.valuesType === SetFilterModelValuesType.TAKEN_FROM_GRID_VALUES;\n };\n SetValueModel.prototype.updateAvailableValues = function (allValues) {\n var availableValues = this.showAvailableOnly() ? this.sortValues(this.getValuesFromRows(true)) : allValues;\n this.availableValues = _.convertToSet(availableValues);\n this.localEventService.dispatchEvent({ type: SetValueModel.EVENT_AVAILABLE_VALUES_CHANGED });\n this.updateDisplayedValues();\n };\n SetValueModel.prototype.sortValues = function (values) {\n if (this.suppressSorting) {\n return values;\n }\n if (!this.filterParams.excelMode || values.indexOf(null) < 0) {\n return values.sort(this.comparator);\n }\n // ensure the blank value always appears last\n return values.filter(function (v) { return v != null; }).sort(this.comparator).concat(null);\n };\n SetValueModel.prototype.getValuesFromRows = function (removeUnavailableValues) {\n var _this = this;\n if (removeUnavailableValues === void 0) { removeUnavailableValues = false; }\n if (!this.clientSideValuesExtractor) {\n console.error('AG Grid: Set Filter cannot initialise because you are using a row model that does not contain all rows in the browser. Either use a different filter type, or configure Set Filter such that you provide it with values');\n return [];\n }\n var predicate = function (node) { return (!removeUnavailableValues || _this.doesRowPassOtherFilters(node)); };\n return this.clientSideValuesExtractor.extractUniqueValues(predicate);\n };\n /** Sets mini filter value. Returns true if it changed from last value, otherwise false. */\n SetValueModel.prototype.setMiniFilter = function (value) {\n value = _.makeNull(value);\n if (this.miniFilterText === value) {\n //do nothing if filter has not changed\n return false;\n }\n this.miniFilterText = value;\n this.updateDisplayedValues();\n return true;\n };\n SetValueModel.prototype.getMiniFilter = function () {\n return this.miniFilterText;\n };\n SetValueModel.prototype.updateDisplayedValues = function () {\n var _this = this;\n // if no filter, just display all available values\n if (this.miniFilterText == null) {\n this.displayedValues = _.values(this.availableValues);\n return;\n }\n // if filter present, we filter down the list\n this.displayedValues = [];\n // to allow for case insensitive searches, upper-case both filter text and value\n var formattedFilterText = this.caseFormat(this.formatter(this.miniFilterText) || '');\n var matchesFilter = function (valueToCheck) {\n return valueToCheck != null && _this.caseFormat(valueToCheck).indexOf(formattedFilterText) >= 0;\n };\n this.availableValues.forEach(function (value) {\n if (value == null) {\n if (_this.filterParams.excelMode && matchesFilter(_this.translate('blanks'))) {\n _this.displayedValues.push(value);\n }\n }\n else {\n var textFormatterValue = _this.formatter(value);\n // TODO: should this be applying the text formatter *after* the value formatter?\n var valueFormatterValue = _this.valueFormatterService.formatValue(_this.column, null, textFormatterValue, _this.filterParams.valueFormatter, false);\n if (matchesFilter(textFormatterValue) || matchesFilter(valueFormatterValue)) {\n _this.displayedValues.push(value);\n }\n }\n });\n };\n SetValueModel.prototype.getDisplayedValueCount = function () {\n return this.displayedValues.length;\n };\n SetValueModel.prototype.getDisplayedValue = function (index) {\n return this.displayedValues[index];\n };\n SetValueModel.prototype.hasSelections = function () {\n return this.filterParams.defaultToNothingSelected ?\n this.selectedValues.size > 0 :\n this.allValues.length !== this.selectedValues.size;\n };\n SetValueModel.prototype.getValues = function () {\n return this.allValues.slice();\n };\n SetValueModel.prototype.selectAllMatchingMiniFilter = function (clearExistingSelection) {\n var _this = this;\n if (clearExistingSelection === void 0) { clearExistingSelection = false; }\n if (this.miniFilterText == null) {\n // ensure everything is selected\n this.selectedValues = _.convertToSet(this.allValues);\n }\n else {\n // ensure everything that matches the mini filter is selected\n if (clearExistingSelection) {\n this.selectedValues.clear();\n }\n this.displayedValues.forEach(function (value) { return _this.selectedValues.add(value); });\n }\n };\n SetValueModel.prototype.deselectAllMatchingMiniFilter = function () {\n var _this = this;\n if (this.miniFilterText == null) {\n // ensure everything is deselected\n this.selectedValues.clear();\n }\n else {\n // ensure everything that matches the mini filter is deselected\n this.displayedValues.forEach(function (value) { return _this.selectedValues.delete(value); });\n }\n };\n SetValueModel.prototype.selectValue = function (value) {\n this.selectedValues.add(value);\n };\n SetValueModel.prototype.deselectValue = function (value) {\n if (this.filterParams.excelMode && this.isEverythingVisibleSelected()) {\n // ensure we're starting from the correct \"everything selected\" state\n this.resetSelectionState(this.displayedValues);\n }\n this.selectedValues.delete(value);\n };\n SetValueModel.prototype.isValueSelected = function (value) {\n return this.selectedValues.has(value);\n };\n SetValueModel.prototype.isEverythingVisibleSelected = function () {\n var _this = this;\n return this.displayedValues.filter(function (it) { return _this.isValueSelected(it); }).length === this.displayedValues.length;\n };\n SetValueModel.prototype.isNothingVisibleSelected = function () {\n var _this = this;\n return this.displayedValues.filter(function (it) { return _this.isValueSelected(it); }).length === 0;\n };\n SetValueModel.prototype.getModel = function () {\n return this.hasSelections() ? _.values(this.selectedValues) : null;\n };\n SetValueModel.prototype.setModel = function (model) {\n var _this = this;\n return this.allValuesPromise.then(function (values) {\n if (model == null) {\n _this.resetSelectionState(values || []);\n }\n else {\n // select all values from the model that exist in the filter\n _this.selectedValues.clear();\n var allValues_1 = _this.uniqueValues(values || []);\n model.forEach(function (value) {\n var allValue = allValues_1[_this.uniqueKey(value)];\n if (allValue !== undefined) {\n _this.selectedValues.add(allValue);\n }\n });\n }\n });\n };\n SetValueModel.prototype.uniqueValues = function (values) {\n var _this = this;\n // Honour case-sensitivity setting for matching purposes here, preserving original casing\n // in the selectedValues output.\n var uniqueValues = {};\n (values || []).forEach(function (rawValue) {\n var value = _.makeNull(rawValue);\n var key = _this.uniqueKey(value);\n if (uniqueValues[key] === undefined) {\n uniqueValues[key] = value;\n }\n });\n return uniqueValues;\n };\n SetValueModel.prototype.uniqueKey = function (v) {\n return v == null ? NULL_SUBSTITUTE : this.caseFormat(v);\n };\n SetValueModel.prototype.resetSelectionState = function (values) {\n if (this.filterParams.defaultToNothingSelected) {\n this.selectedValues.clear();\n }\n else {\n this.selectedValues = _.convertToSet(values || []);\n }\n };\n SetValueModel.EVENT_AVAILABLE_VALUES_CHANGED = 'availableValuesChanged';\n return SetValueModel;\n}());\nexport { SetValueModel };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, Events, NumberSequence, PostConstruct, PreDestroy, RowNodeBlock, ServerSideTransactionResultStatus } from \"@ag-grid-community/core\";\nvar FullStore = /** @class */ (function (_super) {\n __extends(FullStore, _super);\n function FullStore(ssrmParams, storeParams, parentRowNode) {\n var _this = \n // finite block represents a cache with just one block, thus 0 is the id, it's the first block\n _super.call(this, 0) || this;\n _this.nodeIdSequence = new NumberSequence();\n _this.info = {};\n _this.ssrmParams = ssrmParams;\n _this.parentRowNode = parentRowNode;\n _this.level = parentRowNode.level + 1;\n _this.groupLevel = ssrmParams.rowGroupCols ? _this.level < ssrmParams.rowGroupCols.length : undefined;\n _this.leafGroup = ssrmParams.rowGroupCols ? _this.level === ssrmParams.rowGroupCols.length - 1 : false;\n return _this;\n }\n FullStore.prototype.postConstruct = function () {\n var _this = this;\n this.usingTreeData = this.gridOptionsWrapper.isTreeData();\n this.nodeIdPrefix = this.blockUtils.createNodeIdPrefix(this.parentRowNode);\n if (!this.usingTreeData && this.groupLevel) {\n var groupColVo = this.ssrmParams.rowGroupCols[this.level];\n this.groupField = groupColVo.field;\n this.rowGroupColumn = this.columnModel.getRowGroupColumns()[this.level];\n }\n this.initialiseRowNodes();\n this.rowNodeBlockLoader.addBlock(this);\n this.addDestroyFunc(function () { return _this.rowNodeBlockLoader.removeBlock(_this); });\n };\n FullStore.prototype.destroyRowNodes = function () {\n this.blockUtils.destroyRowNodes(this.allRowNodes);\n this.allRowNodes = [];\n this.nodesAfterSort = [];\n this.nodesAfterFilter = [];\n this.allNodesMap = {};\n };\n FullStore.prototype.initialiseRowNodes = function (loadingRowsCount, failedLoad) {\n if (loadingRowsCount === void 0) { loadingRowsCount = 1; }\n if (failedLoad === void 0) { failedLoad = false; }\n this.destroyRowNodes();\n for (var i = 0; i < loadingRowsCount; i++) {\n var loadingRowNode = this.blockUtils.createRowNode({\n field: this.groupField, group: this.groupLevel, leafGroup: this.leafGroup,\n level: this.level, parent: this.parentRowNode, rowGroupColumn: this.rowGroupColumn\n });\n if (failedLoad) {\n loadingRowNode.failedLoad = true;\n }\n this.allRowNodes.push(loadingRowNode);\n this.nodesAfterFilter.push(loadingRowNode);\n this.nodesAfterSort.push(loadingRowNode);\n }\n };\n FullStore.prototype.getBlockStateJson = function () {\n return {\n id: this.nodeIdPrefix ? this.nodeIdPrefix : '',\n state: this.getState()\n };\n };\n FullStore.prototype.loadFromDatasource = function () {\n this.storeUtils.loadFromDatasource({\n startRow: undefined,\n endRow: undefined,\n parentBlock: this,\n parentNode: this.parentRowNode,\n storeParams: this.ssrmParams,\n successCallback: this.pageLoaded.bind(this, this.getVersion()),\n success: this.success.bind(this, this.getVersion()),\n failCallback: this.pageLoadFailed.bind(this, this.getVersion()),\n fail: this.pageLoadFailed.bind(this, this.getVersion())\n });\n };\n FullStore.prototype.getStartRow = function () {\n return 0; // always zero as not in a cache\n };\n FullStore.prototype.getEndRow = function () {\n return this.nodesAfterSort.length;\n };\n FullStore.prototype.createDataNode = function (data, index) {\n var rowNode = this.blockUtils.createRowNode({\n field: this.groupField, group: this.groupLevel, leafGroup: this.leafGroup,\n level: this.level, parent: this.parentRowNode, rowGroupColumn: this.rowGroupColumn\n });\n if (index != null) {\n _.insertIntoArray(this.allRowNodes, rowNode, index);\n }\n else {\n this.allRowNodes.push(rowNode);\n }\n var defaultId = this.prefixId(this.nodeIdSequence.next());\n this.blockUtils.setDataIntoRowNode(rowNode, data, defaultId, undefined);\n this.nodeManager.addRowNode(rowNode);\n this.blockUtils.checkOpenByDefault(rowNode);\n this.allNodesMap[rowNode.id] = rowNode;\n return rowNode;\n };\n FullStore.prototype.prefixId = function (id) {\n if (this.nodeIdPrefix) {\n return this.nodeIdPrefix + '-' + id;\n }\n else {\n return id.toString();\n }\n };\n FullStore.prototype.processServerFail = function () {\n this.initialiseRowNodes(1, true);\n this.fireStoreUpdatedEvent();\n this.flushAsyncTransactions();\n };\n FullStore.prototype.processServerResult = function (params) {\n if (!this.isAlive()) {\n return;\n }\n if (params.storeInfo) {\n Object.assign(this.info, params.storeInfo);\n }\n var nodesToRecycle = this.allRowNodes.length > 0 ? this.allNodesMap : undefined;\n this.allRowNodes = [];\n this.nodesAfterSort = [];\n this.nodesAfterFilter = [];\n this.allNodesMap = {};\n if (!params.rowData) {\n var message_1 = 'AG Grid: \"params.data\" is missing from Server-Side Row Model success() callback. Please use the \"data\" attribute. If no data is returned, set an empty list.';\n _.doOnce(function () { return console.warn(message_1, params); }, 'FullStore.noData');\n }\n this.createOrRecycleNodes(nodesToRecycle, params.rowData);\n if (nodesToRecycle) {\n this.blockUtils.destroyRowNodes(_.getAllValuesInObject(nodesToRecycle));\n }\n this.filterAndSortNodes();\n this.fireStoreUpdatedEvent();\n this.flushAsyncTransactions();\n };\n FullStore.prototype.createOrRecycleNodes = function (nodesToRecycle, rowData) {\n var _this = this;\n if (!rowData) {\n return;\n }\n var lookupNodeToRecycle = function (data) {\n if (!nodesToRecycle) {\n return undefined;\n }\n var getRowIdFunc = _this.gridOptionsWrapper.getRowIdFunc();\n if (!getRowIdFunc) {\n return undefined;\n }\n var parentKeys = _this.parentRowNode.getGroupKeys();\n var level = _this.level;\n var id = getRowIdFunc({\n data: data,\n parentKeys: parentKeys.length > 0 ? parentKeys : undefined,\n level: level,\n });\n var foundNode = nodesToRecycle[id];\n if (!foundNode) {\n return undefined;\n }\n delete nodesToRecycle[id];\n return foundNode;\n };\n var recycleNode = function (rowNode, dataItem) {\n _this.allNodesMap[rowNode.id] = rowNode;\n _this.blockUtils.updateDataIntoRowNode(rowNode, dataItem);\n _this.allRowNodes.push(rowNode);\n };\n rowData.forEach(function (dataItem) {\n var nodeToRecycle = lookupNodeToRecycle(dataItem);\n if (nodeToRecycle) {\n recycleNode(nodeToRecycle, dataItem);\n }\n else {\n _this.createDataNode(dataItem);\n }\n });\n };\n FullStore.prototype.flushAsyncTransactions = function () {\n var _this = this;\n // we want to update the store with any outstanding transactions straight away,\n // as otherwise if waitTimeMillis is large (eg 5s), then the user could be looking\n // at old data for a few seconds before the transactions is applied, which isn't what\n // you would expect when we advertise 'transaction is applied when data is loaded'.\n // we do this in a timeout as flushAsyncTransactions expects the grid to be in a settled\n // state, not in the middle of loading rows! keeps the VM Turns more simple and deterministic.\n window.setTimeout(function () { return _this.transactionManager.flushAsyncTransactions(); }, 0);\n };\n FullStore.prototype.filterAndSortNodes = function () {\n this.filterRowNodes();\n this.sortRowNodes();\n };\n FullStore.prototype.sortRowNodes = function () {\n var sortOptions = this.sortController.getSortOptions();\n var noSortApplied = !sortOptions || sortOptions.length == 0;\n // if we reset after sort, it means the sorting is done on the server\n var sortDoneOnServer = this.gridOptionsWrapper.isServerSideSortingAlwaysResets();\n if (noSortApplied || sortDoneOnServer) {\n this.nodesAfterSort = this.nodesAfterFilter;\n return;\n }\n this.nodesAfterSort = this.rowNodeSorter.doFullSort(this.nodesAfterFilter, sortOptions);\n };\n FullStore.prototype.filterRowNodes = function () {\n var _this = this;\n // if we reset after filter, it means the filtering is done on the server\n var filterDoneOnServer = this.gridOptionsWrapper.isServerSideFilteringAlwaysResets();\n // filtering for InFullStore only works at lowest level details.\n // reason is the logic for group filtering was to difficult to work out how it should work at time of writing.\n var groupLevel = this.groupLevel;\n var skipFilter = filterDoneOnServer || groupLevel;\n if (skipFilter) {\n this.nodesAfterFilter = this.allRowNodes;\n return;\n }\n this.nodesAfterFilter = this.allRowNodes.filter(function (rowNode) { return _this.filterManager.doesRowPassFilter({ rowNode: rowNode }); });\n };\n FullStore.prototype.clearDisplayIndexes = function () {\n var _this = this;\n this.displayIndexStart = undefined;\n this.displayIndexEnd = undefined;\n this.allRowNodes.forEach(function (rowNode) { return _this.blockUtils.clearDisplayIndex(rowNode); });\n };\n FullStore.prototype.getDisplayIndexEnd = function () {\n return this.displayIndexEnd;\n };\n FullStore.prototype.isDisplayIndexInStore = function (displayIndex) {\n if (this.getRowCount() === 0) {\n return false;\n }\n return displayIndex >= this.displayIndexStart && displayIndex < this.displayIndexEnd;\n };\n FullStore.prototype.setDisplayIndexes = function (displayIndexSeq, nextRowTop) {\n var _this = this;\n this.displayIndexStart = displayIndexSeq.peek();\n this.topPx = nextRowTop.value;\n var visibleNodeIds = {};\n // set on all visible nodes\n this.nodesAfterSort.forEach(function (rowNode) {\n _this.blockUtils.setDisplayIndex(rowNode, displayIndexSeq, nextRowTop);\n visibleNodeIds[rowNode.id] = true;\n });\n // and clear on all non-visible nodes\n this.allRowNodes.forEach(function (rowNode) {\n if (!visibleNodeIds[rowNode.id]) {\n _this.blockUtils.clearDisplayIndex(rowNode);\n }\n });\n this.displayIndexEnd = displayIndexSeq.peek();\n this.heightPx = nextRowTop.value - this.topPx;\n };\n FullStore.prototype.forEachNodeDeep = function (callback, sequence) {\n if (sequence === void 0) { sequence = new NumberSequence(); }\n this.allRowNodes.forEach(function (rowNode) {\n callback(rowNode, sequence.next());\n var childCache = rowNode.childStore;\n if (childCache) {\n childCache.forEachNodeDeep(callback, sequence);\n }\n });\n };\n FullStore.prototype.forEachNodeDeepAfterFilterAndSort = function (callback, sequence) {\n if (sequence === void 0) { sequence = new NumberSequence(); }\n this.nodesAfterSort.forEach(function (rowNode) {\n callback(rowNode, sequence.next());\n var childCache = rowNode.childStore;\n if (childCache) {\n childCache.forEachNodeDeepAfterFilterAndSort(callback, sequence);\n }\n });\n };\n FullStore.prototype.getRowUsingDisplayIndex = function (displayRowIndex) {\n // this can happen if asking for a row that doesn't exist in the model,\n // eg if a cell range is selected, and the user filters so rows no longer exists\n if (!this.isDisplayIndexInStore(displayRowIndex)) {\n return undefined;\n }\n var res = this.blockUtils.binarySearchForDisplayIndex(displayRowIndex, this.nodesAfterSort);\n return res;\n };\n FullStore.prototype.getRowBounds = function (index) {\n for (var i = 0; i < this.nodesAfterSort.length; i++) {\n var rowNode = this.nodesAfterSort[i];\n var res = this.blockUtils.extractRowBounds(rowNode, index);\n if (res) {\n return res;\n }\n }\n return null;\n };\n FullStore.prototype.isPixelInRange = function (pixel) {\n return pixel >= this.topPx && pixel < (this.topPx + this.heightPx);\n };\n FullStore.prototype.getRowIndexAtPixel = function (pixel) {\n var _this = this;\n // if pixel before block, return first row\n var pixelBeforeThisStore = pixel <= this.topPx;\n if (pixelBeforeThisStore) {\n var firstNode = this.nodesAfterSort[0];\n return firstNode.rowIndex;\n }\n // if pixel after store, return last row, however the last\n // row could be a child store\n var pixelAfterThisStore = pixel >= (this.topPx + this.heightPx);\n if (pixelAfterThisStore) {\n var lastRowNode = this.nodesAfterSort[this.nodesAfterSort.length - 1];\n var lastRowNodeBottomPx = lastRowNode.rowTop + lastRowNode.rowHeight;\n if (pixel >= lastRowNodeBottomPx && lastRowNode.expanded) {\n if (lastRowNode.childStore && lastRowNode.childStore.getRowCount() > 0) {\n return lastRowNode.childStore.getRowIndexAtPixel(pixel);\n }\n if (lastRowNode.detailNode) {\n return lastRowNode.detailNode.rowIndex;\n }\n }\n return lastRowNode.rowIndex;\n }\n var res = null;\n this.nodesAfterSort.forEach(function (rowNode) {\n var res2 = _this.blockUtils.getIndexAtPixel(rowNode, pixel);\n if (res2 != null) {\n res = res2;\n }\n });\n var pixelIsPastLastRow = res == null;\n if (pixelIsPastLastRow) {\n return this.displayIndexEnd - 1;\n }\n return res;\n };\n FullStore.prototype.getChildStore = function (keys) {\n var _this = this;\n return this.storeUtils.getChildStore(keys, this, function (key) {\n var rowNode = _this.allRowNodes.find(function (currentRowNode) {\n return currentRowNode.key == key;\n });\n return rowNode;\n });\n };\n FullStore.prototype.forEachChildStoreShallow = function (callback) {\n this.allRowNodes.forEach(function (rowNode) {\n var childStore = rowNode.childStore;\n if (childStore) {\n callback(childStore);\n }\n });\n };\n FullStore.prototype.refreshAfterFilter = function (params) {\n if (params.alwaysReset || this.gridOptionsWrapper.isTreeData()) {\n this.refreshStore(true);\n return;\n }\n this.filterAndSortNodes();\n this.forEachChildStoreShallow(function (store) { return store.refreshAfterFilter(params); });\n };\n FullStore.prototype.refreshAfterSort = function (params) {\n if (params.alwaysReset) {\n this.refreshStore(true);\n return;\n }\n this.sortRowNodes();\n this.forEachChildStoreShallow(function (store) { return store.refreshAfterSort(params); });\n };\n FullStore.prototype.applyTransaction = function (transaction) {\n // we only apply transactions to loaded state\n switch (this.getState()) {\n case RowNodeBlock.STATE_FAILED:\n return { status: ServerSideTransactionResultStatus.StoreLoadingFailed };\n case RowNodeBlock.STATE_LOADING:\n return { status: ServerSideTransactionResultStatus.StoreLoading };\n case RowNodeBlock.STATE_WAITING_TO_LOAD:\n return { status: ServerSideTransactionResultStatus.StoreWaitingToLoad };\n }\n var applyCallback = this.gridOptionsWrapper.getIsApplyServerSideTransactionFunc();\n if (applyCallback) {\n var params = {\n transaction: transaction,\n parentNode: this.parentRowNode,\n storeInfo: this.info\n };\n var apply = applyCallback(params);\n if (!apply) {\n return { status: ServerSideTransactionResultStatus.Cancelled };\n }\n }\n var res = {\n status: ServerSideTransactionResultStatus.Applied,\n remove: [],\n update: [],\n add: []\n };\n var nodesToUnselect = [];\n this.executeAdd(transaction, res);\n this.executeRemove(transaction, res, nodesToUnselect);\n this.executeUpdate(transaction, res, nodesToUnselect);\n this.filterAndSortNodes();\n this.updateSelection(nodesToUnselect);\n return res;\n };\n FullStore.prototype.updateSelection = function (nodesToUnselect) {\n var selectionChanged = nodesToUnselect.length > 0;\n if (selectionChanged) {\n nodesToUnselect.forEach(function (rowNode) {\n rowNode.setSelected(false, false, true);\n });\n var event_1 = {\n type: Events.EVENT_SELECTION_CHANGED,\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi()\n };\n this.eventService.dispatchEvent(event_1);\n }\n };\n FullStore.prototype.executeAdd = function (rowDataTran, rowNodeTransaction) {\n var _this = this;\n var add = rowDataTran.add, addIndex = rowDataTran.addIndex;\n if (_.missingOrEmpty(add)) {\n return;\n }\n var useIndex = typeof addIndex === 'number' && addIndex >= 0;\n if (useIndex) {\n // items get inserted in reverse order for index insertion\n add.reverse().forEach(function (item) {\n var newRowNode = _this.createDataNode(item, addIndex);\n rowNodeTransaction.add.push(newRowNode);\n });\n }\n else {\n add.forEach(function (item) {\n var newRowNode = _this.createDataNode(item);\n rowNodeTransaction.add.push(newRowNode);\n });\n }\n };\n FullStore.prototype.executeRemove = function (rowDataTran, rowNodeTransaction, nodesToUnselect) {\n var _this = this;\n var remove = rowDataTran.remove;\n if (remove == null) {\n return;\n }\n var rowIdsRemoved = {};\n remove.forEach(function (item) {\n var rowNode = _this.lookupRowNode(item);\n if (!rowNode) {\n return;\n }\n // do delete - setting 'suppressFinishActions = true' to ensure EVENT_SELECTION_CHANGED is not raised for\n // each row node updated, instead it is raised once by the calling code if any selected nodes exist.\n if (rowNode.isSelected()) {\n nodesToUnselect.push(rowNode);\n }\n // so row renderer knows to fade row out (and not reposition it)\n rowNode.clearRowTopAndRowIndex();\n // NOTE: were we could remove from allLeaveChildren, however _.removeFromArray() is expensive, especially\n // if called multiple times (eg deleting lots of rows) and if allLeafChildren is a large list\n rowIdsRemoved[rowNode.id] = true;\n // _.removeFromArray(this.rootNode.allLeafChildren, rowNode);\n delete _this.allNodesMap[rowNode.id];\n rowNodeTransaction.remove.push(rowNode);\n _this.nodeManager.removeNode(rowNode);\n });\n this.allRowNodes = this.allRowNodes.filter(function (rowNode) { return !rowIdsRemoved[rowNode.id]; });\n };\n FullStore.prototype.executeUpdate = function (rowDataTran, rowNodeTransaction, nodesToUnselect) {\n var _this = this;\n var update = rowDataTran.update;\n if (update == null) {\n return;\n }\n update.forEach(function (item) {\n var rowNode = _this.lookupRowNode(item);\n if (!rowNode) {\n return;\n }\n rowNode.updateData(item);\n if (!rowNode.selectable && rowNode.isSelected()) {\n nodesToUnselect.push(rowNode);\n }\n rowNodeTransaction.update.push(rowNode);\n });\n };\n FullStore.prototype.lookupRowNode = function (data) {\n var getRowIdFunc = this.gridOptionsWrapper.getRowIdFunc();\n var rowNode;\n if (getRowIdFunc != null) {\n // find rowNode using id\n var level = this.level;\n var parentKeys = this.parentRowNode.getGroupKeys();\n var id = getRowIdFunc({\n data: data,\n parentKeys: parentKeys.length > 0 ? parentKeys : undefined,\n level: level,\n });\n rowNode = this.allNodesMap[id];\n if (!rowNode) {\n console.error(\"AG Grid: could not find row id=\" + id + \", data item was not found for this id\");\n return null;\n }\n }\n else {\n // find rowNode using object references\n rowNode = this.allRowNodes.find(function (currentRowNode) { return currentRowNode.data === data; });\n if (!rowNode) {\n console.error(\"AG Grid: could not find data item as object was not found\", data);\n return null;\n }\n }\n return rowNode;\n };\n FullStore.prototype.addStoreStates = function (result) {\n result.push({\n type: 'full',\n route: this.parentRowNode.getGroupKeys(),\n rowCount: this.allRowNodes.length,\n info: this.info\n });\n this.forEachChildStoreShallow(function (childStore) { return childStore.addStoreStates(result); });\n };\n FullStore.prototype.refreshStore = function (purge) {\n if (purge) {\n var loadingRowsToShow = this.nodesAfterSort ? this.nodesAfterSort.length : 1;\n this.initialiseRowNodes(loadingRowsToShow);\n }\n this.scheduleLoad();\n this.fireStoreUpdatedEvent();\n };\n FullStore.prototype.retryLoads = function () {\n if (this.getState() === RowNodeBlock.STATE_FAILED) {\n this.initialiseRowNodes(1);\n this.scheduleLoad();\n }\n this.forEachChildStoreShallow(function (store) { return store.retryLoads(); });\n };\n FullStore.prototype.scheduleLoad = function () {\n this.setStateWaitingToLoad();\n this.rowNodeBlockLoader.checkBlockToLoad();\n };\n // gets called 1) row count changed 2) cache purged 3) items inserted\n FullStore.prototype.fireStoreUpdatedEvent = function () {\n // this results in row model firing ModelUpdated.\n // server side row model also updates the row indexes first\n var event = {\n type: Events.EVENT_STORE_UPDATED\n };\n this.eventService.dispatchEvent(event);\n };\n FullStore.prototype.getRowCount = function () {\n return this.nodesAfterSort.length;\n };\n FullStore.prototype.getTopLevelRowDisplayedIndex = function (topLevelIndex) {\n var rowNode = this.nodesAfterSort[topLevelIndex];\n return rowNode.rowIndex;\n };\n FullStore.prototype.isLastRowIndexKnown = function () {\n return this.getState() == RowNodeBlock.STATE_LOADED;\n };\n FullStore.prototype.getRowNodesInRange = function (firstInRange, lastInRange) {\n var result = [];\n var inActiveRange = false;\n // if only one node passed, we start the selection at the top\n if (_.missing(firstInRange)) {\n inActiveRange = true;\n }\n this.nodesAfterSort.forEach(function (rowNode) {\n var hitFirstOrLast = rowNode === firstInRange || rowNode === lastInRange;\n if (inActiveRange || hitFirstOrLast) {\n result.push(rowNode);\n }\n if (hitFirstOrLast) {\n inActiveRange = !inActiveRange;\n }\n });\n // inActiveRange will be still true if we never hit the second rowNode\n var invalidRange = inActiveRange;\n return invalidRange ? [] : result;\n };\n __decorate([\n Autowired('ssrmStoreUtils')\n ], FullStore.prototype, \"storeUtils\", void 0);\n __decorate([\n Autowired('ssrmBlockUtils')\n ], FullStore.prototype, \"blockUtils\", void 0);\n __decorate([\n Autowired('columnModel')\n ], FullStore.prototype, \"columnModel\", void 0);\n __decorate([\n Autowired('rowNodeBlockLoader')\n ], FullStore.prototype, \"rowNodeBlockLoader\", void 0);\n __decorate([\n Autowired('rowNodeSorter')\n ], FullStore.prototype, \"rowNodeSorter\", void 0);\n __decorate([\n Autowired('sortController')\n ], FullStore.prototype, \"sortController\", void 0);\n __decorate([\n Autowired('ssrmNodeManager')\n ], FullStore.prototype, \"nodeManager\", void 0);\n __decorate([\n Autowired('filterManager')\n ], FullStore.prototype, \"filterManager\", void 0);\n __decorate([\n Autowired('ssrmTransactionManager')\n ], FullStore.prototype, \"transactionManager\", void 0);\n __decorate([\n Autowired('columnApi')\n ], FullStore.prototype, \"columnApi\", void 0);\n __decorate([\n Autowired('gridApi')\n ], FullStore.prototype, \"gridApi\", void 0);\n __decorate([\n PostConstruct\n ], FullStore.prototype, \"postConstruct\", null);\n __decorate([\n PreDestroy\n ], FullStore.prototype, \"destroyRowNodes\", null);\n return FullStore;\n}(RowNodeBlock));\nexport { FullStore };\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, Bean } from \"@ag-grid-community/core\";\nimport { PartialStore } from \"./partialStore\";\nimport { FullStore } from \"./fullStore\";\nvar StoreFactory = /** @class */ (function () {\n function StoreFactory() {\n }\n StoreFactory.prototype.createStore = function (ssrmParams, parentNode) {\n var storeParams = this.getStoreParams(ssrmParams, parentNode);\n var CacheClass = storeParams.storeType === 'partial' ? PartialStore : FullStore;\n return new CacheClass(ssrmParams, storeParams, parentNode);\n };\n StoreFactory.prototype.getStoreParams = function (ssrmParams, parentNode) {\n var userStoreParams = this.getLevelSpecificParams(parentNode);\n // if user provided overrideParams, we take storeType from there if it exists\n var storeType = this.getStoreType(userStoreParams);\n var cacheBlockSize = this.getBlockSize(storeType, userStoreParams);\n var maxBlocksInCache = this.getMaxBlocksInCache(storeType, ssrmParams, userStoreParams);\n var storeParams = {\n storeType: storeType,\n cacheBlockSize: cacheBlockSize,\n maxBlocksInCache: maxBlocksInCache\n };\n return storeParams;\n };\n StoreFactory.prototype.getMaxBlocksInCache = function (storeType, ssrmParams, userStoreParams) {\n if (storeType == 'full') {\n return undefined;\n }\n var maxBlocksInCache = (userStoreParams && userStoreParams.maxBlocksInCache != null)\n ? userStoreParams.maxBlocksInCache\n : this.gridOptionsWrapper.getMaxBlocksInCache();\n var maxBlocksActive = maxBlocksInCache != null && maxBlocksInCache >= 0;\n if (!maxBlocksActive) {\n return undefined;\n }\n if (ssrmParams.dynamicRowHeight) {\n var message_1 = 'AG Grid: Server Side Row Model does not support Dynamic Row Height and Cache Purging. ' +\n 'Either a) remove getRowHeight() callback or b) remove maxBlocksInCache property. Purging has been disabled.';\n _.doOnce(function () { return console.warn(message_1); }, 'storeFactory.maxBlocksInCache.dynamicRowHeight');\n return undefined;\n }\n if (this.columnModel.isAutoRowHeightActive()) {\n var message_2 = 'AG Grid: Server Side Row Model does not support Auto Row Height and Cache Purging. ' +\n 'Either a) remove colDef.autoHeight or b) remove maxBlocksInCache property. Purging has been disabled.';\n _.doOnce(function () { return console.warn(message_2); }, 'storeFactory.maxBlocksInCache.autoRowHeightActive');\n return undefined;\n }\n return maxBlocksInCache;\n };\n StoreFactory.prototype.getBlockSize = function (storeType, userStoreParams) {\n if (storeType == 'full') {\n return undefined;\n }\n var blockSize = (userStoreParams && userStoreParams.cacheBlockSize != null)\n ? userStoreParams.cacheBlockSize\n : this.gridOptionsWrapper.getCacheBlockSize();\n if (blockSize != null && blockSize > 0) {\n return blockSize;\n }\n else {\n return 100;\n }\n };\n StoreFactory.prototype.getLevelSpecificParams = function (parentNode) {\n var callback = this.gridOptionsWrapper.getServerSideStoreParamsFunc();\n if (!callback) {\n return undefined;\n }\n var params = {\n level: parentNode.level + 1,\n parentRowNode: parentNode.level >= 0 ? parentNode : undefined,\n rowGroupColumns: this.columnModel.getRowGroupColumns(),\n pivotColumns: this.columnModel.getPivotColumns(),\n pivotMode: this.columnModel.isPivotMode()\n };\n return callback(params);\n };\n StoreFactory.prototype.getStoreType = function (storeParams) {\n var storeType = (storeParams && storeParams.storeType != null)\n ? storeParams.storeType\n : this.gridOptionsWrapper.getServerSideStoreType();\n switch (storeType) {\n case 'partial':\n case 'full':\n return storeType;\n case null:\n case undefined:\n return 'full';\n default:\n var serverTypes = ['full', 'partial'];\n var types = serverTypes.join(', ');\n console.warn(\"AG Grid: invalid Server Side Store Type \" + storeType + \", valid types are [\" + types + \"]\");\n return 'partial';\n }\n };\n __decorate([\n Autowired('gridOptionsWrapper')\n ], StoreFactory.prototype, \"gridOptionsWrapper\", void 0);\n __decorate([\n Autowired('columnModel')\n ], StoreFactory.prototype, \"columnModel\", void 0);\n StoreFactory = __decorate([\n Bean('ssrmStoreFactory')\n ], StoreFactory);\n return StoreFactory;\n}());\nexport { StoreFactory };\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Bean } from \"@ag-grid-community/core\";\nvar ListenerUtils = /** @class */ (function () {\n function ListenerUtils() {\n }\n ListenerUtils.prototype.isSortingWithValueColumn = function (changedColumnsInSort) {\n var valueColIds = this.columnModel.getValueColumns().map(function (col) { return col.getColId(); });\n for (var i = 0; i < changedColumnsInSort.length; i++) {\n if (valueColIds.indexOf(changedColumnsInSort[i]) > -1) {\n return true;\n }\n }\n return false;\n };\n ListenerUtils.prototype.isSortingWithSecondaryColumn = function (changedColumnsInSort) {\n if (!this.columnModel.getSecondaryColumns()) {\n return false;\n }\n var secondaryColIds = this.columnModel.getSecondaryColumns().map(function (col) { return col.getColId(); });\n for (var i = 0; i < changedColumnsInSort.length; i++) {\n if (secondaryColIds.indexOf(changedColumnsInSort[i]) > -1) {\n return true;\n }\n }\n return false;\n };\n __decorate([\n Autowired('columnModel')\n ], ListenerUtils.prototype, \"columnModel\", void 0);\n ListenerUtils = __decorate([\n Bean('ssrmListenerUtils')\n ], ListenerUtils);\n return ListenerUtils;\n}());\nexport { ListenerUtils };\n","import { ModuleNames } from \"@ag-grid-community/core\";\nimport { EnterpriseCoreModule } from \"@ag-grid-enterprise/core\";\nimport { ServerSideRowModel } from \"./serverSideRowModel/serverSideRowModel\";\nimport { StoreUtils } from \"./serverSideRowModel/stores/storeUtils\";\nimport { BlockUtils } from \"./serverSideRowModel/blocks/blockUtils\";\nimport { NodeManager } from \"./serverSideRowModel/nodeManager\";\nimport { TransactionManager } from \"./serverSideRowModel/transactionManager\";\nimport { ExpandListener } from \"./serverSideRowModel/listeners/expandListener\";\nimport { SortListener } from \"./serverSideRowModel/listeners/sortListener\";\nimport { FilterListener } from \"./serverSideRowModel/listeners/filterListener\";\nimport { StoreFactory } from \"./serverSideRowModel/stores/storeFactory\";\nimport { ListenerUtils } from \"./serverSideRowModel/listeners/listenerUtils\";\nexport var ServerSideRowModelModule = {\n moduleName: ModuleNames.ServerSideRowModelModule,\n rowModels: { serverSide: ServerSideRowModel },\n beans: [ExpandListener, SortListener, StoreUtils, BlockUtils, NodeManager, TransactionManager,\n FilterListener, StoreFactory, ListenerUtils],\n dependantModules: [\n EnterpriseCoreModule\n ]\n};\n","import { _ } from '@ag-grid-community/core';\nvar NULL_SUBSTITUTE = '____';\nvar ClientSideValuesExtractor = /** @class */ (function () {\n function ClientSideValuesExtractor(rowModel, filterParams, caseFormat) {\n this.rowModel = rowModel;\n this.filterParams = filterParams;\n this.caseFormat = caseFormat;\n }\n ClientSideValuesExtractor.prototype.extractUniqueValues = function (predicate) {\n var _this = this;\n var values = {};\n var keyCreator = this.filterParams.colDef.keyCreator;\n var addValue = function (value) {\n // NOTE: We don't care about the keys later on (only values in the dictionary are\n // returned), so as long as we use a non-conflicting key for the `null` value this\n // will behave correctly.\n var valueKey = value != null ? _this.caseFormat(value) : NULL_SUBSTITUTE;\n if (valueKey && values[valueKey] == null) {\n values[valueKey] = value;\n }\n };\n this.rowModel.forEachLeafNode(function (node) {\n // only pull values from rows that have data. this means we skip filler group nodes.\n if (!node.data || !predicate(node)) {\n return;\n }\n var _a = _this.filterParams, api = _a.api, colDef = _a.colDef, column = _a.column, columnApi = _a.columnApi, context = _a.context;\n var value = _this.filterParams.valueGetter({\n api: api,\n colDef: colDef,\n column: column,\n columnApi: columnApi,\n context: context,\n data: node.data,\n getValue: function (field) { return node.data[field]; },\n node: node,\n });\n if (keyCreator) {\n var params = {\n value: value,\n colDef: _this.filterParams.colDef,\n column: _this.filterParams.column,\n node: node,\n data: node.data,\n api: _this.filterParams.api,\n columnApi: _this.filterParams.columnApi,\n context: _this.filterParams.context\n };\n value = keyCreator(params);\n }\n value = _.makeNull(value);\n if (value != null && Array.isArray(value)) {\n value.forEach(function (x) {\n var formatted = _.toStringOrNull(_.makeNull(x));\n addValue(formatted);\n });\n }\n else {\n addValue(_.toStringOrNull(value));\n }\n });\n return _.values(values);\n };\n return ClientSideValuesExtractor;\n}());\nexport { ClientSideValuesExtractor };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Component, PostConstruct, RefSelector } from '@ag-grid-community/core';\nvar SetFilterListItem = /** @class */ (function (_super) {\n __extends(SetFilterListItem, _super);\n function SetFilterListItem(value, params, translate, isSelected) {\n var _this = _super.call(this, SetFilterListItem.TEMPLATE) || this;\n _this.value = value;\n _this.params = params;\n _this.translate = translate;\n _this.isSelected = isSelected;\n return _this;\n }\n SetFilterListItem.prototype.init = function () {\n var _this = this;\n this.render();\n this.eCheckbox.setValue(this.isSelected, true);\n this.eCheckbox.setDisabled(!!this.params.readOnly);\n if (!!this.params.readOnly) {\n // Don't add event listeners if we're read-only.\n return;\n }\n this.eCheckbox.onValueChange(function (value) {\n var parsedValue = value || false;\n _this.isSelected = parsedValue;\n var event = {\n type: SetFilterListItem.EVENT_SELECTION_CHANGED,\n isSelected: parsedValue,\n };\n _this.dispatchEvent(event);\n });\n };\n SetFilterListItem.prototype.toggleSelected = function () {\n if (!!this.params.readOnly) {\n return;\n }\n this.isSelected = !this.isSelected;\n this.eCheckbox.setValue(this.isSelected);\n };\n SetFilterListItem.prototype.render = function () {\n var column = this.params.column;\n var value = this.value;\n var formattedValue = null;\n if (typeof value === 'function') {\n value = value();\n }\n else {\n formattedValue = this.getFormattedValue(this.params, column, value);\n }\n if (this.params.showTooltips) {\n var tooltipValue = formattedValue != null ? formattedValue : value;\n this.setTooltip(tooltipValue);\n }\n var params = {\n value: value,\n valueFormatted: formattedValue,\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi(),\n context: this.gridOptionsWrapper.getContext(),\n colDef: this.params.colDef,\n column: this.params.column,\n };\n this.renderCell(params);\n };\n SetFilterListItem.prototype.getTooltipParams = function () {\n var res = _super.prototype.getTooltipParams.call(this);\n res.location = 'setFilterValue';\n res.colDef = this.getComponentHolder();\n return res;\n };\n SetFilterListItem.prototype.getFormattedValue = function (filterParams, column, value) {\n var formatter = filterParams && filterParams.valueFormatter;\n return this.valueFormatterService.formatValue(column, null, value, formatter, false);\n };\n SetFilterListItem.prototype.renderCell = function (params) {\n var _this = this;\n var compDetails = this.userComponentFactory.getSetFilterCellRendererDetails(this.params, params);\n var cellRendererPromise = compDetails ? compDetails.newAgStackInstance() : undefined;\n if (cellRendererPromise == null) {\n var valueToRender = params.valueFormatted == null ? params.value : params.valueFormatted;\n this.eCheckbox.setLabel(valueToRender == null ? this.translate('blanks') : valueToRender);\n return;\n }\n cellRendererPromise.then(function (component) {\n if (component) {\n _this.eCheckbox.setLabel(component.getGui());\n _this.addDestroyFunc(function () { return _this.destroyBean(component); });\n }\n });\n };\n SetFilterListItem.prototype.getComponentHolder = function () {\n return this.params.column.getColDef();\n };\n SetFilterListItem.EVENT_SELECTION_CHANGED = 'selectionChanged';\n SetFilterListItem.TEMPLATE = \"\\n
\\n \\n
\";\n __decorate([\n Autowired('valueFormatterService')\n ], SetFilterListItem.prototype, \"valueFormatterService\", void 0);\n __decorate([\n Autowired('userComponentFactory')\n ], SetFilterListItem.prototype, \"userComponentFactory\", void 0);\n __decorate([\n RefSelector('eCheckbox')\n ], SetFilterListItem.prototype, \"eCheckbox\", void 0);\n __decorate([\n PostConstruct\n ], SetFilterListItem.prototype, \"init\", null);\n return SetFilterListItem;\n}(Component));\nexport { SetFilterListItem };\n","export var DEFAULT_LOCALE_TEXT = {\n loadingOoo: 'Loading...',\n blanks: '(Blanks)',\n searchOoo: 'Search...',\n selectAll: '(Select All)',\n selectAllSearchResults: '(Select All Search Results)',\n noMatches: 'No matches.'\n};\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Constants, Events, ProvidedFilter, RefSelector, VirtualList, AgPromise, KeyCode, PositionableFeature, _, } from '@ag-grid-community/core';\nimport { SetFilterModelValuesType, SetValueModel } from './setValueModel';\nimport { SetFilterListItem } from './setFilterListItem';\nimport { DEFAULT_LOCALE_TEXT } from './localeText';\nvar SetFilter = /** @class */ (function (_super) {\n __extends(SetFilter, _super);\n function SetFilter() {\n var _this = _super.call(this, 'setFilter') || this;\n _this.valueModel = null;\n _this.setFilterParams = null;\n _this.virtualList = null;\n _this.caseSensitive = false;\n // To make the filtering super fast, we store the values in an object, and check for the boolean value.\n // Although Set would be a more natural choice of data structure, its performance across browsers is\n // significantly worse than using an object: https://jsbench.me/hdk91jbw1h/\n _this.appliedModelValues = null;\n return _this;\n }\n SetFilter.prototype.postConstruct = function () {\n _super.prototype.postConstruct.call(this);\n this.positionableFeature = new PositionableFeature(this.eSetFilterList, { forcePopupParentAsOffsetParent: true });\n this.createBean(this.positionableFeature);\n };\n // unlike the simple filters, nothing in the set filter UI shows/hides.\n // maybe this method belongs in abstractSimpleFilter???\n SetFilter.prototype.updateUiVisibility = function () { };\n SetFilter.prototype.createBodyTemplate = function () {\n return /* html */ \"\\n
\\n
\" + this.translateForSetFilter('loadingOoo') + \"
\\n \\n
\" + this.translateForSetFilter('noMatches') + \"
\\n
\\n
\";\n };\n SetFilter.prototype.handleKeyDown = function (e) {\n _super.prototype.handleKeyDown.call(this, e);\n if (e.defaultPrevented) {\n return;\n }\n switch (e.key) {\n case KeyCode.SPACE:\n this.handleKeySpace(e);\n break;\n case KeyCode.ENTER:\n this.handleKeyEnter(e);\n break;\n }\n };\n SetFilter.prototype.handleKeySpace = function (e) {\n var eDocument = this.gridOptionsWrapper.getDocument();\n if (!this.eSetFilterList.contains(eDocument.activeElement) || !this.virtualList) {\n return;\n }\n var currentItem = this.virtualList.getLastFocusedRow();\n if (currentItem == null) {\n return;\n }\n var component = this.virtualList.getComponentAt(currentItem);\n if (component == null) {\n return;\n }\n e.preventDefault();\n var readOnly = (this.setFilterParams || {}).readOnly;\n if (!!readOnly) {\n return;\n }\n component.toggleSelected();\n };\n SetFilter.prototype.handleKeyEnter = function (e) {\n if (!this.setFilterParams) {\n return;\n }\n var _a = this.setFilterParams || {}, excelMode = _a.excelMode, readOnly = _a.readOnly;\n if (!excelMode || !!readOnly) {\n return;\n }\n e.preventDefault();\n // in Excel Mode, hitting Enter is the same as pressing the Apply button\n this.onBtApply(false, false, e);\n if (this.setFilterParams.excelMode === 'mac') {\n // in Mac version, select all the input text\n this.eMiniFilter.getInputElement().select();\n }\n };\n SetFilter.prototype.getCssIdentifier = function () {\n return 'set-filter';\n };\n SetFilter.prototype.setModelAndRefresh = function (values) {\n var _this = this;\n return this.valueModel ? this.valueModel.setModel(values).then(function () { return _this.refresh(); }) : AgPromise.resolve();\n };\n SetFilter.prototype.resetUiToDefaults = function () {\n this.setMiniFilter(null);\n return this.setModelAndRefresh(null);\n };\n SetFilter.prototype.setModelIntoUi = function (model) {\n this.setMiniFilter(null);\n var values = model == null ? null : model.values;\n return this.setModelAndRefresh(values);\n };\n SetFilter.prototype.getModelFromUi = function () {\n if (!this.valueModel) {\n throw new Error('Value model has not been created.');\n }\n var values = this.valueModel.getModel();\n if (!values) {\n return null;\n }\n return { values: values, filterType: this.getFilterType() };\n };\n SetFilter.prototype.getFilterType = function () {\n return 'set';\n };\n SetFilter.prototype.getValueModel = function () {\n return this.valueModel;\n };\n SetFilter.prototype.areModelsEqual = function (a, b) {\n // both are missing\n if (a == null && b == null) {\n return true;\n }\n return a != null && b != null && _.areEqual(a.values, b.values);\n };\n SetFilter.prototype.setParams = function (params) {\n var _this = this;\n this.applyExcelModeOptions(params);\n _super.prototype.setParams.call(this, params);\n this.setFilterParams = params;\n this.caseSensitive = params.caseSensitive || false;\n this.valueModel = new SetValueModel(params, function (loading) { return _this.showOrHideLoadingScreen(loading); }, this.valueFormatterService, function (key) { return _this.translateForSetFilter(key); }, function (v) { return _this.caseFormat(v); });\n this.initialiseFilterBodyUi();\n if (params.rowModel.getType() === Constants.ROW_MODEL_TYPE_CLIENT_SIDE &&\n !params.values) {\n this.addEventListenersForDataChanges();\n }\n };\n SetFilter.prototype.applyExcelModeOptions = function (params) {\n // apply default options to match Excel behaviour, unless they have already been specified\n if (params.excelMode === 'windows') {\n if (!params.buttons) {\n params.buttons = ['apply', 'cancel'];\n }\n if (params.closeOnApply == null) {\n params.closeOnApply = true;\n }\n }\n else if (params.excelMode === 'mac') {\n if (!params.buttons) {\n params.buttons = ['reset'];\n }\n if (params.applyMiniFilterWhileTyping == null) {\n params.applyMiniFilterWhileTyping = true;\n }\n if (params.debounceMs == null) {\n params.debounceMs = 500;\n }\n }\n };\n SetFilter.prototype.addEventListenersForDataChanges = function () {\n var _this = this;\n this.addManagedListener(this.eventService, Events.EVENT_ROW_DATA_UPDATED, function () { return _this.syncAfterDataChange(); });\n this.addManagedListener(this.eventService, Events.EVENT_CELL_VALUE_CHANGED, function (event) {\n // only interested in changes to do with this column\n if (_this.setFilterParams && event.column === _this.setFilterParams.column) {\n _this.syncAfterDataChange();\n }\n });\n };\n SetFilter.prototype.syncAfterDataChange = function (refreshValues) {\n var _this = this;\n if (refreshValues === void 0) { refreshValues = true; }\n if (!this.valueModel) {\n throw new Error('Value model has not been created.');\n }\n var promise = AgPromise.resolve();\n if (refreshValues) {\n promise = this.valueModel.refreshValues();\n }\n return promise.then(function () {\n _this.refresh();\n _this.onBtApply(false, true);\n });\n };\n SetFilter.prototype.showOrHideLoadingScreen = function (isLoading) {\n _.setDisplayed(this.eFilterLoading, isLoading);\n };\n SetFilter.prototype.initialiseFilterBodyUi = function () {\n this.initVirtualList();\n this.initMiniFilter();\n };\n SetFilter.prototype.initVirtualList = function () {\n var _this = this;\n if (!this.setFilterParams) {\n throw new Error('Set filter params have not been provided.');\n }\n if (!this.valueModel) {\n throw new Error('Value model has not been created.');\n }\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n var filterListName = translate('ariaFilterList', 'Filter List');\n var virtualList = this.virtualList = this.createBean(new VirtualList('filter', 'listbox', filterListName));\n var eSetFilterList = this.getRefElement('eSetFilterList');\n if (eSetFilterList) {\n eSetFilterList.appendChild(virtualList.getGui());\n }\n var cellHeight = this.setFilterParams.cellHeight;\n if (cellHeight != null) {\n virtualList.setRowHeight(cellHeight);\n }\n virtualList.setComponentCreator(function (value) { return _this.createSetListItem(value); });\n var model;\n if (this.setFilterParams.suppressSelectAll) {\n model = new ModelWrapper(this.valueModel);\n }\n else {\n model = new ModelWrapperWithSelectAll(this.valueModel, function () { return _this.isSelectAllSelected(); });\n }\n virtualList.setModel(model);\n };\n SetFilter.prototype.getSelectAllLabel = function () {\n if (!this.setFilterParams) {\n throw new Error('Set filter params have not been provided.');\n }\n if (!this.valueModel) {\n throw new Error('Value model has not been created.');\n }\n var key = this.valueModel.getMiniFilter() == null || !this.setFilterParams.excelMode ?\n 'selectAll' : 'selectAllSearchResults';\n return this.translateForSetFilter(key);\n };\n SetFilter.prototype.createSetListItem = function (value) {\n var _this = this;\n if (!this.setFilterParams) {\n throw new Error('Set filter params have not been provided.');\n }\n if (!this.valueModel) {\n throw new Error('Value model has not been created.');\n }\n var listItem;\n if (value === SetFilter.SELECT_ALL_VALUE) {\n listItem = this.createBean(new SetFilterListItem(function () { return _this.getSelectAllLabel(); }, this.setFilterParams, function (key) { return _this.translateForSetFilter(key); }, this.isSelectAllSelected()));\n listItem.addEventListener(SetFilterListItem.EVENT_SELECTION_CHANGED, function (e) { return _this.onSelectAll(e.isSelected); });\n return listItem;\n }\n listItem = this.createBean(new SetFilterListItem(value, this.setFilterParams, function (key) { return _this.translateForSetFilter(key); }, this.valueModel.isValueSelected(value)));\n listItem.addEventListener(SetFilterListItem.EVENT_SELECTION_CHANGED, function (e) { return _this.onItemSelected(value, e.isSelected); });\n return listItem;\n };\n SetFilter.prototype.initMiniFilter = function () {\n var _this = this;\n if (!this.setFilterParams) {\n throw new Error('Set filter params have not been provided.');\n }\n if (!this.valueModel) {\n throw new Error('Value model has not been created.');\n }\n var _a = this, eMiniFilter = _a.eMiniFilter, gridOptionsWrapper = _a.gridOptionsWrapper;\n var translate = gridOptionsWrapper.getLocaleTextFunc();\n eMiniFilter.setDisplayed(!this.setFilterParams.suppressMiniFilter);\n eMiniFilter.setValue(this.valueModel.getMiniFilter());\n eMiniFilter.onValueChange(function () { return _this.onMiniFilterInput(); });\n eMiniFilter.setInputAriaLabel(translate('ariaSearchFilterValues', 'Search filter values'));\n this.addManagedListener(eMiniFilter.getInputElement(), 'keypress', function (e) { return _this.onMiniFilterKeyPress(e); });\n };\n // we need to have the GUI attached before we can draw the virtual rows, as the\n // virtual row logic needs info about the GUI state\n SetFilter.prototype.afterGuiAttached = function (params) {\n if (!this.setFilterParams) {\n throw new Error('Set filter params have not been provided.');\n }\n _super.prototype.afterGuiAttached.call(this, params);\n if (this.setFilterParams.excelMode) {\n this.resetUiToActiveModel();\n this.showOrHideResults();\n }\n this.refreshVirtualList();\n var eMiniFilter = this.eMiniFilter;\n eMiniFilter.setInputPlaceholder(this.translateForSetFilter('searchOoo'));\n if (!params || !params.suppressFocus) {\n eMiniFilter.getFocusableElement().focus();\n }\n var resizable = !!(params && params.container === 'floatingFilter');\n var resizableObject;\n if (this.gridOptionsWrapper.isEnableRtl()) {\n resizableObject = { bottom: true, bottomLeft: true, left: true };\n }\n else {\n resizableObject = { bottom: true, bottomRight: true, right: true };\n }\n if (resizable) {\n this.positionableFeature.restoreLastSize();\n this.positionableFeature.setResizable(resizableObject);\n }\n else {\n this.positionableFeature.removeSizeFromEl();\n this.positionableFeature.setResizable(false);\n }\n };\n SetFilter.prototype.applyModel = function () {\n var _this = this;\n if (!this.setFilterParams) {\n throw new Error('Set filter params have not been provided.');\n }\n if (!this.valueModel) {\n throw new Error('Value model has not been created.');\n }\n if (this.setFilterParams.excelMode && this.valueModel.isEverythingVisibleSelected()) {\n // In Excel, if the filter is applied with all visible values selected, then any active filter on the\n // column is removed. This ensures the filter is removed in this situation.\n this.valueModel.selectAllMatchingMiniFilter();\n }\n var result = _super.prototype.applyModel.call(this);\n // keep appliedModelValues in sync with the applied model\n var appliedModel = this.getModel();\n if (appliedModel) {\n this.appliedModelValues = appliedModel.values.reduce(function (values, value) {\n values[_this.caseFormat(String(value))] = true;\n return values;\n }, {});\n }\n else {\n this.appliedModelValues = null;\n }\n return result;\n };\n SetFilter.prototype.isModelValid = function (model) {\n return this.setFilterParams && this.setFilterParams.excelMode ? model == null || model.values.length > 0 : true;\n };\n SetFilter.prototype.doesFilterPass = function (params) {\n var _this = this;\n if (!this.setFilterParams || !this.valueModel || !this.appliedModelValues) {\n return true;\n }\n var node = params.node, data = params.data;\n var _a = this.setFilterParams, valueGetter = _a.valueGetter, keyCreator = _a.colDef.keyCreator, api = _a.api, colDef = _a.colDef, column = _a.column, columnApi = _a.columnApi, context = _a.context;\n var value = valueGetter({\n api: api,\n colDef: colDef,\n column: column,\n columnApi: columnApi,\n context: context,\n data: data,\n getValue: function (field) { return data[field]; },\n node: node,\n });\n if (keyCreator) {\n var keyParams = {\n value: value,\n colDef: colDef,\n column: column,\n node: node,\n data: data,\n api: api,\n columnApi: columnApi,\n context: context,\n };\n value = keyCreator(keyParams);\n }\n value = _.makeNull(value);\n if (Array.isArray(value)) {\n return value.some(function (v) { return _this.appliedModelValues[_this.caseFormat(String(_.makeNull(v)))] === true; });\n }\n // Comparing against a value performs better than just checking for undefined\n // https://jsbench.me/hdk91jbw1h/\n return this.appliedModelValues[this.caseFormat(String(value))] === true;\n };\n SetFilter.prototype.onNewRowsLoaded = function () {\n if (!this.valueModel) {\n throw new Error('Value model has not been created.');\n }\n var valuesType = this.valueModel.getValuesType();\n this.syncAfterDataChange(valuesType === SetFilterModelValuesType.TAKEN_FROM_GRID_VALUES);\n };\n //noinspection JSUnusedGlobalSymbols\n /**\n * Public method provided so the user can change the value of the filter once\n * the filter has been already started\n * @param options The options to use.\n */\n SetFilter.prototype.setFilterValues = function (options) {\n var _this = this;\n if (!this.valueModel) {\n throw new Error('Value model has not been created.');\n }\n this.valueModel.overrideValues(options).then(function () {\n _this.refresh();\n _this.onUiChanged();\n });\n };\n //noinspection JSUnusedGlobalSymbols\n /**\n * Public method provided so the user can reset the values of the filter once that it has started.\n */\n SetFilter.prototype.resetFilterValues = function () {\n if (!this.valueModel) {\n throw new Error('Value model has not been created.');\n }\n this.valueModel.setValuesType(SetFilterModelValuesType.TAKEN_FROM_GRID_VALUES);\n this.syncAfterDataChange(true);\n };\n SetFilter.prototype.refreshFilterValues = function () {\n var _this = this;\n if (!this.valueModel) {\n throw new Error('Value model has not been created.');\n }\n // the model is still being initialised\n if (!this.valueModel.isInitialised()) {\n return;\n }\n this.valueModel.refreshValues().then(function () {\n _this.refresh();\n _this.onUiChanged();\n });\n };\n SetFilter.prototype.onAnyFilterChanged = function () {\n var _this = this;\n // don't block the current action when updating the values for this filter\n setTimeout(function () {\n if (!_this.isAlive()) {\n return;\n }\n if (!_this.valueModel) {\n throw new Error('Value model has not been created.');\n }\n _this.valueModel.refreshAfterAnyFilterChanged().then(function () { return _this.refresh(); });\n }, 0);\n };\n SetFilter.prototype.onMiniFilterInput = function () {\n if (!this.setFilterParams) {\n throw new Error('Set filter params have not been provided.');\n }\n if (!this.valueModel) {\n throw new Error('Value model has not been created.');\n }\n if (!this.valueModel.setMiniFilter(this.eMiniFilter.getValue())) {\n return;\n }\n var _a = this.setFilterParams || {}, applyMiniFilterWhileTyping = _a.applyMiniFilterWhileTyping, readOnly = _a.readOnly;\n if (!readOnly && applyMiniFilterWhileTyping) {\n this.filterOnAllVisibleValues(false);\n }\n else {\n this.updateUiAfterMiniFilterChange();\n }\n };\n SetFilter.prototype.updateUiAfterMiniFilterChange = function () {\n if (!this.setFilterParams) {\n throw new Error('Set filter params have not been provided.');\n }\n if (!this.valueModel) {\n throw new Error('Value model has not been created.');\n }\n var _a = this.setFilterParams || {}, excelMode = _a.excelMode, readOnly = _a.readOnly;\n if (excelMode == null || !!readOnly) {\n this.refresh();\n }\n else if (this.valueModel.getMiniFilter() == null) {\n this.resetUiToActiveModel();\n }\n else {\n this.valueModel.selectAllMatchingMiniFilter(true);\n this.refresh();\n this.onUiChanged();\n }\n this.showOrHideResults();\n };\n SetFilter.prototype.showOrHideResults = function () {\n if (!this.valueModel) {\n throw new Error('Value model has not been created.');\n }\n var hideResults = this.valueModel.getMiniFilter() != null && this.valueModel.getDisplayedValueCount() < 1;\n _.setDisplayed(this.eNoMatches, hideResults);\n _.setDisplayed(this.eSetFilterList, !hideResults);\n };\n SetFilter.prototype.resetUiToActiveModel = function () {\n var _this = this;\n if (!this.valueModel) {\n throw new Error('Value model has not been created.');\n }\n this.eMiniFilter.setValue(null, true);\n this.valueModel.setMiniFilter(null);\n this.setModelIntoUi(this.getModel()).then(function () { return _this.onUiChanged(false, 'prevent'); });\n };\n SetFilter.prototype.onMiniFilterKeyPress = function (e) {\n var _a = this.setFilterParams || {}, excelMode = _a.excelMode, readOnly = _a.readOnly;\n if (e.key === KeyCode.ENTER && !excelMode && !readOnly) {\n this.filterOnAllVisibleValues();\n }\n };\n SetFilter.prototype.filterOnAllVisibleValues = function (applyImmediately) {\n if (applyImmediately === void 0) { applyImmediately = true; }\n var readOnly = (this.setFilterParams || {}).readOnly;\n if (!this.valueModel) {\n throw new Error('Value model has not been created.');\n }\n if (!!readOnly) {\n throw new Error('Unable to filter in readOnly mode.');\n }\n this.valueModel.selectAllMatchingMiniFilter(true);\n this.refresh();\n this.onUiChanged(false, applyImmediately ? 'immediately' : 'debounce');\n this.showOrHideResults();\n };\n SetFilter.prototype.focusRowIfAlive = function (rowIndex) {\n var _this = this;\n if (rowIndex == null) {\n return;\n }\n window.setTimeout(function () {\n if (!_this.virtualList) {\n throw new Error('Virtual list has not been created.');\n }\n if (_this.isAlive()) {\n _this.virtualList.focusRow(rowIndex);\n }\n }, 0);\n };\n SetFilter.prototype.onSelectAll = function (isSelected) {\n if (!this.valueModel) {\n throw new Error('Value model has not been created.');\n }\n if (!this.virtualList) {\n throw new Error('Virtual list has not been created.');\n }\n if (isSelected) {\n this.valueModel.selectAllMatchingMiniFilter();\n }\n else {\n this.valueModel.deselectAllMatchingMiniFilter();\n }\n var focusedRow = this.virtualList.getLastFocusedRow();\n this.refresh();\n this.onUiChanged();\n this.focusRowIfAlive(focusedRow);\n };\n SetFilter.prototype.onItemSelected = function (value, isSelected) {\n if (!this.valueModel) {\n throw new Error('Value model has not been created.');\n }\n if (!this.virtualList) {\n throw new Error('Virtual list has not been created.');\n }\n if (isSelected) {\n this.valueModel.selectValue(value);\n }\n else {\n this.valueModel.deselectValue(value);\n }\n var focusedRow = this.virtualList.getLastFocusedRow();\n this.refresh();\n this.onUiChanged();\n this.focusRowIfAlive(focusedRow);\n };\n SetFilter.prototype.setMiniFilter = function (newMiniFilter) {\n this.eMiniFilter.setValue(newMiniFilter);\n this.onMiniFilterInput();\n };\n SetFilter.prototype.getMiniFilter = function () {\n return this.valueModel ? this.valueModel.getMiniFilter() : null;\n };\n SetFilter.prototype.refresh = function () {\n if (!this.virtualList) {\n throw new Error('Virtual list has not been created.');\n }\n this.virtualList.refresh();\n };\n SetFilter.prototype.getValues = function () {\n return this.valueModel ? this.valueModel.getValues() : [];\n };\n SetFilter.prototype.refreshVirtualList = function () {\n if (this.setFilterParams && this.setFilterParams.refreshValuesOnOpen) {\n this.refreshFilterValues();\n }\n else {\n this.refresh();\n }\n };\n SetFilter.prototype.translateForSetFilter = function (key) {\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n return translate(key, DEFAULT_LOCALE_TEXT[key]);\n };\n SetFilter.prototype.isSelectAllSelected = function () {\n if (!this.setFilterParams || !this.valueModel) {\n return false;\n }\n if (!this.setFilterParams.defaultToNothingSelected) {\n // everything selected by default\n if (this.valueModel.hasSelections() && this.valueModel.isNothingVisibleSelected()) {\n return false;\n }\n if (this.valueModel.isEverythingVisibleSelected()) {\n return true;\n }\n }\n else {\n // nothing selected by default\n if (this.valueModel.hasSelections() && this.valueModel.isEverythingVisibleSelected()) {\n return true;\n }\n if (this.valueModel.isNothingVisibleSelected()) {\n return false;\n }\n }\n // returning `undefined` means the checkbox status is indeterminate.\n return undefined;\n };\n SetFilter.prototype.destroy = function () {\n if (this.virtualList != null) {\n this.virtualList.destroy();\n this.virtualList = null;\n }\n _super.prototype.destroy.call(this);\n };\n SetFilter.prototype.caseFormat = function (valueToFormat) {\n if (valueToFormat == null || typeof valueToFormat !== 'string') {\n return valueToFormat;\n }\n return this.caseSensitive ? valueToFormat : valueToFormat.toUpperCase();\n };\n SetFilter.SELECT_ALL_VALUE = '__AG_SELECT_ALL__';\n __decorate([\n RefSelector('eMiniFilter')\n ], SetFilter.prototype, \"eMiniFilter\", void 0);\n __decorate([\n RefSelector('eFilterLoading')\n ], SetFilter.prototype, \"eFilterLoading\", void 0);\n __decorate([\n RefSelector('eSetFilterList')\n ], SetFilter.prototype, \"eSetFilterList\", void 0);\n __decorate([\n RefSelector('eFilterNoMatches')\n ], SetFilter.prototype, \"eNoMatches\", void 0);\n __decorate([\n Autowired('valueFormatterService')\n ], SetFilter.prototype, \"valueFormatterService\", void 0);\n return SetFilter;\n}(ProvidedFilter));\nexport { SetFilter };\nvar ModelWrapper = /** @class */ (function () {\n function ModelWrapper(model) {\n this.model = model;\n }\n ModelWrapper.prototype.getRowCount = function () {\n return this.model.getDisplayedValueCount();\n };\n ModelWrapper.prototype.getRow = function (index) {\n return this.model.getDisplayedValue(index);\n };\n ModelWrapper.prototype.isRowSelected = function (index) {\n return this.model.isValueSelected(this.getRow(index));\n };\n return ModelWrapper;\n}());\nvar ModelWrapperWithSelectAll = /** @class */ (function () {\n function ModelWrapperWithSelectAll(model, isSelectAllSelected) {\n this.model = model;\n this.isSelectAllSelected = isSelectAllSelected;\n }\n ModelWrapperWithSelectAll.prototype.getRowCount = function () {\n return this.model.getDisplayedValueCount() + 1;\n };\n ModelWrapperWithSelectAll.prototype.getRow = function (index) {\n return index === 0 ? SetFilter.SELECT_ALL_VALUE : this.model.getDisplayedValue(index - 1);\n };\n ModelWrapperWithSelectAll.prototype.isRowSelected = function (index) {\n return index === 0 ? this.isSelectAllSelected() : this.model.isValueSelected(this.getRow(index));\n };\n return ModelWrapperWithSelectAll;\n}());\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Component, RefSelector, } from '@ag-grid-community/core';\nimport { SetFilter } from './setFilter';\nimport { SetValueModel } from './setValueModel';\nimport { DEFAULT_LOCALE_TEXT } from './localeText';\nvar SetFloatingFilterComp = /** @class */ (function (_super) {\n __extends(SetFloatingFilterComp, _super);\n function SetFloatingFilterComp() {\n var _this = _super.call(this, /* html */ \"\\n
\\n \\n
\") || this;\n _this.availableValuesListenerAdded = false;\n return _this;\n }\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n SetFloatingFilterComp.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n SetFloatingFilterComp.prototype.init = function (params) {\n var displayName = this.columnModel.getDisplayNameForColumn(params.column, 'header', true);\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n this.eFloatingFilterText\n .setDisabled(true)\n .setInputAriaLabel(displayName + \" \" + translate('ariaFilterInput', 'Filter Input'))\n .addGuiEventListener('click', function () { return params.showParentFilter(); });\n this.params = params;\n };\n SetFloatingFilterComp.prototype.onParentModelChanged = function (parentModel) {\n this.updateFloatingFilterText(parentModel);\n };\n SetFloatingFilterComp.prototype.parentSetFilterInstance = function (cb) {\n this.params.parentFilterInstance(function (filter) {\n if (!(filter instanceof SetFilter)) {\n throw new Error('AG Grid - SetFloatingFilter expects SetFilter as it\\'s parent');\n }\n cb(filter);\n });\n };\n SetFloatingFilterComp.prototype.addAvailableValuesListener = function () {\n var _this = this;\n this.parentSetFilterInstance(function (setFilter) {\n var setValueModel = setFilter.getValueModel();\n if (!setValueModel) {\n return;\n }\n // unlike other filters, what we show in the floating filter can be different, even\n // if another filter changes. this is due to how set filter restricts its values based\n // on selections in other filters, e.g. if you filter Language to English, then the set filter\n // on Country will only show English speaking countries. Thus the list of items to show\n // in the floating filter can change.\n _this.addManagedListener(setValueModel, SetValueModel.EVENT_AVAILABLE_VALUES_CHANGED, function () { return _this.updateFloatingFilterText(); });\n });\n this.availableValuesListenerAdded = true;\n };\n SetFloatingFilterComp.prototype.updateFloatingFilterText = function (parentModel) {\n var _this = this;\n if (!this.availableValuesListenerAdded) {\n this.addAvailableValuesListener();\n }\n this.parentSetFilterInstance(function (setFilter) {\n var values = (parentModel || setFilter.getModel() || {}).values;\n var valueModel = setFilter.getValueModel();\n if (values == null || valueModel == null) {\n _this.eFloatingFilterText.setValue('');\n return;\n }\n var localeTextFunc = _this.gridOptionsWrapper.getLocaleTextFunc();\n var availableValues = values.filter(function (v) { return valueModel.isValueAvailable(v); });\n // format all the values, if a formatter is provided\n var formattedValues = availableValues.map(function (value) {\n var _a = _this.params, column = _a.column, filterParams = _a.filterParams;\n var formattedValue = _this.valueFormatterService.formatValue(column, null, value, filterParams.valueFormatter, false);\n var valueToRender = formattedValue != null ? formattedValue : value;\n return valueToRender == null ? localeTextFunc('blanks', DEFAULT_LOCALE_TEXT.blanks) : valueToRender;\n });\n var arrayToDisplay = formattedValues.length > 10 ? formattedValues.slice(0, 10).concat('...') : formattedValues;\n var valuesString = \"(\" + formattedValues.length + \") \" + arrayToDisplay.join(',');\n _this.eFloatingFilterText.setValue(valuesString);\n });\n };\n __decorate([\n RefSelector('eFloatingFilterText')\n ], SetFloatingFilterComp.prototype, \"eFloatingFilterText\", void 0);\n __decorate([\n Autowired('valueFormatterService')\n ], SetFloatingFilterComp.prototype, \"valueFormatterService\", void 0);\n __decorate([\n Autowired('columnModel')\n ], SetFloatingFilterComp.prototype, \"columnModel\", void 0);\n return SetFloatingFilterComp;\n}(Component));\nexport { SetFloatingFilterComp };\n","import { ModuleNames } from '@ag-grid-community/core';\nimport { EnterpriseCoreModule } from '@ag-grid-enterprise/core';\nimport { SetFilter } from './setFilter/setFilter';\nimport { SetFloatingFilterComp } from './setFilter/setFloatingFilter';\nexport var SetFilterModule = {\n moduleName: ModuleNames.SetFilterModule,\n beans: [],\n userComponents: [\n { componentName: 'agSetColumnFilter', componentClass: SetFilter },\n { componentName: 'agSetColumnFloatingFilter', componentClass: SetFloatingFilterComp },\n ],\n dependantModules: [\n EnterpriseCoreModule\n ]\n};\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Bean, BeanStub } from '@ag-grid-community/core';\nvar StatusBarService = /** @class */ (function (_super) {\n __extends(StatusBarService, _super);\n // tslint:disable-next-line\n function StatusBarService() {\n var _this = _super.call(this) || this;\n _this.allComponents = {};\n return _this;\n }\n StatusBarService.prototype.registerStatusPanel = function (key, component) {\n this.allComponents[key] = component;\n };\n StatusBarService.prototype.getStatusPanel = function (key) {\n return this.allComponents[key];\n };\n StatusBarService = __decorate([\n Bean('statusBarService')\n ], StatusBarService);\n return StatusBarService;\n}(BeanStub));\nexport { StatusBarService };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Component, PostConstruct, AgPromise, RefSelector } from '@ag-grid-community/core';\nvar StatusBar = /** @class */ (function (_super) {\n __extends(StatusBar, _super);\n function StatusBar() {\n return _super.call(this, StatusBar.TEMPLATE) || this;\n }\n StatusBar.prototype.postConstruct = function () {\n if (this.gridOptions.statusBar && this.gridOptions.statusBar.statusPanels) {\n var leftStatusPanelComponents = this.gridOptions.statusBar.statusPanels\n .filter(function (componentConfig) { return componentConfig.align === 'left'; });\n this.createAndRenderComponents(leftStatusPanelComponents, this.eStatusBarLeft);\n var centerStatusPanelComponents = this.gridOptions.statusBar.statusPanels\n .filter(function (componentConfig) { return componentConfig.align === 'center'; });\n this.createAndRenderComponents(centerStatusPanelComponents, this.eStatusBarCenter);\n var rightStatusPanelComponents = this.gridOptions.statusBar.statusPanels\n .filter(function (componentConfig) { return (!componentConfig.align || componentConfig.align === 'right'); });\n this.createAndRenderComponents(rightStatusPanelComponents, this.eStatusBarRight);\n }\n else {\n this.setDisplayed(false);\n }\n };\n StatusBar.prototype.createAndRenderComponents = function (statusBarComponents, ePanelComponent) {\n var _this = this;\n var componentDetails = [];\n statusBarComponents.forEach(function (componentConfig) {\n var params = {};\n var compDetails = _this.userComponentFactory.getStatusPanelCompDetails(componentConfig, params);\n var promise = compDetails.newAgStackInstance();\n if (!promise) {\n return;\n }\n componentDetails.push({\n // default to the component name if no key supplied\n key: componentConfig.key || componentConfig.statusPanel,\n promise: promise\n });\n });\n AgPromise.all(componentDetails.map(function (details) { return details.promise; }))\n .then(function () {\n componentDetails.forEach(function (componentDetail) {\n componentDetail.promise.then(function (component) {\n var destroyFunc = function () {\n _this.getContext().destroyBean(component);\n };\n if (_this.isAlive()) {\n _this.statusBarService.registerStatusPanel(componentDetail.key, component);\n ePanelComponent.appendChild(component.getGui());\n _this.addDestroyFunc(destroyFunc);\n }\n else {\n destroyFunc();\n }\n });\n });\n });\n };\n StatusBar.TEMPLATE = \"
\\n
\\n
\\n
\\n
\";\n __decorate([\n Autowired('gridOptions')\n ], StatusBar.prototype, \"gridOptions\", void 0);\n __decorate([\n Autowired('userComponentFactory')\n ], StatusBar.prototype, \"userComponentFactory\", void 0);\n __decorate([\n Autowired('statusBarService')\n ], StatusBar.prototype, \"statusBarService\", void 0);\n __decorate([\n RefSelector('eStatusBarLeft')\n ], StatusBar.prototype, \"eStatusBarLeft\", void 0);\n __decorate([\n RefSelector('eStatusBarCenter')\n ], StatusBar.prototype, \"eStatusBarCenter\", void 0);\n __decorate([\n RefSelector('eStatusBarRight')\n ], StatusBar.prototype, \"eStatusBarRight\", void 0);\n __decorate([\n PostConstruct\n ], StatusBar.prototype, \"postConstruct\", null);\n return StatusBar;\n}(Component));\nexport { StatusBar };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Component, RefSelector } from '@ag-grid-community/core';\nvar NameValueComp = /** @class */ (function (_super) {\n __extends(NameValueComp, _super);\n function NameValueComp() {\n return _super.call(this, NameValueComp.TEMPLATE) || this;\n }\n NameValueComp.prototype.setLabel = function (key, defaultValue) {\n // we want to hide until the first value comes in\n this.setDisplayed(false);\n var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n this.eLabel.innerHTML = localeTextFunc(key, defaultValue);\n };\n NameValueComp.prototype.setValue = function (value) {\n this.eValue.innerHTML = value;\n };\n NameValueComp.TEMPLATE = \"
\\n : \\n \\n
\";\n __decorate([\n RefSelector('eLabel')\n ], NameValueComp.prototype, \"eLabel\", void 0);\n __decorate([\n RefSelector('eValue')\n ], NameValueComp.prototype, \"eValue\", void 0);\n return NameValueComp;\n}(Component));\nexport { NameValueComp };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Events, PostConstruct, _ } from '@ag-grid-community/core';\nimport { NameValueComp } from \"./nameValueComp\";\nvar TotalAndFilteredRowsComp = /** @class */ (function (_super) {\n __extends(TotalAndFilteredRowsComp, _super);\n function TotalAndFilteredRowsComp() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n TotalAndFilteredRowsComp.prototype.postConstruct = function () {\n // this component is only really useful with client side row model\n if (this.gridApi.getModel().getType() !== 'clientSide') {\n console.warn(\"AG Grid: agTotalAndFilteredRowCountComponent should only be used with the client side row model.\");\n return;\n }\n this.setLabel('totalAndFilteredRows', 'Rows');\n this.addCssClass('ag-status-panel');\n this.addCssClass('ag-status-panel-total-and-filtered-row-count');\n this.setDisplayed(true);\n this.addManagedListener(this.eventService, Events.EVENT_MODEL_UPDATED, this.onDataChanged.bind(this));\n this.onDataChanged();\n };\n TotalAndFilteredRowsComp.prototype.onDataChanged = function () {\n var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n var thousandSeparator = localeTextFunc('thousandSeparator', ',');\n var decimalSeparator = localeTextFunc('decimalSeparator', '.');\n var rowCount = _.formatNumberCommas(this.getFilteredRowCountValue(), thousandSeparator, decimalSeparator);\n var totalRowCount = _.formatNumberCommas(this.getTotalRowCount(), thousandSeparator, decimalSeparator);\n if (rowCount === totalRowCount) {\n this.setValue(rowCount);\n }\n else {\n var localeTextFunc_1 = this.gridOptionsWrapper.getLocaleTextFunc();\n this.setValue(rowCount + \" \" + localeTextFunc_1('of', 'of') + \" \" + totalRowCount);\n }\n };\n TotalAndFilteredRowsComp.prototype.getFilteredRowCountValue = function () {\n var filteredRowCount = 0;\n this.gridApi.forEachNodeAfterFilter(function (node) {\n if (!node.group) {\n filteredRowCount++;\n }\n });\n return filteredRowCount;\n };\n TotalAndFilteredRowsComp.prototype.getTotalRowCount = function () {\n var totalRowCount = 0;\n this.gridApi.forEachNode(function (node) {\n if (!node.group) {\n totalRowCount++;\n }\n });\n return totalRowCount;\n };\n TotalAndFilteredRowsComp.prototype.init = function () { };\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n TotalAndFilteredRowsComp.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n __decorate([\n Autowired('gridApi')\n ], TotalAndFilteredRowsComp.prototype, \"gridApi\", void 0);\n __decorate([\n PostConstruct\n ], TotalAndFilteredRowsComp.prototype, \"postConstruct\", null);\n return TotalAndFilteredRowsComp;\n}(NameValueComp));\nexport { TotalAndFilteredRowsComp };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Events, PostConstruct, _ } from '@ag-grid-community/core';\nimport { NameValueComp } from \"./nameValueComp\";\nvar FilteredRowsComp = /** @class */ (function (_super) {\n __extends(FilteredRowsComp, _super);\n function FilteredRowsComp() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n FilteredRowsComp.prototype.postConstruct = function () {\n this.setLabel('filteredRows', 'Filtered');\n // this component is only really useful with client side row model\n if (this.gridApi.getModel().getType() !== 'clientSide') {\n console.warn(\"AG Grid: agFilteredRowCountComponent should only be used with the client side row model.\");\n return;\n }\n this.addCssClass('ag-status-panel');\n this.addCssClass('ag-status-panel-filtered-row-count');\n this.setDisplayed(true);\n var listener = this.onDataChanged.bind(this);\n this.addManagedListener(this.eventService, Events.EVENT_MODEL_UPDATED, listener);\n listener();\n };\n FilteredRowsComp.prototype.onDataChanged = function () {\n var totalRowCountValue = this.getTotalRowCountValue();\n var filteredRowCountValue = this.getFilteredRowCountValue();\n var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n var thousandSeparator = localeTextFunc('thousandSeparator', ',');\n var decimalSeparator = localeTextFunc('decimalSeparator', '.');\n this.setValue(_.formatNumberCommas(filteredRowCountValue, thousandSeparator, decimalSeparator));\n this.setDisplayed(totalRowCountValue !== filteredRowCountValue);\n };\n FilteredRowsComp.prototype.getTotalRowCountValue = function () {\n var totalRowCount = 0;\n this.gridApi.forEachNode(function (node) { return totalRowCount += 1; });\n return totalRowCount;\n };\n FilteredRowsComp.prototype.getFilteredRowCountValue = function () {\n var filteredRowCount = 0;\n this.gridApi.forEachNodeAfterFilter(function (node) {\n if (!node.group) {\n filteredRowCount += 1;\n }\n });\n return filteredRowCount;\n };\n FilteredRowsComp.prototype.init = function () { };\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n FilteredRowsComp.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n __decorate([\n Autowired('gridApi')\n ], FilteredRowsComp.prototype, \"gridApi\", void 0);\n __decorate([\n PostConstruct\n ], FilteredRowsComp.prototype, \"postConstruct\", null);\n return FilteredRowsComp;\n}(NameValueComp));\nexport { FilteredRowsComp };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Events, PostConstruct, _ } from '@ag-grid-community/core';\nimport { NameValueComp } from \"./nameValueComp\";\nvar TotalRowsComp = /** @class */ (function (_super) {\n __extends(TotalRowsComp, _super);\n function TotalRowsComp() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n TotalRowsComp.prototype.postConstruct = function () {\n this.setLabel('totalRows', 'Total Rows');\n // this component is only really useful with client side row model\n if (this.gridApi.getModel().getType() !== 'clientSide') {\n console.warn(\"AG Grid: agTotalRowCountComponent should only be used with the client side row model.\");\n return;\n }\n this.addCssClass('ag-status-panel');\n this.addCssClass('ag-status-panel-total-row-count');\n this.setDisplayed(true);\n this.addManagedListener(this.eventService, Events.EVENT_MODEL_UPDATED, this.onDataChanged.bind(this));\n this.onDataChanged();\n };\n TotalRowsComp.prototype.onDataChanged = function () {\n var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n var thousandSeparator = localeTextFunc('thousandSeparator', ',');\n var decimalSeparator = localeTextFunc('decimalSeparator', '.');\n this.setValue(_.formatNumberCommas(this.getRowCountValue(), thousandSeparator, decimalSeparator));\n };\n TotalRowsComp.prototype.getRowCountValue = function () {\n var totalRowCount = 0;\n this.gridApi.forEachLeafNode(function (node) { return totalRowCount += 1; });\n return totalRowCount;\n };\n TotalRowsComp.prototype.init = function () {\n };\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n TotalRowsComp.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n __decorate([\n Autowired('gridApi')\n ], TotalRowsComp.prototype, \"gridApi\", void 0);\n __decorate([\n PostConstruct\n ], TotalRowsComp.prototype, \"postConstruct\", null);\n return TotalRowsComp;\n}(NameValueComp));\nexport { TotalRowsComp };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Events, PostConstruct, _ } from '@ag-grid-community/core';\nimport { NameValueComp } from \"./nameValueComp\";\nvar SelectedRowsComp = /** @class */ (function (_super) {\n __extends(SelectedRowsComp, _super);\n function SelectedRowsComp() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SelectedRowsComp.prototype.postConstruct = function () {\n if (!this.isValidRowModel()) {\n console.warn(\"AG Grid: agSelectedRowCountComponent should only be used with the client and server side row model.\");\n return;\n }\n this.setLabel('selectedRows', 'Selected');\n this.addCssClass('ag-status-panel');\n this.addCssClass('ag-status-panel-selected-row-count');\n var selectedRowCount = this.gridApi.getSelectedRows().length;\n var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n var thousandSeparator = localeTextFunc('thousandSeparator', ',');\n var decimalSeparator = localeTextFunc('decimalSeparator', '.');\n this.setValue(_.formatNumberCommas(selectedRowCount, thousandSeparator, decimalSeparator));\n this.setDisplayed(selectedRowCount > 0);\n var eventListener = this.onRowSelectionChanged.bind(this);\n this.addManagedListener(this.eventService, Events.EVENT_MODEL_UPDATED, eventListener);\n this.addManagedListener(this.eventService, Events.EVENT_SELECTION_CHANGED, eventListener);\n };\n SelectedRowsComp.prototype.isValidRowModel = function () {\n // this component is only really useful with client or server side rowmodels\n var rowModelType = this.gridApi.getModel().getType();\n return rowModelType === 'clientSide' || rowModelType === 'serverSide';\n };\n SelectedRowsComp.prototype.onRowSelectionChanged = function () {\n var selectedRowCount = this.gridApi.getSelectedRows().length;\n var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n var thousandSeparator = localeTextFunc('thousandSeparator', ',');\n var decimalSeparator = localeTextFunc('decimalSeparator', '.');\n this.setValue(_.formatNumberCommas(selectedRowCount, thousandSeparator, decimalSeparator));\n this.setDisplayed(selectedRowCount > 0);\n };\n SelectedRowsComp.prototype.init = function () {\n };\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n SelectedRowsComp.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n __decorate([\n Autowired('gridApi')\n ], SelectedRowsComp.prototype, \"gridApi\", void 0);\n __decorate([\n PostConstruct\n ], SelectedRowsComp.prototype, \"postConstruct\", null);\n return SelectedRowsComp;\n}(NameValueComp));\nexport { SelectedRowsComp };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Component, Events, PostConstruct, RefSelector, _, Optional } from '@ag-grid-community/core';\nvar AggregationComp = /** @class */ (function (_super) {\n __extends(AggregationComp, _super);\n function AggregationComp() {\n return _super.call(this, AggregationComp.TEMPLATE) || this;\n }\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n AggregationComp.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n AggregationComp.prototype.postConstruct = function () {\n if (!this.isValidRowModel()) {\n console.warn(\"AG Grid: agAggregationComponent should only be used with the client and server side row model.\");\n return;\n }\n this.avgAggregationComp.setLabel('avg', 'Average');\n this.countAggregationComp.setLabel('count', 'Count');\n this.minAggregationComp.setLabel('min', 'Min');\n this.maxAggregationComp.setLabel('max', 'Max');\n this.sumAggregationComp.setLabel('sum', 'Sum');\n this.addManagedListener(this.eventService, Events.EVENT_RANGE_SELECTION_CHANGED, this.onRangeSelectionChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_MODEL_UPDATED, this.onRangeSelectionChanged.bind(this));\n };\n AggregationComp.prototype.isValidRowModel = function () {\n // this component is only really useful with client or server side rowmodels\n var rowModelType = this.gridApi.getModel().getType();\n return rowModelType === 'clientSide' || rowModelType === 'serverSide';\n };\n AggregationComp.prototype.init = function () {\n };\n AggregationComp.prototype.setAggregationComponentValue = function (aggFuncName, value, visible) {\n var statusBarValueComponent = this.getAggregationValueComponent(aggFuncName);\n if (_.exists(statusBarValueComponent) && statusBarValueComponent) {\n var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n var thousandSeparator = localeTextFunc('thousandSeparator', ',');\n var decimalSeparator = localeTextFunc('decimalSeparator', '.');\n statusBarValueComponent.setValue(_.formatNumberTwoDecimalPlacesAndCommas(value, thousandSeparator, decimalSeparator));\n statusBarValueComponent.setDisplayed(visible);\n }\n };\n AggregationComp.prototype.getAggregationValueComponent = function (aggFuncName) {\n // converts user supplied agg name to our reference - eg: sum => sumAggregationComp\n var refComponentName = aggFuncName + \"AggregationComp\";\n // if the user has specified the agAggregationPanelComp but no aggFuncs we show the all\n // if the user has specified the agAggregationPanelComp and aggFuncs, then we only show the aggFuncs listed\n var statusBarValueComponent = null;\n var aggregationPanelConfig = _.exists(this.gridOptions.statusBar) && this.gridOptions.statusBar ? this.gridOptions.statusBar.statusPanels.find(function (panel) { return panel.statusPanel === 'agAggregationComponent'; }) : null;\n if (_.exists(aggregationPanelConfig) && aggregationPanelConfig) {\n // a little defensive here - if no statusPanelParams show it, if componentParams we also expect aggFuncs\n if (!_.exists(aggregationPanelConfig.statusPanelParams) ||\n (_.exists(aggregationPanelConfig.statusPanelParams) &&\n _.exists(aggregationPanelConfig.statusPanelParams.aggFuncs) &&\n _.exists(aggregationPanelConfig.statusPanelParams.aggFuncs.find(function (func) { return func === aggFuncName; })))) {\n statusBarValueComponent = this[refComponentName];\n }\n }\n else {\n // components not specified - assume we can show this component\n statusBarValueComponent = this[refComponentName];\n }\n // either we can't find it (which would indicate a typo or similar user side), or the user has deliberately\n // not listed the component in aggFuncs\n return statusBarValueComponent;\n };\n AggregationComp.prototype.onRangeSelectionChanged = function () {\n var _this = this;\n var cellRanges = this.rangeService ? this.rangeService.getCellRanges() : undefined;\n var sum = 0;\n var count = 0;\n var numberCount = 0;\n var min = null;\n var max = null;\n var cellsSoFar = {};\n if (cellRanges && !_.missingOrEmpty(cellRanges)) {\n cellRanges.forEach(function (cellRange) {\n var currentRow = _this.rangeService.getRangeStartRow(cellRange);\n var lastRow = _this.rangeService.getRangeEndRow(cellRange);\n while (true) {\n var finishedAllRows = _.missing(currentRow) || !currentRow || _this.rowPositionUtils.before(lastRow, currentRow);\n if (finishedAllRows || !currentRow || !cellRange.columns) {\n break;\n }\n cellRange.columns.forEach(function (col) {\n if (currentRow === null) {\n return;\n }\n // we only want to include each cell once, in case a cell is in multiple ranges\n var cellId = _this.cellPositionUtils.createId({\n rowPinned: currentRow.rowPinned,\n column: col,\n rowIndex: currentRow.rowIndex\n });\n if (cellsSoFar[cellId]) {\n return;\n }\n cellsSoFar[cellId] = true;\n var rowNode = _this.rowRenderer.getRowNode(currentRow);\n if (_.missing(rowNode)) {\n return;\n }\n var value = _this.valueService.getValue(col, rowNode);\n // if empty cell, skip it, doesn't impact count or anything\n if (_.missing(value) || value === '') {\n return;\n }\n // see if value is wrapped, can happen when doing count() or avg() functions\n if (value.value) {\n value = value.value;\n }\n if (typeof value === 'string') {\n value = Number(value);\n }\n if (typeof value === 'number' && !isNaN(value)) {\n sum += value;\n if (max === null || value > max) {\n max = value;\n }\n if (min === null || value < min) {\n min = value;\n }\n numberCount++;\n }\n count++;\n });\n currentRow = _this.cellNavigationService.getRowBelow(currentRow);\n }\n });\n }\n var gotResult = count > 1;\n var gotNumberResult = numberCount > 1;\n // we show count even if no numbers\n this.setAggregationComponentValue('count', count, gotResult);\n // show if numbers found\n this.setAggregationComponentValue('sum', sum, gotNumberResult);\n this.setAggregationComponentValue('min', min, gotNumberResult);\n this.setAggregationComponentValue('max', max, gotNumberResult);\n this.setAggregationComponentValue('avg', (sum / numberCount), gotNumberResult);\n };\n AggregationComp.TEMPLATE = \"
\\n \\n \\n \\n \\n \\n
\";\n __decorate([\n Optional('rangeService')\n ], AggregationComp.prototype, \"rangeService\", void 0);\n __decorate([\n Autowired('valueService')\n ], AggregationComp.prototype, \"valueService\", void 0);\n __decorate([\n Autowired('cellNavigationService')\n ], AggregationComp.prototype, \"cellNavigationService\", void 0);\n __decorate([\n Autowired('rowRenderer')\n ], AggregationComp.prototype, \"rowRenderer\", void 0);\n __decorate([\n Autowired('gridOptions')\n ], AggregationComp.prototype, \"gridOptions\", void 0);\n __decorate([\n Autowired('gridApi')\n ], AggregationComp.prototype, \"gridApi\", void 0);\n __decorate([\n Autowired('cellPositionUtils')\n ], AggregationComp.prototype, \"cellPositionUtils\", void 0);\n __decorate([\n Autowired('rowPositionUtils')\n ], AggregationComp.prototype, \"rowPositionUtils\", void 0);\n __decorate([\n RefSelector('sumAggregationComp')\n ], AggregationComp.prototype, \"sumAggregationComp\", void 0);\n __decorate([\n RefSelector('countAggregationComp')\n ], AggregationComp.prototype, \"countAggregationComp\", void 0);\n __decorate([\n RefSelector('minAggregationComp')\n ], AggregationComp.prototype, \"minAggregationComp\", void 0);\n __decorate([\n RefSelector('maxAggregationComp')\n ], AggregationComp.prototype, \"maxAggregationComp\", void 0);\n __decorate([\n RefSelector('avgAggregationComp')\n ], AggregationComp.prototype, \"avgAggregationComp\", void 0);\n __decorate([\n PostConstruct\n ], AggregationComp.prototype, \"postConstruct\", null);\n return AggregationComp;\n}(Component));\nexport { AggregationComp };\n","import { ModuleNames } from \"@ag-grid-community/core\";\nimport { EnterpriseCoreModule } from \"@ag-grid-enterprise/core\";\nimport { StatusBarService } from \"./statusBar/statusBarService\";\nimport { StatusBar } from \"./statusBar/statusBar\";\nimport { NameValueComp } from \"./statusBar/providedPanels/nameValueComp\";\nimport { TotalAndFilteredRowsComp } from \"./statusBar/providedPanels/totalAndFilteredRowsComp\";\nimport { FilteredRowsComp } from \"./statusBar/providedPanels/filteredRowsComp\";\nimport { TotalRowsComp } from \"./statusBar/providedPanels/totalRowsComp\";\nimport { SelectedRowsComp } from \"./statusBar/providedPanels/selectedRowsComp\";\nimport { AggregationComp } from \"./statusBar/providedPanels/aggregationComp\";\nexport var StatusBarModule = {\n moduleName: ModuleNames.StatusBarModule,\n beans: [StatusBarService],\n agStackComponents: [\n { componentName: 'AgStatusBar', componentClass: StatusBar },\n { componentName: 'AgNameValue', componentClass: NameValueComp },\n ],\n userComponents: [\n { componentName: 'agAggregationComponent', componentClass: AggregationComp },\n { componentName: 'agSelectedRowCountComponent', componentClass: SelectedRowsComp },\n { componentName: 'agTotalRowCountComponent', componentClass: TotalRowsComp },\n { componentName: 'agFilteredRowCountComponent', componentClass: FilteredRowsComp },\n { componentName: 'agTotalAndFilteredRowCountComponent', componentClass: TotalAndFilteredRowsComp }\n ],\n dependantModules: [\n EnterpriseCoreModule\n ]\n};\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { _, Autowired, Bean, BeanStub, Constants, Events, PostConstruct, PreDestroy, RowNode } from \"@ag-grid-community/core\";\nvar ViewportRowModel = /** @class */ (function (_super) {\n __extends(ViewportRowModel, _super);\n function ViewportRowModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n // rowRenderer tells us these\n _this.firstRow = -1;\n _this.lastRow = -1;\n // datasource tells us this\n _this.rowCount = -1;\n _this.rowNodesByIndex = {};\n return _this;\n }\n // we don't implement as lazy row heights is not supported in this row model\n ViewportRowModel.prototype.ensureRowHeightsValid = function (startPixel, endPixel, startLimitIndex, endLimitIndex) { return false; };\n ViewportRowModel.prototype.init = function () {\n this.rowHeight = this.gridOptionsWrapper.getRowHeightAsNumber();\n this.addManagedListener(this.eventService, Events.EVENT_VIEWPORT_CHANGED, this.onViewportChanged.bind(this));\n };\n ViewportRowModel.prototype.start = function () {\n if (this.gridOptionsWrapper.getViewportDatasource()) {\n this.setViewportDatasource(this.gridOptionsWrapper.getViewportDatasource());\n }\n };\n ViewportRowModel.prototype.isLastRowIndexKnown = function () {\n return true;\n };\n ViewportRowModel.prototype.destroyDatasource = function () {\n if (!this.viewportDatasource) {\n return;\n }\n if (this.viewportDatasource.destroy) {\n this.viewportDatasource.destroy();\n }\n this.rowRenderer.datasourceChanged();\n this.firstRow = -1;\n this.lastRow = -1;\n };\n ViewportRowModel.prototype.calculateFirstRow = function (firstRenderedRow) {\n var bufferSize = this.gridOptionsWrapper.getViewportRowModelBufferSize();\n var pageSize = this.gridOptionsWrapper.getViewportRowModelPageSize();\n var afterBuffer = firstRenderedRow - bufferSize;\n if (afterBuffer < 0) {\n return 0;\n }\n return Math.floor(afterBuffer / pageSize) * pageSize;\n };\n ViewportRowModel.prototype.calculateLastRow = function (lastRenderedRow) {\n if (lastRenderedRow === -1) {\n return lastRenderedRow;\n }\n var bufferSize = this.gridOptionsWrapper.getViewportRowModelBufferSize();\n var pageSize = this.gridOptionsWrapper.getViewportRowModelPageSize();\n var afterBuffer = lastRenderedRow + bufferSize;\n var result = Math.ceil(afterBuffer / pageSize) * pageSize;\n var lastRowIndex = this.rowCount - 1;\n return Math.min(result, lastRowIndex);\n };\n ViewportRowModel.prototype.onViewportChanged = function (event) {\n var newFirst = this.calculateFirstRow(event.firstRow);\n var newLast = this.calculateLastRow(event.lastRow);\n if (this.firstRow !== newFirst || this.lastRow !== newLast) {\n this.firstRow = newFirst;\n this.lastRow = newLast;\n this.purgeRowsNotInViewport();\n if (this.viewportDatasource) {\n this.viewportDatasource.setViewportRange(this.firstRow, this.lastRow);\n }\n }\n };\n ViewportRowModel.prototype.purgeRowsNotInViewport = function () {\n var _this = this;\n Object.keys(this.rowNodesByIndex).forEach(function (indexStr) {\n var index = parseInt(indexStr, 10);\n if (index < _this.firstRow || index > _this.lastRow) {\n delete _this.rowNodesByIndex[index];\n }\n });\n };\n ViewportRowModel.prototype.setViewportDatasource = function (viewportDatasource) {\n this.destroyDatasource();\n this.viewportDatasource = viewportDatasource;\n this.rowCount = 0;\n if (!viewportDatasource.init) {\n console.warn('AG Grid: viewport is missing init method.');\n }\n else {\n viewportDatasource.init({\n setRowCount: this.setRowCount.bind(this),\n setRowData: this.setRowData.bind(this),\n getRow: this.getRow.bind(this)\n });\n }\n };\n ViewportRowModel.prototype.getType = function () {\n return Constants.ROW_MODEL_TYPE_VIEWPORT;\n };\n ViewportRowModel.prototype.getRow = function (rowIndex) {\n if (!this.rowNodesByIndex[rowIndex]) {\n this.rowNodesByIndex[rowIndex] = this.createBlankRowNode(rowIndex);\n }\n return this.rowNodesByIndex[rowIndex];\n };\n ViewportRowModel.prototype.getRowNode = function (id) {\n var result;\n this.forEachNode(function (rowNode) {\n if (rowNode.id === id) {\n result = rowNode;\n }\n });\n return result;\n };\n ViewportRowModel.prototype.getRowCount = function () {\n return this.rowCount;\n };\n ViewportRowModel.prototype.getRowIndexAtPixel = function (pixel) {\n if (this.rowHeight !== 0) { // avoid divide by zero error\n return Math.floor(pixel / this.rowHeight);\n }\n return 0;\n };\n ViewportRowModel.prototype.getRowBounds = function (index) {\n return {\n rowHeight: this.rowHeight,\n rowTop: this.rowHeight * index\n };\n };\n ViewportRowModel.prototype.getTopLevelRowCount = function () {\n return this.getRowCount();\n };\n ViewportRowModel.prototype.getTopLevelRowDisplayedIndex = function (topLevelIndex) {\n return topLevelIndex;\n };\n ViewportRowModel.prototype.isEmpty = function () {\n return this.rowCount > 0;\n };\n ViewportRowModel.prototype.isRowsToRender = function () {\n return this.rowCount > 0;\n };\n ViewportRowModel.prototype.getNodesInRangeForSelection = function (firstInRange, lastInRange) {\n var firstIndex = _.missing(firstInRange) ? 0 : firstInRange.rowIndex;\n var lastIndex = lastInRange.rowIndex;\n var firstNodeOutOfRange = firstIndex < this.firstRow || firstIndex > this.lastRow;\n var lastNodeOutOfRange = lastIndex < this.firstRow || lastIndex > this.lastRow;\n if (firstNodeOutOfRange || lastNodeOutOfRange) {\n return [];\n }\n var result = [];\n var startIndex = firstIndex <= lastIndex ? firstIndex : lastIndex;\n var endIndex = firstIndex <= lastIndex ? lastIndex : firstIndex;\n for (var i = startIndex; i <= endIndex; i++) {\n result.push(this.rowNodesByIndex[i]);\n }\n return result;\n };\n ViewportRowModel.prototype.forEachNode = function (callback) {\n var _this = this;\n var callbackCount = 0;\n Object.keys(this.rowNodesByIndex).forEach(function (indexStr) {\n var index = parseInt(indexStr, 10);\n var rowNode = _this.rowNodesByIndex[index];\n callback(rowNode, callbackCount);\n callbackCount++;\n });\n };\n ViewportRowModel.prototype.setRowData = function (rowData) {\n var _this = this;\n _.iterateObject(rowData, function (indexStr, dataItem) {\n var index = parseInt(indexStr, 10);\n // we should never keep rows that we didn't specifically ask for, this\n // guarantees the contract we have with the server.\n if (index >= _this.firstRow && index <= _this.lastRow) {\n var rowNode = _this.rowNodesByIndex[index];\n // the abnormal case is we requested a row even though the grid didn't need it\n // as a result of the paging and buffer (ie the row is off screen), in which\n // case we need to create a new node now\n if (_.missing(rowNode)) {\n rowNode = _this.createBlankRowNode(index);\n _this.rowNodesByIndex[index] = rowNode;\n }\n // now we deffo have a row node, so set in the details\n // if the grid already asked for this row (the normal case), then we would\n // of put a placeholder node in place.\n rowNode.setDataAndId(dataItem, index.toString());\n }\n });\n };\n ViewportRowModel.prototype.createBlankRowNode = function (rowIndex) {\n var rowNode = new RowNode(this.beans);\n rowNode.setRowHeight(this.rowHeight);\n rowNode.setRowTop(this.rowHeight * rowIndex);\n rowNode.setRowIndex(rowIndex);\n return rowNode;\n };\n ViewportRowModel.prototype.setRowCount = function (rowCount, keepRenderedRows) {\n if (keepRenderedRows === void 0) { keepRenderedRows = false; }\n if (rowCount === this.rowCount) {\n return;\n }\n this.rowCount = rowCount;\n var event = {\n type: Events.EVENT_MODEL_UPDATED,\n api: this.gridApi,\n columnApi: this.columnApi,\n newData: false,\n newPage: false,\n keepRenderedRows: keepRenderedRows,\n animate: false\n };\n this.eventService.dispatchEvent(event);\n };\n ViewportRowModel.prototype.isRowPresent = function (rowNode) {\n return false;\n };\n __decorate([\n Autowired('gridApi')\n ], ViewportRowModel.prototype, \"gridApi\", void 0);\n __decorate([\n Autowired('columnApi')\n ], ViewportRowModel.prototype, \"columnApi\", void 0);\n __decorate([\n Autowired('rowRenderer')\n ], ViewportRowModel.prototype, \"rowRenderer\", void 0);\n __decorate([\n Autowired('beans')\n ], ViewportRowModel.prototype, \"beans\", void 0);\n __decorate([\n PostConstruct\n ], ViewportRowModel.prototype, \"init\", null);\n __decorate([\n PreDestroy\n ], ViewportRowModel.prototype, \"destroyDatasource\", null);\n ViewportRowModel = __decorate([\n Bean('rowModel')\n ], ViewportRowModel);\n return ViewportRowModel;\n}(BeanStub));\nexport { ViewportRowModel };\n","import { ModuleNames } from \"@ag-grid-community/core\";\nimport { EnterpriseCoreModule } from \"@ag-grid-enterprise/core\";\nimport { ViewportRowModel } from \"./viewportRowModel/viewportRowModel\";\nexport var ViewportRowModelModule = {\n moduleName: ModuleNames.ViewportRowModelModule,\n rowModels: { viewport: ViewportRowModel },\n dependantModules: [\n EnterpriseCoreModule\n ]\n};\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nimport { Group } from '../scene/group';\nimport { Scene } from '../scene/scene';\nimport { Observable } from '../util/observable';\nimport { createId } from '../util/id';\nimport { Padding } from '../util/padding';\nimport { defaultTooltipCss } from './tooltip/defaultTooltipCss';\nimport { isContinuous, isDate, isNumber, isString, isStringObject } from '../util/value';\nimport { LinearScale } from '../scale/linearScale';\nimport { TimeScale } from '../scale/timeScale';\nimport { BandScale } from '../scale/bandScale';\nimport { extent } from '../util/array';\nimport { locale } from '../util/time/format/defaultLocale';\nvar SparklineAxis = /** @class */ (function (_super) {\n __extends(SparklineAxis, _super);\n function SparklineAxis() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'category';\n _this.stroke = 'rgb(204, 214, 235)';\n _this.strokeWidth = 1;\n return _this;\n }\n return SparklineAxis;\n}(Observable));\nexport { SparklineAxis };\nvar Sparkline = /** @class */ (function (_super) {\n __extends(Sparkline, _super);\n function Sparkline() {\n var _this = _super.call(this) || this;\n _this.id = createId(_this);\n _this.seriesRect = {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n };\n _this._context = undefined;\n _this._container = undefined;\n _this._data = undefined;\n _this.padding = new Padding(3);\n _this.xKey = 'x';\n _this.yKey = 'y';\n _this.dataType = undefined;\n _this.xData = [];\n _this.yData = [];\n // Minimum y value in provided data.\n _this.min = undefined;\n // Maximum y value in provided data.\n _this.max = undefined;\n _this.yScale = new LinearScale();\n _this.axis = new SparklineAxis();\n _this.highlightStyle = {\n size: 6,\n fill: 'yellow',\n stroke: 'silver',\n strokeWidth: 1,\n };\n _this._width = 100;\n _this._height = 100;\n _this.smallestInterval = undefined;\n _this.layoutId = 0;\n _this.defaultDateFormatter = locale.format('%m/%d/%y, %H:%M:%S');\n _this._onMouseMove = _this.onMouseMove.bind(_this);\n _this._onMouseOut = _this.onMouseOut.bind(_this);\n var root = new Group();\n _this.rootGroup = root;\n var element = document.createElement('div');\n element.setAttribute('class', 'ag-sparkline-wrapper');\n var scene = new Scene(document);\n _this.scene = scene;\n _this.canvasElement = scene.canvas.element;\n scene.root = root;\n scene.container = element;\n scene.resize(_this.width, _this.height);\n _this.seriesRect.width = _this.width;\n _this.seriesRect.height = _this.height;\n // one style element for tooltip styles per document\n if (Sparkline.tooltipDocuments.indexOf(document) === -1) {\n var styleElement = document.createElement('style');\n styleElement.innerHTML = defaultTooltipCss;\n document.head.insertBefore(styleElement, document.head.querySelector('style'));\n Sparkline.tooltipDocuments.push(document);\n }\n _this.setupDomEventListeners(_this.scene.canvas.element);\n return _this;\n }\n Object.defineProperty(Sparkline.prototype, \"context\", {\n get: function () {\n return this._context;\n },\n set: function (value) {\n if (this._context !== value) {\n this._context = value;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sparkline.prototype, \"container\", {\n get: function () {\n return this._container;\n },\n set: function (value) {\n if (this._container !== value) {\n var parentNode = this.canvasElement.parentNode;\n if (parentNode != null) {\n parentNode.removeChild(this.canvasElement);\n }\n if (value) {\n value.appendChild(this.canvasElement);\n }\n this._container = value;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sparkline.prototype, \"data\", {\n get: function () {\n return this._data;\n },\n set: function (value) {\n if (this._data !== value) {\n this._data = value;\n this.processData();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sparkline.prototype, \"width\", {\n get: function () {\n return this._width;\n },\n set: function (value) {\n if (this._width !== value) {\n this._width = value;\n this.scene.resize(value, this.height);\n this.scheduleLayout();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sparkline.prototype, \"height\", {\n get: function () {\n return this._height;\n },\n set: function (value) {\n if (this._height !== value) {\n this._height = value;\n this.scene.resize(this.width, value);\n this.scheduleLayout();\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Generate node data from processed data.\n * Produce data joins.\n * Update selection's nodes using node data.\n */\n Sparkline.prototype.update = function () { };\n // Update y scale based on processed data.\n Sparkline.prototype.updateYScale = function () {\n this.updateYScaleRange();\n this.updateYScaleDomain();\n };\n // Update y scale domain based on processed data.\n Sparkline.prototype.updateYScaleDomain = function () { };\n // Update y scale range based on height and padding (seriesRect).\n Sparkline.prototype.updateYScaleRange = function () {\n var _a = this, yScale = _a.yScale, seriesRect = _a.seriesRect;\n yScale.range = [seriesRect.height, 0];\n };\n // Update x scale based on processed data.\n Sparkline.prototype.updateXScale = function () {\n var type = this.axis.type;\n this.xScale = this.getXScale(type);\n this.updateXScaleRange();\n this.updateXScaleDomain();\n };\n // Update x scale range based on width and padding (seriesRect).\n Sparkline.prototype.updateXScaleRange = function () {\n this.xScale.range = [0, this.seriesRect.width];\n };\n // Update x scale domain based on processed data and type of scale.\n Sparkline.prototype.updateXScaleDomain = function () {\n var _a = this, xData = _a.xData, xScale = _a.xScale;\n var xMinMax;\n if (xScale instanceof LinearScale) {\n xMinMax = extent(xData, isNumber);\n }\n else if (xScale instanceof TimeScale) {\n xMinMax = extent(xData, isContinuous);\n }\n this.xScale.domain = xMinMax ? xMinMax.slice() : xData;\n };\n /**\n * Return xScale instance based on the provided type or return a `BandScale` by default.\n * The default type is `category`.\n * @param type\n */\n Sparkline.prototype.getXScale = function (type) {\n if (type === void 0) { type = 'category'; }\n switch (type) {\n case 'number':\n return new LinearScale();\n case 'time':\n return new TimeScale();\n case 'category':\n default:\n return new BandScale();\n }\n };\n // Update axis line.\n Sparkline.prototype.updateAxisLine = function () { };\n // Update X and Y scales and the axis line.\n Sparkline.prototype.updateAxes = function () {\n this.updateYScale();\n this.updateXScale();\n this.updateAxisLine();\n };\n // Update horizontal and vertical crosshair lines.\n Sparkline.prototype.updateCrosshairs = function () {\n this.updateXCrosshairLine();\n this.updateYCrosshairLine();\n };\n // Using processed data, generate data that backs visible nodes.\n Sparkline.prototype.generateNodeData = function () {\n return [];\n };\n // Returns persisted node data associated with the sparkline's data.\n Sparkline.prototype.getNodeData = function () {\n return [];\n };\n // Update the selection's nodes.\n Sparkline.prototype.updateNodes = function () { };\n // Update the vertical crosshair line.\n Sparkline.prototype.updateXCrosshairLine = function () { };\n // Update the horizontal crosshair line.\n Sparkline.prototype.updateYCrosshairLine = function () { };\n Sparkline.prototype.highlightDatum = function (closestDatum) {\n this.updateNodes();\n };\n Sparkline.prototype.dehighlightDatum = function () {\n this.highlightedDatum = undefined;\n this.updateNodes();\n this.updateCrosshairs();\n };\n /**\n * Highlight closest datum and display tooltip if enabled.\n * Only update if necessary, i.e. only update if the highlighted datum is different from previously highlighted datum,\n * or if there is no previously highlighted datum.\n * @param event\n */\n Sparkline.prototype.onMouseMove = function (event) {\n var closestDatum = this.pickClosestSeriesNodeDatum(event.offsetX, event.offsetY);\n if (!closestDatum) {\n return;\n }\n var oldHighlightedDatum = this.highlightedDatum;\n this.highlightedDatum = closestDatum;\n if ((this.highlightedDatum && !oldHighlightedDatum) ||\n (this.highlightedDatum && oldHighlightedDatum && this.highlightedDatum !== oldHighlightedDatum)) {\n this.highlightDatum(closestDatum);\n this.updateCrosshairs();\n }\n if (this.tooltip.enabled) {\n this.handleTooltip(event, closestDatum);\n }\n };\n /**\n * Dehighlight all nodes and remove tooltip.\n * @param event\n */\n Sparkline.prototype.onMouseOut = function (event) {\n this.dehighlightDatum();\n this.tooltip.toggle(false);\n };\n // Fetch required values from the data object and process them.\n Sparkline.prototype.processData = function () {\n var _this = this;\n var _a = this, data = _a.data, yData = _a.yData, xData = _a.xData;\n if (!data || this.invalidData(this.data)) {\n return;\n }\n yData.length = 0;\n xData.length = 0;\n var n = data.length;\n var dataType = this.getDataType(data);\n this.dataType = dataType;\n var xValueType = this.axis.type;\n var xType = xValueType !== 'number' && xValueType !== 'time' ? 'category' : xValueType;\n var isContinuousX = xType === 'number' || xType === 'time';\n var setSmallestXInterval = function (curr, prev) {\n if (_this.smallestInterval == undefined) {\n _this.smallestInterval = { x: Infinity, y: Infinity };\n }\n var x = _this.smallestInterval.x;\n var interval = Math.abs(curr - prev);\n if (interval > 0 && interval < x) {\n _this.smallestInterval.x = interval;\n }\n };\n var prevX;\n if (dataType === 'number') {\n for (var i = 0; i < n; i++) {\n var xDatum = i;\n var yDatum = data[i];\n var x = this.getDatum(xDatum, xType);\n var y = this.getDatum(yDatum, 'number');\n if (isContinuousX) {\n setSmallestXInterval(x, prevX);\n }\n xData.push(x);\n yData.push(y);\n prevX = x;\n }\n }\n else if (dataType === 'array') {\n for (var i = 0; i < n; i++) {\n var datum = data[i];\n if (Array.isArray(datum)) {\n var xDatum = datum[0];\n var yDatum = datum[1];\n var x = this.getDatum(xDatum, xType);\n var y = this.getDatum(yDatum, 'number');\n if (x == undefined) {\n continue;\n }\n if (isContinuousX) {\n setSmallestXInterval(x, prevX);\n }\n xData.push(x);\n yData.push(y);\n prevX = x;\n }\n }\n }\n else if (dataType === 'object') {\n var _b = this, yKey = _b.yKey, xKey = _b.xKey;\n for (var i = 0; i < n; i++) {\n var datum = data[i];\n if (typeof datum === 'object' && !Array.isArray(datum)) {\n var xDatum = datum[xKey];\n var yDatum = datum[yKey];\n var x = this.getDatum(xDatum, xType);\n var y = this.getDatum(yDatum, 'number');\n if (x == undefined) {\n continue;\n }\n if (isContinuousX) {\n setSmallestXInterval(x, prevX);\n }\n xData.push(x);\n yData.push(y);\n prevX = x;\n }\n }\n }\n // update axes\n this.updateAxes();\n // produce data joins and update selection's nodes\n this.update();\n };\n /**\n * Return the type of data provided to the sparkline based on the first truthy value in the data array.\n * If the value is not a number, array or object, return `undefined`.\n * @param data\n */\n Sparkline.prototype.getDataType = function (data) {\n var e_1, _a;\n try {\n for (var data_1 = __values(data), data_1_1 = data_1.next(); !data_1_1.done; data_1_1 = data_1.next()) {\n var datum = data_1_1.value;\n if (datum != undefined) {\n if (isNumber(datum)) {\n return 'number';\n }\n else if (Array.isArray(datum)) {\n return 'array';\n }\n else if (typeof datum === 'object') {\n return 'object';\n }\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (data_1_1 && !data_1_1.done && (_a = data_1.return)) _a.call(data_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n };\n /**\n * Return the given value depending on the type of axis.\n * Return `undefined` if the value is invalid for the given axis type.\n * @param value\n */\n Sparkline.prototype.getDatum = function (value, type) {\n if ((type === 'number' && isNumber(value)) || (type === 'time' && (isNumber(value) || isDate(value)))) {\n return value;\n }\n else if (type === 'category') {\n if (isString(value) || isDate(value) || isNumber(value)) {\n return { toString: function () { return String(value); } };\n }\n else if (isStringObject(value)) {\n return value;\n }\n }\n };\n Object.defineProperty(Sparkline.prototype, \"layoutScheduled\", {\n /**\n * Only `true` while we are waiting for the layout to start.\n * This will be `false` if the layout has already started and is ongoing.\n */\n get: function () {\n return !!this.layoutId;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Execute update method on the next available screen repaint to make changes to the canvas.\n * If we are waiting for a layout to start and a new layout is requested,\n * cancel the previous layout using the non 0 integer (this.layoutId) returned from requestAnimationFrame.\n */\n Sparkline.prototype.scheduleLayout = function () {\n var _this = this;\n if (this.layoutId) {\n cancelAnimationFrame(this.layoutId);\n }\n this.layoutId = requestAnimationFrame(function () {\n _this.setSparklineDimensions();\n if (_this.invalidData(_this.data)) {\n return;\n }\n // update axes ranges\n _this.updateXScaleRange();\n _this.updateYScaleRange();\n // update axis line\n _this.updateAxisLine();\n // produce data joins and update selection's nodes\n _this.update();\n _this.layoutId = 0;\n });\n };\n Sparkline.prototype.setSparklineDimensions = function () {\n var _a = this, width = _a.width, height = _a.height, padding = _a.padding, seriesRect = _a.seriesRect, rootGroup = _a.rootGroup;\n var shrunkWidth = width - padding.left - padding.right;\n var shrunkHeight = height - padding.top - padding.bottom;\n seriesRect.width = shrunkWidth;\n seriesRect.height = shrunkHeight;\n seriesRect.x = padding.left;\n seriesRect.y = padding.top;\n rootGroup.translationX = seriesRect.x;\n rootGroup.translationY = seriesRect.y;\n };\n /**\n * Return the closest data point to x/y canvas coordinates.\n * @param x\n * @param y\n */\n Sparkline.prototype.pickClosestSeriesNodeDatum = function (x, y) {\n var minDistance = Infinity;\n var closestDatum;\n var hitPoint = this.rootGroup.transformPoint(x, y);\n var nodeData = this.getNodeData();\n for (var i = 0; i < nodeData.length; i++) {\n var datum = nodeData[i];\n if (!datum.point) {\n return;\n }\n var distance = this.getDistance(hitPoint, datum.point);\n if (distance <= minDistance) {\n minDistance = distance;\n closestDatum = datum;\n }\n else {\n return closestDatum;\n }\n }\n return closestDatum;\n };\n /**\n * Return the relevant distance between two points.\n * The distance will be calculated based on the x value of the points for all sparklines except bar sparkline, where the distance is based on the y values.\n * @param x\n * @param y\n */\n Sparkline.prototype.getDistance = function (p1, p2) {\n return Math.abs(p1.x - p2.x);\n };\n /**\n * calculate x/y coordinates for tooltip based on coordinates of highlighted datum, position of canvas and page offset.\n * @param datum\n */\n Sparkline.prototype.handleTooltip = function (event, datum) {\n var seriesDatum = datum.seriesDatum;\n var canvasElement = this.canvasElement;\n var clientX = event.clientX, clientY = event.clientY;\n // confine tooltip to sparkline width if tooltip container not provided.\n if (this.tooltip.container == undefined) {\n this.tooltip.container = canvasElement;\n }\n var meta = {\n pageX: clientX,\n pageY: clientY,\n };\n var yValue = seriesDatum.y;\n var xValue = seriesDatum.x;\n // check if tooltip is enabled for this specific data point\n var enabled = this.tooltip.enabled;\n if (this.tooltip.renderer) {\n var tooltipRendererResult = this.tooltip.renderer({\n context: this.context,\n datum: seriesDatum,\n yValue: yValue,\n xValue: xValue,\n });\n enabled =\n typeof tooltipRendererResult !== 'string' && tooltipRendererResult.enabled !== undefined\n ? tooltipRendererResult.enabled\n : enabled;\n }\n var html = enabled && seriesDatum.y !== undefined && this.getTooltipHtml(datum);\n if (html) {\n this.tooltip.show(meta, html);\n }\n };\n Sparkline.prototype.formatNumericDatum = function (datum) {\n return String(Math.round(datum * 10) / 10);\n };\n Sparkline.prototype.formatDatum = function (datum) {\n var type = this.axis.type || 'category';\n if (type === 'number' && typeof datum === 'number') {\n return this.formatNumericDatum(datum);\n }\n else if (type === 'time' && (datum instanceof Date || isNumber(datum))) {\n return this.defaultDateFormatter(datum);\n }\n else {\n return String(datum);\n }\n };\n Sparkline.prototype.setupDomEventListeners = function (chartElement) {\n chartElement.addEventListener('mousemove', this._onMouseMove);\n chartElement.addEventListener('mouseout', this._onMouseOut);\n };\n Sparkline.prototype.cleanupDomEventListeners = function (chartElement) {\n chartElement.removeEventListener('mousemove', this._onMouseMove);\n chartElement.removeEventListener('mouseout', this._onMouseOut);\n };\n Sparkline.prototype.invalidData = function (data) {\n return !data || !Array.isArray(data) || data.length === 0;\n };\n /**\n * Cleanup and remove canvas element from the DOM.\n */\n Sparkline.prototype.destroy = function () {\n this.scene.container = undefined;\n // remove canvas element from the DOM\n this.container = undefined;\n this.cleanupDomEventListeners(this.scene.canvas.element);\n };\n Sparkline.tooltipDocuments = [];\n return Sparkline;\n}(Observable));\nexport { Sparkline };\n","export var defaultTooltipCss = \"\\n.ag-sparkline-tooltip-wrapper {\\n position: absolute;\\n user-select: none;\\n pointer-events: none;\\n}\\n\\n.ag-sparkline-tooltip {\\n position: relative;\\n font: 12px arial,sans-serif;\\n border-radius: 2px;\\n box-shadow: 0 1px 3px rgb(0 0 0 / 20%), 0 1px 1px rgb(0 0 0 / 14%);\\n line-height: 1.7em;\\n overflow: hidden;\\n white-space: nowrap;\\n z-index: 99999;\\n background-color: rgb(255, 255, 255);\\n color: rgba(0,0,0, 0.67);\\n}\\n\\n.ag-sparkline-tooltip-content {\\n padding: 0 7px;\\n}\\n\\n.ag-sparkline-tooltip-title {\\n padding-left: 7px;\\n}\\n\\n.ag-sparkline-tooltip-wrapper-hidden {\\n top: -10000px !important;\\n}\\n\\n.ag-sparkline-wrapper {\\n box-sizing: border-box;\\n overflow: hidden;\\n}\\n\";\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Color } from '../../util/color';\nimport { Observable } from '../../util/observable';\nexport function toTooltipHtml(input, defaults) {\n if (typeof input === 'string') {\n return input;\n }\n defaults = defaults || {};\n var _a = input.content, content = _a === void 0 ? defaults.content || '' : _a, _b = input.title, title = _b === void 0 ? defaults.title || undefined : _b, _c = input.color, color = _c === void 0 ? defaults.color : _c, _d = input.backgroundColor, backgroundColor = _d === void 0 ? defaults.backgroundColor : _d, _e = input.opacity, opacity = _e === void 0 ? defaults.opacity || 1 : _e;\n var titleHtml;\n var contentHtml;\n if (color) {\n titleHtml = title\n ? \"\" + title + \"\"\n : '';\n contentHtml = \"\" + content + \"\";\n }\n else {\n titleHtml = title ? \"\" + title + \"\" : '';\n contentHtml = \"\" + content + \"\";\n }\n if (backgroundColor) {\n var bgColor = Color.fromString(backgroundColor.toLowerCase());\n var r = bgColor.r, g = bgColor.g, b = bgColor.b, a = bgColor.a;\n // TODO: combine a and opacity for alpha?\n var alpha = opacity;\n var bgColorWithAlpha = Color.fromArray([r, g, b, alpha]);\n var bgColorRgbaString = bgColorWithAlpha.toRgbaString();\n return \"
\\n \" + titleHtml + \"\\n \" + contentHtml + \"\\n
\";\n }\n else {\n return \"
\\n \" + titleHtml + \"\\n \" + contentHtml + \"\\n
\";\n }\n}\nvar SparklineTooltip = /** @class */ (function (_super) {\n __extends(SparklineTooltip, _super);\n function SparklineTooltip() {\n var _this = _super.call(this) || this;\n _this.element = document.createElement('div');\n _this.enabled = true;\n _this.container = undefined;\n _this.xOffset = 10;\n _this.yOffset = 0;\n _this.renderer = undefined;\n var tooltipRoot = document.body;\n tooltipRoot.appendChild(_this.element);\n return _this;\n }\n SparklineTooltip.prototype.isVisible = function () {\n var element = this.element;\n if (element.classList) {\n return !element.classList.contains(SparklineTooltip.class + \"-wrapper-hidden\");\n }\n // IE11\n var classes = element.getAttribute('class');\n if (classes) {\n return classes.split(' ').indexOf(SparklineTooltip.class + \"-wrapper-hidden\") < 0;\n }\n return false;\n };\n SparklineTooltip.prototype.updateClass = function (visible) {\n var classList = [SparklineTooltip.class + \"-wrapper\"];\n if (visible !== true) {\n classList.push(SparklineTooltip.class + \"-wrapper-hidden\");\n }\n this.element.setAttribute('class', classList.join(' '));\n };\n SparklineTooltip.prototype.show = function (meta, html) {\n this.toggle(false);\n var element = this.element;\n if (html !== undefined) {\n element.innerHTML = html;\n }\n else if (!element.innerHTML) {\n return;\n }\n var left = meta.pageX + this.xOffset;\n var top = meta.pageY + this.yOffset;\n var tooltipRect = element.getBoundingClientRect();\n var maxLeft = window.innerWidth - tooltipRect.width;\n if (this.container) {\n var containerRect = this.container.getBoundingClientRect();\n maxLeft = containerRect.left + (containerRect.width - tooltipRect.width);\n }\n if (left > maxLeft) {\n left = meta.pageX - element.clientWidth - this.xOffset;\n }\n element.style.left = Math.round(left) + \"px\";\n element.style.top = Math.round(top) + \"px\";\n this.toggle(true);\n };\n SparklineTooltip.prototype.toggle = function (visible) {\n this.updateClass(visible);\n };\n SparklineTooltip.prototype.destroy = function () {\n var parentNode = this.element.parentNode;\n if (parentNode) {\n parentNode.removeChild(this.element);\n }\n };\n SparklineTooltip.class = 'ag-sparkline-tooltip';\n return SparklineTooltip;\n}(Observable));\nexport { SparklineTooltip };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Shape } from '../../scene/shape/shape';\nvar Marker = /** @class */ (function (_super) {\n __extends(Marker, _super);\n function Marker() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._x = 0;\n _this._y = 0;\n _this._size = 3;\n return _this;\n }\n Object.defineProperty(Marker.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (value) {\n if (this._x !== value) {\n this._x = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Marker.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (value) {\n if (this._y !== value) {\n this._y = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Marker.prototype, \"size\", {\n get: function () {\n return this._size;\n },\n set: function (value) {\n if (this._size !== value) {\n this._size = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n return Marker;\n}(Shape));\nexport { Marker };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Marker } from './marker';\nvar Circle = /** @class */ (function (_super) {\n __extends(Circle, _super);\n function Circle() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Circle.prototype.isPointInPath = function (x, y) {\n return false;\n };\n Circle.prototype.isPointInStroke = function (x, y) {\n return false;\n };\n Circle.prototype.render = function (ctx) {\n if (this.dirtyTransform) {\n this.computeTransformMatrix();\n }\n this.matrix.toContext(ctx);\n var _a = this, x = _a.x, y = _a.y, size = _a.size;\n var radius = size / 2;\n ctx.beginPath();\n ctx.arc(x, y, radius, 0, 2 * Math.PI, false);\n this.fillStroke(ctx);\n this.dirty = false;\n };\n Circle.className = 'Circle';\n return Circle;\n}(Marker));\nexport { Circle };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Marker } from './marker';\nvar Diamond = /** @class */ (function (_super) {\n __extends(Diamond, _super);\n function Diamond() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Diamond.prototype.isPointInStroke = function (x, y) {\n return false;\n };\n Diamond.prototype.isPointInPath = function (x, y) {\n return false;\n };\n Diamond.prototype.render = function (ctx) {\n if (this.dirtyTransform) {\n this.computeTransformMatrix();\n }\n this.matrix.toContext(ctx);\n var _a = this, x = _a.x, y = _a.y, size = _a.size;\n var hs = size / 2;\n ctx.beginPath();\n ctx.moveTo(x, (y -= hs));\n ctx.lineTo((x += hs), (y += hs));\n ctx.lineTo((x -= hs), (y += hs));\n ctx.lineTo((x -= hs), (y -= hs));\n ctx.lineTo((x += hs), (y -= hs));\n ctx.closePath();\n this.fillStroke(ctx);\n this.dirty = false;\n };\n Diamond.className = 'Diamond';\n return Diamond;\n}(Marker));\nexport { Diamond };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Marker } from './marker';\nvar Square = /** @class */ (function (_super) {\n __extends(Square, _super);\n function Square() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Square.prototype.isPointInStroke = function (x, y) {\n return false;\n };\n Square.prototype.isPointInPath = function (x, y) {\n return false;\n };\n Square.prototype.render = function (ctx) {\n if (this.dirtyTransform) {\n this.computeTransformMatrix();\n }\n this.matrix.toContext(ctx);\n var _a = this, x = _a.x, y = _a.y, size = _a.size;\n var hs = size / 2;\n ctx.beginPath();\n ctx.moveTo((x -= hs), (y -= hs));\n ctx.lineTo((x += size), y);\n ctx.lineTo(x, (y += size));\n ctx.lineTo((x -= size), y);\n ctx.lineTo(x, (y -= size));\n ctx.closePath();\n this.fillStroke(ctx);\n this.dirty = false;\n };\n Square.className = 'Square';\n return Square;\n}(Marker));\nexport { Square };\n","import { Circle } from './circle';\nimport { Diamond } from './diamond';\nimport { Square } from './square';\nexport function getMarker(shape) {\n switch (shape) {\n case 'circle':\n return Circle;\n case 'square':\n return Square;\n case 'diamond':\n return Diamond;\n default:\n return Circle;\n }\n}\n","export function getLineDash(lineCap, lineDash) {\n if (lineDash === void 0) { lineDash = 'solid'; }\n var buttOrNull = {\n solid: [],\n dash: [4, 3],\n dot: [1, 3],\n dashDot: [4, 3, 1, 3],\n dashDotDot: [4, 3, 1, 3, 1, 3],\n shortDot: [1, 1],\n shortDash: [3, 1],\n shortDashDot: [3, 1, 1, 1],\n shortDashDotDot: [3, 1, 1, 1, 1, 1],\n longDash: [8, 3],\n longDashDot: [8, 3, 1, 3],\n longDashDotDot: [8, 3, 1, 3, 1, 3]\n };\n var roundOrSquare = {\n solid: [],\n dash: [3, 3],\n dot: [0, 3],\n dashDot: [3, 3, 0, 3],\n dashDotDot: [3, 3, 0, 3, 0, 3],\n shortDot: [0, 2],\n shortDash: [2, 2],\n shortDashDot: [2, 2, 0, 2],\n shortDashDotDot: [2, 2, 0, 2, 0, 2],\n longDash: [7, 3],\n longDashDot: [7, 3, 0, 3],\n longDashDotDot: [7, 3, 0, 3, 0, 3]\n };\n if (lineCap === 'round' || lineCap === 'square') {\n if (roundOrSquare[lineDash] == undefined) {\n console.warn(\"'\" + lineDash + \"' is not a valid 'lineDash' option.\");\n return roundOrSquare.solid;\n }\n return roundOrSquare[lineDash];\n }\n if (buttOrNull[lineDash] == undefined) {\n console.warn(\"'\" + lineDash + \"' is not a valid 'lineDash' option.\");\n return buttOrNull.solid;\n }\n return buttOrNull[lineDash];\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Group } from '../../scene/group';\nimport { Path } from '../../scene/shape/path';\nimport { Line } from '../../scene/shape/line';\nimport { BandScale } from '../../scale/bandScale';\nimport { Selection } from '../../scene/selection';\nimport { Sparkline } from '../sparkline';\nimport { toTooltipHtml } from '../tooltip/sparklineTooltip';\nimport { getMarker } from '../marker/markerFactory';\nimport { extent } from '../../util/array';\nimport { isNumber } from '../../util/value';\nimport { getLineDash } from '../../util/lineDash';\nvar SparklineMarker = /** @class */ (function () {\n function SparklineMarker() {\n this.enabled = true;\n this.shape = 'circle';\n this.size = 0;\n this.fill = 'rgb(124, 181, 236)';\n this.stroke = 'rgb(124, 181, 236)';\n this.strokeWidth = 1;\n this.formatter = undefined;\n }\n return SparklineMarker;\n}());\nvar SparklineLine = /** @class */ (function () {\n function SparklineLine() {\n this.stroke = 'rgb(124, 181, 236)';\n this.strokeWidth = 1;\n }\n return SparklineLine;\n}());\nvar SparklineCrosshairs = /** @class */ (function () {\n function SparklineCrosshairs() {\n this.xLine = {\n enabled: true,\n stroke: 'rgba(0,0,0, 0.54)',\n strokeWidth: 1,\n lineDash: 'solid',\n lineCap: undefined,\n };\n this.yLine = {\n enabled: false,\n stroke: 'rgba(0,0,0, 0.54)',\n strokeWidth: 1,\n lineDash: 'solid',\n lineCap: undefined,\n };\n }\n return SparklineCrosshairs;\n}());\nvar AreaSparkline = /** @class */ (function (_super) {\n __extends(AreaSparkline, _super);\n function AreaSparkline() {\n var _this = _super.call(this) || this;\n _this.fill = 'rgba(124, 181, 236, 0.25)';\n _this.strokePath = new Path();\n _this.fillPath = new Path();\n _this.xCrosshairLine = new Line();\n _this.yCrosshairLine = new Line();\n _this.areaSparklineGroup = new Group();\n _this.fillPathData = [];\n _this.strokePathData = [];\n _this.xAxisLine = new Line();\n _this.markers = new Group();\n _this.markerSelection = Selection.select(_this.markers).selectAll();\n _this.markerSelectionData = [];\n _this.marker = new SparklineMarker();\n _this.line = new SparklineLine();\n _this.crosshairs = new SparklineCrosshairs();\n _this.rootGroup.append(_this.areaSparklineGroup);\n _this.areaSparklineGroup.append([\n _this.fillPath,\n _this.xAxisLine,\n _this.strokePath,\n _this.xCrosshairLine,\n _this.yCrosshairLine,\n _this.markers,\n ]);\n return _this;\n }\n AreaSparkline.prototype.getNodeData = function () {\n return this.markerSelectionData;\n };\n /**\n * If marker shape is changed, this method should be called to remove the previous marker nodes selection.\n */\n AreaSparkline.prototype.onMarkerShapeChange = function () {\n this.markerSelection = this.markerSelection.setData([]);\n this.markerSelection.exit.remove();\n this.scheduleLayout();\n };\n AreaSparkline.prototype.update = function () {\n var data = this.generateNodeData();\n if (!data) {\n return;\n }\n var nodeData = data.nodeData, fillData = data.fillData, strokeData = data.strokeData;\n this.markerSelectionData = nodeData;\n this.fillPathData = fillData;\n this.strokePathData = strokeData;\n this.updateSelection(nodeData);\n this.updateNodes();\n this.updateStroke(strokeData);\n this.updateFill(fillData);\n };\n AreaSparkline.prototype.updateYScaleDomain = function () {\n var _a = this, yData = _a.yData, yScale = _a.yScale;\n var yMinMax = extent(yData, isNumber);\n var yMin = 0;\n var yMax = 1;\n if (yMinMax !== undefined) {\n yMin = this.min = yMinMax[0];\n yMax = this.max = yMinMax[1];\n }\n // if yMin is positive, set yMin to 0\n yMin = yMin < 0 ? yMin : 0;\n // if yMax is negative, set yMax to 0\n yMax = yMax < 0 ? 0 : yMax;\n yScale.domain = [yMin, yMax];\n };\n AreaSparkline.prototype.generateNodeData = function () {\n var _a = this, data = _a.data, yData = _a.yData, xData = _a.xData, xScale = _a.xScale, yScale = _a.yScale;\n if (!data) {\n return;\n }\n var offsetX = xScale instanceof BandScale ? xScale.bandwidth / 2 : 0;\n var n = yData.length;\n var nodeData = [];\n var fillData = [];\n var strokeData = [];\n var firstValidX;\n var lastValidX;\n var previousX;\n var nextX;\n var yZero = yScale.convert(0);\n for (var i = 0; i < n; i++) {\n var yDatum = yData[i];\n var xDatum = xData[i];\n var x = xScale.convert(xDatum) + offsetX;\n var y = yScale.convert(yDatum);\n // if this iteration is not the last, set nextX using the next value in the data array\n if (i + 1 < n) {\n nextX = xScale.convert(xData[i + 1]) + offsetX;\n }\n // set stroke data regardless of missing/ undefined values. Undefined values will be handled in the updateStroke() method\n strokeData.push({\n seriesDatum: { x: xDatum, y: yDatum },\n point: { x: x, y: y },\n });\n if (yDatum === undefined && previousX !== undefined) {\n // if yDatum is undefined and there is a valid previous data point, add a phantom point at yZero\n // if a next data point exists, add a phantom point at yZero at the next X\n fillData.push({ seriesDatum: undefined, point: { x: previousX, y: yZero } });\n if (nextX !== undefined) {\n fillData.push({ seriesDatum: undefined, point: { x: nextX, y: yZero } });\n }\n }\n else if (yDatum !== undefined) {\n fillData.push({\n seriesDatum: { x: xDatum, y: yDatum },\n point: { x: x, y: y },\n });\n // set node data only if yDatum is not undefined. These values are used in the updateSelection() method to update markers\n nodeData.push({\n seriesDatum: { x: xDatum, y: yDatum },\n point: { x: x, y: y },\n });\n firstValidX = firstValidX !== undefined ? firstValidX : x;\n lastValidX = x;\n }\n previousX = x;\n }\n // phantom points for creating closed area\n fillData.push({ seriesDatum: undefined, point: { x: lastValidX, y: yZero } }, { seriesDatum: undefined, point: { x: firstValidX, y: yZero } });\n return { nodeData: nodeData, fillData: fillData, strokeData: strokeData };\n };\n AreaSparkline.prototype.updateAxisLine = function () {\n var _a = this, xScale = _a.xScale, yScale = _a.yScale, axis = _a.axis, xAxisLine = _a.xAxisLine;\n xAxisLine.x1 = xScale.range[0];\n xAxisLine.x2 = xScale.range[1];\n xAxisLine.y1 = xAxisLine.y2 = 0;\n xAxisLine.stroke = axis.stroke;\n xAxisLine.strokeWidth = axis.strokeWidth;\n var yZero = yScale.convert(0);\n xAxisLine.translationY = yZero;\n };\n AreaSparkline.prototype.updateSelection = function (selectionData) {\n var marker = this.marker;\n var shape = getMarker(marker.shape);\n var updateMarkerSelection = this.markerSelection.setData(selectionData);\n var enterMarkerSelection = updateMarkerSelection.enter.append(shape);\n updateMarkerSelection.exit.remove();\n this.markerSelection = updateMarkerSelection.merge(enterMarkerSelection);\n };\n AreaSparkline.prototype.updateNodes = function () {\n var _this = this;\n var _a = this, highlightedDatum = _a.highlightedDatum, highlightStyle = _a.highlightStyle, marker = _a.marker;\n var highlightSize = highlightStyle.size, highlightFill = highlightStyle.fill, highlightStroke = highlightStyle.stroke, highlightStrokeWidth = highlightStyle.strokeWidth;\n var markerFormatter = marker.formatter;\n this.markerSelection.each(function (node, datum, index) {\n var point = datum.point, seriesDatum = datum.seriesDatum;\n if (!point) {\n return;\n }\n var highlighted = datum === highlightedDatum;\n var markerFill = highlighted && highlightFill !== undefined ? highlightFill : marker.fill;\n var markerStroke = highlighted && highlightStroke !== undefined ? highlightStroke : marker.stroke;\n var markerStrokeWidth = highlighted && highlightStrokeWidth !== undefined ? highlightStrokeWidth : marker.strokeWidth;\n var markerSize = highlighted && highlightSize !== undefined ? highlightSize : marker.size;\n var markerFormat;\n if (markerFormatter) {\n var first = index === 0;\n var last = index === _this.markerSelectionData.length - 1;\n var min = seriesDatum.y === _this.min;\n var max = seriesDatum.y === _this.max;\n markerFormat = markerFormatter({\n datum: datum,\n xValue: seriesDatum.x,\n yValue: seriesDatum.y,\n min: min,\n max: max,\n first: first,\n last: last,\n fill: markerFill,\n stroke: markerStroke,\n strokeWidth: markerStrokeWidth,\n size: markerSize,\n highlighted: highlighted,\n });\n }\n node.size = markerFormat && markerFormat.size != undefined ? markerFormat.size : markerSize;\n node.fill = markerFormat && markerFormat.fill != undefined ? markerFormat.fill : markerFill;\n node.stroke = markerFormat && markerFormat.stroke != undefined ? markerFormat.stroke : markerStroke;\n node.strokeWidth =\n markerFormat && markerFormat.strokeWidth != undefined ? markerFormat.strokeWidth : markerStrokeWidth;\n node.translationX = point.x;\n node.translationY = point.y;\n node.visible =\n markerFormat && markerFormat.enabled != undefined\n ? markerFormat.enabled\n : marker.enabled && node.size > 0;\n });\n };\n AreaSparkline.prototype.updateStroke = function (strokeData) {\n var _a = this, strokePath = _a.strokePath, yData = _a.yData, line = _a.line;\n if (yData.length < 2) {\n return;\n }\n var path = strokePath.path;\n var n = strokeData.length;\n var moveTo = true;\n path.clear();\n for (var i = 0; i < n; i++) {\n var _b = strokeData[i], point = _b.point, seriesDatum = _b.seriesDatum;\n var x = point.x;\n var y = point.y;\n if (seriesDatum.y == undefined) {\n moveTo = true;\n }\n else {\n if (moveTo) {\n path.moveTo(x, y);\n moveTo = false;\n }\n else {\n path.lineTo(x, y);\n }\n }\n }\n strokePath.lineJoin = strokePath.lineCap = 'round';\n strokePath.fill = undefined;\n strokePath.stroke = line.stroke;\n strokePath.strokeWidth = line.strokeWidth;\n };\n AreaSparkline.prototype.updateFill = function (areaData) {\n var _a = this, fillPath = _a.fillPath, yData = _a.yData, fill = _a.fill;\n var path = fillPath.path;\n var n = areaData.length;\n path.clear();\n if (yData.length < 2) {\n return;\n }\n for (var i = 0; i < n; i++) {\n var point = areaData[i].point;\n var x = point.x;\n var y = point.y;\n if (i > 0) {\n path.lineTo(x, y);\n }\n else {\n path.moveTo(x, y);\n }\n }\n path.closePath();\n fillPath.lineJoin = 'round';\n fillPath.stroke = undefined;\n fillPath.fill = fill;\n };\n AreaSparkline.prototype.updateXCrosshairLine = function () {\n var _a = this, yScale = _a.yScale, xCrosshairLine = _a.xCrosshairLine, highlightedDatum = _a.highlightedDatum, xLine = _a.crosshairs.xLine;\n if (!xLine.enabled || highlightedDatum == undefined) {\n xCrosshairLine.strokeWidth = 0;\n return;\n }\n xCrosshairLine.y1 = yScale.range[0];\n xCrosshairLine.y2 = yScale.range[1];\n xCrosshairLine.x1 = xCrosshairLine.x2 = 0;\n xCrosshairLine.stroke = xLine.stroke;\n xCrosshairLine.strokeWidth = xLine.strokeWidth || 1;\n xCrosshairLine.lineCap = xLine.lineCap === 'round' || xLine.lineCap === 'square' ? xLine.lineCap : undefined;\n var lineDash = xLine.lineDash;\n xCrosshairLine.lineDash = Array.isArray(lineDash)\n ? lineDash\n : getLineDash(xCrosshairLine.lineCap, xLine.lineDash);\n xCrosshairLine.translationX = highlightedDatum.point.x;\n };\n AreaSparkline.prototype.updateYCrosshairLine = function () {\n var _a = this, xScale = _a.xScale, yCrosshairLine = _a.yCrosshairLine, highlightedDatum = _a.highlightedDatum, yLine = _a.crosshairs.yLine;\n if (!yLine.enabled || highlightedDatum == undefined) {\n yCrosshairLine.strokeWidth = 0;\n return;\n }\n yCrosshairLine.x1 = xScale.range[0];\n yCrosshairLine.x2 = xScale.range[1];\n yCrosshairLine.y1 = yCrosshairLine.y2 = 0;\n yCrosshairLine.stroke = yLine.stroke;\n yCrosshairLine.strokeWidth = yLine.strokeWidth || 1;\n yCrosshairLine.lineCap = yLine.lineCap === 'round' || yLine.lineCap === 'square' ? yLine.lineCap : undefined;\n var lineDash = yLine.lineDash;\n yCrosshairLine.lineDash = Array.isArray(lineDash)\n ? lineDash\n : getLineDash(yCrosshairLine.lineCap, yLine.lineDash);\n yCrosshairLine.translationY = highlightedDatum.point.y;\n };\n AreaSparkline.prototype.getTooltipHtml = function (datum) {\n var dataType = this.dataType;\n var seriesDatum = datum.seriesDatum;\n var yValue = seriesDatum.y;\n var xValue = seriesDatum.x;\n var content = this.formatNumericDatum(yValue);\n var title = dataType === 'array' || dataType === 'object' ? this.formatDatum(xValue) : undefined;\n var defaults = {\n content: content,\n title: title,\n };\n if (this.tooltip.renderer) {\n return toTooltipHtml(this.tooltip.renderer({\n context: this.context,\n datum: seriesDatum,\n yValue: yValue,\n xValue: xValue,\n }), defaults);\n }\n return toTooltipHtml(defaults);\n };\n AreaSparkline.className = 'AreaSparkline';\n return AreaSparkline;\n}(Sparkline));\nexport { AreaSparkline };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { BandScale } from '../../scale/bandScale';\nimport { Group } from '../../scene/group';\nimport { Path } from '../../scene/shape/path';\nimport { Selection } from '../../scene/selection';\nimport { Sparkline } from '../sparkline';\nimport { toTooltipHtml } from '../tooltip/sparklineTooltip';\nimport { getMarker } from '../marker/markerFactory';\nimport { extent } from '../../util/array';\nimport { isNumber } from '../../util/value';\nimport { Line } from '../../scene/shape/line';\nimport { getLineDash } from '../../util/lineDash';\nvar SparklineMarker = /** @class */ (function () {\n function SparklineMarker() {\n this.enabled = true;\n this.shape = 'circle';\n this.size = 0;\n this.fill = 'rgb(124, 181, 236)';\n this.stroke = 'rgb(124, 181, 236)';\n this.strokeWidth = 1;\n this.formatter = undefined;\n }\n return SparklineMarker;\n}());\nvar SparklineLine = /** @class */ (function () {\n function SparklineLine() {\n this.stroke = 'rgb(124, 181, 236)';\n this.strokeWidth = 1;\n }\n return SparklineLine;\n}());\nvar SparklineCrosshairs = /** @class */ (function () {\n function SparklineCrosshairs() {\n this.xLine = {\n enabled: true,\n stroke: 'rgba(0,0,0, 0.54)',\n strokeWidth: 1,\n lineDash: 'solid',\n lineCap: undefined,\n };\n this.yLine = {\n enabled: false,\n stroke: 'rgba(0,0,0, 0.54)',\n strokeWidth: 1,\n lineDash: 'solid',\n lineCap: undefined,\n };\n }\n return SparklineCrosshairs;\n}());\nvar LineSparkline = /** @class */ (function (_super) {\n __extends(LineSparkline, _super);\n function LineSparkline() {\n var _this = _super.call(this) || this;\n _this.linePath = new Path();\n _this.xCrosshairLine = new Line();\n _this.yCrosshairLine = new Line();\n _this.lineSparklineGroup = new Group();\n _this.markers = new Group();\n _this.markerSelection = Selection.select(_this.markers).selectAll();\n _this.markerSelectionData = [];\n _this.marker = new SparklineMarker();\n _this.line = new SparklineLine();\n _this.crosshairs = new SparklineCrosshairs();\n _this.rootGroup.append(_this.lineSparklineGroup);\n _this.lineSparklineGroup.append([_this.linePath, _this.xCrosshairLine, _this.yCrosshairLine, _this.markers]);\n return _this;\n }\n LineSparkline.prototype.getNodeData = function () {\n return this.markerSelectionData;\n };\n /**\n * If marker shape is changed, this method should be called to remove the previous marker nodes selection.\n */\n LineSparkline.prototype.onMarkerShapeChange = function () {\n this.markerSelection = this.markerSelection.setData([]);\n this.markerSelection.exit.remove();\n this.scheduleLayout();\n };\n LineSparkline.prototype.update = function () {\n var nodeData = this.generateNodeData();\n if (!nodeData) {\n return;\n }\n this.markerSelectionData = nodeData;\n this.updateSelection(nodeData);\n this.updateNodes();\n this.updateLine();\n };\n LineSparkline.prototype.updateYScaleDomain = function () {\n var _a = this, yData = _a.yData, yScale = _a.yScale;\n var yMinMax = extent(yData, isNumber);\n var yMin = 0;\n var yMax = 1;\n if (yMinMax !== undefined) {\n yMin = this.min = yMinMax[0];\n yMax = this.max = yMinMax[1];\n }\n if (yMin === yMax) {\n // if all values in the data are the same, yMin and yMax will be equal, need to adjust the domain with some padding\n var padding = Math.abs(yMin * 0.01);\n yMin -= padding;\n yMax += padding;\n }\n yScale.domain = [yMin, yMax];\n };\n LineSparkline.prototype.generateNodeData = function () {\n var _a = this, data = _a.data, yData = _a.yData, xData = _a.xData, xScale = _a.xScale, yScale = _a.yScale;\n if (!data) {\n return;\n }\n var offsetX = xScale instanceof BandScale ? xScale.bandwidth / 2 : 0;\n var nodeData = [];\n for (var i = 0; i < yData.length; i++) {\n var yDatum = yData[i];\n var xDatum = xData[i];\n if (yDatum == undefined) {\n continue;\n }\n var x = xScale.convert(xDatum) + offsetX;\n var y = yScale.convert(yDatum);\n nodeData.push({\n seriesDatum: { x: xDatum, y: yDatum },\n point: { x: x, y: y },\n });\n }\n return nodeData;\n };\n LineSparkline.prototype.updateSelection = function (selectionData) {\n var marker = this.marker;\n var shape = getMarker(marker.shape);\n var updateMarkerSelection = this.markerSelection.setData(selectionData);\n var enterMarkerSelection = updateMarkerSelection.enter.append(shape);\n updateMarkerSelection.exit.remove();\n this.markerSelection = updateMarkerSelection.merge(enterMarkerSelection);\n };\n LineSparkline.prototype.updateNodes = function () {\n var _this = this;\n var _a = this, highlightedDatum = _a.highlightedDatum, highlightStyle = _a.highlightStyle, marker = _a.marker;\n var highlightSize = highlightStyle.size, highlightFill = highlightStyle.fill, highlightStroke = highlightStyle.stroke, highlightStrokeWidth = highlightStyle.strokeWidth;\n var markerFormatter = marker.formatter;\n this.markerSelection.each(function (node, datum, index) {\n var highlighted = datum === highlightedDatum;\n var markerFill = highlighted && highlightFill !== undefined ? highlightFill : marker.fill;\n var markerStroke = highlighted && highlightStroke !== undefined ? highlightStroke : marker.stroke;\n var markerStrokeWidth = highlighted && highlightStrokeWidth !== undefined ? highlightStrokeWidth : marker.strokeWidth;\n var markerSize = highlighted && highlightSize !== undefined ? highlightSize : marker.size;\n var markerFormat;\n var seriesDatum = datum.seriesDatum, point = datum.point;\n if (markerFormatter) {\n var first = index === 0;\n var last = index === _this.markerSelectionData.length - 1;\n var min = seriesDatum.y === _this.min;\n var max = seriesDatum.y === _this.max;\n markerFormat = markerFormatter({\n datum: datum,\n xValue: seriesDatum.x,\n yValue: seriesDatum.y,\n min: min,\n max: max,\n first: first,\n last: last,\n fill: markerFill,\n stroke: markerStroke,\n strokeWidth: markerStrokeWidth,\n size: markerSize,\n highlighted: highlighted,\n });\n }\n node.size = markerFormat && markerFormat.size != undefined ? markerFormat.size : markerSize;\n node.fill = markerFormat && markerFormat.fill != undefined ? markerFormat.fill : markerFill;\n node.stroke = markerFormat && markerFormat.stroke != undefined ? markerFormat.stroke : markerStroke;\n node.strokeWidth =\n markerFormat && markerFormat.strokeWidth != undefined ? markerFormat.strokeWidth : markerStrokeWidth;\n node.translationX = point.x;\n node.translationY = point.y;\n node.visible =\n markerFormat && markerFormat.enabled != undefined\n ? markerFormat.enabled\n : marker.enabled && node.size > 0;\n });\n };\n LineSparkline.prototype.updateLine = function () {\n var _a = this, linePath = _a.linePath, yData = _a.yData, xData = _a.xData, xScale = _a.xScale, yScale = _a.yScale, line = _a.line;\n if (yData.length < 2) {\n return;\n }\n var path = linePath.path;\n var n = yData.length;\n var offsetX = xScale instanceof BandScale ? xScale.bandwidth / 2 : 0;\n var moveTo = true;\n path.clear();\n for (var i = 0; i < n; i++) {\n var xDatum = xData[i];\n var yDatum = yData[i];\n var x = xScale.convert(xDatum) + offsetX;\n var y = yScale.convert(yDatum);\n if (yDatum == undefined) {\n moveTo = true;\n }\n else {\n if (moveTo) {\n path.moveTo(x, y);\n moveTo = false;\n }\n else {\n path.lineTo(x, y);\n }\n }\n }\n linePath.fill = undefined;\n linePath.stroke = line.stroke;\n linePath.strokeWidth = line.strokeWidth;\n };\n LineSparkline.prototype.updateXCrosshairLine = function () {\n var _a = this, yScale = _a.yScale, xCrosshairLine = _a.xCrosshairLine, highlightedDatum = _a.highlightedDatum, xLine = _a.crosshairs.xLine;\n if (!xLine.enabled || highlightedDatum == undefined) {\n xCrosshairLine.strokeWidth = 0;\n return;\n }\n xCrosshairLine.y1 = yScale.range[0];\n xCrosshairLine.y2 = yScale.range[1];\n xCrosshairLine.x1 = xCrosshairLine.x2 = 0;\n xCrosshairLine.stroke = xLine.stroke;\n xCrosshairLine.strokeWidth = xLine.strokeWidth || 1;\n xCrosshairLine.lineCap = xLine.lineCap === 'round' || xLine.lineCap === 'square' ? xLine.lineCap : undefined;\n var lineDash = xLine.lineDash;\n xCrosshairLine.lineDash = Array.isArray(lineDash)\n ? lineDash\n : getLineDash(xCrosshairLine.lineCap, xLine.lineDash);\n xCrosshairLine.translationX = highlightedDatum.point.x;\n };\n LineSparkline.prototype.updateYCrosshairLine = function () {\n var _a = this, xScale = _a.xScale, yCrosshairLine = _a.yCrosshairLine, highlightedDatum = _a.highlightedDatum, yLine = _a.crosshairs.yLine;\n if (!yLine.enabled || highlightedDatum == undefined) {\n yCrosshairLine.strokeWidth = 0;\n return;\n }\n yCrosshairLine.x1 = xScale.range[0];\n yCrosshairLine.x2 = xScale.range[1];\n yCrosshairLine.y1 = yCrosshairLine.y2 = 0;\n yCrosshairLine.stroke = yLine.stroke;\n yCrosshairLine.strokeWidth = yLine.strokeWidth || 1;\n yCrosshairLine.lineCap = yLine.lineCap === 'round' || yLine.lineCap === 'square' ? yLine.lineCap : undefined;\n var lineDash = yLine.lineDash;\n yCrosshairLine.lineDash = Array.isArray(lineDash)\n ? lineDash\n : getLineDash(yCrosshairLine.lineCap, yLine.lineDash);\n yCrosshairLine.translationY = highlightedDatum.point.y;\n };\n LineSparkline.prototype.getTooltipHtml = function (datum) {\n var dataType = this.dataType;\n var seriesDatum = datum.seriesDatum;\n var yValue = seriesDatum.y;\n var xValue = seriesDatum.x;\n var content = this.formatNumericDatum(yValue);\n var title = dataType === 'array' || dataType === 'object' ? this.formatDatum(xValue) : undefined;\n var defaults = {\n content: content,\n title: title,\n };\n if (this.tooltip.renderer) {\n return toTooltipHtml(this.tooltip.renderer({\n context: this.context,\n datum: seriesDatum,\n yValue: yValue,\n xValue: xValue,\n }), defaults);\n }\n return toTooltipHtml(defaults);\n };\n LineSparkline.className = 'LineSparkline';\n return LineSparkline;\n}(Sparkline));\nexport { LineSparkline };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Shape } from '../../scene/shape/shape';\nvar Rectangle = /** @class */ (function (_super) {\n __extends(Rectangle, _super);\n function Rectangle() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._x = 0;\n _this._y = 0;\n _this._width = 0;\n _this._height = 0;\n /**\n * If `true`, the rect is aligned to the pixel grid for crisp looking lines.\n */\n _this._crisp = false;\n return _this;\n }\n Object.defineProperty(Rectangle.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (value) {\n if (this._x !== value) {\n this._x = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Rectangle.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (value) {\n if (this._y !== value) {\n this._y = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Rectangle.prototype, \"width\", {\n get: function () {\n return this._width;\n },\n set: function (value) {\n if (this._width !== value) {\n this._width = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Rectangle.prototype, \"height\", {\n get: function () {\n return this._height;\n },\n set: function (value) {\n if (this._height !== value) {\n this._height = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Rectangle.prototype, \"crisp\", {\n get: function () {\n return this._crisp;\n },\n set: function (value) {\n if (this._crisp !== value) {\n this._crisp = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Rectangle.prototype.isPointInStroke = function (x, y) {\n return false;\n };\n Rectangle.prototype.isPointInPath = function (x, y) {\n return false;\n };\n Rectangle.prototype.render = function (ctx) {\n if (this.dirtyTransform) {\n this.computeTransformMatrix();\n }\n this.matrix.toContext(ctx);\n var _a = this, x = _a.x, y = _a.y, width = _a.width, height = _a.height, crisp = _a.crisp;\n ctx.beginPath();\n if (crisp) {\n // ensure stroke aligns to the pixel grid\n var _b = this, a = _b.alignment, al = _b.align;\n ctx.rect(al(a, x), al(a, y), al(a, x, width), al(a, y, height));\n }\n else {\n ctx.rect(x, y, width, height);\n }\n this.fillStroke(ctx);\n this.dirty = false;\n };\n Rectangle.className = 'Column';\n return Rectangle;\n}(Shape));\nexport { Rectangle };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { getFont } from '../../scene/shape/text';\nimport { Observable, reactive } from '../../util/observable';\nvar Label = /** @class */ (function (_super) {\n __extends(Label, _super);\n function Label() {\n var _this = _super.call(this) || this;\n _this.enabled = true;\n _this.fontSize = 8;\n _this.fontFamily = 'Verdana, sans-serif';\n _this.color = 'rgba(70, 70, 70, 1)';\n return _this;\n }\n Label.prototype.getFont = function () {\n return getFont(this.fontSize, this.fontFamily, this.fontStyle, this.fontWeight);\n };\n __decorate([\n reactive('change', 'dataChange')\n ], Label.prototype, \"enabled\", void 0);\n __decorate([\n reactive('change')\n ], Label.prototype, \"fontSize\", void 0);\n __decorate([\n reactive('change')\n ], Label.prototype, \"fontFamily\", void 0);\n __decorate([\n reactive('change')\n ], Label.prototype, \"fontStyle\", void 0);\n __decorate([\n reactive('change')\n ], Label.prototype, \"fontWeight\", void 0);\n __decorate([\n reactive('change')\n ], Label.prototype, \"color\", void 0);\n return Label;\n}(Observable));\nexport { Label };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { chainObjects } from '../../util/object';\nimport { HdpiCanvas } from '../../canvas/hdpiCanvas';\nimport { Shape } from '../../scene/shape/shape';\nimport { BBox } from '../../scene/bbox';\nvar Text = /** @class */ (function (_super) {\n __extends(Text, _super);\n function Text() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._x = 0;\n _this._y = 0;\n _this.lineBreakRegex = /\\r?\\n/g;\n _this.lines = [];\n _this._text = '';\n _this._dirtyFont = true;\n _this._fontSize = 10;\n _this._fontFamily = 'sans-serif';\n _this._textAlign = Text.defaultStyles.textAlign;\n _this._textBaseline = Text.defaultStyles.textBaseline;\n _this._lineHeight = 14;\n return _this;\n }\n Object.defineProperty(Text.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (value) {\n if (this._x !== value) {\n this._x = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Text.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (value) {\n if (this._y !== value) {\n this._y = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Text.prototype.splitText = function () {\n this.lines = this._text.split(this.lineBreakRegex);\n };\n Object.defineProperty(Text.prototype, \"text\", {\n get: function () {\n return this._text;\n },\n set: function (value) {\n var str = String(value); // `value` can be an object here\n if (this._text !== str) {\n this._text = str;\n this.splitText();\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Text.prototype, \"font\", {\n get: function () {\n if (this.dirtyFont) {\n this.dirtyFont = false;\n this._font = getFont(this.fontSize, this.fontFamily, this.fontStyle, this.fontWeight);\n }\n return this._font;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Text.prototype, \"dirtyFont\", {\n get: function () {\n return this._dirtyFont;\n },\n set: function (value) {\n if (this._dirtyFont !== value) {\n this._dirtyFont = value;\n if (value) {\n this.dirty = true;\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Text.prototype, \"fontStyle\", {\n get: function () {\n return this._fontStyle;\n },\n set: function (value) {\n if (this._fontStyle !== value) {\n this._fontStyle = value;\n this.dirtyFont = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Text.prototype, \"fontWeight\", {\n get: function () {\n return this._fontWeight;\n },\n set: function (value) {\n if (this._fontWeight !== value) {\n this._fontWeight = value;\n this.dirtyFont = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Text.prototype, \"fontSize\", {\n get: function () {\n return this._fontSize;\n },\n set: function (value) {\n if (!isFinite(value)) {\n value = 10;\n }\n if (this._fontSize !== value) {\n this._fontSize = value;\n this.dirtyFont = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Text.prototype, \"fontFamily\", {\n get: function () {\n return this._fontFamily;\n },\n set: function (value) {\n if (this._fontFamily !== value) {\n this._fontFamily = value;\n this.dirtyFont = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Text.prototype, \"textAlign\", {\n get: function () {\n return this._textAlign;\n },\n set: function (value) {\n if (this._textAlign !== value) {\n this._textAlign = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Text.prototype, \"textBaseline\", {\n get: function () {\n return this._textBaseline;\n },\n set: function (value) {\n if (this._textBaseline !== value) {\n this._textBaseline = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Text.prototype, \"lineHeight\", {\n get: function () {\n return this._lineHeight;\n },\n set: function (value) {\n // Multi-line text is complicated because:\n // - Canvas does not support it natively, so we have to implement it manually\n // - need to know the height of each line -> need to parse the font shorthand ->\n // generally impossible to do because font size may not be in pixels\n // - so, need to measure the text instead, each line individually -> expensive\n // - or make the user provide the line height manually for multi-line text\n // - computeBBox should use the lineHeight for multi-line text but ignore it otherwise\n // - textBaseline kind of loses its meaning for multi-line text\n if (this._lineHeight !== value) {\n this._lineHeight = value;\n this.dirty = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Text.prototype.computeBBox = function () {\n return HdpiCanvas.has.textMetrics ? this.getPreciseBBox() : this.getApproximateBBox();\n };\n Text.prototype.getPreciseBBox = function () {\n var metrics = HdpiCanvas.measureText(this.text, this.font, this.textBaseline, this.textAlign);\n return new BBox(this.x - metrics.actualBoundingBoxLeft, this.y - metrics.actualBoundingBoxAscent, metrics.width, metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent);\n };\n Text.prototype.getApproximateBBox = function () {\n var size = HdpiCanvas.getTextSize(this.text, this.font);\n var _a = this, x = _a.x, y = _a.y;\n switch (this.textAlign) {\n case 'end':\n case 'right':\n x -= size.width;\n break;\n case 'center':\n x -= size.width / 2;\n }\n switch (this.textBaseline) {\n case 'alphabetic':\n y -= size.height * 0.7;\n break;\n case 'middle':\n y -= size.height * 0.45;\n break;\n case 'ideographic':\n y -= size.height;\n break;\n case 'hanging':\n y -= size.height * 0.2;\n break;\n case 'bottom':\n y -= size.height;\n break;\n }\n return new BBox(x, y, size.width, size.height);\n };\n Text.prototype.isPointInPath = function (x, y) {\n var point = this.transformPoint(x, y);\n var bbox = this.computeBBox();\n return bbox ? bbox.containsPoint(point.x, point.y) : false;\n };\n Text.prototype.isPointInStroke = function (x, y) {\n return false;\n };\n Text.prototype.render = function (ctx) {\n if (!this.lines.length || !this.scene) {\n return;\n }\n if (this.dirtyTransform) {\n this.computeTransformMatrix();\n }\n // this.matrix.transformBBox(this.computeBBox!()).render(ctx); // debug\n this.matrix.toContext(ctx);\n var _a = this, fill = _a.fill, stroke = _a.stroke, strokeWidth = _a.strokeWidth;\n ctx.font = this.font;\n ctx.textAlign = this.textAlign;\n ctx.textBaseline = this.textBaseline;\n var pixelRatio = this.scene.canvas.pixelRatio || 1;\n var globalAlpha = ctx.globalAlpha;\n if (fill) {\n ctx.fillStyle = fill;\n ctx.globalAlpha = globalAlpha * this.opacity * this.fillOpacity;\n var _b = this, fillShadow = _b.fillShadow, text = _b.text, x = _b.x, y = _b.y;\n if (fillShadow && fillShadow.enabled) {\n ctx.shadowColor = fillShadow.color;\n ctx.shadowOffsetX = fillShadow.xOffset * pixelRatio;\n ctx.shadowOffsetY = fillShadow.yOffset * pixelRatio;\n ctx.shadowBlur = fillShadow.blur * pixelRatio;\n }\n ctx.fillText(text, x, y);\n }\n if (stroke && strokeWidth) {\n ctx.strokeStyle = stroke;\n ctx.lineWidth = strokeWidth;\n ctx.globalAlpha = globalAlpha * this.opacity * this.strokeOpacity;\n var _c = this, lineDash = _c.lineDash, lineDashOffset = _c.lineDashOffset, lineCap = _c.lineCap, lineJoin = _c.lineJoin, strokeShadow = _c.strokeShadow, text = _c.text, x = _c.x, y = _c.y;\n if (lineDash) {\n ctx.setLineDash(lineDash);\n }\n if (lineDashOffset) {\n ctx.lineDashOffset = lineDashOffset;\n }\n if (lineCap) {\n ctx.lineCap = lineCap;\n }\n if (lineJoin) {\n ctx.lineJoin = lineJoin;\n }\n if (strokeShadow && strokeShadow.enabled) {\n ctx.shadowColor = strokeShadow.color;\n ctx.shadowOffsetX = strokeShadow.xOffset * pixelRatio;\n ctx.shadowOffsetY = strokeShadow.yOffset * pixelRatio;\n ctx.shadowBlur = strokeShadow.blur * pixelRatio;\n }\n ctx.strokeText(text, x, y);\n }\n this.dirty = false;\n };\n Text.className = 'Text';\n Text.defaultStyles = chainObjects(Shape.defaultStyles, {\n textAlign: 'start',\n fontStyle: undefined,\n fontWeight: undefined,\n fontSize: 10,\n fontFamily: 'sans-serif',\n textBaseline: 'alphabetic',\n });\n return Text;\n}(Shape));\nexport { Text };\nexport function getFont(fontSize, fontFamily, fontStyle, fontWeight) {\n return [fontStyle || '', fontWeight || '', fontSize + 'px', fontFamily].join(' ').trim();\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Sparkline } from '../sparkline';\nimport { Group } from '../../scene/group';\nimport { Line } from '../../scene/shape/line';\nimport { Selection } from '../../scene/selection';\nimport { toTooltipHtml } from '../tooltip/sparklineTooltip';\nimport { Rectangle } from './rectangle';\nimport { extent } from '../../util/array';\nimport { isNumber } from '../../util/value';\nimport { Label } from '../label/label';\nimport { Text } from '../label/text';\nimport { PointerEvents } from '../../scene/node';\nvar BarColumnNodeTag;\n(function (BarColumnNodeTag) {\n BarColumnNodeTag[BarColumnNodeTag[\"Rect\"] = 0] = \"Rect\";\n BarColumnNodeTag[BarColumnNodeTag[\"Label\"] = 1] = \"Label\";\n})(BarColumnNodeTag || (BarColumnNodeTag = {}));\nexport var BarColumnLabelPlacement;\n(function (BarColumnLabelPlacement) {\n BarColumnLabelPlacement[\"InsideBase\"] = \"insideBase\";\n BarColumnLabelPlacement[\"InsideEnd\"] = \"insideEnd\";\n BarColumnLabelPlacement[\"Center\"] = \"center\";\n BarColumnLabelPlacement[\"OutsideEnd\"] = \"outsideEnd\";\n})(BarColumnLabelPlacement || (BarColumnLabelPlacement = {}));\nvar BarColumnLabel = /** @class */ (function (_super) {\n __extends(BarColumnLabel, _super);\n function BarColumnLabel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.formatter = undefined;\n _this.placement = BarColumnLabelPlacement.InsideEnd;\n return _this;\n }\n return BarColumnLabel;\n}(Label));\nexport { BarColumnLabel };\nvar BarColumnSparkline = /** @class */ (function (_super) {\n __extends(BarColumnSparkline, _super);\n function BarColumnSparkline() {\n var _this = _super.call(this) || this;\n _this.fill = 'rgb(124, 181, 236)';\n _this.stroke = 'silver';\n _this.strokeWidth = 0;\n _this.paddingInner = 0.1;\n _this.paddingOuter = 0.2;\n _this.valueAxisDomain = undefined;\n _this.formatter = undefined;\n _this.axisLine = new Line();\n _this.bandWidth = 0;\n _this.sparklineGroup = new Group();\n _this.rectGroup = new Group();\n _this.labelGroup = new Group();\n _this.rectSelection = Selection.select(_this.rectGroup).selectAll();\n _this.labelSelection = Selection.select(_this.labelGroup).selectAll();\n _this.nodeSelectionData = [];\n _this.label = new BarColumnLabel();\n _this.rootGroup.append(_this.sparklineGroup);\n _this.sparklineGroup.append([_this.rectGroup, _this.axisLine, _this.labelGroup]);\n _this.axisLine.lineCap = 'round';\n _this.label.enabled = false;\n return _this;\n }\n BarColumnSparkline.prototype.getNodeData = function () {\n return this.nodeSelectionData;\n };\n BarColumnSparkline.prototype.update = function () {\n this.updateSelections();\n this.updateNodes();\n };\n BarColumnSparkline.prototype.updateSelections = function () {\n var nodeData = this.generateNodeData();\n if (!nodeData) {\n return;\n }\n this.nodeSelectionData = nodeData;\n this.updateRectSelection(nodeData);\n this.updateLabelSelection(nodeData);\n };\n BarColumnSparkline.prototype.updateNodes = function () {\n this.updateRectNodes();\n this.updateLabelNodes();\n };\n BarColumnSparkline.prototype.calculateStep = function (range) {\n var _a, _b;\n var _c = this, xScale = _c.xScale, paddingInner = _c.paddingInner, paddingOuter = _c.paddingOuter, smallestInterval = _c.smallestInterval;\n // calculate step\n var domainLength = xScale.domain[1] - xScale.domain[0];\n var intervals = (domainLength / (_b = (_a = smallestInterval) === null || _a === void 0 ? void 0 : _a.x, (_b !== null && _b !== void 0 ? _b : 1))) + 1;\n // The number of intervals/bands is used to determine the width of individual bands by dividing the available range.\n // Allow a maximum of 50 bands to ensure the step (width of individual bands + padding) does not fall below a certain number of pixels.\n // If the number of intervals exceeds 50, calculate the step for 50 bands within the given range.\n // This means there could be some overlap of the bands in the sparkline.\n var maxBands = 50;\n var bands = Math.min(intervals, maxBands);\n var gaps = bands - 1; // number of gaps (padding between bands)\n var step = range / Math.max(1, (2 * paddingOuter) + (gaps * paddingInner) + bands); // step width is a combination of band width and gap width\n return step;\n };\n BarColumnSparkline.prototype.updateYScaleDomain = function () {\n var _a = this, yScale = _a.yScale, yData = _a.yData, valueAxisDomain = _a.valueAxisDomain;\n var yMinMax = extent(yData, isNumber);\n var yMin = 0;\n var yMax = 1;\n if (yMinMax !== undefined) {\n yMin = this.min = yMinMax[0];\n yMax = this.max = yMinMax[1];\n }\n // if yMin is positive, set yMin to 0\n yMin = yMin < 0 ? yMin : 0;\n // if yMax is negative, set yMax to 0\n yMax = yMax < 0 ? 0 : yMax;\n if (valueAxisDomain) {\n if (valueAxisDomain[1] < yMax) {\n valueAxisDomain[1] = yMax;\n }\n if (valueAxisDomain[0] > yMin) {\n valueAxisDomain[0] = yMin;\n }\n }\n yScale.domain = valueAxisDomain ? valueAxisDomain : [yMin, yMax];\n };\n BarColumnSparkline.prototype.updateRectSelection = function (selectionData) {\n var updateRectSelection = this.rectSelection.setData(selectionData);\n var enterRectSelection = updateRectSelection.enter.append(Rectangle);\n updateRectSelection.exit.remove();\n this.rectSelection = updateRectSelection.merge(enterRectSelection);\n };\n BarColumnSparkline.prototype.updateRectNodes = function () {\n var _this = this;\n var _a = this, highlightedDatum = _a.highlightedDatum, nodeFormatter = _a.formatter, fill = _a.fill, stroke = _a.stroke, strokeWidth = _a.strokeWidth;\n var _b = this.highlightStyle, highlightFill = _b.fill, highlightStroke = _b.stroke, highlightStrokeWidth = _b.strokeWidth;\n this.rectSelection.each(function (node, datum, index) {\n var highlighted = datum === highlightedDatum;\n var nodeFill = highlighted && highlightFill !== undefined ? highlightFill : fill;\n var nodeStroke = highlighted && highlightStroke !== undefined ? highlightStroke : stroke;\n var nodeStrokeWidth = highlighted && highlightStrokeWidth !== undefined ? highlightStrokeWidth : strokeWidth;\n var nodeFormat;\n var x = datum.x, y = datum.y, width = datum.width, height = datum.height, seriesDatum = datum.seriesDatum;\n if (nodeFormatter) {\n var first = index === 0;\n var last = index === _this.nodeSelectionData.length - 1;\n var min = seriesDatum.y === _this.min;\n var max = seriesDatum.y === _this.max;\n nodeFormat = nodeFormatter({\n datum: datum,\n xValue: seriesDatum.x,\n yValue: seriesDatum.y,\n width: width,\n height: height,\n min: min,\n max: max,\n first: first,\n last: last,\n fill: nodeFill,\n stroke: nodeStroke,\n strokeWidth: nodeStrokeWidth,\n highlighted: highlighted,\n });\n }\n node.fill = (nodeFormat && nodeFormat.fill) || nodeFill;\n node.stroke = (nodeFormat && nodeFormat.stroke) || nodeStroke;\n node.strokeWidth = (nodeFormat && nodeFormat.strokeWidth) || nodeStrokeWidth;\n node.x = node.y = 0;\n node.width = width;\n node.height = height;\n node.visible = node.height > 0;\n node.translationX = x;\n node.translationY = y;\n // shifts bars upwards?\n // node.crisp = true;\n });\n };\n BarColumnSparkline.prototype.updateLabelSelection = function (selectionData) {\n var updateLabels = this.labelSelection.setData(selectionData);\n var enterLabels = updateLabels.enter.append(Text).each(function (text) {\n (text.tag = BarColumnNodeTag.Label), (text.pointerEvents = PointerEvents.None);\n });\n updateLabels.exit.remove();\n this.labelSelection = updateLabels.merge(enterLabels);\n };\n BarColumnSparkline.prototype.updateLabelNodes = function () {\n var _a = this.label, labelEnabled = _a.enabled, fontStyle = _a.fontStyle, fontWeight = _a.fontWeight, fontSize = _a.fontSize, fontFamily = _a.fontFamily, color = _a.color;\n this.labelSelection.each(function (text, datum) {\n var label = datum.label;\n if (label && labelEnabled) {\n text.fontStyle = fontStyle;\n text.fontWeight = fontWeight;\n text.fontSize = fontSize;\n text.fontFamily = fontFamily;\n text.textAlign = label.textAlign;\n text.textBaseline = label.textBaseline;\n text.text = label.text;\n text.x = label.x;\n text.y = label.y;\n text.fill = color;\n text.visible = true;\n }\n else {\n text.visible = false;\n }\n });\n };\n BarColumnSparkline.prototype.getTooltipHtml = function (datum) {\n var dataType = this.dataType;\n var seriesDatum = datum.seriesDatum;\n var yValue = seriesDatum.y;\n var xValue = seriesDatum.x;\n var content = this.formatNumericDatum(yValue);\n var title = dataType === 'array' || dataType === 'object' ? this.formatDatum(xValue) : undefined;\n var defaults = {\n content: content,\n title: title,\n };\n if (this.tooltip.renderer) {\n return toTooltipHtml(this.tooltip.renderer({\n context: this.context,\n datum: seriesDatum,\n yValue: yValue,\n xValue: xValue,\n }), defaults);\n }\n return toTooltipHtml(defaults);\n };\n BarColumnSparkline.prototype.formatLabelValue = function (value) {\n return value % 1 !== 0 ? value.toFixed(1) : value.toFixed(0);\n };\n return BarColumnSparkline;\n}(Sparkline));\nexport { BarColumnSparkline };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { BandScale } from '../../scale/bandScale';\nimport { isNumber } from '../../util/value';\nimport { BarColumnLabelPlacement, BarColumnSparkline } from './barColumnSparkline';\nimport { HdpiCanvas } from '../../canvas/hdpiCanvas';\nvar BarSparkline = /** @class */ (function (_super) {\n __extends(BarSparkline, _super);\n function BarSparkline() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n BarSparkline.prototype.updateYScaleRange = function () {\n var _a = this, seriesRect = _a.seriesRect, yScale = _a.yScale;\n yScale.range = [0, seriesRect.width];\n };\n BarSparkline.prototype.updateXScaleRange = function () {\n var _a = this, xScale = _a.xScale, seriesRect = _a.seriesRect, paddingOuter = _a.paddingOuter, paddingInner = _a.paddingInner;\n if (xScale instanceof BandScale) {\n xScale.range = [0, seriesRect.height];\n xScale.paddingInner = paddingInner;\n xScale.paddingOuter = paddingOuter;\n }\n else {\n // last node will be clipped if the scale is not a band scale\n // subtract last band width from the range so that the last band is not clipped\n var step = this.calculateStep(seriesRect.height);\n // PaddingOuter and paddingInner are fractions of the step with values between 0 and 1\n var padding = step * paddingOuter; // left and right outer padding\n this.bandWidth = step * (1 - paddingInner);\n xScale.range = [padding, seriesRect.height - padding - this.bandWidth];\n }\n };\n BarSparkline.prototype.updateAxisLine = function () {\n var _a = this, yScale = _a.yScale, axis = _a.axis, axisLine = _a.axisLine, seriesRect = _a.seriesRect;\n var strokeWidth = axis.strokeWidth;\n axisLine.x1 = 0;\n axisLine.x2 = 0;\n axisLine.y1 = 0;\n axisLine.y2 = seriesRect.height;\n axisLine.stroke = axis.stroke;\n axisLine.strokeWidth = strokeWidth + (strokeWidth % 2 === 1 ? 1 : 0);\n var yZero = yScale.convert(0);\n axisLine.translationX = yZero;\n };\n BarSparkline.prototype.generateNodeData = function () {\n var _a = this, data = _a.data, yData = _a.yData, xData = _a.xData, xScale = _a.xScale, yScale = _a.yScale, fill = _a.fill, stroke = _a.stroke, strokeWidth = _a.strokeWidth, label = _a.label;\n if (!data) {\n return;\n }\n var labelFontStyle = label.fontStyle, labelFontWeight = label.fontWeight, labelFontSize = label.fontSize, labelFontFamily = label.fontFamily, labelColor = label.color, labelFormatter = label.formatter, labelPlacement = label.placement;\n var nodeData = [];\n var yZero = yScale.convert(0);\n for (var i = 0, n = yData.length; i < n; i++) {\n var yDatum = yData[i];\n var xDatum = xData[i];\n var invalidDatum = yDatum === undefined;\n if (invalidDatum) {\n yDatum = 0;\n }\n var y = xScale.convert(xDatum);\n var x = Math.min(yScale.convert(yDatum), yZero);\n var bottom = Math.max(yScale.convert(yDatum), yZero);\n // if the scale is a band scale, the width of the rects will be the bandwidth, otherwise the width of the rects will be the range / number of items in the data\n var height = xScale instanceof BandScale\n ? xScale.bandwidth\n : this.bandWidth;\n var width = bottom - x;\n var midPoint = {\n x: yZero,\n y: y,\n };\n var labelText = void 0;\n if (labelFormatter) {\n labelText = labelFormatter({ value: yDatum });\n }\n else {\n labelText = yDatum !== undefined && isNumber(yDatum) ? this.formatLabelValue(yDatum) : '';\n }\n var labelY = y + height / 2;\n var labelX = void 0;\n var labelTextBaseline = 'middle';\n var labelTextAlign = void 0;\n var isPositiveY = yDatum !== undefined && yDatum >= 0;\n var labelPadding = 4;\n if (labelPlacement === BarColumnLabelPlacement.Center) {\n labelX = x + width / 2;\n labelTextAlign = 'center';\n }\n else if (labelPlacement === BarColumnLabelPlacement.OutsideEnd) {\n labelX = x + (isPositiveY ? width + labelPadding : -labelPadding);\n labelTextAlign = isPositiveY ? 'start' : 'end';\n }\n else if (labelPlacement === BarColumnLabelPlacement.InsideEnd) {\n labelX = x + (isPositiveY ? width - labelPadding : labelPadding);\n labelTextAlign = isPositiveY ? 'end' : 'start';\n var textSize = HdpiCanvas.getTextSize(labelText, labelFontFamily);\n var textWidth = textSize.width || 20;\n var positiveBoundary = yZero + textWidth;\n var negativeBoundary = yZero - textWidth;\n var exceedsBoundaries = (isPositiveY && labelX < positiveBoundary) || (!isPositiveY && labelX > negativeBoundary);\n if (exceedsBoundaries) {\n // if labelX exceeds the boundary, labels should be positioned at `insideBase`.\n labelX = yZero + labelPadding * (isPositiveY ? 1 : -1);\n labelTextAlign = isPositiveY ? 'start' : 'end';\n }\n }\n else {\n // if labelPlacement === BarColumnLabelPlacement.InsideBase\n labelX = yZero + labelPadding * (isPositiveY ? 1 : -1);\n labelTextAlign = isPositiveY ? 'start' : 'end';\n }\n nodeData.push({\n x: x,\n y: y,\n width: width,\n height: height,\n fill: fill,\n stroke: stroke,\n strokeWidth: strokeWidth,\n seriesDatum: { x: xDatum, y: invalidDatum ? undefined : yDatum },\n point: midPoint,\n label: {\n x: labelX,\n y: labelY,\n text: labelText,\n fontStyle: labelFontStyle,\n fontWeight: labelFontWeight,\n fontSize: labelFontSize,\n fontFamily: labelFontFamily,\n textAlign: labelTextAlign,\n textBaseline: labelTextBaseline,\n fill: labelColor,\n },\n });\n }\n return nodeData;\n };\n BarSparkline.prototype.getDistance = function (p1, p2) {\n return Math.abs(p1.y - p2.y);\n };\n BarSparkline.className = 'BarSparkline';\n return BarSparkline;\n}(BarColumnSparkline));\nexport { BarSparkline };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { HdpiCanvas } from '../../canvas/hdpiCanvas';\nimport { BandScale } from '../../scale/bandScale';\nimport { isNumber } from '../../util/value';\nimport { BarColumnLabelPlacement, BarColumnSparkline } from './barColumnSparkline';\nvar ColumnSparkline = /** @class */ (function (_super) {\n __extends(ColumnSparkline, _super);\n function ColumnSparkline() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ColumnSparkline.prototype.updateYScaleRange = function () {\n var _a = this, seriesRect = _a.seriesRect, yScale = _a.yScale;\n yScale.range = [seriesRect.height, 0];\n };\n ColumnSparkline.prototype.updateXScaleRange = function () {\n var _a = this, xScale = _a.xScale, seriesRect = _a.seriesRect, paddingOuter = _a.paddingOuter, paddingInner = _a.paddingInner;\n if (xScale instanceof BandScale) {\n xScale.range = [0, seriesRect.width];\n xScale.paddingInner = paddingInner;\n xScale.paddingOuter = paddingOuter;\n }\n else {\n // last node will be clipped if the scale is not a band scale\n // subtract last band width from the range so that the last band is not clipped\n var step = this.calculateStep(seriesRect.width);\n // PaddingOuter and paddingInner are fractions of the step with values between 0 and 1\n var padding = step * paddingOuter; // left and right outer padding\n this.bandWidth = step * (1 - paddingInner);\n xScale.range = [padding, seriesRect.width - padding - this.bandWidth];\n }\n };\n ColumnSparkline.prototype.updateAxisLine = function () {\n var _a = this, yScale = _a.yScale, axis = _a.axis, axisLine = _a.axisLine, seriesRect = _a.seriesRect;\n var strokeWidth = axis.strokeWidth;\n axisLine.x1 = 0;\n axisLine.x2 = seriesRect.width;\n axisLine.y1 = 0;\n axisLine.y2 = 0;\n axisLine.stroke = axis.stroke;\n axisLine.strokeWidth = strokeWidth + (strokeWidth % 2 === 1 ? 1 : 0);\n var yZero = yScale.convert(0);\n axisLine.translationY = yZero;\n };\n ColumnSparkline.prototype.generateNodeData = function () {\n var _a = this, data = _a.data, yData = _a.yData, xData = _a.xData, xScale = _a.xScale, yScale = _a.yScale, fill = _a.fill, stroke = _a.stroke, strokeWidth = _a.strokeWidth, label = _a.label;\n if (!data) {\n return;\n }\n var labelFontStyle = label.fontStyle, labelFontWeight = label.fontWeight, labelFontSize = label.fontSize, labelFontFamily = label.fontFamily, labelColor = label.color, labelFormatter = label.formatter, labelPlacement = label.placement;\n var nodeData = [];\n var yZero = yScale.convert(0);\n for (var i = 0, n = yData.length; i < n; i++) {\n var yDatum = yData[i];\n var xDatum = xData[i];\n var invalidDatum = yDatum === undefined;\n if (invalidDatum) {\n yDatum = 0;\n }\n var y = Math.min(yScale.convert(yDatum), yZero);\n var x = xScale.convert(xDatum);\n var bottom = Math.max(yScale.convert(yDatum), yZero);\n // if the scale is a band scale, the width of the rects will be the bandwidth, otherwise the width of the rects will be the range / number of items in the data\n var width = xScale instanceof BandScale\n ? xScale.bandwidth\n : this.bandWidth;\n var height = bottom - y;\n var midPoint = {\n x: x + width / 2,\n y: yZero,\n };\n var labelText = void 0;\n if (labelFormatter) {\n labelText = labelFormatter({ value: yDatum });\n }\n else {\n labelText = yDatum !== undefined && isNumber(yDatum) ? this.formatLabelValue(yDatum) : '';\n }\n var labelX = x + width / 2;\n var labelY = void 0;\n var labelTextAlign = 'center';\n var labelTextBaseline = void 0;\n var isPositiveY = yDatum !== undefined && yDatum >= 0;\n var labelPadding = 2;\n if (labelPlacement === BarColumnLabelPlacement.Center) {\n labelY = y + height / 2;\n labelTextBaseline = 'middle';\n }\n else if (labelPlacement === BarColumnLabelPlacement.OutsideEnd) {\n labelY = y + (isPositiveY ? -labelPadding : height + labelPadding);\n labelTextBaseline = isPositiveY ? 'bottom' : 'top';\n }\n else if (labelPlacement === BarColumnLabelPlacement.InsideEnd) {\n labelY = y + (isPositiveY ? labelPadding : height - labelPadding);\n labelTextBaseline = isPositiveY ? 'top' : 'bottom';\n var textSize = HdpiCanvas.getTextSize(labelText, labelFontFamily);\n var textHeight = textSize.height || 10;\n var positiveBoundary = yZero - textHeight;\n var negativeBoundary = yZero + textHeight;\n var exceedsBoundaries = (isPositiveY && labelY > positiveBoundary) || (!isPositiveY && labelY < negativeBoundary);\n if (exceedsBoundaries) {\n // if labelY exceeds the y boundary, labels should be positioned at the insideBase\n labelY = yZero + labelPadding * (isPositiveY ? -1 : 1);\n labelTextBaseline = isPositiveY ? 'bottom' : 'top';\n }\n }\n else {\n // if labelPlacement === BarColumnLabelPlacement.InsideBase\n labelY = yZero + labelPadding * (isPositiveY ? -1 : 1);\n labelTextBaseline = isPositiveY ? 'bottom' : 'top';\n }\n nodeData.push({\n x: x,\n y: y,\n width: width,\n height: height,\n fill: fill,\n stroke: stroke,\n strokeWidth: strokeWidth,\n seriesDatum: { x: xDatum, y: invalidDatum ? undefined : yDatum },\n point: midPoint,\n label: {\n x: labelX,\n y: labelY,\n text: labelText,\n fontStyle: labelFontStyle,\n fontWeight: labelFontWeight,\n fontSize: labelFontSize,\n fontFamily: labelFontFamily,\n textAlign: labelTextAlign,\n textBaseline: labelTextBaseline,\n fill: labelColor,\n },\n });\n }\n return nodeData;\n };\n ColumnSparkline.className = 'ColumnSparkline';\n return ColumnSparkline;\n}(BarColumnSparkline));\nexport { ColumnSparkline };\n","import { AreaSparkline } from './area/areaSparkline';\nimport { LineSparkline } from './line/lineSparkline';\nimport { BarSparkline } from './bar-column/barSparkline';\nimport { ColumnSparkline } from './bar-column/columnSparkline';\nimport { isNumber } from '../util/value';\nvar AgSparkline = /** @class */ (function () {\n function AgSparkline() {\n }\n AgSparkline.create = function (options, tooltip) {\n // avoid mutating user provided options\n options = Object.create(options);\n var sparkline = getSparklineInstance(options.type);\n if (tooltip) {\n sparkline.tooltip = tooltip;\n }\n initSparkline(sparkline, options);\n initSparklineByType(sparkline, options);\n if (options.data) {\n sparkline.data = options.data;\n }\n return sparkline;\n };\n return AgSparkline;\n}());\nexport { AgSparkline };\nfunction getSparklineInstance(type) {\n if (type === void 0) { type = 'line'; }\n switch (type) {\n case 'column':\n return new ColumnSparkline();\n case 'bar':\n return new BarSparkline();\n case 'area':\n return new AreaSparkline();\n case 'line':\n default:\n return new LineSparkline();\n }\n}\nfunction initSparklineByType(sparkline, options) {\n switch (options.type) {\n case 'bar':\n initBarColumnSparkline(sparkline, options);\n break;\n case 'column':\n initBarColumnSparkline(sparkline, options);\n break;\n case 'area':\n initAreaSparkline(sparkline, options);\n break;\n case 'line':\n default:\n initLineSparkline(sparkline, options);\n break;\n }\n}\nfunction initSparkline(sparkline, options) {\n setValueIfPropertyExists(sparkline, 'context', options.context, options);\n setValueIfPropertyExists(sparkline, 'width', options.width, options);\n setValueIfPropertyExists(sparkline, 'height', options.height, options);\n setValueIfPropertyExists(sparkline, 'container', options.container, options);\n setValueIfPropertyExists(sparkline, 'xKey', options.xKey, options);\n setValueIfPropertyExists(sparkline, 'yKey', options.yKey, options);\n if (options.padding) {\n initPaddingOptions(sparkline.padding, options.padding);\n }\n if (options.axis) {\n initAxisOptions(sparkline.axis, options.axis);\n }\n if (options.highlightStyle) {\n initHighlightStyleOptions(sparkline.highlightStyle, options.highlightStyle);\n }\n if (options.tooltip && sparkline.tooltip) {\n initTooltipOptions(sparkline.tooltip, options.tooltip);\n }\n}\nfunction initLineSparkline(sparkline, options) {\n if (options.marker) {\n initMarkerOptions(sparkline.marker, options.marker);\n }\n if (options.line) {\n initLineOptions(sparkline.line, options.line);\n }\n if (options.crosshairs) {\n initCrosshairsOptions(sparkline.crosshairs, options.crosshairs);\n }\n}\nfunction initAreaSparkline(sparkline, options) {\n setValueIfPropertyExists(sparkline, 'fill', options.fill, options);\n if (options.marker) {\n initMarkerOptions(sparkline.marker, options.marker);\n }\n if (options.line) {\n initLineOptions(sparkline.line, options.line);\n }\n if (options.crosshairs) {\n initCrosshairsOptions(sparkline.crosshairs, options.crosshairs);\n }\n}\nfunction initBarColumnSparkline(sparkline, options) {\n setValueIfPropertyExists(sparkline, 'valueAxisDomain', options.valueAxisDomain, options);\n setValueIfPropertyExists(sparkline, 'fill', options.fill, options);\n setValueIfPropertyExists(sparkline, 'stroke', options.stroke, options);\n setValueIfPropertyExists(sparkline, 'strokeWidth', options.strokeWidth, options);\n setValueIfPropertyExists(sparkline, 'paddingInner', options.paddingInner, options);\n setValueIfPropertyExists(sparkline, 'paddingOuter', options.paddingOuter, options);\n setValueIfPropertyExists(sparkline, 'formatter', options.formatter, options);\n if (options.label) {\n initLabelOptions(sparkline.label, options.label);\n }\n}\nfunction initPaddingOptions(target, options) {\n setValueIfPropertyExists(target, 'top', options.top, options);\n setValueIfPropertyExists(target, 'right', options.right, options);\n setValueIfPropertyExists(target, 'bottom', options.bottom, options);\n setValueIfPropertyExists(target, 'left', options.left, options);\n}\nfunction initMarkerOptions(target, options) {\n setValueIfPropertyExists(target, 'enabled', options.enabled, options);\n setValueIfPropertyExists(target, 'size', options.size, options);\n setValueIfPropertyExists(target, 'shape', options.shape, options);\n setValueIfPropertyExists(target, 'fill', options.fill, options);\n setValueIfPropertyExists(target, 'stroke', options.stroke, options);\n setValueIfPropertyExists(target, 'strokeWidth', options.strokeWidth, options);\n setValueIfPropertyExists(target, 'formatter', options.formatter, options);\n}\nfunction initLabelOptions(target, options) {\n setValueIfPropertyExists(target, 'enabled', options.enabled, options);\n setValueIfPropertyExists(target, 'fontStyle', options.fontStyle, options);\n setValueIfPropertyExists(target, 'fontWeight', options.fontWeight, options);\n setValueIfPropertyExists(target, 'fontSize', options.fontSize, options);\n setValueIfPropertyExists(target, 'fontFamily', options.fontFamily, options);\n setValueIfPropertyExists(target, 'textAlign', options.textAlign, options);\n setValueIfPropertyExists(target, 'textBaseline', options.textBaseline, options);\n setValueIfPropertyExists(target, 'color', options.color, options);\n setValueIfPropertyExists(target, 'formatter', options.formatter, options);\n setValueIfPropertyExists(target, 'placement', options.placement, options);\n}\nfunction initLineOptions(target, options) {\n setValueIfPropertyExists(target, 'stroke', options.stroke, options);\n setValueIfPropertyExists(target, 'strokeWidth', options.strokeWidth, options);\n}\nfunction initAxisOptions(target, options) {\n setValueIfPropertyExists(target, 'type', options.type, options);\n setValueIfPropertyExists(target, 'stroke', options.stroke, options);\n setValueIfPropertyExists(target, 'strokeWidth', options.strokeWidth, options);\n}\nfunction initHighlightStyleOptions(target, options) {\n setValueIfPropertyExists(target, 'fill', options.fill, options);\n setValueIfPropertyExists(target, 'size', options.size, options);\n setValueIfPropertyExists(target, 'stroke', options.stroke, options);\n setValueIfPropertyExists(target, 'strokeWidth', options.strokeWidth, options);\n}\nfunction initTooltipOptions(target, options) {\n setValueIfPropertyExists(target, 'enabled', options.enabled, options);\n setValueIfPropertyExists(target, 'container', options.container, options);\n setValueIfPropertyExists(target, 'xOffset', options.xOffset, options);\n setValueIfPropertyExists(target, 'yOffset', options.yOffset, options);\n setValueIfPropertyExists(target, 'renderer', options.renderer, options);\n}\nfunction initCrosshairsOptions(target, options) {\n if (target.xLine && options.xLine) {\n initCrosshairLineOptions(target.xLine, options.xLine);\n }\n if (target.yLine && options.yLine) {\n initCrosshairLineOptions(target.yLine, options.yLine);\n }\n}\nfunction initCrosshairLineOptions(target, options) {\n setValueIfPropertyExists(target, 'enabled', options.enabled, options);\n setValueIfPropertyExists(target, 'stroke', options.stroke, options);\n setValueIfPropertyExists(target, 'strokeWidth', options.strokeWidth, options);\n setValueIfPropertyExists(target, 'lineDash', options.lineDash, options);\n setValueIfPropertyExists(target, 'lineCap', options.lineCap, options);\n}\nvar doOnceFlags = {};\n/**\n * If the key was passed before, then doesn't execute the func\n * @param {Function} func\n * @param {string} key\n */\nexport function doOnce(func, key) {\n if (doOnceFlags[key]) {\n return;\n }\n func();\n doOnceFlags[key] = true;\n}\nvar offsetValidator = function (property, value, defaultOffset) {\n if (isNumber(value)) {\n return true;\n }\n var message = \"AG Charts: \" + property + \" must be a number, the value you provided is not a valid number. Using the default of \" + defaultOffset + \"px.\";\n doOnce(function () { return console.warn(message); }, property + \" not a number\");\n return false;\n};\nvar validators = {\n xOffset: offsetValidator,\n yOffset: offsetValidator\n};\nfunction setValueIfPropertyExists(target, property, value, options) {\n if (property in options) {\n if (property in target) {\n var validator = validators[property];\n var isValid = validator ? validator(property, value, target[property]) : true;\n if (isValid && target[property] !== value) {\n // only set property if the value is different to new value\n target[property] = value;\n }\n }\n else {\n console.warn(\"Property \" + property + \" does not exist on the target object.\");\n }\n }\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Autowired, Component, RefSelector, } from '@ag-grid-community/core';\nimport { AgSparkline } from './sparkline/agSparkline';\nvar SparklineCellRenderer = /** @class */ (function (_super) {\n __extends(SparklineCellRenderer, _super);\n function SparklineCellRenderer() {\n return _super.call(this, SparklineCellRenderer.TEMPLATE) || this;\n }\n SparklineCellRenderer.prototype.init = function (params) {\n var _this = this;\n var firstTimeIn = true;\n var updateSparkline = function () {\n var _a = _this.getGui(), clientWidth = _a.clientWidth, clientHeight = _a.clientHeight;\n if (clientWidth === 0 || clientHeight === 0) {\n return;\n }\n if (firstTimeIn) {\n var options = __assign({ data: params.value, width: clientWidth, height: clientHeight, context: {\n data: params.data,\n } }, params.sparklineOptions);\n // create new instance of sparkline\n _this.sparkline = AgSparkline.create(options, _this.sparklineTooltipSingleton.getSparklineTooltip());\n // append sparkline canvas to cell renderer element\n _this.eSparkline.appendChild(_this.sparkline.canvasElement);\n firstTimeIn = false;\n }\n else {\n _this.sparkline.width = clientWidth;\n _this.sparkline.height = clientHeight;\n }\n };\n var unsubscribeFromResize = this.resizeObserverService.observeResize(this.getGui(), updateSparkline);\n this.addDestroyFunc(function () { return unsubscribeFromResize(); });\n };\n SparklineCellRenderer.prototype.refresh = function (params) {\n if (this.sparkline) {\n this.sparkline.data = params.value;\n return true;\n }\n return false;\n };\n SparklineCellRenderer.prototype.destroy = function () {\n if (this.sparkline) {\n this.sparkline.destroy();\n }\n _super.prototype.destroy.call(this);\n };\n SparklineCellRenderer.TEMPLATE /* html */ = \"
\\n \\n
\";\n __decorate([\n RefSelector('eSparkline')\n ], SparklineCellRenderer.prototype, \"eSparkline\", void 0);\n __decorate([\n Autowired('resizeObserverService')\n ], SparklineCellRenderer.prototype, \"resizeObserverService\", void 0);\n __decorate([\n Autowired('sparklineTooltipSingleton')\n ], SparklineCellRenderer.prototype, \"sparklineTooltipSingleton\", void 0);\n return SparklineCellRenderer;\n}(Component));\nexport { SparklineCellRenderer };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Bean, BeanStub, PostConstruct, PreDestroy } from '@ag-grid-community/core';\nimport { SparklineTooltip } from '../sparkline/tooltip/sparklineTooltip';\n/**\n * This 'bean' creates a single sparkline tooltip that is bound to the grid lifecycle.\n */\nvar SparklineTooltipSingleton = /** @class */ (function (_super) {\n __extends(SparklineTooltipSingleton, _super);\n function SparklineTooltipSingleton() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SparklineTooltipSingleton.prototype.postConstruct = function () {\n this.tooltip = new SparklineTooltip();\n };\n SparklineTooltipSingleton.prototype.getSparklineTooltip = function () {\n return this.tooltip;\n };\n SparklineTooltipSingleton.prototype.destroyTooltip = function () {\n if (this.tooltip) {\n this.tooltip.destroy();\n }\n };\n __decorate([\n PostConstruct\n ], SparklineTooltipSingleton.prototype, \"postConstruct\", null);\n __decorate([\n PreDestroy\n ], SparklineTooltipSingleton.prototype, \"destroyTooltip\", null);\n SparklineTooltipSingleton = __decorate([\n Bean('sparklineTooltipSingleton')\n ], SparklineTooltipSingleton);\n return SparklineTooltipSingleton;\n}(BeanStub));\nexport { SparklineTooltipSingleton };\n","import { ModuleNames } from '@ag-grid-community/core';\nimport { EnterpriseCoreModule } from '@ag-grid-enterprise/core';\nimport { SparklineCellRenderer } from './sparklineCellRenderer';\nimport { SparklineTooltipSingleton } from './tooltip/sparklineTooltipSingleton';\nexport var SparklinesModule = {\n moduleName: ModuleNames.SparklinesModule,\n beans: [SparklineTooltipSingleton],\n userComponents: [{ componentName: 'agSparklineCellRenderer', componentClass: SparklineCellRenderer }],\n dependantModules: [EnterpriseCoreModule],\n};\n","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addDays\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} - the new date with the days added\n * @throws {TypeError} - 2 arguments required\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * const result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\n\nexport default function addDays(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var amount = toInteger(dirtyAmount);\n\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n\n if (!amount) {\n // If 0 days, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n\n date.setDate(date.getDate() + amount);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the months added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n */\n\nexport default function addMonths(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var amount = toInteger(dirtyAmount);\n\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n\n if (!amount) {\n // If 0 months, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n\n var dayOfMonth = date.getDate(); // The JS Date object supports date math by accepting out-of-bounds values for\n // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we\n // want except that dates will wrap around the end of a month, meaning that\n // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n // we'll default to the end of the desired month by adding 1 to the desired\n // month and using a date of 0 to back up one day to the end of the desired\n // month.\n\n var endOfDesiredMonth = new Date(date.getTime());\n endOfDesiredMonth.setMonth(date.getMonth() + amount + 1, 0);\n var daysInMonth = endOfDesiredMonth.getDate();\n\n if (dayOfMonth >= daysInMonth) {\n // If we're already at the end of the month, then this is the correct date\n // and we're done.\n return endOfDesiredMonth;\n } else {\n // Otherwise, we now know that setting the original day-of-month value won't\n // cause an overflow, so set the desired day-of-month. Note that we can't\n // just set the date of `endOfDesiredMonth` because that object may have had\n // its time changed in the unusual case where where a DST transition was on\n // the last day of the month and its local time was in the hour skipped or\n // repeated next to a DST transition. So we use `date` instead which is\n // guaranteed to still have the original time.\n date.setFullYear(endOfDesiredMonth.getFullYear(), endOfDesiredMonth.getMonth(), dayOfMonth);\n return date;\n }\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMonths from \"../addMonths/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addYears\n * @category Year Helpers\n * @summary Add the specified number of years to the given date.\n *\n * @description\n * Add the specified number of years to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of years to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the years added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 years to 1 September 2014:\n * const result = addYears(new Date(2014, 8, 1), 5)\n * //=> Sun Sep 01 2019 00:00:00\n */\n\nexport default function addYears(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMonths(dirtyDate, amount * 12);\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfDay\n * @category Day Helpers\n * @summary Return the end of a day for the given date.\n *\n * @description\n * Return the end of a day for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of a day\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of a day for 2 September 2014 11:55:00:\n * const result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 23:59:59.999\n */\n\nexport default function endOfDay(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n date.setHours(23, 59, 59, 999);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n\n/**\n * @name endOfWeek\n * @category Week Helpers\n * @summary Return the end of a week for the given date.\n *\n * @description\n * Return the end of a week for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the end of a week\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n *\n * @example\n * // The end of a week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sat Sep 06 2014 23:59:59.999\n *\n * @example\n * // If the week starts on Monday, the end of the week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Sun Sep 07 2014 23:59:59.999\n */\nexport default function endOfWeek(dirtyDate, dirtyOptions) {\n requiredArgs(1, arguments);\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeWeekStartsOn = locale && locale.options && locale.options.weekStartsOn;\n var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);\n var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n var date = toDate(dirtyDate);\n var day = date.getDay();\n var diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);\n date.setDate(date.getDate() + diff);\n date.setHours(23, 59, 59, 999);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfYear\n * @category Year Helpers\n * @summary Return the end of a year for the given date.\n *\n * @description\n * Return the end of a year for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of a year\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of a year for 2 September 2014 11:55:00:\n * var result = endOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Dec 31 2014 23:59:59.999\n */\n\nexport default function endOfYear(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getFullYear();\n date.setFullYear(year + 1, 0, 0);\n date.setHours(23, 59, 59, 999);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isAfter\n * @category Common Helpers\n * @summary Is the first date after the second one?\n *\n * @description\n * Is the first date after the second one?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date that should be after the other one to return true\n * @param {Date|Number} dateToCompare - the date to compare with\n * @returns {Boolean} the first date is after the second date\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Is 10 July 1989 after 11 February 1987?\n * var result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> true\n */\n\nexport default function isAfter(dirtyDate, dirtyDateToCompare) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var dateToCompare = toDate(dirtyDateToCompare);\n return date.getTime() > dateToCompare.getTime();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isBefore\n * @category Common Helpers\n * @summary Is the first date before the second one?\n *\n * @description\n * Is the first date before the second one?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date that should be before the other one to return true\n * @param {Date|Number} dateToCompare - the date to compare with\n * @returns {Boolean} the first date is before the second date\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Is 10 July 1989 before 11 February 1987?\n * var result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> false\n */\n\nexport default function isBefore(dirtyDate, dirtyDateToCompare) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var dateToCompare = toDate(dirtyDateToCompare);\n return date.getTime() < dateToCompare.getTime();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfDay\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start of a day for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a day\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\n\nexport default function startOfDay(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n date.setHours(0, 0, 0, 0);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfHour\n * @category Hour Helpers\n * @summary Return the start of an hour for the given date.\n *\n * @description\n * Return the start of an hour for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of an hour\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of an hour for 2 September 2014 11:55:00:\n * const result = startOfHour(new Date(2014, 8, 2, 11, 55))\n * //=> Tue Sep 02 2014 11:00:00\n */\n\nexport default function startOfHour(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n date.setMinutes(0, 0, 0);\n return date;\n}","export default function assign(target, dirtyObject) {\n if (target == null) {\n throw new TypeError('assign requires that input parameter not be null or undefined');\n }\n\n dirtyObject = dirtyObject || {};\n\n for (var property in dirtyObject) {\n if (Object.prototype.hasOwnProperty.call(dirtyObject, property)) {\n target[property] = dirtyObject[property];\n }\n }\n\n return target;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport toInteger from \"../toInteger/index.js\"; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nexport default function setUTCDay(dirtyDate, dirtyDay, dirtyOptions) {\n requiredArgs(2, arguments);\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeWeekStartsOn = locale && locale.options && locale.options.weekStartsOn;\n var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);\n var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n var date = toDate(dirtyDate);\n var day = toInteger(dirtyDay);\n var currentDay = date.getUTCDay();\n var remainder = day % 7;\n var dayIndex = (remainder + 7) % 7;\n var diff = (dayIndex < weekStartsOn ? 7 : 0) + day - currentDay;\n date.setUTCDate(date.getUTCDate() + diff);\n return date;\n}","import getUTCWeekYear from \"../../../_lib/getUTCWeekYear/index.js\";\nimport setUTCDay from \"../../../_lib/setUTCDay/index.js\";\nimport setUTCISODay from \"../../../_lib/setUTCISODay/index.js\";\nimport setUTCISOWeek from \"../../../_lib/setUTCISOWeek/index.js\";\nimport setUTCWeek from \"../../../_lib/setUTCWeek/index.js\";\nimport startOfUTCISOWeek from \"../../../_lib/startOfUTCISOWeek/index.js\";\nimport startOfUTCWeek from \"../../../_lib/startOfUTCWeek/index.js\";\nvar MILLISECONDS_IN_HOUR = 3600000;\nvar MILLISECONDS_IN_MINUTE = 60000;\nvar MILLISECONDS_IN_SECOND = 1000;\nvar numericPatterns = {\n month: /^(1[0-2]|0?\\d)/,\n // 0 to 12\n date: /^(3[0-1]|[0-2]?\\d)/,\n // 0 to 31\n dayOfYear: /^(36[0-6]|3[0-5]\\d|[0-2]?\\d?\\d)/,\n // 0 to 366\n week: /^(5[0-3]|[0-4]?\\d)/,\n // 0 to 53\n hour23h: /^(2[0-3]|[0-1]?\\d)/,\n // 0 to 23\n hour24h: /^(2[0-4]|[0-1]?\\d)/,\n // 0 to 24\n hour11h: /^(1[0-1]|0?\\d)/,\n // 0 to 11\n hour12h: /^(1[0-2]|0?\\d)/,\n // 0 to 12\n minute: /^[0-5]?\\d/,\n // 0 to 59\n second: /^[0-5]?\\d/,\n // 0 to 59\n singleDigit: /^\\d/,\n // 0 to 9\n twoDigits: /^\\d{1,2}/,\n // 0 to 99\n threeDigits: /^\\d{1,3}/,\n // 0 to 999\n fourDigits: /^\\d{1,4}/,\n // 0 to 9999\n anyDigitsSigned: /^-?\\d+/,\n singleDigitSigned: /^-?\\d/,\n // 0 to 9, -0 to -9\n twoDigitsSigned: /^-?\\d{1,2}/,\n // 0 to 99, -0 to -99\n threeDigitsSigned: /^-?\\d{1,3}/,\n // 0 to 999, -0 to -999\n fourDigitsSigned: /^-?\\d{1,4}/ // 0 to 9999, -0 to -9999\n\n};\nvar timezonePatterns = {\n basicOptionalMinutes: /^([+-])(\\d{2})(\\d{2})?|Z/,\n basic: /^([+-])(\\d{2})(\\d{2})|Z/,\n basicOptionalSeconds: /^([+-])(\\d{2})(\\d{2})((\\d{2}))?|Z/,\n extended: /^([+-])(\\d{2}):(\\d{2})|Z/,\n extendedOptionalSeconds: /^([+-])(\\d{2}):(\\d{2})(:(\\d{2}))?|Z/\n};\n\nfunction parseNumericPattern(pattern, string, valueCallback) {\n var matchResult = string.match(pattern);\n\n if (!matchResult) {\n return null;\n }\n\n var value = parseInt(matchResult[0], 10);\n return {\n value: valueCallback ? valueCallback(value) : value,\n rest: string.slice(matchResult[0].length)\n };\n}\n\nfunction parseTimezonePattern(pattern, string) {\n var matchResult = string.match(pattern);\n\n if (!matchResult) {\n return null;\n } // Input is 'Z'\n\n\n if (matchResult[0] === 'Z') {\n return {\n value: 0,\n rest: string.slice(1)\n };\n }\n\n var sign = matchResult[1] === '+' ? 1 : -1;\n var hours = matchResult[2] ? parseInt(matchResult[2], 10) : 0;\n var minutes = matchResult[3] ? parseInt(matchResult[3], 10) : 0;\n var seconds = matchResult[5] ? parseInt(matchResult[5], 10) : 0;\n return {\n value: sign * (hours * MILLISECONDS_IN_HOUR + minutes * MILLISECONDS_IN_MINUTE + seconds * MILLISECONDS_IN_SECOND),\n rest: string.slice(matchResult[0].length)\n };\n}\n\nfunction parseAnyDigitsSigned(string, valueCallback) {\n return parseNumericPattern(numericPatterns.anyDigitsSigned, string, valueCallback);\n}\n\nfunction parseNDigits(n, string, valueCallback) {\n switch (n) {\n case 1:\n return parseNumericPattern(numericPatterns.singleDigit, string, valueCallback);\n\n case 2:\n return parseNumericPattern(numericPatterns.twoDigits, string, valueCallback);\n\n case 3:\n return parseNumericPattern(numericPatterns.threeDigits, string, valueCallback);\n\n case 4:\n return parseNumericPattern(numericPatterns.fourDigits, string, valueCallback);\n\n default:\n return parseNumericPattern(new RegExp('^\\\\d{1,' + n + '}'), string, valueCallback);\n }\n}\n\nfunction parseNDigitsSigned(n, string, valueCallback) {\n switch (n) {\n case 1:\n return parseNumericPattern(numericPatterns.singleDigitSigned, string, valueCallback);\n\n case 2:\n return parseNumericPattern(numericPatterns.twoDigitsSigned, string, valueCallback);\n\n case 3:\n return parseNumericPattern(numericPatterns.threeDigitsSigned, string, valueCallback);\n\n case 4:\n return parseNumericPattern(numericPatterns.fourDigitsSigned, string, valueCallback);\n\n default:\n return parseNumericPattern(new RegExp('^-?\\\\d{1,' + n + '}'), string, valueCallback);\n }\n}\n\nfunction dayPeriodEnumToHours(enumValue) {\n switch (enumValue) {\n case 'morning':\n return 4;\n\n case 'evening':\n return 17;\n\n case 'pm':\n case 'noon':\n case 'afternoon':\n return 12;\n\n case 'am':\n case 'midnight':\n case 'night':\n default:\n return 0;\n }\n}\n\nfunction normalizeTwoDigitYear(twoDigitYear, currentYear) {\n var isCommonEra = currentYear > 0; // Absolute number of the current year:\n // 1 -> 1 AC\n // 0 -> 1 BC\n // -1 -> 2 BC\n\n var absCurrentYear = isCommonEra ? currentYear : 1 - currentYear;\n var result;\n\n if (absCurrentYear <= 50) {\n result = twoDigitYear || 100;\n } else {\n var rangeEnd = absCurrentYear + 50;\n var rangeEndCentury = Math.floor(rangeEnd / 100) * 100;\n var isPreviousCentury = twoDigitYear >= rangeEnd % 100;\n result = twoDigitYear + rangeEndCentury - (isPreviousCentury ? 100 : 0);\n }\n\n return isCommonEra ? result : 1 - result;\n}\n\nvar DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nvar DAYS_IN_MONTH_LEAP_YEAR = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; // User for validation\n\nfunction isLeapYearIndex(year) {\n return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0;\n}\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O* | Timezone (GMT) |\n * | p | | P | |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z* | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `parse` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n */\n\n\nvar parsers = {\n // Era\n G: {\n priority: 140,\n parse: function (string, token, match, _options) {\n switch (token) {\n // AD, BC\n case 'G':\n case 'GG':\n case 'GGG':\n return match.era(string, {\n width: 'abbreviated'\n }) || match.era(string, {\n width: 'narrow'\n });\n // A, B\n\n case 'GGGGG':\n return match.era(string, {\n width: 'narrow'\n });\n // Anno Domini, Before Christ\n\n case 'GGGG':\n default:\n return match.era(string, {\n width: 'wide'\n }) || match.era(string, {\n width: 'abbreviated'\n }) || match.era(string, {\n width: 'narrow'\n });\n }\n },\n set: function (date, flags, value, _options) {\n flags.era = value;\n date.setUTCFullYear(value, 0, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['R', 'u', 't', 'T']\n },\n // Year\n y: {\n // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_Patterns\n // | Year | y | yy | yyy | yyyy | yyyyy |\n // |----------|-------|----|-------|-------|-------|\n // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n priority: 130,\n parse: function (string, token, match, _options) {\n var valueCallback = function (year) {\n return {\n year: year,\n isTwoDigitYear: token === 'yy'\n };\n };\n\n switch (token) {\n case 'y':\n return parseNDigits(4, string, valueCallback);\n\n case 'yo':\n return match.ordinalNumber(string, {\n unit: 'year',\n valueCallback: valueCallback\n });\n\n default:\n return parseNDigits(token.length, string, valueCallback);\n }\n },\n validate: function (_date, value, _options) {\n return value.isTwoDigitYear || value.year > 0;\n },\n set: function (date, flags, value, _options) {\n var currentYear = date.getUTCFullYear();\n\n if (value.isTwoDigitYear) {\n var normalizedTwoDigitYear = normalizeTwoDigitYear(value.year, currentYear);\n date.setUTCFullYear(normalizedTwoDigitYear, 0, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n\n var year = !('era' in flags) || flags.era === 1 ? value.year : 1 - value.year;\n date.setUTCFullYear(year, 0, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['Y', 'R', 'u', 'w', 'I', 'i', 'e', 'c', 't', 'T']\n },\n // Local week-numbering year\n Y: {\n priority: 130,\n parse: function (string, token, match, _options) {\n var valueCallback = function (year) {\n return {\n year: year,\n isTwoDigitYear: token === 'YY'\n };\n };\n\n switch (token) {\n case 'Y':\n return parseNDigits(4, string, valueCallback);\n\n case 'Yo':\n return match.ordinalNumber(string, {\n unit: 'year',\n valueCallback: valueCallback\n });\n\n default:\n return parseNDigits(token.length, string, valueCallback);\n }\n },\n validate: function (_date, value, _options) {\n return value.isTwoDigitYear || value.year > 0;\n },\n set: function (date, flags, value, options) {\n var currentYear = getUTCWeekYear(date, options);\n\n if (value.isTwoDigitYear) {\n var normalizedTwoDigitYear = normalizeTwoDigitYear(value.year, currentYear);\n date.setUTCFullYear(normalizedTwoDigitYear, 0, options.firstWeekContainsDate);\n date.setUTCHours(0, 0, 0, 0);\n return startOfUTCWeek(date, options);\n }\n\n var year = !('era' in flags) || flags.era === 1 ? value.year : 1 - value.year;\n date.setUTCFullYear(year, 0, options.firstWeekContainsDate);\n date.setUTCHours(0, 0, 0, 0);\n return startOfUTCWeek(date, options);\n },\n incompatibleTokens: ['y', 'R', 'u', 'Q', 'q', 'M', 'L', 'I', 'd', 'D', 'i', 't', 'T']\n },\n // ISO week-numbering year\n R: {\n priority: 130,\n parse: function (string, token, _match, _options) {\n if (token === 'R') {\n return parseNDigitsSigned(4, string);\n }\n\n return parseNDigitsSigned(token.length, string);\n },\n set: function (_date, _flags, value, _options) {\n var firstWeekOfYear = new Date(0);\n firstWeekOfYear.setUTCFullYear(value, 0, 4);\n firstWeekOfYear.setUTCHours(0, 0, 0, 0);\n return startOfUTCISOWeek(firstWeekOfYear);\n },\n incompatibleTokens: ['G', 'y', 'Y', 'u', 'Q', 'q', 'M', 'L', 'w', 'd', 'D', 'e', 'c', 't', 'T']\n },\n // Extended year\n u: {\n priority: 130,\n parse: function (string, token, _match, _options) {\n if (token === 'u') {\n return parseNDigitsSigned(4, string);\n }\n\n return parseNDigitsSigned(token.length, string);\n },\n set: function (date, _flags, value, _options) {\n date.setUTCFullYear(value, 0, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['G', 'y', 'Y', 'R', 'w', 'I', 'i', 'e', 'c', 't', 'T']\n },\n // Quarter\n Q: {\n priority: 120,\n parse: function (string, token, match, _options) {\n switch (token) {\n // 1, 2, 3, 4\n case 'Q':\n case 'QQ':\n // 01, 02, 03, 04\n return parseNDigits(token.length, string);\n // 1st, 2nd, 3rd, 4th\n\n case 'Qo':\n return match.ordinalNumber(string, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n\n case 'QQQ':\n return match.quarter(string, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.quarter(string, {\n width: 'narrow',\n context: 'formatting'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n\n case 'QQQQQ':\n return match.quarter(string, {\n width: 'narrow',\n context: 'formatting'\n });\n // 1st quarter, 2nd quarter, ...\n\n case 'QQQQ':\n default:\n return match.quarter(string, {\n width: 'wide',\n context: 'formatting'\n }) || match.quarter(string, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.quarter(string, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n },\n validate: function (_date, value, _options) {\n return value >= 1 && value <= 4;\n },\n set: function (date, _flags, value, _options) {\n date.setUTCMonth((value - 1) * 3, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['Y', 'R', 'q', 'M', 'L', 'w', 'I', 'd', 'D', 'i', 'e', 'c', 't', 'T']\n },\n // Stand-alone quarter\n q: {\n priority: 120,\n parse: function (string, token, match, _options) {\n switch (token) {\n // 1, 2, 3, 4\n case 'q':\n case 'qq':\n // 01, 02, 03, 04\n return parseNDigits(token.length, string);\n // 1st, 2nd, 3rd, 4th\n\n case 'qo':\n return match.ordinalNumber(string, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n\n case 'qqq':\n return match.quarter(string, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.quarter(string, {\n width: 'narrow',\n context: 'standalone'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n\n case 'qqqqq':\n return match.quarter(string, {\n width: 'narrow',\n context: 'standalone'\n });\n // 1st quarter, 2nd quarter, ...\n\n case 'qqqq':\n default:\n return match.quarter(string, {\n width: 'wide',\n context: 'standalone'\n }) || match.quarter(string, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.quarter(string, {\n width: 'narrow',\n context: 'standalone'\n });\n }\n },\n validate: function (_date, value, _options) {\n return value >= 1 && value <= 4;\n },\n set: function (date, _flags, value, _options) {\n date.setUTCMonth((value - 1) * 3, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['Y', 'R', 'Q', 'M', 'L', 'w', 'I', 'd', 'D', 'i', 'e', 'c', 't', 'T']\n },\n // Month\n M: {\n priority: 110,\n parse: function (string, token, match, _options) {\n var valueCallback = function (value) {\n return value - 1;\n };\n\n switch (token) {\n // 1, 2, ..., 12\n case 'M':\n return parseNumericPattern(numericPatterns.month, string, valueCallback);\n // 01, 02, ..., 12\n\n case 'MM':\n return parseNDigits(2, string, valueCallback);\n // 1st, 2nd, ..., 12th\n\n case 'Mo':\n return match.ordinalNumber(string, {\n unit: 'month',\n valueCallback: valueCallback\n });\n // Jan, Feb, ..., Dec\n\n case 'MMM':\n return match.month(string, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.month(string, {\n width: 'narrow',\n context: 'formatting'\n });\n // J, F, ..., D\n\n case 'MMMMM':\n return match.month(string, {\n width: 'narrow',\n context: 'formatting'\n });\n // January, February, ..., December\n\n case 'MMMM':\n default:\n return match.month(string, {\n width: 'wide',\n context: 'formatting'\n }) || match.month(string, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.month(string, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n },\n validate: function (_date, value, _options) {\n return value >= 0 && value <= 11;\n },\n set: function (date, _flags, value, _options) {\n date.setUTCMonth(value, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['Y', 'R', 'q', 'Q', 'L', 'w', 'I', 'D', 'i', 'e', 'c', 't', 'T']\n },\n // Stand-alone month\n L: {\n priority: 110,\n parse: function (string, token, match, _options) {\n var valueCallback = function (value) {\n return value - 1;\n };\n\n switch (token) {\n // 1, 2, ..., 12\n case 'L':\n return parseNumericPattern(numericPatterns.month, string, valueCallback);\n // 01, 02, ..., 12\n\n case 'LL':\n return parseNDigits(2, string, valueCallback);\n // 1st, 2nd, ..., 12th\n\n case 'Lo':\n return match.ordinalNumber(string, {\n unit: 'month',\n valueCallback: valueCallback\n });\n // Jan, Feb, ..., Dec\n\n case 'LLL':\n return match.month(string, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.month(string, {\n width: 'narrow',\n context: 'standalone'\n });\n // J, F, ..., D\n\n case 'LLLLL':\n return match.month(string, {\n width: 'narrow',\n context: 'standalone'\n });\n // January, February, ..., December\n\n case 'LLLL':\n default:\n return match.month(string, {\n width: 'wide',\n context: 'standalone'\n }) || match.month(string, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.month(string, {\n width: 'narrow',\n context: 'standalone'\n });\n }\n },\n validate: function (_date, value, _options) {\n return value >= 0 && value <= 11;\n },\n set: function (date, _flags, value, _options) {\n date.setUTCMonth(value, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['Y', 'R', 'q', 'Q', 'M', 'w', 'I', 'D', 'i', 'e', 'c', 't', 'T']\n },\n // Local week of year\n w: {\n priority: 100,\n parse: function (string, token, match, _options) {\n switch (token) {\n case 'w':\n return parseNumericPattern(numericPatterns.week, string);\n\n case 'wo':\n return match.ordinalNumber(string, {\n unit: 'week'\n });\n\n default:\n return parseNDigits(token.length, string);\n }\n },\n validate: function (_date, value, _options) {\n return value >= 1 && value <= 53;\n },\n set: function (date, _flags, value, options) {\n return startOfUTCWeek(setUTCWeek(date, value, options), options);\n },\n incompatibleTokens: ['y', 'R', 'u', 'q', 'Q', 'M', 'L', 'I', 'd', 'D', 'i', 't', 'T']\n },\n // ISO week of year\n I: {\n priority: 100,\n parse: function (string, token, match, _options) {\n switch (token) {\n case 'I':\n return parseNumericPattern(numericPatterns.week, string);\n\n case 'Io':\n return match.ordinalNumber(string, {\n unit: 'week'\n });\n\n default:\n return parseNDigits(token.length, string);\n }\n },\n validate: function (_date, value, _options) {\n return value >= 1 && value <= 53;\n },\n set: function (date, _flags, value, options) {\n return startOfUTCISOWeek(setUTCISOWeek(date, value, options), options);\n },\n incompatibleTokens: ['y', 'Y', 'u', 'q', 'Q', 'M', 'L', 'w', 'd', 'D', 'e', 'c', 't', 'T']\n },\n // Day of the month\n d: {\n priority: 90,\n subPriority: 1,\n parse: function (string, token, match, _options) {\n switch (token) {\n case 'd':\n return parseNumericPattern(numericPatterns.date, string);\n\n case 'do':\n return match.ordinalNumber(string, {\n unit: 'date'\n });\n\n default:\n return parseNDigits(token.length, string);\n }\n },\n validate: function (date, value, _options) {\n var year = date.getUTCFullYear();\n var isLeapYear = isLeapYearIndex(year);\n var month = date.getUTCMonth();\n\n if (isLeapYear) {\n return value >= 1 && value <= DAYS_IN_MONTH_LEAP_YEAR[month];\n } else {\n return value >= 1 && value <= DAYS_IN_MONTH[month];\n }\n },\n set: function (date, _flags, value, _options) {\n date.setUTCDate(value);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['Y', 'R', 'q', 'Q', 'w', 'I', 'D', 'i', 'e', 'c', 't', 'T']\n },\n // Day of year\n D: {\n priority: 90,\n subPriority: 1,\n parse: function (string, token, match, _options) {\n switch (token) {\n case 'D':\n case 'DD':\n return parseNumericPattern(numericPatterns.dayOfYear, string);\n\n case 'Do':\n return match.ordinalNumber(string, {\n unit: 'date'\n });\n\n default:\n return parseNDigits(token.length, string);\n }\n },\n validate: function (date, value, _options) {\n var year = date.getUTCFullYear();\n var isLeapYear = isLeapYearIndex(year);\n\n if (isLeapYear) {\n return value >= 1 && value <= 366;\n } else {\n return value >= 1 && value <= 365;\n }\n },\n set: function (date, _flags, value, _options) {\n date.setUTCMonth(0, value);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['Y', 'R', 'q', 'Q', 'M', 'L', 'w', 'I', 'd', 'E', 'i', 'e', 'c', 't', 'T']\n },\n // Day of week\n E: {\n priority: 90,\n parse: function (string, token, match, _options) {\n switch (token) {\n // Tue\n case 'E':\n case 'EE':\n case 'EEE':\n return match.day(string, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.day(string, {\n width: 'short',\n context: 'formatting'\n }) || match.day(string, {\n width: 'narrow',\n context: 'formatting'\n });\n // T\n\n case 'EEEEE':\n return match.day(string, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'EEEEEE':\n return match.day(string, {\n width: 'short',\n context: 'formatting'\n }) || match.day(string, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tuesday\n\n case 'EEEE':\n default:\n return match.day(string, {\n width: 'wide',\n context: 'formatting'\n }) || match.day(string, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.day(string, {\n width: 'short',\n context: 'formatting'\n }) || match.day(string, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n },\n validate: function (_date, value, _options) {\n return value >= 0 && value <= 6;\n },\n set: function (date, _flags, value, options) {\n date = setUTCDay(date, value, options);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['D', 'i', 'e', 'c', 't', 'T']\n },\n // Local day of week\n e: {\n priority: 90,\n parse: function (string, token, match, options) {\n var valueCallback = function (value) {\n var wholeWeekDays = Math.floor((value - 1) / 7) * 7;\n return (value + options.weekStartsOn + 6) % 7 + wholeWeekDays;\n };\n\n switch (token) {\n // 3\n case 'e':\n case 'ee':\n // 03\n return parseNDigits(token.length, string, valueCallback);\n // 3rd\n\n case 'eo':\n return match.ordinalNumber(string, {\n unit: 'day',\n valueCallback: valueCallback\n });\n // Tue\n\n case 'eee':\n return match.day(string, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.day(string, {\n width: 'short',\n context: 'formatting'\n }) || match.day(string, {\n width: 'narrow',\n context: 'formatting'\n });\n // T\n\n case 'eeeee':\n return match.day(string, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'eeeeee':\n return match.day(string, {\n width: 'short',\n context: 'formatting'\n }) || match.day(string, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tuesday\n\n case 'eeee':\n default:\n return match.day(string, {\n width: 'wide',\n context: 'formatting'\n }) || match.day(string, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.day(string, {\n width: 'short',\n context: 'formatting'\n }) || match.day(string, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n },\n validate: function (_date, value, _options) {\n return value >= 0 && value <= 6;\n },\n set: function (date, _flags, value, options) {\n date = setUTCDay(date, value, options);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['y', 'R', 'u', 'q', 'Q', 'M', 'L', 'I', 'd', 'D', 'E', 'i', 'c', 't', 'T']\n },\n // Stand-alone local day of week\n c: {\n priority: 90,\n parse: function (string, token, match, options) {\n var valueCallback = function (value) {\n var wholeWeekDays = Math.floor((value - 1) / 7) * 7;\n return (value + options.weekStartsOn + 6) % 7 + wholeWeekDays;\n };\n\n switch (token) {\n // 3\n case 'c':\n case 'cc':\n // 03\n return parseNDigits(token.length, string, valueCallback);\n // 3rd\n\n case 'co':\n return match.ordinalNumber(string, {\n unit: 'day',\n valueCallback: valueCallback\n });\n // Tue\n\n case 'ccc':\n return match.day(string, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.day(string, {\n width: 'short',\n context: 'standalone'\n }) || match.day(string, {\n width: 'narrow',\n context: 'standalone'\n });\n // T\n\n case 'ccccc':\n return match.day(string, {\n width: 'narrow',\n context: 'standalone'\n });\n // Tu\n\n case 'cccccc':\n return match.day(string, {\n width: 'short',\n context: 'standalone'\n }) || match.day(string, {\n width: 'narrow',\n context: 'standalone'\n });\n // Tuesday\n\n case 'cccc':\n default:\n return match.day(string, {\n width: 'wide',\n context: 'standalone'\n }) || match.day(string, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.day(string, {\n width: 'short',\n context: 'standalone'\n }) || match.day(string, {\n width: 'narrow',\n context: 'standalone'\n });\n }\n },\n validate: function (_date, value, _options) {\n return value >= 0 && value <= 6;\n },\n set: function (date, _flags, value, options) {\n date = setUTCDay(date, value, options);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['y', 'R', 'u', 'q', 'Q', 'M', 'L', 'I', 'd', 'D', 'E', 'i', 'e', 't', 'T']\n },\n // ISO day of week\n i: {\n priority: 90,\n parse: function (string, token, match, _options) {\n var valueCallback = function (value) {\n if (value === 0) {\n return 7;\n }\n\n return value;\n };\n\n switch (token) {\n // 2\n case 'i':\n case 'ii':\n // 02\n return parseNDigits(token.length, string);\n // 2nd\n\n case 'io':\n return match.ordinalNumber(string, {\n unit: 'day'\n });\n // Tue\n\n case 'iii':\n return match.day(string, {\n width: 'abbreviated',\n context: 'formatting',\n valueCallback: valueCallback\n }) || match.day(string, {\n width: 'short',\n context: 'formatting',\n valueCallback: valueCallback\n }) || match.day(string, {\n width: 'narrow',\n context: 'formatting',\n valueCallback: valueCallback\n });\n // T\n\n case 'iiiii':\n return match.day(string, {\n width: 'narrow',\n context: 'formatting',\n valueCallback: valueCallback\n });\n // Tu\n\n case 'iiiiii':\n return match.day(string, {\n width: 'short',\n context: 'formatting',\n valueCallback: valueCallback\n }) || match.day(string, {\n width: 'narrow',\n context: 'formatting',\n valueCallback: valueCallback\n });\n // Tuesday\n\n case 'iiii':\n default:\n return match.day(string, {\n width: 'wide',\n context: 'formatting',\n valueCallback: valueCallback\n }) || match.day(string, {\n width: 'abbreviated',\n context: 'formatting',\n valueCallback: valueCallback\n }) || match.day(string, {\n width: 'short',\n context: 'formatting',\n valueCallback: valueCallback\n }) || match.day(string, {\n width: 'narrow',\n context: 'formatting',\n valueCallback: valueCallback\n });\n }\n },\n validate: function (_date, value, _options) {\n return value >= 1 && value <= 7;\n },\n set: function (date, _flags, value, options) {\n date = setUTCISODay(date, value, options);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['y', 'Y', 'u', 'q', 'Q', 'M', 'L', 'w', 'd', 'D', 'E', 'e', 'c', 't', 'T']\n },\n // AM or PM\n a: {\n priority: 80,\n parse: function (string, token, match, _options) {\n switch (token) {\n case 'a':\n case 'aa':\n case 'aaa':\n return match.dayPeriod(string, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(string, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'aaaaa':\n return match.dayPeriod(string, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'aaaa':\n default:\n return match.dayPeriod(string, {\n width: 'wide',\n context: 'formatting'\n }) || match.dayPeriod(string, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(string, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n },\n set: function (date, _flags, value, _options) {\n date.setUTCHours(dayPeriodEnumToHours(value), 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['b', 'B', 'H', 'k', 't', 'T']\n },\n // AM, PM, midnight\n b: {\n priority: 80,\n parse: function (string, token, match, _options) {\n switch (token) {\n case 'b':\n case 'bb':\n case 'bbb':\n return match.dayPeriod(string, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(string, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'bbbbb':\n return match.dayPeriod(string, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'bbbb':\n default:\n return match.dayPeriod(string, {\n width: 'wide',\n context: 'formatting'\n }) || match.dayPeriod(string, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(string, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n },\n set: function (date, _flags, value, _options) {\n date.setUTCHours(dayPeriodEnumToHours(value), 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['a', 'B', 'H', 'k', 't', 'T']\n },\n // in the morning, in the afternoon, in the evening, at night\n B: {\n priority: 80,\n parse: function (string, token, match, _options) {\n switch (token) {\n case 'B':\n case 'BB':\n case 'BBB':\n return match.dayPeriod(string, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(string, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'BBBBB':\n return match.dayPeriod(string, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'BBBB':\n default:\n return match.dayPeriod(string, {\n width: 'wide',\n context: 'formatting'\n }) || match.dayPeriod(string, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(string, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n },\n set: function (date, _flags, value, _options) {\n date.setUTCHours(dayPeriodEnumToHours(value), 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['a', 'b', 't', 'T']\n },\n // Hour [1-12]\n h: {\n priority: 70,\n parse: function (string, token, match, _options) {\n switch (token) {\n case 'h':\n return parseNumericPattern(numericPatterns.hour12h, string);\n\n case 'ho':\n return match.ordinalNumber(string, {\n unit: 'hour'\n });\n\n default:\n return parseNDigits(token.length, string);\n }\n },\n validate: function (_date, value, _options) {\n return value >= 1 && value <= 12;\n },\n set: function (date, _flags, value, _options) {\n var isPM = date.getUTCHours() >= 12;\n\n if (isPM && value < 12) {\n date.setUTCHours(value + 12, 0, 0, 0);\n } else if (!isPM && value === 12) {\n date.setUTCHours(0, 0, 0, 0);\n } else {\n date.setUTCHours(value, 0, 0, 0);\n }\n\n return date;\n },\n incompatibleTokens: ['H', 'K', 'k', 't', 'T']\n },\n // Hour [0-23]\n H: {\n priority: 70,\n parse: function (string, token, match, _options) {\n switch (token) {\n case 'H':\n return parseNumericPattern(numericPatterns.hour23h, string);\n\n case 'Ho':\n return match.ordinalNumber(string, {\n unit: 'hour'\n });\n\n default:\n return parseNDigits(token.length, string);\n }\n },\n validate: function (_date, value, _options) {\n return value >= 0 && value <= 23;\n },\n set: function (date, _flags, value, _options) {\n date.setUTCHours(value, 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['a', 'b', 'h', 'K', 'k', 't', 'T']\n },\n // Hour [0-11]\n K: {\n priority: 70,\n parse: function (string, token, match, _options) {\n switch (token) {\n case 'K':\n return parseNumericPattern(numericPatterns.hour11h, string);\n\n case 'Ko':\n return match.ordinalNumber(string, {\n unit: 'hour'\n });\n\n default:\n return parseNDigits(token.length, string);\n }\n },\n validate: function (_date, value, _options) {\n return value >= 0 && value <= 11;\n },\n set: function (date, _flags, value, _options) {\n var isPM = date.getUTCHours() >= 12;\n\n if (isPM && value < 12) {\n date.setUTCHours(value + 12, 0, 0, 0);\n } else {\n date.setUTCHours(value, 0, 0, 0);\n }\n\n return date;\n },\n incompatibleTokens: ['h', 'H', 'k', 't', 'T']\n },\n // Hour [1-24]\n k: {\n priority: 70,\n parse: function (string, token, match, _options) {\n switch (token) {\n case 'k':\n return parseNumericPattern(numericPatterns.hour24h, string);\n\n case 'ko':\n return match.ordinalNumber(string, {\n unit: 'hour'\n });\n\n default:\n return parseNDigits(token.length, string);\n }\n },\n validate: function (_date, value, _options) {\n return value >= 1 && value <= 24;\n },\n set: function (date, _flags, value, _options) {\n var hours = value <= 24 ? value % 24 : value;\n date.setUTCHours(hours, 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['a', 'b', 'h', 'H', 'K', 't', 'T']\n },\n // Minute\n m: {\n priority: 60,\n parse: function (string, token, match, _options) {\n switch (token) {\n case 'm':\n return parseNumericPattern(numericPatterns.minute, string);\n\n case 'mo':\n return match.ordinalNumber(string, {\n unit: 'minute'\n });\n\n default:\n return parseNDigits(token.length, string);\n }\n },\n validate: function (_date, value, _options) {\n return value >= 0 && value <= 59;\n },\n set: function (date, _flags, value, _options) {\n date.setUTCMinutes(value, 0, 0);\n return date;\n },\n incompatibleTokens: ['t', 'T']\n },\n // Second\n s: {\n priority: 50,\n parse: function (string, token, match, _options) {\n switch (token) {\n case 's':\n return parseNumericPattern(numericPatterns.second, string);\n\n case 'so':\n return match.ordinalNumber(string, {\n unit: 'second'\n });\n\n default:\n return parseNDigits(token.length, string);\n }\n },\n validate: function (_date, value, _options) {\n return value >= 0 && value <= 59;\n },\n set: function (date, _flags, value, _options) {\n date.setUTCSeconds(value, 0);\n return date;\n },\n incompatibleTokens: ['t', 'T']\n },\n // Fraction of second\n S: {\n priority: 30,\n parse: function (string, token, _match, _options) {\n var valueCallback = function (value) {\n return Math.floor(value * Math.pow(10, -token.length + 3));\n };\n\n return parseNDigits(token.length, string, valueCallback);\n },\n set: function (date, _flags, value, _options) {\n date.setUTCMilliseconds(value);\n return date;\n },\n incompatibleTokens: ['t', 'T']\n },\n // Timezone (ISO-8601. +00:00 is `'Z'`)\n X: {\n priority: 10,\n parse: function (string, token, _match, _options) {\n switch (token) {\n case 'X':\n return parseTimezonePattern(timezonePatterns.basicOptionalMinutes, string);\n\n case 'XX':\n return parseTimezonePattern(timezonePatterns.basic, string);\n\n case 'XXXX':\n return parseTimezonePattern(timezonePatterns.basicOptionalSeconds, string);\n\n case 'XXXXX':\n return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds, string);\n\n case 'XXX':\n default:\n return parseTimezonePattern(timezonePatterns.extended, string);\n }\n },\n set: function (date, flags, value, _options) {\n if (flags.timestampIsSet) {\n return date;\n }\n\n return new Date(date.getTime() - value);\n },\n incompatibleTokens: ['t', 'T', 'x']\n },\n // Timezone (ISO-8601)\n x: {\n priority: 10,\n parse: function (string, token, _match, _options) {\n switch (token) {\n case 'x':\n return parseTimezonePattern(timezonePatterns.basicOptionalMinutes, string);\n\n case 'xx':\n return parseTimezonePattern(timezonePatterns.basic, string);\n\n case 'xxxx':\n return parseTimezonePattern(timezonePatterns.basicOptionalSeconds, string);\n\n case 'xxxxx':\n return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds, string);\n\n case 'xxx':\n default:\n return parseTimezonePattern(timezonePatterns.extended, string);\n }\n },\n set: function (date, flags, value, _options) {\n if (flags.timestampIsSet) {\n return date;\n }\n\n return new Date(date.getTime() - value);\n },\n incompatibleTokens: ['t', 'T', 'X']\n },\n // Seconds timestamp\n t: {\n priority: 40,\n parse: function (string, _token, _match, _options) {\n return parseAnyDigitsSigned(string);\n },\n set: function (_date, _flags, value, _options) {\n return [new Date(value * 1000), {\n timestampIsSet: true\n }];\n },\n incompatibleTokens: '*'\n },\n // Milliseconds timestamp\n T: {\n priority: 20,\n parse: function (string, _token, _match, _options) {\n return parseAnyDigitsSigned(string);\n },\n set: function (_date, _flags, value, _options) {\n return [new Date(value), {\n timestampIsSet: true\n }];\n },\n incompatibleTokens: '*'\n }\n};\nexport default parsers;","import toInteger from \"../toInteger/index.js\";\nimport toDate from \"../../toDate/index.js\";\nimport getUTCWeek from \"../getUTCWeek/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\"; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nexport default function setUTCWeek(dirtyDate, dirtyWeek, options) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var week = toInteger(dirtyWeek);\n var diff = getUTCWeek(date, options) - week;\n date.setUTCDate(date.getUTCDate() - diff * 7);\n return date;\n}","import toInteger from \"../toInteger/index.js\";\nimport toDate from \"../../toDate/index.js\";\nimport getUTCISOWeek from \"../getUTCISOWeek/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\"; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nexport default function setUTCISOWeek(dirtyDate, dirtyISOWeek) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var isoWeek = toInteger(dirtyISOWeek);\n var diff = getUTCISOWeek(date) - isoWeek;\n date.setUTCDate(date.getUTCDate() - diff * 7);\n return date;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport toInteger from \"../toInteger/index.js\"; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nexport default function setUTCISODay(dirtyDate, dirtyDay) {\n requiredArgs(2, arguments);\n var day = toInteger(dirtyDay);\n\n if (day % 7 === 0) {\n day = day - 7;\n }\n\n var weekStartsOn = 1;\n var date = toDate(dirtyDate);\n var currentDay = date.getUTCDay();\n var remainder = day % 7;\n var dayIndex = (remainder + 7) % 7;\n var diff = (dayIndex < weekStartsOn ? 7 : 0) + day - currentDay;\n date.setUTCDate(date.getUTCDate() + diff);\n return date;\n}","import defaultLocale from \"../locale/en-US/index.js\";\nimport subMilliseconds from \"../subMilliseconds/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport assign from \"../_lib/assign/index.js\";\nimport longFormatters from \"../_lib/format/longFormatters/index.js\";\nimport getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport { isProtectedDayOfYearToken, isProtectedWeekYearToken, throwProtectedError } from \"../_lib/protectedTokens/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport parsers from \"./_lib/parsers/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar TIMEZONE_UNIT_PRIORITY = 10; // This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\n\nvar formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g; // This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\n\nvar longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\nvar escapedStringRegExp = /^'([^]*?)'?$/;\nvar doubleQuoteRegExp = /''/g;\nvar notWhitespaceRegExp = /\\S/;\nvar unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n/**\n * @name parse\n * @category Common Helpers\n * @summary Parse the date.\n *\n * @description\n * Return the date parsed from string using the given format string.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://git.io/fxCyr\n *\n * The characters in the format string wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n *\n * Format of the format string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 5 below the table).\n *\n * Not all tokens are compatible. Combinations that don't make sense or could lead to bugs are prohibited\n * and will throw `RangeError`. For example usage of 24-hour format token with AM/PM token will throw an exception:\n *\n * ```javascript\n * parse('23 AM', 'HH a', new Date())\n * //=> RangeError: The format string mustn't contain `HH` and `a` at the same time\n * ```\n *\n * See the compatibility table: https://docs.google.com/spreadsheets/d/e/2PACX-1vQOPU3xUhplll6dyoMmVUXHKl_8CRDs6_ueLmex3SoqwhuolkuN3O05l4rqx5h1dKX8eb46Ul-CCSrq/pubhtml?gid=0&single=true\n *\n * Accepted format string patterns:\n * | Unit |Prior| Pattern | Result examples | Notes |\n * |---------------------------------|-----|---------|-----------------------------------|-------|\n * | Era | 140 | G..GGG | AD, BC | |\n * | | | GGGG | Anno Domini, Before Christ | 2 |\n * | | | GGGGG | A, B | |\n * | Calendar year | 130 | y | 44, 1, 1900, 2017, 9999 | 4 |\n * | | | yo | 44th, 1st, 1900th, 9999999th | 4,5 |\n * | | | yy | 44, 01, 00, 17 | 4 |\n * | | | yyy | 044, 001, 123, 999 | 4 |\n * | | | yyyy | 0044, 0001, 1900, 2017 | 4 |\n * | | | yyyyy | ... | 2,4 |\n * | Local week-numbering year | 130 | Y | 44, 1, 1900, 2017, 9000 | 4 |\n * | | | Yo | 44th, 1st, 1900th, 9999999th | 4,5 |\n * | | | YY | 44, 01, 00, 17 | 4,6 |\n * | | | YYY | 044, 001, 123, 999 | 4 |\n * | | | YYYY | 0044, 0001, 1900, 2017 | 4,6 |\n * | | | YYYYY | ... | 2,4 |\n * | ISO week-numbering year | 130 | R | -43, 1, 1900, 2017, 9999, -9999 | 4,5 |\n * | | | RR | -43, 01, 00, 17 | 4,5 |\n * | | | RRR | -043, 001, 123, 999, -999 | 4,5 |\n * | | | RRRR | -0043, 0001, 2017, 9999, -9999 | 4,5 |\n * | | | RRRRR | ... | 2,4,5 |\n * | Extended year | 130 | u | -43, 1, 1900, 2017, 9999, -999 | 4 |\n * | | | uu | -43, 01, 99, -99 | 4 |\n * | | | uuu | -043, 001, 123, 999, -999 | 4 |\n * | | | uuuu | -0043, 0001, 2017, 9999, -9999 | 4 |\n * | | | uuuuu | ... | 2,4 |\n * | Quarter (formatting) | 120 | Q | 1, 2, 3, 4 | |\n * | | | Qo | 1st, 2nd, 3rd, 4th | 5 |\n * | | | QQ | 01, 02, 03, 04 | |\n * | | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | 120 | q | 1, 2, 3, 4 | |\n * | | | qo | 1st, 2nd, 3rd, 4th | 5 |\n * | | | qq | 01, 02, 03, 04 | |\n * | | | qqq | Q1, Q2, Q3, Q4 | |\n * | | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | | qqqqq | 1, 2, 3, 4 | 3 |\n * | Month (formatting) | 110 | M | 1, 2, ..., 12 | |\n * | | | Mo | 1st, 2nd, ..., 12th | 5 |\n * | | | MM | 01, 02, ..., 12 | |\n * | | | MMM | Jan, Feb, ..., Dec | |\n * | | | MMMM | January, February, ..., December | 2 |\n * | | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | 110 | L | 1, 2, ..., 12 | |\n * | | | Lo | 1st, 2nd, ..., 12th | 5 |\n * | | | LL | 01, 02, ..., 12 | |\n * | | | LLL | Jan, Feb, ..., Dec | |\n * | | | LLLL | January, February, ..., December | 2 |\n * | | | LLLLL | J, F, ..., D | |\n * | Local week of year | 100 | w | 1, 2, ..., 53 | |\n * | | | wo | 1st, 2nd, ..., 53th | 5 |\n * | | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | 100 | I | 1, 2, ..., 53 | 5 |\n * | | | Io | 1st, 2nd, ..., 53th | 5 |\n * | | | II | 01, 02, ..., 53 | 5 |\n * | Day of month | 90 | d | 1, 2, ..., 31 | |\n * | | | do | 1st, 2nd, ..., 31st | 5 |\n * | | | dd | 01, 02, ..., 31 | |\n * | Day of year | 90 | D | 1, 2, ..., 365, 366 | 7 |\n * | | | Do | 1st, 2nd, ..., 365th, 366th | 5 |\n * | | | DD | 01, 02, ..., 365, 366 | 7 |\n * | | | DDD | 001, 002, ..., 365, 366 | |\n * | | | DDDD | ... | 2 |\n * | Day of week (formatting) | 90 | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | | EEEEE | M, T, W, T, F, S, S | |\n * | | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | ISO day of week (formatting) | 90 | i | 1, 2, 3, ..., 7 | 5 |\n * | | | io | 1st, 2nd, ..., 7th | 5 |\n * | | | ii | 01, 02, ..., 07 | 5 |\n * | | | iii | Mon, Tue, Wed, ..., Sun | 5 |\n * | | | iiii | Monday, Tuesday, ..., Sunday | 2,5 |\n * | | | iiiii | M, T, W, T, F, S, S | 5 |\n * | | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 5 |\n * | Local day of week (formatting) | 90 | e | 2, 3, 4, ..., 1 | |\n * | | | eo | 2nd, 3rd, ..., 1st | 5 |\n * | | | ee | 02, 03, ..., 01 | |\n * | | | eee | Mon, Tue, Wed, ..., Sun | |\n * | | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | | eeeee | M, T, W, T, F, S, S | |\n * | | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | Local day of week (stand-alone) | 90 | c | 2, 3, 4, ..., 1 | |\n * | | | co | 2nd, 3rd, ..., 1st | 5 |\n * | | | cc | 02, 03, ..., 01 | |\n * | | | ccc | Mon, Tue, Wed, ..., Sun | |\n * | | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | | ccccc | M, T, W, T, F, S, S | |\n * | | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | AM, PM | 80 | a..aaa | AM, PM | |\n * | | | aaaa | a.m., p.m. | 2 |\n * | | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | 80 | b..bbb | AM, PM, noon, midnight | |\n * | | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | | bbbbb | a, p, n, mi | |\n * | Flexible day period | 80 | B..BBB | at night, in the morning, ... | |\n * | | | BBBB | at night, in the morning, ... | 2 |\n * | | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | 70 | h | 1, 2, ..., 11, 12 | |\n * | | | ho | 1st, 2nd, ..., 11th, 12th | 5 |\n * | | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | 70 | H | 0, 1, 2, ..., 23 | |\n * | | | Ho | 0th, 1st, 2nd, ..., 23rd | 5 |\n * | | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | 70 | K | 1, 2, ..., 11, 0 | |\n * | | | Ko | 1st, 2nd, ..., 11th, 0th | 5 |\n * | | | KK | 01, 02, ..., 11, 00 | |\n * | Hour [1-24] | 70 | k | 24, 1, 2, ..., 23 | |\n * | | | ko | 24th, 1st, 2nd, ..., 23rd | 5 |\n * | | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | 60 | m | 0, 1, ..., 59 | |\n * | | | mo | 0th, 1st, ..., 59th | 5 |\n * | | | mm | 00, 01, ..., 59 | |\n * | Second | 50 | s | 0, 1, ..., 59 | |\n * | | | so | 0th, 1st, ..., 59th | 5 |\n * | | | ss | 00, 01, ..., 59 | |\n * | Seconds timestamp | 40 | t | 512969520 | |\n * | | | tt | ... | 2 |\n * | Fraction of second | 30 | S | 0, 1, ..., 9 | |\n * | | | SS | 00, 01, ..., 99 | |\n * | | | SSS | 000, 001, ..., 999 | |\n * | | | SSSS | ... | 2 |\n * | Milliseconds timestamp | 20 | T | 512969520900 | |\n * | | | TT | ... | 2 |\n * | Timezone (ISO-8601 w/ Z) | 10 | X | -08, +0530, Z | |\n * | | | XX | -0800, +0530, Z | |\n * | | | XXX | -08:00, +05:30, Z | |\n * | | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | 10 | x | -08, +0530, +00 | |\n * | | | xx | -0800, +0530, +0000 | |\n * | | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Long localized date | NA | P | 05/29/1453 | 5,8 |\n * | | | PP | May 29, 1453 | |\n * | | | PPP | May 29th, 1453 | |\n * | | | PPPP | Sunday, May 29th, 1453 | 2,5,8 |\n * | Long localized time | NA | p | 12:00 AM | 5,8 |\n * | | | pp | 12:00:00 AM | |\n * | Combination of date and time | NA | Pp | 05/29/1453, 12:00 AM | |\n * | | | PPpp | May 29, 1453, 12:00:00 AM | |\n * | | | PPPpp | May 29th, 1453 at ... | |\n * | | | PPPPpp | Sunday, May 29th, 1453 at ... | 2,5,8 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular.\n * In `format` function, they will produce different result:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * `parse` will try to match both formatting and stand-alone units interchangably.\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table:\n * - for numerical units (`yyyyyyyy`) `parse` will try to match a number\n * as wide as the sequence\n * - for text units (`MMMMMMMM`) `parse` will try to match the widest variation of the unit.\n * These variations are marked with \"2\" in the last column of the table.\n *\n * 3. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 4. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` will try to guess the century of two digit year by proximity with `referenceDate`:\n *\n * `parse('50', 'yy', new Date(2018, 0, 1)) //=> Sat Jan 01 2050 00:00:00`\n *\n * `parse('75', 'yy', new Date(2018, 0, 1)) //=> Wed Jan 01 1975 00:00:00`\n *\n * while `uu` will just assign the year as is:\n *\n * `parse('50', 'uu', new Date(2018, 0, 1)) //=> Sat Jan 01 0050 00:00:00`\n *\n * `parse('75', 'uu', new Date(2018, 0, 1)) //=> Tue Jan 01 0075 00:00:00`\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [setISOWeekYear]{@link https://date-fns.org/docs/setISOWeekYear}\n * and [setWeekYear]{@link https://date-fns.org/docs/setWeekYear}).\n *\n * 5. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 6. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://git.io/fxCyr\n *\n * 7. `D` and `DD` tokens represent days of the year but they are ofthen confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://git.io/fxCyr\n *\n * 8. `P+` tokens do not have a defined priority since they are merely aliases to other tokens based\n * on the given locale.\n *\n * using `en-US` locale: `P` => `MM/dd/yyyy`\n * using `en-US` locale: `p` => `hh:mm a`\n * using `pt-BR` locale: `P` => `dd/MM/yyyy`\n * using `pt-BR` locale: `p` => `HH:mm`\n *\n * Values will be assigned to the date in the descending order of its unit's priority.\n * Units of an equal priority overwrite each other in the order of appearance.\n *\n * If no values of higher priority are parsed (e.g. when parsing string 'January 1st' without a year),\n * the values will be taken from 3rd argument `referenceDate` which works as a context of parsing.\n *\n * `referenceDate` must be passed for correct work of the function.\n * If you're not sure which `referenceDate` to supply, create a new instance of Date:\n * `parse('02/11/2014', 'MM/dd/yyyy', new Date())`\n * In this case parsing will be done in the context of the current date.\n * If `referenceDate` is `Invalid Date` or a value not convertible to valid `Date`,\n * then `Invalid Date` will be returned.\n *\n * The result may vary by locale.\n *\n * If `formatString` matches with `dateString` but does not provides tokens, `referenceDate` will be returned.\n *\n * If parsing failed, `Invalid Date` will be returned.\n * Invalid Date is a Date, whose time value is NaN.\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - Old `parse` was renamed to `toDate`.\n * Now `parse` is a new function which parses a string using a provided format.\n *\n * ```javascript\n * // Before v2.0.0\n * parse('2016-01-01')\n *\n * // v2.0.0 onward (toDate no longer accepts a string)\n * toDate(1392098430000) // Unix to timestamp\n * toDate(new Date(2014, 1, 11, 11, 30, 30)) // Cloning the date\n * parse('2016-01-01', 'yyyy-MM-dd', new Date())\n * ```\n *\n * @param {String} dateString - the string to parse\n * @param {String} formatString - the string of tokens\n * @param {Date|Number} referenceDate - defines values missing from the parsed dateString\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {1|2|3|4|5|6|7} [options.firstWeekContainsDate=1] - the day of January, which is always in the first week of the year\n * @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`;\n * see: https://git.io/fxCyr\n * @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`;\n * see: https://git.io/fxCyr\n * @returns {Date} the parsed date\n * @throws {TypeError} 3 arguments required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7\n * @throws {RangeError} `options.locale` must contain `match` property\n * @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://git.io/fxCyr\n * @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://git.io/fxCyr\n * @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://git.io/fxCyr\n * @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://git.io/fxCyr\n * @throws {RangeError} format string contains an unescaped latin alphabet character\n *\n * @example\n * // Parse 11 February 2014 from middle-endian format:\n * var result = parse('02/11/2014', 'MM/dd/yyyy', new Date())\n * //=> Tue Feb 11 2014 00:00:00\n *\n * @example\n * // Parse 28th of February in Esperanto locale in the context of 2010 year:\n * import eo from 'date-fns/locale/eo'\n * var result = parse('28-a de februaro', \"do 'de' MMMM\", new Date(2010, 0, 1), {\n * locale: eo\n * })\n * //=> Sun Feb 28 2010 00:00:00\n */\n\nexport default function parse(dirtyDateString, dirtyFormatString, dirtyReferenceDate, dirtyOptions) {\n requiredArgs(3, arguments);\n var dateString = String(dirtyDateString);\n var formatString = String(dirtyFormatString);\n var options = dirtyOptions || {};\n var locale = options.locale || defaultLocale;\n\n if (!locale.match) {\n throw new RangeError('locale must contain match property');\n }\n\n var localeFirstWeekContainsDate = locale.options && locale.options.firstWeekContainsDate;\n var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);\n var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n }\n\n var localeWeekStartsOn = locale.options && locale.options.weekStartsOn;\n var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);\n var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n if (formatString === '') {\n if (dateString === '') {\n return toDate(dirtyReferenceDate);\n } else {\n return new Date(NaN);\n }\n }\n\n var subFnOptions = {\n firstWeekContainsDate: firstWeekContainsDate,\n weekStartsOn: weekStartsOn,\n locale: locale\n }; // If timezone isn't specified, it will be set to the system timezone\n\n var setters = [{\n priority: TIMEZONE_UNIT_PRIORITY,\n subPriority: -1,\n set: dateToSystemTimezone,\n index: 0\n }];\n var i;\n var tokens = formatString.match(longFormattingTokensRegExp).map(function (substring) {\n var firstCharacter = substring[0];\n\n if (firstCharacter === 'p' || firstCharacter === 'P') {\n var longFormatter = longFormatters[firstCharacter];\n return longFormatter(substring, locale.formatLong, subFnOptions);\n }\n\n return substring;\n }).join('').match(formattingTokensRegExp);\n var usedTokens = [];\n\n for (i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (!options.useAdditionalWeekYearTokens && isProtectedWeekYearToken(token)) {\n throwProtectedError(token, formatString, dirtyDateString);\n }\n\n if (!options.useAdditionalDayOfYearTokens && isProtectedDayOfYearToken(token)) {\n throwProtectedError(token, formatString, dirtyDateString);\n }\n\n var firstCharacter = token[0];\n var parser = parsers[firstCharacter];\n\n if (parser) {\n var incompatibleTokens = parser.incompatibleTokens;\n\n if (Array.isArray(incompatibleTokens)) {\n var incompatibleToken = void 0;\n\n for (var _i = 0; _i < usedTokens.length; _i++) {\n var usedToken = usedTokens[_i].token;\n\n if (incompatibleTokens.indexOf(usedToken) !== -1 || usedToken === firstCharacter) {\n incompatibleToken = usedTokens[_i];\n break;\n }\n }\n\n if (incompatibleToken) {\n throw new RangeError(\"The format string mustn't contain `\".concat(incompatibleToken.fullToken, \"` and `\").concat(token, \"` at the same time\"));\n }\n } else if (parser.incompatibleTokens === '*' && usedTokens.length) {\n throw new RangeError(\"The format string mustn't contain `\".concat(token, \"` and any other token at the same time\"));\n }\n\n usedTokens.push({\n token: firstCharacter,\n fullToken: token\n });\n var parseResult = parser.parse(dateString, token, locale.match, subFnOptions);\n\n if (!parseResult) {\n return new Date(NaN);\n }\n\n setters.push({\n priority: parser.priority,\n subPriority: parser.subPriority || 0,\n set: parser.set,\n validate: parser.validate,\n value: parseResult.value,\n index: setters.length\n });\n dateString = parseResult.rest;\n } else {\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');\n } // Replace two single quote characters with one single quote character\n\n\n if (token === \"''\") {\n token = \"'\";\n } else if (firstCharacter === \"'\") {\n token = cleanEscapedString(token);\n } // Cut token from string, or, if string doesn't match the token, return Invalid Date\n\n\n if (dateString.indexOf(token) === 0) {\n dateString = dateString.slice(token.length);\n } else {\n return new Date(NaN);\n }\n }\n } // Check if the remaining input contains something other than whitespace\n\n\n if (dateString.length > 0 && notWhitespaceRegExp.test(dateString)) {\n return new Date(NaN);\n }\n\n var uniquePrioritySetters = setters.map(function (setter) {\n return setter.priority;\n }).sort(function (a, b) {\n return b - a;\n }).filter(function (priority, index, array) {\n return array.indexOf(priority) === index;\n }).map(function (priority) {\n return setters.filter(function (setter) {\n return setter.priority === priority;\n }).sort(function (a, b) {\n return b.subPriority - a.subPriority;\n });\n }).map(function (setterArray) {\n return setterArray[0];\n });\n var date = toDate(dirtyReferenceDate);\n\n if (isNaN(date)) {\n return new Date(NaN);\n } // Convert the date in system timezone to the same date in UTC+00:00 timezone.\n // This ensures that when UTC functions will be implemented, locales will be compatible with them.\n // See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/37\n\n\n var utcDate = subMilliseconds(date, getTimezoneOffsetInMilliseconds(date));\n var flags = {};\n\n for (i = 0; i < uniquePrioritySetters.length; i++) {\n var setter = uniquePrioritySetters[i];\n\n if (setter.validate && !setter.validate(utcDate, setter.value, subFnOptions)) {\n return new Date(NaN);\n }\n\n var result = setter.set(utcDate, flags, setter.value, subFnOptions); // Result is tuple (date, flags)\n\n if (result[0]) {\n utcDate = result[0];\n assign(flags, result[1]); // Result is date\n } else {\n utcDate = result;\n }\n }\n\n return utcDate;\n}\n\nfunction dateToSystemTimezone(date, flags) {\n if (flags.timestampIsSet) {\n return date;\n }\n\n var convertedDate = new Date(0);\n convertedDate.setFullYear(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());\n convertedDate.setHours(date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.getUTCMilliseconds());\n return convertedDate;\n}\n\nfunction cleanEscapedString(input) {\n return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, \"'\");\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport getDaysInMonth from \"../getDaysInMonth/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setMonth\n * @category Month Helpers\n * @summary Set the month to the given date.\n *\n * @description\n * Set the month to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} month - the month of the new date\n * @returns {Date} the new date with the month set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set February to 1 September 2014:\n * const result = setMonth(new Date(2014, 8, 1), 1)\n * //=> Sat Feb 01 2014 00:00:00\n */\n\nexport default function setMonth(dirtyDate, dirtyMonth) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var month = toInteger(dirtyMonth);\n var year = date.getFullYear();\n var day = date.getDate();\n var dateWithDesiredMonth = new Date(0);\n dateWithDesiredMonth.setFullYear(year, month, 15);\n dateWithDesiredMonth.setHours(0, 0, 0, 0);\n var daysInMonth = getDaysInMonth(dateWithDesiredMonth); // Set the last day of the new month\n // if the original date was the last day of the longer month\n\n date.setMonth(month, Math.min(day, daysInMonth));\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getDaysInMonth\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the number of days in a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // How many days are in February 2000?\n * const result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\n\nexport default function getDaysInMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getFullYear();\n var monthIndex = date.getMonth();\n var lastDayOfMonth = new Date(0);\n lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);\n lastDayOfMonth.setHours(0, 0, 0, 0);\n return lastDayOfMonth.getDate();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfMonth\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\n\nexport default function startOfMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\n\nexport default function endOfMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var month = date.getMonth();\n date.setFullYear(date.getFullYear(), month + 1, 0);\n date.setHours(23, 59, 59, 999);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfWeek\n * @category Week Helpers\n * @summary Return the start of a week for the given date.\n *\n * @description\n * Return the start of a week for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the start of a week\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n *\n * @example\n * // The start of a week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Mon Sep 01 2014 00:00:00\n */\n\nexport default function startOfWeek(dirtyDate, dirtyOptions) {\n requiredArgs(1, arguments);\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeWeekStartsOn = locale && locale.options && locale.options.weekStartsOn;\n var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);\n var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n var date = toDate(dirtyDate);\n var day = date.getDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setDate(date.getDate() - diff);\n date.setHours(0, 0, 0, 0);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfYear\n * @category Year Helpers\n * @summary Return the start of a year for the given date.\n *\n * @description\n * Return the start of a year for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a year\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a year for 2 September 2014 11:55:00:\n * const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Jan 01 2014 00:00:00\n */\n\nexport default function startOfYear(dirtyDate) {\n requiredArgs(1, arguments);\n var cleanDate = toDate(dirtyDate);\n var date = new Date(0);\n date.setFullYear(cleanDate.getFullYear(), 0, 1);\n date.setHours(0, 0, 0, 0);\n return date;\n}","import addDays from 'date-fns/addDays';\nimport addMonths from 'date-fns/addMonths';\nimport addYears from 'date-fns/addYears';\nimport differenceInMilliseconds from 'date-fns/differenceInMilliseconds';\nimport eachDayOfInterval from 'date-fns/eachDayOfInterval';\nimport endOfDay from 'date-fns/endOfDay';\nimport endOfWeek from 'date-fns/endOfWeek';\nimport endOfYear from 'date-fns/endOfYear';\nimport format from 'date-fns/format';\nimport getHours from 'date-fns/getHours';\nimport getSeconds from 'date-fns/getSeconds';\nimport getYear from 'date-fns/getYear';\nimport isAfter from 'date-fns/isAfter';\nimport isBefore from 'date-fns/isBefore';\nimport isEqual from 'date-fns/isEqual';\nimport isSameDay from 'date-fns/isSameDay';\nimport isSameYear from 'date-fns/isSameYear';\nimport isSameMonth from 'date-fns/isSameMonth';\nimport isSameHour from 'date-fns/isSameHour';\nimport isValid from 'date-fns/isValid';\nimport dateFnsParse from 'date-fns/parse';\nimport setHours from 'date-fns/setHours';\nimport setMinutes from 'date-fns/setMinutes';\nimport setMonth from 'date-fns/setMonth';\nimport setSeconds from 'date-fns/setSeconds';\nimport setYear from 'date-fns/setYear';\nimport startOfDay from 'date-fns/startOfDay';\nimport startOfMonth from 'date-fns/startOfMonth';\nimport endOfMonth from 'date-fns/endOfMonth';\nimport startOfWeek from 'date-fns/startOfWeek';\nimport startOfYear from 'date-fns/startOfYear';\n\nvar DateFnsUtils = /** @class */ (function () {\n function DateFnsUtils(_a) {\n var locale = (_a === void 0 ? {} : _a).locale;\n this.yearFormat = \"yyyy\";\n this.yearMonthFormat = \"MMMM yyyy\";\n this.dateTime12hFormat = \"MMMM do hh:mm aaaa\";\n this.dateTime24hFormat = \"MMMM do HH:mm\";\n this.time12hFormat = \"hh:mm a\";\n this.time24hFormat = \"HH:mm\";\n this.dateFormat = \"MMMM do\";\n this.locale = locale;\n }\n // Note: date-fns input types are more lenient than this adapter, so we need to expose our more\n // strict signature and delegate to the more lenient signature. Otherwise, we have downstream type errors upon usage.\n DateFnsUtils.prototype.addDays = function (value, count) {\n return addDays(value, count);\n };\n DateFnsUtils.prototype.isValid = function (value) {\n return isValid(this.date(value));\n };\n DateFnsUtils.prototype.getDiff = function (value, comparing) {\n return differenceInMilliseconds(value, this.date(comparing));\n };\n DateFnsUtils.prototype.isAfter = function (value, comparing) {\n return isAfter(value, comparing);\n };\n DateFnsUtils.prototype.isBefore = function (value, comparing) {\n return isBefore(value, comparing);\n };\n DateFnsUtils.prototype.startOfDay = function (value) {\n return startOfDay(value);\n };\n DateFnsUtils.prototype.endOfDay = function (value) {\n return endOfDay(value);\n };\n DateFnsUtils.prototype.getHours = function (value) {\n return getHours(value);\n };\n DateFnsUtils.prototype.setHours = function (value, count) {\n return setHours(value, count);\n };\n DateFnsUtils.prototype.setMinutes = function (value, count) {\n return setMinutes(value, count);\n };\n DateFnsUtils.prototype.getSeconds = function (value) {\n return getSeconds(value);\n };\n DateFnsUtils.prototype.setSeconds = function (value, count) {\n return setSeconds(value, count);\n };\n DateFnsUtils.prototype.isSameDay = function (value, comparing) {\n return isSameDay(value, comparing);\n };\n DateFnsUtils.prototype.isSameMonth = function (value, comparing) {\n return isSameMonth(value, comparing);\n };\n DateFnsUtils.prototype.isSameYear = function (value, comparing) {\n return isSameYear(value, comparing);\n };\n DateFnsUtils.prototype.isSameHour = function (value, comparing) {\n return isSameHour(value, comparing);\n };\n DateFnsUtils.prototype.startOfMonth = function (value) {\n return startOfMonth(value);\n };\n DateFnsUtils.prototype.endOfMonth = function (value) {\n return endOfMonth(value);\n };\n DateFnsUtils.prototype.getYear = function (value) {\n return getYear(value);\n };\n DateFnsUtils.prototype.setYear = function (value, count) {\n return setYear(value, count);\n };\n DateFnsUtils.prototype.date = function (value) {\n if (typeof value === \"undefined\") {\n return new Date();\n }\n if (value === null) {\n return null;\n }\n return new Date(value);\n };\n DateFnsUtils.prototype.parse = function (value, formatString) {\n if (value === \"\") {\n return null;\n }\n return dateFnsParse(value, formatString, new Date(), { locale: this.locale });\n };\n DateFnsUtils.prototype.format = function (date, formatString) {\n return format(date, formatString, { locale: this.locale });\n };\n DateFnsUtils.prototype.isEqual = function (date, comparing) {\n if (date === null && comparing === null) {\n return true;\n }\n return isEqual(date, comparing);\n };\n DateFnsUtils.prototype.isNull = function (date) {\n return date === null;\n };\n DateFnsUtils.prototype.isAfterDay = function (date, value) {\n return isAfter(date, endOfDay(value));\n };\n DateFnsUtils.prototype.isBeforeDay = function (date, value) {\n return isBefore(date, startOfDay(value));\n };\n DateFnsUtils.prototype.isBeforeYear = function (date, value) {\n return isBefore(date, startOfYear(value));\n };\n DateFnsUtils.prototype.isAfterYear = function (date, value) {\n return isAfter(date, endOfYear(value));\n };\n DateFnsUtils.prototype.formatNumber = function (numberToFormat) {\n return numberToFormat;\n };\n DateFnsUtils.prototype.getMinutes = function (date) {\n return date.getMinutes();\n };\n DateFnsUtils.prototype.getMonth = function (date) {\n return date.getMonth();\n };\n DateFnsUtils.prototype.setMonth = function (date, count) {\n return setMonth(date, count);\n };\n DateFnsUtils.prototype.getMeridiemText = function (ampm) {\n return ampm === \"am\" ? \"AM\" : \"PM\";\n };\n DateFnsUtils.prototype.getNextMonth = function (date) {\n return addMonths(date, 1);\n };\n DateFnsUtils.prototype.getPreviousMonth = function (date) {\n return addMonths(date, -1);\n };\n DateFnsUtils.prototype.getMonthArray = function (date) {\n var firstMonth = startOfYear(date);\n var monthArray = [firstMonth];\n while (monthArray.length < 12) {\n var prevMonth = monthArray[monthArray.length - 1];\n monthArray.push(this.getNextMonth(prevMonth));\n }\n return monthArray;\n };\n DateFnsUtils.prototype.mergeDateAndTime = function (date, time) {\n return this.setMinutes(this.setHours(date, this.getHours(time)), this.getMinutes(time));\n };\n DateFnsUtils.prototype.getWeekdays = function () {\n var _this = this;\n var now = new Date();\n return eachDayOfInterval({\n start: startOfWeek(now, { locale: this.locale }),\n end: endOfWeek(now, { locale: this.locale })\n }).map(function (day) { return _this.format(day, \"EEEEEE\"); });\n };\n DateFnsUtils.prototype.getWeekArray = function (date) {\n var start = startOfWeek(startOfMonth(date), { locale: this.locale });\n var end = endOfWeek(endOfMonth(date), { locale: this.locale });\n var count = 0;\n var current = start;\n var nestedWeeks = [];\n while (isBefore(current, end)) {\n var weekNumber = Math.floor(count / 7);\n nestedWeeks[weekNumber] = nestedWeeks[weekNumber] || [];\n nestedWeeks[weekNumber].push(current);\n current = addDays(current, 1);\n count += 1;\n }\n return nestedWeeks;\n };\n DateFnsUtils.prototype.getYearRange = function (start, end) {\n var startDate = startOfYear(start);\n var endDate = endOfYear(end);\n var years = [];\n var current = startDate;\n while (isBefore(current, endDate)) {\n years.push(current);\n current = addYears(current, 1);\n }\n return years;\n };\n // displaying methpds\n DateFnsUtils.prototype.getCalendarHeaderText = function (date) {\n return this.format(date, this.yearMonthFormat);\n };\n DateFnsUtils.prototype.getYearText = function (date) {\n return this.format(date, \"yyyy\");\n };\n DateFnsUtils.prototype.getDatePickerHeaderText = function (date) {\n return this.format(date, \"EEE, MMM d\");\n };\n DateFnsUtils.prototype.getDateTimePickerHeaderText = function (date) {\n return this.format(date, \"MMM d\");\n };\n DateFnsUtils.prototype.getMonthText = function (date) {\n return this.format(date, \"MMMM\");\n };\n DateFnsUtils.prototype.getDayText = function (date) {\n return this.format(date, \"d\");\n };\n DateFnsUtils.prototype.getHourText = function (date, ampm) {\n return this.format(date, ampm ? \"hh\" : \"HH\");\n };\n DateFnsUtils.prototype.getMinuteText = function (date) {\n return this.format(date, \"mm\");\n };\n DateFnsUtils.prototype.getSecondText = function (date) {\n return this.format(date, \"ss\");\n };\n return DateFnsUtils;\n}());\n\nexport default DateFnsUtils;\n","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name differenceInMilliseconds\n * @category Millisecond Helpers\n * @summary Get the number of milliseconds between the given dates.\n *\n * @description\n * Get the number of milliseconds between the given dates.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of milliseconds\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many milliseconds are between\n * // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700?\n * const result = differenceInMilliseconds(\n * new Date(2014, 6, 2, 12, 30, 21, 700),\n * new Date(2014, 6, 2, 12, 30, 20, 600)\n * )\n * //=> 1100\n */\n\nexport default function differenceInMilliseconds(dateLeft, dateRight) {\n requiredArgs(2, arguments);\n return toDate(dateLeft).getTime() - toDate(dateRight).getTime();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getHours\n * @category Hour Helpers\n * @summary Get the hours of the given date.\n *\n * @description\n * Get the hours of the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the hours\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Get the hours of 29 February 2012 11:45:00:\n * const result = getHours(new Date(2012, 1, 29, 11, 45))\n * //=> 11\n */\n\nexport default function getHours(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var hours = date.getHours();\n return hours;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setHours\n * @category Hour Helpers\n * @summary Set the hours to the given date.\n *\n * @description\n * Set the hours to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} hours - the hours of the new date\n * @returns {Date} the new date with the hours set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set 4 hours to 1 September 2014 11:30:00:\n * var result = setHours(new Date(2014, 8, 1, 11, 30), 4)\n * //=> Mon Sep 01 2014 04:30:00\n */\n\nexport default function setHours(dirtyDate, dirtyHours) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var hours = toInteger(dirtyHours);\n date.setHours(hours);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setMinutes\n * @category Minute Helpers\n * @summary Set the minutes to the given date.\n *\n * @description\n * Set the minutes to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} minutes - the minutes of the new date\n * @returns {Date} the new date with the minutes set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set 45 minutes to 1 September 2014 11:30:40:\n * const result = setMinutes(new Date(2014, 8, 1, 11, 30, 40), 45)\n * //=> Mon Sep 01 2014 11:45:40\n */\n\nexport default function setMinutes(dirtyDate, dirtyMinutes) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var minutes = toInteger(dirtyMinutes);\n date.setMinutes(minutes);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getSeconds\n * @category Second Helpers\n * @summary Get the seconds of the given date.\n *\n * @description\n * Get the seconds of the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the seconds\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Get the seconds of 29 February 2012 11:45:05.123:\n * const result = getSeconds(new Date(2012, 1, 29, 11, 45, 5, 123))\n * //=> 5\n */\n\nexport default function getSeconds(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var seconds = date.getSeconds();\n return seconds;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setSeconds\n * @category Second Helpers\n * @summary Set the seconds to the given date.\n *\n * @description\n * Set the seconds to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} seconds - the seconds of the new date\n * @returns {Date} the new date with the seconds set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set 45 seconds to 1 September 2014 11:30:40:\n * const result = setSeconds(new Date(2014, 8, 1, 11, 30, 40), 45)\n * //=> Mon Sep 01 2014 11:30:45\n */\n\nexport default function setSeconds(dirtyDate, dirtySeconds) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var seconds = toInteger(dirtySeconds);\n date.setSeconds(seconds);\n return date;\n}","import startOfDay from \"../startOfDay/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameDay\n * @category Day Helpers\n * @summary Are the given dates in the same day (and year and month)?\n *\n * @description\n * Are the given dates in the same day (and year and month)?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same day (and year and month)\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?\n * var result = isSameDay(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 18, 0))\n * //=> true\n * \n * @example\n * // Are 4 September and 4 October in the same day?\n * var result = isSameDay(new Date(2014, 8, 4), new Date(2014, 9, 4))\n * //=> false\n * \n * @example\n * // Are 4 September, 2014 and 4 September, 2015 in the same day?\n * var result = isSameDay(new Date(2014, 8, 4), new Date(2015, 8, 4))\n * //=> false\n */\n\nexport default function isSameDay(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeftStartOfDay = startOfDay(dirtyDateLeft);\n var dateRightStartOfDay = startOfDay(dirtyDateRight);\n return dateLeftStartOfDay.getTime() === dateRightStartOfDay.getTime();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameMonth\n * @category Month Helpers\n * @summary Are the given dates in the same month (and year)?\n *\n * @description\n * Are the given dates in the same month (and year)?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same month (and year)\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same month?\n * var result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n *\n * @example\n * // Are 2 September 2014 and 25 September 2015 in the same month?\n * var result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25))\n * //=> false\n */\n\nexport default function isSameMonth(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n return dateLeft.getFullYear() === dateRight.getFullYear() && dateLeft.getMonth() === dateRight.getMonth();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameYear\n * @category Year Helpers\n * @summary Are the given dates in the same year?\n *\n * @description\n * Are the given dates in the same year?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same year\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same year?\n * var result = isSameYear(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n */\n\nexport default function isSameYear(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n return dateLeft.getFullYear() === dateRight.getFullYear();\n}","import startOfHour from \"../startOfHour/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameHour\n * @category Hour Helpers\n * @summary Are the given dates in the same hour (and same day)?\n *\n * @description\n * Are the given dates in the same hour (and same day)?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same hour (and same day)\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 4 September 2014 06:00:00 and 4 September 06:30:00 in the same hour?\n * var result = isSameHour(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 6, 30))\n * //=> true\n * \n * @example\n * // Are 4 September 2014 06:00:00 and 5 September 06:00:00 in the same hour?\n * var result = isSameHour(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 5, 6, 0))\n * //=> false\n */\n\nexport default function isSameHour(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeftStartOfHour = startOfHour(dirtyDateLeft);\n var dateRightStartOfHour = startOfHour(dirtyDateRight);\n return dateLeftStartOfHour.getTime() === dateRightStartOfHour.getTime();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getYear\n * @category Year Helpers\n * @summary Get the year of the given date.\n *\n * @description\n * Get the year of the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the year\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which year is 2 July 2014?\n * const result = getYear(new Date(2014, 6, 2))\n * //=> 2014\n */\n\nexport default function getYear(dirtyDate) {\n requiredArgs(1, arguments);\n return toDate(dirtyDate).getFullYear();\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setYear\n * @category Year Helpers\n * @summary Set the year to the given date.\n *\n * @description\n * Set the year to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} year - the year of the new date\n * @returns {Date} the new date with the year set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set year 2013 to 1 September 2014:\n * const result = setYear(new Date(2014, 8, 1), 2013)\n * //=> Sun Sep 01 2013 00:00:00\n */\n\nexport default function setYear(dirtyDate, dirtyYear) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var year = toInteger(dirtyYear); // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date\n\n if (isNaN(date.getTime())) {\n return new Date(NaN);\n }\n\n date.setFullYear(year);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isEqual\n * @category Common Helpers\n * @summary Are the given dates equal?\n *\n * @description\n * Are the given dates equal?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the first date to compare\n * @param {Date|Number} dateRight - the second date to compare\n * @returns {Boolean} the dates are equal\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 2 July 2014 06:30:45.000 and 2 July 2014 06:30:45.500 equal?\n * var result = isEqual(\n * new Date(2014, 6, 2, 6, 30, 45, 0),\n * new Date(2014, 6, 2, 6, 30, 45, 500)\n * )\n * //=> false\n */\n\nexport default function isEqual(dirtyLeftDate, dirtyRightDate) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyLeftDate);\n var dateRight = toDate(dirtyRightDate);\n return dateLeft.getTime() === dateRight.getTime();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name eachDayOfInterval\n * @category Interval Helpers\n * @summary Return the array of dates within the specified time interval.\n *\n * @description\n * Return the array of dates within the specified time interval.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - The function was renamed from `eachDay` to `eachDayOfInterval`.\n * This change was made to mirror the use of the word \"interval\" in standard ISO 8601:2004 terminology:\n *\n * ```\n * 2.1.3\n * time interval\n * part of the time axis limited by two instants\n * ```\n *\n * Also, this function now accepts an object with `start` and `end` properties\n * instead of two arguments as an interval.\n * This function now throws `RangeError` if the start of the interval is after its end\n * or if any date in the interval is `Invalid Date`.\n *\n * ```javascript\n * // Before v2.0.0\n *\n * eachDay(new Date(2014, 0, 10), new Date(2014, 0, 20))\n *\n * // v2.0.0 onward\n *\n * eachDayOfInterval(\n * { start: new Date(2014, 0, 10), end: new Date(2014, 0, 20) }\n * )\n * ```\n *\n * @param {Interval} interval - the interval. See [Interval]{@link https://date-fns.org/docs/Interval}\n * @param {Object} [options] - an object with options.\n * @param {Number} [options.step=1] - the step to increment by. The value should be more than 1.\n * @returns {Date[]} the array with starts of days from the day of the interval start to the day of the interval end\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.step` must be a number greater than 1\n * @throws {RangeError} The start of an interval cannot be after its end\n * @throws {RangeError} Date in interval cannot be `Invalid Date`\n *\n * @example\n * // Each day between 6 October 2014 and 10 October 2014:\n * const result = eachDayOfInterval({\n * start: new Date(2014, 9, 6),\n * end: new Date(2014, 9, 10)\n * })\n * //=> [\n * // Mon Oct 06 2014 00:00:00,\n * // Tue Oct 07 2014 00:00:00,\n * // Wed Oct 08 2014 00:00:00,\n * // Thu Oct 09 2014 00:00:00,\n * // Fri Oct 10 2014 00:00:00\n * // ]\n */\n\nexport default function eachDayOfInterval(dirtyInterval, options) {\n requiredArgs(1, arguments);\n var interval = dirtyInterval || {};\n var startDate = toDate(interval.start);\n var endDate = toDate(interval.end);\n var endTime = endDate.getTime(); // Throw an exception if start date is after end date or if any date is `Invalid Date`\n\n if (!(startDate.getTime() <= endTime)) {\n throw new RangeError('Invalid interval');\n }\n\n var dates = [];\n var currentDate = startDate;\n currentDate.setHours(0, 0, 0, 0);\n var step = options && 'step' in options ? Number(options.step) : 1;\n if (step < 1 || isNaN(step)) throw new RangeError('`options.step` must be a number greater than 1');\n\n while (currentDate.getTime() <= endTime) {\n dates.push(toDate(currentDate));\n currentDate.setDate(currentDate.getDate() + step);\n currentDate.setHours(0, 0, 0, 0);\n }\n\n return dates;\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _Paper2 = _interopRequireDefault(require(\"@material-ui/core/Paper\"));\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nfunction Container(_ref) {\n var forwardedRef = _ref.forwardedRef,\n props = (0, _objectWithoutProperties2[\"default\"])(_ref, [\"forwardedRef\"]);\n return /*#__PURE__*/_react[\"default\"].createElement(_Paper2[\"default\"], (0, _extends2[\"default\"])({\n elevation: 2\n }, props, {\n ref: forwardedRef\n }));\n}\n\nvar _default = /*#__PURE__*/_react[\"default\"].forwardRef(function ContainerRef(props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(Container, (0, _extends2[\"default\"])({}, props, {\n forwardedRef: ref\n }));\n});\n\nexports[\"default\"] = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _slicedToArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/slicedToArray\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _Icon = _interopRequireDefault(require(\"@material-ui/core/Icon\"));\n\nvar _IconButton = _interopRequireDefault(require(\"@material-ui/core/IconButton\"));\n\nvar _Tooltip = _interopRequireDefault(require(\"@material-ui/core/Tooltip\"));\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2[\"default\"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction MTableAction(props) {\n function render() {\n var action = props.action;\n\n if (typeof action === 'function') {\n action = action(props.data);\n\n if (!action) {\n return null;\n }\n }\n\n if (action.action) {\n action = action.action(props.data);\n\n if (!action) {\n return null;\n }\n }\n\n if (action.hidden) {\n return null;\n }\n\n var disabled = action.disabled || props.disabled;\n\n var handleOnClick = function handleOnClick(event) {\n if (action.onClick) {\n action.onClick(event, props.data);\n event.stopPropagation();\n }\n }; // You may provide events via the \"action.handers\" prop. It is an object.\n // The event name is the key, and the value is the handler func.\n\n\n var handlers = action.handlers || {};\n var eventHandlers = Object.entries(handlers).reduce(function (o, _ref) {\n var _ref2 = (0, _slicedToArray2[\"default\"])(_ref, 2),\n k = _ref2[0],\n v = _ref2[1];\n\n o[k] = function (e) {\n return v(e, props.data);\n };\n\n return o;\n }, {});\n var icon = typeof action.icon === 'string' ? /*#__PURE__*/_react[\"default\"].createElement(_Icon[\"default\"], action.iconProps, action.icon) : typeof action.icon === 'function' ? action.icon(_objectSpread(_objectSpread({}, action.iconProps), {}, {\n disabled: disabled\n })) : /*#__PURE__*/_react[\"default\"].createElement(action.icon, null);\n\n var button = /*#__PURE__*/_react[\"default\"].createElement(_IconButton[\"default\"], (0, _extends2[\"default\"])({\n ref: props.forwardedRef,\n size: props.size,\n color: \"inherit\",\n disabled: disabled,\n onClick: handleOnClick\n }, eventHandlers), icon);\n\n if (action.tooltip) {\n // fix for issue #1049\n // https://github.com/mbrn/material-table/issues/1049\n return disabled ? /*#__PURE__*/_react[\"default\"].createElement(_Tooltip[\"default\"], {\n title: action.tooltip\n }, /*#__PURE__*/_react[\"default\"].createElement(\"span\", null, button)) : /*#__PURE__*/_react[\"default\"].createElement(_Tooltip[\"default\"], {\n title: action.tooltip\n }, button);\n } else {\n return button;\n }\n }\n\n return render();\n}\n\nMTableAction.defaultProps = {\n action: {},\n data: {}\n};\nMTableAction.propTypes = {\n action: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].func, _propTypes[\"default\"].object]).isRequired,\n data: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].object, _propTypes[\"default\"].arrayOf(_propTypes[\"default\"].object)]),\n disabled: _propTypes[\"default\"].bool,\n size: _propTypes[\"default\"].string\n};\n\nvar _default = /*#__PURE__*/_react[\"default\"].forwardRef(function MTableActionRef(props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(MTableAction, (0, _extends2[\"default\"])({}, props, {\n forwardedRef: ref\n }));\n});\n\nexports[\"default\"] = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nfunction MTableActions(_ref) {\n var actions = _ref.actions,\n components = _ref.components,\n data = _ref.data,\n size = _ref.size,\n disabled = _ref.disabled,\n forwardedRef = _ref.forwardedRef;\n\n if (!actions) {\n return null;\n }\n\n return /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n style: {\n display: 'flex'\n },\n ref: forwardedRef\n }, actions.map(function (action, index) {\n return /*#__PURE__*/_react[\"default\"].createElement(components.Action, {\n action: action,\n key: 'action-' + index,\n data: data,\n size: size,\n disabled: disabled\n });\n }));\n}\n\nMTableActions.defaultProps = {\n actions: [],\n data: {}\n};\nMTableActions.propTypes = {\n components: _propTypes[\"default\"].object.isRequired,\n actions: _propTypes[\"default\"].array.isRequired,\n data: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].object, _propTypes[\"default\"].arrayOf(_propTypes[\"default\"].object)]),\n disabled: _propTypes[\"default\"].bool,\n size: _propTypes[\"default\"].string,\n forwardedRef: _propTypes[\"default\"].element\n};\n\nvar _default = /*#__PURE__*/_react[\"default\"].forwardRef(function MTableActionsRef(props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(MTableActions, (0, _extends2[\"default\"])({}, props, {\n forwardedRef: ref\n }));\n});\n\nexports[\"default\"] = _default;","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = MTableBodyRow;\n\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\n\nvar _TableRow2 = _interopRequireDefault(require(\"@material-ui/core/TableRow\"));\n\nvar _Tooltip2 = _interopRequireDefault(require(\"@material-ui/core/Tooltip\"));\n\nvar _IconButton2 = _interopRequireDefault(require(\"@material-ui/core/IconButton\"));\n\nvar _Checkbox2 = _interopRequireDefault(require(\"@material-ui/core/Checkbox\"));\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _TableCell2 = _interopRequireDefault(require(\"@material-ui/core/TableCell\"));\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _mTableDetailpanel = require(\"../m-table-detailpanel\");\n\nvar CommonValues = _interopRequireWildcard(require(\"../../utils/common-values\"));\n\nvar _useDoubleClick = require(\"../../utils/hooks/useDoubleClick\");\n\nvar _ = require(\"./..\");\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2[\"default\"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction MTableBodyRow(props) {\n var icons = props.icons,\n data = props.data,\n columns = props.columns,\n components = props.components,\n detailPanel = props.detailPanel,\n getFieldValue = props.getFieldValue,\n isTreeData = props.isTreeData,\n onRowSelected = props.onRowSelected,\n onTreeExpandChanged = props.onTreeExpandChanged,\n onToggleDetailPanel = props.onToggleDetailPanel,\n onEditingCanceled = props.onEditingCanceled,\n onEditingApproved = props.onEditingApproved,\n options = props.options,\n hasAnyEditingRow = props.hasAnyEditingRow,\n treeDataMaxLevel = props.treeDataMaxLevel,\n path = props.path,\n localization = props.localization,\n actions = props.actions,\n errorState = props.errorState,\n cellEditable = props.cellEditable,\n onCellEditStarted = props.onCellEditStarted,\n onCellEditFinished = props.onCellEditFinished,\n persistEvents = props.persistEvents,\n scrollWidth = props.scrollWidth,\n onRowClick = props.onRowClick,\n onRowDoubleClick = props.onRowDoubleClick,\n rowProps = (0, _objectWithoutProperties2[\"default\"])(props, [\"icons\", \"data\", \"columns\", \"components\", \"detailPanel\", \"getFieldValue\", \"isTreeData\", \"onRowSelected\", \"onTreeExpandChanged\", \"onToggleDetailPanel\", \"onEditingCanceled\", \"onEditingApproved\", \"options\", \"hasAnyEditingRow\", \"treeDataMaxLevel\", \"path\", \"localization\", \"actions\", \"errorState\", \"cellEditable\", \"onCellEditStarted\", \"onCellEditFinished\", \"persistEvents\", \"scrollWidth\", \"onRowClick\", \"onRowDoubleClick\"]);\n\n var onClick = function onClick(event, callback) {\n return callback(event, data, function (panelIndex) {\n var panel = detailPanel;\n\n if (Array.isArray(panel)) {\n panel = panel[panelIndex || 0];\n\n if (typeof panel === 'function') {\n panel = panel(data);\n }\n\n panel = panel.render;\n }\n\n onToggleDetailPanel(path, panel);\n });\n };\n\n var handleOnRowClick = (0, _useDoubleClick.useDoubleClick)(onRowClick ? function (e) {\n return onClick(e, onRowClick);\n } : undefined, onRowDoubleClick ? function (e) {\n return onClick(e, onRowDoubleClick);\n } : undefined);\n\n var getRenderColumns = function getRenderColumns() {\n var size = CommonValues.elementSize(props);\n var mapArr = props.columns.filter(function (columnDef) {\n return !columnDef.hidden && !(columnDef.tableData.groupOrder > -1);\n }).sort(function (a, b) {\n return a.tableData.columnOrder - b.tableData.columnOrder;\n }).map(function (columnDef, index) {\n var value = props.getFieldValue(props.data, columnDef);\n\n if (props.data.tableData.editCellList && props.data.tableData.editCellList.find(function (c) {\n return c.tableData.id === columnDef.tableData.id;\n })) {\n return /*#__PURE__*/_react[\"default\"].createElement(props.components.EditCell, {\n getFieldValue: props.getFieldValue,\n components: props.components,\n icons: props.icons,\n localization: props.localization,\n columnDef: columnDef,\n size: size,\n key: 'cell-' + props.data.tableData.id + '-' + columnDef.tableData.id,\n rowData: props.data,\n cellEditable: props.cellEditable,\n onCellEditFinished: props.onCellEditFinished,\n scrollWidth: props.scrollWidth\n });\n } else {\n var isEditable = columnDef.editable !== 'never' && !!props.cellEditable;\n\n if (isEditable && props.cellEditable.isCellEditable) {\n isEditable = props.cellEditable.isCellEditable(props.data, columnDef);\n }\n\n var key = \"cell-\".concat(props.data.tableData.id, \"-\").concat(columnDef.tableData.id);\n return /*#__PURE__*/_react[\"default\"].createElement(props.components.Cell, {\n size: size,\n errorState: props.errorState,\n icons: props.icons,\n columnDef: _objectSpread({\n cellStyle: props.options.cellStyle\n }, columnDef),\n value: value,\n key: key,\n rowData: props.data,\n cellEditable: isEditable,\n onCellEditStarted: props.onCellEditStarted,\n scrollWidth: props.scrollWidth\n });\n }\n });\n return mapArr;\n };\n\n var renderActions = function renderActions(actions) {\n var size = CommonValues.elementSize(props);\n var width = actions.length * CommonValues.baseIconSize(props);\n return /*#__PURE__*/_react[\"default\"].createElement(_TableCell2[\"default\"], {\n size: size,\n padding: \"none\",\n key: \"key-actions-column\",\n style: _objectSpread({\n width: width,\n padding: '0px 5px',\n boxSizing: 'border-box'\n }, props.options.actionsCellStyle)\n }, /*#__PURE__*/_react[\"default\"].createElement(props.components.Actions, {\n data: props.data,\n actions: actions,\n components: props.components,\n size: size,\n disabled: props.hasAnyEditingRow\n }));\n };\n\n var renderSelectionColumn = function renderSelectionColumn() {\n var checkboxProps = props.options.selectionProps || {};\n\n if (typeof checkboxProps === 'function') {\n checkboxProps = checkboxProps(props.data);\n }\n\n var size = CommonValues.elementSize(props);\n var selectionWidth = CommonValues.selectionMaxWidth(props, props.treeDataMaxLevel) || 0;\n var styles = size === 'medium' ? {\n marginLeft: props.level * 9 || 0\n } : {\n padding: '4px',\n marginLeft: 5 + props.level * 9 || 0\n };\n return /*#__PURE__*/_react[\"default\"].createElement(_TableCell2[\"default\"], {\n size: size,\n padding: \"none\",\n key: \"key-selection-column\",\n style: {\n width: selectionWidth\n }\n }, /*#__PURE__*/_react[\"default\"].createElement(_Checkbox2[\"default\"], (0, _extends2[\"default\"])({\n size: size,\n checked: props.data.tableData.checked === true,\n onClick: function onClick(e) {\n return e.stopPropagation();\n },\n value: props.data.tableData.id.toString(),\n onChange: function onChange(event) {\n props.onRowSelected(event, props.path, props.data);\n },\n style: styles\n }, checkboxProps)));\n };\n\n var rotateIconStyle = function rotateIconStyle(isOpen) {\n return {\n transform: isOpen ? 'rotate(90deg)' : 'none'\n };\n };\n\n var renderDetailPanelColumn = function renderDetailPanelColumn() {\n if (!props.options.showDetailPanelIcon) {\n return null;\n }\n\n var size = CommonValues.elementSize(props);\n\n if (typeof props.detailPanel === 'function') {\n return /*#__PURE__*/_react[\"default\"].createElement(_TableCell2[\"default\"], {\n size: size,\n padding: \"none\",\n key: \"key-detail-panel-column\",\n style: _objectSpread({\n width: 42,\n textAlign: 'center'\n }, props.options.detailPanelColumnStyle)\n }, /*#__PURE__*/_react[\"default\"].createElement(_IconButton2[\"default\"], {\n \"aria-label\": \"Detail panel visibility toggle\",\n size: size,\n style: _objectSpread({\n transition: 'all ease 200ms'\n }, rotateIconStyle(props.data.tableData.showDetailPanel)),\n onClick: function onClick(event) {\n props.onToggleDetailPanel(props.path, props.detailPanel);\n event.stopPropagation();\n }\n }, /*#__PURE__*/_react[\"default\"].createElement(props.icons.DetailPanel, null)));\n } else {\n return /*#__PURE__*/_react[\"default\"].createElement(_TableCell2[\"default\"], {\n size: size,\n padding: \"none\",\n key: \"key-detail-panel-column\"\n }, /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n style: _objectSpread({\n width: 42 * props.detailPanel.length,\n textAlign: 'center',\n display: 'flex'\n }, props.options.detailPanelColumnStyle)\n }, props.detailPanel.map(function (panel, index) {\n if (typeof panel === 'function') {\n panel = panel(props.data);\n }\n\n var isOpen = (props.data.tableData.showDetailPanel || '').toString() === panel.render.toString();\n\n var iconButton = /*#__PURE__*/_react[\"default\"].createElement(props.icons.DetailPanel, null);\n\n var animation = true;\n\n if (isOpen) {\n if (panel.openIcon) {\n iconButton = /*#__PURE__*/_react[\"default\"].createElement(_.MTableCustomIcon, {\n icon: panel.openIcon,\n iconProps: panel.iconProps\n });\n animation = false;\n } else if (panel.icon) {\n iconButton = /*#__PURE__*/_react[\"default\"].createElement(_.MTableCustomIcon, {\n icon: panel.icon,\n iconProps: panel.iconProps\n });\n }\n } else if (panel.icon) {\n iconButton = /*#__PURE__*/_react[\"default\"].createElement(_.MTableCustomIcon, {\n icon: panel.icon,\n iconProps: panel.iconProps\n });\n animation = false;\n }\n\n iconButton = /*#__PURE__*/_react[\"default\"].createElement(_IconButton2[\"default\"], {\n \"aria-label\": \"Detail panel visibility toggle\",\n size: size,\n key: 'key-detail-panel-' + index,\n style: _objectSpread({\n transition: 'all ease 200ms'\n }, rotateIconStyle(animation && isOpen)),\n disabled: panel.disabled,\n onClick: function onClick(event) {\n props.onToggleDetailPanel(props.path, panel.render);\n event.stopPropagation();\n }\n }, iconButton);\n\n if (panel.tooltip) {\n iconButton = /*#__PURE__*/_react[\"default\"].createElement(_Tooltip2[\"default\"], {\n key: 'key-detail-panel-' + index,\n title: panel.tooltip\n }, iconButton);\n }\n\n return iconButton;\n })));\n }\n };\n\n var renderTreeDataColumn = function renderTreeDataColumn() {\n var size = CommonValues.elementSize(props);\n\n if (props.data.tableData.childRows && props.data.tableData.childRows.length > 0) {\n return /*#__PURE__*/_react[\"default\"].createElement(_TableCell2[\"default\"], {\n size: size,\n padding: \"none\",\n key: 'key-tree-data-column',\n style: {\n width: 48 + 9 * (props.treeDataMaxLevel - 2)\n }\n }, /*#__PURE__*/_react[\"default\"].createElement(_IconButton2[\"default\"], {\n \"aria-label\": \"Detail panel visibility toggle\",\n size: size,\n style: _objectSpread({\n transition: 'all ease 200ms',\n marginLeft: props.level * 9\n }, rotateIconStyle(props.data.tableData.isTreeExpanded)),\n onClick: function onClick(event) {\n props.onTreeExpandChanged(props.path, props.data);\n event.stopPropagation();\n }\n }, /*#__PURE__*/_react[\"default\"].createElement(props.icons.DetailPanel, null)));\n } else {\n return /*#__PURE__*/_react[\"default\"].createElement(_TableCell2[\"default\"], {\n padding: \"none\",\n key: 'key-tree-data-column'\n });\n }\n };\n\n var getStyle = function getStyle(index, level) {\n var style = {};\n\n if (typeof props.options.rowStyle === 'function') {\n style = _objectSpread(_objectSpread({}, style), props.options.rowStyle(props.data, index, level, props.hasAnyEditingRow));\n } else if (props.options.rowStyle) {\n style = _objectSpread(_objectSpread({}, style), props.options.rowStyle);\n }\n\n if (onRowClick || onRowDoubleClick) {\n style.cursor = 'pointer';\n }\n\n if (props.hasAnyEditingRow) {\n style.opacity = style.opacity ? style.opacity : 0.2;\n }\n\n return style;\n };\n\n var size = CommonValues.elementSize(props);\n var renderColumns = getRenderColumns();\n\n if (props.options.selection) {\n renderColumns.splice(0, 0, renderSelectionColumn());\n }\n\n var rowActions = CommonValues.rowActions(props);\n\n if (rowActions.length > 0) {\n if (props.options.actionsColumnIndex === -1) {\n renderColumns.push(renderActions(rowActions));\n } else if (props.options.actionsColumnIndex >= 0) {\n var endPos = 0;\n\n if (props.options.selection) {\n endPos = 1;\n }\n\n renderColumns.splice(props.options.actionsColumnIndex + endPos, 0, renderActions(rowActions));\n }\n } // Then we add detail panel icon\n\n\n if (props.detailPanel) {\n if (props.options.detailPanelColumnAlignment === 'right') {\n renderColumns.push(renderDetailPanelColumn());\n } else {\n renderColumns.splice(0, 0, renderDetailPanelColumn());\n }\n } // Lastly we add tree data icon\n\n\n if (props.isTreeData) {\n renderColumns.splice(0, 0, renderTreeDataColumn());\n }\n\n props.columns.filter(function (columnDef) {\n return columnDef.tableData.groupOrder > -1;\n }).forEach(function (columnDef) {\n renderColumns.splice(0, 0, /*#__PURE__*/_react[\"default\"].createElement(_TableCell2[\"default\"], {\n size: size,\n padding: \"none\",\n key: 'key-group-cell' + columnDef.tableData.id\n }));\n });\n return /*#__PURE__*/_react[\"default\"].createElement(_react[\"default\"].Fragment, null, /*#__PURE__*/_react[\"default\"].createElement(_TableRow2[\"default\"], (0, _extends2[\"default\"])({\n selected: hasAnyEditingRow\n }, rowProps, {\n onClick: function onClick(event) {\n if (persistEvents) {\n event.persist();\n }\n\n handleOnRowClick(event);\n },\n hover: !!(onRowClick || onRowDoubleClick),\n style: getStyle(props.index, props.level)\n }), renderColumns), /*#__PURE__*/_react[\"default\"].createElement(_mTableDetailpanel.MTableDetailPanel, {\n options: props.options,\n data: props.data,\n detailPanel: props.detailPanel,\n renderColumns: renderColumns,\n size: size\n }), props.data.tableData.childRows && props.data.tableData.isTreeExpanded && props.data.tableData.childRows.map(function (data, index) {\n if (data.tableData.editing) {\n return /*#__PURE__*/_react[\"default\"].createElement(props.components.EditRow, {\n columns: props.columns.filter(function (columnDef) {\n return !columnDef.hidden;\n }),\n components: props.components,\n data: data,\n icons: props.icons,\n localization: props.localization,\n getFieldValue: props.getFieldValue,\n key: index,\n mode: data.tableData.editing,\n options: props.options,\n isTreeData: props.isTreeData,\n detailPanel: props.detailPanel,\n onEditingCanceled: onEditingCanceled,\n onEditingApproved: onEditingApproved,\n errorState: props.errorState\n });\n } else {\n return /*#__PURE__*/_react[\"default\"].createElement(props.components.Row, (0, _extends2[\"default\"])({}, props, {\n data: data,\n index: index,\n key: index,\n level: props.level + 1,\n path: [].concat((0, _toConsumableArray2[\"default\"])(props.path), [data.tableData.uuid]),\n onEditingCanceled: onEditingCanceled,\n onEditingApproved: onEditingApproved,\n hasAnyEditingRow: props.hasAnyEditingRow,\n treeDataMaxLevel: treeDataMaxLevel,\n errorState: props.errorState,\n cellEditable: cellEditable,\n onCellEditStarted: onCellEditStarted,\n onCellEditFinished: onCellEditFinished\n }));\n }\n }));\n}\n\nMTableBodyRow.defaultProps = {\n actions: [],\n index: 0,\n data: {},\n options: {},\n path: [],\n persistEvents: false\n};\nMTableBodyRow.propTypes = {\n actions: _propTypes[\"default\"].array,\n icons: _propTypes[\"default\"].any.isRequired,\n index: _propTypes[\"default\"].number.isRequired,\n data: _propTypes[\"default\"].object.isRequired,\n detailPanel: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].func, _propTypes[\"default\"].arrayOf(_propTypes[\"default\"].oneOfType([_propTypes[\"default\"].object, _propTypes[\"default\"].func]))]),\n hasAnyEditingRow: _propTypes[\"default\"].bool,\n options: _propTypes[\"default\"].object.isRequired,\n onRowSelected: _propTypes[\"default\"].func,\n path: _propTypes[\"default\"].arrayOf(_propTypes[\"default\"].oneOfType([_propTypes[\"default\"].string, _propTypes[\"default\"].number])),\n persistEvents: _propTypes[\"default\"].bool,\n treeDataMaxLevel: _propTypes[\"default\"].number,\n getFieldValue: _propTypes[\"default\"].func.isRequired,\n columns: _propTypes[\"default\"].array,\n onToggleDetailPanel: _propTypes[\"default\"].func.isRequired,\n onRowClick: _propTypes[\"default\"].func,\n onRowDoubleClick: _propTypes[\"default\"].func,\n onEditingApproved: _propTypes[\"default\"].func,\n onEditingCanceled: _propTypes[\"default\"].func,\n errorState: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].object, _propTypes[\"default\"].bool])\n};","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getEmptyValue = getEmptyValue;\nexports.getCurrencyValue = getCurrencyValue;\nexports.getRenderValue = getRenderValue;\nexports.isoDateRegex = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _parseISO = _interopRequireDefault(require(\"date-fns/parseISO\"));\n\n/* eslint-disable no-useless-escape */\nvar isoDateRegex = /^\\d{4}-(0[1-9]|1[0-2])-([12]\\d|0[1-9]|3[01])([T\\s](([01]\\d|2[0-3])\\:[0-5]\\d|24\\:00)(\\:[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3])\\:?([0-5]\\d)?)?)?$/;\n/* eslint-enable no-useless-escape */\n\nexports.isoDateRegex = isoDateRegex;\n\nfunction getEmptyValue() {\n var emptyValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (typeof emptyValue === 'function') {\n return props.columnDef.emptyValue(props.rowData);\n } else {\n return emptyValue;\n }\n}\n\nfunction getCurrencyValue(currencySetting, value) {\n if (currencySetting !== undefined) {\n return new Intl.NumberFormat(currencySetting.locale !== undefined ? currencySetting.locale : 'en-US', {\n style: 'currency',\n currency: currencySetting.currencyCode !== undefined ? currencySetting.currencyCode : 'USD',\n minimumFractionDigits: currencySetting.minimumFractionDigits !== undefined ? currencySetting.minimumFractionDigits : 2,\n maximumFractionDigits: currencySetting.maximumFractionDigits !== undefined ? currencySetting.maximumFractionDigits : 2\n }).format(value !== undefined ? value : 0);\n } else {\n return new Intl.NumberFormat('en-US', {\n style: 'currency',\n currency: 'USD'\n }).format(value !== undefined ? value : 0);\n }\n}\n\nfunction getRenderValue(props) {\n var dateLocale = props.columnDef.dateSetting && props.columnDef.dateSetting.locale ? props.columnDef.dateSetting.locale : undefined;\n\n if (props.columnDef.emptyValue !== undefined && (props.value === undefined || props.value === null)) {\n return getEmptyValue(props.columnDef.emptyValue, props);\n }\n\n if (props.columnDef.render) {\n if (props.rowData) {\n return props.columnDef.render(props.rowData, 'row');\n } else if (props.value) {\n return props.columnDef.render(props.value, 'group');\n }\n } else if (props.columnDef.type === 'boolean') {\n var style = {\n textAlign: 'left',\n verticalAlign: 'middle',\n width: 48\n };\n\n if (props.value) {\n return /*#__PURE__*/_react[\"default\"].createElement(props.icons.Check, {\n style: style\n });\n } else {\n return /*#__PURE__*/_react[\"default\"].createElement(props.icons.ThirdStateCheck, {\n style: style\n });\n }\n } else if (props.columnDef.type === 'date') {\n if (props.value instanceof Date) {\n return props.value.toLocaleDateString(dateLocale);\n } else if (isoDateRegex.exec(props.value)) {\n return (0, _parseISO[\"default\"])(props.value).toLocaleDateString(dateLocale);\n } else {\n return props.value;\n }\n } else if (props.columnDef.type === 'time') {\n if (props.value instanceof Date) {\n return props.value.toLocaleTimeString();\n } else if (isoDateRegex.exec(props.value)) {\n return (0, _parseISO[\"default\"])(props.value).toLocaleTimeString(dateLocale);\n } else {\n return props.value;\n }\n } else if (props.columnDef.type === 'datetime') {\n if (props.value instanceof Date) {\n return props.value.toLocaleString();\n } else if (isoDateRegex.exec(props.value)) {\n return (0, _parseISO[\"default\"])(props.value).toLocaleString(dateLocale);\n } else {\n return props.value;\n }\n } else if (props.columnDef.type === 'currency') {\n return getCurrencyValue(props.columnDef.currencySetting, props.value);\n } else if (typeof props.value === 'boolean') {\n // To avoid forwardref boolean children.\n return props.value.toString();\n }\n\n return props.value;\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _TableCell = _interopRequireDefault(require(\"@material-ui/core/TableCell\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _cellUtils = require(\"./cellUtils\");\n\nvar _utils = require(\"../../utils\");\n\nfunction MTableCell(props) {\n var forwardedRef = props.forwardedRef,\n scrollWidth = props.scrollWidth,\n rowData = props.rowData,\n onCellEditStarted = props.onCellEditStarted,\n cellEditable = props.cellEditable,\n columnDef = props.columnDef,\n errorState = props.errorState,\n spreadProps = (0, _objectWithoutProperties2[\"default\"])(props, [\"forwardedRef\", \"scrollWidth\", \"rowData\", \"onCellEditStarted\", \"cellEditable\", \"columnDef\", \"errorState\"]);\n\n var handleClickCell = function handleClickCell(e) {\n if (props.columnDef.disableClick) {\n e.stopPropagation();\n }\n };\n /* eslint-disable indent */\n\n\n var cellAlignment = columnDef.align !== undefined ? columnDef.align : ['numeric', 'currency'].indexOf(columnDef.type) !== -1 ? 'right' : 'left';\n /* eslint-enable indent */\n\n var renderValue = (0, _cellUtils.getRenderValue)(props);\n\n if (cellEditable) {\n renderValue = /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n style: {\n borderBottom: '1px dashed grey',\n cursor: 'pointer',\n marginLeft: cellAlignment === 'right' ? 'auto' : undefined,\n width: 'max-content'\n },\n onClick: function onClick(e) {\n e.stopPropagation();\n onCellEditStarted(rowData, columnDef);\n }\n }, renderValue);\n }\n\n return /*#__PURE__*/_react[\"default\"].createElement(_TableCell[\"default\"], (0, _extends2[\"default\"])({}, spreadProps, {\n size: props.size,\n value: props.value,\n style: (0, _utils.getStyle)(props),\n align: cellAlignment,\n onClick: handleClickCell,\n ref: forwardedRef,\n colSpan: props.colSpan\n }), props.children, renderValue);\n}\n\nMTableCell.defaultProps = {\n columnDef: {},\n value: undefined\n};\nMTableCell.propTypes = {\n columnDef: _propTypes[\"default\"].object.isRequired,\n value: _propTypes[\"default\"].any,\n rowData: _propTypes[\"default\"].object,\n errorState: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].object, _propTypes[\"default\"].bool]),\n forwardedRef: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].func, _propTypes[\"default\"].object]),\n size: _propTypes[\"default\"].string,\n colSpan: _propTypes[\"default\"].number,\n children: _propTypes[\"default\"].element,\n cellEditable: _propTypes[\"default\"].bool,\n onCellEditStarted: _propTypes[\"default\"].func\n};\n\nvar _default = /*#__PURE__*/_react[\"default\"].forwardRef(function MTableCellRef(props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(MTableCell, (0, _extends2[\"default\"])({}, props, {\n forwardedRef: ref\n }));\n});\n\nexports[\"default\"] = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = MTableCustomIcon;\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _Icon2 = _interopRequireDefault(require(\"@material-ui/core/Icon\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2[\"default\"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction MTableCustomIcon(_ref) {\n var icon = _ref.icon,\n iconProps = _ref.iconProps;\n\n if (!icon) {\n return;\n }\n\n if (typeof icon === 'string') {\n return /*#__PURE__*/_react[\"default\"].createElement(_Icon2[\"default\"], iconProps, icon);\n }\n\n return /*#__PURE__*/_react[\"default\"].createElement(icon, _objectSpread({}, iconProps));\n}\n\nMTableCustomIcon.defaultProps = {\n iconProps: {}\n};\nMTableCustomIcon.propTypes = {\n icon: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].elementType]).isRequired,\n iconProps: _propTypes[\"default\"].object\n};","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _slicedToArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/slicedToArray\"));\n\nvar _react = _interopRequireWildcard(require(\"react\"));\n\nvar _TableCell = _interopRequireDefault(require(\"@material-ui/core/TableCell\"));\n\nvar _TableRow = _interopRequireDefault(require(\"@material-ui/core/TableRow\"));\n\nvar _Typography = _interopRequireDefault(require(\"@material-ui/core/Typography\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _utils = require(\"../../utils\");\n\nvar CommonValues = _interopRequireWildcard(require(\"../../utils/common-values\"));\n\nvar _validate = require(\"../../utils/validate\");\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2[\"default\"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction MTableEditRow(props) {\n var _useState = (0, _react.useState)(function () {\n function createRowData() {\n return props.columns.filter(function (column) {\n return 'initialEditValue' in column && column.field;\n }).reduce(function (prev, column) {\n (0, _utils.setObjectByKey)(prev, column.field, column.initialEditValue);\n return prev;\n }, {});\n }\n\n var data = props.data ? JSON.parse(JSON.stringify(props.data)) : createRowData();\n\n if (props.mode === 'bulk' && props.bulkEditChangedRows[data.tableData.id]) {\n data = props.bulkEditChangedRows[data.tableData.id].newData;\n }\n\n return {\n data: data\n };\n }),\n _useState2 = (0, _slicedToArray2[\"default\"])(_useState, 2),\n state = _useState2[0],\n setState = _useState2[1];\n\n function renderColumns() {\n var size = CommonValues.elementSize(props);\n var focusedCol = -1;\n var mapArr = props.columns.filter(function (columnDef) {\n return !columnDef.hidden && !(columnDef.tableData.groupOrder > -1);\n }).sort(function (a, b) {\n return a.tableData.columnOrder - b.tableData.columnOrder;\n }).map(function (columnDef, index) {\n var value = props.getFieldValue(state.data, columnDef, false);\n\n var getCellStyle = function getCellStyle(columnDef, value) {\n var cellStyle = {\n color: 'inherit'\n };\n\n if (typeof columnDef.cellStyle === 'function') {\n cellStyle = _objectSpread(_objectSpread({}, cellStyle), columnDef.cellStyle(value, props.data));\n } else {\n cellStyle = _objectSpread(_objectSpread({}, cellStyle), columnDef.cellStyle);\n }\n\n if (columnDef.disableClick) {\n cellStyle.cursor = 'default';\n }\n\n return _objectSpread({}, cellStyle);\n };\n\n var style = {};\n\n if (index === 0) {\n style.paddingLeft = 24 + props.level * 20;\n }\n\n var allowEditing = false;\n\n if (columnDef.editable === undefined) {\n allowEditing = true;\n }\n\n if (columnDef.editable === 'always') {\n allowEditing = true;\n }\n\n if (columnDef.editable === 'onAdd' && props.mode === 'add') {\n allowEditing = true;\n }\n\n if (columnDef.editable === 'onUpdate' && props.mode === 'update') {\n allowEditing = true;\n }\n\n if (typeof columnDef.editable === 'function') {\n allowEditing = columnDef.editable(columnDef, props.data);\n }\n\n if (!columnDef.field || !allowEditing) {\n var readonlyValue = props.getFieldValue(state.data, columnDef);\n return /*#__PURE__*/_react[\"default\"].createElement(props.components.Cell, {\n size: size,\n icons: props.icons,\n columnDef: columnDef,\n value: readonlyValue,\n key: columnDef.tableData.id,\n rowData: props.data,\n style: getCellStyle(columnDef, value)\n });\n } else {\n var editComponent = columnDef.editComponent,\n cellProps = (0, _objectWithoutProperties2[\"default\"])(columnDef, [\"editComponent\"]);\n var EditComponent = editComponent || props.components.EditField;\n var error = (0, _validate.validateInput)(columnDef, state.data);\n\n if (focusedCol === -1) {\n focusedCol = index;\n }\n\n return /*#__PURE__*/_react[\"default\"].createElement(_TableCell[\"default\"], {\n size: size,\n key: columnDef.tableData.id,\n align: ['numeric'].indexOf(columnDef.type) !== -1 ? 'right' : 'left',\n style: getCellStyle(columnDef, value)\n }, /*#__PURE__*/_react[\"default\"].createElement(EditComponent, {\n key: columnDef.tableData.id,\n columnDef: cellProps,\n autoFocus: focusedCol === index,\n value: value,\n error: !error.isValid,\n helperText: error.helperText,\n locale: props.localization.dateTimePickerLocalization,\n rowData: state.data,\n onChange: function onChange(value) {\n var data = _objectSpread({}, state.data);\n\n (0, _utils.setObjectByKey)(data, columnDef.field, value); // data[columnDef.field] = value;\n\n setState({\n data: data\n });\n\n if (props.onBulkEditRowChanged) {\n props.onBulkEditRowChanged(props.data, data);\n }\n },\n onRowDataChange: function onRowDataChange(data) {\n setState({\n data: data\n });\n\n if (props.onBulkEditRowChanged) {\n props.onBulkEditRowChanged(props.data, data);\n }\n }\n }));\n }\n });\n return mapArr;\n }\n\n var isValid = props.columns.every(function (column) {\n var error = (0, _validate.validateInput)(column, state.data);\n return error.isValid;\n });\n\n var handleSave = function handleSave() {\n if (!isValid) {\n return;\n }\n\n var newData = state.data;\n delete newData.tableData;\n props.onEditingApproved(props.mode, state.data, props.data);\n };\n\n function renderActions() {\n if (props.mode === 'bulk') {\n return;\n }\n\n var size = CommonValues.elementSize(props);\n\n var localization = _objectSpread(_objectSpread({}, MTableEditRow.defaultProps.localization), props.localization);\n\n var actions = [{\n icon: props.icons.Check,\n tooltip: localization.saveTooltip,\n disabled: !isValid,\n onClick: handleSave\n }, {\n icon: props.icons.Clear,\n tooltip: localization.cancelTooltip,\n onClick: function onClick() {\n props.onEditingCanceled(props.mode, props.data);\n }\n }];\n return /*#__PURE__*/_react[\"default\"].createElement(_TableCell[\"default\"], {\n size: size,\n padding: \"none\",\n key: \"key-actions-column\",\n style: _objectSpread({\n width: 42 * actions.length,\n padding: '0px 5px'\n }, props.options.editCellStyle)\n }, /*#__PURE__*/_react[\"default\"].createElement(props.components.Actions, {\n data: props.data,\n actions: actions,\n components: props.components,\n size: size\n }));\n }\n\n function getStyle() {\n var style = {\n // boxShadow: '1px 1px 1px 1px rgba(0,0,0,0.2)',\n borderBottom: '1px solid red'\n };\n return style;\n }\n\n var handleKeyDown = function handleKeyDown(e) {\n if (e.keyCode === 13 && e.target.type !== 'textarea' && e.target.type !== 'button') {\n handleSave();\n } else if (e.keyCode === 13 && e.target.type === 'textarea' && e.shiftKey) {\n handleSave();\n } else if (e.keyCode === 27) {\n props.onEditingCanceled(props.mode, props.data);\n }\n };\n\n function render() {\n var size = CommonValues.elementSize(props);\n\n var localization = _objectSpread(_objectSpread({}, MTableEditRow.defaultProps.localization), props.localization);\n\n var columns;\n\n if (props.mode === 'add' || props.mode === 'update' || props.mode === 'bulk') {\n columns = renderColumns();\n } else {\n var colSpan = props.columns.filter(function (columnDef) {\n return !columnDef.hidden && !(columnDef.tableData.groupOrder > -1);\n }).length;\n columns = [/*#__PURE__*/_react[\"default\"].createElement(_TableCell[\"default\"], {\n size: size,\n padding: props.options.actionsColumnIndex === 0 ? 'none' : undefined,\n key: \"key-edit-cell\",\n colSpan: colSpan\n }, /*#__PURE__*/_react[\"default\"].createElement(_Typography[\"default\"], {\n variant: \"h6\"\n }, localization.deleteText))];\n }\n\n if (props.options.selection) {\n columns.splice(0, 0, /*#__PURE__*/_react[\"default\"].createElement(_TableCell[\"default\"], {\n padding: \"none\",\n key: \"key-selection-cell\"\n }));\n }\n\n if (props.isTreeData) {\n columns.splice(0, 0, /*#__PURE__*/_react[\"default\"].createElement(_TableCell[\"default\"], {\n padding: \"none\",\n key: \"key-tree-data-cell\"\n }));\n }\n\n if (props.options.actionsColumnIndex === -1) {\n columns.push(renderActions());\n } else if (props.options.actionsColumnIndex >= 0) {\n var endPos = 0;\n\n if (props.options.selection) {\n endPos = 1;\n }\n\n if (props.isTreeData) {\n endPos = 1;\n\n if (props.options.selection) {\n columns.splice(1, 1);\n }\n }\n\n columns.splice(props.options.actionsColumnIndex + endPos, 0, renderActions());\n } // Lastly we add detail panel icon\n\n\n if (props.detailPanel && props.options.showDetailPanelIcon !== false && props.mode !== 'bulk') {\n var alignment = props.options.detailPanelColumnAlignment;\n var index = alignment === 'left' ? 0 : columns.length;\n columns.splice(index, 0, /*#__PURE__*/_react[\"default\"].createElement(_TableCell[\"default\"], {\n padding: \"none\",\n key: \"key-detail-panel-cell\"\n }));\n }\n\n props.columns.filter(function (columnDef) {\n return columnDef.tableData.groupOrder > -1;\n }).forEach(function (columnDef) {\n columns.splice(0, 0, /*#__PURE__*/_react[\"default\"].createElement(_TableCell[\"default\"], {\n padding: \"none\",\n key: 'key-group-cell' + columnDef.tableData.id\n }));\n });\n var detailPanel = props.detailPanel,\n isTreeData = props.isTreeData,\n onRowClick = props.onRowClick,\n onRowSelected = props.onRowSelected,\n onTreeExpandChanged = props.onTreeExpandChanged,\n onToggleDetailPanel = props.onToggleDetailPanel,\n onEditingApproved = props.onEditingApproved,\n onEditingCanceled = props.onEditingCanceled,\n getFieldValue = props.getFieldValue,\n components = props.components,\n icons = props.icons,\n columnsProp = props.columns,\n localizationProp = props.localization,\n options = props.options,\n actions = props.actions,\n errorState = props.errorState,\n onBulkEditRowChanged = props.onBulkEditRowChanged,\n bulkEditChangedRows = props.bulkEditChangedRows,\n scrollWidth = props.scrollWidth,\n forwardedRef = props.forwardedRef,\n rowProps = (0, _objectWithoutProperties2[\"default\"])(props, [\"detailPanel\", \"isTreeData\", \"onRowClick\", \"onRowSelected\", \"onTreeExpandChanged\", \"onToggleDetailPanel\", \"onEditingApproved\", \"onEditingCanceled\", \"getFieldValue\", \"components\", \"icons\", \"columns\", \"localization\", \"options\", \"actions\", \"errorState\", \"onBulkEditRowChanged\", \"bulkEditChangedRows\", \"scrollWidth\", \"forwardedRef\"]);\n return /*#__PURE__*/_react[\"default\"].createElement(_TableRow[\"default\"], (0, _extends2[\"default\"])({\n onKeyDown: handleKeyDown\n }, rowProps, {\n ref: forwardedRef,\n style: getStyle()\n }), columns);\n }\n\n return render();\n}\n\nMTableEditRow.defaultProps = {\n actions: [],\n index: 0,\n options: {},\n path: [],\n localization: {\n saveTooltip: 'Save',\n cancelTooltip: 'Cancel',\n deleteText: 'Are you sure you want to delete this row?'\n },\n onBulkEditRowChanged: function onBulkEditRowChanged() {}\n};\nMTableEditRow.propTypes = {\n actions: _propTypes[\"default\"].array,\n icons: _propTypes[\"default\"].any.isRequired,\n index: _propTypes[\"default\"].number.isRequired,\n data: _propTypes[\"default\"].object,\n detailPanel: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].func, _propTypes[\"default\"].arrayOf(_propTypes[\"default\"].oneOfType([_propTypes[\"default\"].object, _propTypes[\"default\"].func]))]),\n options: _propTypes[\"default\"].object.isRequired,\n onRowSelected: _propTypes[\"default\"].func,\n path: _propTypes[\"default\"].arrayOf(_propTypes[\"default\"].number),\n columns: _propTypes[\"default\"].array,\n onRowClick: _propTypes[\"default\"].func,\n onEditingApproved: _propTypes[\"default\"].func,\n onEditingCanceled: _propTypes[\"default\"].func,\n localization: _propTypes[\"default\"].object,\n getFieldValue: _propTypes[\"default\"].func,\n errorState: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].object, _propTypes[\"default\"].bool]),\n onBulkEditRowChanged: _propTypes[\"default\"].func\n};\n\nvar _default = /*#__PURE__*/_react[\"default\"].forwardRef(function MTableWithRefEditRow(props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(MTableEditRow, (0, _extends2[\"default\"])({}, props, {\n forwardedRef: ref\n }));\n});\n\nexports[\"default\"] = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _Checkbox2 = _interopRequireDefault(require(\"@material-ui/core/Checkbox\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nfunction BooleanFilter(_ref) {\n var forwardedRef = _ref.forwardedRef,\n columnDef = _ref.columnDef,\n onFilterChanged = _ref.onFilterChanged;\n return /*#__PURE__*/_react[\"default\"].createElement(_Checkbox2[\"default\"], {\n ref: forwardedRef,\n inputProps: {\n 'aria-label': \"Filter of \".concat(columnDef.title)\n },\n indeterminate: columnDef.tableData.filterValue === undefined,\n checked: columnDef.tableData.filterValue === 'checked',\n onChange: function onChange() {\n var val;\n\n if (columnDef.tableData.filterValue === undefined) {\n val = 'checked';\n } else if (columnDef.tableData.filterValue === 'checked') {\n val = 'unchecked';\n }\n\n onFilterChanged(columnDef.tableData.id, val);\n }\n });\n}\n\nvar _default = /*#__PURE__*/_react[\"default\"].forwardRef(function BooleanFilterRef(props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(BooleanFilter, (0, _extends2[\"default\"])({}, props, {\n forwardedRef: ref\n }));\n});\n\nexports[\"default\"] = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _dateFns = _interopRequireDefault(require(\"@date-io/date-fns\"));\n\nvar _utils = require(\"./utils\");\n\nvar _pickers = require(\"@material-ui/pickers\");\n\nfunction DateFilter(_ref) {\n var columnDef = _ref.columnDef,\n onFilterChanged = _ref.onFilterChanged,\n localization = _ref.localization,\n forwardedRef = _ref.forwardedRef;\n\n var onDateInputChange = function onDateInputChange(date) {\n return onFilterChanged(columnDef.tableData.id, date);\n };\n\n var pickerProps = {\n value: columnDef.tableData.filterValue || null,\n onChange: onDateInputChange,\n placeholder: (0, _utils.getLocalizedFilterPlaceHolder)(columnDef),\n clearable: true\n };\n var dateInputElement = null;\n\n if (columnDef.type === 'date') {\n dateInputElement = /*#__PURE__*/_react[\"default\"].createElement(_pickers.DatePicker, (0, _extends2[\"default\"])({}, pickerProps, {\n ref: forwardedRef\n }));\n } else if (columnDef.type === 'datetime') {\n dateInputElement = /*#__PURE__*/_react[\"default\"].createElement(_pickers.DateTimePicker, (0, _extends2[\"default\"])({}, pickerProps, {\n ref: forwardedRef\n }));\n } else if (columnDef.type === 'time') {\n dateInputElement = /*#__PURE__*/_react[\"default\"].createElement(_pickers.TimePicker, (0, _extends2[\"default\"])({}, pickerProps, {\n ref: forwardedRef\n }));\n }\n\n return /*#__PURE__*/_react[\"default\"].createElement(_pickers.MuiPickersUtilsProvider, {\n utils: _dateFns[\"default\"],\n locale: localization.dateTimePickerLocalization\n }, dateInputElement);\n}\n\nvar _default = /*#__PURE__*/_react[\"default\"].forwardRef(function DateFilterRef(props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(DateFilter, (0, _extends2[\"default\"])({}, props, {\n forwardedRef: ref\n }));\n});\n\nexports[\"default\"] = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _TextField2 = _interopRequireDefault(require(\"@material-ui/core/TextField\"));\n\nvar _InputAdornment2 = _interopRequireDefault(require(\"@material-ui/core/InputAdornment\"));\n\nvar _Tooltip2 = _interopRequireDefault(require(\"@material-ui/core/Tooltip\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _utils = require(\"./utils\");\n\nfunction DefaultFilter(_ref) {\n var columnDef = _ref.columnDef,\n icons = _ref.icons,\n localization = _ref.localization,\n hideFilterIcons = _ref.hideFilterIcons,\n onFilterChanged = _ref.onFilterChanged,\n forwardedRef = _ref.forwardedRef;\n\n var _localization = (0, _utils.getLocalizationData)(localization);\n\n var FilterIcon = icons.Filter;\n return /*#__PURE__*/_react[\"default\"].createElement(_TextField2[\"default\"], {\n ref: forwardedRef,\n style: columnDef.type === 'numeric' ? {\n \"float\": 'right'\n } : {},\n type: columnDef.type === 'numeric' ? 'number' : 'search',\n value: columnDef.tableData.filterValue || '',\n placeholder: (0, _utils.getLocalizedFilterPlaceHolder)(columnDef),\n onChange: function onChange(event) {\n onFilterChanged(columnDef.tableData.id, event.target.value);\n },\n inputProps: {\n 'aria-label': \"filter data by \".concat(columnDef.title)\n },\n InputProps: hideFilterIcons || columnDef.hideFilterIcon ? undefined : {\n startAdornment: /*#__PURE__*/_react[\"default\"].createElement(_InputAdornment2[\"default\"], {\n position: \"start\"\n }, /*#__PURE__*/_react[\"default\"].createElement(_Tooltip2[\"default\"], {\n title: _localization.filterTooltip\n }, /*#__PURE__*/_react[\"default\"].createElement(FilterIcon, null)))\n }\n });\n}\n\nvar _default = /*#__PURE__*/_react[\"default\"].forwardRef(function DefaultFilterRef(props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(DefaultFilter, (0, _extends2[\"default\"])({}, props, {\n forwardedRef: ref\n }));\n});\n\nexports[\"default\"] = _default;","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _react = _interopRequireWildcard(require(\"react\"));\n\nfunction Filter(_ref) {\n var columnDef = _ref.columnDef,\n onFilterChanged = _ref.onFilterChanged,\n forwardedRef = _ref.forwardedRef;\n return /*#__PURE__*/(0, _react.createElement)(columnDef.filterComponent, {\n columnDef: columnDef,\n onFilterChanged: onFilterChanged,\n forwardedRef: forwardedRef\n });\n}\n\nvar _default = /*#__PURE__*/_react[\"default\"].forwardRef(function FilterRef(props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(Filter, (0, _extends2[\"default\"])({}, props, {\n forwardedRef: ref\n }));\n});\n\nexports[\"default\"] = _default;","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _FormControl2 = _interopRequireDefault(require(\"@material-ui/core/FormControl\"));\n\nvar _Select2 = _interopRequireDefault(require(\"@material-ui/core/Select\"));\n\nvar _MenuItem2 = _interopRequireDefault(require(\"@material-ui/core/MenuItem\"));\n\nvar _ListItemText2 = _interopRequireDefault(require(\"@material-ui/core/ListItemText\"));\n\nvar _Checkbox2 = _interopRequireDefault(require(\"@material-ui/core/Checkbox\"));\n\nvar _Input2 = _interopRequireDefault(require(\"@material-ui/core/Input\"));\n\nvar _InputLabel2 = _interopRequireDefault(require(\"@material-ui/core/InputLabel\"));\n\nvar _slicedToArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/slicedToArray\"));\n\nvar _react = _interopRequireWildcard(require(\"react\"));\n\nvar _utils = require(\"./utils\");\n\nvar ITEM_HEIGHT = 48;\nvar ITEM_PADDING_TOP = 8;\nvar MenuProps = {\n PaperProps: {\n style: {\n maxHeight: ITEM_HEIGHT * 4.5 + ITEM_PADDING_TOP,\n width: 250\n }\n },\n variant: 'menu',\n getContentAnchorEl: null\n};\n\nfunction LookupFilter(_ref) {\n var columnDef = _ref.columnDef,\n onFilterChanged = _ref.onFilterChanged,\n forwardedRef = _ref.forwardedRef;\n\n var _useState = (0, _react.useState)(columnDef.tableData.filterValue || []),\n _useState2 = (0, _slicedToArray2[\"default\"])(_useState, 2),\n selectedFilter = _useState2[0],\n setSelectedFilter = _useState2[1];\n\n (0, _react.useEffect)(function () {\n setSelectedFilter(columnDef.tableData.filterValue || []);\n }, [columnDef.tableData.filterValue]);\n return /*#__PURE__*/_react[\"default\"].createElement(_FormControl2[\"default\"], {\n style: {\n width: '100%'\n },\n ref: forwardedRef\n }, /*#__PURE__*/_react[\"default\"].createElement(_InputLabel2[\"default\"], {\n htmlFor: 'select-multiple-checkbox' + columnDef.tableData.id,\n style: {\n marginTop: -16\n }\n }, (0, _utils.getLocalizedFilterPlaceHolder)(columnDef)), /*#__PURE__*/_react[\"default\"].createElement(_Select2[\"default\"], {\n multiple: true,\n value: selectedFilter,\n onClose: function onClose() {\n if (columnDef.filterOnItemSelect !== true) {\n onFilterChanged(columnDef.tableData.id, selectedFilter);\n }\n },\n onChange: function onChange(event) {\n setSelectedFilter(event.target.value);\n\n if (columnDef.filterOnItemSelect === true) {\n onFilterChanged(columnDef.tableData.id, event.target.value);\n }\n },\n input: /*#__PURE__*/_react[\"default\"].createElement(_Input2[\"default\"], {\n id: 'select-multiple-checkbox' + columnDef.tableData.id\n }),\n renderValue: function renderValue(selectedArr) {\n return selectedArr.map(function (selected) {\n return columnDef.lookup[selected];\n }).join(', ');\n },\n MenuProps: MenuProps,\n style: {\n marginTop: 0\n }\n }, Object.keys(columnDef.lookup).map(function (key) {\n return /*#__PURE__*/_react[\"default\"].createElement(_MenuItem2[\"default\"], {\n key: key,\n value: key\n }, /*#__PURE__*/_react[\"default\"].createElement(_Checkbox2[\"default\"], {\n checked: selectedFilter.indexOf(key.toString()) > -1\n }), /*#__PURE__*/_react[\"default\"].createElement(_ListItemText2[\"default\"], {\n primary: columnDef.lookup[key]\n }));\n })));\n}\n\nvar _default = /*#__PURE__*/_react[\"default\"].forwardRef(function LookupFilterRef(props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(LookupFilter, (0, _extends2[\"default\"])({}, props, {\n forwardedRef: ref\n }));\n});\n\nexports[\"default\"] = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.MTableFilterRow = MTableFilterRow;\nexports[\"default\"] = void 0;\n\nvar _TableRow2 = _interopRequireDefault(require(\"@material-ui/core/TableRow\"));\n\nvar _TableCell2 = _interopRequireDefault(require(\"@material-ui/core/TableCell\"));\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _DateFilter = _interopRequireDefault(require(\"./DateFilter\"));\n\nvar _LookupFilter = _interopRequireDefault(require(\"./LookupFilter\"));\n\nvar _DefaultFilter = _interopRequireDefault(require(\"./DefaultFilter\"));\n\nvar _BooleanFilter = _interopRequireDefault(require(\"./BooleanFilter\"));\n\nvar _Filter = _interopRequireDefault(require(\"./Filter\"));\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2[\"default\"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n/**\n * MTableFilterRow is the row that is shown when `MaterialTable.options.filtering` is true.\n * This component allows you to provide a custom filtering algo or allow/disallow filtering for a column.\n *\n * THIS MUST BE EXPORTED (on top of the 'default' export)\n */\nfunction MTableFilterRow(props) {\n function getComponentForColumn(columnDef) {\n if (columnDef.filtering === false) {\n return null;\n }\n\n if (columnDef.field || columnDef.customFilterAndSearch) {\n if (columnDef.filterComponent) {\n return /*#__PURE__*/_react[\"default\"].createElement(_Filter[\"default\"], (0, _extends2[\"default\"])({\n columnDef: columnDef\n }, props));\n } else if (columnDef.lookup) {\n return /*#__PURE__*/_react[\"default\"].createElement(_LookupFilter[\"default\"], (0, _extends2[\"default\"])({\n columnDef: columnDef\n }, props));\n } else if (columnDef.type === 'boolean') {\n return /*#__PURE__*/_react[\"default\"].createElement(_BooleanFilter[\"default\"], (0, _extends2[\"default\"])({\n columnDef: columnDef\n }, props));\n } else if (['date', 'datetime', 'time'].includes(columnDef.type)) {\n return /*#__PURE__*/_react[\"default\"].createElement(_DateFilter[\"default\"], (0, _extends2[\"default\"])({\n columnDef: columnDef\n }, props));\n } else {\n return /*#__PURE__*/_react[\"default\"].createElement(_DefaultFilter[\"default\"], (0, _extends2[\"default\"])({\n columnDef: columnDef\n }, props));\n }\n }\n }\n\n function render() {\n var columns = props.columns.filter(function (columnDef) {\n return !columnDef.hidden && !(columnDef.tableData.groupOrder > -1);\n }).sort(function (a, b) {\n return a.tableData.columnOrder - b.tableData.columnOrder;\n }).map(function (columnDef) {\n return /*#__PURE__*/_react[\"default\"].createElement(_TableCell2[\"default\"], {\n key: columnDef.tableData.id,\n style: _objectSpread(_objectSpread({}, props.filterCellStyle), columnDef.filterCellStyle)\n }, getComponentForColumn(columnDef));\n });\n\n if (props.selection) {\n columns.splice(0, 0, /*#__PURE__*/_react[\"default\"].createElement(_TableCell2[\"default\"], {\n padding: \"none\",\n key: \"key-selection-column\"\n }));\n }\n\n if (props.hasActions) {\n if (props.actionsColumnIndex === -1) {\n columns.push( /*#__PURE__*/_react[\"default\"].createElement(_TableCell2[\"default\"], {\n key: \"key-action-column\"\n }));\n } else {\n var endPos = 0;\n\n if (props.selection) {\n endPos = 1;\n }\n\n columns.splice(props.actionsColumnIndex + endPos, 0, /*#__PURE__*/_react[\"default\"].createElement(_TableCell2[\"default\"], {\n key: \"key-action-column\"\n }));\n }\n }\n\n if (props.hasDetailPanel && props.showDetailPanelIcon) {\n var alignment = props.detailPanelColumnAlignment;\n var index = alignment === 'left' ? 0 : columns.length;\n columns.splice(index, 0, /*#__PURE__*/_react[\"default\"].createElement(_TableCell2[\"default\"], {\n padding: \"none\",\n key: \"key-detail-panel-column\"\n }));\n }\n\n if (props.isTreeData > 0) {\n columns.splice(0, 0, /*#__PURE__*/_react[\"default\"].createElement(_TableCell2[\"default\"], {\n padding: \"none\",\n key: 'key-tree-data-filter'\n }));\n }\n\n props.columns.filter(function (columnDef) {\n return columnDef.tableData.groupOrder > -1;\n }).forEach(function (columnDef) {\n columns.splice(0, 0, /*#__PURE__*/_react[\"default\"].createElement(_TableCell2[\"default\"], {\n padding: \"checkbox\",\n key: 'key-group-filter' + columnDef.tableData.id\n }));\n });\n return /*#__PURE__*/_react[\"default\"].createElement(_TableRow2[\"default\"], {\n id: \"m--table--filter--row\",\n ref: props.forwardedRef,\n style: _objectSpread({\n height: 10\n }, props.filterRowStyle)\n }, columns);\n }\n\n return render();\n}\n\nMTableFilterRow.defaultProps = {\n columns: [],\n detailPanelColumnAlignment: 'left',\n selection: false,\n hasActions: false,\n localization: {\n filterTooltip: 'Filter'\n },\n hideFilterIcons: false\n};\nMTableFilterRow.propTypes = {\n columns: _propTypes[\"default\"].array.isRequired,\n hasDetailPanel: _propTypes[\"default\"].bool.isRequired,\n detailPanelColumnAlignment: _propTypes[\"default\"].string,\n isTreeData: _propTypes[\"default\"].bool.isRequired,\n onFilterChanged: _propTypes[\"default\"].func.isRequired,\n filterCellStyle: _propTypes[\"default\"].object,\n filterRowStyle: _propTypes[\"default\"].object,\n showDetailPanelIcon: _propTypes[\"default\"].bool,\n selection: _propTypes[\"default\"].bool.isRequired,\n actionsColumnIndex: _propTypes[\"default\"].number,\n hasActions: _propTypes[\"default\"].bool,\n localization: _propTypes[\"default\"].object,\n hideFilterIcons: _propTypes[\"default\"].bool\n};\n\nvar _default = /*#__PURE__*/_react[\"default\"].forwardRef(function MTableFilterRowRef(props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(MTableFilterRow, (0, _extends2[\"default\"])({}, props, {\n forwardedRef: ref\n }));\n});\n\nexports[\"default\"] = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getLocalizedFilterPlaceHolder = exports.getLocalizationData = void 0;\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _ = require(\"./\");\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2[\"default\"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nvar getLocalizationData = function getLocalizationData(localization) {\n return _objectSpread(_objectSpread({}, _.MTableFilterRow.defaultProps.localization), localization);\n};\n\nexports.getLocalizationData = getLocalizationData;\n\nvar getLocalizedFilterPlaceHolder = function getLocalizedFilterPlaceHolder(columnDef, localization) {\n return columnDef.filterPlaceholder || getLocalizationData(localization).filterPlaceHolder || '';\n};\n\nexports.getLocalizedFilterPlaceHolder = getLocalizedFilterPlaceHolder;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _slicedToArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/slicedToArray\"));\n\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\n\nvar _TableCell = _interopRequireDefault(require(\"@material-ui/core/TableCell\"));\n\nvar _TableRow = _interopRequireDefault(require(\"@material-ui/core/TableRow\"));\n\nvar _IconButton = _interopRequireDefault(require(\"@material-ui/core/IconButton\"));\n\nvar _Checkbox = _interopRequireDefault(require(\"@material-ui/core/Checkbox\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2[\"default\"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction MTableGroupRow(props) {\n var rotateIconStyle = function rotateIconStyle(isOpen) {\n return {\n transform: isOpen ? 'rotate(90deg)' : 'none'\n };\n };\n\n function render() {\n var colSpan = props.columns.filter(function (columnDef) {\n return !columnDef.hidden;\n }).length;\n props.options.selection && colSpan++;\n props.detailPanel && colSpan++;\n props.actions && props.actions.length > 0 && colSpan++;\n var column = props.groups[props.level];\n var detail;\n\n if (props.groupData.isExpanded) {\n if (props.groups.length > props.level + 1) {\n // Is there another group\n detail = props.groupData.groups.map(function (groupData, index) {\n return /*#__PURE__*/_react[\"default\"].createElement(props.components.GroupRow, {\n actions: props.actions,\n key: groupData.value || '' + index,\n columns: props.columns,\n components: props.components,\n detailPanel: props.detailPanel,\n getFieldValue: props.getFieldValue,\n groupData: groupData,\n groups: props.groups,\n icons: props.icons,\n level: props.level + 1,\n path: [].concat((0, _toConsumableArray2[\"default\"])(props.path), [index]),\n onGroupExpandChanged: props.onGroupExpandChanged,\n onGroupSelected: props.onGroupSelected,\n onRowSelected: props.onRowSelected,\n onRowClick: props.onRowClick,\n onToggleDetailPanel: props.onToggleDetailPanel,\n onTreeExpandChanged: props.onTreeExpandChanged,\n onEditingCanceled: props.onEditingCanceled,\n onEditingApproved: props.onEditingApproved,\n options: props.options,\n hasAnyEditingRow: props.hasAnyEditingRow,\n isTreeData: props.isTreeData,\n cellEditable: props.cellEditable,\n onCellEditStarted: props.onCellEditStarted,\n onCellEditFinished: props.onCellEditFinished,\n scrollWidth: props.scrollWidth,\n treeDataMaxLevel: props.treeDataMaxLevel\n });\n });\n } else {\n detail = props.groupData.data.map(function (rowData, index) {\n if (rowData.tableData.editing) {\n return /*#__PURE__*/_react[\"default\"].createElement(props.components.EditRow, {\n columns: props.columns,\n components: props.components,\n data: rowData,\n icons: props.icons,\n path: [].concat((0, _toConsumableArray2[\"default\"])(props.path), [rowData.tableData.uuid]),\n localization: props.localization,\n key: index,\n mode: rowData.tableData.editing,\n options: props.options,\n isTreeData: props.isTreeData,\n detailPanel: props.detailPanel,\n onEditingCanceled: props.onEditingCanceled,\n onEditingApproved: props.onEditingApproved,\n getFieldValue: props.getFieldValue,\n onBulkEditRowChanged: props.onBulkEditRowChanged,\n scrollWidth: props.scrollWidth\n });\n } else {\n return /*#__PURE__*/_react[\"default\"].createElement(props.components.Row, {\n actions: props.actions,\n key: index,\n columns: props.columns,\n components: props.components,\n data: rowData,\n detailPanel: props.detailPanel,\n level: (props.level || 0) + 1,\n getFieldValue: props.getFieldValue,\n icons: props.icons,\n path: [].concat((0, _toConsumableArray2[\"default\"])(props.path), [rowData.tableData.uuid]),\n onRowSelected: props.onRowSelected,\n onRowClick: props.onRowClick,\n onToggleDetailPanel: props.onToggleDetailPanel,\n options: props.options,\n isTreeData: props.isTreeData,\n onTreeExpandChanged: props.onTreeExpandChanged,\n onEditingCanceled: props.onEditingCanceled,\n onEditingApproved: props.onEditingApproved,\n hasAnyEditingRow: props.hasAnyEditingRow,\n cellEditable: props.cellEditable,\n onCellEditStarted: props.onCellEditStarted,\n onCellEditFinished: props.onCellEditFinished,\n scrollWidth: props.scrollWidth,\n treeDataMaxLevel: props.treeDataMaxLevel\n });\n }\n });\n }\n }\n\n var freeCells = [];\n\n for (var i = 0; i < props.level; i++) {\n freeCells.push( /*#__PURE__*/_react[\"default\"].createElement(_TableCell[\"default\"], {\n padding: \"checkbox\",\n key: i\n }));\n }\n\n var value = props.groupData.value;\n\n if (column.lookup) {\n value = column.lookup[value];\n }\n\n var title = column.title;\n\n if (typeof props.options.groupTitle === 'function') {\n title = props.options.groupTitle(props.groupData);\n } else if (typeof title !== 'string') {\n title = /*#__PURE__*/_react[\"default\"].cloneElement(title);\n }\n\n var separator = props.options.groupRowSeparator || ': ';\n var showSelectGroupCheckbox = props.options.selection && props.options.showSelectGroupCheckbox;\n\n var mapSelectedRows = function mapSelectedRows(groupData) {\n var totalRows = 0;\n var selectedRows = 0;\n\n if (showSelectGroupCheckbox) {\n if (groupData.data.length) {\n totalRows += groupData.data.length;\n groupData.data.forEach(function (row) {\n return row.tableData.checked && selectedRows++;\n });\n } else {\n groupData.groups.forEach(function (group) {\n var _mapSelectedRows = mapSelectedRows(group),\n _mapSelectedRows2 = (0, _slicedToArray2[\"default\"])(_mapSelectedRows, 2),\n groupTotalRows = _mapSelectedRows2[0],\n groupSelectedRows = _mapSelectedRows2[1];\n\n totalRows += groupTotalRows;\n selectedRows += groupSelectedRows;\n });\n }\n }\n\n return [totalRows, selectedRows];\n };\n\n var _mapSelectedRows3 = mapSelectedRows(props.groupData),\n _mapSelectedRows4 = (0, _slicedToArray2[\"default\"])(_mapSelectedRows3, 2),\n totalRows = _mapSelectedRows4[0],\n selectedRows = _mapSelectedRows4[1];\n\n return /*#__PURE__*/_react[\"default\"].createElement(_react[\"default\"].Fragment, null, /*#__PURE__*/_react[\"default\"].createElement(_TableRow[\"default\"], {\n ref: props.forwardedRef\n }, freeCells, /*#__PURE__*/_react[\"default\"].createElement(props.components.Cell, {\n colSpan: colSpan,\n padding: \"none\",\n columnDef: column,\n value: value,\n icons: props.icons\n }, /*#__PURE__*/_react[\"default\"].createElement(_react[\"default\"].Fragment, null, /*#__PURE__*/_react[\"default\"].createElement(_IconButton[\"default\"], {\n style: _objectSpread({\n transition: 'all ease 200ms'\n }, rotateIconStyle(props.groupData.isExpanded)),\n onClick: function onClick(event) {\n props.onGroupExpandChanged(props.path);\n }\n }, /*#__PURE__*/_react[\"default\"].createElement(props.icons.DetailPanel, {\n row: props,\n level: props.path.length - 1\n })), showSelectGroupCheckbox && /*#__PURE__*/_react[\"default\"].createElement(_Checkbox[\"default\"], {\n indeterminate: selectedRows > 0 && totalRows !== selectedRows,\n checked: totalRows === selectedRows,\n onChange: function onChange(event, checked) {\n return props.onGroupSelected && props.onGroupSelected(checked, props.groupData.path);\n },\n style: {\n marginRight: 8\n }\n }), /*#__PURE__*/_react[\"default\"].createElement(\"b\", null, title, separator)))), detail);\n }\n\n return render();\n}\n\nMTableGroupRow.defaultProps = {\n columns: [],\n groups: [],\n level: 0,\n options: {}\n};\nMTableGroupRow.propTypes = {\n actions: _propTypes[\"default\"].array,\n columns: _propTypes[\"default\"].arrayOf(_propTypes[\"default\"].object),\n components: _propTypes[\"default\"].object,\n cellEditable: _propTypes[\"default\"].object,\n detailPanel: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].func, _propTypes[\"default\"].arrayOf(_propTypes[\"default\"].object)]),\n forwardedRef: _propTypes[\"default\"].element,\n getFieldValue: _propTypes[\"default\"].func,\n groupData: _propTypes[\"default\"].object,\n groups: _propTypes[\"default\"].arrayOf(_propTypes[\"default\"].object),\n hasAnyEditingRow: _propTypes[\"default\"].bool,\n icons: _propTypes[\"default\"].object,\n isTreeData: _propTypes[\"default\"].bool.isRequired,\n level: _propTypes[\"default\"].number,\n localization: _propTypes[\"default\"].object,\n onBulkEditRowChanged: _propTypes[\"default\"].func,\n onCellEditFinished: _propTypes[\"default\"].func,\n onCellEditStarted: _propTypes[\"default\"].func,\n onEditingApproved: _propTypes[\"default\"].func,\n onEditingCanceled: _propTypes[\"default\"].func,\n onGroupExpandChanged: _propTypes[\"default\"].func,\n onRowClick: _propTypes[\"default\"].func,\n onGroupSelected: _propTypes[\"default\"].func,\n onRowSelected: _propTypes[\"default\"].func,\n onToggleDetailPanel: _propTypes[\"default\"].func.isRequired,\n onTreeExpandChanged: _propTypes[\"default\"].func.isRequired,\n options: _propTypes[\"default\"].object,\n path: _propTypes[\"default\"].arrayOf(_propTypes[\"default\"].number),\n scrollWidth: _propTypes[\"default\"].number.isRequired,\n treeDataMaxLevel: _propTypes[\"default\"].number\n};\n\nvar _default = /*#__PURE__*/_react[\"default\"].forwardRef(function MTableGroupRowRef(props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(MTableGroupRow, (0, _extends2[\"default\"])({}, props, {\n forwardedRef: ref\n }));\n});\n\nexports[\"default\"] = _default;","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _Toolbar = _interopRequireDefault(require(\"@material-ui/core/Toolbar\"));\n\nvar _Chip = _interopRequireDefault(require(\"@material-ui/core/Chip\"));\n\nvar _Typography = _interopRequireDefault(require(\"@material-ui/core/Typography\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _react = _interopRequireWildcard(require(\"react\"));\n\nvar _reactBeautifulDnd = require(\"react-beautiful-dnd\");\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2[\"default\"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n/* eslint-enable no-unused-vars */\nfunction MTableGroupbar(props) {\n var getItemStyle = function getItemStyle(isDragging, draggableStyle) {\n return _objectSpread({\n // some basic styles to make the items look a bit nicer\n userSelect: 'none',\n // padding: '8px 16px',\n margin: \"0 \".concat(8, \"px 0 0\")\n }, draggableStyle);\n };\n\n var getListStyle = function getListStyle(isDraggingOver) {\n return {\n // background: isDraggingOver ? 'lightblue' : '#0000000a',\n background: '#0000000a',\n display: 'flex',\n width: '100%',\n padding: 8,\n overflow: 'auto',\n border: '1px solid #ccc',\n borderStyle: 'dashed'\n };\n };\n\n (0, _react.useEffect)(function () {\n if (props.persistentGroupingsId) {\n var persistentGroupings = props.groupColumns.map(function (column) {\n return {\n field: column.field,\n groupOrder: column.tableData.groupOrder,\n groupSort: column.tableData.groupSort,\n columnOrder: column.tableData.columnOrder\n };\n });\n var materialTableGroupings = localStorage.getItem('material-table-groupings');\n\n if (materialTableGroupings) {\n materialTableGroupings = JSON.parse(materialTableGroupings);\n } else {\n materialTableGroupings = {};\n }\n\n if (persistentGroupings.length === 0) {\n delete materialTableGroupings[props.persistentGroupingsId];\n\n if (Object.keys(materialTableGroupings).length === 0) {\n localStorage.removeItem('material-table-groupings');\n } else {\n localStorage.setItem('material-table-groupings', JSON.stringify(materialTableGroupings));\n }\n } else {\n materialTableGroupings[props.persistentGroupingsId] = persistentGroupings;\n localStorage.setItem('material-table-groupings', JSON.stringify(materialTableGroupings));\n }\n }\n }, [props.groupColumns]);\n return /*#__PURE__*/_react[\"default\"].createElement(_Toolbar[\"default\"], {\n className: props.className,\n style: {\n padding: 0,\n minHeight: 'unset'\n },\n ref: props.forwardedRef\n }, /*#__PURE__*/_react[\"default\"].createElement(_reactBeautifulDnd.Droppable, {\n droppableId: \"groups\",\n direction: \"horizontal\",\n placeholder: \"Deneme\"\n }, function (provided, snapshot) {\n return /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n ref: provided.innerRef,\n style: getListStyle(snapshot.isDraggingOver)\n }, props.groupColumns.length > 0 && /*#__PURE__*/_react[\"default\"].createElement(_Typography[\"default\"], {\n variant: \"caption\",\n style: {\n padding: 8\n }\n }, props.localization.groupedBy), props.groupColumns.map(function (columnDef, index) {\n return /*#__PURE__*/_react[\"default\"].createElement(_reactBeautifulDnd.Draggable, {\n key: columnDef.tableData.id,\n draggableId: columnDef.tableData.id.toString(),\n index: index\n }, function (provided, snapshot) {\n return /*#__PURE__*/_react[\"default\"].createElement(\"div\", (0, _extends2[\"default\"])({\n ref: provided.innerRef\n }, provided.draggableProps, provided.dragHandleProps, {\n style: getItemStyle(snapshot.isDragging, provided.draggableProps.style)\n }), /*#__PURE__*/_react[\"default\"].createElement(_Chip[\"default\"], (0, _extends2[\"default\"])({}, provided.dragHandleProps, {\n onClick: function onClick() {\n return props.onSortChanged(columnDef);\n },\n label: /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n style: {\n display: 'flex',\n alignItems: 'center'\n }\n }, /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n style: {\n \"float\": 'left'\n }\n }, columnDef.title), columnDef.tableData.groupSort && /*#__PURE__*/_react[\"default\"].createElement(props.icons.SortArrow, {\n style: {\n transition: '300ms ease all',\n transform: columnDef.tableData.groupSort === 'asc' ? 'rotate(-180deg)' : 'none',\n fontSize: 18\n }\n })),\n style: {\n boxShadow: 'none',\n textTransform: 'none'\n },\n onDelete: function onDelete() {\n return props.onGroupRemoved(columnDef, index);\n }\n })));\n });\n }), props.groupColumns.length === 0 && /*#__PURE__*/_react[\"default\"].createElement(_Typography[\"default\"], {\n variant: \"caption\",\n style: {\n padding: 8\n }\n }, props.localization.placeholder), provided.placeholder);\n }));\n}\n\nMTableGroupbar.defaultProps = {};\nMTableGroupbar.propTypes = {\n localization: _propTypes[\"default\"].shape({\n groupedBy: _propTypes[\"default\"].string,\n placeholder: _propTypes[\"default\"].string\n }),\n forwardedRef: _propTypes[\"default\"].element,\n className: _propTypes[\"default\"].string\n};\n\nvar _default = /*#__PURE__*/_react[\"default\"].forwardRef(function MTableGroupbarRef(props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(MTableGroupbar, (0, _extends2[\"default\"])({}, props, {\n forwardedRef: ref\n }));\n});\n\nexports[\"default\"] = _default;","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.MTableHeader = MTableHeader;\nexports[\"default\"] = exports.styles = void 0;\n\nvar _Tooltip2 = _interopRequireDefault(require(\"@material-ui/core/Tooltip\"));\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _slicedToArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/slicedToArray\"));\n\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\n\nvar _react = _interopRequireWildcard(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _TableHead = _interopRequireDefault(require(\"@material-ui/core/TableHead\"));\n\nvar _TableRow = _interopRequireDefault(require(\"@material-ui/core/TableRow\"));\n\nvar _TableCell = _interopRequireDefault(require(\"@material-ui/core/TableCell\"));\n\nvar _TableSortLabel = _interopRequireDefault(require(\"@material-ui/core/TableSortLabel\"));\n\nvar _Checkbox = _interopRequireDefault(require(\"@material-ui/core/Checkbox\"));\n\nvar _reactBeautifulDnd = require(\"react-beautiful-dnd\");\n\nvar _styles = require(\"@material-ui/core/styles\");\n\nvar CommonValues = _interopRequireWildcard(require(\"../../utils/common-values\"));\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2[\"default\"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction MTableHeader(_ref) {\n var onColumnResized = _ref.onColumnResized,\n props = (0, _objectWithoutProperties2[\"default\"])(_ref, [\"onColumnResized\"]);\n var defaultMinColumnWidth = 20;\n var defaultMaxColumnWidth = 10000;\n\n var _React$useState = _react[\"default\"].useState(undefined),\n _React$useState2 = (0, _slicedToArray2[\"default\"])(_React$useState, 2),\n resizing = _React$useState2[0],\n setResizing = _React$useState2[1];\n\n var _React$useState3 = _react[\"default\"].useState(0),\n _React$useState4 = (0, _slicedToArray2[\"default\"])(_React$useState3, 2),\n lastX = _React$useState4[0],\n setLastX = _React$useState4[1];\n\n var handleMouseDown = function handleMouseDown(e, columnDef, colIndex) {\n var startX = e.clientX;\n var th = e.target.closest('th');\n var currentWidth = th && Math.round(+window.getComputedStyle(th).width.slice(0, -2));\n var initialColWidths = resizing === null || resizing === void 0 ? void 0 : resizing.initialColWidths;\n var nextWidth;\n var nextColIndex;\n\n if (props.tableWidth === 'full') {\n var nextTh = th.nextSibling;\n nextWidth = nextTh && Math.round(+window.getComputedStyle(nextTh).width.slice(0, -2));\n nextColIndex = props.columns.findIndex(function (c) {\n return c.tableData.id === columnDef.tableData.id + 1;\n });\n } else if (!initialColWidths) {\n // Ensure we have all column widths in pixels\n initialColWidths = Array.from(th.parentNode.children).map(function (th) {\n return Math.round(+window.getComputedStyle(th).width.slice(0, -2));\n });\n }\n\n setLastX(startX);\n setResizing(_objectSpread(_objectSpread({\n colIndex: colIndex,\n nextColIndex: nextColIndex,\n lastColData: _objectSpread(_objectSpread({}, columnDef.tableData), {}, {\n width: currentWidth\n })\n }, nextColIndex && {\n lastNextColData: _objectSpread(_objectSpread({}, props.columns[nextColIndex].tableData), {}, {\n width: nextWidth\n })\n }), {}, {\n initialColWidths: initialColWidths,\n startX: startX\n }));\n };\n\n var constrainedColumnResize = function constrainedColumnResize(col, lastWidth, offset) {\n // Extra max/min are to avoid sudden column changes when a column that starts without\n // an explicit width is resized\n var constrainedNewWidth = Math.min(Math.max(col.maxWidth || defaultMaxColumnWidth, lastWidth), // Avoid sudden decrease in column width\n Math.max(Math.min(col.minWidth || defaultMinColumnWidth, lastWidth), // Avoid sudden increase in column width\n lastWidth + offset));\n return constrainedNewWidth - lastWidth;\n };\n\n var handleMouseMove = _react[\"default\"].useCallback( // Use usecallback to prevent triggering theuse effect too much\n function (e) {\n if (!resizing) return;\n\n if (e.preventDefault) {\n // prevent text in table being selected\n e.preventDefault();\n }\n\n var curX = e.clientX;\n var col = props.columns[resizing.colIndex];\n var alreadyOffset = col.tableData.additionalWidth - resizing.lastColData.additionalWidth;\n var offset = constrainedColumnResize(col, resizing.lastColData.width + alreadyOffset, curX - lastX);\n offset = Math.round(offset);\n var widths = [resizing.lastColData.width + alreadyOffset];\n\n if (props.tableWidth === 'full') {\n offset = -constrainedColumnResize(props.columns[resizing.nextColIndex], resizing.lastNextColData.width - alreadyOffset, -offset);\n widths.push(resizing.lastNextColData.width - alreadyOffset);\n }\n\n setLastX(curX);\n\n if (offset) {\n onColumnResized(col.tableData.id, offset, widths, resizing.initialColWidths);\n }\n }, [lastX, resizing, onColumnResized]);\n\n var handleMouseUp = _react[\"default\"].useCallback(function (e) {\n if (resizing && lastX !== resizing.startX) {\n onColumnResized(props.columns[resizing.colIndex].tableData.id, 0, [], []);\n }\n\n setResizing(undefined);\n }, [setResizing, resizing, lastX, onColumnResized]);\n\n (0, _react.useEffect)(function () {\n document.addEventListener('mousemove', handleMouseMove);\n document.addEventListener('mouseup', handleMouseUp);\n return function () {\n document.removeEventListener('mousemove', handleMouseMove);\n document.removeEventListener('mouseup', handleMouseUp);\n };\n }, [handleMouseMove, handleMouseUp]); // ONly reset the listeners if needed\n\n var renderActionsHeader = function renderActionsHeader() {\n var localization = _objectSpread(_objectSpread({}, MTableHeader.defaultProps.localization), props.localization);\n\n var width = CommonValues.actionsColumnWidth(props);\n return /*#__PURE__*/_react[\"default\"].createElement(_TableCell[\"default\"], {\n key: \"key-actions-column\",\n padding: \"checkbox\",\n className: props.classes.header,\n style: _objectSpread(_objectSpread({\n textAlign: 'center'\n }, props.headerStyle), {}, {\n width: width,\n boxSizing: 'border-box'\n })\n }, /*#__PURE__*/_react[\"default\"].createElement(_TableSortLabel[\"default\"], {\n hideSortIcon: true,\n disabled: true\n }, localization.actions));\n };\n\n var getCellStyle = function getCellStyle(columnDef) {\n var width = props.options.columnResizable ? CommonValues.reducePercentsInCalc(columnDef.tableData.width, props.scrollWidth) : columnDef.tableData.width;\n\n var style = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, props.headerStyle), columnDef.headerStyle), {}, {\n boxSizing: 'border-box',\n width: width\n }, props.tableWidth === 'full' && columnDef.minWidth && {\n minWidth: columnDef.minWidth\n }), props.tableWidth === 'full' && columnDef.maxWidth && {\n maxWidth: columnDef.maxWidth\n });\n\n if (props.options.tableLayout === 'fixed' && props.options.columnResizable && columnDef.resizable !== false) {\n style.paddingLeft = 8;\n style.paddingRight = 2;\n style.position = 'relative';\n }\n\n return style;\n };\n\n function RenderHeader() {\n var size = props.options.padding === 'default' ? 'medium' : 'small';\n return props.columns.filter(function (columnDef) {\n return !columnDef.hidden && !(columnDef.tableData.groupOrder > -1);\n }).sort(function (a, b) {\n return a.tableData.columnOrder - b.tableData.columnOrder;\n }).map(function (columnDef, index, allCols) {\n var content = columnDef.title;\n\n if (props.draggable && columnDef.draggable !== false) {\n content = /*#__PURE__*/_react[\"default\"].createElement(_reactBeautifulDnd.Draggable, {\n key: columnDef.tableData.id,\n draggableId: columnDef.tableData.id.toString(),\n index: index\n }, function (provided, snapshot) {\n return /*#__PURE__*/_react[\"default\"].createElement(\"div\", (0, _extends2[\"default\"])({\n ref: provided.innerRef\n }, provided.draggableProps, provided.dragHandleProps, {\n style: snapshot.isDragging ? _objectSpread(_objectSpread({}, provided.draggableProps.style), {}, {\n position: 'static'\n }) : {\n position: 'relative',\n minWidth: 0,\n display: 'flex'\n }\n }), columnDef.sorting !== false && props.sorting ? /*#__PURE__*/_react[\"default\"].createElement(RenderSortButton, {\n columnDef: columnDef,\n orderBy: props.orderBy,\n keepSortDirectionOnColumnSwitch: props.keepSortDirectionOnColumnSwitch,\n orderDirection: props.orderDirection,\n icon: props.icons.SortArrow,\n thirdSortClick: props.thirdSortClick,\n onOrderChange: props.onOrderChange\n }, columnDef.title) : columnDef.title);\n });\n } else if (columnDef.sorting !== false && props.sorting) {\n content = /*#__PURE__*/_react[\"default\"].createElement(RenderSortButton, {\n columnDef: columnDef,\n orderBy: props.orderBy,\n keepSortDirectionOnColumnSwitch: props.keepSortDirectionOnColumnSwitch,\n orderDirection: props.orderDirection,\n icon: props.icons.SortArrow,\n thirdSortClick: props.thirdSortClick,\n onOrderChange: props.onOrderChange\n }, columnDef.title);\n }\n\n if (columnDef.tooltip) {\n content = /*#__PURE__*/_react[\"default\"].createElement(_Tooltip2[\"default\"], {\n title: columnDef.tooltip,\n placement: \"bottom\"\n }, /*#__PURE__*/_react[\"default\"].createElement(\"span\", null, content));\n }\n\n if (props.options.tableLayout === 'fixed' && props.options.columnResizable && columnDef.resizable !== false && !(props.options.tableWidth === 'full' && index === allCols.length - 1)) {\n var Resize = props.icons.Resize ? props.icons.Resize : function (props) {\n return /*#__PURE__*/_react[\"default\"].createElement(\"div\", (0, _extends2[\"default\"])({}, props, {\n \"data-test-id\": \"drag_handle\"\n }));\n };\n content = /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n className: props.classes.headerWrap\n }, /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n className: props.classes.headerContent\n }, content), /*#__PURE__*/_react[\"default\"].createElement(\"div\", null), /*#__PURE__*/_react[\"default\"].createElement(Resize, {\n className: props.classes.headerResize,\n style: {\n display: 'flex',\n justifyContent: 'center',\n color: resizing !== null && resizing !== void 0 && resizing.col && resizing.col.tableData.id === columnDef.tableData.id ? props.theme.palette.primary.main : 'inherit'\n },\n onMouseDown: function onMouseDown(e) {\n return handleMouseDown(e, columnDef, index);\n }\n }));\n }\n\n var cellAlignment = columnDef.align !== undefined ? columnDef.align : ['numeric', 'currency'].indexOf(columnDef.type) !== -1 ? 'right' : 'left';\n return /*#__PURE__*/_react[\"default\"].createElement(_TableCell[\"default\"], {\n key: columnDef.tableData.id,\n align: cellAlignment,\n className: props.classes.header,\n style: getCellStyle(columnDef),\n size: size,\n \"aria-label\": columnDef.ariaLabel\n }, content);\n });\n }\n\n function renderSelectionHeader() {\n var selectionWidth = CommonValues.selectionMaxWidth(props, props.treeDataMaxLevel);\n return /*#__PURE__*/_react[\"default\"].createElement(_TableCell[\"default\"], {\n padding: \"none\",\n key: \"key-selection-column\",\n className: props.classes.header,\n style: _objectSpread(_objectSpread({}, props.headerStyle), {}, {\n width: selectionWidth\n })\n }, props.showSelectAllCheckbox && /*#__PURE__*/_react[\"default\"].createElement(_Checkbox[\"default\"], (0, _extends2[\"default\"])({\n indeterminate: props.selectedCount > 0 && props.selectedCount < props.dataCount,\n checked: props.dataCount > 0 && props.selectedCount === props.dataCount,\n onChange: function onChange(event, checked) {\n return props.onAllSelected && props.onAllSelected(checked);\n }\n }, props.options.headerSelectionProps)));\n }\n\n function renderDetailPanelColumnCell() {\n return /*#__PURE__*/_react[\"default\"].createElement(_TableCell[\"default\"], {\n padding: \"none\",\n key: \"key-detail-panel-column\",\n className: props.classes.header,\n style: _objectSpread({}, props.headerStyle)\n });\n }\n\n function render() {\n var headers = RenderHeader();\n\n if (props.hasSelection) {\n headers.splice(0, 0, renderSelectionHeader());\n }\n\n if (props.showActionsColumn) {\n if (props.actionsHeaderIndex >= 0) {\n var endPos = 0;\n\n if (props.hasSelection) {\n endPos = 1;\n }\n\n headers.splice(props.actionsHeaderIndex + endPos, 0, renderActionsHeader());\n } else if (props.actionsHeaderIndex === -1) {\n headers.push(renderActionsHeader());\n }\n }\n\n if (props.hasDetailPanel && props.options.showDetailPanelIcon) {\n if (props.detailPanelColumnAlignment === 'right') {\n headers.push(renderDetailPanelColumnCell());\n } else {\n headers.splice(0, 0, renderDetailPanelColumnCell());\n }\n }\n\n if (props.isTreeData > 0) {\n headers.splice(0, 0, /*#__PURE__*/_react[\"default\"].createElement(_TableCell[\"default\"], {\n padding: \"none\",\n key: 'key-tree-data-header',\n className: props.classes.header,\n style: _objectSpread({}, props.headerStyle)\n }));\n }\n\n props.columns.filter(function (columnDef) {\n return columnDef.tableData.groupOrder > -1;\n }).forEach(function (columnDef) {\n headers.splice(0, 0, /*#__PURE__*/_react[\"default\"].createElement(_TableCell[\"default\"], {\n padding: \"checkbox\",\n key: 'key-group-header' + columnDef.tableData.id,\n className: props.classes.header,\n style: _objectSpread({}, props.headerStyle)\n }));\n });\n return /*#__PURE__*/_react[\"default\"].createElement(_TableHead[\"default\"], {\n ref: props.forwardedRef\n }, /*#__PURE__*/_react[\"default\"].createElement(_TableRow[\"default\"], {\n className: props.classes.headerRow\n }, headers));\n }\n\n return render();\n}\n\nvar computeNewOrderDirection = function computeNewOrderDirection(orderBy, orderDirection, columnDef, thirdSortClick, keepSortDirectionOnColumnSwitch) {\n if (columnDef.tableData.id !== orderBy) {\n if (keepSortDirectionOnColumnSwitch) {\n // use the current sort order when switching columns if defined\n return orderDirection || 'asc';\n } else {\n return 'asc';\n }\n } else if (orderDirection === 'asc') {\n return 'desc';\n } else if (orderDirection === 'desc') {\n if (thirdSortClick) {\n // third sort click brings to no order direction after desc\n return '';\n } else {\n return 'asc';\n }\n }\n\n return 'asc';\n};\n\nfunction RenderSortButton(_ref2) {\n var columnDef = _ref2.columnDef,\n orderBy = _ref2.orderBy,\n keepSortDirectionOnColumnSwitch = _ref2.keepSortDirectionOnColumnSwitch,\n orderDirection = _ref2.orderDirection,\n icon = _ref2.icon,\n thirdSortClick = _ref2.thirdSortClick,\n onOrderChange = _ref2.onOrderChange,\n children = _ref2.children;\n var active = orderBy === columnDef.tableData.id; // If current sorted column or prop asked to\n // maintain sort order when switching sorted column,\n // follow computed order direction if defined\n // else default direction is asc\n\n var direction = active || keepSortDirectionOnColumnSwitch ? orderDirection || 'asc' : 'asc';\n var ariaSort = 'none';\n\n if (active && direction === 'asc') {\n ariaSort = columnDef.ariaSortAsc ? columnDef.ariaSortAsc : 'Ascendant';\n }\n\n if (active && direction === 'desc') {\n ariaSort = columnDef.ariaSortDesc ? columnDef.ariaSortDesc : 'Descendant';\n }\n\n return /*#__PURE__*/_react[\"default\"].createElement(_TableSortLabel[\"default\"], {\n role: \"\",\n \"aria-sort\": ariaSort,\n \"aria-label\": columnDef.ariaLabel,\n IconComponent: icon,\n active: active,\n \"data-testid\": \"mtableheader-sortlabel\",\n direction: direction,\n onClick: function onClick() {\n var newOrderDirection = computeNewOrderDirection(orderBy, orderDirection, columnDef, thirdSortClick, keepSortDirectionOnColumnSwitch);\n onOrderChange(columnDef.tableData.id, newOrderDirection);\n }\n }, children);\n}\n\nMTableHeader.defaultProps = {\n dataCount: 0,\n hasSelection: false,\n headerStyle: {},\n selectedCount: 0,\n sorting: true,\n keepSortDirectionOnColumnSwitch: true,\n localization: {\n actions: 'Actions'\n },\n orderBy: undefined,\n orderDirection: 'asc',\n actionsHeaderIndex: 0,\n detailPanelColumnAlignment: 'left',\n draggable: true,\n thirdSortClick: true\n};\nMTableHeader.propTypes = {\n columns: _propTypes[\"default\"].array.isRequired,\n dataCount: _propTypes[\"default\"].number,\n hasDetailPanel: _propTypes[\"default\"].bool.isRequired,\n detailPanelColumnAlignment: _propTypes[\"default\"].string,\n hasSelection: _propTypes[\"default\"].bool,\n headerStyle: _propTypes[\"default\"].object,\n localization: _propTypes[\"default\"].object,\n selectedCount: _propTypes[\"default\"].number,\n sorting: _propTypes[\"default\"].bool,\n keepSortDirectionOnColumnSwitch: _propTypes[\"default\"].bool,\n onAllSelected: _propTypes[\"default\"].func,\n onOrderChange: _propTypes[\"default\"].func,\n orderBy: _propTypes[\"default\"].number,\n orderDirection: _propTypes[\"default\"].string,\n actionsHeaderIndex: _propTypes[\"default\"].number,\n showActionsColumn: _propTypes[\"default\"].bool,\n showSelectAllCheckbox: _propTypes[\"default\"].bool,\n draggable: _propTypes[\"default\"].bool,\n thirdSortClick: _propTypes[\"default\"].bool,\n tooltip: _propTypes[\"default\"].string\n};\n\nvar styles = function styles(theme) {\n return {\n headerRow: {\n zIndex: 10\n },\n header: {\n // display: 'inline-block',\n // position: 'sticky',\n top: 0,\n backgroundColor: theme.palette.background.paper // Change according to theme,\n\n },\n headerWrap: {\n display: 'flex',\n alignItems: 'center',\n position: 'relative',\n left: 4\n },\n headerContent: {\n minWidth: 0,\n display: 'flex',\n flex: '1 0 100%',\n justifyContent: 'flex-start',\n alignItems: 'center',\n width: '100%',\n position: 'relative'\n },\n headerResize: {\n flex: 1,\n cursor: 'col-resize',\n position: 'absolute',\n // allow div to straddle adjacent columns\n height: '100%',\n width: 16,\n right: -8,\n zIndex: 20 // so half that overlaps next column can be used to resize\n\n }\n };\n};\n\nexports.styles = styles;\n\nvar MTableHeaderRef = /*#__PURE__*/_react[\"default\"].forwardRef(function MTableHeaderRef(props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(MTableHeader, (0, _extends2[\"default\"])({}, props, {\n forwardedRef: ref\n }));\n});\n\nvar _default = (0, _styles.withStyles)(styles, {\n name: 'MTableHeader',\n withTheme: true\n})(MTableHeaderRef);\n\nexports[\"default\"] = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _IconButton = _interopRequireDefault(require(\"@material-ui/core/IconButton\"));\n\nvar _styles = require(\"@material-ui/core/styles\");\n\nvar _Tooltip = _interopRequireDefault(require(\"@material-ui/core/Tooltip\"));\n\nvar _Typography = _interopRequireDefault(require(\"@material-ui/core/Typography\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2[\"default\"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n/* eslint-enable no-unused-vars */\nfunction MTablePagination(props) {\n if (process.env.NODE_ENV === 'development' && !props.onPageChange) {\n console.error('The prop `onPageChange` in pagination is undefined and paging does not work. ' + 'This is most likely caused by an old material-ui version <= 4.11.X.' + 'To fix this, install either material-ui >=4.12 or downgrade material-table-core to <=3.0.15.');\n }\n\n var handleFirstPageButtonClick = function handleFirstPageButtonClick(event) {\n props.onPageChange(event, 0);\n };\n\n var handleBackButtonClick = function handleBackButtonClick(event) {\n props.onPageChange(event, props.page - 1);\n };\n\n var handleNextButtonClick = function handleNextButtonClick(event) {\n props.onPageChange(event, props.page + 1);\n };\n\n var handleLastPageButtonClick = function handleLastPageButtonClick(event) {\n props.onPageChange(event, Math.max(0, Math.ceil(props.count / props.rowsPerPage) - 1));\n };\n\n function render() {\n var classes = props.classes,\n count = props.count,\n page = props.page,\n rowsPerPage = props.rowsPerPage,\n theme = props.theme,\n showFirstLastPageButtons = props.showFirstLastPageButtons;\n\n var localization = _objectSpread(_objectSpread({}, MTablePagination.defaultProps.localization), props.localization);\n\n return /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n className: classes.root,\n ref: props.forwardedRef\n }, showFirstLastPageButtons && /*#__PURE__*/_react[\"default\"].createElement(_Tooltip[\"default\"], {\n title: localization.firstTooltip\n }, /*#__PURE__*/_react[\"default\"].createElement(\"span\", null, /*#__PURE__*/_react[\"default\"].createElement(_IconButton[\"default\"], {\n onClick: handleFirstPageButtonClick,\n disabled: page === 0,\n \"aria-label\": localization.firstAriaLabel\n }, theme.direction === 'rtl' ? /*#__PURE__*/_react[\"default\"].createElement(props.icons.LastPage, null) : /*#__PURE__*/_react[\"default\"].createElement(props.icons.FirstPage, null)))), /*#__PURE__*/_react[\"default\"].createElement(_Tooltip[\"default\"], {\n title: localization.previousTooltip\n }, /*#__PURE__*/_react[\"default\"].createElement(\"span\", null, /*#__PURE__*/_react[\"default\"].createElement(_IconButton[\"default\"], {\n onClick: handleBackButtonClick,\n disabled: page === 0,\n \"aria-label\": localization.previousAriaLabel\n }, theme.direction === 'rtl' ? /*#__PURE__*/_react[\"default\"].createElement(props.icons.NextPage, null) : /*#__PURE__*/_react[\"default\"].createElement(props.icons.PreviousPage, null)))), /*#__PURE__*/_react[\"default\"].createElement(_Typography[\"default\"], {\n variant: \"caption\",\n style: {\n flex: 1,\n textAlign: 'center',\n alignSelf: 'center',\n flexBasis: 'inherit'\n }\n }, localization.labelDisplayedRows.replace('{from}', props.count === 0 ? 0 : props.page * props.rowsPerPage + 1).replace('{to}', Math.min((props.page + 1) * props.rowsPerPage, props.count)).replace('{count}', props.count)), /*#__PURE__*/_react[\"default\"].createElement(_Tooltip[\"default\"], {\n title: localization.nextTooltip\n }, /*#__PURE__*/_react[\"default\"].createElement(\"span\", null, /*#__PURE__*/_react[\"default\"].createElement(_IconButton[\"default\"], {\n onClick: handleNextButtonClick,\n disabled: page >= Math.ceil(count / rowsPerPage) - 1,\n \"aria-label\": localization.nextAriaLabel\n }, theme.direction === 'rtl' ? /*#__PURE__*/_react[\"default\"].createElement(props.icons.PreviousPage, null) : /*#__PURE__*/_react[\"default\"].createElement(props.icons.NextPage, null)))), showFirstLastPageButtons && /*#__PURE__*/_react[\"default\"].createElement(_Tooltip[\"default\"], {\n title: localization.lastTooltip\n }, /*#__PURE__*/_react[\"default\"].createElement(\"span\", null, /*#__PURE__*/_react[\"default\"].createElement(_IconButton[\"default\"], {\n onClick: handleLastPageButtonClick,\n disabled: page >= Math.ceil(count / rowsPerPage) - 1,\n \"aria-label\": localization.lastAriaLabel\n }, theme.direction === 'rtl' ? /*#__PURE__*/_react[\"default\"].createElement(props.icons.FirstPage, null) : /*#__PURE__*/_react[\"default\"].createElement(props.icons.LastPage, null)))));\n }\n\n return render();\n}\n\nvar actionsStyles = function actionsStyles(theme) {\n return {\n root: {\n flexShrink: 0,\n color: theme.palette.text.secondary,\n display: 'flex' // lineHeight: '48px'\n\n }\n };\n};\n\nMTablePagination.propTypes = {\n onPageChange: _propTypes[\"default\"].func,\n page: _propTypes[\"default\"].number,\n count: _propTypes[\"default\"].number,\n rowsPerPage: _propTypes[\"default\"].number,\n classes: _propTypes[\"default\"].object,\n localization: _propTypes[\"default\"].object,\n theme: _propTypes[\"default\"].any,\n showFirstLastPageButtons: _propTypes[\"default\"].bool\n};\nMTablePagination.defaultProps = {\n showFirstLastPageButtons: true,\n localization: {\n firstAriaLabel: 'First Page',\n firstTooltip: 'First Page',\n previousAriaLabel: 'Previous Page',\n previousTooltip: 'Previous Page',\n nextAriaLabel: 'Next Page',\n nextTooltip: 'Next Page',\n lastAriaLabel: 'Last Page',\n lastTooltip: 'Last Page',\n labelDisplayedRows: '{from}-{to} of {count}',\n labelRowsPerPage: 'Rows per page:'\n }\n};\n\nvar MTableGroupRowRef = /*#__PURE__*/_react[\"default\"].forwardRef(function MTablePaginationRef(props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(MTablePagination, (0, _extends2[\"default\"])({}, props, {\n forwardedRef: ref\n }));\n});\n\nvar MTablePaginationOuter = (0, _styles.withStyles)(actionsStyles, {\n withTheme: true\n})(MTableGroupRowRef);\nvar _default = MTablePaginationOuter;\nexports[\"default\"] = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _styles = require(\"@material-ui/core/styles\");\n\nvar _reactDoubleScrollbar = _interopRequireDefault(require(\"react-double-scrollbar\"));\n\nvar style = function style() {\n return {\n horizontalScrollContainer: {\n '& ::-webkit-scrollbar': {\n '-webkit-appearance': 'none'\n },\n '& ::-webkit-scrollbar:horizontal': {\n height: 8\n },\n '& ::-webkit-scrollbar-thumb': {\n borderRadius: 4,\n border: '2px solid white',\n backgroundColor: 'rgba(0, 0, 0, .3)'\n }\n }\n };\n};\n\nvar ScrollBar = (0, _styles.withStyles)(style)(function (_ref) {\n var _double = _ref[\"double\"],\n children = _ref.children,\n classes = _ref.classes;\n\n if (_double) {\n return /*#__PURE__*/_react[\"default\"].createElement(_reactDoubleScrollbar[\"default\"], null, children);\n } else {\n return /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n className: classes.horizontalScrollContainer,\n style: {\n overflowX: 'auto',\n position: 'relative'\n }\n }, children);\n }\n});\nvar _default = ScrollBar;\nexports[\"default\"] = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _IconButton = _interopRequireDefault(require(\"@material-ui/core/IconButton\"));\n\nvar _styles = require(\"@material-ui/core/styles\");\n\nvar _Tooltip = _interopRequireDefault(require(\"@material-ui/core/Tooltip\"));\n\nvar _Hidden = _interopRequireDefault(require(\"@material-ui/core/Hidden\"));\n\nvar _Button = _interopRequireDefault(require(\"@material-ui/core/Button\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2[\"default\"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n/* eslint-enable no-unused-vars */\nfunction MTablePaginationInner(props) {\n var handleFirstPageButtonClick = function handleFirstPageButtonClick(event) {\n props.onPageChange(event, 0);\n };\n\n var handleBackButtonClick = function handleBackButtonClick(event) {\n props.onPageChange(event, props.page - 1);\n };\n\n var handleNextButtonClick = function handleNextButtonClick(event) {\n props.onPageChange(event, props.page + 1);\n };\n\n var handleNumberButtonClick = function handleNumberButtonClick(number) {\n return function (event) {\n props.onPageChange(event, number);\n };\n };\n\n var handleLastPageButtonClick = function handleLastPageButtonClick(event) {\n props.onPageChange(event, Math.max(0, Math.ceil(props.count / props.rowsPerPage) - 1));\n };\n\n function renderPagesButton(start, end) {\n var buttons = [];\n\n for (var p = start; p <= end; p++) {\n var buttonVariant = p === props.page ? 'contained' : 'text';\n buttons.push( /*#__PURE__*/_react[\"default\"].createElement(_Button[\"default\"], {\n size: \"small\",\n style: {\n boxShadow: 'none',\n maxWidth: '30px',\n maxHeight: '30px',\n minWidth: '30px',\n minHeight: '30px'\n },\n disabled: p === props.page,\n variant: buttonVariant,\n onClick: handleNumberButtonClick(p),\n key: p\n }, p + 1));\n }\n\n return /*#__PURE__*/_react[\"default\"].createElement(\"span\", null, buttons);\n }\n\n function render() {\n var classes = props.classes,\n count = props.count,\n page = props.page,\n rowsPerPage = props.rowsPerPage,\n theme = props.theme,\n showFirstLastPageButtons = props.showFirstLastPageButtons;\n\n var localization = _objectSpread(_objectSpread({}, MTablePaginationInner.defaultProps.localization), props.localization);\n\n var maxPages = Math.ceil(count / rowsPerPage) - 1;\n var pageStart = Math.max(page - 1, 0);\n var pageEnd = Math.min(maxPages, page + 1);\n return /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n className: classes.root,\n ref: props.forwardedRef\n }, showFirstLastPageButtons && /*#__PURE__*/_react[\"default\"].createElement(_Tooltip[\"default\"], {\n title: localization.firstTooltip\n }, /*#__PURE__*/_react[\"default\"].createElement(\"span\", null, /*#__PURE__*/_react[\"default\"].createElement(_IconButton[\"default\"], {\n onClick: handleFirstPageButtonClick,\n disabled: page === 0,\n \"aria-label\": localization.firstAriaLabel\n }, theme.direction === 'rtl' ? /*#__PURE__*/_react[\"default\"].createElement(props.icons.LastPage, null) : /*#__PURE__*/_react[\"default\"].createElement(props.icons.FirstPage, null)))), /*#__PURE__*/_react[\"default\"].createElement(_Tooltip[\"default\"], {\n title: localization.previousTooltip\n }, /*#__PURE__*/_react[\"default\"].createElement(\"span\", null, /*#__PURE__*/_react[\"default\"].createElement(_IconButton[\"default\"], {\n onClick: handleBackButtonClick,\n disabled: page === 0,\n \"aria-label\": localization.previousAriaLabel\n }, /*#__PURE__*/_react[\"default\"].createElement(props.icons.PreviousPage, null)))), /*#__PURE__*/_react[\"default\"].createElement(_Hidden[\"default\"], {\n smDown: true\n }, renderPagesButton(pageStart, pageEnd)), /*#__PURE__*/_react[\"default\"].createElement(_Tooltip[\"default\"], {\n title: localization.nextTooltip\n }, /*#__PURE__*/_react[\"default\"].createElement(\"span\", null, /*#__PURE__*/_react[\"default\"].createElement(_IconButton[\"default\"], {\n onClick: handleNextButtonClick,\n disabled: page >= maxPages,\n \"aria-label\": localization.nextAriaLabel\n }, /*#__PURE__*/_react[\"default\"].createElement(props.icons.NextPage, null)))), showFirstLastPageButtons && /*#__PURE__*/_react[\"default\"].createElement(_Tooltip[\"default\"], {\n title: localization.lastTooltip\n }, /*#__PURE__*/_react[\"default\"].createElement(\"span\", null, /*#__PURE__*/_react[\"default\"].createElement(_IconButton[\"default\"], {\n onClick: handleLastPageButtonClick,\n disabled: page >= Math.ceil(count / rowsPerPage) - 1,\n \"aria-label\": localization.lastAriaLabel\n }, theme.direction === 'rtl' ? /*#__PURE__*/_react[\"default\"].createElement(props.icons.FirstPage, null) : /*#__PURE__*/_react[\"default\"].createElement(props.icons.LastPage, null)))));\n }\n\n return render();\n}\n\nvar actionsStyles = function actionsStyles(theme) {\n return {\n root: {\n flexShrink: 0,\n color: theme.palette.text.secondary,\n marginLeft: theme.spacing(2.5)\n }\n };\n};\n\nMTablePaginationInner.propTypes = {\n onPageChange: _propTypes[\"default\"].func,\n page: _propTypes[\"default\"].number,\n count: _propTypes[\"default\"].number,\n rowsPerPage: _propTypes[\"default\"].number,\n classes: _propTypes[\"default\"].object,\n localization: _propTypes[\"default\"].object,\n theme: _propTypes[\"default\"].any,\n showFirstLastPageButtons: _propTypes[\"default\"].bool\n};\nMTablePaginationInner.defaultProps = {\n showFirstLastPageButtons: true,\n localization: {\n firstAriaLabel: 'First Page',\n firstTooltip: 'First Page',\n previousAriaLabel: 'Previous Page',\n previousTooltip: 'Previous Page',\n nextAriaLabel: 'Next Page',\n nextTooltip: 'Next Page',\n lastAriaLabel: 'Last Page',\n lastTooltip: 'Last Page',\n labelDisplayedRows: '{from}-{to} of {count}',\n labelRowsPerPage: 'Rows per page:'\n }\n};\n\nvar MTableSteppedPaginationRef = /*#__PURE__*/_react[\"default\"].forwardRef(function MTableSteppedPaginationRef(props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(MTablePaginationInner, (0, _extends2[\"default\"])({}, props, {\n forwardedRef: ref\n }));\n});\n\nvar MTableSteppedPagination = (0, _styles.withStyles)(actionsStyles, {\n withTheme: true\n})(MTableSteppedPaginationRef);\nvar _default = MTableSteppedPagination;\nexports[\"default\"] = _default;","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.MTableSummaryRow = MTableSummaryRow;\nexports[\"default\"] = exports.styles = void 0;\n\nvar _TableRow2 = _interopRequireDefault(require(\"@material-ui/core/TableRow\"));\n\nvar _typeof2 = _interopRequireDefault(require(\"@babel/runtime/helpers/typeof\"));\n\nvar _TableCell2 = _interopRequireDefault(require(\"@material-ui/core/TableCell\"));\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _styles = require(\"@material-ui/core/styles\");\n\nvar _utils = require(\"../../utils\");\n\nvar CommonValues = _interopRequireWildcard(require(\"../../utils/common-values\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nfunction MTableSummaryRow(_ref) {\n var data = _ref.data,\n columns = _ref.columns,\n currentData = _ref.currentData,\n rowProps = _ref.rowProps,\n renderSummaryRow = _ref.renderSummaryRow;\n\n if (!renderSummaryRow) {\n return null;\n }\n\n function renderPlaceholderColumn(key) {\n var numIcons = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n var size = CommonValues.elementSize(rowProps);\n var width = numIcons * CommonValues.baseIconSize(rowProps);\n return /*#__PURE__*/React.createElement(_TableCell2[\"default\"], {\n key: \"placeholder.\".concat(key),\n size: size,\n padding: \"none\",\n style: {\n width: width,\n padding: '0px 5px',\n boxSizing: 'border-box'\n }\n });\n }\n\n var placeholderLeftColumns = [];\n var placeholderRightColumns = [];\n var placeholderKey = 0; // Create empty columns corresponding to selection, actions, detail panel, and tree data icons\n\n if (rowProps.options.selection) {\n placeholderLeftColumns.push(renderPlaceholderColumn(placeholderKey++));\n }\n\n if (rowProps.actions && rowProps.actions.filter(function (a) {\n return a.position === 'row' || typeof a === 'function';\n }).length > 0) {\n var numRowActions = CommonValues.rowActions(rowProps).length;\n\n if (rowProps.options.actionsColumnIndex === -1) {\n placeholderRightColumns.push(renderPlaceholderColumn(placeholderKey++, numRowActions));\n } else if (rowProps.options.actionsColumnIndex >= 0) {\n placeholderLeftColumns.push(renderPlaceholderColumn(placeholderKey++, numRowActions));\n }\n }\n\n if (rowProps.detailPanel && rowProps.options.showDetailPanelIcon) {\n if (rowProps.options.detailPanelColumnAlignment === 'right') {\n placeholderRightColumns.push(renderPlaceholderColumn(placeholderKey++));\n } else {\n placeholderLeftColumns.push(renderPlaceholderColumn(placeholderKey++));\n }\n }\n\n if (rowProps.isTreeData) {\n placeholderLeftColumns.push(renderPlaceholderColumn(placeholderKey++));\n }\n\n return /*#__PURE__*/React.createElement(_TableRow2[\"default\"], null, placeholderLeftColumns, columns.map(function (column, index) {\n var summaryColumn = renderSummaryRow({\n index: index,\n column: column,\n data: data,\n currentData: currentData,\n columns: columns\n });\n var cellAlignment = column.align !== undefined ? column.align : ['numeric', 'currency'].indexOf(column.type) !== -1 ? 'right' : 'left';\n var value = '';\n var style = (0, _utils.getStyle)({\n columnDef: column,\n scrollWidth: 0\n });\n\n if ((0, _typeof2[\"default\"])(summaryColumn) === 'object' && summaryColumn !== null) {\n value = summaryColumn.value;\n style = summaryColumn.style;\n } else {\n value = summaryColumn;\n }\n\n return /*#__PURE__*/React.createElement(_TableCell2[\"default\"], {\n key: index,\n style: style,\n align: cellAlignment\n }, value);\n }), placeholderRightColumns);\n}\n\nMTableSummaryRow.propTypes = {\n data: _propTypes[\"default\"].array,\n currentData: _propTypes[\"default\"].array,\n columns: _propTypes[\"default\"].array,\n renderSummaryRow: _propTypes[\"default\"].func\n};\n\nvar styles = function styles(theme) {\n return {};\n};\n\nexports.styles = styles;\n\nvar _default = (0, _styles.withStyles)(styles)(MTableSummaryRow);\n\nexports[\"default\"] = _default;","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.MTableToolbar = MTableToolbar;\nexports[\"default\"] = exports.styles = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _slicedToArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/slicedToArray\"));\n\nvar _Checkbox = _interopRequireDefault(require(\"@material-ui/core/Checkbox\"));\n\nvar _InputAdornment = _interopRequireDefault(require(\"@material-ui/core/InputAdornment\"));\n\nvar _IconButton = _interopRequireDefault(require(\"@material-ui/core/IconButton\"));\n\nvar _Menu = _interopRequireDefault(require(\"@material-ui/core/Menu\"));\n\nvar _MenuItem = _interopRequireDefault(require(\"@material-ui/core/MenuItem\"));\n\nvar _TextField = _interopRequireDefault(require(\"@material-ui/core/TextField\"));\n\nvar _Toolbar = _interopRequireDefault(require(\"@material-ui/core/Toolbar\"));\n\nvar _Tooltip = _interopRequireDefault(require(\"@material-ui/core/Tooltip\"));\n\nvar _Typography = _interopRequireDefault(require(\"@material-ui/core/Typography\"));\n\nvar _styles = require(\"@material-ui/core/styles\");\n\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _react = _interopRequireWildcard(require(\"react\"));\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2[\"default\"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nvar searchTimer;\n\nfunction MTableToolbar(props) {\n var _useState = (0, _react.useState)(props.searchText),\n _useState2 = (0, _slicedToArray2[\"default\"])(_useState, 2),\n searchText = _useState2[0],\n setSearchText = _useState2[1];\n\n var _useState3 = (0, _react.useState)(null),\n _useState4 = (0, _slicedToArray2[\"default\"])(_useState3, 2),\n exportButtonAnchorEl = _useState4[0],\n setExportButtonAnchorEl = _useState4[1];\n\n var _useState5 = (0, _react.useState)(null),\n _useState6 = (0, _slicedToArray2[\"default\"])(_useState5, 2),\n columnsButtonAnchorEl = _useState6[0],\n setColumnsButtonAnchorEl = _useState6[1];\n\n var onSearchChange = function onSearchChange(searchText) {\n setSearchText(searchText);\n props.dataManager.changeSearchText(searchText);\n\n if (!props.isRemoteData) {\n props.onSearchChanged(searchText);\n return;\n }\n\n if (searchTimer) {\n clearTimeout(searchTimer);\n }\n\n searchTimer = setTimeout(function () {\n props.onSearchChanged(searchText);\n searchTimer = null;\n }, props.searchDebounceDelay);\n };\n\n var getTableData = function getTableData() {\n var columns = props.columns.filter(function (columnDef) {\n return (!columnDef.hidden || columnDef[\"export\"] === true) && columnDef.field && columnDef[\"export\"] !== false;\n }).sort(function (a, b) {\n return a.tableData.columnOrder > b.tableData.columnOrder ? 1 : -1;\n });\n var data = (props.exportAllData ? props.data : props.renderData).map(function (rowData) {\n return columns.reduce(function (agg, columnDef) {\n var value;\n /*\n About: column.customExport\n This bit of code checks if prop customExport in column is a function, and if it is then it\n uses that function to transform the data, this is useful in cases where a column contains\n complex objects or array and it needs to be handled before it's passed to the exporter \n to avoid [object Object] output (e.g. to flatten data). \n Please note that it is also possible to transform data within under exportMenu \n using a custom function (exportMenu.exportFunc) for each exporter.\n */\n\n if (typeof columnDef.customExport === 'function') {\n value = columnDef.customExport(rowData);\n } else {\n value = props.getFieldValue(rowData, columnDef);\n }\n\n agg[columnDef.field] = value;\n return agg;\n }, {});\n });\n return [columns, data];\n };\n\n function renderSearch() {\n var localization = _objectSpread(_objectSpread({}, MTableToolbar.defaultProps.localization), props.localization);\n\n if (props.search) {\n return /*#__PURE__*/_react[\"default\"].createElement(_TextField[\"default\"], {\n autoFocus: props.searchAutoFocus,\n className: props.searchFieldAlignment === 'left' && props.showTitle === false ? null : props.classes.searchField,\n value: searchText,\n onChange: function onChange(event) {\n return onSearchChange(event.target.value);\n },\n placeholder: localization.searchPlaceholder,\n variant: props.searchFieldVariant,\n InputProps: {\n startAdornment: /*#__PURE__*/_react[\"default\"].createElement(_InputAdornment[\"default\"], {\n position: \"start\"\n }, /*#__PURE__*/_react[\"default\"].createElement(_Tooltip[\"default\"], {\n title: localization.searchTooltip\n }, /*#__PURE__*/_react[\"default\"].createElement(props.icons.Search, {\n fontSize: \"small\"\n }))),\n endAdornment: /*#__PURE__*/_react[\"default\"].createElement(_InputAdornment[\"default\"], {\n position: \"end\"\n }, /*#__PURE__*/_react[\"default\"].createElement(_IconButton[\"default\"], {\n disabled: !searchText,\n onClick: function onClick() {\n return onSearchChange('');\n },\n \"aria-label\": localization.clearSearchAriaLabel\n }, /*#__PURE__*/_react[\"default\"].createElement(props.icons.ResetSearch, {\n fontSize: \"small\",\n \"aria-label\": \"clear\"\n }))),\n style: props.searchFieldStyle,\n inputProps: {\n 'aria-label': localization.searchAriaLabel\n }\n }\n });\n } else {\n return null;\n }\n }\n\n function renderDefaultActions() {\n var localization = _objectSpread(_objectSpread({}, MTableToolbar.defaultProps.localization), props.localization);\n\n var classes = props.classes;\n return /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n style: {\n display: 'flex'\n }\n }, props.columnsButton && /*#__PURE__*/_react[\"default\"].createElement(\"span\", null, /*#__PURE__*/_react[\"default\"].createElement(_Tooltip[\"default\"], {\n title: localization.showColumnsTitle\n }, /*#__PURE__*/_react[\"default\"].createElement(_IconButton[\"default\"], {\n color: \"inherit\",\n onClick: function onClick(event) {\n return setColumnsButtonAnchorEl(event.currentTarget);\n },\n \"aria-label\": localization.showColumnsAriaLabel\n }, /*#__PURE__*/_react[\"default\"].createElement(props.icons.ViewColumn, null))), /*#__PURE__*/_react[\"default\"].createElement(_Menu[\"default\"], {\n anchorEl: columnsButtonAnchorEl,\n open: Boolean(columnsButtonAnchorEl),\n onClose: function onClose() {\n return setColumnsButtonAnchorEl(null);\n }\n }, /*#__PURE__*/_react[\"default\"].createElement(_MenuItem[\"default\"], {\n key: 'text',\n disabled: true,\n style: {\n opacity: 1,\n fontWeight: 600,\n fontSize: 12\n }\n }, localization.addRemoveColumns), props.columns.map(function (col) {\n var hiddenFromColumnsButtonMenu = col.hiddenByColumnsButton !== undefined ? col.hiddenByColumnsButton : props.columnsHiddenInColumnsButton;\n\n if (hiddenFromColumnsButtonMenu) {\n return null;\n }\n\n return /*#__PURE__*/_react[\"default\"].createElement(\"li\", {\n key: col.tableData.id\n }, /*#__PURE__*/_react[\"default\"].createElement(_MenuItem[\"default\"], {\n className: classes.formControlLabel,\n component: \"label\",\n htmlFor: \"column-toggle-\".concat(col.tableData.id),\n disabled: col.removable === false\n }, /*#__PURE__*/_react[\"default\"].createElement(_Checkbox[\"default\"], {\n checked: !col.hidden,\n id: \"column-toggle-\".concat(col.tableData.id),\n onChange: function onChange() {\n return props.onColumnsChanged(col, !col.hidden);\n }\n }), /*#__PURE__*/_react[\"default\"].createElement(\"span\", null, col.title)));\n }))), props.exportMenu.length > 0 && /*#__PURE__*/_react[\"default\"].createElement(\"span\", null, /*#__PURE__*/_react[\"default\"].createElement(_Tooltip[\"default\"], {\n title: localization.exportTitle\n }, /*#__PURE__*/_react[\"default\"].createElement(_IconButton[\"default\"], {\n color: \"inherit\",\n onClick: function onClick(event) {\n return setExportButtonAnchorEl(event.currentTarget);\n },\n \"aria-label\": localization.exportAriaLabel\n }, /*#__PURE__*/_react[\"default\"].createElement(props.icons.Export, null))), /*#__PURE__*/_react[\"default\"].createElement(_Menu[\"default\"], {\n anchorEl: exportButtonAnchorEl,\n open: Boolean(exportButtonAnchorEl),\n onClose: function onClose() {\n return setExportButtonAnchorEl(null);\n }\n }, props.exportMenu.map(function (menuitem, index) {\n var _getTableData = getTableData(),\n _getTableData2 = (0, _slicedToArray2[\"default\"])(_getTableData, 2),\n cols = _getTableData2[0],\n datas = _getTableData2[1];\n\n return /*#__PURE__*/_react[\"default\"].createElement(_MenuItem[\"default\"], {\n key: \"\".concat(menuitem.label).concat(index),\n onClick: function onClick() {\n menuitem.exportFunc(cols, datas, {\n searchedData: props.dataManager.searchedData,\n filteredData: props.dataManager.filteredData,\n groupedData: props.dataManager.groupedData\n });\n setExportButtonAnchorEl(null);\n }\n }, menuitem.label);\n }))), /*#__PURE__*/_react[\"default\"].createElement(\"span\", null, /*#__PURE__*/_react[\"default\"].createElement(props.components.Actions, {\n actions: props.actions && props.actions.filter(function (a) {\n return a.position === 'toolbar';\n }),\n components: props.components\n })));\n }\n\n function renderSelectedActions() {\n return /*#__PURE__*/_react[\"default\"].createElement(_react[\"default\"].Fragment, null, /*#__PURE__*/_react[\"default\"].createElement(props.components.Actions, {\n actions: props.actions.filter(function (a) {\n return a.position === 'toolbarOnSelect';\n }),\n data: props.selectedRows,\n components: props.components\n }));\n }\n\n function renderActions() {\n var classes = props.classes;\n return /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n className: classes.actions\n }, /*#__PURE__*/_react[\"default\"].createElement(\"div\", null, props.selectedRows && props.selectedRows.length > 0 ? renderSelectedActions() : renderDefaultActions()));\n }\n\n function renderToolbarTitle(title) {\n var classes = props.classes;\n var toolBarTitle = // eslint-disable-next-line multiline-ternary\n typeof title === 'string' ? /*#__PURE__*/_react[\"default\"].createElement(_Typography[\"default\"], {\n variant: \"h6\",\n style: {\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis'\n }\n }, title) : title;\n return /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n className: classes.title\n }, toolBarTitle);\n }\n\n function render() {\n var classes = props.classes;\n\n var localization = _objectSpread(_objectSpread({}, MTableToolbar.defaultProps.localization), props.localization);\n\n var title = props.showTextRowsSelected && props.selectedRows && props.selectedRows.length > 0 ? typeof localization.nRowsSelected === 'function' ? localization.nRowsSelected(props.selectedRows.length) : localization.nRowsSelected.replace('{0}', props.selectedRows.length) : props.showTitle ? props.title : null;\n return /*#__PURE__*/_react[\"default\"].createElement(_Toolbar[\"default\"], {\n ref: props.forwardedRef,\n className: (0, _classnames[\"default\"])(classes.root, (0, _defineProperty2[\"default\"])({}, classes.highlight, props.showTextRowsSelected && props.selectedRows && props.selectedRows.length > 0))\n }, title && renderToolbarTitle(title), props.searchFieldAlignment === 'left' && renderSearch(), props.toolbarButtonAlignment === 'left' && renderActions(), /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n className: classes.spacer\n }), props.searchFieldAlignment === 'right' && renderSearch(), props.toolbarButtonAlignment === 'right' && renderActions());\n }\n\n return render();\n}\n\nMTableToolbar.defaultProps = {\n actions: [],\n columns: [],\n columnsHiddenInColumnsButton: false,\n // By default, all columns are shown in the Columns Button (columns action when `options.columnsButton = true`)\n columnsButton: false,\n localization: {\n addRemoveColumns: 'Add or remove columns',\n nRowsSelected: '{0} row(s) selected',\n showColumnsTitle: 'Show Columns',\n showColumnsAriaLabel: 'Show Columns',\n exportTitle: 'Export',\n exportAriaLabel: 'Export',\n searchTooltip: 'Search',\n searchPlaceholder: 'Search',\n searchAriaLabel: 'Search',\n clearSearchAriaLabel: 'Clear Search'\n },\n search: true,\n showTitle: true,\n searchText: '',\n showTextRowsSelected: true,\n toolbarButtonAlignment: 'right',\n searchAutoFocus: false,\n searchFieldAlignment: 'right',\n searchFieldVariant: 'standard',\n selectedRows: [],\n title: 'No Title!'\n};\nMTableToolbar.propTypes = {\n actions: _propTypes[\"default\"].array,\n columns: _propTypes[\"default\"].array,\n columnsButton: _propTypes[\"default\"].bool,\n components: _propTypes[\"default\"].object.isRequired,\n getFieldValue: _propTypes[\"default\"].func.isRequired,\n localization: _propTypes[\"default\"].object.isRequired,\n onColumnsChanged: _propTypes[\"default\"].func.isRequired,\n dataManager: _propTypes[\"default\"].object.isRequired,\n searchText: _propTypes[\"default\"].string,\n onSearchChanged: _propTypes[\"default\"].func.isRequired,\n search: _propTypes[\"default\"].bool.isRequired,\n searchFieldStyle: _propTypes[\"default\"].object,\n searchFieldVariant: _propTypes[\"default\"].string,\n selectedRows: _propTypes[\"default\"].array,\n title: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].string]),\n showTitle: _propTypes[\"default\"].bool.isRequired,\n showTextRowsSelected: _propTypes[\"default\"].bool.isRequired,\n toolbarButtonAlignment: _propTypes[\"default\"].string.isRequired,\n searchFieldAlignment: _propTypes[\"default\"].string.isRequired,\n renderData: _propTypes[\"default\"].array,\n data: _propTypes[\"default\"].array,\n exportAllData: _propTypes[\"default\"].bool,\n exportMenu: _propTypes[\"default\"].arrayOf(_propTypes[\"default\"].shape({\n name: _propTypes[\"default\"].string,\n handler: _propTypes[\"default\"].func\n })),\n classes: _propTypes[\"default\"].object,\n searchAutoFocus: _propTypes[\"default\"].bool\n};\n\nvar styles = function styles(theme) {\n return {\n root: {\n paddingRight: theme.spacing(1),\n paddingLeft: theme.spacing(2)\n },\n highlight: theme.palette.type === 'light' ? {\n color: theme.palette.secondary.main,\n backgroundColor: (0, _styles.lighten)(theme.palette.secondary.light, 0.85)\n } : {\n color: theme.palette.text.primary,\n backgroundColor: theme.palette.secondary.dark\n },\n spacer: {\n flex: '1 1 10%'\n },\n actions: {\n color: theme.palette.text.secondary\n },\n title: {\n overflow: 'hidden'\n },\n searchField: {\n minWidth: 150,\n paddingLeft: theme.spacing(2)\n },\n formControlLabel: {\n paddingLeft: theme.spacing(1),\n paddingRight: theme.spacing(1)\n }\n };\n};\n\nexports.styles = styles;\n\nvar MTableToolbarRef = /*#__PURE__*/_react[\"default\"].forwardRef(function MTableToolbarRef(props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(MTableToolbar, (0, _extends2[\"default\"])({}, props, {\n forwardedRef: ref\n }));\n});\n\nvar _default = (0, _styles.withStyles)(styles, {\n name: 'MTableToolbar'\n})(MTableToolbarRef);\n\nexports[\"default\"] = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nfunction OverlayError(props) {\n return /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n ref: props.forwardedRef,\n style: {\n display: 'table',\n width: '100%',\n height: '100%',\n backgroundColor: props.theme.palette.background.paper,\n opacity: 0.7\n }\n }, /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n style: {\n display: 'table-cell',\n width: '100%',\n height: '100%',\n verticalAlign: 'middle',\n textAlign: 'center'\n }\n }, /*#__PURE__*/_react[\"default\"].createElement(\"span\", null, props.error.message), ' ', /*#__PURE__*/_react[\"default\"].createElement(props.icon, {\n onClick: props.retry,\n style: {\n cursor: 'pointer',\n position: 'relative',\n top: 5\n }\n })));\n}\n\nOverlayError.propTypes = {\n error: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].object, _propTypes[\"default\"].string]),\n retry: _propTypes[\"default\"].func,\n theme: _propTypes[\"default\"].any,\n icon: _propTypes[\"default\"].any\n};\n\nvar _default = /*#__PURE__*/_react[\"default\"].forwardRef(function OverlayErrorRef(props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(OverlayError, (0, _extends2[\"default\"])({}, props, {\n forwardedRef: ref\n }));\n});\n\nexports[\"default\"] = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _CircularProgress2 = _interopRequireDefault(require(\"@material-ui/core/CircularProgress\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nfunction OverlayLoading(props) {\n return /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n ref: props.forwardedRef,\n style: {\n display: 'table',\n width: '100%',\n height: '100%',\n backgroundColor: props.theme.palette.background.paper,\n opacity: 0.7\n }\n }, /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n style: {\n display: 'table-cell',\n width: '100%',\n height: '100%',\n verticalAlign: 'middle',\n textAlign: 'center'\n }\n }, /*#__PURE__*/_react[\"default\"].createElement(_CircularProgress2[\"default\"], null)));\n}\n\nOverlayLoading.propTypes = {\n theme: _propTypes[\"default\"].any\n};\n\nvar _default = /*#__PURE__*/_react[\"default\"].forwardRef(function OverlayLoadingRef(props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(OverlayLoading, (0, _extends2[\"default\"])({}, props, {\n forwardedRef: ref\n }));\n});\n\nexports[\"default\"] = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"OverlayLoading\", {\n enumerable: true,\n get: function get() {\n return _OverlayLoading[\"default\"];\n }\n});\nObject.defineProperty(exports, \"OverlayError\", {\n enumerable: true,\n get: function get() {\n return _OverlayError[\"default\"];\n }\n});\nObject.defineProperty(exports, \"Container\", {\n enumerable: true,\n get: function get() {\n return _Container[\"default\"];\n }\n});\nObject.defineProperty(exports, \"MTableScrollbar\", {\n enumerable: true,\n get: function get() {\n return _MTableScrollbar[\"default\"];\n }\n});\nObject.defineProperty(exports, \"MTableBody\", {\n enumerable: true,\n get: function get() {\n return _mTableBody[\"default\"];\n }\n});\nObject.defineProperty(exports, \"MTableEditField\", {\n enumerable: true,\n get: function get() {\n return _mTableEditField[\"default\"];\n }\n});\nObject.defineProperty(exports, \"MTableEditCell\", {\n enumerable: true,\n get: function get() {\n return _mTableEditCell[\"default\"];\n }\n});\nObject.defineProperty(exports, \"MTableAction\", {\n enumerable: true,\n get: function get() {\n return _MTableAction[\"default\"];\n }\n});\nObject.defineProperty(exports, \"MTableActions\", {\n enumerable: true,\n get: function get() {\n return _MTableActions[\"default\"];\n }\n});\nObject.defineProperty(exports, \"MTableBodyRow\", {\n enumerable: true,\n get: function get() {\n return _MTableBodyRow[\"default\"];\n }\n});\nObject.defineProperty(exports, \"MTableCell\", {\n enumerable: true,\n get: function get() {\n return _MTableCell[\"default\"];\n }\n});\nObject.defineProperty(exports, \"MTableCustomIcon\", {\n enumerable: true,\n get: function get() {\n return _MTableCustomIcon[\"default\"];\n }\n});\nObject.defineProperty(exports, \"MTableEditRow\", {\n enumerable: true,\n get: function get() {\n return _MTableEditRow[\"default\"];\n }\n});\nObject.defineProperty(exports, \"MTableFilterRow\", {\n enumerable: true,\n get: function get() {\n return _MTableFilterRow[\"default\"];\n }\n});\nObject.defineProperty(exports, \"MTableGroupbar\", {\n enumerable: true,\n get: function get() {\n return _MTableGroupbar[\"default\"];\n }\n});\nObject.defineProperty(exports, \"MTableGroupRow\", {\n enumerable: true,\n get: function get() {\n return _MTableGroupRow[\"default\"];\n }\n});\nObject.defineProperty(exports, \"MTableHeader\", {\n enumerable: true,\n get: function get() {\n return _MTableHeader[\"default\"];\n }\n});\nObject.defineProperty(exports, \"MTableSteppedPagination\", {\n enumerable: true,\n get: function get() {\n return _MTableSteppedPaginationInner[\"default\"];\n }\n});\nObject.defineProperty(exports, \"MTablePagination\", {\n enumerable: true,\n get: function get() {\n return _MTablePagination[\"default\"];\n }\n});\nObject.defineProperty(exports, \"MTableSummaryRow\", {\n enumerable: true,\n get: function get() {\n return _MTableSummaryRow[\"default\"];\n }\n});\nObject.defineProperty(exports, \"MTableToolbar\", {\n enumerable: true,\n get: function get() {\n return _MTableToolbar[\"default\"];\n }\n});\n\nvar _OverlayLoading = _interopRequireDefault(require(\"./Overlay/OverlayLoading.js\"));\n\nvar _OverlayError = _interopRequireDefault(require(\"./Overlay/OverlayError.js\"));\n\nvar _Container = _interopRequireDefault(require(\"./Container\"));\n\nvar _MTableScrollbar = _interopRequireDefault(require(\"./MTableScrollbar\"));\n\nvar _mTableBody = _interopRequireDefault(require(\"./m-table-body\"));\n\nvar _mTableEditField = _interopRequireDefault(require(\"./m-table-edit-field\"));\n\nvar _mTableEditCell = _interopRequireDefault(require(\"./m-table-edit-cell\"));\n\nvar _MTableAction = _interopRequireDefault(require(\"./MTableAction\"));\n\nvar _MTableActions = _interopRequireDefault(require(\"./MTableActions\"));\n\nvar _MTableBodyRow = _interopRequireDefault(require(\"./MTableBodyRow\"));\n\nvar _MTableCell = _interopRequireDefault(require(\"./MTableCell\"));\n\nvar _MTableCustomIcon = _interopRequireDefault(require(\"./MTableCustomIcon\"));\n\nvar _MTableEditRow = _interopRequireDefault(require(\"./MTableEditRow\"));\n\nvar _MTableFilterRow = _interopRequireDefault(require(\"./MTableFilterRow\"));\n\nvar _MTableGroupbar = _interopRequireDefault(require(\"./MTableGroupbar\"));\n\nvar _MTableGroupRow = _interopRequireDefault(require(\"./MTableGroupRow\"));\n\nvar _MTableHeader = _interopRequireDefault(require(\"./MTableHeader\"));\n\nvar _MTableSteppedPaginationInner = _interopRequireDefault(require(\"./MTableSteppedPaginationInner\"));\n\nvar _MTablePagination = _interopRequireDefault(require(\"./MTablePagination\"));\n\nvar _MTableSummaryRow = _interopRequireDefault(require(\"./MTableSummaryRow\"));\n\nvar _MTableToolbar = _interopRequireDefault(require(\"./MTableToolbar\"));","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _TableBody2 = _interopRequireDefault(require(\"@material-ui/core/TableBody\"));\n\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\n\nvar _TableRow2 = _interopRequireDefault(require(\"@material-ui/core/TableRow\"));\n\nvar _TableCell2 = _interopRequireDefault(require(\"@material-ui/core/TableCell\"));\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\n\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\n\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inherits\"));\n\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime/helpers/possibleConstructorReturn\"));\n\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime/helpers/getPrototypeOf\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2[\"default\"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2[\"default\"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2[\"default\"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2[\"default\"])(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nvar MTableBody = /*#__PURE__*/function (_React$Component) {\n (0, _inherits2[\"default\"])(MTableBody, _React$Component);\n\n var _super = _createSuper(MTableBody);\n\n function MTableBody() {\n (0, _classCallCheck2[\"default\"])(this, MTableBody);\n return _super.apply(this, arguments);\n }\n\n (0, _createClass2[\"default\"])(MTableBody, [{\n key: \"renderEmpty\",\n value: function renderEmpty(emptyRowCount, renderData) {\n var rowHeight = this.props.options.padding === 'default' ? 49 : 36;\n\n var localization = _objectSpread(_objectSpread({}, MTableBody.defaultProps.localization), this.props.localization);\n\n if (this.props.options.showEmptyDataSourceMessage && renderData.length === 0) {\n var addColumn = 0;\n\n if (this.props.options.selection) {\n addColumn++;\n }\n\n if (this.props.actions && this.props.actions.filter(function (a) {\n return a.position === 'row' || typeof a === 'function';\n }).length > 0) {\n addColumn++;\n }\n\n if (this.props.hasDetailPanel) {\n addColumn++;\n }\n\n if (this.props.isTreeData) {\n addColumn++;\n }\n\n return /*#__PURE__*/_react[\"default\"].createElement(_TableRow2[\"default\"], {\n style: {\n height: rowHeight * (this.props.options.paging && this.props.options.emptyRowsWhenPaging ? this.props.pageSize : 1)\n },\n key: 'empty-' + 0\n }, /*#__PURE__*/_react[\"default\"].createElement(_TableCell2[\"default\"], {\n style: {\n paddingTop: 0,\n paddingBottom: 0,\n textAlign: 'center'\n },\n colSpan: this.props.columns.reduce(function (currentVal, columnDef) {\n return columnDef.hidden ? currentVal : currentVal + 1;\n }, addColumn),\n key: \"empty-\"\n }, localization.emptyDataSourceMessage));\n } else if (this.props.options.emptyRowsWhenPaging) {\n return /*#__PURE__*/_react[\"default\"].createElement(_react[\"default\"].Fragment, null, (0, _toConsumableArray2[\"default\"])(Array(emptyRowCount)).map(function (r, index) {\n return /*#__PURE__*/_react[\"default\"].createElement(_TableRow2[\"default\"], {\n style: {\n height: rowHeight\n },\n key: 'empty-' + index\n });\n }), emptyRowCount > 0 && /*#__PURE__*/_react[\"default\"].createElement(_TableRow2[\"default\"], {\n style: {\n height: 1\n },\n key: 'empty-last1'\n }));\n }\n }\n }, {\n key: \"renderUngroupedRows\",\n value: function renderUngroupedRows(renderData) {\n var _this = this;\n\n return renderData.map(function (data, index) {\n if (data.tableData.editing || _this.props.bulkEditOpen) {\n return /*#__PURE__*/_react[\"default\"].createElement(_this.props.components.EditRow, {\n columns: _this.props.columns.filter(function (columnDef) {\n return !columnDef.hidden;\n }),\n components: _this.props.components,\n data: data,\n errorState: _this.props.errorState,\n icons: _this.props.icons,\n localization: _objectSpread(_objectSpread(_objectSpread({}, MTableBody.defaultProps.localization.editRow), _this.props.localization.editRow), {}, {\n dateTimePickerLocalization: _this.props.localization.dateTimePickerLocalization\n }),\n key: 'row-' + data.tableData.uuid,\n mode: _this.props.bulkEditOpen ? 'bulk' : data.tableData.editing,\n options: _this.props.options,\n isTreeData: _this.props.isTreeData,\n detailPanel: _this.props.detailPanel,\n onEditingCanceled: _this.props.onEditingCanceled,\n onEditingApproved: _this.props.onEditingApproved,\n bulkEditChangedRows: _this.props.bulkEditChangedRows,\n getFieldValue: _this.props.getFieldValue,\n onBulkEditRowChanged: _this.props.onBulkEditRowChanged,\n scrollWidth: _this.props.scrollWidth\n });\n } else {\n // Treeified data is using the uuid, while the grouped data used the index\n var path = _this.props.isTreeData ? [data.tableData.uuid] : [index + _this.props.pageSize * _this.props.currentPage];\n return /*#__PURE__*/_react[\"default\"].createElement(_this.props.components.Row, {\n components: _this.props.components,\n icons: _this.props.icons,\n data: data,\n index: index,\n errorState: _this.props.errorState,\n key: 'row-' + data.tableData.uuid,\n level: 0,\n options: _this.props.options,\n localization: _objectSpread(_objectSpread(_objectSpread({}, MTableBody.defaultProps.localization.editRow), _this.props.localization.editRow), {}, {\n dateTimePickerLocalization: _this.props.localization.dateTimePickerLocalization\n }),\n onRowSelected: _this.props.onRowSelected,\n actions: _this.props.actions,\n columns: _this.props.columns,\n getFieldValue: _this.props.getFieldValue,\n detailPanel: _this.props.detailPanel,\n path: path,\n onToggleDetailPanel: _this.props.onToggleDetailPanel,\n onRowClick: _this.props.onRowClick,\n onRowDoubleClick: _this.props.onRowDoubleClick,\n isTreeData: _this.props.isTreeData,\n onTreeExpandChanged: _this.props.onTreeExpandChanged,\n onEditingCanceled: _this.props.onEditingCanceled,\n onEditingApproved: _this.props.onEditingApproved,\n hasAnyEditingRow: _this.props.hasAnyEditingRow,\n treeDataMaxLevel: _this.props.treeDataMaxLevel,\n cellEditable: _this.props.cellEditable,\n onCellEditStarted: _this.props.onCellEditStarted,\n onCellEditFinished: _this.props.onCellEditFinished,\n scrollWidth: _this.props.scrollWidth\n });\n }\n });\n }\n }, {\n key: \"renderGroupedRows\",\n value: function renderGroupedRows(groups, renderData) {\n var _this2 = this;\n\n return renderData.map(function (groupData, index) {\n return /*#__PURE__*/_react[\"default\"].createElement(_this2.props.components.GroupRow, {\n actions: _this2.props.actions,\n cellEditable: _this2.props.cellEditable,\n columns: _this2.props.columns,\n components: _this2.props.components,\n detailPanel: _this2.props.detailPanel,\n getFieldValue: _this2.props.getFieldValue,\n groupData: groupData,\n groups: groups,\n hasAnyEditingRow: _this2.props.hasAnyEditingRow,\n icons: _this2.props.icons,\n isTreeData: _this2.props.isTreeData,\n key: groupData.value == null ? '' + index : groupData.value,\n level: 0,\n localization: _objectSpread(_objectSpread(_objectSpread({}, MTableBody.defaultProps.localization.editRow), _this2.props.localization.editRow), {}, {\n dateTimePickerLocalization: _this2.props.localization.dateTimePickerLocalization\n }),\n onBulkEditRowChanged: _this2.props.onBulkEditRowChanged,\n onCellEditFinished: _this2.props.onCellEditFinished,\n onCellEditStarted: _this2.props.onCellEditStarted,\n onEditingApproved: _this2.props.onEditingApproved,\n onEditingCanceled: _this2.props.onEditingCanceled,\n onGroupExpandChanged: _this2.props.onGroupExpandChanged,\n onRowClick: _this2.props.onRowClick,\n onGroupSelected: _this2.props.onGroupSelected,\n onRowSelected: _this2.props.onRowSelected,\n onToggleDetailPanel: _this2.props.onToggleDetailPanel,\n onTreeExpandChanged: _this2.props.onTreeExpandChanged,\n options: _this2.props.options,\n path: [index + _this2.props.pageSize * _this2.props.currentPage],\n scrollWidth: _this2.props.scrollWidth,\n treeDataMaxLevel: _this2.props.treeDataMaxLevel\n });\n });\n }\n }, {\n key: \"renderAddRow\",\n value: function renderAddRow() {\n return this.props.showAddRow && /*#__PURE__*/_react[\"default\"].createElement(this.props.components.EditRow, {\n columns: this.props.columns.filter(function (columnDef) {\n return !columnDef.hidden;\n }),\n components: this.props.components,\n data: this.props.initialFormData,\n detailPanel: this.props.detailPanel,\n errorState: this.props.errorState,\n getFieldValue: this.props.getFieldValue,\n icons: this.props.icons,\n isTreeData: this.props.isTreeData,\n key: \"key-add-row\",\n localization: _objectSpread(_objectSpread(_objectSpread({}, MTableBody.defaultProps.localization.editRow), this.props.localization.editRow), {}, {\n dateTimePickerLocalization: this.props.localization.dateTimePickerLocalization\n }),\n mode: \"add\",\n onEditingApproved: this.props.onEditingApproved,\n onEditingCanceled: this.props.onEditingCanceled,\n options: this.props.options,\n scrollWidth: this.props.scrollWidth\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var renderData = this.props.renderData;\n var groups = this.props.columns.filter(function (col) {\n return col.tableData.groupOrder > -1;\n }).sort(function (col1, col2) {\n return col1.tableData.groupOrder - col2.tableData.groupOrder;\n });\n var emptyRowCount = 0;\n\n if (this.props.options.paging && this.props.pageSize > renderData.length) {\n emptyRowCount = this.props.pageSize - renderData.length;\n }\n\n var columns = this.props.columns.filter(function (columnDef) {\n return !columnDef.hidden;\n });\n return /*#__PURE__*/_react[\"default\"].createElement(_TableBody2[\"default\"], null, this.props.options.filtering && /*#__PURE__*/_react[\"default\"].createElement(this.props.components.FilterRow, {\n columns: columns,\n icons: this.props.icons,\n showDetailPanelIcon: this.props.options.showDetailPanelIcon,\n hasActions: this.props.actions.filter(function (a) {\n return a.position === 'row' || typeof a === 'function';\n }).length > 0,\n actionsColumnIndex: this.props.options.actionsColumnIndex,\n onFilterChanged: this.props.onFilterChanged,\n selection: this.props.options.selection,\n localization: _objectSpread(_objectSpread(_objectSpread({}, MTableBody.defaultProps.localization.filterRow), this.props.localization.filterRow), {}, {\n dateTimePickerLocalization: this.props.localization.dateTimePickerLocalization\n }),\n hasDetailPanel: !!this.props.detailPanel,\n detailPanelColumnAlignment: this.props.options.detailPanelColumnAlignment,\n isTreeData: this.props.isTreeData,\n filterCellStyle: this.props.options.filterCellStyle,\n filterRowStyle: this.props.options.filterRowStyle,\n hideFilterIcons: this.props.options.hideFilterIcons,\n scrollWidth: this.props.scrollWidth\n }), this.props.options.addRowPosition === 'first' && this.renderAddRow(), groups.length > 0 ? this.renderGroupedRows(groups, renderData) : this.renderUngroupedRows(renderData), this.props.options.addRowPosition === 'last' && this.renderAddRow(), /*#__PURE__*/_react[\"default\"].createElement(this.props.components.SummaryRow, {\n currentData: renderData,\n columns: columns,\n data: this.props.data,\n renderSummaryRow: this.props.renderSummaryRow,\n rowProps: this.props\n }), this.renderEmpty(emptyRowCount, renderData));\n }\n }]);\n return MTableBody;\n}(_react[\"default\"].Component);\n\nMTableBody.defaultProps = {\n actions: [],\n currentPage: 0,\n data: [],\n localization: {\n editRow: {},\n emptyDataSourceMessage: 'No records to display',\n filterRow: {}\n },\n pageSize: 5,\n renderData: [],\n selection: false\n};\nMTableBody.propTypes = {\n actions: _propTypes[\"default\"].array,\n bulkEditChangedRows: _propTypes[\"default\"].object,\n bulkEditOpen: _propTypes[\"default\"].bool,\n cellEditable: _propTypes[\"default\"].object,\n columns: _propTypes[\"default\"].array.isRequired,\n components: _propTypes[\"default\"].object.isRequired,\n currentPage: _propTypes[\"default\"].number,\n data: _propTypes[\"default\"].array,\n detailPanel: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].func, _propTypes[\"default\"].arrayOf(_propTypes[\"default\"].oneOfType([_propTypes[\"default\"].object, _propTypes[\"default\"].func]))]),\n errorState: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].object, _propTypes[\"default\"].bool]),\n getFieldValue: _propTypes[\"default\"].func.isRequired,\n hasAnyEditingRow: _propTypes[\"default\"].bool,\n hasDetailPanel: _propTypes[\"default\"].bool.isRequired,\n icons: _propTypes[\"default\"].object.isRequired,\n initialFormData: _propTypes[\"default\"].object,\n isTreeData: _propTypes[\"default\"].bool.isRequired,\n localization: _propTypes[\"default\"].object,\n onBulkEditRowChanged: _propTypes[\"default\"].func,\n onCellEditFinished: _propTypes[\"default\"].func,\n onCellEditStarted: _propTypes[\"default\"].func,\n onEditingApproved: _propTypes[\"default\"].func,\n onEditingCanceled: _propTypes[\"default\"].func,\n onFilterChanged: _propTypes[\"default\"].func,\n onGroupExpandChanged: _propTypes[\"default\"].func,\n onRowClick: _propTypes[\"default\"].func,\n onRowDoubleClick: _propTypes[\"default\"].func,\n onGroupSelected: _propTypes[\"default\"].func,\n onRowSelected: _propTypes[\"default\"].func,\n onToggleDetailPanel: _propTypes[\"default\"].func.isRequired,\n onTreeExpandChanged: _propTypes[\"default\"].func.isRequired,\n options: _propTypes[\"default\"].object.isRequired,\n pageSize: _propTypes[\"default\"].number,\n renderData: _propTypes[\"default\"].array,\n renderSummaryRow: _propTypes[\"default\"].func,\n scrollWidth: _propTypes[\"default\"].number.isRequired,\n selection: _propTypes[\"default\"].bool.isRequired,\n showAddRow: _propTypes[\"default\"].bool,\n treeDataMaxLevel: _propTypes[\"default\"].number\n};\nvar _default = MTableBody;\nexports[\"default\"] = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.MTableDetailPanel = MTableDetailPanel;\n\nvar _TableRow2 = _interopRequireDefault(require(\"@material-ui/core/TableRow\"));\n\nvar _Collapse2 = _interopRequireDefault(require(\"@material-ui/core/Collapse\"));\n\nvar _TableCell2 = _interopRequireDefault(require(\"@material-ui/core/TableCell\"));\n\nvar _slicedToArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/slicedToArray\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nfunction MTableDetailPanel(props) {\n var _React$useState = _react[\"default\"].useState(false),\n _React$useState2 = (0, _slicedToArray2[\"default\"])(_React$useState, 2),\n isOpen = _React$useState2[0],\n setOpen = _React$useState2[1];\n\n var _React$useReducer = _react[\"default\"].useReducer(function (s) {\n return s + 1;\n }, 0),\n _React$useReducer2 = (0, _slicedToArray2[\"default\"])(_React$useReducer, 2),\n rerender = _React$useReducer2[1];\n\n var renderRef = _react[\"default\"].useRef();\n\n _react[\"default\"].useEffect(function () {\n var shouldOpen = Boolean(props.data.tableData && props.data.tableData.showDetailPanel);\n setTimeout(function () {\n setOpen(shouldOpen);\n }, 5);\n }, [props.data.tableData.showDetailPanel]);\n\n var renderFunction; // See issue #282 for more on why we have to check for the existence of props.detailPanel\n\n if (!props.detailPanel) {\n return /*#__PURE__*/_react[\"default\"].createElement(_react[\"default\"].Fragment, null);\n } else {\n if (typeof props.detailPanel === 'function') {\n renderFunction = props.detailPanel;\n } else {\n renderFunction = props.detailPanel ? props.detailPanel.map(function (panel) {\n return typeof panel === 'function' ? panel(props.data) : panel;\n }).find(function (panel) {\n return panel.render.toString() === (props.data.tableData.showDetailPanel || '').toString();\n }) : undefined;\n renderFunction = renderFunction ? renderFunction.render : null;\n }\n }\n\n _react[\"default\"].useEffect(function () {\n if (renderFunction && isOpen) {\n renderRef.current = renderFunction;\n }\n });\n\n if (!renderRef.current && !props.data.tableData.showDetailPanel) {\n return null;\n }\n\n var Render = renderFunction || renderRef.current;\n return /*#__PURE__*/_react[\"default\"].createElement(_TableRow2[\"default\"], null, props.options.detailPanelOffset.left > 0 && /*#__PURE__*/_react[\"default\"].createElement(_TableCell2[\"default\"], {\n colSpan: props.options.detailPanelOffset.left\n }), /*#__PURE__*/_react[\"default\"].createElement(_TableCell2[\"default\"], {\n size: props.size,\n colSpan: props.renderColumns.length - props.options.detailPanelOffset.left - props.options.detailPanelOffset.right,\n padding: \"none\"\n }, /*#__PURE__*/_react[\"default\"].createElement(_Collapse2[\"default\"], {\n \"in\": isOpen,\n timeout: \"auto\",\n unmountOnExit: true,\n mountOnEnter: true,\n onExited: function onExited() {\n renderRef.current = undefined;\n rerender();\n }\n }, Render({\n rowData: props.data\n }))));\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\n\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\n\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime/helpers/assertThisInitialized\"));\n\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inherits\"));\n\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime/helpers/possibleConstructorReturn\"));\n\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime/helpers/getPrototypeOf\"));\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _TableCell = _interopRequireDefault(require(\"@material-ui/core/TableCell\"));\n\nvar _CircularProgress = _interopRequireDefault(require(\"@material-ui/core/CircularProgress\"));\n\nvar _styles = require(\"@material-ui/core/styles\");\n\nvar _validate = require(\"../utils/validate\");\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2[\"default\"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2[\"default\"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2[\"default\"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2[\"default\"])(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nvar MTableEditCell = /*#__PURE__*/function (_React$Component) {\n (0, _inherits2[\"default\"])(MTableEditCell, _React$Component);\n\n var _super = _createSuper(MTableEditCell);\n\n function MTableEditCell(props) {\n var _this;\n\n (0, _classCallCheck2[\"default\"])(this, MTableEditCell);\n _this = _super.call(this, props);\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"getStyle\", function () {\n var cellStyle = {\n boxShadow: '2px 0px 15px rgba(125,147,178,.25)',\n color: 'inherit',\n width: _this.props.columnDef.tableData.width,\n boxSizing: 'border-box',\n fontSize: 'inherit',\n fontFamily: 'inherit',\n fontWeight: 'inherit',\n padding: '0 16px'\n };\n\n if (typeof _this.props.columnDef.cellStyle === 'function') {\n cellStyle = _objectSpread(_objectSpread({}, cellStyle), _this.props.columnDef.cellStyle(_this.state.value, _this.props.rowData));\n } else {\n cellStyle = _objectSpread(_objectSpread({}, cellStyle), _this.props.columnDef.cellStyle);\n }\n\n if (typeof _this.props.cellEditable.cellStyle === 'function') {\n cellStyle = _objectSpread(_objectSpread({}, cellStyle), _this.props.cellEditable.cellStyle(_this.state.value, _this.props.rowData, _this.props.columnDef));\n } else {\n cellStyle = _objectSpread(_objectSpread({}, cellStyle), _this.props.cellEditable.cellStyle);\n }\n\n return cellStyle;\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"handleKeyDown\", function (e) {\n if (e.keyCode === 13) {\n _this.onApprove();\n } else if (e.keyCode === 27) {\n _this.onCancel();\n }\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"onApprove\", function () {\n var isValid = (0, _validate.validateInput)(_this.props.columnDef, _this.state.value).isValid;\n\n if (!isValid) {\n return;\n }\n\n _this.setState({\n isLoading: true\n }, function () {\n _this.props.cellEditable.onCellEditApproved(_this.state.value, // newValue\n _this.props.getFieldValue(_this.props.rowData, _this.props.columnDef), // oldValue\n _this.props.rowData, // rowData with old value\n _this.props.columnDef // columnDef\n ).then(function () {\n _this.setState({\n isLoading: false\n });\n\n _this.props.onCellEditFinished(_this.props.rowData, _this.props.columnDef);\n })[\"catch\"](function (error) {\n _this.setState({\n isLoading: false\n });\n });\n });\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"onCancel\", function () {\n _this.props.onCellEditFinished(_this.props.rowData, _this.props.columnDef);\n });\n _this.state = {\n errorState: {\n isValid: true,\n helperText: ''\n },\n isLoading: false,\n value: props.getFieldValue(_this.props.rowData, _this.props.columnDef, false)\n };\n return _this;\n }\n\n (0, _createClass2[\"default\"])(MTableEditCell, [{\n key: \"renderActions\",\n value: function renderActions() {\n if (this.state.isLoading) {\n return /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n style: {\n display: 'flex',\n justifyContent: 'center',\n width: 60\n }\n }, /*#__PURE__*/_react[\"default\"].createElement(_CircularProgress[\"default\"], {\n size: 20\n }));\n }\n\n var actions = [{\n icon: this.props.icons.Check,\n tooltip: this.props.localization.saveTooltip,\n onClick: this.onApprove,\n disabled: this.state.isLoading || !this.state.errorState.isValid\n }, {\n icon: this.props.icons.Clear,\n tooltip: this.props.localization.cancelTooltip,\n onClick: this.onCancel,\n disabled: this.state.isLoading\n }];\n return /*#__PURE__*/_react[\"default\"].createElement(this.props.components.Actions, {\n actions: actions,\n components: this.props.components,\n size: \"small\"\n });\n }\n }, {\n key: \"handleChange\",\n value: function handleChange(value) {\n var errorState = (0, _validate.validateInput)(this.props.columnDef, value);\n this.setState({\n errorState: errorState,\n value: value\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n return /*#__PURE__*/_react[\"default\"].createElement(_TableCell[\"default\"], {\n size: this.props.size,\n style: this.getStyle(),\n padding: \"none\"\n }, /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n style: {\n display: 'flex',\n alignItems: 'center'\n }\n }, /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n style: {\n flex: 1,\n marginRight: 4\n }\n }, /*#__PURE__*/_react[\"default\"].createElement(this.props.components.EditField, {\n columnDef: this.props.columnDef,\n value: this.state.value,\n error: !this.state.errorState.isValid,\n helperText: this.state.errorState.helperText,\n onChange: function onChange(value) {\n return _this2.handleChange(value);\n },\n onKeyDown: this.handleKeyDown,\n disabled: this.state.isLoading,\n rowData: this.props.rowData,\n autoFocus: true\n })), this.renderActions()));\n }\n }]);\n return MTableEditCell;\n}(_react[\"default\"].Component);\n\nMTableEditCell.defaultProps = {\n columnDef: {},\n localization: {\n saveTooltip: 'Save',\n cancelTooltip: 'Cancel'\n }\n};\nMTableEditCell.propTypes = {\n cellEditable: _propTypes[\"default\"].object.isRequired,\n columnDef: _propTypes[\"default\"].object.isRequired,\n components: _propTypes[\"default\"].object.isRequired,\n errorState: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].object, _propTypes[\"default\"].bool]),\n icons: _propTypes[\"default\"].object.isRequired,\n localization: _propTypes[\"default\"].object.isRequired,\n onCellEditFinished: _propTypes[\"default\"].func.isRequired,\n rowData: _propTypes[\"default\"].object.isRequired,\n size: _propTypes[\"default\"].string,\n getFieldValue: _propTypes[\"default\"].func.isRequired\n};\n\nvar _default = (0, _styles.withTheme)(MTableEditCell);\n\nexports[\"default\"] = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\n\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\n\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\n\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inherits\"));\n\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime/helpers/possibleConstructorReturn\"));\n\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime/helpers/getPrototypeOf\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _TextField = _interopRequireDefault(require(\"@material-ui/core/TextField\"));\n\nvar _Checkbox = _interopRequireDefault(require(\"@material-ui/core/Checkbox\"));\n\nvar _Select = _interopRequireDefault(require(\"@material-ui/core/Select\"));\n\nvar _MenuItem = _interopRequireDefault(require(\"@material-ui/core/MenuItem\"));\n\nvar _FormControl = _interopRequireDefault(require(\"@material-ui/core/FormControl\"));\n\nvar _FormHelperText = _interopRequireDefault(require(\"@material-ui/core/FormHelperText\"));\n\nvar _FormGroup = _interopRequireDefault(require(\"@material-ui/core/FormGroup\"));\n\nvar _FormControlLabel = _interopRequireDefault(require(\"@material-ui/core/FormControlLabel\"));\n\nvar _dateFns = _interopRequireDefault(require(\"@date-io/date-fns\"));\n\nvar _pickers = require(\"@material-ui/pickers\");\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2[\"default\"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2[\"default\"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2[\"default\"])(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nvar MTableEditField = /*#__PURE__*/function (_React$Component) {\n (0, _inherits2[\"default\"])(MTableEditField, _React$Component);\n\n var _super = _createSuper(MTableEditField);\n\n function MTableEditField() {\n (0, _classCallCheck2[\"default\"])(this, MTableEditField);\n return _super.apply(this, arguments);\n }\n\n (0, _createClass2[\"default\"])(MTableEditField, [{\n key: \"getProps\",\n value: function getProps() {\n var _this$props = this.props,\n columnDef = _this$props.columnDef,\n rowData = _this$props.rowData,\n onRowDataChange = _this$props.onRowDataChange,\n errorState = _this$props.errorState,\n autoFocus = _this$props.autoFocus,\n onBulkEditRowChanged = _this$props.onBulkEditRowChanged,\n scrollWidth = _this$props.scrollWidth,\n props = (0, _objectWithoutProperties2[\"default\"])(_this$props, [\"columnDef\", \"rowData\", \"onRowDataChange\", \"errorState\", \"autoFocus\", \"onBulkEditRowChanged\", \"scrollWidth\"]);\n return props;\n }\n }, {\n key: \"renderLookupField\",\n value: function renderLookupField() {\n var _this = this;\n\n var _this$getProps = this.getProps(),\n helperText = _this$getProps.helperText,\n error = _this$getProps.error,\n props = (0, _objectWithoutProperties2[\"default\"])(_this$getProps, [\"helperText\", \"error\"]);\n\n return /*#__PURE__*/_react[\"default\"].createElement(_FormControl[\"default\"], {\n error: Boolean(error)\n }, /*#__PURE__*/_react[\"default\"].createElement(_Select[\"default\"], (0, _extends2[\"default\"])({}, props, {\n value: this.props.value === undefined ? '' : this.props.value,\n onChange: function onChange(event) {\n return _this.props.onChange(event.target.value);\n },\n style: {\n fontSize: 13\n },\n inputProps: {\n autoFocus: this.props.autoFocus\n },\n SelectDisplayProps: {\n 'aria-label': this.props.columnDef.title\n }\n }), Object.keys(this.props.columnDef.lookup).map(function (key) {\n return /*#__PURE__*/_react[\"default\"].createElement(_MenuItem[\"default\"], {\n key: key,\n value: key\n }, _this.props.columnDef.lookup[key]);\n })), Boolean(helperText) && /*#__PURE__*/_react[\"default\"].createElement(_FormHelperText[\"default\"], null, helperText));\n }\n }, {\n key: \"renderBooleanField\",\n value: function renderBooleanField() {\n var _this2 = this;\n\n var _this$getProps2 = this.getProps(),\n helperText = _this$getProps2.helperText,\n error = _this$getProps2.error,\n props = (0, _objectWithoutProperties2[\"default\"])(_this$getProps2, [\"helperText\", \"error\"]);\n\n return /*#__PURE__*/_react[\"default\"].createElement(_FormControl[\"default\"], {\n error: Boolean(error),\n component: \"fieldset\"\n }, /*#__PURE__*/_react[\"default\"].createElement(_FormGroup[\"default\"], null, /*#__PURE__*/_react[\"default\"].createElement(_FormControlLabel[\"default\"], {\n label: \"\",\n control: /*#__PURE__*/_react[\"default\"].createElement(_Checkbox[\"default\"], (0, _extends2[\"default\"])({}, props, {\n value: String(this.props.value),\n checked: Boolean(this.props.value),\n onChange: function onChange(event) {\n return _this2.props.onChange(event.target.checked);\n },\n style: {\n padding: 0,\n width: 24,\n marginLeft: 9\n },\n inputProps: {\n autoFocus: this.props.autoFocus,\n 'aria-label': this.props.columnDef.title\n }\n }))\n })), /*#__PURE__*/_react[\"default\"].createElement(_FormHelperText[\"default\"], null, helperText));\n }\n }, {\n key: \"renderDateField\",\n value: function renderDateField() {\n var dateFormat = this.props.columnDef.dateSetting && this.props.columnDef.dateSetting.format ? this.props.columnDef.dateSetting.format : 'dd.MM.yyyy';\n return /*#__PURE__*/_react[\"default\"].createElement(_pickers.MuiPickersUtilsProvider, {\n utils: _dateFns[\"default\"],\n locale: this.props.locale\n }, /*#__PURE__*/_react[\"default\"].createElement(_pickers.DatePicker, (0, _extends2[\"default\"])({}, this.getProps(), {\n format: dateFormat,\n value: this.props.value || null,\n onChange: this.props.onChange,\n clearable: true,\n InputProps: {\n style: {\n fontSize: 13\n }\n },\n inputProps: {\n autoFocus: this.props.autoFocus,\n 'aria-label': \"\".concat(this.props.columnDef.title, \": press space to edit\")\n }\n })));\n }\n }, {\n key: \"renderTimeField\",\n value: function renderTimeField() {\n return /*#__PURE__*/_react[\"default\"].createElement(_pickers.MuiPickersUtilsProvider, {\n utils: _dateFns[\"default\"],\n locale: this.props.locale\n }, /*#__PURE__*/_react[\"default\"].createElement(_pickers.TimePicker, (0, _extends2[\"default\"])({}, this.getProps(), {\n format: \"HH:mm:ss\",\n value: this.props.value || null,\n onChange: this.props.onChange,\n clearable: true,\n InputProps: {\n style: {\n fontSize: 13\n }\n },\n inputProps: {\n autoFocus: this.props.autoFocus,\n 'aria-label': \"\".concat(this.props.columnDef.title, \": press space to edit\")\n }\n })));\n }\n }, {\n key: \"renderDateTimeField\",\n value: function renderDateTimeField() {\n return /*#__PURE__*/_react[\"default\"].createElement(_pickers.MuiPickersUtilsProvider, {\n utils: _dateFns[\"default\"],\n locale: this.props.locale\n }, /*#__PURE__*/_react[\"default\"].createElement(_pickers.DateTimePicker, (0, _extends2[\"default\"])({}, this.getProps(), {\n format: \"dd.MM.yyyy HH:mm:ss\",\n value: this.props.value || null,\n onChange: this.props.onChange,\n clearable: true,\n InputProps: {\n style: {\n fontSize: 13\n }\n },\n inputProps: {\n autoFocus: this.props.autoFocus,\n 'aria-label': \"\".concat(this.props.columnDef.title, \": press space to edit\")\n }\n })));\n }\n }, {\n key: \"renderTextField\",\n value: function renderTextField() {\n var _this3 = this;\n\n return /*#__PURE__*/_react[\"default\"].createElement(_TextField[\"default\"], (0, _extends2[\"default\"])({}, this.getProps(), {\n fullWidth: true,\n type: this.props.columnDef.type === 'numeric' ? 'number' : 'text',\n placeholder: this.props.columnDef.editPlaceholder || this.props.columnDef.title,\n value: this.props.value === undefined ? '' : this.props.value,\n onChange: function onChange(event) {\n return _this3.props.onChange(_this3.props.columnDef.type === 'numeric' ? event.target.valueAsNumber : event.target.value);\n },\n InputProps: {\n style: {\n minWidth: 50,\n fontSize: 13\n }\n },\n inputProps: {\n autoFocus: this.props.autoFocus,\n 'aria-label': this.props.columnDef.title,\n style: this.props.columnDef.type === 'numeric' ? {\n textAlign: 'right'\n } : {}\n }\n }));\n }\n }, {\n key: \"renderCurrencyField\",\n value: function renderCurrencyField() {\n var _this4 = this;\n\n return /*#__PURE__*/_react[\"default\"].createElement(_TextField[\"default\"], (0, _extends2[\"default\"])({}, this.getProps(), {\n placeholder: this.props.columnDef.editPlaceholder || this.props.columnDef.title,\n type: \"number\",\n value: this.props.value === undefined ? '' : this.props.value,\n onChange: function onChange(event) {\n var value = event.target.valueAsNumber;\n\n if (!value && value !== 0) {\n value = undefined;\n }\n\n return _this4.props.onChange(value);\n },\n InputProps: {\n style: {\n fontSize: 13,\n textAlign: 'right'\n }\n },\n inputProps: {\n autoFocus: this.props.autoFocus,\n 'aria-label': this.props.columnDef.title,\n style: {\n textAlign: 'right'\n }\n },\n onKeyDown: this.props.onKeyDown\n }));\n }\n }, {\n key: \"render\",\n value: function render() {\n var component = 'ok';\n\n if (this.props.columnDef.editComponent) {\n component = this.props.columnDef.editComponent(this.props);\n } else if (this.props.columnDef.lookup) {\n component = this.renderLookupField();\n } else if (this.props.columnDef.type === 'boolean') {\n component = this.renderBooleanField();\n } else if (this.props.columnDef.type === 'date') {\n component = this.renderDateField();\n } else if (this.props.columnDef.type === 'time') {\n component = this.renderTimeField();\n } else if (this.props.columnDef.type === 'datetime') {\n component = this.renderDateTimeField();\n } else if (this.props.columnDef.type === 'currency') {\n component = this.renderCurrencyField();\n } else {\n component = this.renderTextField();\n }\n\n return component;\n }\n }]);\n return MTableEditField;\n}(_react[\"default\"].Component);\n\nMTableEditField.propTypes = {\n value: _propTypes[\"default\"].any,\n onChange: _propTypes[\"default\"].func.isRequired,\n columnDef: _propTypes[\"default\"].object.isRequired,\n locale: _propTypes[\"default\"].object,\n rowData: _propTypes[\"default\"].object,\n onRowDataChange: _propTypes[\"default\"].func,\n errorState: _propTypes[\"default\"].func,\n autoFocus: _propTypes[\"default\"].bool,\n onBulkEditRowChanged: _propTypes[\"default\"].func,\n scrollWidth: _propTypes[\"default\"].number,\n onKeyDown: _propTypes[\"default\"].func\n};\nvar _default = MTableEditField;\nexports[\"default\"] = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.defaultProps = void 0;\n\nvar _props = _interopRequireDefault(require(\"./props.components\"));\n\nvar _props2 = _interopRequireDefault(require(\"./props.icons\"));\n\nvar _props3 = _interopRequireDefault(require(\"./props.localization\"));\n\nvar _props4 = _interopRequireDefault(require(\"./props.options\"));\n\nvar defaultProps = {\n actions: [],\n classes: {},\n columns: [],\n components: _props[\"default\"],\n data: [],\n icons: _props2[\"default\"],\n isLoading: false,\n title: 'Table Title',\n options: _props4[\"default\"],\n localization: _props3[\"default\"],\n style: {}\n};\nexports.defaultProps = defaultProps;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _TablePagination2 = _interopRequireDefault(require(\"@material-ui/core/TablePagination\"));\n\nvar _components = require(\"../components\");\n\nvar _default = {\n Action: _components.MTableAction,\n Actions: _components.MTableActions,\n Body: _components.MTableBody,\n Cell: _components.MTableCell,\n Container: _components.Container,\n EditCell: _components.MTableEditCell,\n EditField: _components.MTableEditField,\n EditRow: _components.MTableEditRow,\n FilterRow: _components.MTableFilterRow,\n Groupbar: _components.MTableGroupbar,\n GroupRow: _components.MTableGroupRow,\n Header: _components.MTableHeader,\n OverlayLoading: _components.OverlayLoading,\n OverlayError: _components.OverlayError,\n Pagination: _TablePagination2[\"default\"],\n Row: _components.MTableBodyRow,\n SummaryRow: _components.MTableSummaryRow,\n Toolbar: _components.MTableToolbar\n};\nexports[\"default\"] = _default;","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _ViewColumn2 = _interopRequireDefault(require(\"@material-ui/icons/ViewColumn\"));\n\nvar _Remove2 = _interopRequireDefault(require(\"@material-ui/icons/Remove\"));\n\nvar _ArrowDownward2 = _interopRequireDefault(require(\"@material-ui/icons/ArrowDownward\"));\n\nvar _Search2 = _interopRequireDefault(require(\"@material-ui/icons/Search\"));\n\nvar _Replay2 = _interopRequireDefault(require(\"@material-ui/icons/Replay\"));\n\nvar _Icon2 = _interopRequireDefault(require(\"@material-ui/core/Icon\"));\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _ChevronLeft2 = _interopRequireDefault(require(\"@material-ui/icons/ChevronLeft\"));\n\nvar _LastPage2 = _interopRequireDefault(require(\"@material-ui/icons/LastPage\"));\n\nvar _FirstPage2 = _interopRequireDefault(require(\"@material-ui/icons/FirstPage\"));\n\nvar _FilterList2 = _interopRequireDefault(require(\"@material-ui/icons/FilterList\"));\n\nvar _SaveAlt2 = _interopRequireDefault(require(\"@material-ui/icons/SaveAlt\"));\n\nvar _Edit2 = _interopRequireDefault(require(\"@material-ui/icons/Edit\"));\n\nvar _ChevronRight2 = _interopRequireDefault(require(\"@material-ui/icons/ChevronRight\"));\n\nvar _DeleteOutline2 = _interopRequireDefault(require(\"@material-ui/icons/DeleteOutline\"));\n\nvar _Clear2 = _interopRequireDefault(require(\"@material-ui/icons/Clear\"));\n\nvar _Check2 = _interopRequireDefault(require(\"@material-ui/icons/Check\"));\n\nvar _AddBox2 = _interopRequireDefault(require(\"@material-ui/icons/AddBox\"));\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _react = _interopRequireWildcard(require(\"react\"));\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2[\"default\"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nvar _default = {\n Add: /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(_AddBox2[\"default\"], (0, _extends2[\"default\"])({}, props, {\n ref: ref,\n \"data-testid\": \"add_box\"\n }));\n }),\n Check: /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(_Check2[\"default\"], (0, _extends2[\"default\"])({}, props, {\n ref: ref,\n \"data-testid\": \"check\"\n }));\n }),\n Clear: /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(_Clear2[\"default\"], (0, _extends2[\"default\"])({}, props, {\n ref: ref,\n \"data-testid\": \"clear\"\n }));\n }),\n Delete: /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(_DeleteOutline2[\"default\"], (0, _extends2[\"default\"])({}, props, {\n ref: ref,\n \"data-testid\": \"delete_outline\"\n }));\n }),\n DetailPanel: /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(_ChevronRight2[\"default\"], (0, _extends2[\"default\"])({}, props, {\n ref: ref,\n \"data-testid\": \"chevron_right\"\n }));\n }),\n Edit: /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(_Edit2[\"default\"], (0, _extends2[\"default\"])({}, props, {\n ref: ref,\n \"data-testid\": \"edit\"\n }));\n }),\n Export: /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(_SaveAlt2[\"default\"], (0, _extends2[\"default\"])({}, props, {\n ref: ref,\n \"data-testid\": \"save_alt\"\n }));\n }),\n Filter: /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(_FilterList2[\"default\"], (0, _extends2[\"default\"])({}, props, {\n ref: ref,\n \"data-testid\": \"filter_list\"\n }));\n }),\n FirstPage: /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(_FirstPage2[\"default\"], (0, _extends2[\"default\"])({}, props, {\n ref: ref,\n \"data-testid\": \"first_page\"\n }));\n }),\n LastPage: /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(_LastPage2[\"default\"], (0, _extends2[\"default\"])({}, props, {\n ref: ref,\n \"data-testid\": \"last_page\"\n }));\n }),\n NextPage: /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(_ChevronRight2[\"default\"], (0, _extends2[\"default\"])({}, props, {\n ref: ref,\n \"data-testid\": \"chevron_right\"\n }));\n }),\n PreviousPage: /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(_ChevronLeft2[\"default\"], (0, _extends2[\"default\"])({}, props, {\n ref: ref,\n \"data-testid\": \"chevron_left\"\n }));\n }),\n ResetSearch: /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(_Clear2[\"default\"], (0, _extends2[\"default\"])({}, props, {\n ref: ref,\n \"data-testid\": \"clear\"\n }));\n }),\n Resize: /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(_Icon2[\"default\"], (0, _extends2[\"default\"])({}, props, {\n ref: ref,\n style: _objectSpread({}, props.style),\n \"data-testid\": \"drag_handle\"\n }), \"|\");\n }),\n Retry: /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(_Replay2[\"default\"], (0, _extends2[\"default\"])({}, props, {\n ref: ref,\n \"data-testid\": \"replay\"\n }));\n }),\n Search: /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(_Search2[\"default\"], (0, _extends2[\"default\"])({}, props, {\n ref: ref,\n \"data-testid\": \"search\"\n }));\n }),\n SortArrow: /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(_ArrowDownward2[\"default\"], (0, _extends2[\"default\"])({}, props, {\n ref: ref,\n \"data-testid\": \"arrow_downward\"\n }));\n }),\n ThirdStateCheck: /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(_Remove2[\"default\"], (0, _extends2[\"default\"])({}, props, {\n ref: ref,\n \"data-testid\": \"remove\"\n }));\n }),\n ViewColumn: /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(_ViewColumn2[\"default\"], (0, _extends2[\"default\"])({}, props, {\n ref: ref,\n \"data-testid\": \"view_column\"\n }));\n })\n};\nexports[\"default\"] = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\n/**\n * Default data for the `MaterialTable.localization` attribute\n */\nvar _default = {\n error: 'Data could not be retrieved',\n grouping: {\n groupedBy: 'Grouped By:',\n placeholder: 'Drag headers here to group by'\n },\n pagination: {\n labelDisplayedRows: '{from}-{to} of {count}',\n labelRowsPerPage: 'Rows per page:',\n labelRowsSelect: 'rows'\n },\n toolbar: {},\n header: {},\n body: {\n filterRow: {},\n editRow: {\n saveTooltip: 'Save',\n cancelTooltip: 'Cancel',\n deleteText: 'Are you sure you want to delete this row?'\n },\n addTooltip: 'Add',\n deleteTooltip: 'Delete',\n editTooltip: 'Edit',\n bulkEditTooltip: 'Edit All',\n bulkEditApprove: 'Save all changes',\n bulkEditCancel: 'Discard all changes'\n }\n};\nexports[\"default\"] = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\n/**\n * Default data for `MaterialTable.options` attribute\n */\nvar _default = {\n idSynonym: 'id',\n actionsColumnIndex: 0,\n addRowPosition: 'last',\n columnsButton: false,\n detailPanelType: 'multiple',\n debounceInterval: 200,\n doubleHorizontalScroll: false,\n emptyRowsWhenPaging: true,\n exportAllData: false,\n exportMenu: [],\n filtering: false,\n groupTitle: false,\n header: true,\n headerSelectionProps: {},\n hideFilterIcons: false,\n loadingType: 'overlay',\n padding: 'default',\n searchAutoFocus: false,\n paging: true,\n pageSize: 5,\n pageSizeOptions: [5, 10, 20],\n paginationType: 'normal',\n paginationPosition: 'bottom',\n showEmptyDataSourceMessage: true,\n showFirstLastPageButtons: true,\n showSelectAllCheckbox: true,\n showSelectGroupCheckbox: true,\n search: true,\n showTitle: true,\n showTextRowsSelected: true,\n showDetailPanelIcon: true,\n tableLayout: 'auto',\n tableWidth: 'full',\n toolbarButtonAlignment: 'right',\n searchFieldAlignment: 'right',\n searchFieldStyle: {},\n searchFieldVariant: 'standard',\n selection: false,\n selectionProps: {},\n sorting: true,\n keepSortDirectionOnColumnSwitch: true,\n toolbar: true,\n defaultExpanded: false,\n detailPanelColumnAlignment: 'left',\n detailPanelOffset: {\n left: 0,\n right: 0\n },\n thirdSortClick: true,\n overflowY: 'auto'\n};\nexports[\"default\"] = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"MTableAction\", {\n enumerable: true,\n get: function get() {\n return _components.MTableAction;\n }\n});\nObject.defineProperty(exports, \"MTableActions\", {\n enumerable: true,\n get: function get() {\n return _components.MTableActions;\n }\n});\nObject.defineProperty(exports, \"MTableBody\", {\n enumerable: true,\n get: function get() {\n return _components.MTableBody;\n }\n});\nObject.defineProperty(exports, \"MTableBodyRow\", {\n enumerable: true,\n get: function get() {\n return _components.MTableBodyRow;\n }\n});\nObject.defineProperty(exports, \"MTableCell\", {\n enumerable: true,\n get: function get() {\n return _components.MTableCell;\n }\n});\nObject.defineProperty(exports, \"MTableEditCell\", {\n enumerable: true,\n get: function get() {\n return _components.MTableEditCell;\n }\n});\nObject.defineProperty(exports, \"MTableEditField\", {\n enumerable: true,\n get: function get() {\n return _components.MTableEditField;\n }\n});\nObject.defineProperty(exports, \"MTableEditRow\", {\n enumerable: true,\n get: function get() {\n return _components.MTableEditRow;\n }\n});\nObject.defineProperty(exports, \"MTableFilterRow\", {\n enumerable: true,\n get: function get() {\n return _components.MTableFilterRow;\n }\n});\nObject.defineProperty(exports, \"MTableGroupRow\", {\n enumerable: true,\n get: function get() {\n return _components.MTableGroupRow;\n }\n});\nObject.defineProperty(exports, \"MTableGroupbar\", {\n enumerable: true,\n get: function get() {\n return _components.MTableGroupbar;\n }\n});\nObject.defineProperty(exports, \"MTableHeader\", {\n enumerable: true,\n get: function get() {\n return _components.MTableHeader;\n }\n});\nObject.defineProperty(exports, \"MTablePagination\", {\n enumerable: true,\n get: function get() {\n return _components.MTablePagination;\n }\n});\nObject.defineProperty(exports, \"MTableSteppedPagination\", {\n enumerable: true,\n get: function get() {\n return _components.MTableSteppedPagination;\n }\n});\nObject.defineProperty(exports, \"MTableToolbar\", {\n enumerable: true,\n get: function get() {\n return _components.MTableToolbar;\n }\n});\nexports[\"default\"] = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nrequire(\"./utils/polyfill\");\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _defaults = require(\"./defaults\");\n\nvar _propTypes = require(\"./prop-types\");\n\nvar _materialTable = _interopRequireDefault(require(\"./material-table\"));\n\nvar _styles = require(\"@material-ui/core/styles\");\n\nvar _components = require(\"./components\");\n\n_materialTable[\"default\"].defaultProps = _defaults.defaultProps;\n_materialTable[\"default\"].propTypes = _propTypes.propTypes;\n\nvar styles = function styles(theme) {\n return {\n paginationRoot: {\n width: '100%'\n },\n paginationToolbar: {\n padding: 0,\n width: '100%'\n },\n paginationCaption: {\n display: 'none'\n },\n paginationSelectRoot: {\n margin: 0\n }\n };\n};\n\nvar _default = (0, _styles.withStyles)(styles, {\n withTheme: true\n})(function (props) {\n return /*#__PURE__*/_react[\"default\"].createElement(_materialTable[\"default\"], (0, _extends2[\"default\"])({}, props, {\n ref: props.tableRef\n }));\n});\n\nexports[\"default\"] = _default;","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _slicedToArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/slicedToArray\"));\n\nvar _LinearProgress2 = _interopRequireDefault(require(\"@material-ui/core/LinearProgress\"));\n\nvar _TableFooter2 = _interopRequireDefault(require(\"@material-ui/core/TableFooter\"));\n\nvar _TableRow2 = _interopRequireDefault(require(\"@material-ui/core/TableRow\"));\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\n\nvar _Table2 = _interopRequireDefault(require(\"@material-ui/core/Table\"));\n\nvar _typeof2 = _interopRequireDefault(require(\"@babel/runtime/helpers/typeof\"));\n\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\n\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\n\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime/helpers/assertThisInitialized\"));\n\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inherits\"));\n\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime/helpers/possibleConstructorReturn\"));\n\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime/helpers/getPrototypeOf\"));\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _debounce = require(\"debounce\");\n\nvar _react2 = _interopRequireDefault(require(\"fast-deep-equal/react\"));\n\nvar _reactBeautifulDnd = require(\"react-beautiful-dnd\");\n\nvar _dataManager = _interopRequireDefault(require(\"./utils/data-manager\"));\n\nvar CommonValues = _interopRequireWildcard(require(\"./utils/common-values\"));\n\nvar _components = require(\"./components\");\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2[\"default\"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2[\"default\"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2[\"default\"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2[\"default\"])(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nvar MaterialTable = /*#__PURE__*/function (_React$Component) {\n (0, _inherits2[\"default\"])(MaterialTable, _React$Component);\n\n var _super = _createSuper(MaterialTable);\n\n function MaterialTable(_props) {\n var _this;\n\n (0, _classCallCheck2[\"default\"])(this, MaterialTable);\n _this = _super.call(this, _props);\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"dataManager\", new _dataManager[\"default\"]());\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"checkedForFunctions\", false);\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"isRemoteData\", function (props) {\n return !Array.isArray((props || _this.props).data);\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"isOutsidePageNumbers\", function (props) {\n return props.page !== undefined && props.totalCount !== undefined;\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"onAllSelected\", function (checked) {\n _this.dataManager.changeAllSelected(checked, _this.props.options.selectionProps);\n\n _this.setState(_this.dataManager.getRenderState(), function () {\n return _this.onSelectionChange();\n });\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"onGroupSelected\", function (checked, path) {\n _this.dataManager.changeGroupSelected(checked, path);\n\n _this.setState(_this.dataManager.getRenderState(), function () {\n return _this.onSelectionChange();\n });\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"onChangeColumnHidden\", function (column, hidden) {\n _this.dataManager.changeColumnHidden(column, hidden);\n\n _this.setState(_this.dataManager.getRenderState(), function () {\n _this.props.onChangeColumnHidden && _this.props.onChangeColumnHidden(column, hidden);\n });\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"onChangeGroupOrder\", function (groupedColumn) {\n _this.dataManager.changeGroupOrder(groupedColumn.tableData.id);\n\n _this.setState(_this.dataManager.getRenderState());\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"onChangeOrder\", function (orderBy, orderDirection) {\n var newOrderBy = orderDirection === '' ? -1 : orderBy;\n\n _this.dataManager.changeOrder(newOrderBy, orderDirection);\n\n if (_this.isRemoteData()) {\n var query = _objectSpread({}, _this.state.query);\n\n query.page = 0;\n query.orderBy = _this.state.columns.find(function (a) {\n return a.tableData.id === newOrderBy;\n });\n query.orderDirection = orderDirection;\n\n _this.onQueryChange(query, function () {\n _this.props.onOrderChange && _this.props.onOrderChange(newOrderBy, orderDirection);\n });\n } else {\n _this.setState(_this.dataManager.getRenderState(), function () {\n _this.props.onOrderChange && _this.props.onOrderChange(newOrderBy, orderDirection);\n });\n }\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"onPageChange\", function (event, page) {\n if (_this.isRemoteData()) {\n var query = _objectSpread({}, _this.state.query);\n\n query.page = page;\n\n _this.onQueryChange(query, function () {\n _this.props.onPageChange && _this.props.onPageChange(page, query.pageSize);\n });\n } else {\n if (!_this.isOutsidePageNumbers(_this.props)) {\n _this.dataManager.changeCurrentPage(page);\n }\n\n _this.setState(_this.dataManager.getRenderState(), function () {\n _this.props.onPageChange && _this.props.onPageChange(page, _this.state.pageSize);\n });\n }\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"onRowsPerPageChange\", function (event) {\n var pageSize = event.target.value;\n\n _this.dataManager.changePageSize(pageSize);\n\n _this.props.onPageChange && _this.props.onPageChange(0, pageSize);\n\n if (_this.isRemoteData()) {\n var query = _objectSpread({}, _this.state.query);\n\n query.pageSize = event.target.value;\n query.page = 0;\n\n _this.onQueryChange(query, function () {\n _this.props.onRowsPerPageChange && _this.props.onRowsPerPageChange(pageSize);\n });\n } else {\n _this.dataManager.changeCurrentPage(0);\n\n _this.setState(_this.dataManager.getRenderState(), function () {\n _this.props.onRowsPerPageChange && _this.props.onRowsPerPageChange(pageSize);\n });\n }\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"onDragEnd\", function (result) {\n if (!result || !result.source || !result.destination) return;\n\n _this.dataManager.changeByDrag(result);\n\n _this.setState(_this.dataManager.getRenderState(), function () {\n if (_this.props.onColumnDragged && result.destination.droppableId === 'headers' && result.source.droppableId === 'headers') {\n _this.props.onColumnDragged(result.source.index, result.destination.index);\n }\n });\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"onGroupExpandChanged\", function (path) {\n _this.dataManager.changeGroupExpand(path);\n\n _this.setState(_this.dataManager.getRenderState());\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"onGroupRemoved\", function (groupedColumn, index) {\n var result = {\n combine: null,\n destination: {\n droppableId: 'headers',\n index: 0\n },\n draggableId: groupedColumn.tableData.id,\n mode: 'FLUID',\n reason: 'DROP',\n source: {\n index: index,\n droppableId: 'groups'\n },\n type: 'DEFAULT'\n };\n\n _this.dataManager.changeByDrag(result);\n\n _this.setState(_this.dataManager.getRenderState(), function () {\n _this.props.onGroupRemoved && _this.props.onGroupRemoved(groupedColumn, index);\n });\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"onEditingApproved\", function (mode, newData, oldData) {\n if (mode === 'add' && _this.props.editable && _this.props.editable.onRowAdd) {\n _this.setState({\n isLoading: true\n }, function () {\n _this.props.editable.onRowAdd(newData).then(function (result) {\n _this.setState({\n isLoading: false,\n showAddRow: false\n }, function () {\n if (_this.isRemoteData()) {\n _this.onQueryChange(_this.state.query);\n }\n });\n })[\"catch\"](function (reason) {\n var errorState = {\n message: reason,\n errorCause: 'add'\n };\n\n _this.setState({\n isLoading: false,\n errorState: errorState\n });\n });\n });\n } else if (mode === 'update' && _this.props.editable && _this.props.editable.onRowUpdate) {\n _this.setState({\n isLoading: true\n }, function () {\n _this.props.editable.onRowUpdate(newData, oldData).then(function (result) {\n _this.dataManager.changeRowEditing(oldData);\n\n _this.setState(_objectSpread({\n isLoading: false\n }, _this.dataManager.getRenderState()), function () {\n if (_this.isRemoteData()) {\n _this.onQueryChange(_this.state.query);\n }\n });\n })[\"catch\"](function (reason) {\n var errorState = {\n message: reason,\n errorCause: 'update'\n };\n\n _this.setState({\n isLoading: false,\n errorState: errorState\n });\n });\n });\n } else if (mode === 'delete' && _this.props.editable && _this.props.editable.onRowDelete) {\n _this.setState({\n isLoading: true\n }, function () {\n _this.props.editable.onRowDelete(oldData).then(function (result) {\n _this.dataManager.changeRowEditing(oldData);\n\n _this.setState(_objectSpread({\n isLoading: false\n }, _this.dataManager.getRenderState()), function () {\n if (_this.isRemoteData()) {\n _this.onQueryChange(_this.state.query);\n }\n });\n })[\"catch\"](function (reason) {\n var errorState = {\n message: reason,\n errorCause: 'delete'\n };\n\n _this.setState({\n isLoading: false,\n errorState: errorState\n });\n });\n });\n } else if (mode === 'bulk' && _this.props.editable && _this.props.editable.onBulkUpdate) {\n _this.setState({\n isLoading: true\n }, function () {\n _this.props.editable.onBulkUpdate(_this.dataManager.bulkEditChangedRows).then(function (result) {\n _this.dataManager.changeBulkEditOpen(false);\n\n _this.props.onBulkEditOpen && _this.props.onBulkEditOpen(false);\n\n _this.dataManager.clearBulkEditChangedRows();\n\n _this.setState(_objectSpread({\n isLoading: false\n }, _this.dataManager.getRenderState()), function () {\n if (_this.isRemoteData()) {\n _this.onQueryChange(_this.state.query);\n }\n });\n })[\"catch\"](function (reason) {\n var errorState = {\n message: reason,\n errorCause: 'bulk edit'\n };\n\n _this.setState({\n isLoading: false,\n errorState: errorState\n });\n });\n });\n }\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"onEditingCanceled\", function (mode, rowData) {\n if (mode === 'add') {\n _this.props.editable.onRowAddCancelled && _this.props.editable.onRowAddCancelled();\n\n _this.setState({\n showAddRow: false\n });\n } else if (mode === 'update') {\n _this.props.editable.onRowUpdateCancelled && _this.props.editable.onRowUpdateCancelled();\n\n _this.dataManager.changeRowEditing(rowData);\n\n _this.setState(_this.dataManager.getRenderState());\n } else if (mode === 'delete') {\n _this.dataManager.changeRowEditing(rowData);\n\n _this.setState(_this.dataManager.getRenderState());\n }\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"retry\", function () {\n _this.onQueryChange(_this.state.query);\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"onQueryChange\", function (query, callback) {\n query = _objectSpread(_objectSpread(_objectSpread({}, _this.state.query), query), {}, {\n error: _this.state.errorState\n });\n\n _this.setState({\n isLoading: true,\n errorState: undefined\n }, function () {\n _this.props.data(query).then(function (result) {\n query.totalCount = result.totalCount;\n query.page = result.page;\n\n var nextQuery = _objectSpread(_objectSpread({}, query), {}, {\n totalCount: result.totalCount,\n page: result.page\n });\n\n _this.dataManager.setData(result.data, _this.props.options.idSynonym);\n\n _this.setState(_objectSpread(_objectSpread({\n isLoading: false,\n errorState: false\n }, _this.dataManager.getRenderState()), {}, {\n query: nextQuery\n }), function () {\n callback && callback();\n });\n })[\"catch\"](function (error) {\n var localization = _objectSpread(_objectSpread({}, MaterialTable.defaultProps.localization), _this.props.localization);\n\n var errorState = {\n message: (0, _typeof2[\"default\"])(error) === 'object' ? error.message : error !== undefined ? error : localization.error,\n errorCause: 'query'\n };\n\n _this.setState(_objectSpread({\n isLoading: false,\n errorState: errorState\n }, _this.dataManager.getRenderState()));\n });\n });\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"onRowSelected\", function (event, path, dataClicked) {\n _this.dataManager.changeRowSelected(event.target.checked, path);\n\n _this.setState(_this.dataManager.getRenderState(), function () {\n return _this.onSelectionChange(dataClicked);\n });\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"onSelectionChange\", function (dataClicked) {\n if (_this.props.onSelectionChange) {\n var selectedRows = [];\n\n var findSelecteds = function findSelecteds(list) {\n list.forEach(function (row) {\n if (row.tableData.checked) {\n selectedRows.push(row);\n }\n });\n };\n\n findSelecteds(_this.state.originalData);\n\n _this.props.onSelectionChange(selectedRows, dataClicked);\n }\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"onSearchChangeDebounce\", (0, _debounce.debounce)(function (searchText) {\n if (_this.isRemoteData()) {\n var query = _objectSpread({}, _this.state.query);\n\n query.page = 0;\n query.search = searchText;\n\n _this.onQueryChange(query, function () {\n _this.props.onSearchChange && _this.props.onSearchChange(searchText);\n });\n } else {\n _this.setState(_this.dataManager.getRenderState(), function () {\n _this.props.onSearchChange && _this.props.onSearchChange(searchText);\n });\n }\n }, _this.props.options.debounceInterval));\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"onFilterChange\", function (columnId, value) {\n _this.dataManager.changeFilterValue(columnId, value);\n\n _this.setState({}, _this.onFilterChangeDebounce);\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"onFilterChangeDebounce\", (0, _debounce.debounce)(function () {\n if (_this.isRemoteData()) {\n var query = _objectSpread({}, _this.state.query);\n\n query.page = 0;\n query.filters = _this.state.columns.filter(function (a) {\n return a.tableData.filterValue;\n }).map(function (a) {\n return {\n column: a,\n operator: '=',\n value: a.tableData.filterValue\n };\n });\n\n _this.onQueryChange(query, function () {\n _this.props.onFilterChange && _this.props.onFilterChange(query.filters);\n });\n } else {\n _this.setState(_this.dataManager.getRenderState(), function () {\n if (_this.props.onFilterChange) {\n var appliedFilters = _this.state.columns.filter(function (a) {\n return a.tableData.filterValue;\n }).map(function (a) {\n return {\n column: a,\n operator: '=',\n value: a.tableData.filterValue\n };\n });\n\n _this.props.onFilterChange(appliedFilters);\n }\n });\n }\n }, _this.props.options.debounceInterval));\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"onTreeExpandChanged\", function (path, data) {\n _this.dataManager.changeTreeExpand(path);\n\n _this.setState(_this.dataManager.getRenderState(), function () {\n _this.props.onTreeExpandChange && _this.props.onTreeExpandChange(data, data.tableData.isTreeExpanded);\n });\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"onToggleDetailPanel\", function (path, render) {\n _this.dataManager.changeDetailPanelVisibility(path, render);\n\n _this.setState(_this.dataManager.getRenderState());\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"onCellEditStarted\", function (rowData, columnDef) {\n _this.dataManager.startCellEditable(rowData, columnDef);\n\n _this.setState(_this.dataManager.getRenderState());\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"onCellEditFinished\", function (rowData, columnDef) {\n _this.dataManager.finishCellEditable(rowData, columnDef);\n\n _this.setState(_this.dataManager.getRenderState());\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"onEditRowDataChanged\", function (rowData, newData) {\n _this.dataManager.setEditRowData(rowData, newData);\n\n _this.setState(_this.dataManager.getRenderState());\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"onColumnResized\", function (id, offset, changedColumnWidthsBeforeOffset, initialColWidths) {\n var colInfo = function colInfo(col) {\n return _objectSpread(_objectSpread(_objectSpread({\n field: col.field,\n width: col.tableData.width,\n widthPx: col.tableData.widthPx\n }, col.id && {\n id: col.id\n }), col.minWidth && {\n minWidth: col.minWidth\n }), col.maxWidth && {\n maxWidth: col.maxWidth\n });\n };\n\n var colsResized = _this.dataManager.onColumnResized(id, offset, changedColumnWidthsBeforeOffset, initialColWidths);\n\n _this.setState(_this.dataManager.getRenderState(), function () {\n if (offset === 0 && _this.props.onColumnResized && colsResized.length > 0) {\n _this.props.onColumnResized(colsResized.map(function (col) {\n return colInfo(col);\n }), _this.state.columns.map(function (col) {\n return colInfo(col);\n }));\n }\n });\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"renderTable\", function (props) {\n var _props$options$tableW;\n\n return /*#__PURE__*/_react[\"default\"].createElement(_Table2[\"default\"], {\n style: _objectSpread(_objectSpread({}, props.options.tableWidth === 'variable' && {\n width: _this.state.tableStyleWidth\n }), {}, {\n tableLayout: props.options.fixedColumns && (props.options.fixedColumns.left || props.options.fixedColumns.right) ? 'fixed' : props.options.tableLayout\n })\n }, props.options.header && /*#__PURE__*/_react[\"default\"].createElement(props.components.Header, {\n actions: props.actions,\n localization: _objectSpread(_objectSpread({}, MaterialTable.defaultProps.localization.header), _this.props.localization.header),\n columns: _this.state.columns,\n hasSelection: props.options.selection,\n headerStyle: props.options.headerStyle,\n icons: props.icons,\n selectedCount: _this.state.selectedCount,\n dataCount: props.parentChildData ? _this.state.treefiedDataLength : _this.state.columns.filter(function (col) {\n return col.tableData.groupOrder > -1;\n }).length > 0 ? _this.state.groupedDataLength : _this.state.data.length,\n hasDetailPanel: !!props.detailPanel,\n detailPanelColumnAlignment: props.options.detailPanelColumnAlignment,\n showActionsColumn: !_this.dataManager.bulkEditOpen && props.actions && props.actions.filter(function (a) {\n return a.position === 'row' || typeof a === 'function';\n }).length > 0,\n showSelectAllCheckbox: props.options.showSelectAllCheckbox,\n showSelectGroupCheckbox: props.options.showSelectGroupCheckbox,\n orderBy: _this.state.orderBy,\n orderDirection: _this.state.orderDirection,\n onAllSelected: _this.onAllSelected,\n onOrderChange: _this.onChangeOrder,\n actionsHeaderIndex: props.options.actionsColumnIndex,\n sorting: props.options.sorting,\n keepSortDirectionOnColumnSwitch: props.options.keepSortDirectionOnColumnSwitch,\n grouping: props.options.grouping,\n isTreeData: _this.props.parentChildData !== undefined,\n draggable: props.options.draggable,\n thirdSortClick: props.options.thirdSortClick,\n treeDataMaxLevel: _this.state.treeDataMaxLevel,\n options: props.options,\n onColumnResized: _this.onColumnResized,\n scrollWidth: _this.state.width,\n tableWidth: (_props$options$tableW = props.options.tableWidth) !== null && _props$options$tableW !== void 0 ? _props$options$tableW : 'full'\n }), /*#__PURE__*/_react[\"default\"].createElement(props.components.Body, {\n actions: props.actions,\n components: props.components,\n icons: props.icons,\n renderData: _this.state.renderData,\n data: _this.state.data,\n renderSummaryRow: _this.props.renderSummaryRow,\n currentPage: _this.state.currentPage,\n initialFormData: props.initialFormData,\n pageSize: _this.state.pageSize,\n columns: _this.state.columns,\n errorState: _this.state.errorState,\n detailPanel: props.detailPanel,\n options: props.options,\n getFieldValue: _this.dataManager.getFieldValue,\n isTreeData: _this.props.parentChildData !== undefined,\n onFilterChanged: _this.onFilterChange,\n onRowSelected: _this.onRowSelected,\n onGroupSelected: _this.onGroupSelected,\n onToggleDetailPanel: _this.onToggleDetailPanel,\n onGroupExpandChanged: _this.onGroupExpandChanged,\n onTreeExpandChanged: _this.onTreeExpandChanged,\n onEditingCanceled: _this.onEditingCanceled,\n onEditingApproved: _this.onEditingApproved,\n localization: _objectSpread(_objectSpread({}, MaterialTable.defaultProps.localization.body), _this.props.localization.body),\n onRowClick: _this.props.onRowClick,\n onRowDoubleClick: _this.props.onRowDoubleClick,\n showAddRow: _this.state.showAddRow,\n hasAnyEditingRow: !!(_this.state.lastEditingRow || _this.state.showAddRow),\n hasDetailPanel: !!props.detailPanel,\n treeDataMaxLevel: _this.state.treeDataMaxLevel,\n cellEditable: props.cellEditable,\n onCellEditStarted: _this.onCellEditStarted,\n onCellEditFinished: _this.onCellEditFinished,\n bulkEditOpen: _this.dataManager.bulkEditOpen,\n bulkEditChangedRows: _this.dataManager.bulkEditChangedRows,\n onBulkEditRowChanged: _this.dataManager.onBulkEditRowChanged,\n scrollWidth: _this.state.width\n }));\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"getColumnsWidth\", function (props, count) {\n var result = [];\n var actionsWidth = CommonValues.actionsColumnWidth(props);\n\n if (actionsWidth > 0) {\n if (count > 0 && props.options.actionsColumnIndex >= 0 && props.options.actionsColumnIndex < count) {\n result.push(actionsWidth + 'px');\n } else if (count < 0 && props.options.actionsColumnIndex < 0 && props.options.actionsColumnIndex >= count) {\n result.push(actionsWidth + 'px');\n }\n } // add selection action width only for left container div\n\n\n if (props.options.selection && count > 0) {\n var selectionWidth = CommonValues.selectionMaxWidth(props, _this.state.treeDataMaxLevel);\n result.push(selectionWidth + 'px');\n }\n\n for (var i = 0; i < Math.abs(count) && i < _this.state.columns.length; i++) {\n var colDef = _this.state.columns[count >= 0 ? i : _this.state.columns.length - 1 - i];\n\n if (colDef.tableData) {\n if (typeof colDef.tableData.width === 'number') {\n result.push(colDef.tableData.width + 'px');\n } else {\n result.push(colDef.tableData.width);\n }\n }\n }\n\n return 'calc(' + result.join(' + ') + ')';\n });\n\n var calculatedProps = _this.getProps(_props);\n\n _this.setDataManagerFields(calculatedProps, true);\n\n var renderState = _this.dataManager.getRenderState();\n\n _this.state = _objectSpread(_objectSpread({\n data: [],\n errorState: undefined\n }, renderState), {}, {\n query: {\n filters: renderState.columns.filter(function (a) {\n return a.tableData.filterValue;\n }).map(function (a) {\n return {\n column: a,\n operator: '=',\n value: a.tableData.filterValue\n };\n }),\n orderBy: renderState.columns.find(function (a) {\n return a.tableData.id === renderState.orderBy;\n }),\n orderDirection: renderState.orderDirection,\n page: 0,\n pageSize: calculatedProps.options.pageSize,\n search: renderState.searchText,\n totalCount: 0\n },\n showAddRow: false,\n bulkEditOpen: false,\n width: 0,\n tableInitialWidthPx: undefined,\n tableStyleWidth: '100%'\n });\n _this.tableContainerDiv = /*#__PURE__*/_react[\"default\"].createRef();\n return _this;\n }\n\n (0, _createClass2[\"default\"])(MaterialTable, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this2 = this;\n\n this.setState(_objectSpread(_objectSpread({}, this.dataManager.getRenderState()), {}, {\n width: this.tableContainerDiv.current.scrollWidth\n }), function () {\n if (_this2.isRemoteData()) {\n _this2.onQueryChange(_objectSpread(_objectSpread({}, _this2.state.query), {}, {\n page: _this2.props.options.initialPage || 0\n }));\n }\n /**\n * THIS WILL NEED TO BE REMOVED EVENTUALLY.\n * Warn consumer of renamed prop.\n */\n\n\n if (_this2.props.onDoubleRowClick !== undefined) {\n console.error('Property `onDoubleRowClick` has been renamed to `onRowDoubleClick`');\n }\n });\n }\n }, {\n key: \"setDataManagerFields\",\n value: function setDataManagerFields(props, isInit, prevColumns) {\n var _props$options$tableW2;\n\n var savedColumns = {};\n\n if (props.options.persistentGroupingsId) {\n var materialTableGroupings = localStorage.getItem('material-table-groupings');\n\n if (materialTableGroupings) {\n materialTableGroupings = JSON.parse(materialTableGroupings);\n\n if (materialTableGroupings[props.options.persistentGroupingsId]) {\n materialTableGroupings[props.options.persistentGroupingsId].forEach(function (savedGrouping) {\n savedColumns[savedGrouping.field] = {\n groupOrder: savedGrouping.groupOrder,\n groupSort: savedGrouping.groupSort,\n columnOrder: savedGrouping.columnOrder\n };\n });\n }\n }\n }\n\n this.dataManager.setTableWidth((_props$options$tableW2 = props.options.tableWidth) !== null && _props$options$tableW2 !== void 0 ? _props$options$tableW2 : 'full');\n this.dataManager.setColumns(props.columns, prevColumns, savedColumns);\n this.dataManager.setDefaultExpanded(props.options.defaultExpanded);\n this.dataManager.changeRowEditing();\n\n if (this.isRemoteData(props)) {\n this.dataManager.changeApplySearch(false);\n this.dataManager.changeApplyFilters(false);\n this.dataManager.changeApplySort(false);\n } else {\n this.dataManager.changeApplySearch(true);\n this.dataManager.changeApplyFilters(true);\n this.dataManager.changeApplySort(true);\n this.dataManager.setData(props.data, props.options.idSynonym);\n }\n\n var defaultSortColumnIndex = -1;\n var defaultSortDirection = '';\n var prevSortColumnIndex = -1;\n var prevSortDirection = '';\n\n if (props && props.options.sorting !== false) {\n defaultSortColumnIndex = props.columns.findIndex(function (a) {\n return a.defaultSort && a.sorting !== false;\n });\n defaultSortDirection = defaultSortColumnIndex > -1 ? props.columns[defaultSortColumnIndex].defaultSort : '';\n }\n\n if (prevColumns) {\n prevSortColumnIndex = prevColumns.findIndex(function (a) {\n return a.defaultSort && a.sorting !== false;\n });\n prevSortDirection = prevSortColumnIndex > -1 ? props.columns[prevSortColumnIndex].defaultSort : '';\n } // If the default sorting changed and differs from the current default sorting, it will trigger a new sorting\n\n\n var shouldReorder = isInit || !this.isRemoteData() && // Only if a defaultSortingDirection is passed, it will evaluate for changes\n defaultSortDirection && ( // Default sorting has changed\n defaultSortColumnIndex !== prevSortColumnIndex || defaultSortDirection !== prevSortDirection) && ( // Default sorting differs from current sorting\n defaultSortColumnIndex !== this.dataManager.orderBy || defaultSortDirection !== this.dataManager.orderDirection);\n shouldReorder && this.dataManager.changeOrder(defaultSortColumnIndex, defaultSortDirection);\n isInit && this.dataManager.changeSearchText(props.options.searchText || '');\n isInit && this.dataManager.changeSearchDebounce(props.options.searchDebounceDelay);\n isInit && this.dataManager.changeCurrentPage(props.options.initialPage ? props.options.initialPage : 0);\n isInit && this.dataManager.changePageSize(props.options.pageSize);\n this.dataManager.changePaging(this.isRemoteData() ? false : props.options.paging);\n isInit && this.dataManager.changeParentFunc(props.parentChildData);\n this.dataManager.changeDetailPanelType(props.options.detailPanelType);\n }\n }, {\n key: \"cleanColumns\",\n value: function cleanColumns(columns) {\n return columns.map(function (col) {\n var colClone = _objectSpread({}, col);\n\n delete colClone.tableData;\n return colClone;\n });\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n // const propsChanged = Object.entries(this.props).reduce((didChange, prop) => didChange || prop[1] !== prevProps[prop[0]], false);\n var fixedPrevColumns = this.cleanColumns(prevProps.columns);\n var fixedPropsColumns = this.cleanColumns(this.props.columns);\n var columnPropsChanged = !(0, _react2[\"default\"])(fixedPrevColumns, fixedPropsColumns);\n var propsChanged = columnPropsChanged || !(0, _react2[\"default\"])(prevProps.options, this.props.options);\n\n if (!this.isRemoteData()) {\n propsChanged = propsChanged || !(0, _react2[\"default\"])(prevProps.data, this.props.data);\n }\n\n if (propsChanged) {\n var props = this.getProps(this.props);\n this.setDataManagerFields(props, false, prevProps.columns);\n this.setState(this.dataManager.getRenderState());\n\n if (process.env.NODE_ENV === 'development' && columnPropsChanged && !this.checkedForFunctions && prevProps.columns.length !== 0 && props.data[0] && props.data[0].id !== undefined) {\n var bothContainFunctions = fixedPropsColumns.some(function (column) {\n return Object.values(column).some(function (val) {\n return typeof val === 'function';\n });\n }) && fixedPrevColumns.some(function (column) {\n return Object.values(column).some(function (val) {\n return typeof val === 'function';\n });\n });\n\n if (bothContainFunctions) {\n this.checkedForFunctions = true;\n var currentColumnsWithoutFunctions = functionlessColumns(fixedPropsColumns);\n var prevColumnsWithoutFunctions = functionlessColumns(fixedPrevColumns);\n var columnsEqual = (0, _react2[\"default\"])(currentColumnsWithoutFunctions, prevColumnsWithoutFunctions);\n\n if (columnsEqual) {\n console.warn('The columns provided to material table are static, but contain functions which update on every render, resetting the table state. Provide a stable function or column reference or an row id to prevent state loss.');\n }\n }\n }\n }\n\n var count = this.isRemoteData() ? this.state.query.totalCount : this.state.data.length;\n var currentPage = this.isRemoteData() ? this.state.query.page : this.state.currentPage;\n var pageSize = this.isRemoteData() ? this.state.query.pageSize : this.state.pageSize;\n\n if (count <= pageSize * currentPage && currentPage !== 0) {\n this.onPageChange(null, Math.max(0, Math.ceil(count / pageSize) - 1));\n }\n }\n }, {\n key: \"getProps\",\n value: function getProps(props, prevColumns) {\n var _this3 = this;\n\n var calculatedProps = _objectSpread({}, props || this.props);\n\n calculatedProps.components = _objectSpread(_objectSpread({}, MaterialTable.defaultProps.components), calculatedProps.components);\n calculatedProps.icons = _objectSpread(_objectSpread({}, MaterialTable.defaultProps.icons), calculatedProps.icons);\n calculatedProps.options = _objectSpread(_objectSpread({}, MaterialTable.defaultProps.options), calculatedProps.options);\n\n var localization = _objectSpread(_objectSpread({}, MaterialTable.defaultProps.localization.body), calculatedProps.localization.body);\n\n calculatedProps.actions = (0, _toConsumableArray2[\"default\"])(calculatedProps.actions || []);\n\n if (calculatedProps.options.selection) {\n calculatedProps.actions = calculatedProps.actions.filter(function (a) {\n return a;\n }).map(function (action) {\n if (action.position === 'auto' || action.isFreeAction === false || action.position === undefined && action.isFreeAction === undefined) {\n if (typeof action === 'function') {\n return {\n action: action,\n position: 'toolbarOnSelect'\n };\n } else return _objectSpread(_objectSpread({}, action), {}, {\n position: 'toolbarOnSelect'\n });\n } else if (action.isFreeAction) {\n if (typeof action === 'function') {\n return {\n action: action,\n position: 'toolbar'\n };\n } else return _objectSpread(_objectSpread({}, action), {}, {\n position: 'toolbar'\n });\n } else return action;\n });\n } else {\n calculatedProps.actions = calculatedProps.actions.filter(function (a) {\n return a;\n }).map(function (action) {\n if (action.position === 'auto' || action.isFreeAction === false || action.position === undefined && action.isFreeAction === undefined) {\n if (typeof action === 'function') {\n return {\n action: action,\n position: 'row'\n };\n } else return _objectSpread(_objectSpread({}, action), {}, {\n position: 'row'\n });\n } else if (action.isFreeAction) {\n if (typeof action === 'function') {\n return {\n action: action,\n position: 'toolbar'\n };\n } else return _objectSpread(_objectSpread({}, action), {}, {\n position: 'toolbar'\n });\n } else return action;\n });\n }\n\n if (calculatedProps.editable) {\n if (calculatedProps.editable.onRowAdd) {\n calculatedProps.actions.push({\n icon: calculatedProps.icons.Add,\n tooltip: localization.addTooltip,\n position: 'toolbar',\n disabled: !!this.dataManager.lastEditingRow,\n onClick: function onClick() {\n _this3.dataManager.changeRowEditing();\n\n if (_this3.state.showAddRow) {\n _this3.props.editable.onRowAddCancelled && _this3.props.editable.onRowAddCancelled();\n }\n\n _this3.setState(_objectSpread(_objectSpread({}, _this3.dataManager.getRenderState()), {}, {\n showAddRow: !_this3.state.showAddRow\n }));\n }\n });\n }\n\n if (calculatedProps.editable.onRowUpdate) {\n calculatedProps.actions.push(function (rowData) {\n return {\n icon: calculatedProps.icons.Edit,\n tooltip: calculatedProps.editable.editTooltip ? calculatedProps.editable.editTooltip(rowData) : localization.editTooltip,\n disabled: calculatedProps.editable.isEditable && !calculatedProps.editable.isEditable(rowData),\n hidden: calculatedProps.editable.isEditHidden && calculatedProps.editable.isEditHidden(rowData),\n onClick: function onClick(e, rowData) {\n _this3.dataManager.changeRowEditing(rowData, 'update');\n\n _this3.setState(_objectSpread(_objectSpread({}, _this3.dataManager.getRenderState()), {}, {\n showAddRow: false\n }));\n }\n };\n });\n }\n\n if (calculatedProps.editable.onRowDelete) {\n calculatedProps.actions.push(function (rowData) {\n return {\n icon: calculatedProps.icons.Delete,\n tooltip: calculatedProps.editable.deleteTooltip ? calculatedProps.editable.deleteTooltip(rowData) : localization.deleteTooltip,\n disabled: calculatedProps.editable.isDeletable && !calculatedProps.editable.isDeletable(rowData),\n hidden: calculatedProps.editable.isDeleteHidden && calculatedProps.editable.isDeleteHidden(rowData),\n onClick: function onClick(e, rowData) {\n _this3.dataManager.changeRowEditing(rowData, 'delete');\n\n _this3.setState(_objectSpread(_objectSpread({}, _this3.dataManager.getRenderState()), {}, {\n showAddRow: false\n }));\n }\n };\n });\n }\n\n if (calculatedProps.editable.onBulkUpdate) {\n calculatedProps.actions.push({\n icon: calculatedProps.icons.Edit,\n tooltip: localization.bulkEditTooltip,\n position: 'toolbar',\n hidden: this.dataManager.bulkEditOpen,\n onClick: function onClick() {\n _this3.dataManager.changeBulkEditOpen(true);\n\n _this3.props.onBulkEditOpen && _this3.props.onBulkEditOpen(true);\n\n _this3.setState(_this3.dataManager.getRenderState());\n }\n });\n calculatedProps.actions.push({\n icon: calculatedProps.icons.Check,\n tooltip: localization.bulkEditApprove,\n position: 'toolbar',\n hidden: !this.dataManager.bulkEditOpen,\n onClick: function onClick() {\n return _this3.onEditingApproved('bulk');\n }\n });\n calculatedProps.actions.push({\n icon: calculatedProps.icons.Clear,\n tooltip: localization.bulkEditCancel,\n position: 'toolbar',\n hidden: !this.dataManager.bulkEditOpen,\n onClick: function onClick() {\n _this3.dataManager.changeBulkEditOpen(false);\n\n _this3.props.onBulkEditOpen && _this3.props.onBulkEditOpen(false);\n\n _this3.dataManager.clearBulkEditChangedRows();\n\n _this3.setState(_this3.dataManager.getRenderState());\n }\n });\n }\n }\n\n return calculatedProps;\n }\n }, {\n key: \"renderFooter\",\n value: function renderFooter() {\n var props = this.getProps();\n\n if (props.options.paging) {\n var localization = _objectSpread(_objectSpread({}, MaterialTable.defaultProps.localization.pagination), this.props.localization.pagination);\n\n var isOutsidePageNumbers = this.isOutsidePageNumbers(props);\n var currentPage = isOutsidePageNumbers ? Math.min(props.page, Math.floor(props.totalCount / this.state.pageSize)) : this.state.currentPage;\n var totalCount = isOutsidePageNumbers ? props.totalCount : this.state.data.length;\n return /*#__PURE__*/_react[\"default\"].createElement(_Table2[\"default\"], null, /*#__PURE__*/_react[\"default\"].createElement(_TableFooter2[\"default\"], {\n style: {\n display: 'grid'\n }\n }, /*#__PURE__*/_react[\"default\"].createElement(_TableRow2[\"default\"], null, /*#__PURE__*/_react[\"default\"].createElement(props.components.Pagination, {\n classes: {\n root: props.classes.paginationRoot,\n toolbar: props.classes.paginationToolbar,\n caption: props.classes.paginationCaption,\n selectRoot: props.classes.paginationSelectRoot\n },\n style: {\n \"float\": props.theme.direction === 'rtl' ? '' : 'right',\n overflowX: 'auto'\n },\n colSpan: 3,\n count: this.isRemoteData() ? this.state.query.totalCount : totalCount,\n icons: props.icons,\n rowsPerPage: this.state.pageSize,\n rowsPerPageOptions: props.options.pageSizeOptions,\n SelectProps: {\n renderValue: function renderValue(value) {\n return /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n style: {\n padding: '0px 5px'\n }\n }, value + ' ' + localization.labelRowsSelect + ' ');\n }\n },\n page: this.isRemoteData() ? this.state.query.page : currentPage,\n onPageChange: this.onPageChange,\n onRowsPerPageChange: this.onRowsPerPageChange,\n ActionsComponent: function ActionsComponent(subProps) {\n return props.options.paginationType === 'normal' ? /*#__PURE__*/_react[\"default\"].createElement(_components.MTablePagination, (0, _extends2[\"default\"])({}, subProps, {\n icons: props.icons,\n localization: localization,\n showFirstLastPageButtons: props.options.showFirstLastPageButtons\n })) : /*#__PURE__*/_react[\"default\"].createElement(_components.MTableSteppedPagination, (0, _extends2[\"default\"])({}, subProps, {\n icons: props.icons,\n localization: localization,\n showFirstLastPageButtons: props.options.showFirstLastPageButtons\n }));\n },\n labelDisplayedRows: function labelDisplayedRows(row) {\n return localization.labelDisplayedRows.replace('{from}', row.from).replace('{to}', row.to).replace('{count}', row.count);\n },\n labelRowsPerPage: localization.labelRowsPerPage\n }))));\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this4 = this;\n\n var props = this.getProps();\n return /*#__PURE__*/_react[\"default\"].createElement(_reactBeautifulDnd.DragDropContext, {\n onDragEnd: this.onDragEnd,\n nonce: props.options.cspNonce\n }, /*#__PURE__*/_react[\"default\"].createElement(props.components.Container, {\n style: _objectSpread({\n position: 'relative'\n }, props.style)\n }, props.options.paginationPosition === 'top' || props.options.paginationPosition === 'both' ? this.renderFooter() : null, props.options.toolbar && /*#__PURE__*/_react[\"default\"].createElement(props.components.Toolbar, {\n actions: props.actions,\n components: props.components,\n selectedRows: this.state.selectedCount > 0 ? this.state.originalData.filter(function (a) {\n return a.tableData.checked;\n }) : [],\n columns: this.state.columns,\n columnsButton: props.options.columnsButton,\n icons: props.icons,\n exportAllData: props.options.exportAllData,\n exportMenu: props.options.exportMenu,\n getFieldValue: this.dataManager.getFieldValue,\n data: this.state.data,\n renderData: this.state.renderData,\n search: props.options.search,\n showTitle: props.options.showTitle,\n showTextRowsSelected: props.options.showTextRowsSelected,\n toolbarButtonAlignment: props.options.toolbarButtonAlignment,\n searchFieldAlignment: props.options.searchFieldAlignment,\n searchAutoFocus: props.options.searchAutoFocus,\n searchFieldStyle: props.options.searchFieldStyle,\n searchFieldVariant: props.options.searchFieldVariant,\n title: props.title,\n searchText: this.dataManager.searchText,\n searchDebounceDelay: this.dataManager.searchDebounceDelay,\n onSearchChanged: this.onSearchChangeDebounce,\n isRemoteData: this.isRemoteData(),\n dataManager: this.dataManager,\n onColumnsChanged: this.onChangeColumnHidden,\n localization: _objectSpread(_objectSpread({}, MaterialTable.defaultProps.localization.toolbar), this.props.localization.toolbar)\n }), props.options.grouping && /*#__PURE__*/_react[\"default\"].createElement(props.components.Groupbar, {\n icons: props.icons,\n localization: _objectSpread(_objectSpread({}, MaterialTable.defaultProps.localization.grouping), props.localization.grouping),\n groupColumns: this.state.columns.filter(function (col) {\n return col.tableData.groupOrder > -1;\n }).sort(function (col1, col2) {\n return col1.tableData.groupOrder - col2.tableData.groupOrder;\n }),\n onSortChanged: this.onChangeGroupOrder,\n onGroupRemoved: this.onGroupRemoved,\n persistentGroupingsId: props.options.persistentGroupingsId\n }), /*#__PURE__*/_react[\"default\"].createElement(_components.MTableScrollbar, {\n \"double\": props.options.doubleHorizontalScroll\n }, /*#__PURE__*/_react[\"default\"].createElement(_reactBeautifulDnd.Droppable, {\n droppableId: \"headers\",\n direction: \"horizontal\"\n }, function (provided, snapshot) {\n var table = _this4.renderTable(props);\n\n return /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n ref: provided.innerRef\n }, /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n ref: _this4.tableContainerDiv,\n style: {\n maxHeight: props.options.maxBodyHeight,\n minHeight: props.options.minBodyHeight,\n overflowY: props.options.overflowY\n }\n }, _this4.state.width && props.options.fixedColumns && props.options.fixedColumns.right ? /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n style: {\n width: _this4.getColumnsWidth(props, -1 * props.options.fixedColumns.right),\n position: 'absolute',\n top: 0,\n right: 0,\n boxShadow: '-2px 0px 15px rgba(125,147,178,.25)',\n overflowX: 'clip',\n zIndex: 11\n }\n }, /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n style: {\n width: _this4.state.width,\n background: 'white',\n transform: \"translateX(calc(\".concat(_this4.getColumnsWidth(props, -1 * props.options.fixedColumns.right), \" - 100%))\")\n }\n }, table)) : null, /*#__PURE__*/_react[\"default\"].createElement(\"div\", null, table), _this4.state.width && props.options.fixedColumns && props.options.fixedColumns.left ? /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n style: {\n width: _this4.getColumnsWidth(props, props.options.fixedColumns.left),\n position: 'absolute',\n top: 0,\n left: 0,\n boxShadow: '2px 0px 15px rgba(125,147,178,.25)',\n overflowX: 'hidden',\n zIndex: 11\n }\n }, /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n style: {\n width: _this4.state.width,\n background: 'white'\n },\n onKeyDown: function onKeyDown(e) {\n if (e.key === 'Tab') {\n e.preventDefault();\n }\n }\n }, table)) : null), provided.placeholder);\n })), (this.state.isLoading || props.isLoading) && props.options.loadingType === 'linear' && /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n style: {\n position: 'relative',\n width: '100%'\n }\n }, /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n style: {\n position: 'absolute',\n top: 0,\n left: 0,\n height: '100%',\n width: '100%'\n }\n }, /*#__PURE__*/_react[\"default\"].createElement(_LinearProgress2[\"default\"], null))), props.options.paginationPosition === 'bottom' || props.options.paginationPosition === 'both' ? this.renderFooter() : null, (this.state.isLoading || props.isLoading) && props.options.loadingType === 'overlay' && /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n style: {\n position: 'absolute',\n top: 0,\n left: 0,\n height: '100%',\n width: '100%',\n zIndex: 11\n }\n }, /*#__PURE__*/_react[\"default\"].createElement(props.components.OverlayLoading, {\n theme: props.theme\n })), this.state.errorState && this.state.errorState.errorCause === 'query' && /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n style: {\n position: 'absolute',\n top: 0,\n left: 0,\n height: '100%',\n width: '100%',\n zIndex: 11\n }\n }, /*#__PURE__*/_react[\"default\"].createElement(props.components.OverlayError, {\n error: this.state.errorState,\n retry: this.retry,\n theme: props.theme,\n icon: props.icons.Retry\n }))));\n }\n }]);\n return MaterialTable;\n}(_react[\"default\"].Component);\n\nexports[\"default\"] = MaterialTable;\n\nfunction functionlessColumns(columns) {\n return columns.map(function (col) {\n return Object.entries(col).reduce(function (obj, _ref) {\n var _ref2 = (0, _slicedToArray2[\"default\"])(_ref, 2),\n key = _ref2[0],\n val = _ref2[1];\n\n if (typeof val !== 'function') {\n obj[key] = val;\n }\n\n return obj;\n }, {});\n });\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.propTypes = void 0;\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar RefComponent = _propTypes[\"default\"].shape({\n current: _propTypes[\"default\"].element\n});\n\nvar StyledComponent = _propTypes[\"default\"].shape({\n classes: _propTypes[\"default\"].object,\n innerRef: RefComponent\n});\n\nvar propTypes = {\n actions: _propTypes[\"default\"].arrayOf(_propTypes[\"default\"].oneOfType([_propTypes[\"default\"].func, _propTypes[\"default\"].shape({\n icon: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, _propTypes[\"default\"].string, RefComponent]).isRequired,\n isFreeAction: _propTypes[\"default\"].bool,\n position: _propTypes[\"default\"].oneOf(['auto', 'toolbar', 'toolbarOnSelect', 'row']),\n tooltip: _propTypes[\"default\"].string,\n onClick: _propTypes[\"default\"].func.isRequired,\n onMouseEnter: _propTypes[\"default\"].func,\n onMouseLeave: _propTypes[\"default\"].func,\n iconProps: _propTypes[\"default\"].object,\n disabled: _propTypes[\"default\"].bool,\n hidden: _propTypes[\"default\"].bool\n }), _propTypes[\"default\"].shape({\n action: _propTypes[\"default\"].func,\n position: _propTypes[\"default\"].oneOf(['auto', 'toolbar', 'toolbarOnSelect', 'row'])\n })])),\n renderSummaryRow: _propTypes[\"default\"].func,\n columns: _propTypes[\"default\"].arrayOf(_propTypes[\"default\"].shape({\n cellStyle: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].object, _propTypes[\"default\"].func]),\n currencySetting: _propTypes[\"default\"].shape({\n locale: _propTypes[\"default\"].string,\n currencyCode: _propTypes[\"default\"].string,\n minimumFractionDigits: _propTypes[\"default\"].number,\n maximumFractionDigits: _propTypes[\"default\"].number\n }),\n ariaLabel: _propTypes[\"default\"].string,\n ariaSortAsc: _propTypes[\"default\"].string,\n ariaSortDesc: _propTypes[\"default\"].string,\n draggable: _propTypes[\"default\"].bool,\n customFilterAndSearch: _propTypes[\"default\"].func,\n customSort: _propTypes[\"default\"].func,\n customExport: _propTypes[\"default\"].func,\n defaultFilter: _propTypes[\"default\"].any,\n defaultSort: _propTypes[\"default\"].oneOf(['asc', 'desc']),\n editComponent: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func]),\n emptyValue: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].string, _propTypes[\"default\"].node, _propTypes[\"default\"].func]),\n \"export\": _propTypes[\"default\"].bool,\n field: _propTypes[\"default\"].string,\n filtering: _propTypes[\"default\"].bool,\n filterCellStyle: _propTypes[\"default\"].object,\n filterPlaceholder: _propTypes[\"default\"].string,\n filterComponent: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func]),\n grouping: _propTypes[\"default\"].bool,\n headerStyle: _propTypes[\"default\"].object,\n hidden: _propTypes[\"default\"].bool,\n hideFilterIcon: _propTypes[\"default\"].bool,\n initialEditValue: _propTypes[\"default\"].any,\n lookup: _propTypes[\"default\"].object,\n editable: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].func, _propTypes[\"default\"].oneOf(['always', 'onUpdate', 'onAdd', 'never'])]),\n removable: _propTypes[\"default\"].bool,\n render: _propTypes[\"default\"].func,\n searchable: _propTypes[\"default\"].bool,\n sorting: _propTypes[\"default\"].bool,\n title: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].string]),\n type: _propTypes[\"default\"].oneOf(['string', 'boolean', 'numeric', 'date', 'datetime', 'time', 'currency'])\n })).isRequired,\n components: _propTypes[\"default\"].shape({\n Action: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, StyledComponent]),\n Actions: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, StyledComponent]),\n Body: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, StyledComponent]),\n Cell: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, StyledComponent]),\n Container: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, StyledComponent]),\n EditField: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, StyledComponent]),\n EditRow: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, StyledComponent]),\n FilterRow: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, StyledComponent]),\n Groupbar: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, StyledComponent]),\n GroupRow: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, StyledComponent]),\n Header: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, StyledComponent]),\n OverlayLoading: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, StyledComponent]),\n OverlayError: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, StyledComponent]),\n Pagination: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, StyledComponent]),\n Row: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, StyledComponent]),\n Toolbar: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, StyledComponent])\n }),\n data: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].arrayOf(_propTypes[\"default\"].object), _propTypes[\"default\"].func]).isRequired,\n editable: _propTypes[\"default\"].shape({\n isEditable: _propTypes[\"default\"].func,\n isDeletable: _propTypes[\"default\"].func,\n onRowAdd: _propTypes[\"default\"].func,\n onRowUpdate: _propTypes[\"default\"].func,\n onRowDelete: _propTypes[\"default\"].func,\n onRowAddCancelled: _propTypes[\"default\"].func,\n onRowUpdateCancelled: _propTypes[\"default\"].func,\n isEditHidden: _propTypes[\"default\"].func,\n isDeleteHidden: _propTypes[\"default\"].func\n }),\n detailPanel: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].func, _propTypes[\"default\"].arrayOf(_propTypes[\"default\"].oneOfType([_propTypes[\"default\"].func, _propTypes[\"default\"].shape({\n disabled: _propTypes[\"default\"].bool,\n icon: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, _propTypes[\"default\"].string, RefComponent]),\n openIcon: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, _propTypes[\"default\"].string, RefComponent]),\n tooltip: _propTypes[\"default\"].string,\n render: _propTypes[\"default\"].func.isRequired\n })]))]),\n icons: _propTypes[\"default\"].shape({\n Add: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, RefComponent]),\n Check: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, RefComponent]),\n Clear: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, RefComponent]),\n Delete: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, RefComponent]),\n DetailPanel: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, RefComponent]),\n Edit: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, RefComponent]),\n Export: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, RefComponent]),\n Filter: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, RefComponent]),\n FirstPage: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, RefComponent]),\n LastPage: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, RefComponent]),\n NextPage: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, RefComponent]),\n PreviousPage: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, RefComponent]),\n Refresh: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, RefComponent]),\n ResetSearch: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, RefComponent]),\n Search: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, RefComponent]),\n SortArrow: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, RefComponent]),\n ThirdStateCheck: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, RefComponent]),\n ViewColumn: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].func, RefComponent])\n }),\n isLoading: _propTypes[\"default\"].bool,\n title: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].element, _propTypes[\"default\"].string]),\n options: _propTypes[\"default\"].shape({\n actionsCellStyle: _propTypes[\"default\"].object,\n editCellStyle: _propTypes[\"default\"].object,\n idSynonym: _propTypes[\"default\"].string,\n detailPanelColumnStyle: _propTypes[\"default\"].object,\n actionsColumnIndex: _propTypes[\"default\"].number,\n addRowPosition: _propTypes[\"default\"].oneOf(['first', 'last']),\n columnsButton: _propTypes[\"default\"].bool,\n defaultExpanded: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].bool, _propTypes[\"default\"].func]),\n debounceInterval: _propTypes[\"default\"].number,\n detailPanelType: _propTypes[\"default\"].oneOf(['single', 'multiple']),\n doubleHorizontalScroll: _propTypes[\"default\"].bool,\n emptyRowsWhenPaging: _propTypes[\"default\"].bool,\n exportAllData: _propTypes[\"default\"].bool,\n exportMenu: _propTypes[\"default\"].arrayOf(_propTypes[\"default\"].shape({\n label: _propTypes[\"default\"].string,\n exportFunc: _propTypes[\"default\"].func\n })),\n filtering: _propTypes[\"default\"].bool,\n filterCellStyle: _propTypes[\"default\"].object,\n filterRowStyle: _propTypes[\"default\"].object,\n header: _propTypes[\"default\"].bool,\n headerSelectionProps: _propTypes[\"default\"].object,\n headerStyle: _propTypes[\"default\"].object,\n hideFilterIcons: _propTypes[\"default\"].bool,\n initialPage: _propTypes[\"default\"].number,\n maxBodyHeight: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].number, _propTypes[\"default\"].string]),\n minBodyHeight: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].number, _propTypes[\"default\"].string]),\n loadingType: _propTypes[\"default\"].oneOf(['overlay', 'linear']),\n overflowY: _propTypes[\"default\"].oneOf(['visible', 'hidden', 'scroll', 'auto', 'initial', 'inherit']),\n padding: _propTypes[\"default\"].oneOf(['default', 'dense']),\n paging: _propTypes[\"default\"].bool,\n pageSize: _propTypes[\"default\"].number,\n pageSizeOptions: _propTypes[\"default\"].arrayOf(_propTypes[\"default\"].number),\n paginationType: _propTypes[\"default\"].oneOf(['normal', 'stepped']),\n paginationPosition: _propTypes[\"default\"].oneOf(['bottom', 'top', 'both']),\n persistentGroupingsId: _propTypes[\"default\"].string,\n rowStyle: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].object, _propTypes[\"default\"].func]),\n search: _propTypes[\"default\"].bool,\n searchText: _propTypes[\"default\"].string,\n searchDebounceDelay: _propTypes[\"default\"].number,\n toolbarButtonAlignment: _propTypes[\"default\"].oneOf(['left', 'right']),\n searchFieldAlignment: _propTypes[\"default\"].oneOf(['left', 'right']),\n searchFieldStyle: _propTypes[\"default\"].object,\n searchAutoFocus: _propTypes[\"default\"].bool,\n searchFieldVariant: _propTypes[\"default\"].oneOf(['standard', 'filled', 'outlined']),\n selection: _propTypes[\"default\"].bool,\n selectionProps: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].object, _propTypes[\"default\"].func]),\n showEmptyDataSourceMessage: _propTypes[\"default\"].bool,\n showFirstLastPageButtons: _propTypes[\"default\"].bool,\n showSelectAllCheckbox: _propTypes[\"default\"].bool,\n showSelectGroupCheckbox: _propTypes[\"default\"].bool,\n showTitle: _propTypes[\"default\"].bool,\n showTextRowsSelected: _propTypes[\"default\"].bool,\n sorting: _propTypes[\"default\"].bool,\n keepSortDirectionOnColumnSwitch: _propTypes[\"default\"].bool,\n toolbar: _propTypes[\"default\"].bool,\n thirdSortClick: _propTypes[\"default\"].bool\n }),\n localization: _propTypes[\"default\"].shape({\n grouping: _propTypes[\"default\"].shape({\n groupedBy: _propTypes[\"default\"].string,\n placeholder: _propTypes[\"default\"].string\n }),\n pagination: _propTypes[\"default\"].object,\n toolbar: _propTypes[\"default\"].object,\n header: _propTypes[\"default\"].object,\n body: _propTypes[\"default\"].object\n }),\n initialFormData: _propTypes[\"default\"].object,\n onSearchChange: _propTypes[\"default\"].func,\n onFilterChange: _propTypes[\"default\"].func,\n onColumnDragged: _propTypes[\"default\"].func,\n onColumnResized: _propTypes[\"default\"].func,\n onGroupRemoved: _propTypes[\"default\"].func,\n onSelectionChange: _propTypes[\"default\"].func,\n onRowsPerPageChange: _propTypes[\"default\"].func,\n onPageChange: _propTypes[\"default\"].func,\n onChangeColumnHidden: _propTypes[\"default\"].func,\n onOrderChange: _propTypes[\"default\"].func,\n onRowClick: _propTypes[\"default\"].func,\n onRowDoubleClick: _propTypes[\"default\"].func,\n onTreeExpandChange: _propTypes[\"default\"].func,\n onQueryChange: _propTypes[\"default\"].func,\n onBulkEditOpen: _propTypes[\"default\"].func,\n tableRef: _propTypes[\"default\"].any,\n style: _propTypes[\"default\"].object,\n page: _propTypes[\"default\"].number,\n totalCount: _propTypes[\"default\"].number\n};\nexports.propTypes = propTypes;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.widthToNumber = exports.reducePercentsInCalc = exports.selectionMaxWidth = exports.actionsColumnWidth = exports.rowActions = exports.baseIconSize = exports.elementSize = void 0;\n\nvar elementSize = function elementSize(props) {\n return props.options.padding === 'default' ? 'medium' : 'small';\n};\n\nexports.elementSize = elementSize;\n\nvar baseIconSize = function baseIconSize(props) {\n return elementSize(props) === 'medium' ? 48 : 32;\n};\n\nexports.baseIconSize = baseIconSize;\n\nvar rowActions = function rowActions(props) {\n return props.actions ? props.actions.filter(function (a) {\n return a.position === 'row' || typeof a === 'function';\n }) : [];\n};\n\nexports.rowActions = rowActions;\n\nvar actionsColumnWidth = function actionsColumnWidth(props) {\n return rowActions(props).length * baseIconSize(props);\n};\n\nexports.actionsColumnWidth = actionsColumnWidth;\n\nvar selectionMaxWidth = function selectionMaxWidth(props, maxTreeLevel) {\n return baseIconSize(props) + 9 * maxTreeLevel;\n};\n\nexports.selectionMaxWidth = selectionMaxWidth;\n\nvar reducePercentsInCalc = function reducePercentsInCalc(calc, fullValue) {\n var captureGroups = calc.match(/(\\d*)%/);\n\n if (captureGroups && captureGroups.length > 1) {\n var percentage = captureGroups[1];\n return calc.replace(/\\d*%/, \"\".concat(fullValue * (percentage / 100), \"px\"));\n }\n\n return calc.replace(/\\d*%/, \"\".concat(fullValue, \"px\"));\n};\n\nexports.reducePercentsInCalc = reducePercentsInCalc;\n\nvar widthToNumber = function widthToNumber(width) {\n if (typeof width === 'number') return width;\n if (!width || !width.match(/^\\s*\\d+(px)?\\s*$/)) return NaN;\n return Number(width.replace(/px$/, ''));\n};\n\nexports.widthToNumber = widthToNumber;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\n\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\n\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _format = _interopRequireDefault(require(\"date-fns/format\"));\n\nvar _uuid = _interopRequireDefault(require(\"uuid\"));\n\nvar _2 = require(\"./\");\n\nvar _commonValues = require(\"./common-values\");\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2[\"default\"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nvar DataManager = /*#__PURE__*/function () {\n function DataManager() {\n var _this = this;\n\n (0, _classCallCheck2[\"default\"])(this, DataManager);\n (0, _defineProperty2[\"default\"])(this, \"checkForId\", false);\n (0, _defineProperty2[\"default\"])(this, \"applyFilters\", false);\n (0, _defineProperty2[\"default\"])(this, \"applySearch\", false);\n (0, _defineProperty2[\"default\"])(this, \"applySort\", false);\n (0, _defineProperty2[\"default\"])(this, \"currentPage\", 0);\n (0, _defineProperty2[\"default\"])(this, \"detailPanelType\", 'multiple');\n (0, _defineProperty2[\"default\"])(this, \"lastDetailPanelRow\", undefined);\n (0, _defineProperty2[\"default\"])(this, \"lastEditingRow\", undefined);\n (0, _defineProperty2[\"default\"])(this, \"orderBy\", -1);\n (0, _defineProperty2[\"default\"])(this, \"orderDirection\", 'desc');\n (0, _defineProperty2[\"default\"])(this, \"pageSize\", 5);\n (0, _defineProperty2[\"default\"])(this, \"paging\", true);\n (0, _defineProperty2[\"default\"])(this, \"parentFunc\", null);\n (0, _defineProperty2[\"default\"])(this, \"searchText\", '');\n (0, _defineProperty2[\"default\"])(this, \"searchDebounceDelay\", 500);\n (0, _defineProperty2[\"default\"])(this, \"selectedCount\", 0);\n (0, _defineProperty2[\"default\"])(this, \"treefiedDataLength\", 0);\n (0, _defineProperty2[\"default\"])(this, \"treeDataMaxLevel\", 0);\n (0, _defineProperty2[\"default\"])(this, \"groupedDataLength\", 0);\n (0, _defineProperty2[\"default\"])(this, \"defaultExpanded\", false);\n (0, _defineProperty2[\"default\"])(this, \"bulkEditOpen\", false);\n (0, _defineProperty2[\"default\"])(this, \"bulkEditChangedRows\", {});\n (0, _defineProperty2[\"default\"])(this, \"data\", []);\n (0, _defineProperty2[\"default\"])(this, \"columns\", []);\n (0, _defineProperty2[\"default\"])(this, \"filteredData\", []);\n (0, _defineProperty2[\"default\"])(this, \"searchedData\", []);\n (0, _defineProperty2[\"default\"])(this, \"groupedData\", []);\n (0, _defineProperty2[\"default\"])(this, \"treefiedData\", []);\n (0, _defineProperty2[\"default\"])(this, \"sortedData\", []);\n (0, _defineProperty2[\"default\"])(this, \"pagedData\", []);\n (0, _defineProperty2[\"default\"])(this, \"renderData\", []);\n (0, _defineProperty2[\"default\"])(this, \"filtered\", false);\n (0, _defineProperty2[\"default\"])(this, \"searched\", false);\n (0, _defineProperty2[\"default\"])(this, \"grouped\", false);\n (0, _defineProperty2[\"default\"])(this, \"treefied\", false);\n (0, _defineProperty2[\"default\"])(this, \"sorted\", false);\n (0, _defineProperty2[\"default\"])(this, \"paged\", false);\n (0, _defineProperty2[\"default\"])(this, \"tableWidth\", 'full');\n (0, _defineProperty2[\"default\"])(this, \"tableStyleWidth\", '100%');\n (0, _defineProperty2[\"default\"])(this, \"rootGroupsIndex\", {});\n (0, _defineProperty2[\"default\"])(this, \"changeGroupSelected\", function (checked, path) {\n var currentGroup;\n var currentGroupArray = _this.groupedData;\n path.forEach(function (value) {\n currentGroup = currentGroupArray.find(function (group) {\n return group.value == value;\n });\n currentGroupArray = currentGroup.groups;\n });\n\n var setCheck = function setCheck(data) {\n data.forEach(function (element) {\n if (element.groups.length > 0) {\n setCheck(element.groups);\n } else {\n element.data.forEach(function (d) {\n if (d.tableData.checked != checked) {\n d.tableData.checked = d.tableData.disabled ? false : checked;\n _this.selectedCount = _this.selectedCount + (checked ? 1 : -1);\n }\n });\n }\n });\n };\n\n setCheck([currentGroup]);\n });\n (0, _defineProperty2[\"default\"])(this, \"startCellEditable\", function (rowData, columnDef) {\n rowData.tableData.editCellList = [].concat((0, _toConsumableArray2[\"default\"])(rowData.tableData.editCellList || []), [columnDef]);\n });\n (0, _defineProperty2[\"default\"])(this, \"finishCellEditable\", function (rowData, columnDef) {\n if (rowData.tableData.editCellList) {\n var index = rowData.tableData.editCellList.findIndex(function (c) {\n return c.tableData.id === columnDef.tableData.id;\n });\n\n if (index !== -1) {\n rowData.tableData.editCellList.splice(index, 1);\n }\n }\n });\n (0, _defineProperty2[\"default\"])(this, \"clearBulkEditChangedRows\", function () {\n _this.bulkEditChangedRows = {};\n });\n (0, _defineProperty2[\"default\"])(this, \"onBulkEditRowChanged\", function (oldData, newData) {\n _this.bulkEditChangedRows[oldData.tableData.id] = {\n oldData: oldData,\n newData: newData\n };\n });\n (0, _defineProperty2[\"default\"])(this, \"expandTreeForNodes\", function (data) {\n data.forEach(function (row) {\n var currentRow = row;\n\n while (_this.parentFunc(currentRow, _this.data)) {\n var parent = _this.parentFunc(currentRow, _this.data);\n\n if (parent) {\n parent.tableData.isTreeExpanded = true;\n }\n\n currentRow = parent;\n }\n });\n });\n (0, _defineProperty2[\"default\"])(this, \"findDataByPath\", function (renderData, path) {\n if (_this.isDataType('tree')) {\n var node = path.reduce(function (result, current) {\n return result && result.tableData && result.tableData.childRows && result.tableData.childRows.find(function (row) {\n return row && row.tableData.uuid === current;\n });\n }, {\n tableData: {\n childRows: renderData\n }\n });\n return node;\n } else {\n var data = {\n groups: renderData\n };\n\n var _node = path.reduce(function (result, current) {\n if (result.groups.length > 0) {\n return result.groups[current];\n } else if (result.data) {\n return result.data[current] || result.data.find(function (data) {\n var _data$tableData;\n\n return ((_data$tableData = data.tableData) === null || _data$tableData === void 0 ? void 0 : _data$tableData.uuid) === current;\n });\n } else {\n return undefined;\n }\n }, data);\n\n return _node;\n }\n });\n (0, _defineProperty2[\"default\"])(this, \"getFieldValue\", function (rowData, columnDef) {\n var lookup = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var value = typeof rowData[columnDef.field] !== 'undefined' ? rowData[columnDef.field] : (0, _2.selectFromObject)(rowData, columnDef.field);\n\n if (columnDef.lookup && lookup) {\n value = columnDef.lookup[value];\n }\n\n return value;\n });\n (0, _defineProperty2[\"default\"])(this, \"getRenderState\", function () {\n if (_this.filtered === false) {\n _this.filterData();\n }\n\n if (_this.searched === false) {\n _this.searchData();\n }\n\n if (_this.grouped === false && _this.isDataType('group')) {\n _this.groupData();\n }\n\n if (_this.treefied === false && _this.isDataType('tree')) {\n _this.treefyData();\n }\n\n if (_this.sorted === false) {\n _this.sortData();\n }\n\n if (_this.paged === false) {\n _this.pageData();\n }\n\n return {\n columns: _this.columns,\n currentPage: _this.currentPage,\n data: _this.sortedData,\n lastEditingRow: _this.lastEditingRow,\n orderBy: _this.orderBy,\n orderDirection: _this.orderDirection,\n originalData: _this.data,\n pageSize: _this.pageSize,\n renderData: _this.pagedData,\n searchText: _this.searchText,\n selectedCount: _this.selectedCount,\n treefiedDataLength: _this.treefiedDataLength,\n treeDataMaxLevel: _this.treeDataMaxLevel,\n groupedDataLength: _this.groupedDataLength,\n tableStyleWidth: _this.tableStyleWidth\n };\n });\n (0, _defineProperty2[\"default\"])(this, \"filterData\", function () {\n _this.searched = _this.grouped = _this.treefied = _this.sorted = _this.paged = false;\n _this.filteredData = (0, _toConsumableArray2[\"default\"])(_this.data);\n\n if (_this.applyFilters) {\n _this.columns.filter(function (columnDef) {\n return columnDef.tableData.filterValue;\n }).forEach(function (columnDef) {\n var lookup = columnDef.lookup,\n type = columnDef.type,\n tableData = columnDef.tableData;\n\n if (columnDef.customFilterAndSearch) {\n _this.filteredData = _this.filteredData.filter(function (row) {\n return !!columnDef.customFilterAndSearch(tableData.filterValue, row, columnDef);\n });\n } else {\n if (lookup) {\n _this.filteredData = _this.filteredData.filter(function (row) {\n var value = _this.getFieldValue(row, columnDef, false);\n\n return !tableData.filterValue || tableData.filterValue.length === 0 || tableData.filterValue.indexOf(value !== undefined && value !== null && value.toString()) > -1;\n });\n } else if (type === 'numeric') {\n _this.filteredData = _this.filteredData.filter(function (row) {\n var value = _this.getFieldValue(row, columnDef);\n\n return value + '' === tableData.filterValue;\n });\n } else if (type === 'boolean' && tableData.filterValue) {\n _this.filteredData = _this.filteredData.filter(function (row) {\n var value = _this.getFieldValue(row, columnDef);\n\n return value && tableData.filterValue === 'checked' || !value && tableData.filterValue === 'unchecked';\n });\n } else if (['date', 'datetime'].includes(type)) {\n _this.filteredData = _this.filteredData.filter(function (row) {\n var value = _this.getFieldValue(row, columnDef);\n\n var currentDate = value ? new Date(value) : null;\n\n if (currentDate && currentDate.toString() !== 'Invalid Date') {\n var selectedDate = tableData.filterValue;\n var currentDateToCompare = '';\n var selectedDateToCompare = '';\n\n if (type === 'date') {\n currentDateToCompare = (0, _format[\"default\"])(currentDate, 'MM/dd/yyyy');\n selectedDateToCompare = (0, _format[\"default\"])(selectedDate, 'MM/dd/yyyy');\n } else if (type === 'datetime') {\n currentDateToCompare = (0, _format[\"default\"])(currentDate, 'MM/dd/yyyy - HH:mm');\n selectedDateToCompare = (0, _format[\"default\"])(selectedDate, 'MM/dd/yyyy - HH:mm');\n }\n\n return currentDateToCompare === selectedDateToCompare;\n }\n\n return true;\n });\n } else if (type === 'time') {\n _this.filteredData = _this.filteredData.filter(function (row) {\n var value = _this.getFieldValue(row, columnDef);\n\n var currentHour = value || null;\n\n if (currentHour) {\n var selectedHour = tableData.filterValue;\n var currentHourToCompare = (0, _format[\"default\"])(selectedHour, 'HH:mm');\n return currentHour === currentHourToCompare;\n }\n\n return true;\n });\n } else {\n _this.filteredData = _this.filteredData.filter(function (row) {\n var value = _this.getFieldValue(row, columnDef);\n\n return value && value.toString().toUpperCase().includes(tableData.filterValue.toUpperCase());\n });\n }\n }\n });\n }\n\n _this.filtered = true;\n });\n (0, _defineProperty2[\"default\"])(this, \"searchData\", function () {\n _this.grouped = _this.treefied = _this.sorted = _this.paged = false;\n _this.searchedData = (0, _toConsumableArray2[\"default\"])(_this.filteredData);\n\n if (_this.searchText && _this.applySearch) {\n var trimmedSearchText = _this.searchText.trim();\n\n _this.searchedData = _this.searchedData.filter(function (row) {\n return _this.columns.filter(function (columnDef) {\n return columnDef.searchable === undefined ? !columnDef.hidden : columnDef.searchable;\n }).some(function (columnDef) {\n if (columnDef.customFilterAndSearch) {\n return !!columnDef.customFilterAndSearch(trimmedSearchText, row, columnDef);\n } else if (columnDef.field) {\n var value = _this.getFieldValue(row, columnDef);\n\n if (value) {\n return value.toString().toUpperCase().includes(trimmedSearchText.toUpperCase());\n }\n }\n });\n });\n }\n\n _this.searched = true;\n });\n }\n\n (0, _createClass2[\"default\"])(DataManager, [{\n key: \"setData\",\n value: function setData(data, idSynonym) {\n var _this2 = this;\n\n this.selectedCount = 0;\n var prevDataObject = {};\n\n if (this.data.length !== 0 && this.data[0][idSynonym] !== undefined) {\n prevDataObject = this.data.reduce(function (obj, row) {\n obj[row.tableData.id] = row.tableData;\n return obj;\n }, {});\n }\n\n if (process.env.NODE_ENV === 'development' && !this.checkForId) {\n this.checkForId = true;\n\n if (data.some(function (d) {\n return d[idSynonym] === undefined;\n })) {\n console.warn('The table requires all rows to have an unique id property. A row was provided without id in the rows prop. To prevent the loss of state between renders, please provide an unique id for each row.');\n }\n }\n\n this.data = data.map(function (row, index) {\n var prevTableData = prevDataObject[row[idSynonym]] || {};\n\n var tableData = _objectSpread(_objectSpread({\n id: row[idSynonym] || index,\n // `uuid` acts as our 'key' and is generated when new data\n // is passed into material-table externally.\n uuid: row.uuid || _uuid[\"default\"].v4()\n }, prevTableData), row.tableData);\n\n if (tableData.checked) {\n _this2.selectedCount++;\n }\n\n var newRow = _objectSpread(_objectSpread({}, row), {}, {\n tableData: tableData\n });\n\n if (_this2.lastDetailPanelRow && _this2.lastDetailPanelRow.tableData === prevTableData) {\n _this2.lastDetailPanelRow = newRow;\n }\n\n if (_this2.lastEditingRow && _this2.lastEditingRow.tableData === prevTableData) {\n _this2.lastEditingRow = newRow;\n }\n\n return newRow;\n });\n this.filtered = false;\n }\n }, {\n key: \"setTableWidth\",\n value: function setTableWidth(tableWidth) {\n this.tableWidth = tableWidth;\n }\n }, {\n key: \"setColumns\",\n value: function setColumns(columns) {\n var prevColumns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var savedColumns = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var usedWidthPx = 0;\n var usedWidthNotPx = [];\n this.columns = columns.map(function (columnDef, index) {\n var _savedColumns$columnD;\n\n var widthPx = (0, _commonValues.widthToNumber)(columnDef.width);\n var width = typeof columnDef.width === 'number' ? columnDef.width + 'px' : columnDef.width;\n\n if (width //&&\n //columnDef.tableData // &&\n // columnDef.tableData.width !== undefined\n ) {\n if (widthPx !== NaN) {\n usedWidthPx += widthPx;\n } else {\n usedWidthNotPx.push(width);\n }\n }\n\n var prevColumn = prevColumns.find(function (_ref) {\n var id = _ref.id;\n return id === index;\n });\n var savedColumnTableData = (_savedColumns$columnD = savedColumns[columnDef.field]) !== null && _savedColumns$columnD !== void 0 ? _savedColumns$columnD : {};\n\n var tableData = _objectSpread(_objectSpread(_objectSpread(_objectSpread({\n columnOrder: index,\n filterValue: columnDef.defaultFilter,\n groupOrder: columnDef.defaultGroupOrder,\n groupSort: columnDef.defaultGroupSort || 'asc',\n width: width,\n initialWidth: width,\n widthPx: widthPx === NaN ? undefined : widthPx,\n additionalWidth: 0\n }, savedColumnTableData), prevColumn ? prevColumn.tableData : {}), columnDef.tableData), {}, {\n id: index\n });\n\n columnDef.tableData = tableData;\n return columnDef;\n });\n var undefWidthCols = this.columns.filter(function (c) {\n if (c.hidden) {\n // Hidden column\n return false;\n }\n\n if (c.columnDef && c.columnDef.tableData && c.columnDef.tableData.width) {\n // tableData.width already calculated\n return false;\n } // Calculate width if no value provided\n\n\n return c.width === undefined;\n });\n var usedWidth = (usedWidthPx !== 0 ? \"\".concat(usedWidthPx, \"px\") : '0px') + (usedWidthNotPx.length > 0 ? ' - ' + usedWidthNotPx.join(' - ') : '');\n undefWidthCols.forEach(function (columnDef) {\n columnDef.tableData.width = columnDef.tableData.initialWidth = \"calc((100% - \".concat(usedWidth, \") / \").concat(undefWidthCols.length, \")\");\n });\n this.tableStyleWidth = this.tableWidth === 'full' || undefWidthCols.length > 0 || usedWidthNotPx.length > 0 ? '100%' : usedWidthPx;\n }\n }, {\n key: \"setDefaultExpanded\",\n value: function setDefaultExpanded(expanded) {\n this.defaultExpanded = expanded;\n }\n }, {\n key: \"changeApplySearch\",\n value: function changeApplySearch(applySearch) {\n this.applySearch = applySearch;\n this.searched = false;\n }\n }, {\n key: \"changeApplyFilters\",\n value: function changeApplyFilters(applyFilters) {\n this.applyFilters = applyFilters;\n this.filtered = false;\n }\n }, {\n key: \"changeApplySort\",\n value: function changeApplySort(applySort) {\n this.applySort = applySort;\n this.sorted = false;\n }\n }, {\n key: \"changePaging\",\n value: function changePaging(paging) {\n this.paging = paging;\n this.paged = false;\n }\n }, {\n key: \"changeCurrentPage\",\n value: function changeCurrentPage(currentPage) {\n this.currentPage = currentPage;\n this.paged = false;\n }\n }, {\n key: \"changePageSize\",\n value: function changePageSize(pageSize) {\n this.pageSize = pageSize;\n this.paged = false;\n }\n }, {\n key: \"changeParentFunc\",\n value: function changeParentFunc(parentFunc) {\n this.parentFunc = parentFunc;\n }\n }, {\n key: \"changeFilterValue\",\n value: function changeFilterValue(columnId, value) {\n this.columns[columnId].tableData.filterValue = value;\n this.filtered = false;\n }\n }, {\n key: \"changeRowSelected\",\n value: function changeRowSelected(checked, path) {\n var _this3 = this;\n\n var rowData = this.findDataByPath(this.sortedData, path);\n rowData.tableData.checked = checked;\n this.selectedCount = this.selectedCount + (checked ? 1 : -1);\n\n var checkChildRows = function checkChildRows(rowData) {\n if (rowData.tableData.childRows) {\n rowData.tableData.childRows.forEach(function (childRow) {\n if (childRow.tableData.checked !== checked) {\n childRow.tableData.checked = checked;\n _this3.selectedCount = _this3.selectedCount + (checked ? 1 : -1);\n }\n\n checkChildRows(childRow);\n });\n }\n };\n\n checkChildRows(rowData);\n this.filtered = false;\n }\n }, {\n key: \"changeDetailPanelVisibility\",\n value: function changeDetailPanelVisibility(path, render) {\n var rowData = this.findDataByPath(this.sortedData, path);\n\n if ((rowData.tableData.showDetailPanel || '').toString() === render.toString()) {\n rowData.tableData.showDetailPanel = undefined;\n } else {\n rowData.tableData.showDetailPanel = render;\n }\n\n if (this.detailPanelType === 'single' && this.lastDetailPanelRow && this.lastDetailPanelRow != rowData) {\n this.lastDetailPanelRow.tableData.showDetailPanel = undefined;\n }\n\n this.lastDetailPanelRow = rowData;\n }\n }, {\n key: \"changeGroupExpand\",\n value: function changeGroupExpand(path) {\n var rowData = this.findDataByPath(this.sortedData, path);\n rowData.isExpanded = !rowData.isExpanded;\n }\n }, {\n key: \"changeSearchText\",\n value: function changeSearchText(searchText) {\n this.searchText = searchText;\n this.searched = false;\n this.currentPage = 0;\n }\n }, {\n key: \"changeSearchDebounce\",\n value: function changeSearchDebounce(searchDebounceDelay) {\n this.searchDebounceDelay = searchDebounceDelay;\n }\n }, {\n key: \"changeRowEditing\",\n value: function changeRowEditing(rowData, mode) {\n if (rowData) {\n rowData.tableData.editing = mode;\n\n if (this.lastEditingRow && this.lastEditingRow != rowData) {\n this.lastEditingRow.tableData.editing = undefined;\n }\n\n if (mode) {\n this.lastEditingRow = rowData;\n } else {\n this.lastEditingRow = undefined;\n }\n } else if (this.lastEditingRow) {\n this.lastEditingRow.tableData.editing = undefined;\n this.lastEditingRow = undefined;\n }\n }\n }, {\n key: \"changeBulkEditOpen\",\n value: function changeBulkEditOpen(bulkEditOpen) {\n this.bulkEditOpen = bulkEditOpen;\n }\n }, {\n key: \"changeAllSelected\",\n value: function changeAllSelected(checked, selectionProps) {\n var selectedCount = 0;\n\n var isChecked = function isChecked(row) {\n var selectionResult = selectionProps ? selectionProps(row) : {\n disabled: false\n };\n return row.tableData.disabled || selectionResult.disabled ? false : checked;\n };\n\n if (this.isDataType('group')) {\n var setCheck = function setCheck(data) {\n data.forEach(function (element) {\n if (element.groups.length > 0) {\n setCheck(element.groups);\n } else {\n element.data.forEach(function (d) {\n d.tableData.checked = isChecked(d);\n selectedCount++;\n });\n }\n });\n };\n\n setCheck(this.groupedData);\n } else {\n this.searchedData.forEach(function (row) {\n row.tableData.checked = isChecked(row);\n });\n selectedCount = this.searchedData.length;\n }\n\n this.selectedCount = checked ? selectedCount : 0;\n }\n }, {\n key: \"changeOrder\",\n value: function changeOrder(orderBy, orderDirection) {\n this.orderBy = orderBy;\n this.orderDirection = orderDirection;\n this.currentPage = 0;\n this.sorted = false;\n }\n }, {\n key: \"changeGroupOrder\",\n value: function changeGroupOrder(columnId) {\n var column = this.columns.find(function (c) {\n return c.tableData.id === columnId;\n });\n\n if (column.tableData.groupSort === 'asc') {\n column.tableData.groupSort = 'desc';\n } else {\n column.tableData.groupSort = 'asc';\n }\n\n this.sorted = false;\n }\n }, {\n key: \"changeColumnHidden\",\n value: function changeColumnHidden(column, hidden) {\n column.hidden = hidden; // https://github.com/mbrn/material-table/pull/2655\n // https://github.com/material-table-core/core/issues/20#issuecomment-752265651\n // Fix #20\n\n this.setColumns(this.columns);\n }\n }, {\n key: \"changeTreeExpand\",\n value: function changeTreeExpand(path) {\n var rowData = this.findDataByPath(this.sortedData, path);\n rowData.tableData.isTreeExpanded = !rowData.tableData.isTreeExpanded;\n }\n }, {\n key: \"changeDetailPanelType\",\n value: function changeDetailPanelType(type) {\n this.detailPanelType = type;\n }\n }, {\n key: \"changeByDrag\",\n value: function changeByDrag(result) {\n var start = 0;\n var groups = this.columns.filter(function (col) {\n return col.tableData.groupOrder > -1;\n }).sort(function (col1, col2) {\n return col1.tableData.groupOrder - col2.tableData.groupOrder;\n });\n\n if (result.destination.droppableId === 'groups' && result.source.droppableId === 'groups') {\n start = Math.min(result.destination.index, result.source.index);\n var end = Math.max(result.destination.index, result.source.index);\n groups = groups.slice(start, end + 1);\n\n if (result.destination.index < result.source.index) {\n // Take last and add as first\n var last = groups.pop();\n groups.unshift(last);\n } else {\n // Take first and add as last\n var _last = groups.shift();\n\n groups.push(_last);\n }\n } else if (result.destination.droppableId === 'groups' && result.source.droppableId === 'headers') {\n var newGroup = this.columns.find(function (c) {\n return c.tableData.id == result.draggableId;\n });\n\n if (newGroup.grouping === false || !newGroup.field) {\n return;\n }\n\n groups.splice(result.destination.index, 0, newGroup);\n } else if (result.destination.droppableId === 'headers' && result.source.droppableId === 'groups') {\n var removeGroup = this.columns.find(function (c) {\n return c.tableData.id == result.draggableId;\n });\n removeGroup.tableData.groupOrder = undefined;\n groups.splice(result.source.index, 1);\n } else if (result.destination.droppableId === 'headers' && result.source.droppableId === 'headers') {\n start = Math.min(result.destination.index, result.source.index);\n\n var _end = Math.max(result.destination.index, result.source.index); // get the effective start and end considering hidden columns\n\n\n var sorted = this.columns.sort(function (a, b) {\n return a.tableData.columnOrder - b.tableData.columnOrder;\n }).filter(function (column) {\n return column.tableData.groupOrder === undefined && !column.hidden;\n });\n var numHiddenBeforeStart = 0;\n var numVisibleBeforeStart = 0;\n\n for (var i = 0; i < sorted.length && numVisibleBeforeStart <= start; i++) {\n if (sorted[i].hidden) {\n numHiddenBeforeStart++;\n } else {\n numVisibleBeforeStart++;\n }\n }\n\n var effectiveStart = start + numHiddenBeforeStart;\n var effectiveEnd = effectiveStart;\n\n for (var numVisibleInRange = 0; numVisibleInRange < _end - start && effectiveEnd < sorted.length; effectiveEnd++) {\n if (!sorted[effectiveEnd].hidden) {\n numVisibleInRange++;\n }\n }\n\n var colsToMov = sorted.slice(effectiveStart, effectiveEnd + 1);\n\n if (result.destination.index < result.source.index) {\n // Take last and add as first\n var _last2 = colsToMov.pop();\n\n colsToMov.unshift(_last2);\n } else {\n // Take first and add as last\n var _last3 = colsToMov.shift();\n\n colsToMov.push(_last3);\n }\n\n for (var _i = 0; _i < colsToMov.length; _i++) {\n colsToMov[_i].tableData.columnOrder = effectiveStart + _i;\n }\n\n return;\n } else {\n return;\n }\n\n for (var _i2 = 0; _i2 < groups.length; _i2++) {\n groups[_i2].tableData.groupOrder = start + _i2;\n }\n\n this.sorted = this.grouped = false;\n }\n }, {\n key: \"onColumnResized\",\n value: function onColumnResized(id, offset, changedColumnWidthsBeforeOffset, initialColWidths) {\n var column = this.columns.find(function (c) {\n return c.tableData.id === id;\n });\n\n if (!column) {\n return [];\n }\n\n var nextColumn = this.columns.find(function (c) {\n return c.tableData.id === id + 1;\n });\n\n if (this.tableWidth === 'full' && !nextColumn) {\n return [];\n }\n\n if (offset === 0) {\n // We've finished the column resize\n return this.tableWidth === 'full' ? [column, nextColumn] : [column];\n }\n\n if (this.tableWidth === 'variable' && this.tableStyleWidth === '100%') {\n // First time we're resizing - resolve all the column widths\n // MTableHeader has ref to\n this.columns.forEach(function (col, index) {\n return _objectSpread(_objectSpread({}, col), {}, {\n tableData: _objectSpread(_objectSpread({}, col.tableData), {}, {\n width: \"\".concat(initialColWidths[index], \"px\"),\n widthPx: initialColWidths[index]\n })\n });\n });\n this.tableStyleWidth = initialColWidths.reduce(function (acc, width) {\n return acc + width;\n });\n }\n\n var changed = [column];\n column.tableData.widthPx = changedColumnWidthsBeforeOffset[0] + offset;\n column.tableData.additionalWidth += offset;\n column.tableData.width = this.tableWidth === 'full' ? \"calc(\".concat(column.tableData.initialWidth, \" + \").concat(column.tableData.additionalWidth, \"px)\") : \"\".concat(column.tableData.widthPx, \"px\");\n\n if (this.tableWidth === 'full') {\n nextColumn.tableData.widthPx = changedColumnWidthsBeforeOffset[1] - offset;\n nextColumn.tableData.additionalWidth -= offset;\n nextColumn.tableData.width = \"calc(\".concat(nextColumn.tableData.initialWidth, \" + \").concat(nextColumn.tableData.additionalWidth, \"px)\");\n changed.push(nextColumn);\n }\n\n if (this.tableWidth === 'variable') {\n this.tableStyleWidth += offset;\n }\n\n return changed;\n }\n }, {\n key: \"findGroupByGroupPath\",\n value: function findGroupByGroupPath(renderData, path) {\n var data = {\n groups: renderData,\n groupsIndex: this.rootGroupsIndex\n };\n var node = path.reduce(function (result, current) {\n if (!result) {\n return undefined;\n }\n\n if (result.groupsIndex[current] !== undefined) {\n return result.groups[result.groupsIndex[current]];\n }\n\n return undefined; // const group = result.groups.find(a => a.value === current);\n // return group;\n }, data);\n return node;\n }\n }, {\n key: \"isDataType\",\n value: function isDataType(type) {\n var dataType = 'normal';\n\n if (this.parentFunc) {\n dataType = 'tree';\n } else if (this.columns.find(function (a) {\n return a.tableData.groupOrder > -1;\n })) {\n dataType = 'group';\n }\n\n return type === dataType;\n }\n }, {\n key: \"sort\",\n value: function sort(a, b, type) {\n if (type === 'numeric') {\n return a - b;\n } else {\n if (a !== b) {\n // to find nulls\n if (!a) return -1;\n if (!b) return 1;\n }\n\n return a < b ? -1 : a > b ? 1 : 0;\n }\n }\n }, {\n key: \"sortList\",\n value: function sortList(list) {\n var _this4 = this;\n\n var columnDef = this.columns.find(function (_) {\n return _.tableData.id === _this4.orderBy;\n });\n\n if (!columnDef) {\n columnDef = this.columns[0];\n }\n\n var result = list;\n\n if (columnDef.customSort) {\n if (this.orderDirection === 'desc') {\n result = list.sort(function (a, b) {\n return columnDef.customSort(b, a, 'row', 'desc');\n });\n } else {\n result = list.sort(function (a, b) {\n return columnDef.customSort(a, b, 'row');\n });\n }\n } else {\n result = list.sort(this.orderDirection === 'desc' ? function (a, b) {\n return _this4.sort(_this4.getFieldValue(b, columnDef), _this4.getFieldValue(a, columnDef), columnDef.type);\n } : function (a, b) {\n return _this4.sort(_this4.getFieldValue(a, columnDef), _this4.getFieldValue(b, columnDef), columnDef.type);\n });\n }\n\n return result;\n }\n }, {\n key: \"groupData\",\n value: function groupData() {\n var _this5 = this;\n\n this.sorted = this.paged = false;\n this.groupedDataLength = 0;\n var tmpData = (0, _toConsumableArray2[\"default\"])(this.searchedData);\n var groups = this.columns.filter(function (col) {\n return col.tableData.groupOrder > -1;\n }).sort(function (col1, col2) {\n return col1.tableData.groupOrder - col2.tableData.groupOrder;\n });\n var subData = tmpData.reduce(function (result, currentRow) {\n var object = result;\n object = groups.reduce(function (o, colDef) {\n var value = currentRow[colDef.field] || (0, _2.selectFromObject)(currentRow, colDef.field);\n var group;\n\n if (o.groupsIndex[value] !== undefined) {\n group = o.groups[o.groupsIndex[value]];\n }\n\n if (!group) {\n var path = [].concat((0, _toConsumableArray2[\"default\"])(o.path || []), [value]);\n var oldGroup = _this5.findGroupByGroupPath(_this5.groupedData, path) || {\n isExpanded: typeof _this5.defaultExpanded === 'boolean' ? _this5.defaultExpanded : false\n };\n group = {\n value: value,\n groups: [],\n groupsIndex: {},\n data: [],\n isExpanded: oldGroup.isExpanded,\n path: path\n };\n o.groups.push(group);\n o.groupsIndex[value] = o.groups.length - 1;\n }\n\n return group;\n }, object);\n object.data.push(currentRow);\n _this5.groupedDataLength++;\n return result;\n }, {\n groups: [],\n groupsIndex: {}\n });\n this.groupedData = subData.groups;\n this.grouped = true;\n this.rootGroupsIndex = subData.groupsIndex;\n }\n }, {\n key: \"treefyData\",\n value: function treefyData() {\n var _this6 = this;\n\n this.sorted = this.paged = false;\n this.data.forEach(function (a) {\n return a.tableData.childRows = null;\n });\n this.treefiedData = [];\n this.treefiedDataLength = 0;\n this.treeDataMaxLevel = 0; // if filter or search is enabled, collapse the tree\n\n if (this.searchText || this.columns.some(function (columnDef) {\n return columnDef.tableData.filterValue;\n })) {\n this.data.forEach(function (row) {\n row.tableData.isTreeExpanded = false;\n }); // expand the tree for all nodes present after filtering and searching\n\n this.expandTreeForNodes(this.searchedData);\n }\n\n var addRow = function addRow(rowData) {\n rowData.tableData.markedForTreeRemove = false;\n\n var parent = _this6.parentFunc(rowData, _this6.data);\n\n if (parent) {\n parent.tableData.childRows = parent.tableData.childRows || [];\n\n if (!parent.tableData.childRows.includes(rowData)) {\n parent.tableData.childRows.push(rowData);\n _this6.treefiedDataLength++;\n }\n\n addRow(parent);\n rowData.tableData.path = [].concat((0, _toConsumableArray2[\"default\"])(parent.tableData.path), [parent.tableData.childRows[parent.tableData.childRows.length - 1].tableData.uuid]);\n _this6.treeDataMaxLevel = Math.max(_this6.treeDataMaxLevel, rowData.tableData.path.length);\n } else {\n if (!_this6.treefiedData.includes(rowData)) {\n _this6.treefiedData.push(rowData);\n\n _this6.treefiedDataLength++;\n rowData.tableData.path = [rowData.tableData.uuid];\n }\n }\n }; // Add all rows initially\n\n\n this.data.forEach(function (rowData) {\n addRow(rowData);\n });\n\n var markForTreeRemove = function markForTreeRemove(rowData) {\n var pointer = _this6.treefiedData;\n rowData.tableData.path.forEach(function (pathPart) {\n if (pointer.tableData && pointer.tableData.childRows) {\n pointer = pointer.tableData.childRows;\n }\n\n if (Array.isArray(pointer)) {\n pointer = pointer.find(function (p) {\n return p.tableData.uuid === pathPart;\n });\n }\n });\n pointer.tableData.markedForTreeRemove = true;\n };\n\n var traverseChildrenAndUnmark = function traverseChildrenAndUnmark(rowData) {\n if (rowData.tableData.childRows) {\n rowData.tableData.childRows.forEach(function (row) {\n traverseChildrenAndUnmark(row);\n });\n }\n\n rowData.tableData.markedForTreeRemove = false;\n }; // for all data rows, restore initial expand if no search term is available and remove items that shouldn't be there\n\n\n this.data.forEach(function (rowData) {\n if (!_this6.searchText && !_this6.columns.some(function (columnDef) {\n return columnDef.tableData.filterValue;\n })) {\n if (rowData.tableData.isTreeExpanded === undefined) {\n var isExpanded = typeof _this6.defaultExpanded === 'boolean' ? _this6.defaultExpanded : _this6.defaultExpanded(rowData);\n rowData.tableData.isTreeExpanded = isExpanded;\n }\n }\n\n var hasSearchMatchedChildren = rowData.tableData.isTreeExpanded;\n\n if (!hasSearchMatchedChildren && _this6.searchedData.indexOf(rowData) < 0) {\n markForTreeRemove(rowData);\n }\n }); // preserve all children of nodes that are matched by search or filters\n\n this.data.forEach(function (rowData) {\n if (_this6.searchedData.indexOf(rowData) > -1) {\n traverseChildrenAndUnmark(rowData);\n }\n });\n\n var traverseTreeAndDeleteMarked = function traverseTreeAndDeleteMarked(rowDataArray) {\n for (var i = rowDataArray.length - 1; i >= 0; i--) {\n var item = rowDataArray[i];\n\n if (item.tableData.childRows) {\n traverseTreeAndDeleteMarked(item.tableData.childRows);\n }\n\n if (item.tableData.markedForTreeRemove) rowDataArray.splice(i, 1);\n }\n };\n\n traverseTreeAndDeleteMarked(this.treefiedData);\n this.treefied = true;\n }\n }, {\n key: \"sortData\",\n value: function sortData() {\n var _this7 = this;\n\n this.paged = false;\n\n if (this.isDataType('group')) {\n this.sortedData = (0, _toConsumableArray2[\"default\"])(this.groupedData);\n var groups = this.columns.filter(function (col) {\n return col.tableData.groupOrder > -1;\n }).sort(function (col1, col2) {\n return col1.tableData.groupOrder - col2.tableData.groupOrder;\n });\n\n var sortGroups = function sortGroups(list, columnDef) {\n if (columnDef.customSort) {\n return list.sort(columnDef.tableData.groupSort === 'desc' ? function (a, b) {\n return columnDef.customSort(b.value, a.value, 'group');\n } : function (a, b) {\n return columnDef.customSort(a.value, b.value, 'group');\n });\n } else {\n return list.sort(columnDef.tableData.groupSort === 'desc' ? function (a, b) {\n return _this7.sort(b.value, a.value, columnDef.type);\n } : function (a, b) {\n return _this7.sort(a.value, b.value, columnDef.type);\n });\n }\n };\n\n this.sortedData = sortGroups(this.sortedData, groups[0]); // If you have nested grouped rows and wanted to select one of those row\n // there was an issue.\n // -https://github.com/material-table-core/core/pull/74\n // -https://github.com/mbrn/material-table/issues/2258\n // -https://github.com/mbrn/material-table/issues/2249\n // getGroupsIndex resolves this nested grouped rows selection issue.\n\n var getGroupsIndex = function getGroupsIndex(groups) {\n return groups.reduce(function (result, group) {\n result[group.value] = groups.findIndex(function (g) {\n return g.value === group.value;\n });\n return result;\n }, {});\n };\n\n var sortGroupData = function sortGroupData(list, level) {\n list.forEach(function (element) {\n if (element.groups.length > 0) {\n var column = groups[level];\n element.groups = sortGroups(element.groups, column); // For grouped rows that are nested\n\n element.groupsIndex = getGroupsIndex(element.groups);\n sortGroupData(element.groups, level + 1);\n } else {\n if (_this7.orderBy >= 0 && _this7.orderDirection) {\n element.data = _this7.sortList(element.data);\n } else if (_this7.orderDirection === '') {\n element.data = element.data.sort(function (a, b) {\n return _this7.data.findIndex(function (val) {\n return val.tableData.id === a.tableData.id;\n }) - _this7.data.findIndex(function (val) {\n return val.tableData.id === b.tableData.id;\n });\n });\n }\n }\n });\n };\n\n sortGroupData(this.sortedData, 1);\n } else if (this.isDataType('tree')) {\n this.sortedData = (0, _toConsumableArray2[\"default\"])(this.treefiedData);\n\n if (this.orderBy != -1) {\n this.sortedData = this.sortList(this.sortedData);\n\n var sortTree = function sortTree(list) {\n list.forEach(function (item) {\n if (item.tableData.childRows) {\n item.tableData.childRows = _this7.sortList(item.tableData.childRows);\n sortTree(item.tableData.childRows);\n }\n });\n };\n\n sortTree(this.sortedData);\n }\n } else if (this.isDataType('normal')) {\n this.sortedData = (0, _toConsumableArray2[\"default\"])(this.searchedData);\n\n if (this.orderBy != -1 && this.applySort) {\n this.sortedData = this.sortList(this.sortedData);\n }\n }\n\n this.sorted = true;\n }\n }, {\n key: \"pageData\",\n value: function pageData() {\n this.pagedData = (0, _toConsumableArray2[\"default\"])(this.sortedData);\n\n if (this.paging) {\n var startIndex = this.currentPage * this.pageSize;\n var endIndex = startIndex + this.pageSize;\n this.pagedData = this.pagedData.slice(startIndex, endIndex);\n }\n\n this.paged = true;\n }\n }]);\n return DataManager;\n}();\n\nexports[\"default\"] = DataManager;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.useDoubleClick = useDoubleClick;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nfunction useDoubleClick(singleCallback, dbCallback) {\n var countRef = _react[\"default\"].useRef(0);\n /** Refs for the timer **/\n\n\n var timerRef = _react[\"default\"].useRef(null);\n\n var inputDoubleCallbackRef = _react[\"default\"].useRef(null);\n\n var inputSingleCallbackRef = _react[\"default\"].useRef(null);\n\n _react[\"default\"].useEffect(function () {\n inputDoubleCallbackRef.current = dbCallback;\n inputSingleCallbackRef.current = singleCallback;\n });\n\n var reset = function reset() {\n clearTimeout(timerRef.current);\n timerRef.current = null;\n countRef.current = 0;\n };\n\n var onClick = _react[\"default\"].useCallback(function (e) {\n var isDoubleClick = countRef.current + 1 === 2;\n var timerIsPresent = timerRef.current;\n\n if (timerIsPresent && isDoubleClick) {\n reset();\n inputDoubleCallbackRef.current && inputDoubleCallbackRef.current(e);\n }\n\n if (!timerIsPresent) {\n countRef.current = countRef.current + 1;\n\n var singleClick = function singleClick() {\n reset();\n inputSingleCallbackRef.current && inputSingleCallbackRef.current(e);\n };\n\n if (inputDoubleCallbackRef.current) {\n var timer = setTimeout(singleClick, 250);\n timerRef.current = timer;\n } else {\n singleClick();\n }\n }\n }, []);\n\n return onClick;\n}","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getStyle = getStyle;\nexports.setObjectByKey = exports.selectFromObject = void 0;\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar CommonValues = _interopRequireWildcard(require(\"./common-values\"));\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2[\"default\"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nvar selectFromObject = function selectFromObject(o, s) {\n if (!s) {\n return;\n }\n\n var a;\n\n if (!Array.isArray(s)) {\n s = s.replace(/\\[(\\w+)\\]/g, '.$1'); // convert indexes to properties\n\n s = s.replace(/^\\./, ''); // strip a leading dot\n\n a = s.split('.');\n } else {\n a = s;\n }\n\n for (var i = 0, n = a.length; i < n; ++i) {\n var x = a[i];\n\n if (o && x in o) {\n o = o[x];\n } else {\n return;\n }\n }\n\n return o;\n};\n\nexports.selectFromObject = selectFromObject;\n\nvar setObjectByKey = function setObjectByKey(obj, path, value) {\n var schema = obj; // a moving reference to internal objects within obj\n\n var pList;\n\n if (!Array.isArray(path)) {\n path = path.replace(/\\[(\\w+)\\]/g, '.$1'); // convert indexes to properties\n\n path = path.replace(/^\\./, ''); // strip a leading dot\n\n pList = path.split('.');\n } else {\n pList = path;\n }\n\n var len = pList.length;\n\n for (var i = 0; i < len - 1; i++) {\n var elem = pList[i];\n if (!schema[elem]) schema[elem] = {};\n schema = schema[elem];\n }\n\n schema[pList[len - 1]] = value;\n};\n\nexports.setObjectByKey = setObjectByKey;\n\nfunction getStyle(props) {\n var width = CommonValues.reducePercentsInCalc(props.columnDef.tableData.width, props.scrollWidth);\n var cellStyle = {\n color: 'inherit',\n width: width,\n maxWidth: props.columnDef.maxWidth,\n minWidth: props.columnDef.minWidth,\n boxSizing: 'border-box',\n fontSize: 'inherit',\n fontFamily: 'inherit',\n fontWeight: 'inherit'\n };\n\n if (typeof props.columnDef.cellStyle === 'function') {\n cellStyle = _objectSpread(_objectSpread({}, cellStyle), props.columnDef.cellStyle(props.value, props.rowData));\n } else {\n cellStyle = _objectSpread(_objectSpread({}, cellStyle), props.columnDef.cellStyle);\n }\n\n if (props.columnDef.disableClick) {\n cellStyle.cursor = 'default';\n }\n\n return _objectSpread(_objectSpread({}, props.style), cellStyle);\n}","'use strict'; // Add array.find\n\nif (!Array.prototype.find) {\n Object.defineProperty(Array.prototype, 'find', {\n value: function value(predicate) {\n if (this == null) {\n throw new TypeError('\"this\" is null or not defined');\n }\n\n var o = Object(this);\n var len = o.length >>> 0;\n\n if (typeof predicate !== 'function') {\n throw new TypeError('predicate must be a function');\n }\n\n var thisArg = arguments[1];\n var k = 0;\n\n while (k < len) {\n var kValue = o[k];\n\n if (predicate.call(thisArg, kValue, k, o)) {\n return kValue;\n }\n\n k++;\n }\n\n return undefined;\n }\n });\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.validateInput = validateInput;\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _typeof2 = _interopRequireDefault(require(\"@babel/runtime/helpers/typeof\"));\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2[\"default\"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction validateInput(columnDef, data) {\n if (columnDef.validate) {\n var validateResponse = columnDef.validate(data);\n\n switch ((0, _typeof2[\"default\"])(validateResponse)) {\n case 'object':\n return _objectSpread({}, validateResponse);\n\n case 'boolean':\n return {\n isValid: validateResponse,\n helperText: ''\n };\n\n case 'string':\n return {\n isValid: false,\n helperText: validateResponse\n };\n\n default:\n return {\n isValid: true,\n helperText: ''\n };\n }\n }\n\n return {\n isValid: true,\n helperText: ''\n };\n}","var v1 = require('./v1');\nvar v4 = require('./v4');\n\nvar uuid = v4;\nuuid.v1 = v1;\nuuid.v4 = v4;\n\nmodule.exports = uuid;\n","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return ([\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]]\n ]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","// Unique ID creation requires a high quality random # generator. In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API. We do the best we can via\n// feature-detection\n\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto\n// implementation. Also, find the complete implementation of crypto on IE11.\nvar getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||\n (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));\n\nif (getRandomValues) {\n // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\n module.exports = function whatwgRNG() {\n getRandomValues(rnds8);\n return rnds8;\n };\n} else {\n // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random(). It's fast, but is of unspecified\n // quality.\n var rnds = new Array(16);\n\n module.exports = function mathRNG() {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return rnds;\n };\n}\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\nvar _clockseq;\n\n// Previous uuid creation time\nvar _lastMSecs = 0;\nvar _lastNSecs = 0;\n\n// See https://github.com/uuidjs/uuid for API details\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || [];\n\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n if (node == null || clockseq == null) {\n var seedBytes = rng();\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [\n seedBytes[0] | 0x01,\n seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]\n ];\n }\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n }\n\n // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n // Time since last uuid creation (in msecs)\n var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n // Per 4.2.1.2, Bump clockseq on clock regression\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n }\n\n // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n }\n\n // Per 4.2.1.2 Throw error if too many uuids are requested\n if (nsecs >= 10000) {\n throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n\n // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n msecs += 12219292800000;\n\n // `time_low`\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff;\n\n // `time_mid`\n var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff;\n\n // `time_high_and_version`\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n b[i++] = tmh >>> 16 & 0xff;\n\n // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n b[i++] = clockseq >>> 8 | 0x80;\n\n // `clock_seq_low`\n b[i++] = clockseq & 0xff;\n\n // `node`\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf ? buf : bytesToUuid(b);\n}\n\nmodule.exports = v1;\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.styles = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _clsx = _interopRequireDefault(require(\"clsx\"));\n\nvar _utils = require(\"@material-ui/utils\");\n\nvar _withStyles = _interopRequireDefault(require(\"../styles/withStyles\"));\n\nvar _colorManipulator = require(\"../styles/colorManipulator\");\n\nvar _ButtonBase = _interopRequireDefault(require(\"../ButtonBase\"));\n\nvar _capitalize = _interopRequireDefault(require(\"../utils/capitalize\"));\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n textAlign: 'center',\n flex: '0 0 auto',\n fontSize: theme.typography.pxToRem(24),\n padding: 12,\n borderRadius: '50%',\n overflow: 'visible',\n // Explicitly set the default value to solve a bug on IE 11.\n color: theme.palette.action.active,\n transition: theme.transitions.create('background-color', {\n duration: theme.transitions.duration.shortest\n }),\n '&:hover': {\n backgroundColor: (0, _colorManipulator.alpha)(theme.palette.action.active, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n },\n '&$disabled': {\n backgroundColor: 'transparent',\n color: theme.palette.action.disabled\n }\n },\n\n /* Styles applied to the root element if `edge=\"start\"`. */\n edgeStart: {\n marginLeft: -12,\n '$sizeSmall&': {\n marginLeft: -3\n }\n },\n\n /* Styles applied to the root element if `edge=\"end\"`. */\n edgeEnd: {\n marginRight: -12,\n '$sizeSmall&': {\n marginRight: -3\n }\n },\n\n /* Styles applied to the root element if `color=\"inherit\"`. */\n colorInherit: {\n color: 'inherit'\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: (0, _colorManipulator.alpha)(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: (0, _colorManipulator.alpha)(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `size=\"small\"`. */\n sizeSmall: {\n padding: 3,\n fontSize: theme.typography.pxToRem(18)\n },\n\n /* Styles applied to the children container element. */\n label: {\n width: '100%',\n display: 'flex',\n alignItems: 'inherit',\n justifyContent: 'inherit'\n }\n };\n};\n/**\n * Refer to the [Icons](/components/icons/) section of the documentation\n * regarding the available icon options.\n */\n\n\nexports.styles = styles;\nvar IconButton = /*#__PURE__*/React.forwardRef(function IconButton(props, ref) {\n var _props$edge = props.edge,\n edge = _props$edge === void 0 ? false : _props$edge,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableFocusRi = props.disableFocusRipple,\n disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n other = (0, _objectWithoutProperties2.default)(props, [\"edge\", \"children\", \"classes\", \"className\", \"color\", \"disabled\", \"disableFocusRipple\", \"size\"]);\n return /*#__PURE__*/React.createElement(_ButtonBase.default, (0, _extends2.default)({\n className: (0, _clsx.default)(classes.root, className, color !== 'default' && classes[\"color\".concat((0, _capitalize.default)(color))], disabled && classes.disabled, size === \"small\" && classes[\"size\".concat((0, _capitalize.default)(size))], {\n 'start': classes.edgeStart,\n 'end': classes.edgeEnd\n }[edge]),\n centerRipple: true,\n focusRipple: !disableFocusRipple,\n disabled: disabled,\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.label\n }, children));\n});\nprocess.env.NODE_ENV !== \"production\" ? IconButton.propTypes = {\n /**\n * The icon element.\n */\n children: (0, _utils.chainPropTypes)(_propTypes.default.node, function (props) {\n var found = React.Children.toArray(props.children).some(function (child) {\n return /*#__PURE__*/React.isValidElement(child) && child.props.onClick;\n });\n\n if (found) {\n return new Error(['Material-UI: You are providing an onClick event listener ' + 'to a child of a button element.', 'Firefox will never trigger the event.', 'You should move the onClick listener to the parent button element.', 'https://github.com/mui-org/material-ui/issues/13957'].join('\\n'));\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: _propTypes.default.object.isRequired,\n\n /**\n * @ignore\n */\n className: _propTypes.default.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: _propTypes.default.oneOf(['default', 'inherit', 'primary', 'secondary']),\n\n /**\n * If `true`, the button will be disabled.\n */\n disabled: _propTypes.default.bool,\n\n /**\n * If `true`, the keyboard focus ripple will be disabled.\n */\n disableFocusRipple: _propTypes.default.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n */\n disableRipple: _propTypes.default.bool,\n\n /**\n * If given, uses a negative margin to counteract the padding on one\n * side (this is often helpful for aligning the left or right\n * side of the icon with content above or below, without ruining the border\n * size and shape).\n */\n edge: _propTypes.default.oneOf(['start', 'end', false]),\n\n /**\n * The size of the button.\n * `small` is equivalent to the dense button styling.\n */\n size: _propTypes.default.oneOf(['small', 'medium'])\n} : void 0;\n\nvar _default = (0, _withStyles.default)(styles, {\n name: 'MuiIconButton'\n})(IconButton);\n\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar blue = {\n 50: '#e3f2fd',\n 100: '#bbdefb',\n 200: '#90caf9',\n 300: '#64b5f6',\n 400: '#42a5f5',\n 500: '#2196f3',\n 600: '#1e88e5',\n 700: '#1976d2',\n 800: '#1565c0',\n 900: '#0d47a1',\n A100: '#82b1ff',\n A200: '#448aff',\n A400: '#2979ff',\n A700: '#2962ff'\n};\nvar _default = blue;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar common = {\n black: '#000',\n white: '#fff'\n};\nvar _default = common;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar green = {\n 50: '#e8f5e9',\n 100: '#c8e6c9',\n 200: '#a5d6a7',\n 300: '#81c784',\n 400: '#66bb6a',\n 500: '#4caf50',\n 600: '#43a047',\n 700: '#388e3c',\n 800: '#2e7d32',\n 900: '#1b5e20',\n A100: '#b9f6ca',\n A200: '#69f0ae',\n A400: '#00e676',\n A700: '#00c853'\n};\nvar _default = green;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar grey = {\n 50: '#fafafa',\n 100: '#f5f5f5',\n 200: '#eeeeee',\n 300: '#e0e0e0',\n 400: '#bdbdbd',\n 500: '#9e9e9e',\n 600: '#757575',\n 700: '#616161',\n 800: '#424242',\n 900: '#212121',\n A100: '#d5d5d5',\n A200: '#aaaaaa',\n A400: '#303030',\n A700: '#616161'\n};\nvar _default = grey;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar indigo = {\n 50: '#e8eaf6',\n 100: '#c5cae9',\n 200: '#9fa8da',\n 300: '#7986cb',\n 400: '#5c6bc0',\n 500: '#3f51b5',\n 600: '#3949ab',\n 700: '#303f9f',\n 800: '#283593',\n 900: '#1a237e',\n A100: '#8c9eff',\n A200: '#536dfe',\n A400: '#3d5afe',\n A700: '#304ffe'\n};\nvar _default = indigo;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar orange = {\n 50: '#fff3e0',\n 100: '#ffe0b2',\n 200: '#ffcc80',\n 300: '#ffb74d',\n 400: '#ffa726',\n 500: '#ff9800',\n 600: '#fb8c00',\n 700: '#f57c00',\n 800: '#ef6c00',\n 900: '#e65100',\n A100: '#ffd180',\n A200: '#ffab40',\n A400: '#ff9100',\n A700: '#ff6d00'\n};\nvar _default = orange;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar pink = {\n 50: '#fce4ec',\n 100: '#f8bbd0',\n 200: '#f48fb1',\n 300: '#f06292',\n 400: '#ec407a',\n 500: '#e91e63',\n 600: '#d81b60',\n 700: '#c2185b',\n 800: '#ad1457',\n 900: '#880e4f',\n A100: '#ff80ab',\n A200: '#ff4081',\n A400: '#f50057',\n A700: '#c51162'\n};\nvar _default = pink;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar red = {\n 50: '#ffebee',\n 100: '#ffcdd2',\n 200: '#ef9a9a',\n 300: '#e57373',\n 400: '#ef5350',\n 500: '#f44336',\n 600: '#e53935',\n 700: '#d32f2f',\n 800: '#c62828',\n 900: '#b71c1c',\n A100: '#ff8a80',\n A200: '#ff5252',\n A400: '#ff1744',\n A700: '#d50000'\n};\nvar _default = red;\nexports.default = _default;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n padding: theme.spacing(1, 2, 2)\n }\n };\n};\nvar AccordionDetails = /*#__PURE__*/React.forwardRef(function AccordionDetails(props, ref) {\n var classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"classes\", \"className\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? AccordionDetails.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the accordion details.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiAccordionDetails'\n})(AccordionDetails);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\n\n/* eslint-disable jsx-a11y/aria-role */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport ButtonBase from '../ButtonBase';\nimport IconButton from '../IconButton';\nimport withStyles from '../styles/withStyles';\nimport AccordionContext from '../Accordion/AccordionContext';\nexport var styles = function styles(theme) {\n var transition = {\n duration: theme.transitions.duration.shortest\n };\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n minHeight: 8 * 6,\n transition: theme.transitions.create(['min-height', 'background-color'], transition),\n padding: theme.spacing(0, 2),\n '&:hover:not($disabled)': {\n cursor: 'pointer'\n },\n '&$expanded': {\n minHeight: 64\n },\n '&$focused, &$focusVisible': {\n backgroundColor: theme.palette.action.focus\n },\n '&$disabled': {\n opacity: theme.palette.action.disabledOpacity\n }\n },\n\n /* Pseudo-class applied to the root element, children wrapper element and `IconButton` component if `expanded={true}`. */\n expanded: {},\n\n /* Pseudo-class applied to the ButtonBase root element if the button is keyboard focused. */\n focused: {},\n\n /* Pseudo-class applied to the ButtonBase root element if the button is keyboard focused. */\n focusVisible: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the children wrapper element. */\n content: {\n display: 'flex',\n flexGrow: 1,\n transition: theme.transitions.create(['margin'], transition),\n margin: '12px 0',\n '&$expanded': {\n margin: '20px 0'\n }\n },\n\n /* Styles applied to the `IconButton` component when `expandIcon` is supplied. */\n expandIcon: {\n transform: 'rotate(0deg)',\n transition: theme.transitions.create('transform', transition),\n '&:hover': {\n // Disable the hover effect for the IconButton,\n // because a hover effect should apply to the entire Expand button and\n // not only to the IconButton.\n backgroundColor: 'transparent'\n },\n '&$expanded': {\n transform: 'rotate(180deg)'\n }\n }\n };\n};\nvar AccordionSummary = /*#__PURE__*/React.forwardRef(function AccordionSummary(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n expandIcon = props.expandIcon,\n focusVisibleClassName = props.focusVisibleClassName,\n _props$IconButtonProp = props.IconButtonProps,\n IconButtonProps = _props$IconButtonProp === void 0 ? {} : _props$IconButtonProp,\n onClick = props.onClick,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"expandIcon\", \"focusVisibleClassName\", \"IconButtonProps\", \"onClick\"]);\n\n var _React$useContext = React.useContext(AccordionContext),\n _React$useContext$dis = _React$useContext.disabled,\n disabled = _React$useContext$dis === void 0 ? false : _React$useContext$dis,\n expanded = _React$useContext.expanded,\n toggle = _React$useContext.toggle;\n\n var handleChange = function handleChange(event) {\n if (toggle) {\n toggle(event);\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n focusRipple: false,\n disableRipple: true,\n disabled: disabled,\n component: \"div\",\n \"aria-expanded\": expanded,\n className: clsx(classes.root, className, disabled && classes.disabled, expanded && classes.expanded),\n focusVisibleClassName: clsx(classes.focusVisible, classes.focused, focusVisibleClassName),\n onClick: handleChange,\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.content, expanded && classes.expanded)\n }, children), expandIcon && /*#__PURE__*/React.createElement(IconButton, _extends({\n className: clsx(classes.expandIcon, expanded && classes.expanded),\n edge: \"end\",\n component: \"div\",\n tabIndex: null,\n role: null,\n \"aria-hidden\": true\n }, IconButtonProps), expandIcon));\n});\nprocess.env.NODE_ENV !== \"production\" ? AccordionSummary.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the accordion summary.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: chainPropTypes(PropTypes.object, function (props) {\n // Guard against when generation of classes is disabled in the stylesheets (`disableGeneration`).\n // For `disableGeneration` we don't have an accurate warning but `disableGeneration` is an advanced use case anyway.\n if (props.classes.focused !== undefined && props.classes.focused.indexOf(' ') !== -1) {\n return new Error(['Material-UI: The `classes.focused` key is deprecated.', 'Use `classes.focusVisible` instead.', 'The name of the pseudo-class was changed for consistency.'].join('\\n'));\n }\n\n return null;\n }),\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The icon to display as the expand indicator.\n */\n expandIcon: PropTypes.node,\n\n /**\n * This prop can help identify which element has keyboard focus.\n * The class name will be applied when the element gains the focus through keyboard interaction.\n * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).\n * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/master/explainer.md).\n * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components\n * if needed.\n */\n focusVisibleClassName: PropTypes.string,\n\n /**\n * Props applied to the `IconButton` element wrapping the expand icon.\n */\n IconButtonProps: PropTypes.object,\n\n /**\n * @ignore\n */\n onClick: PropTypes.func\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiAccordionSummary'\n})(AccordionSummary);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toArray from \"@babel/runtime/helpers/esm/toArray\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport Collapse from '../Collapse';\nimport Paper from '../Paper';\nimport withStyles from '../styles/withStyles';\nimport AccordionContext from './AccordionContext';\nimport useControlled from '../utils/useControlled';\nexport var styles = function styles(theme) {\n var transition = {\n duration: theme.transitions.duration.shortest\n };\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n transition: theme.transitions.create(['margin'], transition),\n '&:before': {\n position: 'absolute',\n left: 0,\n top: -1,\n right: 0,\n height: 1,\n content: '\"\"',\n opacity: 1,\n backgroundColor: theme.palette.divider,\n transition: theme.transitions.create(['opacity', 'background-color'], transition)\n },\n '&:first-child': {\n '&:before': {\n display: 'none'\n }\n },\n '&$expanded': {\n margin: '16px 0',\n '&:first-child': {\n marginTop: 0\n },\n '&:last-child': {\n marginBottom: 0\n },\n '&:before': {\n opacity: 0\n }\n },\n '&$expanded + &': {\n '&:before': {\n display: 'none'\n }\n },\n '&$disabled': {\n backgroundColor: theme.palette.action.disabledBackground\n }\n },\n\n /* Styles applied to the root element if `square={false}`. */\n rounded: {\n borderRadius: 0,\n '&:first-child': {\n borderTopLeftRadius: theme.shape.borderRadius,\n borderTopRightRadius: theme.shape.borderRadius\n },\n '&:last-child': {\n borderBottomLeftRadius: theme.shape.borderRadius,\n borderBottomRightRadius: theme.shape.borderRadius,\n // Fix a rendering issue on Edge\n '@supports (-ms-ime-align: auto)': {\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0\n }\n }\n },\n\n /* Styles applied to the root element if `expanded={true}`. */\n expanded: {},\n\n /* Styles applied to the root element if `disabled={true}`. */\n disabled: {}\n };\n};\nvar Accordion = /*#__PURE__*/React.forwardRef(function Accordion(props, ref) {\n var childrenProp = props.children,\n classes = props.classes,\n className = props.className,\n _props$defaultExpande = props.defaultExpanded,\n defaultExpanded = _props$defaultExpande === void 0 ? false : _props$defaultExpande,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n expandedProp = props.expanded,\n onChange = props.onChange,\n _props$square = props.square,\n square = _props$square === void 0 ? false : _props$square,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Collapse : _props$TransitionComp,\n TransitionProps = props.TransitionProps,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"defaultExpanded\", \"disabled\", \"expanded\", \"onChange\", \"square\", \"TransitionComponent\", \"TransitionProps\"]);\n\n var _useControlled = useControlled({\n controlled: expandedProp,\n default: defaultExpanded,\n name: 'Accordion',\n state: 'expanded'\n }),\n _useControlled2 = _slicedToArray(_useControlled, 2),\n expanded = _useControlled2[0],\n setExpandedState = _useControlled2[1];\n\n var handleChange = React.useCallback(function (event) {\n setExpandedState(!expanded);\n\n if (onChange) {\n onChange(event, !expanded);\n }\n }, [expanded, onChange, setExpandedState]);\n\n var _React$Children$toArr = React.Children.toArray(childrenProp),\n _React$Children$toArr2 = _toArray(_React$Children$toArr),\n summary = _React$Children$toArr2[0],\n children = _React$Children$toArr2.slice(1);\n\n var contextValue = React.useMemo(function () {\n return {\n expanded: expanded,\n disabled: disabled,\n toggle: handleChange\n };\n }, [expanded, disabled, handleChange]);\n return /*#__PURE__*/React.createElement(Paper, _extends({\n className: clsx(classes.root, className, expanded && classes.expanded, disabled && classes.disabled, !square && classes.rounded),\n ref: ref,\n square: square\n }, other), /*#__PURE__*/React.createElement(AccordionContext.Provider, {\n value: contextValue\n }, summary), /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n in: expanded,\n timeout: \"auto\"\n }, TransitionProps), /*#__PURE__*/React.createElement(\"div\", {\n \"aria-labelledby\": summary.props.id,\n id: summary.props['aria-controls'],\n role: \"region\"\n }, children)));\n});\nprocess.env.NODE_ENV !== \"production\" ? Accordion.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the accordion.\n */\n children: chainPropTypes(PropTypes.node.isRequired, function (props) {\n var summary = React.Children.toArray(props.children)[0];\n\n if (isFragment(summary)) {\n return new Error(\"Material-UI: The Accordion doesn't accept a Fragment as a child. \" + 'Consider providing an array instead.');\n }\n\n if (! /*#__PURE__*/React.isValidElement(summary)) {\n return new Error('Material-UI: Expected the first child of Accordion to be a valid element.');\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, expands the accordion by default.\n */\n defaultExpanded: PropTypes.bool,\n\n /**\n * If `true`, the accordion will be displayed in a disabled state.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, expands the accordion, otherwise collapse it.\n * Setting this prop enables control over the accordion.\n */\n expanded: PropTypes.bool,\n\n /**\n * Callback fired when the expand/collapse state is changed.\n *\n * @param {object} event The event source of the callback.\n * @param {boolean} expanded The `expanded` state of the accordion.\n */\n onChange: PropTypes.func,\n\n /**\n * If `true`, rounded corners are disabled.\n */\n square: PropTypes.bool,\n\n /**\n * The component used for the collapse effect.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiAccordion'\n})(Accordion);","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nfunction _toArray(r) {\n return arrayWithHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableRest();\n}\nexport { _toArray as default };","import * as React from 'react';\n/**\n * @ignore - internal component.\n * @type {React.Context<{} | {expanded: boolean, disabled: boolean, toggle: () => void}>}\n */\n\nvar AccordionContext = React.createContext({});\n\nif (process.env.NODE_ENV !== 'production') {\n AccordionContext.displayName = 'AccordionContext';\n}\n\nexport default AccordionContext;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Fade from '../Fade';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n // Improve scrollable dialog support.\n zIndex: -1,\n position: 'fixed',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n right: 0,\n bottom: 0,\n top: 0,\n left: 0,\n backgroundColor: 'rgba(0, 0, 0, 0.5)',\n WebkitTapHighlightColor: 'transparent'\n },\n\n /* Styles applied to the root element if `invisible={true}`. */\n invisible: {\n backgroundColor: 'transparent'\n }\n};\nvar Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$invisible = props.invisible,\n invisible = _props$invisible === void 0 ? false : _props$invisible,\n open = props.open,\n transitionDuration = props.transitionDuration,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Fade : _props$TransitionComp,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"invisible\", \"open\", \"transitionDuration\", \"TransitionComponent\"]);\n\n return /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n in: open,\n timeout: transitionDuration\n }, other), /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.root, className, invisible && classes.invisible),\n \"aria-hidden\": true,\n ref: ref\n }, children));\n});\nprocess.env.NODE_ENV !== \"production\" ? Backdrop.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the backdrop is invisible.\n * It can be used when rendering a popover or a custom select component.\n */\n invisible: PropTypes.bool,\n\n /**\n * If `true`, the backdrop is open.\n */\n open: PropTypes.bool.isRequired,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiBackdrop'\n})(Backdrop);","import { borders, compose, display, flexbox, grid, palette, positions, shadows, sizing, spacing, typography, styleFunctionSx } from '@material-ui/system';\nimport styled from '../styles/styled';\nexport var styleFunction = styleFunctionSx(compose(borders, display, flexbox, grid, positions, palette, shadows, sizing, spacing, typography));\n/**\n * @ignore - do not document.\n */\n\nvar Box = styled('div')(styleFunction, {\n name: 'MuiBox'\n});\nexport default Box;","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport useEventCallback from '../utils/useEventCallback';\nvar useEnhancedEffect = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;\n/**\n * @ignore - internal component.\n */\n\nfunction Ripple(props) {\n var classes = props.classes,\n _props$pulsate = props.pulsate,\n pulsate = _props$pulsate === void 0 ? false : _props$pulsate,\n rippleX = props.rippleX,\n rippleY = props.rippleY,\n rippleSize = props.rippleSize,\n inProp = props.in,\n _props$onExited = props.onExited,\n onExited = _props$onExited === void 0 ? function () {} : _props$onExited,\n timeout = props.timeout;\n\n var _React$useState = React.useState(false),\n leaving = _React$useState[0],\n setLeaving = _React$useState[1];\n\n var rippleClassName = clsx(classes.ripple, classes.rippleVisible, pulsate && classes.ripplePulsate);\n var rippleStyles = {\n width: rippleSize,\n height: rippleSize,\n top: -(rippleSize / 2) + rippleY,\n left: -(rippleSize / 2) + rippleX\n };\n var childClassName = clsx(classes.child, leaving && classes.childLeaving, pulsate && classes.childPulsate);\n var handleExited = useEventCallback(onExited); // Ripple is used for user feedback (e.g. click or press) so we want to apply styles with the highest priority\n\n useEnhancedEffect(function () {\n if (!inProp) {\n // react-transition-group#onExit\n setLeaving(true); // react-transition-group#onExited\n\n var timeoutId = setTimeout(handleExited, timeout);\n return function () {\n clearTimeout(timeoutId);\n };\n }\n\n return undefined;\n }, [handleExited, inProp, timeout]);\n return /*#__PURE__*/React.createElement(\"span\", {\n className: rippleClassName,\n style: rippleStyles\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: childClassName\n }));\n}\n\nprocess.env.NODE_ENV !== \"production\" ? Ripple.propTypes = {\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore - injected from TransitionGroup\n */\n in: PropTypes.bool,\n\n /**\n * @ignore - injected from TransitionGroup\n */\n onExited: PropTypes.func,\n\n /**\n * If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.\n */\n pulsate: PropTypes.bool,\n\n /**\n * Diameter of the ripple.\n */\n rippleSize: PropTypes.number,\n\n /**\n * Horizontal position of the ripple center.\n */\n rippleX: PropTypes.number,\n\n /**\n * Vertical position of the ripple center.\n */\n rippleY: PropTypes.number,\n\n /**\n * exit delay\n */\n timeout: PropTypes.number.isRequired\n} : void 0;\nexport default Ripple;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { TransitionGroup } from 'react-transition-group';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Ripple from './Ripple';\nvar DURATION = 550;\nexport var DELAY_RIPPLE = 80;\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n overflow: 'hidden',\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 0,\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: 'inherit'\n },\n\n /* Styles applied to the internal `Ripple` components `ripple` class. */\n ripple: {\n opacity: 0,\n position: 'absolute'\n },\n\n /* Styles applied to the internal `Ripple` components `rippleVisible` class. */\n rippleVisible: {\n opacity: 0.3,\n transform: 'scale(1)',\n animation: \"$enter \".concat(DURATION, \"ms \").concat(theme.transitions.easing.easeInOut)\n },\n\n /* Styles applied to the internal `Ripple` components `ripplePulsate` class. */\n ripplePulsate: {\n animationDuration: \"\".concat(theme.transitions.duration.shorter, \"ms\")\n },\n\n /* Styles applied to the internal `Ripple` components `child` class. */\n child: {\n opacity: 1,\n display: 'block',\n width: '100%',\n height: '100%',\n borderRadius: '50%',\n backgroundColor: 'currentColor'\n },\n\n /* Styles applied to the internal `Ripple` components `childLeaving` class. */\n childLeaving: {\n opacity: 0,\n animation: \"$exit \".concat(DURATION, \"ms \").concat(theme.transitions.easing.easeInOut)\n },\n\n /* Styles applied to the internal `Ripple` components `childPulsate` class. */\n childPulsate: {\n position: 'absolute',\n left: 0,\n top: 0,\n animation: \"$pulsate 2500ms \".concat(theme.transitions.easing.easeInOut, \" 200ms infinite\")\n },\n '@keyframes enter': {\n '0%': {\n transform: 'scale(0)',\n opacity: 0.1\n },\n '100%': {\n transform: 'scale(1)',\n opacity: 0.3\n }\n },\n '@keyframes exit': {\n '0%': {\n opacity: 1\n },\n '100%': {\n opacity: 0\n }\n },\n '@keyframes pulsate': {\n '0%': {\n transform: 'scale(1)'\n },\n '50%': {\n transform: 'scale(0.92)'\n },\n '100%': {\n transform: 'scale(1)'\n }\n }\n };\n};\n/**\n * @ignore - internal component.\n *\n * TODO v5: Make private\n */\n\nvar TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(props, ref) {\n var _props$center = props.center,\n centerProp = _props$center === void 0 ? false : _props$center,\n classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"center\", \"classes\", \"className\"]);\n\n var _React$useState = React.useState([]),\n ripples = _React$useState[0],\n setRipples = _React$useState[1];\n\n var nextKey = React.useRef(0);\n var rippleCallback = React.useRef(null);\n React.useEffect(function () {\n if (rippleCallback.current) {\n rippleCallback.current();\n rippleCallback.current = null;\n }\n }, [ripples]); // Used to filter out mouse emulated events on mobile.\n\n var ignoringMouseDown = React.useRef(false); // We use a timer in order to only show the ripples for touch \"click\" like events.\n // We don't want to display the ripple for touch scroll events.\n\n var startTimer = React.useRef(null); // This is the hook called once the previous timeout is ready.\n\n var startTimerCommit = React.useRef(null);\n var container = React.useRef(null);\n React.useEffect(function () {\n return function () {\n clearTimeout(startTimer.current);\n };\n }, []);\n var startCommit = React.useCallback(function (params) {\n var pulsate = params.pulsate,\n rippleX = params.rippleX,\n rippleY = params.rippleY,\n rippleSize = params.rippleSize,\n cb = params.cb;\n setRipples(function (oldRipples) {\n return [].concat(_toConsumableArray(oldRipples), [/*#__PURE__*/React.createElement(Ripple, {\n key: nextKey.current,\n classes: classes,\n timeout: DURATION,\n pulsate: pulsate,\n rippleX: rippleX,\n rippleY: rippleY,\n rippleSize: rippleSize\n })]);\n });\n nextKey.current += 1;\n rippleCallback.current = cb;\n }, [classes]);\n var start = React.useCallback(function () {\n var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var cb = arguments.length > 2 ? arguments[2] : undefined;\n var _options$pulsate = options.pulsate,\n pulsate = _options$pulsate === void 0 ? false : _options$pulsate,\n _options$center = options.center,\n center = _options$center === void 0 ? centerProp || options.pulsate : _options$center,\n _options$fakeElement = options.fakeElement,\n fakeElement = _options$fakeElement === void 0 ? false : _options$fakeElement;\n\n if (event.type === 'mousedown' && ignoringMouseDown.current) {\n ignoringMouseDown.current = false;\n return;\n }\n\n if (event.type === 'touchstart') {\n ignoringMouseDown.current = true;\n }\n\n var element = fakeElement ? null : container.current;\n var rect = element ? element.getBoundingClientRect() : {\n width: 0,\n height: 0,\n left: 0,\n top: 0\n }; // Get the size of the ripple\n\n var rippleX;\n var rippleY;\n var rippleSize;\n\n if (center || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) {\n rippleX = Math.round(rect.width / 2);\n rippleY = Math.round(rect.height / 2);\n } else {\n var _ref = event.touches ? event.touches[0] : event,\n clientX = _ref.clientX,\n clientY = _ref.clientY;\n\n rippleX = Math.round(clientX - rect.left);\n rippleY = Math.round(clientY - rect.top);\n }\n\n if (center) {\n rippleSize = Math.sqrt((2 * Math.pow(rect.width, 2) + Math.pow(rect.height, 2)) / 3); // For some reason the animation is broken on Mobile Chrome if the size if even.\n\n if (rippleSize % 2 === 0) {\n rippleSize += 1;\n }\n } else {\n var sizeX = Math.max(Math.abs((element ? element.clientWidth : 0) - rippleX), rippleX) * 2 + 2;\n var sizeY = Math.max(Math.abs((element ? element.clientHeight : 0) - rippleY), rippleY) * 2 + 2;\n rippleSize = Math.sqrt(Math.pow(sizeX, 2) + Math.pow(sizeY, 2));\n } // Touche devices\n\n\n if (event.touches) {\n // check that this isn't another touchstart due to multitouch\n // otherwise we will only clear a single timer when unmounting while two\n // are running\n if (startTimerCommit.current === null) {\n // Prepare the ripple effect.\n startTimerCommit.current = function () {\n startCommit({\n pulsate: pulsate,\n rippleX: rippleX,\n rippleY: rippleY,\n rippleSize: rippleSize,\n cb: cb\n });\n }; // Delay the execution of the ripple effect.\n\n\n startTimer.current = setTimeout(function () {\n if (startTimerCommit.current) {\n startTimerCommit.current();\n startTimerCommit.current = null;\n }\n }, DELAY_RIPPLE); // We have to make a tradeoff with this value.\n }\n } else {\n startCommit({\n pulsate: pulsate,\n rippleX: rippleX,\n rippleY: rippleY,\n rippleSize: rippleSize,\n cb: cb\n });\n }\n }, [centerProp, startCommit]);\n var pulsate = React.useCallback(function () {\n start({}, {\n pulsate: true\n });\n }, [start]);\n var stop = React.useCallback(function (event, cb) {\n clearTimeout(startTimer.current); // The touch interaction occurs too quickly.\n // We still want to show ripple effect.\n\n if (event.type === 'touchend' && startTimerCommit.current) {\n event.persist();\n startTimerCommit.current();\n startTimerCommit.current = null;\n startTimer.current = setTimeout(function () {\n stop(event, cb);\n });\n return;\n }\n\n startTimerCommit.current = null;\n setRipples(function (oldRipples) {\n if (oldRipples.length > 0) {\n return oldRipples.slice(1);\n }\n\n return oldRipples;\n });\n rippleCallback.current = cb;\n }, []);\n React.useImperativeHandle(ref, function () {\n return {\n pulsate: pulsate,\n start: start,\n stop: stop\n };\n }, [pulsate, start, stop]);\n return /*#__PURE__*/React.createElement(\"span\", _extends({\n className: clsx(classes.root, className),\n ref: container\n }, other), /*#__PURE__*/React.createElement(TransitionGroup, {\n component: null,\n exit: true\n }, ripples));\n});\nprocess.env.NODE_ENV !== \"production\" ? TouchRipple.propTypes = {\n /**\n * If `true`, the ripple starts at the center of the component\n * rather than at the point of interaction.\n */\n center: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n flip: false,\n name: 'MuiTouchRipple'\n})( /*#__PURE__*/React.memo(TouchRipple));","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport * as ReactDOM from 'react-dom';\nimport clsx from 'clsx';\nimport { elementTypeAcceptingRef, refType } from '@material-ui/utils';\nimport useForkRef from '../utils/useForkRef';\nimport useEventCallback from '../utils/useEventCallback';\nimport deprecatedPropType from '../utils/deprecatedPropType';\nimport withStyles from '../styles/withStyles';\nimport useIsFocusVisible from '../utils/useIsFocusVisible';\nimport TouchRipple from './TouchRipple';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n position: 'relative',\n WebkitTapHighlightColor: 'transparent',\n backgroundColor: 'transparent',\n // Reset default value\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n border: 0,\n margin: 0,\n // Remove the margin in Safari\n borderRadius: 0,\n padding: 0,\n // Remove the padding in Firefox\n cursor: 'pointer',\n userSelect: 'none',\n verticalAlign: 'middle',\n '-moz-appearance': 'none',\n // Reset\n '-webkit-appearance': 'none',\n // Reset\n textDecoration: 'none',\n // So we take precedent over the style of a native
element.\n color: 'inherit',\n '&::-moz-focus-inner': {\n borderStyle: 'none' // Remove Firefox dotted outline.\n\n },\n '&$disabled': {\n pointerEvents: 'none',\n // Disable link interactions\n cursor: 'default'\n },\n '@media print': {\n colorAdjust: 'exact'\n }\n },\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Pseudo-class applied to the root element if keyboard focused. */\n focusVisible: {}\n};\n/**\n * `ButtonBase` contains as few styles as possible.\n * It aims to be a simple building block for creating a button.\n * It contains a load of style reset and some focus/ripple logic.\n */\n\nvar ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {\n var action = props.action,\n buttonRefProp = props.buttonRef,\n _props$centerRipple = props.centerRipple,\n centerRipple = _props$centerRipple === void 0 ? false : _props$centerRipple,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n component = _props$component === void 0 ? 'button' : _props$component,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableRipple = props.disableRipple,\n disableRipple = _props$disableRipple === void 0 ? false : _props$disableRipple,\n _props$disableTouchRi = props.disableTouchRipple,\n disableTouchRipple = _props$disableTouchRi === void 0 ? false : _props$disableTouchRi,\n _props$focusRipple = props.focusRipple,\n focusRipple = _props$focusRipple === void 0 ? false : _props$focusRipple,\n focusVisibleClassName = props.focusVisibleClassName,\n onBlur = props.onBlur,\n onClick = props.onClick,\n onFocus = props.onFocus,\n onFocusVisible = props.onFocusVisible,\n onKeyDown = props.onKeyDown,\n onKeyUp = props.onKeyUp,\n onMouseDown = props.onMouseDown,\n onMouseLeave = props.onMouseLeave,\n onMouseUp = props.onMouseUp,\n onTouchEnd = props.onTouchEnd,\n onTouchMove = props.onTouchMove,\n onTouchStart = props.onTouchStart,\n onDragLeave = props.onDragLeave,\n _props$tabIndex = props.tabIndex,\n tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex,\n TouchRippleProps = props.TouchRippleProps,\n _props$type = props.type,\n type = _props$type === void 0 ? 'button' : _props$type,\n other = _objectWithoutProperties(props, [\"action\", \"buttonRef\", \"centerRipple\", \"children\", \"classes\", \"className\", \"component\", \"disabled\", \"disableRipple\", \"disableTouchRipple\", \"focusRipple\", \"focusVisibleClassName\", \"onBlur\", \"onClick\", \"onFocus\", \"onFocusVisible\", \"onKeyDown\", \"onKeyUp\", \"onMouseDown\", \"onMouseLeave\", \"onMouseUp\", \"onTouchEnd\", \"onTouchMove\", \"onTouchStart\", \"onDragLeave\", \"tabIndex\", \"TouchRippleProps\", \"type\"]);\n\n var buttonRef = React.useRef(null);\n\n function getButtonNode() {\n // #StrictMode ready\n return ReactDOM.findDOMNode(buttonRef.current);\n }\n\n var rippleRef = React.useRef(null);\n\n var _React$useState = React.useState(false),\n focusVisible = _React$useState[0],\n setFocusVisible = _React$useState[1];\n\n if (disabled && focusVisible) {\n setFocusVisible(false);\n }\n\n var _useIsFocusVisible = useIsFocusVisible(),\n isFocusVisible = _useIsFocusVisible.isFocusVisible,\n onBlurVisible = _useIsFocusVisible.onBlurVisible,\n focusVisibleRef = _useIsFocusVisible.ref;\n\n React.useImperativeHandle(action, function () {\n return {\n focusVisible: function focusVisible() {\n setFocusVisible(true);\n buttonRef.current.focus();\n }\n };\n }, []);\n React.useEffect(function () {\n if (focusVisible && focusRipple && !disableRipple) {\n rippleRef.current.pulsate();\n }\n }, [disableRipple, focusRipple, focusVisible]);\n\n function useRippleHandler(rippleAction, eventCallback) {\n var skipRippleAction = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : disableTouchRipple;\n return useEventCallback(function (event) {\n if (eventCallback) {\n eventCallback(event);\n }\n\n var ignore = skipRippleAction;\n\n if (!ignore && rippleRef.current) {\n rippleRef.current[rippleAction](event);\n }\n\n return true;\n });\n }\n\n var handleMouseDown = useRippleHandler('start', onMouseDown);\n var handleDragLeave = useRippleHandler('stop', onDragLeave);\n var handleMouseUp = useRippleHandler('stop', onMouseUp);\n var handleMouseLeave = useRippleHandler('stop', function (event) {\n if (focusVisible) {\n event.preventDefault();\n }\n\n if (onMouseLeave) {\n onMouseLeave(event);\n }\n });\n var handleTouchStart = useRippleHandler('start', onTouchStart);\n var handleTouchEnd = useRippleHandler('stop', onTouchEnd);\n var handleTouchMove = useRippleHandler('stop', onTouchMove);\n var handleBlur = useRippleHandler('stop', function (event) {\n if (focusVisible) {\n onBlurVisible(event);\n setFocusVisible(false);\n }\n\n if (onBlur) {\n onBlur(event);\n }\n }, false);\n var handleFocus = useEventCallback(function (event) {\n // Fix for https://github.com/facebook/react/issues/7769\n if (!buttonRef.current) {\n buttonRef.current = event.currentTarget;\n }\n\n if (isFocusVisible(event)) {\n setFocusVisible(true);\n\n if (onFocusVisible) {\n onFocusVisible(event);\n }\n }\n\n if (onFocus) {\n onFocus(event);\n }\n });\n\n var isNonNativeButton = function isNonNativeButton() {\n var button = getButtonNode();\n return component && component !== 'button' && !(button.tagName === 'A' && button.href);\n };\n /**\n * IE 11 shim for https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/repeat\n */\n\n\n var keydownRef = React.useRef(false);\n var handleKeyDown = useEventCallback(function (event) {\n // Check if key is already down to avoid repeats being counted as multiple activations\n if (focusRipple && !keydownRef.current && focusVisible && rippleRef.current && event.key === ' ') {\n keydownRef.current = true;\n event.persist();\n rippleRef.current.stop(event, function () {\n rippleRef.current.start(event);\n });\n }\n\n if (event.target === event.currentTarget && isNonNativeButton() && event.key === ' ') {\n event.preventDefault();\n }\n\n if (onKeyDown) {\n onKeyDown(event);\n } // Keyboard accessibility for non interactive elements\n\n\n if (event.target === event.currentTarget && isNonNativeButton() && event.key === 'Enter' && !disabled) {\n event.preventDefault();\n\n if (onClick) {\n onClick(event);\n }\n }\n });\n var handleKeyUp = useEventCallback(function (event) {\n // calling preventDefault in keyUp on a \n *
\n * );\n * }\n * ```\n *\n * When the `in` prop is set to `true`, the child component will first receive\n * the class `example-enter`, then the `example-enter-active` will be added in\n * the next tick. `CSSTransition` [forces a\n * reflow](https://github.com/reactjs/react-transition-group/blob/5007303e729a74be66a21c3e2205e4916821524b/src/CSSTransition.js#L208-L215)\n * between before adding the `example-enter-active`. This is an important trick\n * because it allows us to transition between `example-enter` and\n * `example-enter-active` even though they were added immediately one after\n * another. Most notably, this is what makes it possible for us to animate\n * _appearance_.\n *\n * ```css\n * .my-node-enter {\n * opacity: 0;\n * }\n * .my-node-enter-active {\n * opacity: 1;\n * transition: opacity 200ms;\n * }\n * .my-node-exit {\n * opacity: 1;\n * }\n * .my-node-exit-active {\n * opacity: 0;\n * transition: opacity 200ms;\n * }\n * ```\n *\n * `*-active` classes represent which styles you want to animate **to**, so it's\n * important to add `transition` declaration only to them, otherwise transitions\n * might not behave as intended! This might not be obvious when the transitions\n * are symmetrical, i.e. when `*-enter-active` is the same as `*-exit`, like in\n * the example above (minus `transition`), but it becomes apparent in more\n * complex transitions.\n *\n * **Note**: If you're using the\n * [`appear`](http://reactcommunity.org/react-transition-group/transition#Transition-prop-appear)\n * prop, make sure to define styles for `.appear-*` classes as well.\n */\n\n\nvar CSSTransition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(CSSTransition, _React$Component);\n\n function CSSTransition() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.appliedClasses = {\n appear: {},\n enter: {},\n exit: {}\n };\n\n _this.onEnter = function (maybeNode, maybeAppearing) {\n var _this$resolveArgument = _this.resolveArguments(maybeNode, maybeAppearing),\n node = _this$resolveArgument[0],\n appearing = _this$resolveArgument[1];\n\n _this.removeClasses(node, 'exit');\n\n _this.addClass(node, appearing ? 'appear' : 'enter', 'base');\n\n if (_this.props.onEnter) {\n _this.props.onEnter(maybeNode, maybeAppearing);\n }\n };\n\n _this.onEntering = function (maybeNode, maybeAppearing) {\n var _this$resolveArgument2 = _this.resolveArguments(maybeNode, maybeAppearing),\n node = _this$resolveArgument2[0],\n appearing = _this$resolveArgument2[1];\n\n var type = appearing ? 'appear' : 'enter';\n\n _this.addClass(node, type, 'active');\n\n if (_this.props.onEntering) {\n _this.props.onEntering(maybeNode, maybeAppearing);\n }\n };\n\n _this.onEntered = function (maybeNode, maybeAppearing) {\n var _this$resolveArgument3 = _this.resolveArguments(maybeNode, maybeAppearing),\n node = _this$resolveArgument3[0],\n appearing = _this$resolveArgument3[1];\n\n var type = appearing ? 'appear' : 'enter';\n\n _this.removeClasses(node, type);\n\n _this.addClass(node, type, 'done');\n\n if (_this.props.onEntered) {\n _this.props.onEntered(maybeNode, maybeAppearing);\n }\n };\n\n _this.onExit = function (maybeNode) {\n var _this$resolveArgument4 = _this.resolveArguments(maybeNode),\n node = _this$resolveArgument4[0];\n\n _this.removeClasses(node, 'appear');\n\n _this.removeClasses(node, 'enter');\n\n _this.addClass(node, 'exit', 'base');\n\n if (_this.props.onExit) {\n _this.props.onExit(maybeNode);\n }\n };\n\n _this.onExiting = function (maybeNode) {\n var _this$resolveArgument5 = _this.resolveArguments(maybeNode),\n node = _this$resolveArgument5[0];\n\n _this.addClass(node, 'exit', 'active');\n\n if (_this.props.onExiting) {\n _this.props.onExiting(maybeNode);\n }\n };\n\n _this.onExited = function (maybeNode) {\n var _this$resolveArgument6 = _this.resolveArguments(maybeNode),\n node = _this$resolveArgument6[0];\n\n _this.removeClasses(node, 'exit');\n\n _this.addClass(node, 'exit', 'done');\n\n if (_this.props.onExited) {\n _this.props.onExited(maybeNode);\n }\n };\n\n _this.resolveArguments = function (maybeNode, maybeAppearing) {\n return _this.props.nodeRef ? [_this.props.nodeRef.current, maybeNode] // here `maybeNode` is actually `appearing`\n : [maybeNode, maybeAppearing];\n };\n\n _this.getClassNames = function (type) {\n var classNames = _this.props.classNames;\n var isStringClassNames = typeof classNames === 'string';\n var prefix = isStringClassNames && classNames ? classNames + \"-\" : '';\n var baseClassName = isStringClassNames ? \"\" + prefix + type : classNames[type];\n var activeClassName = isStringClassNames ? baseClassName + \"-active\" : classNames[type + \"Active\"];\n var doneClassName = isStringClassNames ? baseClassName + \"-done\" : classNames[type + \"Done\"];\n return {\n baseClassName: baseClassName,\n activeClassName: activeClassName,\n doneClassName: doneClassName\n };\n };\n\n return _this;\n }\n\n var _proto = CSSTransition.prototype;\n\n _proto.addClass = function addClass(node, type, phase) {\n var className = this.getClassNames(type)[phase + \"ClassName\"];\n\n var _this$getClassNames = this.getClassNames('enter'),\n doneClassName = _this$getClassNames.doneClassName;\n\n if (type === 'appear' && phase === 'done' && doneClassName) {\n className += \" \" + doneClassName;\n } // This is to force a repaint,\n // which is necessary in order to transition styles when adding a class name.\n\n\n if (phase === 'active') {\n /* eslint-disable no-unused-expressions */\n node && node.scrollTop;\n }\n\n if (className) {\n this.appliedClasses[type][phase] = className;\n\n _addClass(node, className);\n }\n };\n\n _proto.removeClasses = function removeClasses(node, type) {\n var _this$appliedClasses$ = this.appliedClasses[type],\n baseClassName = _this$appliedClasses$.base,\n activeClassName = _this$appliedClasses$.active,\n doneClassName = _this$appliedClasses$.done;\n this.appliedClasses[type] = {};\n\n if (baseClassName) {\n removeClass(node, baseClassName);\n }\n\n if (activeClassName) {\n removeClass(node, activeClassName);\n }\n\n if (doneClassName) {\n removeClass(node, doneClassName);\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n _ = _this$props.classNames,\n props = _objectWithoutPropertiesLoose(_this$props, [\"classNames\"]);\n\n return /*#__PURE__*/React.createElement(Transition, _extends({}, props, {\n onEnter: this.onEnter,\n onEntered: this.onEntered,\n onEntering: this.onEntering,\n onExit: this.onExit,\n onExiting: this.onExiting,\n onExited: this.onExited\n }));\n };\n\n return CSSTransition;\n}(React.Component);\n\nCSSTransition.defaultProps = {\n classNames: ''\n};\nCSSTransition.propTypes = process.env.NODE_ENV !== \"production\" ? _extends({}, Transition.propTypes, {\n /**\n * The animation classNames applied to the component as it appears, enters,\n * exits or has finished the transition. A single name can be provided, which\n * will be suffixed for each stage, e.g. `classNames=\"fade\"` applies:\n *\n * - `fade-appear`, `fade-appear-active`, `fade-appear-done`\n * - `fade-enter`, `fade-enter-active`, `fade-enter-done`\n * - `fade-exit`, `fade-exit-active`, `fade-exit-done`\n *\n * A few details to note about how these classes are applied:\n *\n * 1. They are _joined_ with the ones that are already defined on the child\n * component, so if you want to add some base styles, you can use\n * `className` without worrying that it will be overridden.\n *\n * 2. If the transition component mounts with `in={false}`, no classes are\n * applied yet. You might be expecting `*-exit-done`, but if you think\n * about it, a component cannot finish exiting if it hasn't entered yet.\n *\n * 2. `fade-appear-done` and `fade-enter-done` will _both_ be applied. This\n * allows you to define different behavior for when appearing is done and\n * when regular entering is done, using selectors like\n * `.fade-enter-done:not(.fade-appear-done)`. For example, you could apply\n * an epic entrance animation when element first appears in the DOM using\n * [Animate.css](https://daneden.github.io/animate.css/). Otherwise you can\n * simply use `fade-enter-done` for defining both cases.\n *\n * Each individual classNames can also be specified independently like:\n *\n * ```js\n * classNames={{\n * appear: 'my-appear',\n * appearActive: 'my-active-appear',\n * appearDone: 'my-done-appear',\n * enter: 'my-enter',\n * enterActive: 'my-active-enter',\n * enterDone: 'my-done-enter',\n * exit: 'my-exit',\n * exitActive: 'my-active-exit',\n * exitDone: 'my-done-exit',\n * }}\n * ```\n *\n * If you want to set these classes using CSS Modules:\n *\n * ```js\n * import styles from './styles.css';\n * ```\n *\n * you might want to use camelCase in your CSS file, that way could simply\n * spread them instead of listing them one by one:\n *\n * ```js\n * classNames={{ ...styles }}\n * ```\n *\n * @type {string | {\n * appear?: string,\n * appearActive?: string,\n * appearDone?: string,\n * enter?: string,\n * enterActive?: string,\n * enterDone?: string,\n * exit?: string,\n * exitActive?: string,\n * exitDone?: string,\n * }}\n */\n classNames: classNamesShape,\n\n /**\n * A `` callback fired immediately after the 'enter' or 'appear' class is\n * applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEnter: PropTypes.func,\n\n /**\n * A `` callback fired immediately after the 'enter-active' or\n * 'appear-active' class is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * A `` callback fired immediately after the 'enter' or\n * 'appear' classes are **removed** and the `done` class is added to the DOM node.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntered: PropTypes.func,\n\n /**\n * A `` callback fired immediately after the 'exit' class is\n * applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement)\n */\n onExit: PropTypes.func,\n\n /**\n * A `` callback fired immediately after the 'exit-active' is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement)\n */\n onExiting: PropTypes.func,\n\n /**\n * A `` callback fired immediately after the 'exit' classes\n * are **removed** and the `exit-done` class is added to the DOM node.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement)\n */\n onExited: PropTypes.func\n}) : {};\nexport default CSSTransition;","import hasClass from './hasClass';\n/**\n * Adds a CSS class to a given element.\n * \n * @param element the element\n * @param className the CSS class name\n */\n\nexport default function addClass(element, className) {\n if (element.classList) element.classList.add(className);else if (!hasClass(element, className)) if (typeof element.className === 'string') element.className = element.className + \" \" + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + \" \" + className);\n}","/**\n * Checks if a given element has a CSS class.\n * \n * @param element the element\n * @param className the CSS class name\n */\nexport default function hasClass(element, className) {\n if (element.classList) return !!className && element.classList.contains(className);\n return (\" \" + (element.className.baseVal || element.className) + \" \").indexOf(\" \" + className + \" \") !== -1;\n}","import { arrayIncludes } from './utils';\nimport { IUtils } from '@date-io/core/IUtils';\nimport { MaterialUiPickersDate } from '../typings/date';\nimport { DatePickerView } from '../DatePicker/DatePicker';\n\ninterface FindClosestDateParams {\n date: MaterialUiPickersDate;\n utils: IUtils;\n minDate: MaterialUiPickersDate;\n maxDate: MaterialUiPickersDate;\n disableFuture: boolean;\n disablePast: boolean;\n shouldDisableDate: (date: MaterialUiPickersDate) => boolean;\n}\n\nexport const findClosestEnabledDate = ({\n date,\n utils,\n minDate,\n maxDate,\n disableFuture,\n disablePast,\n shouldDisableDate,\n}: FindClosestDateParams) => {\n const today = utils.startOfDay(utils.date());\n\n if (disablePast && utils.isBefore(minDate!, today)) {\n minDate = today;\n }\n\n if (disableFuture && utils.isAfter(maxDate, today)) {\n maxDate = today;\n }\n\n let forward = date;\n let backward = date;\n if (utils.isBefore(date, minDate)) {\n forward = utils.date(minDate);\n backward = null;\n }\n\n if (utils.isAfter(date, maxDate)) {\n if (backward) {\n backward = utils.date(maxDate);\n }\n\n forward = null;\n }\n\n while (forward || backward) {\n if (forward && utils.isAfter(forward, maxDate)) {\n forward = null;\n }\n if (backward && utils.isBefore(backward, minDate)) {\n backward = null;\n }\n\n if (forward) {\n if (!shouldDisableDate(forward)) {\n return forward;\n }\n forward = utils.addDays(forward, 1);\n }\n\n if (backward) {\n if (!shouldDisableDate(backward)) {\n return backward;\n }\n backward = utils.addDays(backward, -1);\n }\n }\n\n // fallback to today if no enabled days\n return utils.date();\n};\n\nexport const isYearOnlyView = (views: DatePickerView[]) =>\n views.length === 1 && views[0] === 'year';\n\nexport const isYearAndMonthViews = (views: DatePickerView[]) =>\n views.length === 2 && arrayIncludes(views, 'month') && arrayIncludes(views, 'year');\n\nexport const getFormatByViews = (views: DatePickerView[], utils: IUtils) => {\n if (isYearOnlyView(views)) {\n return utils.yearFormat;\n }\n\n if (isYearAndMonthViews(views)) {\n return utils.yearMonthFormat;\n }\n\n return utils.dateFormat;\n};\n","import * as React from 'react';\n\nexport interface DayWrapperProps {\n value: any;\n children: React.ReactNode;\n dayInCurrentMonth?: boolean;\n disabled?: boolean;\n onSelect: (value: any) => void;\n}\n\nconst DayWrapper: React.FC = ({\n children,\n value,\n disabled,\n onSelect,\n dayInCurrentMonth,\n ...other\n}) => {\n const handleClick = React.useCallback(() => onSelect(value), [onSelect, value]);\n\n return (\n \n {children}\n
\n );\n};\n\nexport default DayWrapper;\n","import * as React from 'react';\nimport clsx from 'clsx';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { CSSTransition, TransitionGroup } from 'react-transition-group';\n\nexport type SlideDirection = 'right' | 'left';\ninterface SlideTransitionProps {\n transKey: React.Key;\n className?: string;\n slideDirection: SlideDirection;\n children: React.ReactChild;\n}\n\nconst animationDuration = 350;\nexport const useStyles = makeStyles(\n theme => {\n const slideTransition = theme.transitions.create('transform', {\n duration: animationDuration,\n easing: 'cubic-bezier(0.35, 0.8, 0.4, 1)',\n });\n\n return {\n transitionContainer: {\n display: 'block',\n position: 'relative',\n '& > *': {\n position: 'absolute',\n top: 0,\n right: 0,\n left: 0,\n },\n },\n 'slideEnter-left': {\n willChange: 'transform',\n transform: 'translate(100%)',\n },\n 'slideEnter-right': {\n willChange: 'transform',\n transform: 'translate(-100%)',\n },\n slideEnterActive: {\n transform: 'translate(0%)',\n transition: slideTransition,\n },\n slideExit: {\n transform: 'translate(0%)',\n },\n 'slideExitActiveLeft-left': {\n willChange: 'transform',\n transform: 'translate(-200%)',\n transition: slideTransition,\n },\n 'slideExitActiveLeft-right': {\n willChange: 'transform',\n transform: 'translate(200%)',\n transition: slideTransition,\n },\n };\n },\n { name: 'MuiPickersSlideTransition' }\n);\n\nconst SlideTransition: React.SFC = ({\n children,\n transKey,\n slideDirection,\n className = null,\n}) => {\n const classes = useStyles();\n const transitionClasses = {\n exit: classes.slideExit,\n enterActive: classes.slideEnterActive,\n // @ts-ignore\n enter: classes['slideEnter-' + slideDirection],\n // @ts-ignore\n exitActive: classes['slideExitActiveLeft-' + slideDirection],\n };\n\n return (\n \n React.cloneElement(element, {\n classNames: transitionClasses,\n })\n }\n >\n \n \n );\n};\n\nexport default SlideTransition;\n","import * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport Typography from '@material-ui/core/Typography';\nimport SlideTransition, { SlideDirection } from './SlideTransition';\nimport IconButton, { IconButtonProps } from '@material-ui/core/IconButton';\nimport { DateType } from '@date-io/type';\nimport { useUtils } from '../../_shared/hooks/useUtils';\nimport { MaterialUiPickersDate } from '../../typings/date';\nimport { makeStyles, useTheme } from '@material-ui/core/styles';\nimport { ArrowLeftIcon } from '../../_shared/icons/ArrowLeftIcon';\nimport { ArrowRightIcon } from '../../_shared/icons/ArrowRightIcon';\n\nexport interface CalendarHeaderProps {\n currentMonth: DateType;\n leftArrowIcon?: React.ReactNode;\n rightArrowIcon?: React.ReactNode;\n leftArrowButtonProps?: Partial;\n rightArrowButtonProps?: Partial;\n disablePrevMonth?: boolean;\n disableNextMonth?: boolean;\n slideDirection: SlideDirection;\n onMonthChange: (date: MaterialUiPickersDate, direction: SlideDirection) => void | Promise;\n}\n\nexport const useStyles = makeStyles(\n theme => ({\n switchHeader: {\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n marginTop: theme.spacing(0.5),\n marginBottom: theme.spacing(1),\n },\n transitionContainer: {\n width: '100%',\n overflow: 'hidden',\n height: 23,\n },\n iconButton: {\n zIndex: 1,\n backgroundColor: theme.palette.background.paper,\n },\n daysHeader: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n maxHeight: 16,\n },\n dayLabel: {\n width: 36,\n margin: '0 2px',\n textAlign: 'center',\n color: theme.palette.text.hint,\n },\n }),\n { name: 'MuiPickersCalendarHeader' }\n);\n\nexport const CalendarHeader: React.SFC = ({\n currentMonth,\n onMonthChange,\n leftArrowIcon,\n rightArrowIcon,\n leftArrowButtonProps,\n rightArrowButtonProps,\n disablePrevMonth,\n disableNextMonth,\n slideDirection,\n}) => {\n const utils = useUtils();\n const classes = useStyles();\n const theme = useTheme();\n const rtl = theme.direction === 'rtl';\n\n const selectNextMonth = () => onMonthChange(utils.getNextMonth(currentMonth), 'left');\n const selectPreviousMonth = () => onMonthChange(utils.getPreviousMonth(currentMonth), 'right');\n\n return (\n
\n
\n \n {rtl ? rightArrowIcon : leftArrowIcon}\n \n\n \n \n {utils.getCalendarHeaderText(currentMonth)}\n \n \n\n \n {rtl ? leftArrowIcon : rightArrowIcon}\n \n
\n\n
\n {utils.getWeekdays().map((day, index) => (\n \n {day}\n \n ))}\n
\n
\n );\n};\n\nCalendarHeader.displayName = 'CalendarHeader';\n\nCalendarHeader.propTypes = {\n leftArrowIcon: PropTypes.node,\n rightArrowIcon: PropTypes.node,\n disablePrevMonth: PropTypes.bool,\n disableNextMonth: PropTypes.bool,\n};\n\nCalendarHeader.defaultProps = {\n leftArrowIcon: ,\n rightArrowIcon: ,\n disablePrevMonth: false,\n disableNextMonth: false,\n};\n\nexport default CalendarHeader;\n","import React from 'react';\nimport SvgIcon, { SvgIconProps } from '@material-ui/core/SvgIcon';\n\nexport const ArrowLeftIcon: React.SFC = props => {\n return (\n \n \n \n \n );\n};\n","import React from 'react';\nimport SvgIcon, { SvgIconProps } from '@material-ui/core/SvgIcon';\n\nexport const ArrowRightIcon: React.SFC = props => {\n return (\n \n \n \n \n );\n};\n","import * as React from 'react';\nimport { Omit } from '../_helpers/utils';\nimport { useUtils } from './hooks/useUtils';\nimport { IUtils } from '@date-io/core/IUtils';\nimport { MaterialUiPickersDate } from '../typings/date';\n\nexport interface WithUtilsProps {\n utils: IUtils;\n}\n\nexport const withUtils = () =>

(Component: React.ComponentType

) => {\n const WithUtils: React.SFC> = props => {\n const utils = useUtils();\n return ;\n };\n\n WithUtils.displayName = `WithUtils(${Component.displayName || Component.name})`;\n return WithUtils;\n};\n","import * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport Day from './Day';\nimport DayWrapper from './DayWrapper';\nimport CalendarHeader from './CalendarHeader';\nimport CircularProgress from '@material-ui/core/CircularProgress';\nimport SlideTransition, { SlideDirection } from './SlideTransition';\nimport { Theme } from '@material-ui/core/styles';\nimport { VariantContext } from '../../wrappers/Wrapper';\nimport { MaterialUiPickersDate } from '../../typings/date';\nimport { runKeyHandler } from '../../_shared/hooks/useKeyDown';\nimport { IconButtonProps } from '@material-ui/core/IconButton';\nimport { withStyles, WithStyles } from '@material-ui/core/styles';\nimport { findClosestEnabledDate } from '../../_helpers/date-utils';\nimport { withUtils, WithUtilsProps } from '../../_shared/WithUtils';\n\nexport interface OutterCalendarProps {\n /** Left arrow icon */\n leftArrowIcon?: React.ReactNode;\n /** Right arrow icon */\n rightArrowIcon?: React.ReactNode;\n /** Custom renderer for day @DateIOType */\n renderDay?: (\n day: MaterialUiPickersDate,\n selectedDate: MaterialUiPickersDate,\n dayInCurrentMonth: boolean,\n dayComponent: JSX.Element\n ) => JSX.Element;\n /**\n * Enables keyboard listener for moving between days in calendar\n * @default true\n */\n allowKeyboardControl?: boolean;\n /**\n * Props to pass to left arrow button\n * @type {Partial}\n */\n leftArrowButtonProps?: Partial;\n /**\n * Props to pass to right arrow button\n * @type {Partial}\n */\n rightArrowButtonProps?: Partial;\n /** Disable specific date @DateIOType */\n shouldDisableDate?: (day: MaterialUiPickersDate) => boolean;\n /** Callback firing on month change. Return promise to render spinner till it will not be resolved @DateIOType */\n onMonthChange?: (date: MaterialUiPickersDate) => void | Promise;\n /** Custom loading indicator */\n loadingIndicator?: JSX.Element;\n}\n\nexport interface CalendarProps\n extends OutterCalendarProps,\n WithUtilsProps,\n WithStyles {\n /** Calendar Date @DateIOType */\n date: MaterialUiPickersDate;\n /** Calendar onChange */\n onChange: (date: MaterialUiPickersDate, isFinish?: boolean) => void;\n /** Min date @DateIOType */\n minDate?: MaterialUiPickersDate;\n /** Max date @DateIOType */\n maxDate?: MaterialUiPickersDate;\n /** Disable past dates */\n disablePast?: boolean;\n /** Disable future dates */\n disableFuture?: boolean;\n}\n\nexport interface CalendarState {\n slideDirection: SlideDirection;\n currentMonth: MaterialUiPickersDate;\n lastDate?: MaterialUiPickersDate;\n loadingQueue: number;\n}\n\nconst KeyDownListener = ({ onKeyDown }: { onKeyDown: (e: KeyboardEvent) => void }) => {\n React.useEffect(() => {\n window.addEventListener('keydown', onKeyDown);\n return () => {\n window.removeEventListener('keydown', onKeyDown);\n };\n }, [onKeyDown]);\n\n return null;\n};\n\nexport class Calendar extends React.Component {\n static contextType = VariantContext;\n static propTypes: any = {\n renderDay: PropTypes.func,\n shouldDisableDate: PropTypes.func,\n allowKeyboardControl: PropTypes.bool,\n };\n\n static defaultProps: Partial = {\n minDate: new Date('1900-01-01'),\n maxDate: new Date('2100-01-01'),\n disablePast: false,\n disableFuture: false,\n allowKeyboardControl: true,\n };\n\n static getDerivedStateFromProps(nextProps: CalendarProps, state: CalendarState) {\n const { utils, date: nextDate } = nextProps;\n\n if (!utils.isEqual(nextDate, state.lastDate)) {\n const nextMonth = utils.getMonth(nextDate);\n const lastDate = state.lastDate || nextDate;\n const lastMonth = utils.getMonth(lastDate);\n\n return {\n lastDate: nextDate,\n currentMonth: nextProps.utils.startOfMonth(nextDate),\n // prettier-ignore\n slideDirection: nextMonth === lastMonth\n ? state.slideDirection\n : utils.isAfterDay(nextDate, lastDate)\n ? 'left'\n : 'right'\n };\n }\n\n return null;\n }\n\n state: CalendarState = {\n slideDirection: 'left',\n currentMonth: this.props.utils.startOfMonth(this.props.date),\n loadingQueue: 0,\n };\n\n componentDidMount() {\n const { date, minDate, maxDate, utils, disablePast, disableFuture } = this.props;\n\n if (this.shouldDisableDate(date)) {\n const closestEnabledDate = findClosestEnabledDate({\n date,\n utils,\n minDate: utils.date(minDate),\n maxDate: utils.date(maxDate),\n disablePast: Boolean(disablePast),\n disableFuture: Boolean(disableFuture),\n shouldDisableDate: this.shouldDisableDate,\n });\n\n this.handleDaySelect(closestEnabledDate, false);\n }\n }\n\n private pushToLoadingQueue = () => {\n const loadingQueue = this.state.loadingQueue + 1;\n this.setState({ loadingQueue });\n };\n\n private popFromLoadingQueue = () => {\n let loadingQueue = this.state.loadingQueue;\n loadingQueue = loadingQueue <= 0 ? 0 : loadingQueue - 1;\n this.setState({ loadingQueue });\n };\n\n handleChangeMonth = (newMonth: MaterialUiPickersDate, slideDirection: SlideDirection) => {\n this.setState({ currentMonth: newMonth, slideDirection });\n\n if (this.props.onMonthChange) {\n const returnVal = this.props.onMonthChange(newMonth);\n if (returnVal) {\n this.pushToLoadingQueue();\n returnVal.then(() => {\n this.popFromLoadingQueue();\n });\n }\n }\n };\n\n validateMinMaxDate = (day: MaterialUiPickersDate) => {\n const { minDate, maxDate, utils, disableFuture, disablePast } = this.props;\n const now = utils.date();\n\n return Boolean(\n (disableFuture && utils.isAfterDay(day, now)) ||\n (disablePast && utils.isBeforeDay(day, now)) ||\n (minDate && utils.isBeforeDay(day, utils.date(minDate))) ||\n (maxDate && utils.isAfterDay(day, utils.date(maxDate)))\n );\n };\n\n shouldDisablePrevMonth = () => {\n const { utils, disablePast, minDate } = this.props;\n\n const now = utils.date();\n const firstEnabledMonth = utils.startOfMonth(\n disablePast && utils.isAfter(now, utils.date(minDate)) ? now : utils.date(minDate)\n );\n\n return !utils.isBefore(firstEnabledMonth, this.state.currentMonth);\n };\n\n shouldDisableNextMonth = () => {\n const { utils, disableFuture, maxDate } = this.props;\n\n const now = utils.date();\n const lastEnabledMonth = utils.startOfMonth(\n disableFuture && utils.isBefore(now, utils.date(maxDate)) ? now : utils.date(maxDate)\n );\n\n return !utils.isAfter(lastEnabledMonth, this.state.currentMonth);\n };\n\n shouldDisableDate = (day: MaterialUiPickersDate) => {\n const { shouldDisableDate } = this.props;\n\n return this.validateMinMaxDate(day) || Boolean(shouldDisableDate && shouldDisableDate(day));\n };\n\n handleDaySelect = (day: MaterialUiPickersDate, isFinish = true) => {\n const { date, utils } = this.props;\n\n this.props.onChange(utils.mergeDateAndTime(day, date), isFinish);\n };\n\n moveToDay = (day: MaterialUiPickersDate) => {\n const { utils } = this.props;\n\n if (day && !this.shouldDisableDate(day)) {\n if (utils.getMonth(day) !== utils.getMonth(this.state.currentMonth)) {\n this.handleChangeMonth(utils.startOfMonth(day), 'left');\n }\n\n this.handleDaySelect(day, false);\n }\n };\n\n handleKeyDown = (event: KeyboardEvent) => {\n const { theme, date, utils } = this.props;\n\n runKeyHandler(event, {\n ArrowUp: () => this.moveToDay(utils.addDays(date, -7)),\n ArrowDown: () => this.moveToDay(utils.addDays(date, 7)),\n ArrowLeft: () => this.moveToDay(utils.addDays(date, theme.direction === 'ltr' ? -1 : 1)),\n ArrowRight: () => this.moveToDay(utils.addDays(date, theme.direction === 'ltr' ? 1 : -1)),\n });\n };\n\n private renderWeeks = () => {\n const { utils, classes } = this.props;\n const weeks = utils.getWeekArray(this.state.currentMonth);\n\n return weeks.map(week => (\n

\n {this.renderDays(week)}\n
\n ));\n };\n\n private renderDays = (week: MaterialUiPickersDate[]) => {\n const { date, renderDay, utils } = this.props;\n\n const now = utils.date();\n const selectedDate = utils.startOfDay(date);\n const currentMonthNumber = utils.getMonth(this.state.currentMonth);\n\n return week.map(day => {\n const disabled = this.shouldDisableDate(day);\n const isDayInCurrentMonth = utils.getMonth(day) === currentMonthNumber;\n\n let dayComponent = (\n
\n );\n }\n}\n\nexport const styles = (theme: Theme) =>\n createStyles({\n pointer: {\n width: 2,\n backgroundColor: theme.palette.primary.main,\n position: 'absolute',\n left: 'calc(50% - 1px)',\n bottom: '50%',\n transformOrigin: 'center bottom 0px',\n },\n animateTransform: {\n transition: theme.transitions.create(['transform', 'height']),\n },\n thumb: {\n width: 4,\n height: 4,\n backgroundColor: theme.palette.primary.contrastText,\n borderRadius: '100%',\n position: 'absolute',\n top: -21,\n left: -15,\n border: `14px solid ${theme.palette.primary.main}`,\n boxSizing: 'content-box',\n },\n noPoint: {\n backgroundColor: theme.palette.primary.main,\n },\n });\n\nexport default withStyles(styles, {\n name: 'MuiPickersClockPointer',\n})(ClockPointer as React.ComponentType);\n","import { IUtils } from '@date-io/core/IUtils';\nimport { MaterialUiPickersDate } from '../typings/date';\n\nconst center = {\n x: 260 / 2,\n y: 260 / 2,\n};\n\nconst basePoint = {\n x: center.x,\n y: 0,\n};\n\nconst cx = basePoint.x - center.x;\nconst cy = basePoint.y - center.y;\n\nconst rad2deg = (rad: number) => rad * 57.29577951308232;\n\nconst getAngleValue = (step: number, offsetX: number, offsetY: number) => {\n const x = offsetX - center.x;\n const y = offsetY - center.y;\n\n const atan = Math.atan2(cx, cy) - Math.atan2(x, y);\n\n let deg = rad2deg(atan);\n deg = Math.round(deg / step) * step;\n deg %= 360;\n\n const value = Math.floor(deg / step) || 0;\n const delta = Math.pow(x, 2) + Math.pow(y, 2);\n const distance = Math.sqrt(delta);\n\n return { value, distance };\n};\n\nexport const getHours = (offsetX: number, offsetY: number, ampm: boolean) => {\n let { value, distance } = getAngleValue(30, offsetX, offsetY);\n value = value || 12;\n\n if (!ampm) {\n if (distance < 90) {\n value += 12;\n value %= 24;\n }\n } else {\n value %= 12;\n }\n\n return value;\n};\n\nexport const getMinutes = (offsetX: number, offsetY: number, step = 1) => {\n const angleStep = step * 6;\n let { value } = getAngleValue(angleStep, offsetX, offsetY);\n value = (value * step) % 60;\n\n return value;\n};\n\nexport const getMeridiem = (\n date: MaterialUiPickersDate,\n utils: IUtils\n): 'am' | 'pm' => {\n return utils.getHours(date) >= 12 ? 'pm' : 'am';\n};\n\nexport const convertToMeridiem = (\n time: MaterialUiPickersDate,\n meridiem: 'am' | 'pm',\n ampm: boolean,\n utils: IUtils\n) => {\n if (ampm) {\n const currentMeridiem = utils.getHours(time) >= 12 ? 'pm' : 'am';\n if (currentMeridiem !== meridiem) {\n const hours = meridiem === 'am' ? utils.getHours(time) - 12 : utils.getHours(time) + 12;\n\n return utils.setHours(time, hours);\n }\n }\n\n return time;\n};\n","import * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport ClockPointer from './ClockPointer';\nimport ClockType, { ClockViewType } from '../../constants/ClockType';\nimport { getHours, getMinutes } from '../../_helpers/time-utils';\nimport { withStyles, createStyles, WithStyles, Theme } from '@material-ui/core/styles';\n\nexport interface ClockProps extends WithStyles {\n type: ClockViewType;\n value: number;\n onChange: (value: number, isFinish?: boolean) => void;\n ampm?: boolean;\n minutesStep?: number;\n children: React.ReactElement[];\n}\n\nexport class Clock extends React.Component {\n public static propTypes: any = {\n type: PropTypes.oneOf(\n Object.keys(ClockType).map(key => ClockType[key as keyof typeof ClockType])\n ).isRequired,\n value: PropTypes.number.isRequired,\n onChange: PropTypes.func.isRequired,\n children: PropTypes.arrayOf(PropTypes.node).isRequired,\n ampm: PropTypes.bool,\n minutesStep: PropTypes.number,\n innerRef: PropTypes.any,\n };\n\n public static defaultProps = {\n ampm: false,\n minutesStep: 1,\n };\n\n public isMoving = false;\n\n public setTime(e: any, isFinish = false) {\n let { offsetX, offsetY } = e;\n\n if (typeof offsetX === 'undefined') {\n const rect = e.target.getBoundingClientRect();\n\n offsetX = e.changedTouches[0].clientX - rect.left;\n offsetY = e.changedTouches[0].clientY - rect.top;\n }\n\n const value =\n this.props.type === ClockType.SECONDS || this.props.type === ClockType.MINUTES\n ? getMinutes(offsetX, offsetY, this.props.minutesStep)\n : getHours(offsetX, offsetY, Boolean(this.props.ampm));\n\n this.props.onChange(value, isFinish);\n }\n\n public handleTouchMove = (e: React.TouchEvent) => {\n this.isMoving = true;\n this.setTime(e);\n };\n\n public handleTouchEnd = (e: React.TouchEvent) => {\n if (this.isMoving) {\n this.setTime(e, true);\n this.isMoving = false;\n }\n };\n\n public handleMove = (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n // MouseEvent.which is deprecated, but MouseEvent.buttons is not supported in Safari\n const isButtonPressed =\n typeof e.buttons === 'undefined' ? e.nativeEvent.which === 1 : e.buttons === 1;\n\n if (isButtonPressed) {\n this.setTime(e.nativeEvent, false);\n }\n };\n\n public handleMouseUp = (e: React.MouseEvent) => {\n if (this.isMoving) {\n this.isMoving = false;\n }\n\n this.setTime(e.nativeEvent, true);\n };\n\n public hasSelected = () => {\n const { type, value } = this.props;\n\n if (type === ClockType.HOURS) {\n return true;\n }\n\n return value % 5 === 0;\n };\n\n public render() {\n const { classes, value, children, type, ampm } = this.props;\n\n const isPointerInner = !ampm && type === ClockType.HOURS && (value < 1 || value > 12);\n\n return (\n
\n
\n \n\n
\n\n \n\n {children}\n
\n
\n );\n }\n}\n\nexport const styles = (theme: Theme) =>\n createStyles({\n container: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'flex-end',\n margin: `${theme.spacing(2)}px 0 ${theme.spacing(1)}px`,\n },\n clock: {\n backgroundColor: 'rgba(0,0,0,.07)',\n borderRadius: '50%',\n height: 260,\n width: 260,\n position: 'relative',\n pointerEvents: 'none',\n },\n squareMask: {\n width: '100%',\n height: '100%',\n position: 'absolute',\n pointerEvents: 'auto',\n outline: 'none',\n touchActions: 'none',\n userSelect: 'none',\n '&:active': {\n cursor: 'move',\n },\n },\n pin: {\n width: 6,\n height: 6,\n borderRadius: '50%',\n backgroundColor: theme.palette.primary.main,\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n },\n });\n\nexport default withStyles(styles, {\n name: 'MuiPickersClock',\n})(Clock as React.ComponentType);\n","import * as React from 'react';\nimport clsx from 'clsx';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\n\nconst positions: Record = {\n 0: [0, 40],\n 1: [55, 19.6],\n 2: [94.4, 59.5],\n 3: [109, 114],\n 4: [94.4, 168.5],\n 5: [54.5, 208.4],\n 6: [0, 223],\n 7: [-54.5, 208.4],\n 8: [-94.4, 168.5],\n 9: [-109, 114],\n 10: [-94.4, 59.5],\n 11: [-54.5, 19.6],\n 12: [0, 5],\n 13: [36.9, 49.9],\n 14: [64, 77],\n 15: [74, 114],\n 16: [64, 151],\n 17: [37, 178],\n 18: [0, 188],\n 19: [-37, 178],\n 20: [-64, 151],\n 21: [-74, 114],\n 22: [-64, 77],\n 23: [-37, 50],\n};\n\nexport interface ClockNumberProps {\n index: number;\n label: string;\n selected: boolean;\n isInner?: boolean;\n}\n\nexport const useStyles = makeStyles(\n theme => {\n const size = theme.spacing(4);\n\n return {\n clockNumber: {\n width: size,\n height: 32,\n userSelect: 'none',\n position: 'absolute',\n left: `calc((100% - ${typeof size === 'number' ? `${size}px` : size}) / 2)`,\n display: 'inline-flex',\n justifyContent: 'center',\n alignItems: 'center',\n borderRadius: '50%',\n color:\n theme.palette.type === 'light' ? theme.palette.text.primary : theme.palette.text.hint,\n },\n clockNumberSelected: {\n color: theme.palette.primary.contrastText,\n },\n };\n },\n { name: 'MuiPickersClockNumber' }\n);\n\nexport const ClockNumber: React.FC = ({ selected, label, index, isInner }) => {\n const classes = useStyles();\n const className = clsx(classes.clockNumber, {\n [classes.clockNumberSelected]: selected,\n });\n\n const transformStyle = React.useMemo(() => {\n const position = positions[index];\n\n return {\n transform: `translate(${position[0]}px, ${position[1]}px`,\n };\n }, [index]);\n\n return (\n \n );\n};\n\nexport default ClockNumber;\n","import * as React from 'react';\nimport ClockNumber from './ClockNumber';\nimport { IUtils } from '@date-io/core/IUtils';\nimport { MaterialUiPickersDate } from '../../typings/date';\n\nexport const getHourNumbers = ({\n ampm,\n utils,\n date,\n}: {\n ampm: boolean;\n utils: IUtils;\n date: MaterialUiPickersDate;\n}) => {\n const currentHours = utils.getHours(date);\n\n const hourNumbers: JSX.Element[] = [];\n const startHour = ampm ? 1 : 0;\n const endHour = ampm ? 12 : 23;\n\n const isSelected = (hour: number) => {\n if (ampm) {\n if (hour === 12) {\n return currentHours === 12 || currentHours === 0;\n }\n\n return currentHours === hour || currentHours - 12 === hour;\n }\n\n return currentHours === hour;\n };\n\n for (let hour = startHour; hour <= endHour; hour += 1) {\n let label = hour.toString();\n\n if (hour === 0) {\n label = '00';\n }\n\n const props = {\n index: hour,\n label: utils.formatNumber(label),\n selected: isSelected(hour),\n isInner: !ampm && (hour === 0 || hour > 12),\n };\n\n hourNumbers.push();\n }\n\n return hourNumbers;\n};\n\nexport const getMinutesNumbers = ({\n value,\n utils,\n}: {\n value: number;\n utils: IUtils;\n}) => {\n const f = utils.formatNumber;\n\n return [\n ,\n ,\n ,\n ,\n ,\n ,\n ,\n ,\n ,\n ,\n ,\n ,\n ];\n};\n","import * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport Clock from './Clock';\nimport ClockType from '../../constants/ClockType';\nimport { useUtils } from '../../_shared/hooks/useUtils';\nimport { MaterialUiPickersDate } from '../../typings/date';\nimport { getHourNumbers, getMinutesNumbers } from './ClockNumbers';\nimport { convertToMeridiem, getMeridiem } from '../../_helpers/time-utils';\n\nexport interface TimePickerViewProps {\n /** TimePicker value */\n date: MaterialUiPickersDate;\n /** Clock type */\n type: 'hours' | 'minutes' | 'seconds';\n /** 12h/24h clock mode */\n ampm?: boolean;\n /** Minutes step */\n minutesStep?: number;\n /** On hour change */\n onHourChange: (date: MaterialUiPickersDate, isFinish?: boolean) => void;\n /** On minutes change */\n onMinutesChange: (date: MaterialUiPickersDate, isFinish?: boolean) => void;\n /** On seconds change */\n onSecondsChange: (date: MaterialUiPickersDate, isFinish?: boolean) => void;\n}\n\nexport const ClockView: React.FC = ({\n type,\n onHourChange,\n onMinutesChange,\n onSecondsChange,\n ampm,\n date,\n minutesStep,\n}) => {\n const utils = useUtils();\n const viewProps = React.useMemo(() => {\n switch (type) {\n case ClockType.HOURS:\n return {\n value: utils.getHours(date),\n children: getHourNumbers({ date, utils, ampm: Boolean(ampm) }),\n onChange: (value: number, isFinish?: boolean) => {\n const currentMeridiem = getMeridiem(date, utils);\n const updatedTimeWithMeridiem = convertToMeridiem(\n utils.setHours(date, value),\n currentMeridiem,\n Boolean(ampm),\n utils\n );\n\n onHourChange(updatedTimeWithMeridiem, isFinish);\n },\n };\n\n case ClockType.MINUTES:\n const minutesValue = utils.getMinutes(date);\n return {\n value: minutesValue,\n children: getMinutesNumbers({ value: minutesValue, utils }),\n onChange: (value: number, isFinish?: boolean) => {\n const updatedTime = utils.setMinutes(date, value);\n\n onMinutesChange(updatedTime, isFinish);\n },\n };\n\n case ClockType.SECONDS:\n const secondsValue = utils.getSeconds(date);\n return {\n value: secondsValue,\n children: getMinutesNumbers({ value: secondsValue, utils }),\n onChange: (value: number, isFinish?: boolean) => {\n const updatedTime = utils.setSeconds(date, value);\n\n onSecondsChange(updatedTime, isFinish);\n },\n };\n\n default:\n throw new Error('You must provide the type for TimePickerView');\n }\n }, [ampm, date, onHourChange, onMinutesChange, onSecondsChange, type, utils]);\n\n return ;\n};\n\nClockView.displayName = 'TimePickerView';\n\nClockView.propTypes = {\n date: PropTypes.object.isRequired,\n onHourChange: PropTypes.func.isRequired,\n onMinutesChange: PropTypes.func.isRequired,\n onSecondsChange: PropTypes.func.isRequired,\n ampm: PropTypes.bool,\n minutesStep: PropTypes.number,\n type: PropTypes.oneOf(Object.keys(ClockType).map(key => ClockType[key as keyof typeof ClockType]))\n .isRequired,\n} as any;\n\nClockView.defaultProps = {\n ampm: true,\n minutesStep: 1,\n};\n\nexport default React.memo(ClockView);\n","import * as React from 'react';\nimport clsx from 'clsx';\nimport ToolbarButton from '../_shared/ToolbarButton';\nimport PickerToolbar from '../_shared/PickerToolbar';\nimport { useUtils } from '../_shared/hooks/useUtils';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { ToolbarComponentProps } from '../Picker/Picker';\nimport { isYearAndMonthViews, isYearOnlyView } from '../_helpers/date-utils';\n\nexport const useStyles = makeStyles(\n {\n toolbar: {\n flexDirection: 'column',\n alignItems: 'flex-start',\n },\n toolbarLandscape: {\n padding: 16,\n },\n dateLandscape: {\n marginRight: 16,\n },\n },\n { name: 'MuiPickersDatePickerRoot' }\n);\n\nexport const DatePickerToolbar: React.FC = ({\n date,\n views,\n setOpenView,\n isLandscape,\n openView,\n}) => {\n const utils = useUtils();\n const classes = useStyles();\n\n const isYearOnly = React.useMemo(() => isYearOnlyView(views as any), [views]);\n const isYearAndMonth = React.useMemo(() => isYearAndMonthViews(views as any), [views]);\n\n return (\n \n setOpenView('year')}\n selected={openView === 'year'}\n label={utils.getYearText(date)}\n />\n\n {!isYearOnly && !isYearAndMonth && (\n setOpenView('date')}\n align={isLandscape ? 'left' : 'center'}\n label={utils.getDatePickerHeaderText(date)}\n className={clsx({ [classes.dateLandscape]: isLandscape })}\n />\n )}\n\n {isYearAndMonth && (\n setOpenView('month')}\n selected={openView === 'month'}\n label={utils.getMonthText(date)}\n />\n )}\n \n );\n};\n","import { useUtils } from '../_shared/hooks/useUtils';\nimport { MaterialUiPickersDate } from '../typings/date';\nimport { DatePickerToolbar } from './DatePickerToolbar';\nimport { PureDateInput } from '../_shared/PureDateInput';\nimport { getFormatByViews } from '../_helpers/date-utils';\nimport { KeyboardDateInput } from '../_shared/KeyboardDateInput';\nimport { OutterCalendarProps } from '../views/Calendar/Calendar';\nimport { usePickerState } from '../_shared/hooks/usePickerState';\nimport { datePickerDefaultProps, ParsableDate } from '../constants/prop-types';\nimport { useKeyboardPickerState } from '../_shared/hooks/useKeyboardPickerState';\nimport {\n WithKeyboardInputProps,\n WithPureInputProps,\n makePickerWithState,\n} from '../Picker/makePickerWithState';\n\nexport type DatePickerView = 'year' | 'date' | 'month';\n\nexport interface BaseDatePickerProps extends OutterCalendarProps {\n /**\n * Min selectable date\n * @default Date(1900-01-01)\n */\n minDate?: ParsableDate;\n /**\n * Max selectable date\n * @default Date(2100-01-01)\n */\n maxDate?: ParsableDate;\n\n /**\n * Compare dates by the exact timestamp, instead of start/end of date\n * @default false\n */\n strictCompareDates?: boolean;\n\n /**\n * Disable past dates\n * @default false\n */\n disablePast?: boolean;\n /**\n * Disable future dates\n * @default false\n */\n disableFuture?: boolean;\n /**\n * To animate scrolling to current year (using scrollIntoView)\n * @default false\n */\n animateYearScrolling?: boolean;\n /** Callback firing on year change @DateIOType */\n onYearChange?: (date: MaterialUiPickersDate) => void;\n}\n\nexport interface DatePickerViewsProps extends BaseDatePickerProps {\n /**\n * Array of views to show\n * @type {Array<\"year\" | \"date\" | \"month\">}\n */\n views?: DatePickerView[];\n /** First view to show in DatePicker */\n openTo?: DatePickerView;\n}\n\nexport type DatePickerProps = WithPureInputProps & DatePickerViewsProps;\n\nexport type KeyboardDatePickerProps = WithKeyboardInputProps & DatePickerViewsProps;\n\nconst defaultProps = {\n ...datePickerDefaultProps,\n openTo: 'date' as DatePickerView,\n views: ['year', 'date'] as DatePickerView[],\n};\n\nfunction useOptions(props: DatePickerViewsProps) {\n const utils = useUtils();\n\n return {\n getDefaultFormat: () => getFormatByViews(props.views!, utils),\n };\n}\n\nexport const DatePicker = makePickerWithState({\n useOptions,\n Input: PureDateInput,\n useState: usePickerState,\n DefaultToolbarComponent: DatePickerToolbar,\n});\n\nexport const KeyboardDatePicker = makePickerWithState({\n useOptions,\n Input: KeyboardDateInput,\n useState: useKeyboardPickerState,\n DefaultToolbarComponent: DatePickerToolbar,\n});\n\nDatePicker.defaultProps = defaultProps;\n\nKeyboardDatePicker.defaultProps = defaultProps;\n","import * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport IconButton from '@material-ui/core/IconButton';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\n\nexport const useStyles = makeStyles(\n theme => ({\n day: {\n width: 36,\n height: 36,\n fontSize: theme.typography.caption.fontSize,\n margin: '0 2px',\n color: theme.palette.text.primary,\n fontWeight: theme.typography.fontWeightMedium,\n padding: 0,\n },\n hidden: {\n opacity: 0,\n pointerEvents: 'none',\n },\n current: {\n color: theme.palette.primary.main,\n fontWeight: 600,\n },\n daySelected: {\n color: theme.palette.primary.contrastText,\n backgroundColor: theme.palette.primary.main,\n fontWeight: theme.typography.fontWeightMedium,\n '&:hover': {\n backgroundColor: theme.palette.primary.main,\n },\n },\n dayDisabled: {\n pointerEvents: 'none',\n color: theme.palette.text.hint,\n },\n }),\n { name: 'MuiPickersDay' }\n);\n\nexport interface DayProps {\n /** Day text */\n children: React.ReactNode;\n /** Is today */\n current?: boolean;\n /** Disabled? */\n disabled?: boolean;\n /** Hidden? */\n hidden?: boolean;\n /** Selected? */\n selected?: boolean;\n}\n\nexport const Day: React.FC = ({\n children,\n disabled,\n hidden,\n current,\n selected,\n ...other\n}) => {\n const classes = useStyles();\n\n const className = clsx(classes.day, {\n [classes.hidden]: hidden,\n [classes.current]: current,\n [classes.daySelected]: selected,\n [classes.dayDisabled]: disabled,\n });\n\n return (\n \n \n {children}\n \n \n );\n};\n\nDay.displayName = 'Day';\n\nDay.propTypes = {\n current: PropTypes.bool,\n disabled: PropTypes.bool,\n hidden: PropTypes.bool,\n selected: PropTypes.bool,\n};\n\nDay.defaultProps = {\n disabled: false,\n hidden: false,\n current: false,\n selected: false,\n};\n\nexport default Day;\n","import * as PropTypes from 'prop-types';\nimport { BaseTimePickerProps } from '../TimePicker/TimePicker';\nimport { BaseDatePickerProps } from '../DatePicker/DatePicker';\n\nconst date = PropTypes.oneOfType([\n PropTypes.object,\n PropTypes.string,\n PropTypes.number,\n PropTypes.instanceOf(Date),\n]);\n\nconst datePickerView = PropTypes.oneOf(['year', 'month', 'day']);\n\nexport type ParsableDate = object | string | number | Date | null | undefined;\n\nexport const DomainPropTypes = { date, datePickerView };\n\n/* eslint-disable @typescript-eslint/no-object-literal-type-assertion */\nexport const timePickerDefaultProps = {\n ampm: true,\n invalidDateMessage: 'Invalid Time Format',\n} as BaseTimePickerProps;\n\nexport const datePickerDefaultProps = {\n minDate: new Date('1900-01-01'),\n maxDate: new Date('2100-01-01'),\n invalidDateMessage: 'Invalid Date Format',\n minDateMessage: 'Date should not be before minimal date',\n maxDateMessage: 'Date should not be after maximal date',\n allowKeyboardControl: true,\n} as BaseDatePickerProps;\n\nexport const dateTimePickerDefaultProps = {\n ...timePickerDefaultProps,\n ...datePickerDefaultProps,\n showTabs: true,\n} as BaseTimePickerProps & BaseDatePickerProps;\n","import * as React from 'react';\nimport clsx from 'clsx';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\n\nexport interface YearProps {\n children: React.ReactNode;\n disabled?: boolean;\n onSelect: (value: any) => void;\n selected?: boolean;\n value: any;\n forwardedRef?: React.Ref;\n}\n\nexport const useStyles = makeStyles(\n theme => ({\n root: {\n height: 40,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n cursor: 'pointer',\n outline: 'none',\n '&:focus': {\n color: theme.palette.primary.main,\n fontWeight: theme.typography.fontWeightMedium,\n },\n },\n yearSelected: {\n margin: '10px 0',\n fontWeight: theme.typography.fontWeightMedium,\n },\n yearDisabled: {\n pointerEvents: 'none',\n color: theme.palette.text.hint,\n },\n }),\n { name: 'MuiPickersYear' }\n);\n\nexport const Year: React.FC = ({\n onSelect,\n forwardedRef,\n value,\n selected,\n disabled,\n children,\n ...other\n}) => {\n const classes = useStyles();\n const handleClick = React.useCallback(() => onSelect(value), [onSelect, value]);\n\n return (\n \n );\n};\n\nYear.displayName = 'Year';\n\nexport default React.forwardRef((props, ref) => (\n \n));\n","import * as React from 'react';\nimport Year from './Year';\nimport { DateType } from '@date-io/type';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { useUtils } from '../../_shared/hooks/useUtils';\nimport { VariantContext } from '../../wrappers/Wrapper';\nimport { MaterialUiPickersDate } from '../../typings/date';\n\nexport interface YearSelectionProps {\n date: MaterialUiPickersDate;\n minDate: DateType;\n maxDate: DateType;\n onChange: (date: MaterialUiPickersDate, isFinish: boolean) => void;\n disablePast?: boolean | null | undefined;\n disableFuture?: boolean | null | undefined;\n animateYearScrolling?: boolean | null | undefined;\n onYearChange?: (date: MaterialUiPickersDate) => void;\n}\n\nexport const useStyles = makeStyles(\n {\n container: {\n height: 300,\n overflowY: 'auto',\n },\n },\n { name: 'MuiPickersYearSelection' }\n);\n\nexport const YearSelection: React.FC = ({\n date,\n onChange,\n onYearChange,\n minDate,\n maxDate,\n disablePast,\n disableFuture,\n animateYearScrolling,\n}) => {\n const utils = useUtils();\n const classes = useStyles();\n const currentVariant = React.useContext(VariantContext);\n const selectedYearRef = React.useRef(null);\n\n React.useEffect(() => {\n if (selectedYearRef.current && selectedYearRef.current.scrollIntoView) {\n try {\n selectedYearRef.current.scrollIntoView({\n block: currentVariant === 'static' ? 'nearest' : 'center',\n behavior: animateYearScrolling ? 'smooth' : 'auto',\n });\n } catch (e) {\n // call without arguments in case when scrollIntoView works improperly (e.g. Firefox 52-57)\n selectedYearRef.current.scrollIntoView();\n }\n }\n }, []); // eslint-disable-line\n\n const currentYear = utils.getYear(date);\n const onYearSelect = React.useCallback(\n (year: number) => {\n const newDate = utils.setYear(date, year);\n if (onYearChange) {\n onYearChange(newDate);\n }\n\n onChange(newDate, true);\n },\n [date, onChange, onYearChange, utils]\n );\n\n return (\n
\n {utils.getYearRange(minDate, maxDate).map(year => {\n const yearNumber = utils.getYear(year);\n const selected = yearNumber === currentYear;\n\n return (\n \n {utils.getYearText(year)}\n \n );\n })}\n
\n );\n};\n","import * as React from 'react';\nimport clsx from 'clsx';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\n\nexport interface MonthProps {\n children: React.ReactNode;\n disabled?: boolean;\n onSelect: (value: any) => void;\n selected?: boolean;\n value: any;\n}\n\nexport const useStyles = makeStyles(\n theme => ({\n root: {\n flex: '1 0 33.33%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n cursor: 'pointer',\n outline: 'none',\n height: 75,\n transition: theme.transitions.create('font-size', { duration: '100ms' }),\n '&:focus': {\n color: theme.palette.primary.main,\n fontWeight: theme.typography.fontWeightMedium,\n },\n },\n monthSelected: {\n color: theme.palette.primary.main,\n fontWeight: theme.typography.fontWeightMedium,\n },\n monthDisabled: {\n pointerEvents: 'none',\n color: theme.palette.text.hint,\n },\n }),\n { name: 'MuiPickersMonth' }\n);\n\nexport const Month: React.FC = ({\n selected,\n onSelect,\n disabled,\n value,\n children,\n ...other\n}) => {\n const classes = useStyles();\n const handleSelection = React.useCallback(() => {\n onSelect(value);\n }, [onSelect, value]);\n\n return (\n \n );\n};\n\nMonth.displayName = 'Month';\n\nexport default Month;\n","import * as React from 'react';\nimport Month from './Month';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { useUtils } from '../../_shared/hooks/useUtils';\nimport { ParsableDate } from '../../constants/prop-types';\nimport { MaterialUiPickersDate } from '../../typings/date';\n\nexport interface MonthSelectionProps {\n date: MaterialUiPickersDate;\n minDate?: ParsableDate;\n maxDate?: ParsableDate;\n onChange: (date: MaterialUiPickersDate, isFinish: boolean) => void;\n disablePast?: boolean | null | undefined;\n disableFuture?: boolean | null | undefined;\n onMonthChange?: (date: MaterialUiPickersDate) => void | Promise;\n}\n\nexport const useStyles = makeStyles(\n {\n container: {\n width: 310,\n display: 'flex',\n flexWrap: 'wrap',\n alignContent: 'stretch',\n },\n },\n { name: 'MuiPickersMonthSelection' }\n);\n\nexport const MonthSelection: React.FC = ({\n disablePast,\n disableFuture,\n minDate,\n maxDate,\n date,\n onMonthChange,\n onChange,\n}) => {\n const utils = useUtils();\n const classes = useStyles();\n const currentMonth = utils.getMonth(date);\n\n const shouldDisableMonth = (month: MaterialUiPickersDate) => {\n const now = utils.date();\n const utilMinDate = utils.date(minDate);\n const utilMaxDate = utils.date(maxDate);\n\n const firstEnabledMonth = utils.startOfMonth(\n disablePast && utils.isAfter(now, utilMinDate) ? now : utilMinDate\n );\n\n const lastEnabledMonth = utils.startOfMonth(\n disableFuture && utils.isBefore(now, utilMaxDate) ? now : utilMaxDate\n );\n\n const isBeforeFirstEnabled = utils.isBefore(month, firstEnabledMonth);\n const isAfterLastEnabled = utils.isAfter(month, lastEnabledMonth);\n\n return isBeforeFirstEnabled || isAfterLastEnabled;\n };\n\n const onMonthSelect = React.useCallback(\n (month: number) => {\n const newDate = utils.setMonth(date, month);\n\n onChange(newDate, true);\n if (onMonthChange) {\n onMonthChange(newDate);\n }\n },\n [date, onChange, onMonthChange, utils]\n );\n\n return (\n
\n {utils.getMonthArray(date).map(month => {\n const monthNumber = utils.getMonth(month);\n const monthText = utils.format(month, 'MMM');\n\n return (\n \n {monthText}\n \n );\n })}\n
\n );\n};\n","import * as React from 'react';\nimport { useIsomorphicEffect } from './useKeyDown';\nimport { BasePickerProps } from '../../typings/BasePicker';\n\nconst getOrientation = () => {\n if (typeof window === 'undefined') {\n return 'portrait';\n }\n\n if (window.screen && window.screen.orientation && window.screen.orientation.angle) {\n return Math.abs(window.screen.orientation.angle) === 90 ? 'landscape' : 'portrait';\n }\n\n // Support IOS safari\n if (window.orientation) {\n return Math.abs(Number(window.orientation)) === 90 ? 'landscape' : 'portrait';\n }\n\n return 'portrait';\n};\n\nexport function useIsLandscape(customOrientation?: BasePickerProps['orientation']) {\n const [orientation, setOrientation] = React.useState(\n getOrientation()\n );\n\n const eventHandler = React.useCallback(() => setOrientation(getOrientation()), []);\n\n useIsomorphicEffect(() => {\n window.addEventListener('orientationchange', eventHandler);\n return () => window.removeEventListener('orientationchange', eventHandler);\n }, [eventHandler]);\n\n const orientationToUse = customOrientation || orientation;\n return orientationToUse === 'landscape';\n}\n","import * as React from 'react';\nimport clsx from 'clsx';\nimport Calendar from '../views/Calendar/Calendar';\nimport { useUtils } from '../_shared/hooks/useUtils';\nimport { useViews } from '../_shared/hooks/useViews';\nimport { ClockView } from '../views/Clock/ClockView';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { YearSelection } from '../views/Year/YearView';\nimport { BasePickerProps } from '../typings/BasePicker';\nimport { MaterialUiPickersDate } from '../typings/date';\nimport { MonthSelection } from '../views/Month/MonthView';\nimport { BaseTimePickerProps } from '../TimePicker/TimePicker';\nimport { BaseDatePickerProps } from '../DatePicker/DatePicker';\nimport { useIsLandscape } from '../_shared/hooks/useIsLandscape';\nimport { datePickerDefaultProps } from '../constants/prop-types';\nimport { DIALOG_WIDTH_WIDER, DIALOG_WIDTH, VIEW_HEIGHT } from '../constants/dimensions';\n\nconst viewsMap = {\n year: YearSelection,\n month: MonthSelection,\n date: Calendar,\n hours: ClockView,\n minutes: ClockView,\n seconds: ClockView,\n};\n\nexport type PickerView = keyof typeof viewsMap;\n\nexport type ToolbarComponentProps = BaseDatePickerProps &\n BaseTimePickerProps & {\n views: PickerView[];\n openView: PickerView;\n date: MaterialUiPickersDate;\n setOpenView: (view: PickerView) => void;\n onChange: (date: MaterialUiPickersDate, isFinish?: boolean) => void;\n // TODO move out, cause it is DateTimePickerOnly\n hideTabs?: boolean;\n dateRangeIcon?: React.ReactNode;\n timeIcon?: React.ReactNode;\n isLandscape: boolean;\n };\n\nexport interface PickerViewProps extends BaseDatePickerProps, BaseTimePickerProps {\n views: PickerView[];\n openTo: PickerView;\n disableToolbar?: boolean;\n ToolbarComponent: React.ComponentType;\n // TODO move out, cause it is DateTimePickerOnly\n hideTabs?: boolean;\n dateRangeIcon?: React.ReactNode;\n timeIcon?: React.ReactNode;\n}\n\ninterface PickerProps extends PickerViewProps {\n date: MaterialUiPickersDate;\n orientation?: BasePickerProps['orientation'];\n onChange: (date: MaterialUiPickersDate, isFinish?: boolean) => void;\n}\n\nconst useStyles = makeStyles(\n {\n container: {\n display: 'flex',\n flexDirection: 'column',\n },\n containerLandscape: {\n flexDirection: 'row',\n },\n pickerView: {\n overflowX: 'hidden',\n minHeight: VIEW_HEIGHT,\n minWidth: DIALOG_WIDTH,\n maxWidth: DIALOG_WIDTH_WIDER,\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n },\n pickerViewLandscape: {\n padding: '0 8px',\n },\n },\n { name: 'MuiPickersBasePicker' }\n);\n\nexport const Picker: React.FunctionComponent = ({\n date,\n views,\n disableToolbar,\n onChange,\n openTo,\n minDate: unparsedMinDate,\n maxDate: unparsedMaxDate,\n ToolbarComponent,\n orientation,\n ...rest\n}) => {\n const utils = useUtils();\n const classes = useStyles();\n const isLandscape = useIsLandscape(orientation);\n const { openView, setOpenView, handleChangeAndOpenNext } = useViews(views, openTo, onChange);\n\n const minDate = React.useMemo(() => utils.date(unparsedMinDate)!, [unparsedMinDate, utils]);\n const maxDate = React.useMemo(() => utils.date(unparsedMaxDate)!, [unparsedMaxDate, utils]);\n\n return (\n \n {!disableToolbar && (\n \n )}\n\n
\n {openView === 'year' && (\n \n )}\n\n {openView === 'month' && (\n \n )}\n\n {openView === 'date' && (\n \n )}\n\n {(openView === 'hours' || openView === 'minutes' || openView === 'seconds') && (\n \n )}\n
\n
\n );\n};\n\nPicker.defaultProps = {\n ...datePickerDefaultProps,\n views: Object.keys(viewsMap),\n} as any;\n","import * as React from 'react';\nimport { PickerView } from '../../Picker/Picker';\nimport { arrayIncludes } from '../../_helpers/utils';\nimport { MaterialUiPickersDate } from '../../typings/date';\n\nexport function useViews(\n views: PickerView[],\n openTo: PickerView,\n onChange: (date: MaterialUiPickersDate, isFinish?: boolean) => void\n) {\n const [openView, setOpenView] = React.useState(\n openTo && arrayIncludes(views, openTo) ? openTo : views[0]\n );\n\n const handleChangeAndOpenNext = React.useCallback(\n (date: MaterialUiPickersDate, isFinish?: boolean) => {\n const nextViewToOpen = views[views.indexOf(openView!) + 1];\n if (isFinish && nextViewToOpen) {\n // do not close picker if needs to show next view\n onChange(date, false);\n setOpenView(nextViewToOpen);\n return;\n }\n\n onChange(date, Boolean(isFinish));\n },\n [onChange, openView, views]\n );\n\n return { handleChangeAndOpenNext, openView, setOpenView };\n}\n","/** Use it instead of .includes method for IE support */\nexport function arrayIncludes(array: T[], itemOrItems: T | T[]) {\n if (Array.isArray(itemOrItems)) {\n return itemOrItems.every(item => array.indexOf(item) !== -1);\n }\n\n return array.indexOf(itemOrItems) !== -1;\n}\n\nexport type Omit = Pick>;\n","export const DIALOG_WIDTH = 310;\n\nexport const DIALOG_WIDTH_WIDER = 325;\n\nexport const VIEW_HEIGHT = 305;\n","import * as React from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { DIALOG_WIDTH } from '../constants/dimensions';\n\nconst useStyles = makeStyles(\n theme => ({\n staticWrapperRoot: {\n overflow: 'hidden',\n minWidth: DIALOG_WIDTH,\n display: 'flex',\n flexDirection: 'column',\n backgroundColor: theme.palette.background.paper,\n },\n }),\n { name: 'MuiPickersStaticWrapper' }\n);\n\nexport const StaticWrapper: React.FC = ({ children }) => {\n const classes = useStyles();\n\n return
;\n};\n","import * as React from 'react';\nimport clsx from 'clsx';\nimport Button from '@material-ui/core/Button';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport Dialog, { DialogProps } from '@material-ui/core/Dialog';\nimport { DIALOG_WIDTH, DIALOG_WIDTH_WIDER } from '../constants/dimensions';\nimport { createStyles, WithStyles, withStyles } from '@material-ui/core/styles';\n\nexport interface ModalDialogProps extends DialogProps {\n onAccept: () => void;\n onDismiss: () => void;\n onClear: () => void;\n onSetToday: () => void;\n okLabel?: React.ReactNode;\n cancelLabel?: React.ReactNode;\n clearLabel?: React.ReactNode;\n todayLabel?: React.ReactNode;\n clearable?: boolean;\n showTodayButton?: boolean;\n showTabs?: boolean;\n wider?: boolean;\n}\n\nexport const ModalDialog: React.SFC> = ({\n children,\n classes,\n onAccept,\n onDismiss,\n onClear,\n onSetToday,\n okLabel,\n cancelLabel,\n clearLabel,\n todayLabel,\n clearable,\n showTodayButton,\n showTabs,\n wider,\n ...other\n}) => (\n \n \n\n \n {clearable && (\n \n )}\n\n {showTodayButton && (\n \n )}\n\n {cancelLabel && (\n \n )}\n\n {okLabel && (\n \n )}\n \n \n);\n\nModalDialog.displayName = 'ModalDialog';\n\nexport const styles = createStyles({\n dialogRoot: {\n minWidth: DIALOG_WIDTH,\n },\n dialogRootWider: {\n minWidth: DIALOG_WIDTH_WIDER,\n },\n dialog: {\n '&:first-child': {\n padding: 0,\n },\n },\n withAdditionalAction: {\n // set justifyContent to default value to fix IE11 layout bug\n // see https://github.com/dmtrKovalenko/material-ui-pickers/pull/267\n justifyContent: 'flex-start',\n\n '& > *:first-child': {\n marginRight: 'auto',\n },\n },\n});\n\nexport default withStyles(styles, { name: 'MuiPickersModal' })(ModalDialog);\n","import * as React from 'react';\n\nexport const useIsomorphicEffect =\n typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;\n\ntype KeyHandlers = Record void>;\n\nexport function runKeyHandler(e: KeyboardEvent, keyHandlers: KeyHandlers) {\n const handler = keyHandlers[e.key];\n if (handler) {\n handler();\n // if event was handled prevent other side effects (e.g. page scroll)\n e.preventDefault();\n }\n}\n\nexport function useKeyDown(active: boolean, keyHandlers: KeyHandlers) {\n const keyHandlersRef = React.useRef(keyHandlers);\n keyHandlersRef.current = keyHandlers;\n\n useIsomorphicEffect(() => {\n if (active) {\n const handleKeyDown = (event: KeyboardEvent) => {\n runKeyHandler(event, keyHandlersRef.current);\n };\n window.addEventListener('keydown', handleKeyDown);\n return () => {\n window.removeEventListener('keydown', handleKeyDown);\n };\n }\n }, [active]);\n}\n","import * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport ModalDialog from '../_shared/ModalDialog';\nimport { WrapperProps } from './Wrapper';\nimport { Omit } from '../_helpers/utils';\nimport { useKeyDown } from '../_shared/hooks/useKeyDown';\nimport { DialogProps as MuiDialogProps } from '@material-ui/core/Dialog';\n\nexport interface ModalWrapperProps extends WrapperProps {\n /**\n * \"OK\" label message\n * @default \"OK\"\n */\n okLabel?: React.ReactNode;\n /**\n * \"CANCEL\" label message\n * @default \"CANCEL\"\n */\n cancelLabel?: React.ReactNode;\n /**\n * \"CLEAR\" label message\n * @default \"CLEAR\"\n */\n clearLabel?: React.ReactNode;\n /**\n * \"TODAY\" label message\n * @default \"TODAY\"\n */\n todayLabel?: React.ReactNode;\n /**\n * If true today button will be displayed Note* that clear button has higher priority\n * @default false\n */\n showTodayButton?: boolean;\n /**\n * Show clear action in picker dialog\n * @default false\n */\n clearable?: boolean;\n /**\n * Props to be passed directly to material-ui Dialog\n * @type {Partial}\n */\n DialogProps?: Partial>;\n}\n\nexport const ModalWrapper: React.FC> = ({\n open,\n children,\n okLabel,\n cancelLabel,\n clearLabel,\n todayLabel,\n showTodayButton,\n clearable,\n DialogProps,\n showTabs,\n wider,\n InputComponent,\n DateInputProps,\n onClear,\n onAccept,\n onDismiss,\n onSetToday,\n ...other\n}) => {\n useKeyDown(open, {\n Enter: onAccept,\n });\n\n return (\n \n \n\n \n \n );\n};\n\nModalWrapper.propTypes = {\n okLabel: PropTypes.node,\n cancelLabel: PropTypes.node,\n clearLabel: PropTypes.node,\n clearable: PropTypes.bool,\n todayLabel: PropTypes.node,\n showTodayButton: PropTypes.bool,\n DialogProps: PropTypes.object,\n} as any;\n\nModalWrapper.defaultProps = {\n okLabel: 'OK',\n cancelLabel: 'Cancel',\n clearLabel: 'Clear',\n todayLabel: 'Today',\n clearable: false,\n showTodayButton: false,\n};\n","import * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport Popover, { PopoverProps as PopoverPropsType } from '@material-ui/core/Popover';\nimport { WrapperProps } from './Wrapper';\nimport { useKeyDown } from '../_shared/hooks/useKeyDown';\nimport { TextFieldProps } from '@material-ui/core/TextField';\n\nexport interface InlineWrapperProps extends WrapperProps {\n /** Popover props passed to material-ui Popover (with variant=\"inline\") */\n PopoverProps?: Partial;\n}\n\nexport const InlineWrapper: React.FC = ({\n open,\n wider,\n children,\n PopoverProps,\n onClear,\n onDismiss,\n onSetToday,\n onAccept,\n showTabs,\n DateInputProps,\n InputComponent,\n ...other\n}) => {\n const ref = React.useRef();\n\n useKeyDown(open, {\n Enter: onAccept,\n });\n\n return (\n \n \n\n \n \n );\n};\n\nInlineWrapper.propTypes = {\n onOpen: PropTypes.func,\n onClose: PropTypes.func,\n PopoverProps: PropTypes.object,\n} as any;\n","import * as React from 'react';\nimport { Omit } from '../_helpers/utils';\nimport { StaticWrapper } from './StaticWrapper';\nimport { ModalWrapper, ModalWrapperProps } from './ModalWrapper';\nimport { InlineWrapper, InlineWrapperProps } from './InlineWrapper';\nimport { KeyboardDateInputProps } from '../_shared/KeyboardDateInput';\nimport { PureDateInputProps, NotOverridableProps } from '../_shared/PureDateInput';\n\nexport type WrapperVariant = 'dialog' | 'inline' | 'static';\n\nexport interface WrapperProps {\n open: boolean;\n onAccept: () => void;\n onDismiss: () => void;\n onClear: () => void;\n onSetToday: () => void;\n InputComponent: React.FC;\n DateInputProps: T;\n wider?: boolean;\n showTabs?: boolean;\n}\n\ntype OmitInnerWrapperProps> = Omit<\n T,\n keyof WrapperProps | 'showTabs'\n>;\n\nexport type ModalRoot = OmitInnerWrapperProps;\n\nexport type InlineRoot = OmitInnerWrapperProps;\n\n// prettier-ignore\nexport type ExtendWrapper = {\n /**\n * Picker container option\n * @default 'dialog'\n */\n variant?: WrapperVariant\n} & ModalRoot\n & InlineRoot\n & Omit\n\nexport function getWrapperFromVariant(\n variant?: WrapperVariant\n): React.ComponentType | ModalWrapperProps> {\n switch (variant) {\n case 'inline':\n return InlineWrapper as any;\n\n case 'static':\n return StaticWrapper as any;\n\n default:\n return ModalWrapper as any;\n }\n}\n\ntype Props = {\n variant?: WrapperVariant;\n children?: React.ReactChild;\n} & (ModalWrapperProps | InlineWrapperProps);\n\nexport const VariantContext = React.createContext(null);\n\nexport const Wrapper: (\n p: Props\n) => React.ReactElement> = ({ variant, ...props }) => {\n const Component = getWrapperFromVariant(variant);\n\n return (\n \n \n \n );\n};\n","import * as React from 'react';\nimport clsx from 'clsx';\nimport ClockType from '../constants/ClockType';\nimport ToolbarText from '../_shared/ToolbarText';\nimport ToolbarButton from '../_shared/ToolbarButton';\nimport PickerToolbar from '../_shared/PickerToolbar';\nimport { arrayIncludes } from '../_helpers/utils';\nimport { useUtils } from '../_shared/hooks/useUtils';\nimport { MaterialUiPickersDate } from '../typings/date';\nimport { ToolbarComponentProps } from '../Picker/Picker';\nimport { useTheme, makeStyles } from '@material-ui/core/styles';\nimport { convertToMeridiem, getMeridiem } from '../_helpers/time-utils';\n\nexport const useStyles = makeStyles(\n {\n toolbarLandscape: {\n flexWrap: 'wrap',\n },\n toolbarAmpmLeftPadding: {\n paddingLeft: 50,\n },\n separator: {\n margin: '0 4px 0 2px',\n cursor: 'default',\n },\n hourMinuteLabel: {\n display: 'flex',\n justifyContent: 'flex-end',\n alignItems: 'flex-end',\n },\n hourMinuteLabelAmpmLandscape: {\n marginTop: 'auto',\n },\n hourMinuteLabelReverse: {\n flexDirection: 'row-reverse',\n },\n ampmSelection: {\n marginLeft: 20,\n marginRight: -20,\n display: 'flex',\n flexDirection: 'column',\n },\n ampmLandscape: {\n margin: '4px 0 auto',\n flexDirection: 'row',\n justifyContent: 'space-around',\n flexBasis: '100%',\n },\n ampmSelectionWithSeconds: {\n marginLeft: 15,\n marginRight: 10,\n },\n ampmLabel: {\n fontSize: 18,\n },\n },\n { name: 'MuiPickersTimePickerToolbar' }\n);\n\nexport function useMeridiemMode(\n date: MaterialUiPickersDate,\n ampm: boolean | undefined,\n onChange: (date: MaterialUiPickersDate, isFinished?: boolean | undefined) => void\n) {\n const utils = useUtils();\n const meridiemMode = getMeridiem(date, utils);\n\n const handleMeridiemChange = React.useCallback(\n (mode: 'am' | 'pm') => {\n const timeWithMeridiem = convertToMeridiem(date, mode, Boolean(ampm), utils);\n onChange(timeWithMeridiem, false);\n },\n [ampm, date, onChange, utils]\n );\n\n return { meridiemMode, handleMeridiemChange };\n}\n\nexport const TimePickerToolbar: React.FC = ({\n date,\n views,\n ampm,\n openView,\n onChange,\n isLandscape,\n setOpenView,\n}) => {\n const utils = useUtils();\n const theme = useTheme();\n const classes = useStyles();\n const { meridiemMode, handleMeridiemChange } = useMeridiemMode(date, ampm, onChange);\n\n const clockTypographyVariant = isLandscape ? 'h3' : 'h2';\n\n return (\n \n \n {arrayIncludes(views, 'hours') && (\n setOpenView(ClockType.HOURS)}\n selected={openView === ClockType.HOURS}\n label={utils.getHourText(date, Boolean(ampm))}\n />\n )}\n\n {arrayIncludes(views, ['hours', 'minutes']) && (\n \n )}\n\n {arrayIncludes(views, 'minutes') && (\n setOpenView(ClockType.MINUTES)}\n selected={openView === ClockType.MINUTES}\n label={utils.getMinuteText(date)}\n />\n )}\n\n {arrayIncludes(views, ['minutes', 'seconds']) && (\n \n )}\n\n {arrayIncludes(views, 'seconds') && (\n setOpenView(ClockType.SECONDS)}\n selected={openView === ClockType.SECONDS}\n label={utils.getSecondText(date)}\n />\n )}\n
\n\n {ampm && (\n \n handleMeridiemChange('am')}\n />\n\n handleMeridiemChange('pm')}\n />\n
\n )}\n \n );\n};\n\nexport default TimePickerToolbar;\n","import { useUtils } from '../_shared/hooks/useUtils';\nimport { TimePickerToolbar } from './TimePickerToolbar';\nimport { PureDateInput } from '../_shared/PureDateInput';\nimport { KeyboardDateInput } from '../_shared/KeyboardDateInput';\nimport { timePickerDefaultProps } from '../constants/prop-types';\nimport { usePickerState } from '../_shared/hooks/usePickerState';\nimport { pick12hOr24hFormat } from '../_helpers/text-field-helper';\nimport { useKeyboardPickerState } from '../_shared/hooks/useKeyboardPickerState';\nimport {\n WithKeyboardInputProps,\n makePickerWithState,\n WithPureInputProps,\n} from '../Picker/makePickerWithState';\n\ntype TimePickerView = 'hours' | 'minutes' | 'seconds';\n\nexport interface BaseTimePickerProps {\n /**\n * 12h/24h view for hour selection clock\n * @default true\n */\n ampm?: boolean;\n /**\n * Step over minutes\n * @default 1\n */\n minutesStep?: number;\n}\n\nexport interface TimePickerViewsProps extends BaseTimePickerProps {\n /** Array of views to show */\n views?: ('hours' | 'minutes' | 'seconds')[];\n /** First view to show in timepicker */\n openTo?: 'hours' | 'minutes' | 'seconds';\n}\n\nexport type TimePickerProps = WithPureInputProps & TimePickerViewsProps;\n\nexport type KeyboardTimePickerProps = WithKeyboardInputProps & TimePickerViewsProps;\n\nconst defaultProps = {\n ...timePickerDefaultProps,\n openTo: 'hours' as TimePickerView,\n views: ['hours', 'minutes'] as TimePickerView[],\n};\n\nfunction useOptions(props: TimePickerProps | KeyboardTimePickerProps) {\n const utils = useUtils();\n\n return {\n getDefaultFormat: () =>\n pick12hOr24hFormat(props.format, props.ampm, {\n '12h': utils.time12hFormat,\n '24h': utils.time24hFormat,\n }),\n };\n}\n\nexport const TimePicker = makePickerWithState({\n useOptions,\n Input: PureDateInput,\n useState: usePickerState,\n DefaultToolbarComponent: TimePickerToolbar,\n});\n\nexport const KeyboardTimePicker = makePickerWithState({\n useOptions,\n Input: KeyboardDateInput,\n useState: useKeyboardPickerState,\n DefaultToolbarComponent: TimePickerToolbar,\n getCustomProps: props => ({\n refuse: props.ampm ? /[^\\dap]+/gi : /[^\\d]+/gi,\n }),\n});\n\nTimePicker.defaultProps = defaultProps;\n\nKeyboardTimePicker.defaultProps = defaultProps;\n","import * as React from 'react';\nimport Tab from '@material-ui/core/Tab';\nimport Tabs from '@material-ui/core/Tabs';\nimport Paper from '@material-ui/core/Paper';\nimport { TimeIcon } from '../_shared/icons/TimeIcon';\nimport { DateTimePickerView } from './DateTimePicker';\nimport { DateRangeIcon } from '../_shared/icons/DateRangeIcon';\nimport { makeStyles, useTheme } from '@material-ui/core/styles';\n\nconst viewToTabIndex = (openView: DateTimePickerView) => {\n if (openView === 'date' || openView === 'year') {\n return 'date';\n }\n\n return 'time';\n};\n\nconst tabIndexToView = (tab: DateTimePickerView) => {\n if (tab === 'date') {\n return 'date';\n }\n\n return 'hours';\n};\n\nexport interface DateTimePickerTabsProps {\n view: DateTimePickerView;\n onChange: (view: DateTimePickerView) => void;\n dateRangeIcon?: React.ReactNode;\n timeIcon?: React.ReactNode;\n}\n\nexport const useStyles = makeStyles(\n theme => {\n // prettier-ignore\n const tabsBackground = theme.palette.type === 'light'\n ? theme.palette.primary.main\n : theme.palette.background.default;\n\n return {\n tabs: {\n color: theme.palette.getContrastText(tabsBackground),\n backgroundColor: tabsBackground,\n },\n };\n },\n { name: 'MuiPickerDTTabs' }\n);\n\nexport const DateTimePickerTabs: React.SFC = ({\n view,\n onChange,\n dateRangeIcon,\n timeIcon,\n}) => {\n const classes = useStyles();\n const theme = useTheme();\n const indicatorColor = theme.palette.type === 'light' ? 'secondary' : 'primary';\n const handleChange = (e: React.ChangeEvent<{}>, value: DateTimePickerView) => {\n if (value !== viewToTabIndex(view)) {\n onChange(tabIndexToView(value));\n }\n };\n\n return (\n \n \n {dateRangeIcon}} />\n {timeIcon}} />\n \n \n );\n};\n\nDateTimePickerTabs.defaultProps = {\n dateRangeIcon: ,\n timeIcon: ,\n};\n\nexport default DateTimePickerTabs;\n","import React from 'react';\nimport SvgIcon, { SvgIconProps } from '@material-ui/core/SvgIcon';\n\nexport const DateRangeIcon: React.SFC = props => {\n return (\n \n \n \n \n );\n};\n","import React from 'react';\nimport SvgIcon, { SvgIconProps } from '@material-ui/core/SvgIcon';\n\nexport const TimeIcon: React.SFC = props => {\n return (\n \n \n \n \n \n );\n};\n","import * as React from 'react';\nimport Grid from '@material-ui/core/Grid';\nimport ToolbarText from '../_shared/ToolbarText';\nimport PickerToolbar from '../_shared/PickerToolbar';\nimport ToolbarButton from '../_shared/ToolbarButton';\nimport DateTimePickerTabs from './DateTimePickerTabs';\nimport { useUtils } from '../_shared/hooks/useUtils';\nimport { DateTimePickerView } from './DateTimePicker';\nimport { ToolbarComponentProps } from '../Picker/Picker';\nimport { makeStyles, useTheme } from '@material-ui/core/styles';\nimport { useMeridiemMode } from '../TimePicker/TimePickerToolbar';\n\nexport const useStyles = makeStyles(\n _ => ({\n toolbar: {\n paddingLeft: 16,\n paddingRight: 16,\n justifyContent: 'space-around',\n },\n separator: {\n margin: '0 4px 0 2px',\n cursor: 'default',\n },\n }),\n { name: 'MuiPickerDTToolbar' }\n);\n\nexport const DateTimePickerToolbar: React.FC = ({\n date,\n openView,\n setOpenView,\n ampm,\n hideTabs,\n dateRangeIcon,\n timeIcon,\n onChange,\n}) => {\n const utils = useUtils();\n const classes = useStyles();\n const showTabs = !hideTabs && typeof window !== 'undefined' && window.innerHeight > 667;\n const { meridiemMode, handleMeridiemChange } = useMeridiemMode(date, ampm, onChange);\n const theme = useTheme();\n const rtl = theme.direction === 'rtl';\n\n return (\n <>\n \n \n \n
\n setOpenView('year')}\n selected={openView === 'year'}\n label={utils.getYearText(date)}\n />\n
\n
\n setOpenView('date')}\n selected={openView === 'date'}\n label={utils.getDateTimePickerHeaderText(date)}\n />\n
\n
\n\n \n setOpenView('hours')}\n selected={openView === 'hours'}\n label={utils.getHourText(date, ampm!)}\n />\n\n \n\n setOpenView('minutes')}\n selected={openView === 'minutes'}\n label={utils.getMinuteText(date)}\n />\n
\n\n {ampm && (\n \n handleMeridiemChange('am')}\n />\n\n handleMeridiemChange('pm')}\n />\n \n )}\n \n
\n\n {showTabs && (\n \n )}\n \n );\n};\n","import { useUtils } from '../_shared/hooks/useUtils';\nimport { PureDateInput } from '../_shared/PureDateInput';\nimport { BaseTimePickerProps } from '../TimePicker/TimePicker';\nimport { BaseDatePickerProps } from '../DatePicker/DatePicker';\nimport { DateTimePickerToolbar } from './DateTimePickerToolbar';\nimport { KeyboardDateInput } from '../_shared/KeyboardDateInput';\nimport { usePickerState } from '../_shared/hooks/usePickerState';\nimport { pick12hOr24hFormat } from '../_helpers/text-field-helper';\nimport { dateTimePickerDefaultProps } from '../constants/prop-types';\nimport { useKeyboardPickerState } from '../_shared/hooks/useKeyboardPickerState';\nimport {\n WithKeyboardInputProps,\n makePickerWithState,\n WithPureInputProps,\n} from '../Picker/makePickerWithState';\n\nexport type DateTimePickerView = 'year' | 'date' | 'month' | 'hours' | 'minutes';\n\nexport type BaseDateTimePickerProps = BaseTimePickerProps & BaseDatePickerProps;\n\nexport interface DateTimePickerViewsProps extends BaseDateTimePickerProps {\n /** Array of views to show */\n views?: ('year' | 'date' | 'month' | 'hours' | 'minutes')[];\n /** First view to show in DatePicker */\n openTo?: 'year' | 'date' | 'month' | 'hours' | 'minutes';\n /** To show tabs */\n hideTabs?: boolean;\n /** Date tab icon */\n dateRangeIcon?: React.ReactNode;\n /** Time tab icon */\n timeIcon?: React.ReactNode;\n}\n\nexport type DateTimePickerProps = WithPureInputProps & DateTimePickerViewsProps;\n\nexport type KeyboardDateTimePickerProps = WithKeyboardInputProps & DateTimePickerViewsProps;\n\nconst defaultProps = {\n ...dateTimePickerDefaultProps,\n wider: true,\n orientation: 'portrait' as const,\n openTo: 'date' as DateTimePickerView,\n views: ['year', 'date', 'hours', 'minutes'] as DateTimePickerView[],\n};\n\nfunction useOptions(props: DateTimePickerProps | KeyboardDateTimePickerProps) {\n const utils = useUtils();\n\n if (props.orientation !== 'portrait') {\n throw new Error('We are not supporting custom orientation for DateTimePicker yet :(');\n }\n\n return {\n getDefaultFormat: () =>\n pick12hOr24hFormat(props.format, props.ampm, {\n '12h': utils.dateTime12hFormat,\n '24h': utils.dateTime24hFormat,\n }),\n };\n}\n\nexport const DateTimePicker = makePickerWithState({\n useOptions,\n Input: PureDateInput,\n useState: usePickerState,\n DefaultToolbarComponent: DateTimePickerToolbar,\n});\n\nexport const KeyboardDateTimePicker = makePickerWithState({\n useOptions,\n Input: KeyboardDateInput,\n useState: useKeyboardPickerState,\n DefaultToolbarComponent: DateTimePickerToolbar,\n getCustomProps: props => ({\n refuse: props.ampm ? /[^\\dap]+/gi : /[^\\d]+/gi,\n }),\n});\n\nDateTimePicker.defaultProps = defaultProps;\n\nKeyboardDateTimePicker.defaultProps = defaultProps;\n","import { usePickerState } from './usePickerState';\nimport { ParsableDate } from '../../constants/prop-types';\nimport { MaterialUiPickersDate } from '../../typings/date';\nimport { BaseDatePickerProps } from '../../DatePicker/DatePicker';\n\ninterface StaticStateOpts extends BaseDatePickerProps {\n value: ParsableDate;\n onChange: (date: MaterialUiPickersDate) => void;\n autoOk?: boolean;\n defaultFormat?: string;\n}\n\nexport function useStaticState({ value, autoOk = true, onChange, defaultFormat }: StaticStateOpts) {\n const { pickerProps, wrapperProps, inputProps } = usePickerState(\n { value, onChange, autoOk },\n {\n // just a random format, mostly always not needed for users\n getDefaultFormat: () => defaultFormat || 'MM/dd/yyyy',\n }\n );\n\n return { pickerProps, wrapperProps, inputProps };\n}\n","import * as React from 'react';\nimport clsx from 'clsx';\nimport Typography, { TypographyProps } from '@material-ui/core/Typography';\nimport { ExtendMui } from '../typings/extendMui';\nimport { makeStyles, fade } from '@material-ui/core/styles';\n\nexport interface ToolbarTextProps extends ExtendMui {\n selected?: boolean;\n label: string;\n}\n\nexport const useStyles = makeStyles(\n theme => {\n const textColor =\n theme.palette.type === 'light'\n ? theme.palette.primary.contrastText\n : theme.palette.getContrastText(theme.palette.background.default);\n\n return {\n toolbarTxt: {\n color: fade(textColor, 0.54),\n },\n toolbarBtnSelected: {\n color: textColor,\n },\n };\n },\n { name: 'MuiPickersToolbarText' }\n);\n\nconst ToolbarText: React.FunctionComponent = ({\n selected,\n label,\n className = null,\n ...other\n}) => {\n const classes = useStyles();\n return (\n \n );\n};\n\nexport default ToolbarText;\n","import * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport ToolbarText from './ToolbarText';\nimport Button, { ButtonProps } from '@material-ui/core/Button';\nimport { ExtendMui } from '../typings/extendMui';\nimport { TypographyProps } from '@material-ui/core/Typography';\nimport { createStyles, withStyles, WithStyles } from '@material-ui/core/styles';\n\nexport interface ToolbarButtonProps\n extends ExtendMui,\n WithStyles {\n variant: TypographyProps['variant'];\n selected: boolean;\n label: string;\n align?: TypographyProps['align'];\n typographyClassName?: string;\n}\n\nconst ToolbarButton: React.FunctionComponent = ({\n classes,\n className = null,\n label,\n selected,\n variant,\n align,\n typographyClassName,\n ...other\n}) => {\n return (\n \n );\n};\n\n(ToolbarButton as any).propTypes = {\n selected: PropTypes.bool.isRequired,\n label: PropTypes.string.isRequired,\n classes: PropTypes.any.isRequired,\n className: PropTypes.string,\n innerRef: PropTypes.any,\n};\n\nToolbarButton.defaultProps = {\n className: '',\n};\n\nexport const styles = createStyles({\n toolbarBtn: {\n padding: 0,\n minWidth: '16px',\n textTransform: 'none',\n },\n});\n\nexport default withStyles(styles, { name: 'MuiPickersToolbarButton' })(ToolbarButton);\n","import * as React from 'react';\nimport clsx from 'clsx';\nimport Toolbar, { ToolbarProps } from '@material-ui/core/Toolbar';\nimport { ExtendMui } from '../typings/extendMui';\nimport { makeStyles } from '@material-ui/core/styles';\n\nexport const useStyles = makeStyles(\n theme => ({\n toolbar: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n height: 100,\n backgroundColor:\n theme.palette.type === 'light'\n ? theme.palette.primary.main\n : theme.palette.background.default,\n },\n toolbarLandscape: {\n height: 'auto',\n maxWidth: 150,\n padding: 8,\n justifyContent: 'flex-start',\n },\n }),\n { name: 'MuiPickersToolbar' }\n);\n\ninterface PickerToolbarProps extends ExtendMui {\n isLandscape: boolean;\n}\n\nconst PickerToolbar: React.SFC = ({\n children,\n isLandscape,\n className = null,\n ...other\n}) => {\n const classes = useStyles();\n\n return (\n \n {children}\n \n );\n};\n\nexport default PickerToolbar;\n","import * as React from 'react';\nimport TextField, { BaseTextFieldProps, TextFieldProps } from '@material-ui/core/TextField';\nimport { ExtendMui } from '../typings/extendMui';\n\nexport type NotOverridableProps =\n | 'openPicker'\n | 'inputValue'\n | 'onChange'\n | 'format'\n | 'validationError'\n | 'format'\n | 'forwardedRef';\n\nexport interface PureDateInputProps\n extends ExtendMui {\n /** Pass material-ui text field variant down, bypass internal variant prop */\n inputVariant?: TextFieldProps['variant'];\n /** Override input component */\n TextFieldComponent?: React.ComponentType;\n InputProps?: TextFieldProps['InputProps'];\n inputProps?: TextFieldProps['inputProps'];\n onBlur?: TextFieldProps['onBlur'];\n onFocus?: TextFieldProps['onFocus'];\n inputValue: string;\n validationError?: React.ReactNode;\n openPicker: () => void;\n}\n\nexport const PureDateInput: React.FC = ({\n inputValue,\n inputVariant,\n validationError,\n InputProps,\n openPicker: onOpen,\n TextFieldComponent = TextField,\n ...other\n}) => {\n const PureDateInputProps = React.useMemo(\n () => ({\n ...InputProps,\n readOnly: true,\n }),\n [InputProps]\n );\n\n return (\n {\n // space\n if (e.keyCode === 32) {\n e.stopPropagation();\n onOpen();\n }\n }}\n />\n );\n};\n\nPureDateInput.displayName = 'PureDateInput';\n","import React from 'react';\nimport SvgIcon, { SvgIconProps } from '@material-ui/core/SvgIcon';\n\nexport const KeyboardIcon: React.SFC = props => {\n return (\n \n \n \n \n );\n};\n","import { Omit } from './utils';\nimport { DatePickerProps } from '..';\nimport { IUtils } from '@date-io/core/IUtils';\nimport { ParsableDate } from '../constants/prop-types';\nimport { BasePickerProps } from '../typings/BasePicker';\n\nexport const getDisplayDate = (\n value: ParsableDate,\n format: string,\n utils: IUtils,\n isEmpty: boolean,\n { invalidLabel, emptyLabel, labelFunc }: Omit\n) => {\n const date = utils.date(value);\n if (labelFunc) {\n return labelFunc(isEmpty ? null : date, invalidLabel!);\n }\n\n if (isEmpty) {\n return emptyLabel || '';\n }\n\n return utils.isValid(date) ? utils.format(date, format) : invalidLabel!;\n};\n\nexport interface BaseValidationProps {\n /**\n * Message, appearing when date cannot be parsed\n * @default 'Invalid Date Format'\n */\n invalidDateMessage?: React.ReactNode;\n}\n\nexport interface DateValidationProps extends BaseValidationProps {\n /**\n * Error message, shown if date is less then minimal date\n * @default 'Date should not be before minimal date'\n */\n minDateMessage?: React.ReactNode;\n /**\n * Error message, shown if date is more then maximal date\n * @default 'Date should not be after maximal date'\n */\n maxDateMessage?: React.ReactNode;\n}\n\nconst getComparisonMaxDate = (utils: IUtils, strictCompareDates: boolean, date: Date) => {\n if (strictCompareDates) {\n return date;\n }\n\n return utils.endOfDay(date);\n};\n\nconst getComparisonMinDate = (utils: IUtils, strictCompareDates: boolean, date: Date) => {\n if (strictCompareDates) {\n return date;\n }\n\n return utils.startOfDay(date);\n};\n\nexport const validate = (\n value: ParsableDate,\n utils: IUtils,\n {\n maxDate,\n minDate,\n disablePast,\n disableFuture,\n maxDateMessage,\n minDateMessage,\n invalidDateMessage,\n strictCompareDates,\n }: Omit // DateTimePicker doesn't support\n): React.ReactNode => {\n const parsedValue = utils.date(value);\n\n // if null - do not show error\n if (value === null) {\n return '';\n }\n\n if (!utils.isValid(value)) {\n return invalidDateMessage;\n }\n\n if (\n maxDate &&\n utils.isAfter(\n parsedValue,\n getComparisonMaxDate(utils, !!strictCompareDates, utils.date(maxDate))\n )\n ) {\n return maxDateMessage;\n }\n\n if (\n disableFuture &&\n utils.isAfter(parsedValue, getComparisonMaxDate(utils, !!strictCompareDates, utils.date()))\n ) {\n return maxDateMessage;\n }\n\n if (\n minDate &&\n utils.isBefore(\n parsedValue,\n getComparisonMinDate(utils, !!strictCompareDates, utils.date(minDate))\n )\n ) {\n return minDateMessage;\n }\n if (\n disablePast &&\n utils.isBefore(parsedValue, getComparisonMinDate(utils, !!strictCompareDates, utils.date()))\n ) {\n return minDateMessage;\n }\n\n return '';\n};\n\nexport function pick12hOr24hFormat(\n userFormat: string | undefined,\n ampm: boolean | undefined = true,\n formats: { '12h': string; '24h': string }\n) {\n if (userFormat) {\n return userFormat;\n }\n\n return ampm ? formats['12h'] : formats['24h'];\n}\n\nexport function makeMaskFromFormat(format: string, numberMaskChar: string) {\n return format.replace(/[a-z]/gi, numberMaskChar);\n}\n\nexport const maskedDateFormatter = (mask: string, numberMaskChar: string, refuse: RegExp) => (\n value: string\n) => {\n let result = '';\n const parsed = value.replace(refuse, '');\n\n if (parsed === '') {\n return parsed;\n }\n\n let i = 0;\n let n = 0;\n while (i < mask.length) {\n const maskChar = mask[i];\n if (maskChar === numberMaskChar && n < parsed.length) {\n const parsedChar = parsed[n];\n result += parsedChar;\n n += 1;\n } else {\n result += maskChar;\n }\n i += 1;\n }\n\n return result;\n};\n","import * as React from 'react';\nimport IconButton, { IconButtonProps } from '@material-ui/core/IconButton';\nimport InputAdornment, { InputAdornmentProps } from '@material-ui/core/InputAdornment';\nimport TextField, { BaseTextFieldProps, TextFieldProps } from '@material-ui/core/TextField';\nimport { Rifm } from 'rifm';\nimport { ExtendMui } from '../typings/extendMui';\nimport { KeyboardIcon } from './icons/KeyboardIcon';\nimport { makeMaskFromFormat, maskedDateFormatter } from '../_helpers/text-field-helper';\n\nexport interface KeyboardDateInputProps\n extends ExtendMui {\n format: string;\n onChange: (value: string | null) => void;\n openPicker: () => void;\n validationError?: React.ReactNode;\n inputValue: string;\n inputProps?: TextFieldProps['inputProps'];\n InputProps?: TextFieldProps['InputProps'];\n onBlur?: TextFieldProps['onBlur'];\n onFocus?: TextFieldProps['onFocus'];\n /** Override input component */\n TextFieldComponent?: React.ComponentType;\n /** Icon displaying for open picker button */\n keyboardIcon?: React.ReactNode;\n /** Pass material-ui text field variant down, bypass internal variant prop */\n inputVariant?: TextFieldProps['variant'];\n /**\n * Custom mask. Can be used to override generate from format. (e.g. __/__/____ __:__)\n */\n mask?: string;\n /**\n * Char string that will be replaced with number (for \"_\" mask will be \"__/__/____\")\n * @default '_'\n */\n maskChar?: string;\n /**\n * Refuse values regexp\n * @default /[^\\d]+/gi\n */\n refuse?: RegExp;\n /**\n * Props to pass to keyboard input adornment\n * @type {Partial}\n */\n InputAdornmentProps?: Partial;\n /**\n * Props to pass to keyboard adornment button\n * @type {Partial}\n */\n KeyboardButtonProps?: Partial;\n /** Custom formatter to be passed into Rifm component */\n rifmFormatter?: (str: string) => string;\n}\n\nexport const KeyboardDateInput: React.FunctionComponent = ({\n inputValue,\n inputVariant,\n validationError,\n KeyboardButtonProps,\n InputAdornmentProps,\n openPicker: onOpen,\n onChange,\n InputProps,\n mask,\n maskChar = '_',\n refuse = /[^\\d]+/gi,\n format,\n keyboardIcon,\n disabled,\n rifmFormatter,\n TextFieldComponent = TextField,\n ...other\n}) => {\n const inputMask = mask || makeMaskFromFormat(format, maskChar);\n // prettier-ignore\n const formatter = React.useMemo(\n () => maskedDateFormatter(inputMask, maskChar, refuse),\n [inputMask, maskChar, refuse]\n );\n\n const position =\n InputAdornmentProps && InputAdornmentProps.position ? InputAdornmentProps.position : 'end';\n\n const handleChange = (text: string) => {\n const finalString = text === '' || text === inputMask ? null : text;\n onChange(finalString);\n };\n\n return (\n \n {({ onChange, value }) => (\n \n \n {keyboardIcon}\n \n \n ),\n }}\n />\n )}\n \n );\n};\n\nKeyboardDateInput.defaultProps = {\n keyboardIcon: ,\n};\n\nexport default KeyboardDateInput;\n","import { useUtils } from './useUtils';\nimport { IUtils } from '@date-io/core/IUtils';\nimport { useOpenState } from './useOpenState';\nimport { MaterialUiPickersDate } from '../../typings/date';\nimport { BasePickerProps } from '../../typings/BasePicker';\nimport { getDisplayDate, validate } from '../../_helpers/text-field-helper';\nimport { useCallback, useDebugValue, useEffect, useMemo, useState, useRef } from 'react';\n\nexport interface StateHookOptions {\n getDefaultFormat: () => string;\n}\n\nconst useValueToDate = (\n utils: IUtils,\n { value, initialFocusedDate }: BasePickerProps\n) => {\n const nowRef = useRef(utils.date());\n const date = utils.date(value || initialFocusedDate || nowRef.current);\n\n return date && utils.isValid(date) ? date : nowRef.current;\n};\n\nfunction useDateValues(props: BasePickerProps, options: StateHookOptions) {\n const utils = useUtils();\n const date = useValueToDate(utils, props);\n const format = props.format || options.getDefaultFormat();\n\n return { date, format };\n}\n\nexport function usePickerState(props: BasePickerProps, options: StateHookOptions) {\n const { autoOk, disabled, readOnly, onAccept, onChange, onError, value, variant } = props;\n\n const utils = useUtils();\n const { isOpen, setIsOpen } = useOpenState(props);\n const { date, format } = useDateValues(props, options);\n const [pickerDate, setPickerDate] = useState(date);\n\n useEffect(() => {\n // if value was changed in closed state - treat it as accepted\n if (!isOpen && !utils.isEqual(pickerDate, date)) {\n setPickerDate(date);\n }\n }, [date, isOpen, pickerDate, utils]);\n\n const acceptDate = useCallback(\n (acceptedDate: MaterialUiPickersDate) => {\n onChange(acceptedDate);\n if (onAccept) {\n onAccept(acceptedDate);\n }\n\n setIsOpen(false);\n },\n [onAccept, onChange, setIsOpen]\n );\n\n const wrapperProps = useMemo(\n () => ({\n format,\n open: isOpen,\n onClear: () => acceptDate(null),\n onAccept: () => acceptDate(pickerDate),\n onSetToday: () => setPickerDate(utils.date()),\n onDismiss: () => {\n setIsOpen(false);\n },\n }),\n [acceptDate, format, isOpen, pickerDate, setIsOpen, utils]\n );\n\n const pickerProps = useMemo(\n () => ({\n date: pickerDate,\n onChange: (newDate: MaterialUiPickersDate, isFinish = true) => {\n setPickerDate(newDate);\n\n if (isFinish && autoOk) {\n acceptDate(newDate);\n return;\n }\n\n // simulate autoOk, but do not close the modal\n if (variant === 'inline' || variant === 'static') {\n onChange(newDate);\n onAccept && onAccept(newDate);\n }\n },\n }),\n [acceptDate, autoOk, onAccept, onChange, pickerDate, variant]\n );\n\n const validationError = validate(value, utils, props);\n useEffect(() => {\n if (onError) {\n onError(validationError, value);\n }\n }, [onError, validationError, value]);\n\n const inputValue = getDisplayDate(date, format, utils, value === null, props);\n const inputProps = useMemo(\n () => ({\n inputValue,\n validationError,\n openPicker: () => !readOnly && !disabled && setIsOpen(true),\n }),\n [disabled, inputValue, readOnly, setIsOpen, validationError]\n );\n\n const pickerState = { pickerProps, inputProps, wrapperProps };\n\n useDebugValue(pickerState);\n return pickerState;\n}\n","/* eslint-disable react-hooks/rules-of-hooks */\nimport { BasePickerProps } from '../../typings/BasePicker';\nimport { useCallback, useState, Dispatch, SetStateAction } from 'react';\n\nexport function useOpenState({ open, onOpen, onClose }: BasePickerProps) {\n let setIsOpenState: null | Dispatch> = null;\n if (open === undefined || open === null) {\n // The component is uncontrolled, so we need to give it its own state.\n [open, setIsOpenState] = useState(false);\n }\n\n // prettier-ignore\n const setIsOpen = useCallback((newIsOpen: boolean) => {\n setIsOpenState && setIsOpenState(newIsOpen);\n\n return newIsOpen\n ? onOpen && onOpen()\n : onClose && onClose();\n }, [onOpen, onClose, setIsOpenState]);\n\n return { isOpen: open, setIsOpen };\n}\n","import { useUtils } from './useUtils';\nimport { Omit } from '../../_helpers/utils';\nimport { IUtils } from '@date-io/core/IUtils';\nimport { BasePickerProps } from '../../typings/BasePicker';\nimport { MaterialUiPickersDate } from '../../typings/date';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { getDisplayDate } from '../../_helpers/text-field-helper';\nimport { StateHookOptions, usePickerState } from './usePickerState';\n\nexport interface BaseKeyboardPickerProps extends Omit {\n /** String value for controlling value with pure input string. Overrides value prop */\n inputValue?: string;\n /** Keyboard onChange callback @DateIOType */\n onChange: (date: MaterialUiPickersDate | null, value?: string | null) => void;\n}\n\nfunction parseInputString(value: string, utils: IUtils, format: string) {\n try {\n return utils.parse(value, format);\n } catch {\n return null;\n }\n}\n\nexport function useKeyboardPickerState(props: BaseKeyboardPickerProps, options: StateHookOptions) {\n const { format = options.getDefaultFormat(), inputValue, onChange, value } = props;\n const utils = useUtils();\n\n const displayDate = getDisplayDate(value, format, utils, value === null, props);\n const [innerInputValue, setInnerInputValue] = useState(displayDate);\n const dateValue = inputValue ? parseInputString(inputValue, utils, format) : value;\n\n useEffect(() => {\n if (value === null || utils.isValid(value)) {\n setInnerInputValue(displayDate);\n }\n }, [displayDate, setInnerInputValue, utils, value]);\n\n const handleKeyboardChange = useCallback(\n (date: MaterialUiPickersDate) => {\n onChange(date, date === null ? null : utils.format(date, format));\n },\n [format, onChange, utils]\n );\n\n const { inputProps: innerInputProps, wrapperProps, pickerProps } = usePickerState(\n // Extend props interface\n { ...props, value: dateValue, onChange: handleKeyboardChange },\n options\n );\n\n const inputProps = useMemo(\n () => ({\n ...innerInputProps, // reuse validation and open/close logic\n format: wrapperProps.format,\n inputValue: inputValue || innerInputValue,\n onChange: (value: string | null) => {\n setInnerInputValue(value || '');\n const date = value === null ? null : utils.parse(value, wrapperProps.format);\n\n onChange(date, value);\n },\n }),\n [innerInputProps, innerInputValue, inputValue, onChange, utils, wrapperProps.format]\n );\n\n return {\n inputProps,\n wrapperProps,\n pickerProps,\n };\n}\n","import * as React from 'react';\nimport { BasePickerProps } from '../typings/BasePicker';\nimport { Picker, ToolbarComponentProps } from './Picker';\nimport { ExtendWrapper, Wrapper } from '../wrappers/Wrapper';\nimport { PureDateInputProps } from '../_shared/PureDateInput';\nimport { DateValidationProps } from '../_helpers/text-field-helper';\nimport { KeyboardDateInputProps } from '../_shared/KeyboardDateInput';\nimport { StateHookOptions, usePickerState } from '../_shared/hooks/usePickerState';\nimport {\n BaseKeyboardPickerProps,\n useKeyboardPickerState,\n} from '../_shared/hooks/useKeyboardPickerState';\n\nexport type WithKeyboardInputProps = DateValidationProps &\n BaseKeyboardPickerProps &\n ExtendWrapper;\n\nexport type WithPureInputProps = DateValidationProps &\n BasePickerProps &\n ExtendWrapper;\n\nexport interface MakePickerOptions {\n Input: any;\n useState: typeof usePickerState | typeof useKeyboardPickerState;\n useOptions: (props: any) => StateHookOptions;\n getCustomProps?: (props: T) => Partial;\n DefaultToolbarComponent: React.ComponentType;\n}\n\nexport function makePickerWithState({\n Input,\n useState,\n useOptions,\n getCustomProps,\n DefaultToolbarComponent,\n}: MakePickerOptions): React.FC {\n function PickerWithState(props: T) {\n const {\n allowKeyboardControl,\n ampm,\n animateYearScrolling,\n autoOk,\n dateRangeIcon,\n disableFuture,\n disablePast,\n disableToolbar,\n emptyLabel,\n format,\n forwardedRef,\n hideTabs,\n initialFocusedDate,\n invalidDateMessage,\n invalidLabel,\n labelFunc,\n leftArrowButtonProps,\n leftArrowIcon,\n loadingIndicator,\n maxDate,\n maxDateMessage,\n minDate,\n minDateMessage,\n minutesStep,\n onAccept,\n onChange,\n onClose,\n onMonthChange,\n onOpen,\n onYearChange,\n openTo,\n orientation,\n renderDay,\n rightArrowButtonProps,\n rightArrowIcon,\n shouldDisableDate,\n strictCompareDates,\n timeIcon,\n ToolbarComponent = DefaultToolbarComponent,\n value,\n variant,\n views,\n ...other\n } = props;\n\n const injectedProps = getCustomProps ? getCustomProps(props) : {};\n\n const options = useOptions(props);\n const { pickerProps, inputProps, wrapperProps } = useState(props as any, options);\n\n return (\n \n \n \n );\n }\n\n return PickerWithState;\n}\n","import * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { IUtils } from '@date-io/core/IUtils';\nimport { MaterialUiPickersDate } from './typings/date';\n\nexport const MuiPickersContext = React.createContext | null>(null);\n\nexport interface MuiPickersUtilsProviderProps {\n utils: any;\n children: React.ReactNode;\n locale?: any;\n libInstance?: any;\n}\n\nexport const MuiPickersUtilsProvider: React.FC = ({\n utils: Utils,\n children,\n locale,\n libInstance,\n}) => {\n const utils = React.useMemo(() => new Utils({ locale, instance: libInstance }), [\n Utils,\n libInstance,\n locale,\n ]);\n\n return ;\n};\n\nMuiPickersUtilsProvider.propTypes = {\n utils: PropTypes.func.isRequired,\n locale: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),\n children: PropTypes.oneOfType([\n PropTypes.element.isRequired,\n PropTypes.arrayOf(PropTypes.element.isRequired),\n ]).isRequired,\n};\n\nexport default MuiPickersUtilsProvider;\n","import { useContext } from 'react';\nimport { IUtils } from '@date-io/core/IUtils';\nimport { MaterialUiPickersDate } from '../../typings/date';\nimport { MuiPickersContext } from '../../MuiPickersUtilsProvider';\n\nexport const checkUtils = (utils: IUtils | null | undefined) => {\n if (!utils) {\n // tslint:disable-next-line\n throw new Error(\n 'Can not find utils in context. You either a) forgot to wrap your component tree in MuiPickersUtilsProvider; or b) mixed named and direct file imports. Recommendation: use named imports from the module index.'\n );\n }\n};\n\nexport function useUtils() {\n const utils = useContext(MuiPickersContext);\n checkUtils(utils);\n\n return utils!;\n}\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport React from 'react';\nimport { SheetsRegistry } from 'jss';\nimport StylesProvider from '../StylesProvider';\nimport createGenerateClassName from '../createGenerateClassName';\n\nvar ServerStyleSheets = /*#__PURE__*/function () {\n function ServerStyleSheets() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, ServerStyleSheets);\n\n this.options = options;\n }\n\n _createClass(ServerStyleSheets, [{\n key: \"collect\",\n value: function collect(children) {\n // This is needed in order to deduplicate the injection of CSS in the page.\n var sheetsManager = new Map(); // This is needed in order to inject the critical CSS.\n\n this.sheetsRegistry = new SheetsRegistry(); // A new class name generator\n\n var generateClassName = createGenerateClassName();\n return /*#__PURE__*/React.createElement(StylesProvider, _extends({\n sheetsManager: sheetsManager,\n serverGenerateClassName: generateClassName,\n sheetsRegistry: this.sheetsRegistry\n }, this.options), children);\n }\n }, {\n key: \"toString\",\n value: function toString() {\n return this.sheetsRegistry ? this.sheetsRegistry.toString() : '';\n }\n }, {\n key: \"getStyleElement\",\n value: function getStyleElement(props) {\n return /*#__PURE__*/React.createElement('style', _extends({\n id: 'jss-server-side',\n key: 'jss-server-side',\n dangerouslySetInnerHTML: {\n __html: this.toString()\n }\n }, props));\n }\n }]);\n\n return ServerStyleSheets;\n}();\n\nexport { ServerStyleSheets as default };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { exactProp } from '@material-ui/utils';\nimport createGenerateClassName from '../createGenerateClassName';\nimport { create } from 'jss';\nimport jssPreset from '../jssPreset'; // Default JSS instance.\n\nvar jss = create(jssPreset()); // Use a singleton or the provided one by the context.\n//\n// The counter-based approach doesn't tolerate any mistake.\n// It's much safer to use the same counter everywhere.\n\nvar generateClassName = createGenerateClassName(); // Exported for test purposes\n\nexport var sheetsManager = new Map();\nvar defaultOptions = {\n disableGeneration: false,\n generateClassName: generateClassName,\n jss: jss,\n sheetsCache: null,\n sheetsManager: sheetsManager,\n sheetsRegistry: null\n};\nexport var StylesContext = React.createContext(defaultOptions);\n\nif (process.env.NODE_ENV !== 'production') {\n StylesContext.displayName = 'StylesContext';\n}\n\nvar injectFirstNode;\nexport default function StylesProvider(props) {\n var children = props.children,\n _props$injectFirst = props.injectFirst,\n injectFirst = _props$injectFirst === void 0 ? false : _props$injectFirst,\n _props$disableGenerat = props.disableGeneration,\n disableGeneration = _props$disableGenerat === void 0 ? false : _props$disableGenerat,\n localOptions = _objectWithoutProperties(props, [\"children\", \"injectFirst\", \"disableGeneration\"]);\n\n var outerOptions = React.useContext(StylesContext);\n\n var context = _extends({}, outerOptions, {\n disableGeneration: disableGeneration\n }, localOptions);\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof window === 'undefined' && !context.sheetsManager) {\n console.error('Material-UI: You need to use the ServerStyleSheets API when rendering on the server.');\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (context.jss.options.insertionPoint && injectFirst) {\n console.error('Material-UI: You cannot use a custom insertionPoint and at the same time.');\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (injectFirst && localOptions.jss) {\n console.error('Material-UI: You cannot use the jss and injectFirst props at the same time.');\n }\n }\n\n if (!context.jss.options.insertionPoint && injectFirst && typeof window !== 'undefined') {\n if (!injectFirstNode) {\n var head = document.head;\n injectFirstNode = document.createComment('mui-inject-first');\n head.insertBefore(injectFirstNode, head.firstChild);\n }\n\n context.jss = create({\n plugins: jssPreset().plugins,\n insertionPoint: injectFirstNode\n });\n }\n\n return /*#__PURE__*/React.createElement(StylesContext.Provider, {\n value: context\n }, children);\n}\nprocess.env.NODE_ENV !== \"production\" ? StylesProvider.propTypes = {\n /**\n * Your component tree.\n */\n children: PropTypes.node.isRequired,\n\n /**\n * You can disable the generation of the styles with this option.\n * It can be useful when traversing the React tree outside of the HTML\n * rendering step on the server.\n * Let's say you are using react-apollo to extract all\n * the queries made by the interface server-side - you can significantly speed up the traversal with this prop.\n */\n disableGeneration: PropTypes.bool,\n\n /**\n * JSS's class name generator.\n */\n generateClassName: PropTypes.func,\n\n /**\n * By default, the styles are injected last in the element of the page.\n * As a result, they gain more specificity than any other style sheet.\n * If you want to override Material-UI's styles, set this prop.\n */\n injectFirst: PropTypes.bool,\n\n /**\n * JSS's instance.\n */\n jss: PropTypes.object,\n\n /**\n * @ignore\n */\n serverGenerateClassName: PropTypes.func,\n\n /**\n * @ignore\n *\n * Beta feature.\n *\n * Cache for the sheets.\n */\n sheetsCache: PropTypes.object,\n\n /**\n * @ignore\n *\n * The sheetsManager is used to deduplicate style sheet injection in the page.\n * It's deduplicating using the (theme, styles) couple.\n * On the server, you should provide a new instance for each request.\n */\n sheetsManager: PropTypes.object,\n\n /**\n * @ignore\n *\n * Collect the sheets.\n */\n sheetsRegistry: PropTypes.object\n} : void 0;\n\nif (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== \"production\" ? StylesProvider.propTypes = exactProp(StylesProvider.propTypes) : void 0;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { exactProp } from '@material-ui/utils';\nimport ThemeContext from '../useTheme/ThemeContext';\nimport useTheme from '../useTheme';\nimport nested from './nested'; // To support composition of theme.\n\nfunction mergeOuterLocalTheme(outerTheme, localTheme) {\n if (typeof localTheme === 'function') {\n var mergedTheme = localTheme(outerTheme);\n\n if (process.env.NODE_ENV !== 'production') {\n if (!mergedTheme) {\n console.error(['Material-UI: You should return an object from your theme function, i.e.', ' ({})} />'].join('\\n'));\n }\n }\n\n return mergedTheme;\n }\n\n return _extends({}, outerTheme, localTheme);\n}\n/**\n * This component takes a `theme` prop.\n * It makes the `theme` available down the React tree thanks to React context.\n * This component should preferably be used at **the root of your component tree**.\n */\n\n\nfunction ThemeProvider(props) {\n var children = props.children,\n localTheme = props.theme;\n var outerTheme = useTheme();\n\n if (process.env.NODE_ENV !== 'production') {\n if (outerTheme === null && typeof localTheme === 'function') {\n console.error(['Material-UI: You are providing a theme function prop to the ThemeProvider component:', ' outerTheme} />', '', 'However, no outer theme is present.', 'Make sure a theme is already injected higher in the React tree ' + 'or provide a theme object.'].join('\\n'));\n }\n }\n\n var theme = React.useMemo(function () {\n var output = outerTheme === null ? localTheme : mergeOuterLocalTheme(outerTheme, localTheme);\n\n if (output != null) {\n output[nested] = outerTheme !== null;\n }\n\n return output;\n }, [localTheme, outerTheme]);\n return /*#__PURE__*/React.createElement(ThemeContext.Provider, {\n value: theme\n }, children);\n}\n\nprocess.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes = {\n /**\n * Your component tree.\n */\n children: PropTypes.node.isRequired,\n\n /**\n * A theme object. You can provide a function to extend the outer theme.\n */\n theme: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired\n} : void 0;\n\nif (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes = exactProp(ThemeProvider.propTypes) : void 0;\n}\n\nexport default ThemeProvider;","var hasSymbol = typeof Symbol === 'function' && Symbol.for;\nexport default hasSymbol ? Symbol.for('mui.nested') : '__THEME_NESTED__';","import nested from '../ThemeProvider/nested';\n/**\n * This is the list of the style rule name we use as drop in replacement for the built-in\n * pseudo classes (:checked, :disabled, :focused, etc.).\n *\n * Why do they exist in the first place?\n * These classes are used at a specificity of 2.\n * It allows them to override previously definied styles as well as\n * being untouched by simple user overrides.\n */\n\nvar pseudoClasses = ['checked', 'disabled', 'error', 'focused', 'focusVisible', 'required', 'expanded', 'selected']; // Returns a function which generates unique class names based on counters.\n// When new generator function is created, rule counter is reset.\n// We need to reset the rule counter for SSR for each request.\n//\n// It's inspired by\n// https://github.com/cssinjs/jss/blob/4e6a05dd3f7b6572fdd3ab216861d9e446c20331/src/utils/createGenerateClassName.js\n\nexport default function createGenerateClassName() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var _options$disableGloba = options.disableGlobal,\n disableGlobal = _options$disableGloba === void 0 ? false : _options$disableGloba,\n _options$productionPr = options.productionPrefix,\n productionPrefix = _options$productionPr === void 0 ? 'jss' : _options$productionPr,\n _options$seed = options.seed,\n seed = _options$seed === void 0 ? '' : _options$seed;\n var seedPrefix = seed === '' ? '' : \"\".concat(seed, \"-\");\n var ruleCounter = 0;\n\n var getNextCounterId = function getNextCounterId() {\n ruleCounter += 1;\n\n if (process.env.NODE_ENV !== 'production') {\n if (ruleCounter >= 1e10) {\n console.warn(['Material-UI: You might have a memory leak.', 'The ruleCounter is not supposed to grow that much.'].join(''));\n }\n }\n\n return ruleCounter;\n };\n\n return function (rule, styleSheet) {\n var name = styleSheet.options.name; // Is a global static MUI style?\n\n if (name && name.indexOf('Mui') === 0 && !styleSheet.options.link && !disableGlobal) {\n // We can use a shorthand class name, we never use the keys to style the components.\n if (pseudoClasses.indexOf(rule.key) !== -1) {\n return \"Mui-\".concat(rule.key);\n }\n\n var prefix = \"\".concat(seedPrefix).concat(name, \"-\").concat(rule.key);\n\n if (!styleSheet.options.theme[nested] || seed !== '') {\n return prefix;\n }\n\n return \"\".concat(prefix, \"-\").concat(getNextCounterId());\n }\n\n if (process.env.NODE_ENV === 'production') {\n return \"\".concat(seedPrefix).concat(productionPrefix).concat(getNextCounterId());\n }\n\n var suffix = \"\".concat(rule.key, \"-\").concat(getNextCounterId()); // Help with debuggability.\n\n if (styleSheet.options.classNamePrefix) {\n return \"\".concat(seedPrefix).concat(styleSheet.options.classNamePrefix, \"-\").concat(suffix);\n }\n\n return \"\".concat(seedPrefix).concat(suffix);\n };\n}","export default function createStyles(styles) {\n return styles;\n}","/* eslint-disable no-restricted-syntax */\nexport default function getThemeProps(params) {\n var theme = params.theme,\n name = params.name,\n props = params.props;\n\n if (!theme || !theme.props || !theme.props[name]) {\n return props;\n } // Resolve default props, code borrow from React source.\n // https://github.com/facebook/react/blob/15a8f031838a553e41c0b66eb1bcf1da8448104d/packages/react/src/ReactElement.js#L221\n\n\n var defaultProps = theme.props[name];\n var propName;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n\n return props;\n}","import warning from 'tiny-warning';\nimport { createRule } from 'jss';\n\nvar now = Date.now();\nvar fnValuesNs = \"fnValues\" + now;\nvar fnRuleNs = \"fnStyle\" + ++now;\n\nvar functionPlugin = function functionPlugin() {\n return {\n onCreateRule: function onCreateRule(name, decl, options) {\n if (typeof decl !== 'function') return null;\n var rule = createRule(name, {}, options);\n rule[fnRuleNs] = decl;\n return rule;\n },\n onProcessStyle: function onProcessStyle(style, rule) {\n // We need to extract function values from the declaration, so that we can keep core unaware of them.\n // We need to do that only once.\n // We don't need to extract functions on each style update, since this can happen only once.\n // We don't support function values inside of function rules.\n if (fnValuesNs in rule || fnRuleNs in rule) return style;\n var fnValues = {};\n\n for (var prop in style) {\n var value = style[prop];\n if (typeof value !== 'function') continue;\n delete style[prop];\n fnValues[prop] = value;\n }\n\n rule[fnValuesNs] = fnValues;\n return style;\n },\n onUpdate: function onUpdate(data, rule, sheet, options) {\n var styleRule = rule;\n var fnRule = styleRule[fnRuleNs]; // If we have a style function, the entire rule is dynamic and style object\n // will be returned from that function.\n\n if (fnRule) {\n // Empty object will remove all currently defined props\n // in case function rule returns a falsy value.\n styleRule.style = fnRule(data) || {};\n\n if (process.env.NODE_ENV === 'development') {\n for (var prop in styleRule.style) {\n if (typeof styleRule.style[prop] === 'function') {\n process.env.NODE_ENV !== \"production\" ? warning(false, '[JSS] Function values inside function rules are not supported.') : void 0;\n break;\n }\n }\n }\n }\n\n var fnValues = styleRule[fnValuesNs]; // If we have a fn values map, it is a rule with function values.\n\n if (fnValues) {\n for (var _prop in fnValues) {\n styleRule.prop(_prop, fnValues[_prop](data), options);\n }\n }\n }\n };\n};\n\nexport default functionPlugin;\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport { RuleList } from 'jss';\n\nvar at = '@global';\nvar atPrefix = '@global ';\n\nvar GlobalContainerRule =\n/*#__PURE__*/\nfunction () {\n function GlobalContainerRule(key, styles, options) {\n this.type = 'global';\n this.at = at;\n this.isProcessed = false;\n this.key = key;\n this.options = options;\n this.rules = new RuleList(_extends({}, options, {\n parent: this\n }));\n\n for (var selector in styles) {\n this.rules.add(selector, styles[selector]);\n }\n\n this.rules.process();\n }\n /**\n * Get a rule.\n */\n\n\n var _proto = GlobalContainerRule.prototype;\n\n _proto.getRule = function getRule(name) {\n return this.rules.get(name);\n }\n /**\n * Create and register rule, run plugins.\n */\n ;\n\n _proto.addRule = function addRule(name, style, options) {\n var rule = this.rules.add(name, style, options);\n if (rule) this.options.jss.plugins.onProcessRule(rule);\n return rule;\n }\n /**\n * Replace rule, run plugins.\n */\n ;\n\n _proto.replaceRule = function replaceRule(name, style, options) {\n var newRule = this.rules.replace(name, style, options);\n if (newRule) this.options.jss.plugins.onProcessRule(newRule);\n return newRule;\n }\n /**\n * Get index of a rule.\n */\n ;\n\n _proto.indexOf = function indexOf(rule) {\n return this.rules.indexOf(rule);\n }\n /**\n * Generates a CSS string.\n */\n ;\n\n _proto.toString = function toString(options) {\n return this.rules.toString(options);\n };\n\n return GlobalContainerRule;\n}();\n\nvar GlobalPrefixedRule =\n/*#__PURE__*/\nfunction () {\n function GlobalPrefixedRule(key, style, options) {\n this.type = 'global';\n this.at = at;\n this.isProcessed = false;\n this.key = key;\n this.options = options;\n var selector = key.substr(atPrefix.length);\n this.rule = options.jss.createRule(selector, style, _extends({}, options, {\n parent: this\n }));\n }\n\n var _proto2 = GlobalPrefixedRule.prototype;\n\n _proto2.toString = function toString(options) {\n return this.rule ? this.rule.toString(options) : '';\n };\n\n return GlobalPrefixedRule;\n}();\n\nvar separatorRegExp = /\\s*,\\s*/g;\n\nfunction addScope(selector, scope) {\n var parts = selector.split(separatorRegExp);\n var scoped = '';\n\n for (var i = 0; i < parts.length; i++) {\n scoped += scope + \" \" + parts[i].trim();\n if (parts[i + 1]) scoped += ', ';\n }\n\n return scoped;\n}\n\nfunction handleNestedGlobalContainerRule(rule, sheet) {\n var options = rule.options,\n style = rule.style;\n var rules = style ? style[at] : null;\n if (!rules) return;\n\n for (var name in rules) {\n sheet.addRule(name, rules[name], _extends({}, options, {\n selector: addScope(name, rule.selector)\n }));\n }\n\n delete style[at];\n}\n\nfunction handlePrefixedGlobalRule(rule, sheet) {\n var options = rule.options,\n style = rule.style;\n\n for (var prop in style) {\n if (prop[0] !== '@' || prop.substr(0, at.length) !== at) continue;\n var selector = addScope(prop.substr(at.length), rule.selector);\n sheet.addRule(selector, style[prop], _extends({}, options, {\n selector: selector\n }));\n delete style[prop];\n }\n}\n/**\n * Convert nested rules to separate, remove them from original styles.\n */\n\n\nfunction jssGlobal() {\n function onCreateRule(name, styles, options) {\n if (!name) return null;\n\n if (name === at) {\n return new GlobalContainerRule(name, styles, options);\n }\n\n if (name[0] === '@' && name.substr(0, atPrefix.length) === atPrefix) {\n return new GlobalPrefixedRule(name, styles, options);\n }\n\n var parent = options.parent;\n\n if (parent) {\n if (parent.type === 'global' || parent.options.parent && parent.options.parent.type === 'global') {\n options.scoped = false;\n }\n }\n\n if (!options.selector && options.scoped === false) {\n options.selector = name;\n }\n\n return null;\n }\n\n function onProcessRule(rule, sheet) {\n if (rule.type !== 'style' || !sheet) return;\n handleNestedGlobalContainerRule(rule, sheet);\n handlePrefixedGlobalRule(rule, sheet);\n }\n\n return {\n onCreateRule: onCreateRule,\n onProcessRule: onProcessRule\n };\n}\n\nexport default jssGlobal;\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport warning from 'tiny-warning';\n\nvar separatorRegExp = /\\s*,\\s*/g;\nvar parentRegExp = /&/g;\nvar refRegExp = /\\$([\\w-]+)/g;\n/**\n * Convert nested rules to separate, remove them from original styles.\n */\n\nfunction jssNested() {\n // Get a function to be used for $ref replacement.\n function getReplaceRef(container, sheet) {\n return function (match, key) {\n var rule = container.getRule(key) || sheet && sheet.getRule(key);\n\n if (rule) {\n return rule.selector;\n }\n\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] Could not find the referenced rule \\\"\" + key + \"\\\" in \\\"\" + (container.options.meta || container.toString()) + \"\\\".\") : void 0;\n return key;\n };\n }\n\n function replaceParentRefs(nestedProp, parentProp) {\n var parentSelectors = parentProp.split(separatorRegExp);\n var nestedSelectors = nestedProp.split(separatorRegExp);\n var result = '';\n\n for (var i = 0; i < parentSelectors.length; i++) {\n var parent = parentSelectors[i];\n\n for (var j = 0; j < nestedSelectors.length; j++) {\n var nested = nestedSelectors[j];\n if (result) result += ', '; // Replace all & by the parent or prefix & with the parent.\n\n result += nested.indexOf('&') !== -1 ? nested.replace(parentRegExp, parent) : parent + \" \" + nested;\n }\n }\n\n return result;\n }\n\n function getOptions(rule, container, prevOptions) {\n // Options has been already created, now we only increase index.\n if (prevOptions) return _extends({}, prevOptions, {\n index: prevOptions.index + 1\n });\n var nestingLevel = rule.options.nestingLevel;\n nestingLevel = nestingLevel === undefined ? 1 : nestingLevel + 1;\n\n var options = _extends({}, rule.options, {\n nestingLevel: nestingLevel,\n index: container.indexOf(rule) + 1 // We don't need the parent name to be set options for chlid.\n\n });\n\n delete options.name;\n return options;\n }\n\n function onProcessStyle(style, rule, sheet) {\n if (rule.type !== 'style') return style;\n var styleRule = rule;\n var container = styleRule.options.parent;\n var options;\n var replaceRef;\n\n for (var prop in style) {\n var isNested = prop.indexOf('&') !== -1;\n var isNestedConditional = prop[0] === '@';\n if (!isNested && !isNestedConditional) continue;\n options = getOptions(styleRule, container, options);\n\n if (isNested) {\n var selector = replaceParentRefs(prop, styleRule.selector); // Lazily create the ref replacer function just once for\n // all nested rules within the sheet.\n\n if (!replaceRef) replaceRef = getReplaceRef(container, sheet); // Replace all $refs.\n\n selector = selector.replace(refRegExp, replaceRef);\n var name = styleRule.key + \"-\" + prop;\n\n if ('replaceRule' in container) {\n // for backward compatibility\n container.replaceRule(name, style[prop], _extends({}, options, {\n selector: selector\n }));\n } else {\n container.addRule(name, style[prop], _extends({}, options, {\n selector: selector\n }));\n }\n } else if (isNestedConditional) {\n // Place conditional right after the parent rule to ensure right ordering.\n container.addRule(prop, {}, options).addRule(styleRule.key, style[prop], {\n selector: styleRule.selector\n });\n }\n\n delete style[prop];\n }\n\n return style;\n }\n\n return {\n onProcessStyle: onProcessStyle\n };\n}\n\nexport default jssNested;\n","/* eslint-disable no-var, prefer-template */\nvar uppercasePattern = /[A-Z]/g\nvar msPattern = /^ms-/\nvar cache = {}\n\nfunction toHyphenLower(match) {\n return '-' + match.toLowerCase()\n}\n\nfunction hyphenateStyleName(name) {\n if (cache.hasOwnProperty(name)) {\n return cache[name]\n }\n\n var hName = name.replace(uppercasePattern, toHyphenLower)\n return (cache[name] = msPattern.test(hName) ? '-' + hName : hName)\n}\n\nexport default hyphenateStyleName\n","import hyphenate from 'hyphenate-style-name';\n\n/**\n * Convert camel cased property names to dash separated.\n */\n\nfunction convertCase(style) {\n var converted = {};\n\n for (var prop in style) {\n var key = prop.indexOf('--') === 0 ? prop : hyphenate(prop);\n converted[key] = style[prop];\n }\n\n if (style.fallbacks) {\n if (Array.isArray(style.fallbacks)) converted.fallbacks = style.fallbacks.map(convertCase);else converted.fallbacks = convertCase(style.fallbacks);\n }\n\n return converted;\n}\n/**\n * Allow camel cased property names by converting them back to dasherized.\n */\n\n\nfunction camelCase() {\n function onProcessStyle(style) {\n if (Array.isArray(style)) {\n // Handle rules like @font-face, which can have multiple styles in an array\n for (var index = 0; index < style.length; index++) {\n style[index] = convertCase(style[index]);\n }\n\n return style;\n }\n\n return convertCase(style);\n }\n\n function onChangeValue(value, prop, rule) {\n if (prop.indexOf('--') === 0) {\n return value;\n }\n\n var hyphenatedProp = hyphenate(prop); // There was no camel case in place\n\n if (prop === hyphenatedProp) return value;\n rule.prop(hyphenatedProp, value); // Core will ignore that property value we set the proper one above.\n\n return null;\n }\n\n return {\n onProcessStyle: onProcessStyle,\n onChangeValue: onChangeValue\n };\n}\n\nexport default camelCase;\n","import { hasCSSTOMSupport } from 'jss';\n\nvar px = hasCSSTOMSupport && CSS ? CSS.px : 'px';\nvar ms = hasCSSTOMSupport && CSS ? CSS.ms : 'ms';\nvar percent = hasCSSTOMSupport && CSS ? CSS.percent : '%';\n/**\n * Generated jss-plugin-default-unit CSS property units\n */\n\nvar defaultUnits = {\n // Animation properties\n 'animation-delay': ms,\n 'animation-duration': ms,\n // Background properties\n 'background-position': px,\n 'background-position-x': px,\n 'background-position-y': px,\n 'background-size': px,\n // Border Properties\n border: px,\n 'border-bottom': px,\n 'border-bottom-left-radius': px,\n 'border-bottom-right-radius': px,\n 'border-bottom-width': px,\n 'border-left': px,\n 'border-left-width': px,\n 'border-radius': px,\n 'border-right': px,\n 'border-right-width': px,\n 'border-top': px,\n 'border-top-left-radius': px,\n 'border-top-right-radius': px,\n 'border-top-width': px,\n 'border-width': px,\n 'border-block': px,\n 'border-block-end': px,\n 'border-block-end-width': px,\n 'border-block-start': px,\n 'border-block-start-width': px,\n 'border-block-width': px,\n 'border-inline': px,\n 'border-inline-end': px,\n 'border-inline-end-width': px,\n 'border-inline-start': px,\n 'border-inline-start-width': px,\n 'border-inline-width': px,\n 'border-start-start-radius': px,\n 'border-start-end-radius': px,\n 'border-end-start-radius': px,\n 'border-end-end-radius': px,\n // Margin properties\n margin: px,\n 'margin-bottom': px,\n 'margin-left': px,\n 'margin-right': px,\n 'margin-top': px,\n 'margin-block': px,\n 'margin-block-end': px,\n 'margin-block-start': px,\n 'margin-inline': px,\n 'margin-inline-end': px,\n 'margin-inline-start': px,\n // Padding properties\n padding: px,\n 'padding-bottom': px,\n 'padding-left': px,\n 'padding-right': px,\n 'padding-top': px,\n 'padding-block': px,\n 'padding-block-end': px,\n 'padding-block-start': px,\n 'padding-inline': px,\n 'padding-inline-end': px,\n 'padding-inline-start': px,\n // Mask properties\n 'mask-position-x': px,\n 'mask-position-y': px,\n 'mask-size': px,\n // Width and height properties\n height: px,\n width: px,\n 'min-height': px,\n 'max-height': px,\n 'min-width': px,\n 'max-width': px,\n // Position properties\n bottom: px,\n left: px,\n top: px,\n right: px,\n inset: px,\n 'inset-block': px,\n 'inset-block-end': px,\n 'inset-block-start': px,\n 'inset-inline': px,\n 'inset-inline-end': px,\n 'inset-inline-start': px,\n // Shadow properties\n 'box-shadow': px,\n 'text-shadow': px,\n // Column properties\n 'column-gap': px,\n 'column-rule': px,\n 'column-rule-width': px,\n 'column-width': px,\n // Font and text properties\n 'font-size': px,\n 'font-size-delta': px,\n 'letter-spacing': px,\n 'text-decoration-thickness': px,\n 'text-indent': px,\n 'text-stroke': px,\n 'text-stroke-width': px,\n 'word-spacing': px,\n // Motion properties\n motion: px,\n 'motion-offset': px,\n // Outline properties\n outline: px,\n 'outline-offset': px,\n 'outline-width': px,\n // Perspective properties\n perspective: px,\n 'perspective-origin-x': percent,\n 'perspective-origin-y': percent,\n // Transform properties\n 'transform-origin': percent,\n 'transform-origin-x': percent,\n 'transform-origin-y': percent,\n 'transform-origin-z': percent,\n // Transition properties\n 'transition-delay': ms,\n 'transition-duration': ms,\n // Alignment properties\n 'vertical-align': px,\n 'flex-basis': px,\n // Some random properties\n 'shape-margin': px,\n size: px,\n gap: px,\n // Grid properties\n grid: px,\n 'grid-gap': px,\n 'row-gap': px,\n 'grid-row-gap': px,\n 'grid-column-gap': px,\n 'grid-template-rows': px,\n 'grid-template-columns': px,\n 'grid-auto-rows': px,\n 'grid-auto-columns': px,\n // Not existing properties.\n // Used to avoid issues with jss-plugin-expand integration.\n 'box-shadow-x': px,\n 'box-shadow-y': px,\n 'box-shadow-blur': px,\n 'box-shadow-spread': px,\n 'font-line-height': px,\n 'text-shadow-x': px,\n 'text-shadow-y': px,\n 'text-shadow-blur': px\n};\n\n/**\n * Clones the object and adds a camel cased property version.\n */\n\nfunction addCamelCasedVersion(obj) {\n var regExp = /(-[a-z])/g;\n\n var replace = function replace(str) {\n return str[1].toUpperCase();\n };\n\n var newObj = {};\n\n for (var key in obj) {\n newObj[key] = obj[key];\n newObj[key.replace(regExp, replace)] = obj[key];\n }\n\n return newObj;\n}\n\nvar units = addCamelCasedVersion(defaultUnits);\n/**\n * Recursive deep style passing function\n */\n\nfunction iterate(prop, value, options) {\n if (value == null) return value;\n\n if (Array.isArray(value)) {\n for (var i = 0; i < value.length; i++) {\n value[i] = iterate(prop, value[i], options);\n }\n } else if (typeof value === 'object') {\n if (prop === 'fallbacks') {\n for (var innerProp in value) {\n value[innerProp] = iterate(innerProp, value[innerProp], options);\n }\n } else {\n for (var _innerProp in value) {\n value[_innerProp] = iterate(prop + \"-\" + _innerProp, value[_innerProp], options);\n }\n } // eslint-disable-next-line no-restricted-globals\n\n } else if (typeof value === 'number' && isNaN(value) === false) {\n var unit = options[prop] || units[prop]; // Add the unit if available, except for the special case of 0px.\n\n if (unit && !(value === 0 && unit === px)) {\n return typeof unit === 'function' ? unit(value).toString() : \"\" + value + unit;\n }\n\n return value.toString();\n }\n\n return value;\n}\n/**\n * Add unit to numeric values.\n */\n\n\nfunction defaultUnit(options) {\n if (options === void 0) {\n options = {};\n }\n\n var camelCasedOptions = addCamelCasedVersion(options);\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n for (var prop in style) {\n style[prop] = iterate(prop, style[prop], camelCasedOptions);\n }\n\n return style;\n }\n\n function onChangeValue(value, prop) {\n return iterate(prop, value, camelCasedOptions);\n }\n\n return {\n onProcessStyle: onProcessStyle,\n onChangeValue: onChangeValue\n };\n}\n\nexport default defaultUnit;\n","import isInBrowser from 'is-in-browser';\nimport _toConsumableArray from '@babel/runtime/helpers/esm/toConsumableArray';\n\n// Export javascript style and css style vendor prefixes.\nvar js = '';\nvar css = '';\nvar vendor = '';\nvar browser = '';\nvar isTouch = isInBrowser && 'ontouchstart' in document.documentElement; // We should not do anything if required serverside.\n\nif (isInBrowser) {\n // Order matters. We need to check Webkit the last one because\n // other vendors use to add Webkit prefixes to some properties\n var jsCssMap = {\n Moz: '-moz-',\n ms: '-ms-',\n O: '-o-',\n Webkit: '-webkit-'\n };\n\n var _document$createEleme = document.createElement('p'),\n style = _document$createEleme.style;\n\n var testProp = 'Transform';\n\n for (var key in jsCssMap) {\n if (key + testProp in style) {\n js = key;\n css = jsCssMap[key];\n break;\n }\n } // Correctly detect the Edge browser.\n\n\n if (js === 'Webkit' && 'msHyphens' in style) {\n js = 'ms';\n css = jsCssMap.ms;\n browser = 'edge';\n } // Correctly detect the Safari browser.\n\n\n if (js === 'Webkit' && '-apple-trailing-word' in style) {\n vendor = 'apple';\n }\n}\n/**\n * Vendor prefix string for the current browser.\n *\n * @type {{js: String, css: String, vendor: String, browser: String}}\n * @api public\n */\n\n\nvar prefix = {\n js: js,\n css: css,\n vendor: vendor,\n browser: browser,\n isTouch: isTouch\n};\n\n/**\n * Test if a keyframe at-rule should be prefixed or not\n *\n * @param {String} vendor prefix string for the current browser.\n * @return {String}\n * @api public\n */\n\nfunction supportedKeyframes(key) {\n // Keyframes is already prefixed. e.g. key = '@-webkit-keyframes a'\n if (key[1] === '-') return key; // No need to prefix IE/Edge. Older browsers will ignore unsupported rules.\n // https://caniuse.com/#search=keyframes\n\n if (prefix.js === 'ms') return key;\n return \"@\" + prefix.css + \"keyframes\" + key.substr(10);\n}\n\n// https://caniuse.com/#search=appearance\n\nvar appearence = {\n noPrefill: ['appearance'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'appearance') return false;\n if (prefix.js === 'ms') return \"-webkit-\" + prop;\n return prefix.css + prop;\n }\n};\n\n// https://caniuse.com/#search=color-adjust\n\nvar colorAdjust = {\n noPrefill: ['color-adjust'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'color-adjust') return false;\n if (prefix.js === 'Webkit') return prefix.css + \"print-\" + prop;\n return prop;\n }\n};\n\nvar regExp = /[-\\s]+(.)?/g;\n/**\n * Replaces the letter with the capital letter\n *\n * @param {String} match\n * @param {String} c\n * @return {String}\n * @api private\n */\n\nfunction toUpper(match, c) {\n return c ? c.toUpperCase() : '';\n}\n/**\n * Convert dash separated strings to camel-cased.\n *\n * @param {String} str\n * @return {String}\n * @api private\n */\n\n\nfunction camelize(str) {\n return str.replace(regExp, toUpper);\n}\n\n/**\n * Convert dash separated strings to pascal cased.\n *\n * @param {String} str\n * @return {String}\n * @api private\n */\n\nfunction pascalize(str) {\n return camelize(\"-\" + str);\n}\n\n// but we can use a longhand property instead.\n// https://caniuse.com/#search=mask\n\nvar mask = {\n noPrefill: ['mask'],\n supportedProperty: function supportedProperty(prop, style) {\n if (!/^mask/.test(prop)) return false;\n\n if (prefix.js === 'Webkit') {\n var longhand = 'mask-image';\n\n if (camelize(longhand) in style) {\n return prop;\n }\n\n if (prefix.js + pascalize(longhand) in style) {\n return prefix.css + prop;\n }\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=text-orientation\n\nvar textOrientation = {\n noPrefill: ['text-orientation'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'text-orientation') return false;\n\n if (prefix.vendor === 'apple' && !prefix.isTouch) {\n return prefix.css + prop;\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=transform\n\nvar transform = {\n noPrefill: ['transform'],\n supportedProperty: function supportedProperty(prop, style, options) {\n if (prop !== 'transform') return false;\n\n if (options.transform) {\n return prop;\n }\n\n return prefix.css + prop;\n }\n};\n\n// https://caniuse.com/#search=transition\n\nvar transition = {\n noPrefill: ['transition'],\n supportedProperty: function supportedProperty(prop, style, options) {\n if (prop !== 'transition') return false;\n\n if (options.transition) {\n return prop;\n }\n\n return prefix.css + prop;\n }\n};\n\n// https://caniuse.com/#search=writing-mode\n\nvar writingMode = {\n noPrefill: ['writing-mode'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'writing-mode') return false;\n\n if (prefix.js === 'Webkit' || prefix.js === 'ms' && prefix.browser !== 'edge') {\n return prefix.css + prop;\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=user-select\n\nvar userSelect = {\n noPrefill: ['user-select'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'user-select') return false;\n\n if (prefix.js === 'Moz' || prefix.js === 'ms' || prefix.vendor === 'apple') {\n return prefix.css + prop;\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=multicolumn\n// https://github.com/postcss/autoprefixer/issues/491\n// https://github.com/postcss/autoprefixer/issues/177\n\nvar breakPropsOld = {\n supportedProperty: function supportedProperty(prop, style) {\n if (!/^break-/.test(prop)) return false;\n\n if (prefix.js === 'Webkit') {\n var jsProp = \"WebkitColumn\" + pascalize(prop);\n return jsProp in style ? prefix.css + \"column-\" + prop : false;\n }\n\n if (prefix.js === 'Moz') {\n var _jsProp = \"page\" + pascalize(prop);\n\n return _jsProp in style ? \"page-\" + prop : false;\n }\n\n return false;\n }\n};\n\n// See https://github.com/postcss/autoprefixer/issues/324.\n\nvar inlineLogicalOld = {\n supportedProperty: function supportedProperty(prop, style) {\n if (!/^(border|margin|padding)-inline/.test(prop)) return false;\n if (prefix.js === 'Moz') return prop;\n var newProp = prop.replace('-inline', '');\n return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false;\n }\n};\n\n// Camelization is required because we can't test using.\n// CSS syntax for e.g. in FF.\n\nvar unprefixed = {\n supportedProperty: function supportedProperty(prop, style) {\n return camelize(prop) in style ? prop : false;\n }\n};\n\nvar prefixed = {\n supportedProperty: function supportedProperty(prop, style) {\n var pascalized = pascalize(prop); // Return custom CSS variable without prefixing.\n\n if (prop[0] === '-') return prop; // Return already prefixed value without prefixing.\n\n if (prop[0] === '-' && prop[1] === '-') return prop;\n if (prefix.js + pascalized in style) return prefix.css + prop; // Try webkit fallback.\n\n if (prefix.js !== 'Webkit' && \"Webkit\" + pascalized in style) return \"-webkit-\" + prop;\n return false;\n }\n};\n\n// https://caniuse.com/#search=scroll-snap\n\nvar scrollSnap = {\n supportedProperty: function supportedProperty(prop) {\n if (prop.substring(0, 11) !== 'scroll-snap') return false;\n\n if (prefix.js === 'ms') {\n return \"\" + prefix.css + prop;\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=overscroll-behavior\n\nvar overscrollBehavior = {\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'overscroll-behavior') return false;\n\n if (prefix.js === 'ms') {\n return prefix.css + \"scroll-chaining\";\n }\n\n return prop;\n }\n};\n\nvar propMap = {\n 'flex-grow': 'flex-positive',\n 'flex-shrink': 'flex-negative',\n 'flex-basis': 'flex-preferred-size',\n 'justify-content': 'flex-pack',\n order: 'flex-order',\n 'align-items': 'flex-align',\n 'align-content': 'flex-line-pack' // 'align-self' is handled by 'align-self' plugin.\n\n}; // Support old flex spec from 2012.\n\nvar flex2012 = {\n supportedProperty: function supportedProperty(prop, style) {\n var newProp = propMap[prop];\n if (!newProp) return false;\n return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false;\n }\n};\n\nvar propMap$1 = {\n flex: 'box-flex',\n 'flex-grow': 'box-flex',\n 'flex-direction': ['box-orient', 'box-direction'],\n order: 'box-ordinal-group',\n 'align-items': 'box-align',\n 'flex-flow': ['box-orient', 'box-direction'],\n 'justify-content': 'box-pack'\n};\nvar propKeys = Object.keys(propMap$1);\n\nvar prefixCss = function prefixCss(p) {\n return prefix.css + p;\n}; // Support old flex spec from 2009.\n\n\nvar flex2009 = {\n supportedProperty: function supportedProperty(prop, style, _ref) {\n var multiple = _ref.multiple;\n\n if (propKeys.indexOf(prop) > -1) {\n var newProp = propMap$1[prop];\n\n if (!Array.isArray(newProp)) {\n return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false;\n }\n\n if (!multiple) return false;\n\n for (var i = 0; i < newProp.length; i++) {\n if (!(prefix.js + pascalize(newProp[0]) in style)) {\n return false;\n }\n }\n\n return newProp.map(prefixCss);\n }\n\n return false;\n }\n};\n\n// plugins = [\n// ...plugins,\n// breakPropsOld,\n// inlineLogicalOld,\n// unprefixed,\n// prefixed,\n// scrollSnap,\n// flex2012,\n// flex2009\n// ]\n// Plugins without 'noPrefill' value, going last.\n// 'flex-*' plugins should be at the bottom.\n// 'flex2009' going after 'flex2012'.\n// 'prefixed' going after 'unprefixed'\n\nvar plugins = [appearence, colorAdjust, mask, textOrientation, transform, transition, writingMode, userSelect, breakPropsOld, inlineLogicalOld, unprefixed, prefixed, scrollSnap, overscrollBehavior, flex2012, flex2009];\nvar propertyDetectors = plugins.filter(function (p) {\n return p.supportedProperty;\n}).map(function (p) {\n return p.supportedProperty;\n});\nvar noPrefill = plugins.filter(function (p) {\n return p.noPrefill;\n}).reduce(function (a, p) {\n a.push.apply(a, _toConsumableArray(p.noPrefill));\n return a;\n}, []);\n\nvar el;\nvar cache = {};\n\nif (isInBrowser) {\n el = document.createElement('p'); // We test every property on vendor prefix requirement.\n // Once tested, result is cached. It gives us up to 70% perf boost.\n // http://jsperf.com/element-style-object-access-vs-plain-object\n //\n // Prefill cache with known css properties to reduce amount of\n // properties we need to feature test at runtime.\n // http://davidwalsh.name/vendor-prefix\n\n var computed = window.getComputedStyle(document.documentElement, '');\n\n for (var key$1 in computed) {\n // eslint-disable-next-line no-restricted-globals\n if (!isNaN(key$1)) cache[computed[key$1]] = computed[key$1];\n } // Properties that cannot be correctly detected using the\n // cache prefill method.\n\n\n noPrefill.forEach(function (x) {\n return delete cache[x];\n });\n}\n/**\n * Test if a property is supported, returns supported property with vendor\n * prefix if required. Returns `false` if not supported.\n *\n * @param {String} prop dash separated\n * @param {Object} [options]\n * @return {String|Boolean}\n * @api public\n */\n\n\nfunction supportedProperty(prop, options) {\n if (options === void 0) {\n options = {};\n }\n\n // For server-side rendering.\n if (!el) return prop; // Remove cache for benchmark tests or return property from the cache.\n\n if (process.env.NODE_ENV !== 'benchmark' && cache[prop] != null) {\n return cache[prop];\n } // Check if 'transition' or 'transform' natively supported in browser.\n\n\n if (prop === 'transition' || prop === 'transform') {\n options[prop] = prop in el.style;\n } // Find a plugin for current prefix property.\n\n\n for (var i = 0; i < propertyDetectors.length; i++) {\n cache[prop] = propertyDetectors[i](prop, el.style, options); // Break loop, if value found.\n\n if (cache[prop]) break;\n } // Reset styles for current property.\n // Firefox can even throw an error for invalid properties, e.g., \"0\".\n\n\n try {\n el.style[prop] = '';\n } catch (err) {\n return false;\n }\n\n return cache[prop];\n}\n\nvar cache$1 = {};\nvar transitionProperties = {\n transition: 1,\n 'transition-property': 1,\n '-webkit-transition': 1,\n '-webkit-transition-property': 1\n};\nvar transPropsRegExp = /(^\\s*[\\w-]+)|, (\\s*[\\w-]+)(?![^()]*\\))/g;\nvar el$1;\n/**\n * Returns prefixed value transition/transform if needed.\n *\n * @param {String} match\n * @param {String} p1\n * @param {String} p2\n * @return {String}\n * @api private\n */\n\nfunction prefixTransitionCallback(match, p1, p2) {\n if (p1 === 'var') return 'var';\n if (p1 === 'all') return 'all';\n if (p2 === 'all') return ', all';\n var prefixedValue = p1 ? supportedProperty(p1) : \", \" + supportedProperty(p2);\n if (!prefixedValue) return p1 || p2;\n return prefixedValue;\n}\n\nif (isInBrowser) el$1 = document.createElement('p');\n/**\n * Returns prefixed value if needed. Returns `false` if value is not supported.\n *\n * @param {String} property\n * @param {String} value\n * @return {String|Boolean}\n * @api public\n */\n\nfunction supportedValue(property, value) {\n // For server-side rendering.\n var prefixedValue = value;\n if (!el$1 || property === 'content') return value; // It is a string or a number as a string like '1'.\n // We want only prefixable values here.\n // eslint-disable-next-line no-restricted-globals\n\n if (typeof prefixedValue !== 'string' || !isNaN(parseInt(prefixedValue, 10))) {\n return prefixedValue;\n } // Create cache key for current value.\n\n\n var cacheKey = property + prefixedValue; // Remove cache for benchmark tests or return value from cache.\n\n if (process.env.NODE_ENV !== 'benchmark' && cache$1[cacheKey] != null) {\n return cache$1[cacheKey];\n } // IE can even throw an error in some cases, for e.g. style.content = 'bar'.\n\n\n try {\n // Test value as it is.\n el$1.style[property] = prefixedValue;\n } catch (err) {\n // Return false if value not supported.\n cache$1[cacheKey] = false;\n return false;\n } // If 'transition' or 'transition-property' property.\n\n\n if (transitionProperties[property]) {\n prefixedValue = prefixedValue.replace(transPropsRegExp, prefixTransitionCallback);\n } else if (el$1.style[property] === '') {\n // Value with a vendor prefix.\n prefixedValue = prefix.css + prefixedValue; // Hardcode test to convert \"flex\" to \"-ms-flexbox\" for IE10.\n\n if (prefixedValue === '-ms-flex') el$1.style[property] = '-ms-flexbox'; // Test prefixed value.\n\n el$1.style[property] = prefixedValue; // Return false if value not supported.\n\n if (el$1.style[property] === '') {\n cache$1[cacheKey] = false;\n return false;\n }\n } // Reset styles for current property.\n\n\n el$1.style[property] = ''; // Write current value to cache.\n\n cache$1[cacheKey] = prefixedValue;\n return cache$1[cacheKey];\n}\n\nexport { prefix, supportedKeyframes, supportedProperty, supportedValue };\n","import { supportedKeyframes, supportedValue, supportedProperty } from 'css-vendor';\nimport { toCssValue } from 'jss';\n\n/**\n * Add vendor prefix to a property name when needed.\n */\n\nfunction jssVendorPrefixer() {\n function onProcessRule(rule) {\n if (rule.type === 'keyframes') {\n var atRule = rule;\n atRule.at = supportedKeyframes(atRule.at);\n }\n }\n\n function prefixStyle(style) {\n for (var prop in style) {\n var value = style[prop];\n\n if (prop === 'fallbacks' && Array.isArray(value)) {\n style[prop] = value.map(prefixStyle);\n continue;\n }\n\n var changeProp = false;\n var supportedProp = supportedProperty(prop);\n if (supportedProp && supportedProp !== prop) changeProp = true;\n var changeValue = false;\n var supportedValue$1 = supportedValue(supportedProp, toCssValue(value));\n if (supportedValue$1 && supportedValue$1 !== value) changeValue = true;\n\n if (changeProp || changeValue) {\n if (changeProp) delete style[prop];\n style[supportedProp || prop] = supportedValue$1 || value;\n }\n }\n\n return style;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n return prefixStyle(style);\n }\n\n function onChangeValue(value, prop) {\n return supportedValue(prop, toCssValue(value)) || value;\n }\n\n return {\n onProcessRule: onProcessRule,\n onProcessStyle: onProcessStyle,\n onChangeValue: onChangeValue\n };\n}\n\nexport default jssVendorPrefixer;\n","/**\n * Sort props by length.\n */\nfunction jssPropsSort() {\n var sort = function sort(prop0, prop1) {\n if (prop0.length === prop1.length) {\n return prop0 > prop1 ? 1 : -1;\n }\n\n return prop0.length - prop1.length;\n };\n\n return {\n onProcessStyle: function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n\n for (var i = 0; i < props.length; i++) {\n newStyle[props[i]] = style[props[i]];\n }\n\n return newStyle;\n }\n };\n}\n\nexport default jssPropsSort;\n","import functions from 'jss-plugin-rule-value-function';\nimport global from 'jss-plugin-global';\nimport nested from 'jss-plugin-nested';\nimport camelCase from 'jss-plugin-camel-case';\nimport defaultUnit from 'jss-plugin-default-unit';\nimport vendorPrefixer from 'jss-plugin-vendor-prefixer';\nimport propsSort from 'jss-plugin-props-sort'; // Subset of jss-preset-default with only the plugins the Material-UI components are using.\n\nexport default function jssPreset() {\n return {\n plugins: [functions(), global(), nested(), camelCase(), defaultUnit(), // Disable the vendor prefixer server-side, it does nothing.\n // This way, we can get a performance boost.\n // In the documentation, we are using `autoprefixer` to solve this problem.\n typeof window === 'undefined' ? null : vendorPrefixer(), propsSort()]\n };\n}","// Used https://github.com/thinkloop/multi-key-cache as inspiration\nvar multiKeyStore = {\n set: function set(cache, key1, key2, value) {\n var subCache = cache.get(key1);\n\n if (!subCache) {\n subCache = new Map();\n cache.set(key1, subCache);\n }\n\n subCache.set(key2, value);\n },\n get: function get(cache, key1, key2) {\n var subCache = cache.get(key1);\n return subCache ? subCache.get(key2) : undefined;\n },\n delete: function _delete(cache, key1, key2) {\n var subCache = cache.get(key1);\n subCache.delete(key2);\n }\n};\nexport default multiKeyStore;","/* eslint-disable import/prefer-default-export */\n// Global index counter to preserve source order.\n// We create the style sheet during the creation of the component,\n// children are handled after the parents, so the order of style elements would be parent->child.\n// It is a problem though when a parent passes a className\n// which needs to override any child's styles.\n// StyleSheet of the child has a higher specificity, because of the source order.\n// So our solution is to render sheets them in the reverse order child->sheet, so\n// that parent has a higher specificity.\nvar indexCounter = -1e9;\nexport function increment() {\n indexCounter += 1;\n\n if (process.env.NODE_ENV !== 'production') {\n if (indexCounter >= 0) {\n console.warn(['Material-UI: You might have a memory leak.', 'The indexCounter is not supposed to grow that much.'].join('\\n'));\n }\n }\n\n return indexCounter;\n}","// We use the same empty object to ref count the styles that don't need a theme object.\nvar noopTheme = {};\nexport default noopTheme;","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport React from 'react';\nimport { getDynamicStyles } from 'jss';\nimport mergeClasses from '../mergeClasses';\nimport multiKeyStore from './multiKeyStore';\nimport useTheme from '../useTheme';\nimport { StylesContext } from '../StylesProvider';\nimport { increment } from './indexCounter';\nimport getStylesCreator from '../getStylesCreator';\nimport noopTheme from '../getStylesCreator/noopTheme';\n\nfunction getClasses(_ref, classes, Component) {\n var state = _ref.state,\n stylesOptions = _ref.stylesOptions;\n\n if (stylesOptions.disableGeneration) {\n return classes || {};\n }\n\n if (!state.cacheClasses) {\n state.cacheClasses = {\n // Cache for the finalized classes value.\n value: null,\n // Cache for the last used classes prop pointer.\n lastProp: null,\n // Cache for the last used rendered classes pointer.\n lastJSS: {}\n };\n } // Tracks if either the rendered classes or classes prop has changed,\n // requiring the generation of a new finalized classes object.\n\n\n var generate = false;\n\n if (state.classes !== state.cacheClasses.lastJSS) {\n state.cacheClasses.lastJSS = state.classes;\n generate = true;\n }\n\n if (classes !== state.cacheClasses.lastProp) {\n state.cacheClasses.lastProp = classes;\n generate = true;\n }\n\n if (generate) {\n state.cacheClasses.value = mergeClasses({\n baseClasses: state.cacheClasses.lastJSS,\n newClasses: classes,\n Component: Component\n });\n }\n\n return state.cacheClasses.value;\n}\n\nfunction attach(_ref2, props) {\n var state = _ref2.state,\n theme = _ref2.theme,\n stylesOptions = _ref2.stylesOptions,\n stylesCreator = _ref2.stylesCreator,\n name = _ref2.name;\n\n if (stylesOptions.disableGeneration) {\n return;\n }\n\n var sheetManager = multiKeyStore.get(stylesOptions.sheetsManager, stylesCreator, theme);\n\n if (!sheetManager) {\n sheetManager = {\n refs: 0,\n staticSheet: null,\n dynamicStyles: null\n };\n multiKeyStore.set(stylesOptions.sheetsManager, stylesCreator, theme, sheetManager);\n }\n\n var options = _extends({}, stylesCreator.options, stylesOptions, {\n theme: theme,\n flip: typeof stylesOptions.flip === 'boolean' ? stylesOptions.flip : theme.direction === 'rtl'\n });\n\n options.generateId = options.serverGenerateClassName || options.generateClassName;\n var sheetsRegistry = stylesOptions.sheetsRegistry;\n\n if (sheetManager.refs === 0) {\n var staticSheet;\n\n if (stylesOptions.sheetsCache) {\n staticSheet = multiKeyStore.get(stylesOptions.sheetsCache, stylesCreator, theme);\n }\n\n var styles = stylesCreator.create(theme, name);\n\n if (!staticSheet) {\n staticSheet = stylesOptions.jss.createStyleSheet(styles, _extends({\n link: false\n }, options));\n staticSheet.attach();\n\n if (stylesOptions.sheetsCache) {\n multiKeyStore.set(stylesOptions.sheetsCache, stylesCreator, theme, staticSheet);\n }\n }\n\n if (sheetsRegistry) {\n sheetsRegistry.add(staticSheet);\n }\n\n sheetManager.staticSheet = staticSheet;\n sheetManager.dynamicStyles = getDynamicStyles(styles);\n }\n\n if (sheetManager.dynamicStyles) {\n var dynamicSheet = stylesOptions.jss.createStyleSheet(sheetManager.dynamicStyles, _extends({\n link: true\n }, options));\n dynamicSheet.update(props);\n dynamicSheet.attach();\n state.dynamicSheet = dynamicSheet;\n state.classes = mergeClasses({\n baseClasses: sheetManager.staticSheet.classes,\n newClasses: dynamicSheet.classes\n });\n\n if (sheetsRegistry) {\n sheetsRegistry.add(dynamicSheet);\n }\n } else {\n state.classes = sheetManager.staticSheet.classes;\n }\n\n sheetManager.refs += 1;\n}\n\nfunction update(_ref3, props) {\n var state = _ref3.state;\n\n if (state.dynamicSheet) {\n state.dynamicSheet.update(props);\n }\n}\n\nfunction detach(_ref4) {\n var state = _ref4.state,\n theme = _ref4.theme,\n stylesOptions = _ref4.stylesOptions,\n stylesCreator = _ref4.stylesCreator;\n\n if (stylesOptions.disableGeneration) {\n return;\n }\n\n var sheetManager = multiKeyStore.get(stylesOptions.sheetsManager, stylesCreator, theme);\n sheetManager.refs -= 1;\n var sheetsRegistry = stylesOptions.sheetsRegistry;\n\n if (sheetManager.refs === 0) {\n multiKeyStore.delete(stylesOptions.sheetsManager, stylesCreator, theme);\n stylesOptions.jss.removeStyleSheet(sheetManager.staticSheet);\n\n if (sheetsRegistry) {\n sheetsRegistry.remove(sheetManager.staticSheet);\n }\n }\n\n if (state.dynamicSheet) {\n stylesOptions.jss.removeStyleSheet(state.dynamicSheet);\n\n if (sheetsRegistry) {\n sheetsRegistry.remove(state.dynamicSheet);\n }\n }\n}\n\nfunction useSynchronousEffect(func, values) {\n var key = React.useRef([]);\n var output; // Store \"generation\" key. Just returns a new object every time\n\n var currentKey = React.useMemo(function () {\n return {};\n }, values); // eslint-disable-line react-hooks/exhaustive-deps\n // \"the first render\", or \"memo dropped the value\"\n\n if (key.current !== currentKey) {\n key.current = currentKey;\n output = func();\n }\n\n React.useEffect(function () {\n return function () {\n if (output) {\n output();\n }\n };\n }, [currentKey] // eslint-disable-line react-hooks/exhaustive-deps\n );\n}\n\nexport default function makeStyles(stylesOrCreator) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var name = options.name,\n classNamePrefixOption = options.classNamePrefix,\n Component = options.Component,\n _options$defaultTheme = options.defaultTheme,\n defaultTheme = _options$defaultTheme === void 0 ? noopTheme : _options$defaultTheme,\n stylesOptions2 = _objectWithoutProperties(options, [\"name\", \"classNamePrefix\", \"Component\", \"defaultTheme\"]);\n\n var stylesCreator = getStylesCreator(stylesOrCreator);\n var classNamePrefix = name || classNamePrefixOption || 'makeStyles';\n stylesCreator.options = {\n index: increment(),\n name: name,\n meta: classNamePrefix,\n classNamePrefix: classNamePrefix\n };\n\n var useStyles = function useStyles() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var theme = useTheme() || defaultTheme;\n\n var stylesOptions = _extends({}, React.useContext(StylesContext), stylesOptions2);\n\n var instance = React.useRef();\n var shouldUpdate = React.useRef();\n useSynchronousEffect(function () {\n var current = {\n name: name,\n state: {},\n stylesCreator: stylesCreator,\n stylesOptions: stylesOptions,\n theme: theme\n };\n attach(current, props);\n shouldUpdate.current = false;\n instance.current = current;\n return function () {\n detach(current);\n };\n }, [theme, stylesCreator]);\n React.useEffect(function () {\n if (shouldUpdate.current) {\n update(instance.current, props);\n }\n\n shouldUpdate.current = true;\n });\n var classes = getClasses(instance.current, props.classes, Component);\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue(classes);\n }\n\n return classes;\n };\n\n return useStyles;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport { deepmerge } from '@material-ui/utils';\nimport noopTheme from './noopTheme';\nexport default function getStylesCreator(stylesOrCreator) {\n var themingEnabled = typeof stylesOrCreator === 'function';\n\n if (process.env.NODE_ENV !== 'production') {\n if (_typeof(stylesOrCreator) !== 'object' && !themingEnabled) {\n console.error(['Material-UI: The `styles` argument provided is invalid.', 'You need to provide a function generating the styles or a styles object.'].join('\\n'));\n }\n }\n\n return {\n create: function create(theme, name) {\n var styles;\n\n try {\n styles = themingEnabled ? stylesOrCreator(theme) : stylesOrCreator;\n } catch (err) {\n if (process.env.NODE_ENV !== 'production') {\n if (themingEnabled === true && theme === noopTheme) {\n // TODO: prepend error message/name instead\n console.error(['Material-UI: The `styles` argument provided is invalid.', 'You are providing a function without a theme in the context.', 'One of the parent elements needs to use a ThemeProvider.'].join('\\n'));\n }\n }\n\n throw err;\n }\n\n if (!name || !theme.overrides || !theme.overrides[name]) {\n return styles;\n }\n\n var overrides = theme.overrides[name];\n\n var stylesWithOverrides = _extends({}, styles);\n\n Object.keys(overrides).forEach(function (key) {\n if (process.env.NODE_ENV !== 'production') {\n if (!stylesWithOverrides[key]) {\n console.warn(['Material-UI: You are trying to override a style that does not exist.', \"Fix the `\".concat(key, \"` key of `theme.overrides.\").concat(name, \"`.\")].join('\\n'));\n }\n }\n\n stylesWithOverrides[key] = deepmerge(stylesWithOverrides[key], overrides[key]);\n });\n return stylesWithOverrides;\n },\n options: {}\n };\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { getDisplayName } from '@material-ui/utils';\nexport default function mergeClasses() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var baseClasses = options.baseClasses,\n newClasses = options.newClasses,\n Component = options.Component;\n\n if (!newClasses) {\n return baseClasses;\n }\n\n var nextClasses = _extends({}, baseClasses);\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof newClasses === 'string') {\n console.error([\"Material-UI: The value `\".concat(newClasses, \"` \") + \"provided to the classes prop of \".concat(getDisplayName(Component), \" is incorrect.\"), 'You might want to use the className prop instead.'].join('\\n'));\n return baseClasses;\n }\n }\n\n Object.keys(newClasses).forEach(function (key) {\n if (process.env.NODE_ENV !== 'production') {\n if (!baseClasses[key] && newClasses[key]) {\n console.error([\"Material-UI: The key `\".concat(key, \"` \") + \"provided to the classes prop is not implemented in \".concat(getDisplayName(Component), \".\"), \"You can only override one of the following: \".concat(Object.keys(baseClasses).join(','), \".\")].join('\\n'));\n }\n\n if (newClasses[key] && typeof newClasses[key] !== 'string') {\n console.error([\"Material-UI: The key `\".concat(key, \"` \") + \"provided to the classes prop is not valid for \".concat(getDisplayName(Component), \".\"), \"You need to provide a non empty string instead of: \".concat(newClasses[key], \".\")].join('\\n'));\n }\n }\n\n if (newClasses[key]) {\n nextClasses[key] = \"\".concat(baseClasses[key], \" \").concat(newClasses[key]);\n }\n });\n return nextClasses;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport React from 'react';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport { chainPropTypes, getDisplayName } from '@material-ui/utils';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport makeStyles from '../makeStyles';\n\nfunction omit(input, fields) {\n var output = {};\n Object.keys(input).forEach(function (prop) {\n if (fields.indexOf(prop) === -1) {\n output[prop] = input[prop];\n }\n });\n return output;\n} // styled-components's API removes the mapping between components and styles.\n// Using components as a low-level styling construct can be simpler.\n\n\nexport default function styled(Component) {\n var componentCreator = function componentCreator(style) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var name = options.name,\n stylesOptions = _objectWithoutProperties(options, [\"name\"]);\n\n if (process.env.NODE_ENV !== 'production' && Component === undefined) {\n throw new Error(['You are calling styled(Component)(style) with an undefined component.', 'You may have forgotten to import it.'].join('\\n'));\n }\n\n var classNamePrefix = name;\n\n if (process.env.NODE_ENV !== 'production') {\n if (!name) {\n // Provide a better DX outside production.\n var displayName = getDisplayName(Component);\n\n if (displayName !== undefined) {\n classNamePrefix = displayName;\n }\n }\n }\n\n var stylesOrCreator = typeof style === 'function' ? function (theme) {\n return {\n root: function root(props) {\n return style(_extends({\n theme: theme\n }, props));\n }\n };\n } : {\n root: style\n };\n var useStyles = makeStyles(stylesOrCreator, _extends({\n Component: Component,\n name: name || Component.displayName,\n classNamePrefix: classNamePrefix\n }, stylesOptions));\n var filterProps;\n var propTypes = {};\n\n if (style.filterProps) {\n filterProps = style.filterProps;\n delete style.filterProps;\n }\n /* eslint-disable react/forbid-foreign-prop-types */\n\n\n if (style.propTypes) {\n propTypes = style.propTypes;\n delete style.propTypes;\n }\n /* eslint-enable react/forbid-foreign-prop-types */\n\n\n var StyledComponent = /*#__PURE__*/React.forwardRef(function StyledComponent(props, ref) {\n var children = props.children,\n classNameProp = props.className,\n clone = props.clone,\n ComponentProp = props.component,\n other = _objectWithoutProperties(props, [\"children\", \"className\", \"clone\", \"component\"]);\n\n var classes = useStyles(props);\n var className = clsx(classes.root, classNameProp);\n var spread = other;\n\n if (filterProps) {\n spread = omit(spread, filterProps);\n }\n\n if (clone) {\n return /*#__PURE__*/React.cloneElement(children, _extends({\n className: clsx(children.props.className, className)\n }, spread));\n }\n\n if (typeof children === 'function') {\n return children(_extends({\n className: className\n }, spread));\n }\n\n var FinalComponent = ComponentProp || Component;\n return /*#__PURE__*/React.createElement(FinalComponent, _extends({\n ref: ref,\n className: className\n }, spread), children);\n });\n process.env.NODE_ENV !== \"production\" ? StyledComponent.propTypes = _extends({\n /**\n * A render function or node.\n */\n children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the component will recycle it's children HTML element.\n * It's using `React.cloneElement` internally.\n *\n * This prop will be deprecated and removed in v5\n */\n clone: chainPropTypes(PropTypes.bool, function (props) {\n if (props.clone && props.component) {\n return new Error('You can not use the clone and component prop at the same time.');\n }\n\n return null;\n }),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType\n }, propTypes) : void 0;\n\n if (process.env.NODE_ENV !== 'production') {\n StyledComponent.displayName = \"Styled(\".concat(classNamePrefix, \")\");\n }\n\n hoistNonReactStatics(StyledComponent, Component);\n return StyledComponent;\n };\n\n return componentCreator;\n}","import React from 'react';\nvar ThemeContext = React.createContext(null);\n\nif (process.env.NODE_ENV !== 'production') {\n ThemeContext.displayName = 'ThemeContext';\n}\n\nexport default ThemeContext;","import React from 'react';\nimport ThemeContext from './ThemeContext';\nexport default function useTheme() {\n var theme = React.useContext(ThemeContext);\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue(theme);\n }\n\n return theme;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport { chainPropTypes, getDisplayName } from '@material-ui/utils';\nimport makeStyles from '../makeStyles';\nimport getThemeProps from '../getThemeProps';\nimport useTheme from '../useTheme'; // Link a style sheet with a component.\n// It does not modify the component passed to it;\n// instead, it returns a new component, with a `classes` property.\n\nvar withStyles = function withStyles(stylesOrCreator) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return function (Component) {\n var defaultTheme = options.defaultTheme,\n _options$withTheme = options.withTheme,\n withTheme = _options$withTheme === void 0 ? false : _options$withTheme,\n name = options.name,\n stylesOptions = _objectWithoutProperties(options, [\"defaultTheme\", \"withTheme\", \"name\"]);\n\n if (process.env.NODE_ENV !== 'production') {\n if (Component === undefined) {\n throw new Error(['You are calling withStyles(styles)(Component) with an undefined component.', 'You may have forgotten to import it.'].join('\\n'));\n }\n }\n\n var classNamePrefix = name;\n\n if (process.env.NODE_ENV !== 'production') {\n if (!name) {\n // Provide a better DX outside production.\n var displayName = getDisplayName(Component);\n\n if (displayName !== undefined) {\n classNamePrefix = displayName;\n }\n }\n }\n\n var useStyles = makeStyles(stylesOrCreator, _extends({\n defaultTheme: defaultTheme,\n Component: Component,\n name: name || Component.displayName,\n classNamePrefix: classNamePrefix\n }, stylesOptions));\n var WithStyles = /*#__PURE__*/React.forwardRef(function WithStyles(props, ref) {\n var classesProp = props.classes,\n innerRef = props.innerRef,\n other = _objectWithoutProperties(props, [\"classes\", \"innerRef\"]); // The wrapper receives only user supplied props, which could be a subset of\n // the actual props Component might receive due to merging with defaultProps.\n // So copying it here would give us the same result in the wrapper as well.\n\n\n var classes = useStyles(_extends({}, Component.defaultProps, props));\n var theme;\n var more = other;\n\n if (typeof name === 'string' || withTheme) {\n // name and withTheme are invariant in the outer scope\n // eslint-disable-next-line react-hooks/rules-of-hooks\n theme = useTheme() || defaultTheme;\n\n if (name) {\n more = getThemeProps({\n theme: theme,\n name: name,\n props: other\n });\n } // Provide the theme to the wrapped component.\n // So we don't have to use the `withTheme()` Higher-order Component.\n\n\n if (withTheme && !more.theme) {\n more.theme = theme;\n }\n }\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: innerRef || ref,\n classes: classes\n }, more));\n });\n process.env.NODE_ENV !== \"production\" ? WithStyles.propTypes = {\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * Use that prop to pass a ref to the decorated component.\n * @deprecated\n */\n innerRef: chainPropTypes(PropTypes.oneOfType([PropTypes.func, PropTypes.object]), function (props) {\n if (props.innerRef == null) {\n return null;\n }\n\n return null; // return new Error(\n // 'Material-UI: The `innerRef` prop is deprecated and will be removed in v5. ' +\n // 'Refs are now automatically forwarded to the inner component.',\n // );\n })\n } : void 0;\n\n if (process.env.NODE_ENV !== 'production') {\n WithStyles.displayName = \"WithStyles(\".concat(getDisplayName(Component), \")\");\n }\n\n hoistNonReactStatics(WithStyles, Component);\n\n if (process.env.NODE_ENV !== 'production') {\n // Exposed for test purposes.\n WithStyles.Naked = Component;\n WithStyles.options = options;\n WithStyles.useStyles = useStyles;\n }\n\n return WithStyles;\n };\n};\n\nexport default withStyles;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport { chainPropTypes, getDisplayName } from '@material-ui/utils';\nimport useTheme from '../useTheme';\nexport function withThemeCreator() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var defaultTheme = options.defaultTheme;\n\n var withTheme = function withTheme(Component) {\n if (process.env.NODE_ENV !== 'production') {\n if (Component === undefined) {\n throw new Error(['You are calling withTheme(Component) with an undefined component.', 'You may have forgotten to import it.'].join('\\n'));\n }\n }\n\n var WithTheme = /*#__PURE__*/React.forwardRef(function WithTheme(props, ref) {\n var innerRef = props.innerRef,\n other = _objectWithoutProperties(props, [\"innerRef\"]);\n\n var theme = useTheme() || defaultTheme;\n return /*#__PURE__*/React.createElement(Component, _extends({\n theme: theme,\n ref: innerRef || ref\n }, other));\n });\n process.env.NODE_ENV !== \"production\" ? WithTheme.propTypes = {\n /**\n * Use that prop to pass a ref to the decorated component.\n * @deprecated\n */\n innerRef: chainPropTypes(PropTypes.oneOfType([PropTypes.func, PropTypes.object]), function (props) {\n if (props.innerRef == null) {\n return null;\n }\n\n return new Error('Material-UI: The `innerRef` prop is deprecated and will be removed in v5. ' + 'Refs are now automatically forwarded to the inner component.');\n })\n } : void 0;\n\n if (process.env.NODE_ENV !== 'production') {\n WithTheme.displayName = \"WithTheme(\".concat(getDisplayName(Component), \")\");\n }\n\n hoistNonReactStatics(WithTheme, Component);\n\n if (process.env.NODE_ENV !== 'production') {\n // Exposed for test purposes.\n WithTheme.Naked = Component;\n }\n\n return WithTheme;\n };\n\n return withTheme;\n} // Provide the theme object as a prop to the input component.\n// It's an alternative API to useTheme().\n// We encourage the usage of useTheme() where possible.\n\nvar withTheme = withThemeCreator();\nexport default withTheme;","import style from './style';\nimport compose from './compose';\n\nfunction getBorder(value) {\n if (typeof value !== 'number') {\n return value;\n }\n\n return \"\".concat(value, \"px solid\");\n}\n\nexport var border = style({\n prop: 'border',\n themeKey: 'borders',\n transform: getBorder\n});\nexport var borderTop = style({\n prop: 'borderTop',\n themeKey: 'borders',\n transform: getBorder\n});\nexport var borderRight = style({\n prop: 'borderRight',\n themeKey: 'borders',\n transform: getBorder\n});\nexport var borderBottom = style({\n prop: 'borderBottom',\n themeKey: 'borders',\n transform: getBorder\n});\nexport var borderLeft = style({\n prop: 'borderLeft',\n themeKey: 'borders',\n transform: getBorder\n});\nexport var borderColor = style({\n prop: 'borderColor',\n themeKey: 'palette'\n});\nexport var borderRadius = style({\n prop: 'borderRadius',\n themeKey: 'shape'\n});\nvar borders = compose(border, borderTop, borderRight, borderBottom, borderLeft, borderColor, borderRadius);\nexport default borders;","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport PropTypes from 'prop-types';\nimport merge from './merge'; // The breakpoint **start** at this value.\n// For instance with the first breakpoint xs: [xs, sm[.\n\nvar values = {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1280,\n xl: 1920\n};\nvar defaultBreakpoints = {\n // Sorted ASC by size. That's important.\n // It can't be configured as it's used statically for propTypes.\n keys: ['xs', 'sm', 'md', 'lg', 'xl'],\n up: function up(key) {\n return \"@media (min-width:\".concat(values[key], \"px)\");\n }\n};\nexport function handleBreakpoints(props, propValue, styleFromPropValue) {\n if (process.env.NODE_ENV !== 'production') {\n if (!props.theme) {\n console.error('Material-UI: You are calling a style function without a theme value.');\n }\n }\n\n if (Array.isArray(propValue)) {\n var themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;\n return propValue.reduce(function (acc, item, index) {\n acc[themeBreakpoints.up(themeBreakpoints.keys[index])] = styleFromPropValue(propValue[index]);\n return acc;\n }, {});\n }\n\n if (_typeof(propValue) === 'object') {\n var _themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;\n\n return Object.keys(propValue).reduce(function (acc, breakpoint) {\n acc[_themeBreakpoints.up(breakpoint)] = styleFromPropValue(propValue[breakpoint]);\n return acc;\n }, {});\n }\n\n var output = styleFromPropValue(propValue);\n return output;\n}\n\nfunction breakpoints(styleFunction) {\n var newStyleFunction = function newStyleFunction(props) {\n var base = styleFunction(props);\n var themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;\n var extended = themeBreakpoints.keys.reduce(function (acc, key) {\n if (props[key]) {\n acc = acc || {};\n acc[themeBreakpoints.up(key)] = styleFunction(_extends({\n theme: props.theme\n }, props[key]));\n }\n\n return acc;\n }, null);\n return merge(base, extended);\n };\n\n newStyleFunction.propTypes = process.env.NODE_ENV !== 'production' ? _extends({}, styleFunction.propTypes, {\n xs: PropTypes.object,\n sm: PropTypes.object,\n md: PropTypes.object,\n lg: PropTypes.object,\n xl: PropTypes.object\n }) : {};\n newStyleFunction.filterProps = ['xs', 'sm', 'md', 'lg', 'xl'].concat(_toConsumableArray(styleFunction.filterProps));\n return newStyleFunction;\n}\n\nexport default breakpoints;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport merge from './merge';\n\nfunction compose() {\n for (var _len = arguments.length, styles = new Array(_len), _key = 0; _key < _len; _key++) {\n styles[_key] = arguments[_key];\n }\n\n var fn = function fn(props) {\n return styles.reduce(function (acc, style) {\n var output = style(props);\n\n if (output) {\n return merge(acc, output);\n }\n\n return acc;\n }, {});\n }; // Alternative approach that doesn't yield any performance gain.\n // const handlers = styles.reduce((acc, style) => {\n // style.filterProps.forEach(prop => {\n // acc[prop] = style;\n // });\n // return acc;\n // }, {});\n // const fn = props => {\n // return Object.keys(props).reduce((acc, prop) => {\n // if (handlers[prop]) {\n // return merge(acc, handlers[prop](props));\n // }\n // return acc;\n // }, {});\n // };\n\n\n fn.propTypes = process.env.NODE_ENV !== 'production' ? styles.reduce(function (acc, style) {\n return _extends(acc, style.propTypes);\n }, {}) : {};\n fn.filterProps = styles.reduce(function (acc, style) {\n return acc.concat(style.filterProps);\n }, []);\n return fn;\n}\n\nexport default compose;","import style from './style';\nimport compose from './compose';\nexport var displayPrint = style({\n prop: 'displayPrint',\n cssProperty: false,\n transform: function transform(value) {\n return {\n '@media print': {\n display: value\n }\n };\n }\n});\nexport var displayRaw = style({\n prop: 'display'\n});\nexport var overflow = style({\n prop: 'overflow'\n});\nexport var textOverflow = style({\n prop: 'textOverflow'\n});\nexport var visibility = style({\n prop: 'visibility'\n});\nexport var whiteSpace = style({\n prop: 'whiteSpace'\n});\nexport default compose(displayPrint, displayRaw, overflow, textOverflow, visibility, whiteSpace);","import style from './style';\nimport compose from './compose';\nexport var flexBasis = style({\n prop: 'flexBasis'\n});\nexport var flexDirection = style({\n prop: 'flexDirection'\n});\nexport var flexWrap = style({\n prop: 'flexWrap'\n});\nexport var justifyContent = style({\n prop: 'justifyContent'\n});\nexport var alignItems = style({\n prop: 'alignItems'\n});\nexport var alignContent = style({\n prop: 'alignContent'\n});\nexport var order = style({\n prop: 'order'\n});\nexport var flex = style({\n prop: 'flex'\n});\nexport var flexGrow = style({\n prop: 'flexGrow'\n});\nexport var flexShrink = style({\n prop: 'flexShrink'\n});\nexport var alignSelf = style({\n prop: 'alignSelf'\n});\nexport var justifyItems = style({\n prop: 'justifyItems'\n});\nexport var justifySelf = style({\n prop: 'justifySelf'\n});\nvar flexbox = compose(flexBasis, flexDirection, flexWrap, justifyContent, alignItems, alignContent, order, flex, flexGrow, flexShrink, alignSelf, justifyItems, justifySelf);\nexport default flexbox;","import style from './style';\nimport compose from './compose';\nexport var gridGap = style({\n prop: 'gridGap'\n});\nexport var gridColumnGap = style({\n prop: 'gridColumnGap'\n});\nexport var gridRowGap = style({\n prop: 'gridRowGap'\n});\nexport var gridColumn = style({\n prop: 'gridColumn'\n});\nexport var gridRow = style({\n prop: 'gridRow'\n});\nexport var gridAutoFlow = style({\n prop: 'gridAutoFlow'\n});\nexport var gridAutoColumns = style({\n prop: 'gridAutoColumns'\n});\nexport var gridAutoRows = style({\n prop: 'gridAutoRows'\n});\nexport var gridTemplateColumns = style({\n prop: 'gridTemplateColumns'\n});\nexport var gridTemplateRows = style({\n prop: 'gridTemplateRows'\n});\nexport var gridTemplateAreas = style({\n prop: 'gridTemplateAreas'\n});\nexport var gridArea = style({\n prop: 'gridArea'\n});\nvar grid = compose(gridGap, gridColumnGap, gridRowGap, gridColumn, gridRow, gridAutoFlow, gridAutoColumns, gridAutoRows, gridTemplateColumns, gridTemplateRows, gridTemplateAreas, gridArea);\nexport default grid;","import { deepmerge } from '@material-ui/utils';\n\nfunction merge(acc, item) {\n if (!item) {\n return acc;\n }\n\n return deepmerge(acc, item, {\n clone: false // No need to clone deep, it's way faster.\n\n });\n}\n\nexport default merge;","import style from './style';\nimport compose from './compose';\nexport var color = style({\n prop: 'color',\n themeKey: 'palette'\n});\nexport var bgcolor = style({\n prop: 'bgcolor',\n cssProperty: 'backgroundColor',\n themeKey: 'palette'\n});\nvar palette = compose(color, bgcolor);\nexport default palette;","import style from './style';\nimport compose from './compose';\nexport var position = style({\n prop: 'position'\n});\nexport var zIndex = style({\n prop: 'zIndex',\n themeKey: 'zIndex'\n});\nexport var top = style({\n prop: 'top'\n});\nexport var right = style({\n prop: 'right'\n});\nexport var bottom = style({\n prop: 'bottom'\n});\nexport var left = style({\n prop: 'left'\n});\nexport default compose(position, zIndex, top, right, bottom, left);","import style from './style';\nvar boxShadow = style({\n prop: 'boxShadow',\n themeKey: 'shadows'\n});\nexport default boxShadow;","import style from './style';\nimport compose from './compose';\n\nfunction transform(value) {\n return value <= 1 ? \"\".concat(value * 100, \"%\") : value;\n}\n\nexport var width = style({\n prop: 'width',\n transform: transform\n});\nexport var maxWidth = style({\n prop: 'maxWidth',\n transform: transform\n});\nexport var minWidth = style({\n prop: 'minWidth',\n transform: transform\n});\nexport var height = style({\n prop: 'height',\n transform: transform\n});\nexport var maxHeight = style({\n prop: 'maxHeight',\n transform: transform\n});\nexport var minHeight = style({\n prop: 'minHeight',\n transform: transform\n});\nexport var sizeWidth = style({\n prop: 'size',\n cssProperty: 'width',\n transform: transform\n});\nexport var sizeHeight = style({\n prop: 'size',\n cssProperty: 'height',\n transform: transform\n});\nexport var boxSizing = style({\n prop: 'boxSizing'\n});\nvar sizing = compose(width, maxWidth, minWidth, height, maxHeight, minHeight, boxSizing);\nexport default sizing;","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport responsivePropType from './responsivePropType';\nimport { handleBreakpoints } from './breakpoints';\nimport merge from './merge';\nimport memoize from './memoize';\nvar properties = {\n m: 'margin',\n p: 'padding'\n};\nvar directions = {\n t: 'Top',\n r: 'Right',\n b: 'Bottom',\n l: 'Left',\n x: ['Left', 'Right'],\n y: ['Top', 'Bottom']\n};\nvar aliases = {\n marginX: 'mx',\n marginY: 'my',\n paddingX: 'px',\n paddingY: 'py'\n}; // memoize() impact:\n// From 300,000 ops/sec\n// To 350,000 ops/sec\n\nvar getCssProperties = memoize(function (prop) {\n // It's not a shorthand notation.\n if (prop.length > 2) {\n if (aliases[prop]) {\n prop = aliases[prop];\n } else {\n return [prop];\n }\n }\n\n var _prop$split = prop.split(''),\n _prop$split2 = _slicedToArray(_prop$split, 2),\n a = _prop$split2[0],\n b = _prop$split2[1];\n\n var property = properties[a];\n var direction = directions[b] || '';\n return Array.isArray(direction) ? direction.map(function (dir) {\n return property + dir;\n }) : [property + direction];\n});\nvar spacingKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY'];\nexport function createUnarySpacing(theme) {\n var themeSpacing = theme.spacing || 8;\n\n if (typeof themeSpacing === 'number') {\n return function (abs) {\n if (process.env.NODE_ENV !== 'production') {\n if (typeof abs !== 'number') {\n console.error(\"Material-UI: Expected spacing argument to be a number, got \".concat(abs, \".\"));\n }\n }\n\n return themeSpacing * abs;\n };\n }\n\n if (Array.isArray(themeSpacing)) {\n return function (abs) {\n if (process.env.NODE_ENV !== 'production') {\n if (abs > themeSpacing.length - 1) {\n console.error([\"Material-UI: The value provided (\".concat(abs, \") overflows.\"), \"The supported values are: \".concat(JSON.stringify(themeSpacing), \".\"), \"\".concat(abs, \" > \").concat(themeSpacing.length - 1, \", you need to add the missing values.\")].join('\\n'));\n }\n }\n\n return themeSpacing[abs];\n };\n }\n\n if (typeof themeSpacing === 'function') {\n return themeSpacing;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n console.error([\"Material-UI: The `theme.spacing` value (\".concat(themeSpacing, \") is invalid.\"), 'It should be a number, an array or a function.'].join('\\n'));\n }\n\n return function () {\n return undefined;\n };\n}\n\nfunction getValue(transformer, propValue) {\n if (typeof propValue === 'string' || propValue == null) {\n return propValue;\n }\n\n var abs = Math.abs(propValue);\n var transformed = transformer(abs);\n\n if (propValue >= 0) {\n return transformed;\n }\n\n if (typeof transformed === 'number') {\n return -transformed;\n }\n\n return \"-\".concat(transformed);\n}\n\nfunction getStyleFromPropValue(cssProperties, transformer) {\n return function (propValue) {\n return cssProperties.reduce(function (acc, cssProperty) {\n acc[cssProperty] = getValue(transformer, propValue);\n return acc;\n }, {});\n };\n}\n\nfunction spacing(props) {\n var theme = props.theme;\n var transformer = createUnarySpacing(theme);\n return Object.keys(props).map(function (prop) {\n // Using a hash computation over an array iteration could be faster, but with only 28 items,\n // it's doesn't worth the bundle size.\n if (spacingKeys.indexOf(prop) === -1) {\n return null;\n }\n\n var cssProperties = getCssProperties(prop);\n var styleFromPropValue = getStyleFromPropValue(cssProperties, transformer);\n var propValue = props[prop];\n return handleBreakpoints(props, propValue, styleFromPropValue);\n }).reduce(merge, {});\n}\n\nspacing.propTypes = process.env.NODE_ENV !== 'production' ? spacingKeys.reduce(function (obj, key) {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\nspacing.filterProps = spacingKeys;\nexport default spacing;","export default function memoize(fn) {\n var cache = {};\n return function (arg) {\n if (cache[arg] === undefined) {\n cache[arg] = fn(arg);\n }\n\n return cache[arg];\n };\n}","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport responsivePropType from './responsivePropType';\nimport { handleBreakpoints } from './breakpoints';\n\nfunction getPath(obj, path) {\n if (!path || typeof path !== 'string') {\n return null;\n }\n\n return path.split('.').reduce(function (acc, item) {\n return acc && acc[item] ? acc[item] : null;\n }, obj);\n}\n\nfunction style(options) {\n var prop = options.prop,\n _options$cssProperty = options.cssProperty,\n cssProperty = _options$cssProperty === void 0 ? options.prop : _options$cssProperty,\n themeKey = options.themeKey,\n transform = options.transform;\n\n var fn = function fn(props) {\n if (props[prop] == null) {\n return null;\n }\n\n var propValue = props[prop];\n var theme = props.theme;\n var themeMapping = getPath(theme, themeKey) || {};\n\n var styleFromPropValue = function styleFromPropValue(propValueFinal) {\n var value;\n\n if (typeof themeMapping === 'function') {\n value = themeMapping(propValueFinal);\n } else if (Array.isArray(themeMapping)) {\n value = themeMapping[propValueFinal] || propValueFinal;\n } else {\n value = getPath(themeMapping, propValueFinal) || propValueFinal;\n\n if (transform) {\n value = transform(value);\n }\n }\n\n if (cssProperty === false) {\n return value;\n }\n\n return _defineProperty({}, cssProperty, value);\n };\n\n return handleBreakpoints(props, propValue, styleFromPropValue);\n };\n\n fn.propTypes = process.env.NODE_ENV !== 'production' ? _defineProperty({}, prop, responsivePropType) : {};\n fn.filterProps = [prop];\n return fn;\n}\n\nexport default style;","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport PropTypes from 'prop-types';\nimport { chainPropTypes } from '@material-ui/utils';\nimport merge from './merge';\n\nfunction omit(input, fields) {\n var output = {};\n Object.keys(input).forEach(function (prop) {\n if (fields.indexOf(prop) === -1) {\n output[prop] = input[prop];\n }\n });\n return output;\n}\n\nvar warnedOnce = false;\n\nfunction styleFunctionSx(styleFunction) {\n var newStyleFunction = function newStyleFunction(props) {\n var output = styleFunction(props);\n\n if (props.css) {\n return _extends({}, merge(output, styleFunction(_extends({\n theme: props.theme\n }, props.css))), omit(props.css, [styleFunction.filterProps]));\n }\n\n if (props.sx) {\n return _extends({}, merge(output, styleFunction(_extends({\n theme: props.theme\n }, props.sx))), omit(props.sx, [styleFunction.filterProps]));\n }\n\n return output;\n };\n\n newStyleFunction.propTypes = process.env.NODE_ENV !== 'production' ? _extends({}, styleFunction.propTypes, {\n css: chainPropTypes(PropTypes.object, function (props) {\n if (!warnedOnce && props.css !== undefined) {\n warnedOnce = true;\n return new Error('Material-UI: The `css` prop is deprecated, please use the `sx` prop instead.');\n }\n\n return null;\n }),\n sx: PropTypes.object\n }) : {};\n newStyleFunction.filterProps = ['css', 'sx'].concat(_toConsumableArray(styleFunction.filterProps));\n return newStyleFunction;\n}\n/**\r\n *\r\n * @deprecated\r\n * The css style function is deprecated. Use the `styleFunctionSx` instead.\r\n */\n\n\nexport function css(styleFunction) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn('Material-UI: The `css` function is deprecated. Use the `styleFunctionSx` instead.');\n }\n\n return styleFunctionSx(styleFunction);\n}\nexport default styleFunctionSx;","import style from './style';\nimport compose from './compose';\nexport var fontFamily = style({\n prop: 'fontFamily',\n themeKey: 'typography'\n});\nexport var fontSize = style({\n prop: 'fontSize',\n themeKey: 'typography'\n});\nexport var fontStyle = style({\n prop: 'fontStyle',\n themeKey: 'typography'\n});\nexport var fontWeight = style({\n prop: 'fontWeight',\n themeKey: 'typography'\n});\nexport var letterSpacing = style({\n prop: 'letterSpacing'\n});\nexport var lineHeight = style({\n prop: 'lineHeight'\n});\nexport var textAlign = style({\n prop: 'textAlign'\n});\nvar typography = compose(fontFamily, fontSize, fontStyle, fontWeight, letterSpacing, lineHeight, textAlign);\nexport default typography;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nexport function isPlainObject(item) {\n return item && _typeof(item) === 'object' && item.constructor === Object;\n}\nexport default function deepmerge(target, source) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {\n clone: true\n };\n var output = options.clone ? _extends({}, target) : target;\n\n if (isPlainObject(target) && isPlainObject(source)) {\n Object.keys(source).forEach(function (key) {\n // Avoid prototype pollution\n if (key === '__proto__') {\n return;\n }\n\n if (isPlainObject(source[key]) && key in target) {\n output[key] = deepmerge(target[key], source[key], options);\n } else {\n output[key] = source[key];\n }\n });\n }\n\n return output;\n}","/**\n * WARNING: Don't import this directly.\n * Use `MuiError` from `@material-ui/utils/macros/MuiError.macro` instead.\n * @param {number} code\n */\nexport default function formatMuiErrorMessage(code) {\n // Apply babel-plugin-transform-template-literals in loose mode\n // loose mode is safe iff we're concatenating primitives\n // see https://babeljs.io/docs/en/babel-plugin-transform-template-literals#loose\n\n /* eslint-disable prefer-template */\n var url = 'https://material-ui.com/production-error/?code=' + code;\n\n for (var i = 1; i < arguments.length; i += 1) {\n // rest params over-transpile for this case\n // eslint-disable-next-line prefer-rest-params\n url += '&args[]=' + encodeURIComponent(arguments[i]);\n }\n\n return 'Minified Material-UI error #' + code + '; visit ' + url + ' for the full message.';\n /* eslint-enable prefer-template */\n}","export default function chainPropTypes(propType1, propType2) {\n if (process.env.NODE_ENV === 'production') {\n return function () {\n return null;\n };\n }\n\n return function validate() {\n return propType1.apply(void 0, arguments) || propType2.apply(void 0, arguments);\n };\n}","import PropTypes from 'prop-types';\nimport chainPropTypes from './chainPropTypes';\n\nfunction isClassComponent(elementType) {\n // elementType.prototype?.isReactComponent\n var _elementType$prototyp = elementType.prototype,\n prototype = _elementType$prototyp === void 0 ? {} : _elementType$prototyp;\n return Boolean(prototype.isReactComponent);\n}\n\nfunction acceptingRef(props, propName, componentName, location, propFullName) {\n var element = props[propName];\n var safePropName = propFullName || propName;\n\n if (element == null) {\n return null;\n }\n\n var warningHint;\n var elementType = element.type;\n /**\n * Blacklisting instead of whitelisting\n *\n * Blacklisting will miss some components, such as React.Fragment. Those will at least\n * trigger a warning in React.\n * We can't whitelist because there is no safe way to detect React.forwardRef\n * or class components. \"Safe\" means there's no public API.\n *\n */\n\n if (typeof elementType === 'function' && !isClassComponent(elementType)) {\n warningHint = 'Did you accidentally use a plain function component for an element instead?';\n }\n\n if (warningHint !== undefined) {\n return new Error(\"Invalid \".concat(location, \" `\").concat(safePropName, \"` supplied to `\").concat(componentName, \"`. \") + \"Expected an element that can hold a ref. \".concat(warningHint, \" \") + 'For more information see https://material-ui.com/r/caveat-with-refs-guide');\n }\n\n return null;\n}\n\nvar elementAcceptingRef = chainPropTypes(PropTypes.element, acceptingRef);\nelementAcceptingRef.isRequired = chainPropTypes(PropTypes.element.isRequired, acceptingRef);\nexport default elementAcceptingRef;","import * as PropTypes from 'prop-types';\nimport chainPropTypes from './chainPropTypes';\n\nfunction isClassComponent(elementType) {\n // elementType.prototype?.isReactComponent\n var _elementType$prototyp = elementType.prototype,\n prototype = _elementType$prototyp === void 0 ? {} : _elementType$prototyp;\n return Boolean(prototype.isReactComponent);\n}\n\nfunction elementTypeAcceptingRef(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var safePropName = propFullName || propName;\n\n if (propValue == null) {\n return null;\n }\n\n var warningHint;\n /**\n * Blacklisting instead of whitelisting\n *\n * Blacklisting will miss some components, such as React.Fragment. Those will at least\n * trigger a warning in React.\n * We can't whitelist because there is no safe way to detect React.forwardRef\n * or class components. \"Safe\" means there's no public API.\n *\n */\n\n if (typeof propValue === 'function' && !isClassComponent(propValue)) {\n warningHint = 'Did you accidentally provide a plain function component instead?';\n }\n\n if (warningHint !== undefined) {\n return new Error(\"Invalid \".concat(location, \" `\").concat(safePropName, \"` supplied to `\").concat(componentName, \"`. \") + \"Expected an element type that can hold a ref. \".concat(warningHint, \" \") + 'For more information see https://material-ui.com/r/caveat-with-refs-guide');\n }\n\n return null;\n}\n\nexport default chainPropTypes(PropTypes.elementType, elementTypeAcceptingRef);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\n// This module is based on https://github.com/airbnb/prop-types-exact repository.\n// However, in order to reduce the number of dependencies and to remove some extra safe checks\n// the module was forked.\n// Only exported for test purposes.\nexport var specialProperty = \"exact-prop: \\u200B\";\nexport default function exactProp(propTypes) {\n if (process.env.NODE_ENV === 'production') {\n return propTypes;\n }\n\n return _extends({}, propTypes, _defineProperty({}, specialProperty, function (props) {\n var unsupportedProps = Object.keys(props).filter(function (prop) {\n return !propTypes.hasOwnProperty(prop);\n });\n\n if (unsupportedProps.length > 0) {\n return new Error(\"The following props are not supported: \".concat(unsupportedProps.map(function (prop) {\n return \"`\".concat(prop, \"`\");\n }).join(', '), \". Please remove them.\"));\n }\n\n return null;\n }));\n}","import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport { ForwardRef, Memo } from 'react-is'; // Simplified polyfill for IE 11 support\n// https://github.com/JamesMGreene/Function.name/blob/58b314d4a983110c3682f1228f845d39ccca1817/Function.name.js#L3\n\nvar fnNameMatchRegex = /^\\s*function(?:\\s|\\s*\\/\\*.*\\*\\/\\s*)+([^(\\s/]*)\\s*/;\nexport function getFunctionName(fn) {\n var match = \"\".concat(fn).match(fnNameMatchRegex);\n var name = match && match[1];\n return name || '';\n}\n/**\n * @param {function} Component\n * @param {string} fallback\n * @returns {string | undefined}\n */\n\nfunction getFunctionComponentName(Component) {\n var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n return Component.displayName || Component.name || getFunctionName(Component) || fallback;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var functionName = getFunctionComponentName(innerType);\n return outerType.displayName || (functionName !== '' ? \"\".concat(wrapperName, \"(\").concat(functionName, \")\") : wrapperName);\n}\n/**\n * cherry-pick from\n * https://github.com/facebook/react/blob/769b1f270e1251d9dbdce0fcbd9e92e502d059b8/packages/shared/getComponentName.js\n * originally forked from recompose/getDisplayName with added IE 11 support\n *\n * @param {React.ReactType} Component\n * @returns {string | undefined}\n */\n\n\nexport default function getDisplayName(Component) {\n if (Component == null) {\n return undefined;\n }\n\n if (typeof Component === 'string') {\n return Component;\n }\n\n if (typeof Component === 'function') {\n return getFunctionComponentName(Component, 'Component');\n }\n\n if (_typeof(Component) === 'object') {\n switch (Component.$$typeof) {\n case ForwardRef:\n return getWrappedName(Component, Component.render, 'ForwardRef');\n\n case Memo:\n return getWrappedName(Component, Component.type, 'memo');\n\n default:\n return undefined;\n }\n }\n\n return undefined;\n}","export default function HTMLElementType(props, propName, componentName, location, propFullName) {\n if (process.env.NODE_ENV === 'production') {\n return null;\n }\n\n var propValue = props[propName];\n var safePropName = propFullName || propName;\n\n if (propValue == null) {\n return null;\n }\n\n if (propValue && propValue.nodeType !== 1) {\n return new Error(\"Invalid \".concat(location, \" `\").concat(safePropName, \"` supplied to `\").concat(componentName, \"`. \") + \"Expected an HTMLElement.\");\n }\n\n return null;\n}","/* eslint-disable */\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nexport default typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();","import PropTypes from 'prop-types';\nvar refType = PropTypes.oneOfType([PropTypes.func, PropTypes.object]);\nexport default refType;","\"use strict\";\n\nexports.__esModule = true;\n\nexports.default = function (file, acceptedFiles) {\n if (file && acceptedFiles) {\n var acceptedFilesArray = Array.isArray(acceptedFiles) ? acceptedFiles : acceptedFiles.split(',');\n var fileName = file.name || '';\n var mimeType = (file.type || '').toLowerCase();\n var baseMimeType = mimeType.replace(/\\/.*$/, '');\n return acceptedFilesArray.some(function (type) {\n var validType = type.trim().toLowerCase();\n\n if (validType.charAt(0) === '.') {\n return fileName.toLowerCase().endsWith(validType);\n } else if (validType.endsWith('/*')) {\n // This is something like a image/* mime type\n return baseMimeType === validType.replace(/\\/.*$/, '');\n }\n\n return mimeType === validType;\n });\n }\n\n return true;\n};","/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg) && arg.length) {\n\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\tif (inner) {\n\t\t\t\t\tclasses.push(inner);\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","function toVal(mix) {\n\tvar k, y, str='';\n\n\tif (typeof mix === 'string' || typeof mix === 'number') {\n\t\tstr += mix;\n\t} else if (typeof mix === 'object') {\n\t\tif (Array.isArray(mix)) {\n\t\t\tfor (k=0; k < mix.length; k++) {\n\t\t\t\tif (mix[k]) {\n\t\t\t\t\tif (y = toVal(mix[k])) {\n\t\t\t\t\t\tstr && (str += ' ');\n\t\t\t\t\t\tstr += y;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor (k in mix) {\n\t\t\t\tif (mix[k]) {\n\t\t\t\t\tstr && (str += ' ');\n\t\t\t\t\tstr += k;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn str;\n}\n\nexport default function () {\n\tvar i=0, tmp, x, str='';\n\twhile (i < arguments.length) {\n\t\tif (tmp = arguments[i++]) {\n\t\t\tif (x = toVal(tmp)) {\n\t\t\t\tstr && (str += ' ');\n\t\t\t\tstr += x\n\t\t\t}\n\t\t}\n\t}\n\treturn str;\n}\n","function dateLongFormatter(pattern, formatLong) {\n switch (pattern) {\n case 'P':\n return formatLong.date({\n width: 'short'\n });\n\n case 'PP':\n return formatLong.date({\n width: 'medium'\n });\n\n case 'PPP':\n return formatLong.date({\n width: 'long'\n });\n\n case 'PPPP':\n default:\n return formatLong.date({\n width: 'full'\n });\n }\n}\n\nfunction timeLongFormatter(pattern, formatLong) {\n switch (pattern) {\n case 'p':\n return formatLong.time({\n width: 'short'\n });\n\n case 'pp':\n return formatLong.time({\n width: 'medium'\n });\n\n case 'ppp':\n return formatLong.time({\n width: 'long'\n });\n\n case 'pppp':\n default:\n return formatLong.time({\n width: 'full'\n });\n }\n}\n\nfunction dateTimeLongFormatter(pattern, formatLong) {\n var matchResult = pattern.match(/(P+)(p+)?/) || [];\n var datePattern = matchResult[1];\n var timePattern = matchResult[2];\n\n if (!timePattern) {\n return dateLongFormatter(pattern, formatLong);\n }\n\n var dateTimeFormat;\n\n switch (datePattern) {\n case 'P':\n dateTimeFormat = formatLong.dateTime({\n width: 'short'\n });\n break;\n\n case 'PP':\n dateTimeFormat = formatLong.dateTime({\n width: 'medium'\n });\n break;\n\n case 'PPP':\n dateTimeFormat = formatLong.dateTime({\n width: 'long'\n });\n break;\n\n case 'PPPP':\n default:\n dateTimeFormat = formatLong.dateTime({\n width: 'full'\n });\n break;\n }\n\n return dateTimeFormat.replace('{{date}}', dateLongFormatter(datePattern, formatLong)).replace('{{time}}', timeLongFormatter(timePattern, formatLong));\n}\n\nvar longFormatters = {\n p: timeLongFormatter,\n P: dateTimeLongFormatter\n};\nexport default longFormatters;","/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport default function getTimezoneOffsetInMilliseconds(date) {\n var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));\n utcDate.setUTCFullYear(date.getFullYear());\n return date.getTime() - utcDate.getTime();\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\"; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nexport default function getUTCISOWeekYear(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getUTCFullYear();\n var fourthOfJanuaryOfNextYear = new Date(0);\n fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);\n fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);\n var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);\n var fourthOfJanuaryOfThisYear = new Date(0);\n fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);\n fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);\n var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);\n\n if (date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}","import toDate from \"../../toDate/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nimport startOfUTCISOWeekYear from \"../startOfUTCISOWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nexport default function getUTCISOWeek(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime(); // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}","import getUTCISOWeekYear from \"../getUTCISOWeekYear/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\"; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nexport default function startOfUTCISOWeekYear(dirtyDate) {\n requiredArgs(1, arguments);\n var year = getUTCISOWeekYear(dirtyDate);\n var fourthOfJanuary = new Date(0);\n fourthOfJanuary.setUTCFullYear(year, 0, 4);\n fourthOfJanuary.setUTCHours(0, 0, 0, 0);\n var date = startOfUTCISOWeek(fourthOfJanuary);\n return date;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport toInteger from \"../toInteger/index.js\"; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nexport default function getUTCWeekYear(dirtyDate, dirtyOptions) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getUTCFullYear();\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeFirstWeekContainsDate = locale && locale.options && locale.options.firstWeekContainsDate;\n var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);\n var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n }\n\n var firstWeekOfNextYear = new Date(0);\n firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);\n firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);\n var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, dirtyOptions);\n var firstWeekOfThisYear = new Date(0);\n firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);\n firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);\n var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, dirtyOptions);\n\n if (date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}","import toDate from \"../../toDate/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport startOfUTCWeekYear from \"../startOfUTCWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nexport default function getUTCWeek(dirtyDate, options) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime(); // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}","import getUTCWeekYear from \"../getUTCWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport toInteger from \"../toInteger/index.js\"; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nexport default function startOfUTCWeekYear(dirtyDate, dirtyOptions) {\n requiredArgs(1, arguments);\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeFirstWeekContainsDate = locale && locale.options && locale.options.firstWeekContainsDate;\n var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);\n var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate);\n var year = getUTCWeekYear(dirtyDate, dirtyOptions);\n var firstWeek = new Date(0);\n firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);\n firstWeek.setUTCHours(0, 0, 0, 0);\n var date = startOfUTCWeek(firstWeek, dirtyOptions);\n return date;\n}","var protectedDayOfYearTokens = ['D', 'DD'];\nvar protectedWeekYearTokens = ['YY', 'YYYY'];\nexport function isProtectedDayOfYearToken(token) {\n return protectedDayOfYearTokens.indexOf(token) !== -1;\n}\nexport function isProtectedWeekYearToken(token) {\n return protectedWeekYearTokens.indexOf(token) !== -1;\n}\nexport function throwProtectedError(token, format, input) {\n if (token === 'YYYY') {\n throw new RangeError(\"Use `yyyy` instead of `YYYY` (in `\".concat(format, \"`) for formatting years to the input `\").concat(input, \"`; see: https://git.io/fxCyr\"));\n } else if (token === 'YY') {\n throw new RangeError(\"Use `yy` instead of `YY` (in `\".concat(format, \"`) for formatting years to the input `\").concat(input, \"`; see: https://git.io/fxCyr\"));\n } else if (token === 'D') {\n throw new RangeError(\"Use `d` instead of `D` (in `\".concat(format, \"`) for formatting days of the month to the input `\").concat(input, \"`; see: https://git.io/fxCyr\"));\n } else if (token === 'DD') {\n throw new RangeError(\"Use `dd` instead of `DD` (in `\".concat(format, \"`) for formatting days of the month to the input `\").concat(input, \"`; see: https://git.io/fxCyr\"));\n }\n}","export default function requiredArgs(required, args) {\n if (args.length < required) {\n throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');\n }\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\"; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nexport default function startOfUTCISOWeek(dirtyDate) {\n requiredArgs(1, arguments);\n var weekStartsOn = 1;\n var date = toDate(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport toInteger from \"../toInteger/index.js\"; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nexport default function startOfUTCWeek(dirtyDate, dirtyOptions) {\n requiredArgs(1, arguments);\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeWeekStartsOn = locale && locale.options && locale.options.weekStartsOn;\n var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);\n var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n var date = toDate(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}","export default function toInteger(dirtyNumber) {\n if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {\n return NaN;\n }\n\n var number = Number(dirtyNumber);\n\n if (isNaN(number)) {\n return number;\n }\n\n return number < 0 ? Math.ceil(number) : Math.floor(number);\n}","export default function addLeadingZeros(number, targetLength) {\n var sign = number < 0 ? '-' : '';\n var output = Math.abs(number).toString();\n\n while (output.length < targetLength) {\n output = '0' + output;\n }\n\n return sign + output;\n}","import addLeadingZeros from \"../../addLeadingZeros/index.js\";\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | |\n * | d | Day of month | D | |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | m | Minute | M | Month |\n * | s | Second | S | Fraction of second |\n * | y | Year (abs) | Y | |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n */\n\nvar formatters = {\n // Year\n y: function (date, token) {\n // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens\n // | Year | y | yy | yyy | yyyy | yyyyy |\n // |----------|-------|----|-------|-------|-------|\n // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)\n\n var year = signedYear > 0 ? signedYear : 1 - signedYear;\n return addLeadingZeros(token === 'yy' ? year % 100 : year, token.length);\n },\n // Month\n M: function (date, token) {\n var month = date.getUTCMonth();\n return token === 'M' ? String(month + 1) : addLeadingZeros(month + 1, 2);\n },\n // Day of the month\n d: function (date, token) {\n return addLeadingZeros(date.getUTCDate(), token.length);\n },\n // AM or PM\n a: function (date, token) {\n var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am';\n\n switch (token) {\n case 'a':\n case 'aa':\n return dayPeriodEnumValue.toUpperCase();\n\n case 'aaa':\n return dayPeriodEnumValue;\n\n case 'aaaaa':\n return dayPeriodEnumValue[0];\n\n case 'aaaa':\n default:\n return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.';\n }\n },\n // Hour [1-12]\n h: function (date, token) {\n return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);\n },\n // Hour [0-23]\n H: function (date, token) {\n return addLeadingZeros(date.getUTCHours(), token.length);\n },\n // Minute\n m: function (date, token) {\n return addLeadingZeros(date.getUTCMinutes(), token.length);\n },\n // Second\n s: function (date, token) {\n return addLeadingZeros(date.getUTCSeconds(), token.length);\n },\n // Fraction of second\n S: function (date, token) {\n var numberOfDigits = token.length;\n var milliseconds = date.getUTCMilliseconds();\n var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));\n return addLeadingZeros(fractionalSeconds, token.length);\n }\n};\nexport default formatters;","import getUTCDayOfYear from \"../../../_lib/getUTCDayOfYear/index.js\";\nimport getUTCISOWeek from \"../../../_lib/getUTCISOWeek/index.js\";\nimport getUTCISOWeekYear from \"../../../_lib/getUTCISOWeekYear/index.js\";\nimport getUTCWeek from \"../../../_lib/getUTCWeek/index.js\";\nimport getUTCWeekYear from \"../../../_lib/getUTCWeekYear/index.js\";\nimport addLeadingZeros from \"../../addLeadingZeros/index.js\";\nimport lightFormatters from \"../lightFormatters/index.js\";\nvar dayPeriodEnum = {\n am: 'am',\n pm: 'pm',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n};\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O | Timezone (GMT) |\n * | p! | Long localized time | P! | Long localized date |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n * - `P` is long localized date format\n * - `p` is long localized time format\n */\n\nvar formatters = {\n // Era\n G: function (date, token, localize) {\n var era = date.getUTCFullYear() > 0 ? 1 : 0;\n\n switch (token) {\n // AD, BC\n case 'G':\n case 'GG':\n case 'GGG':\n return localize.era(era, {\n width: 'abbreviated'\n });\n // A, B\n\n case 'GGGGG':\n return localize.era(era, {\n width: 'narrow'\n });\n // Anno Domini, Before Christ\n\n case 'GGGG':\n default:\n return localize.era(era, {\n width: 'wide'\n });\n }\n },\n // Year\n y: function (date, token, localize) {\n // Ordinal number\n if (token === 'yo') {\n var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)\n\n var year = signedYear > 0 ? signedYear : 1 - signedYear;\n return localize.ordinalNumber(year, {\n unit: 'year'\n });\n }\n\n return lightFormatters.y(date, token);\n },\n // Local week-numbering year\n Y: function (date, token, localize, options) {\n var signedWeekYear = getUTCWeekYear(date, options); // Returns 1 for 1 BC (which is year 0 in JavaScript)\n\n var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear; // Two digit year\n\n if (token === 'YY') {\n var twoDigitYear = weekYear % 100;\n return addLeadingZeros(twoDigitYear, 2);\n } // Ordinal number\n\n\n if (token === 'Yo') {\n return localize.ordinalNumber(weekYear, {\n unit: 'year'\n });\n } // Padding\n\n\n return addLeadingZeros(weekYear, token.length);\n },\n // ISO week-numbering year\n R: function (date, token) {\n var isoWeekYear = getUTCISOWeekYear(date); // Padding\n\n return addLeadingZeros(isoWeekYear, token.length);\n },\n // Extended year. This is a single number designating the year of this calendar system.\n // The main difference between `y` and `u` localizers are B.C. years:\n // | Year | `y` | `u` |\n // |------|-----|-----|\n // | AC 1 | 1 | 1 |\n // | BC 1 | 1 | 0 |\n // | BC 2 | 2 | -1 |\n // Also `yy` always returns the last two digits of a year,\n // while `uu` pads single digit years to 2 characters and returns other years unchanged.\n u: function (date, token) {\n var year = date.getUTCFullYear();\n return addLeadingZeros(year, token.length);\n },\n // Quarter\n Q: function (date, token, localize) {\n var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);\n\n switch (token) {\n // 1, 2, 3, 4\n case 'Q':\n return String(quarter);\n // 01, 02, 03, 04\n\n case 'QQ':\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n\n case 'Qo':\n return localize.ordinalNumber(quarter, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n\n case 'QQQ':\n return localize.quarter(quarter, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n\n case 'QQQQQ':\n return localize.quarter(quarter, {\n width: 'narrow',\n context: 'formatting'\n });\n // 1st quarter, 2nd quarter, ...\n\n case 'QQQQ':\n default:\n return localize.quarter(quarter, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Stand-alone quarter\n q: function (date, token, localize) {\n var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);\n\n switch (token) {\n // 1, 2, 3, 4\n case 'q':\n return String(quarter);\n // 01, 02, 03, 04\n\n case 'qq':\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n\n case 'qo':\n return localize.ordinalNumber(quarter, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n\n case 'qqq':\n return localize.quarter(quarter, {\n width: 'abbreviated',\n context: 'standalone'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n\n case 'qqqqq':\n return localize.quarter(quarter, {\n width: 'narrow',\n context: 'standalone'\n });\n // 1st quarter, 2nd quarter, ...\n\n case 'qqqq':\n default:\n return localize.quarter(quarter, {\n width: 'wide',\n context: 'standalone'\n });\n }\n },\n // Month\n M: function (date, token, localize) {\n var month = date.getUTCMonth();\n\n switch (token) {\n case 'M':\n case 'MM':\n return lightFormatters.M(date, token);\n // 1st, 2nd, ..., 12th\n\n case 'Mo':\n return localize.ordinalNumber(month + 1, {\n unit: 'month'\n });\n // Jan, Feb, ..., Dec\n\n case 'MMM':\n return localize.month(month, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // J, F, ..., D\n\n case 'MMMMM':\n return localize.month(month, {\n width: 'narrow',\n context: 'formatting'\n });\n // January, February, ..., December\n\n case 'MMMM':\n default:\n return localize.month(month, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Stand-alone month\n L: function (date, token, localize) {\n var month = date.getUTCMonth();\n\n switch (token) {\n // 1, 2, ..., 12\n case 'L':\n return String(month + 1);\n // 01, 02, ..., 12\n\n case 'LL':\n return addLeadingZeros(month + 1, 2);\n // 1st, 2nd, ..., 12th\n\n case 'Lo':\n return localize.ordinalNumber(month + 1, {\n unit: 'month'\n });\n // Jan, Feb, ..., Dec\n\n case 'LLL':\n return localize.month(month, {\n width: 'abbreviated',\n context: 'standalone'\n });\n // J, F, ..., D\n\n case 'LLLLL':\n return localize.month(month, {\n width: 'narrow',\n context: 'standalone'\n });\n // January, February, ..., December\n\n case 'LLLL':\n default:\n return localize.month(month, {\n width: 'wide',\n context: 'standalone'\n });\n }\n },\n // Local week of year\n w: function (date, token, localize, options) {\n var week = getUTCWeek(date, options);\n\n if (token === 'wo') {\n return localize.ordinalNumber(week, {\n unit: 'week'\n });\n }\n\n return addLeadingZeros(week, token.length);\n },\n // ISO week of year\n I: function (date, token, localize) {\n var isoWeek = getUTCISOWeek(date);\n\n if (token === 'Io') {\n return localize.ordinalNumber(isoWeek, {\n unit: 'week'\n });\n }\n\n return addLeadingZeros(isoWeek, token.length);\n },\n // Day of the month\n d: function (date, token, localize) {\n if (token === 'do') {\n return localize.ordinalNumber(date.getUTCDate(), {\n unit: 'date'\n });\n }\n\n return lightFormatters.d(date, token);\n },\n // Day of year\n D: function (date, token, localize) {\n var dayOfYear = getUTCDayOfYear(date);\n\n if (token === 'Do') {\n return localize.ordinalNumber(dayOfYear, {\n unit: 'dayOfYear'\n });\n }\n\n return addLeadingZeros(dayOfYear, token.length);\n },\n // Day of week\n E: function (date, token, localize) {\n var dayOfWeek = date.getUTCDay();\n\n switch (token) {\n // Tue\n case 'E':\n case 'EE':\n case 'EEE':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // T\n\n case 'EEEEE':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'EEEEEE':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'formatting'\n });\n // Tuesday\n\n case 'EEEE':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Local day of week\n e: function (date, token, localize, options) {\n var dayOfWeek = date.getUTCDay();\n var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n\n switch (token) {\n // Numerical value (Nth day of week with current locale or weekStartsOn)\n case 'e':\n return String(localDayOfWeek);\n // Padded numerical value\n\n case 'ee':\n return addLeadingZeros(localDayOfWeek, 2);\n // 1st, 2nd, ..., 7th\n\n case 'eo':\n return localize.ordinalNumber(localDayOfWeek, {\n unit: 'day'\n });\n\n case 'eee':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // T\n\n case 'eeeee':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'eeeeee':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'formatting'\n });\n // Tuesday\n\n case 'eeee':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Stand-alone local day of week\n c: function (date, token, localize, options) {\n var dayOfWeek = date.getUTCDay();\n var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n\n switch (token) {\n // Numerical value (same as in `e`)\n case 'c':\n return String(localDayOfWeek);\n // Padded numerical value\n\n case 'cc':\n return addLeadingZeros(localDayOfWeek, token.length);\n // 1st, 2nd, ..., 7th\n\n case 'co':\n return localize.ordinalNumber(localDayOfWeek, {\n unit: 'day'\n });\n\n case 'ccc':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'standalone'\n });\n // T\n\n case 'ccccc':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'standalone'\n });\n // Tu\n\n case 'cccccc':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'standalone'\n });\n // Tuesday\n\n case 'cccc':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'standalone'\n });\n }\n },\n // ISO day of week\n i: function (date, token, localize) {\n var dayOfWeek = date.getUTCDay();\n var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;\n\n switch (token) {\n // 2\n case 'i':\n return String(isoDayOfWeek);\n // 02\n\n case 'ii':\n return addLeadingZeros(isoDayOfWeek, token.length);\n // 2nd\n\n case 'io':\n return localize.ordinalNumber(isoDayOfWeek, {\n unit: 'day'\n });\n // Tue\n\n case 'iii':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // T\n\n case 'iiiii':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'iiiiii':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'formatting'\n });\n // Tuesday\n\n case 'iiii':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // AM or PM\n a: function (date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';\n\n switch (token) {\n case 'a':\n case 'aa':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n });\n\n case 'aaa':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n }).toLowerCase();\n\n case 'aaaaa':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'aaaa':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // AM, PM, midnight, noon\n b: function (date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue;\n\n if (hours === 12) {\n dayPeriodEnumValue = dayPeriodEnum.noon;\n } else if (hours === 0) {\n dayPeriodEnumValue = dayPeriodEnum.midnight;\n } else {\n dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';\n }\n\n switch (token) {\n case 'b':\n case 'bb':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n });\n\n case 'bbb':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n }).toLowerCase();\n\n case 'bbbbb':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'bbbb':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // in the morning, in the afternoon, in the evening, at night\n B: function (date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue;\n\n if (hours >= 17) {\n dayPeriodEnumValue = dayPeriodEnum.evening;\n } else if (hours >= 12) {\n dayPeriodEnumValue = dayPeriodEnum.afternoon;\n } else if (hours >= 4) {\n dayPeriodEnumValue = dayPeriodEnum.morning;\n } else {\n dayPeriodEnumValue = dayPeriodEnum.night;\n }\n\n switch (token) {\n case 'B':\n case 'BB':\n case 'BBB':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n });\n\n case 'BBBBB':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'BBBB':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Hour [1-12]\n h: function (date, token, localize) {\n if (token === 'ho') {\n var hours = date.getUTCHours() % 12;\n if (hours === 0) hours = 12;\n return localize.ordinalNumber(hours, {\n unit: 'hour'\n });\n }\n\n return lightFormatters.h(date, token);\n },\n // Hour [0-23]\n H: function (date, token, localize) {\n if (token === 'Ho') {\n return localize.ordinalNumber(date.getUTCHours(), {\n unit: 'hour'\n });\n }\n\n return lightFormatters.H(date, token);\n },\n // Hour [0-11]\n K: function (date, token, localize) {\n var hours = date.getUTCHours() % 12;\n\n if (token === 'Ko') {\n return localize.ordinalNumber(hours, {\n unit: 'hour'\n });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n // Hour [1-24]\n k: function (date, token, localize) {\n var hours = date.getUTCHours();\n if (hours === 0) hours = 24;\n\n if (token === 'ko') {\n return localize.ordinalNumber(hours, {\n unit: 'hour'\n });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n // Minute\n m: function (date, token, localize) {\n if (token === 'mo') {\n return localize.ordinalNumber(date.getUTCMinutes(), {\n unit: 'minute'\n });\n }\n\n return lightFormatters.m(date, token);\n },\n // Second\n s: function (date, token, localize) {\n if (token === 'so') {\n return localize.ordinalNumber(date.getUTCSeconds(), {\n unit: 'second'\n });\n }\n\n return lightFormatters.s(date, token);\n },\n // Fraction of second\n S: function (date, token) {\n return lightFormatters.S(date, token);\n },\n // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n X: function (date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n if (timezoneOffset === 0) {\n return 'Z';\n }\n\n switch (token) {\n // Hours and optional minutes\n case 'X':\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XX`\n\n case 'XXXX':\n case 'XX':\n // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XXX`\n\n case 'XXXXX':\n case 'XXX': // Hours and minutes with `:` delimiter\n\n default:\n return formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n x: function (date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n switch (token) {\n // Hours and optional minutes\n case 'x':\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xx`\n\n case 'xxxx':\n case 'xx':\n // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xxx`\n\n case 'xxxxx':\n case 'xxx': // Hours and minutes with `:` delimiter\n\n default:\n return formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (GMT)\n O: function (date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n switch (token) {\n // Short\n case 'O':\n case 'OO':\n case 'OOO':\n return 'GMT' + formatTimezoneShort(timezoneOffset, ':');\n // Long\n\n case 'OOOO':\n default:\n return 'GMT' + formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (specific non-location)\n z: function (date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n switch (token) {\n // Short\n case 'z':\n case 'zz':\n case 'zzz':\n return 'GMT' + formatTimezoneShort(timezoneOffset, ':');\n // Long\n\n case 'zzzz':\n default:\n return 'GMT' + formatTimezone(timezoneOffset, ':');\n }\n },\n // Seconds timestamp\n t: function (date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timestamp = Math.floor(originalDate.getTime() / 1000);\n return addLeadingZeros(timestamp, token.length);\n },\n // Milliseconds timestamp\n T: function (date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timestamp = originalDate.getTime();\n return addLeadingZeros(timestamp, token.length);\n }\n};\n\nfunction formatTimezoneShort(offset, dirtyDelimiter) {\n var sign = offset > 0 ? '-' : '+';\n var absOffset = Math.abs(offset);\n var hours = Math.floor(absOffset / 60);\n var minutes = absOffset % 60;\n\n if (minutes === 0) {\n return sign + String(hours);\n }\n\n var delimiter = dirtyDelimiter || '';\n return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);\n}\n\nfunction formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {\n if (offset % 60 === 0) {\n var sign = offset > 0 ? '-' : '+';\n return sign + addLeadingZeros(Math.abs(offset) / 60, 2);\n }\n\n return formatTimezone(offset, dirtyDelimiter);\n}\n\nfunction formatTimezone(offset, dirtyDelimiter) {\n var delimiter = dirtyDelimiter || '';\n var sign = offset > 0 ? '-' : '+';\n var absOffset = Math.abs(offset);\n var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);\n var minutes = addLeadingZeros(absOffset % 60, 2);\n return sign + hours + delimiter + minutes;\n}\n\nexport default formatters;","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_DAY = 86400000; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nexport default function getUTCDayOfYear(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var timestamp = date.getTime();\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n var startOfYearTimestamp = date.getTime();\n var difference = timestamp - startOfYearTimestamp;\n return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;\n}","import isValid from \"../isValid/index.js\";\nimport defaultLocale from \"../locale/en-US/index.js\";\nimport subMilliseconds from \"../subMilliseconds/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport formatters from \"../_lib/format/formatters/index.js\";\nimport longFormatters from \"../_lib/format/longFormatters/index.js\";\nimport getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport { isProtectedDayOfYearToken, isProtectedWeekYearToken, throwProtectedError } from \"../_lib/protectedTokens/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\"; // This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\n\nvar formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g; // This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\n\nvar longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\nvar escapedStringRegExp = /^'([^]*?)'?$/;\nvar doubleQuoteRegExp = /''/g;\nvar unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n/**\n * @name format\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://git.io/fxCyr\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit | Pattern | Result examples | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era | G..GGG | AD, BC | |\n * | | GGGG | Anno Domini, Before Christ | 2 |\n * | | GGGGG | A, B | |\n * | Calendar year | y | 44, 1, 1900, 2017 | 5 |\n * | | yo | 44th, 1st, 0th, 17th | 5,7 |\n * | | yy | 44, 01, 00, 17 | 5 |\n * | | yyy | 044, 001, 1900, 2017 | 5 |\n * | | yyyy | 0044, 0001, 1900, 2017 | 5 |\n * | | yyyyy | ... | 3,5 |\n * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |\n * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |\n * | | YY | 44, 01, 00, 17 | 5,8 |\n * | | YYY | 044, 001, 1900, 2017 | 5 |\n * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |\n * | | YYYYY | ... | 3,5 |\n * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |\n * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |\n * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |\n * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |\n * | | RRRRR | ... | 3,5,7 |\n * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |\n * | | uu | -43, 01, 1900, 2017 | 5 |\n * | | uuu | -043, 001, 1900, 2017 | 5 |\n * | | uuuu | -0043, 0001, 1900, 2017 | 5 |\n * | | uuuuu | ... | 3,5 |\n * | Quarter (formatting) | Q | 1, 2, 3, 4 | |\n * | | Qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | QQ | 01, 02, 03, 04 | |\n * | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |\n * | | qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | qq | 01, 02, 03, 04 | |\n * | | qqq | Q1, Q2, Q3, Q4 | |\n * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | qqqqq | 1, 2, 3, 4 | 4 |\n * | Month (formatting) | M | 1, 2, ..., 12 | |\n * | | Mo | 1st, 2nd, ..., 12th | 7 |\n * | | MM | 01, 02, ..., 12 | |\n * | | MMM | Jan, Feb, ..., Dec | |\n * | | MMMM | January, February, ..., December | 2 |\n * | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | L | 1, 2, ..., 12 | |\n * | | Lo | 1st, 2nd, ..., 12th | 7 |\n * | | LL | 01, 02, ..., 12 | |\n * | | LLL | Jan, Feb, ..., Dec | |\n * | | LLLL | January, February, ..., December | 2 |\n * | | LLLLL | J, F, ..., D | |\n * | Local week of year | w | 1, 2, ..., 53 | |\n * | | wo | 1st, 2nd, ..., 53th | 7 |\n * | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | I | 1, 2, ..., 53 | 7 |\n * | | Io | 1st, 2nd, ..., 53th | 7 |\n * | | II | 01, 02, ..., 53 | 7 |\n * | Day of month | d | 1, 2, ..., 31 | |\n * | | do | 1st, 2nd, ..., 31st | 7 |\n * | | dd | 01, 02, ..., 31 | |\n * | Day of year | D | 1, 2, ..., 365, 366 | 9 |\n * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |\n * | | DD | 01, 02, ..., 365, 366 | 9 |\n * | | DDD | 001, 002, ..., 365, 366 | |\n * | | DDDD | ... | 3 |\n * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | EEEEE | M, T, W, T, F, S, S | |\n * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |\n * | | io | 1st, 2nd, ..., 7th | 7 |\n * | | ii | 01, 02, ..., 07 | 7 |\n * | | iii | Mon, Tue, Wed, ..., Sun | 7 |\n * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |\n * | | iiiii | M, T, W, T, F, S, S | 7 |\n * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |\n * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |\n * | | eo | 2nd, 3rd, ..., 1st | 7 |\n * | | ee | 02, 03, ..., 01 | |\n * | | eee | Mon, Tue, Wed, ..., Sun | |\n * | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | eeeee | M, T, W, T, F, S, S | |\n * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |\n * | | co | 2nd, 3rd, ..., 1st | 7 |\n * | | cc | 02, 03, ..., 01 | |\n * | | ccc | Mon, Tue, Wed, ..., Sun | |\n * | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | ccccc | M, T, W, T, F, S, S | |\n * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | AM, PM | a..aa | AM, PM | |\n * | | aaa | am, pm | |\n * | | aaaa | a.m., p.m. | 2 |\n * | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |\n * | | bbb | am, pm, noon, midnight | |\n * | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | bbbbb | a, p, n, mi | |\n * | Flexible day period | B..BBB | at night, in the morning, ... | |\n * | | BBBB | at night, in the morning, ... | 2 |\n * | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |\n * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |\n * | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |\n * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |\n * | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |\n * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |\n * | | KK | 01, 02, ..., 11, 00 | |\n * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |\n * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |\n * | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | m | 0, 1, ..., 59 | |\n * | | mo | 0th, 1st, ..., 59th | 7 |\n * | | mm | 00, 01, ..., 59 | |\n * | Second | s | 0, 1, ..., 59 | |\n * | | so | 0th, 1st, ..., 59th | 7 |\n * | | ss | 00, 01, ..., 59 | |\n * | Fraction of second | S | 0, 1, ..., 9 | |\n * | | SS | 00, 01, ..., 99 | |\n * | | SSS | 000, 001, ..., 999 | |\n * | | SSSS | ... | 3 |\n * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |\n * | | XX | -0800, +0530, Z | |\n * | | XXX | -08:00, +05:30, Z | |\n * | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |\n * | | xx | -0800, +0530, +0000 | |\n * | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |\n * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |\n * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |\n * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |\n * | Seconds timestamp | t | 512969520 | 7 |\n * | | tt | ... | 3,7 |\n * | Milliseconds timestamp | T | 512969520900 | 7 |\n * | | TT | ... | 3,7 |\n * | Long localized date | P | 04/29/1453 | 7 |\n * | | PP | Apr 29, 1453 | 7 |\n * | | PPP | April 29th, 1453 | 7 |\n * | | PPPP | Friday, April 29th, 1453 | 2,7 |\n * | Long localized time | p | 12:00 AM | 7 |\n * | | pp | 12:00:00 AM | 7 |\n * | | ppp | 12:00:00 AM GMT+2 | 7 |\n * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |\n * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |\n * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |\n * | | PPPppp | April 29th, 1453 at ... | 7 |\n * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n * the output will be the same as default pattern for this unit, usually\n * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n * are marked with \"2\" in the last column of the table.\n *\n * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n * The output will be padded with zeros to match the length of the pattern.\n *\n * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` always returns the last two digits of a year,\n * while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n * | Year | `yy` | `uu` |\n * |------|------|------|\n * | 1 | 01 | 01 |\n * | 14 | 14 | 14 |\n * | 376 | 76 | 376 |\n * | 1453 | 53 | 1453 |\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [getISOWeekYear]{@link https://date-fns.org/docs/getISOWeekYear}\n * and [getWeekYear]{@link https://date-fns.org/docs/getWeekYear}).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n * so right now these tokens fall back to GMT timezones.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `t`: seconds timestamp\n * - `T`: milliseconds timestamp\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://git.io/fxCyr\n *\n * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://git.io/fxCyr\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - The second argument is now required for the sake of explicitness.\n *\n * ```javascript\n * // Before v2.0.0\n * format(new Date(2016, 0, 1))\n *\n * // v2.0.0 onward\n * format(new Date(2016, 0, 1), \"yyyy-MM-dd'T'HH:mm:ss.SSSxxx\")\n * ```\n *\n * - New format string API for `format` function\n * which is based on [Unicode Technical Standard #35](https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table).\n * See [this post](https://blog.date-fns.org/post/unicode-tokens-in-date-fns-v2-sreatyki91jg) for more details.\n *\n * - Characters are now escaped using single quote symbols (`'`) instead of square brackets.\n *\n * @param {Date|Number} date - the original date\n * @param {String} format - the string of tokens\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is\n * @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`;\n * see: https://git.io/fxCyr\n * @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`;\n * see: https://git.io/fxCyr\n * @returns {String} the formatted date string\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `options.locale` must contain `localize` property\n * @throws {RangeError} `options.locale` must contain `formatLong` property\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7\n * @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://git.io/fxCyr\n * @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://git.io/fxCyr\n * @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://git.io/fxCyr\n * @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://git.io/fxCyr\n * @throws {RangeError} format string contains an unescaped latin alphabet character\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * var result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * var result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n * locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * var result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\n\nexport default function format(dirtyDate, dirtyFormatStr, dirtyOptions) {\n requiredArgs(2, arguments);\n var formatStr = String(dirtyFormatStr);\n var options = dirtyOptions || {};\n var locale = options.locale || defaultLocale;\n var localeFirstWeekContainsDate = locale.options && locale.options.firstWeekContainsDate;\n var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);\n var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n }\n\n var localeWeekStartsOn = locale.options && locale.options.weekStartsOn;\n var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);\n var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n if (!locale.localize) {\n throw new RangeError('locale must contain localize property');\n }\n\n if (!locale.formatLong) {\n throw new RangeError('locale must contain formatLong property');\n }\n\n var originalDate = toDate(dirtyDate);\n\n if (!isValid(originalDate)) {\n throw new RangeError('Invalid time value');\n } // Convert the date in system timezone to the same date in UTC+00:00 timezone.\n // This ensures that when UTC functions will be implemented, locales will be compatible with them.\n // See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376\n\n\n var timezoneOffset = getTimezoneOffsetInMilliseconds(originalDate);\n var utcDate = subMilliseconds(originalDate, timezoneOffset);\n var formatterOptions = {\n firstWeekContainsDate: firstWeekContainsDate,\n weekStartsOn: weekStartsOn,\n locale: locale,\n _originalDate: originalDate\n };\n var result = formatStr.match(longFormattingTokensRegExp).map(function (substring) {\n var firstCharacter = substring[0];\n\n if (firstCharacter === 'p' || firstCharacter === 'P') {\n var longFormatter = longFormatters[firstCharacter];\n return longFormatter(substring, locale.formatLong, formatterOptions);\n }\n\n return substring;\n }).join('').match(formattingTokensRegExp).map(function (substring) {\n // Replace two single quote characters with one single quote character\n if (substring === \"''\") {\n return \"'\";\n }\n\n var firstCharacter = substring[0];\n\n if (firstCharacter === \"'\") {\n return cleanEscapedString(substring);\n }\n\n var formatter = formatters[firstCharacter];\n\n if (formatter) {\n if (!options.useAdditionalWeekYearTokens && isProtectedWeekYearToken(substring)) {\n throwProtectedError(substring, dirtyFormatStr, dirtyDate);\n }\n\n if (!options.useAdditionalDayOfYearTokens && isProtectedDayOfYearToken(substring)) {\n throwProtectedError(substring, dirtyFormatStr, dirtyDate);\n }\n\n return formatter(utcDate, substring, locale.localize, formatterOptions);\n }\n\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');\n }\n\n return substring;\n }).join('');\n return result;\n}\n\nfunction cleanEscapedString(input) {\n return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, \"'\");\n}","import isDate from \"../isDate/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - Now `isValid` doesn't throw an exception\n * if the first argument is not an instance of Date.\n * Instead, argument is converted beforehand using `toDate`.\n *\n * Examples:\n *\n * | `isValid` argument | Before v2.0.0 | v2.0.0 onward |\n * |---------------------------|---------------|---------------|\n * | `new Date()` | `true` | `true` |\n * | `new Date('2016-01-01')` | `true` | `true` |\n * | `new Date('')` | `false` | `false` |\n * | `new Date(1488370835081)` | `true` | `true` |\n * | `new Date(NaN)` | `false` | `false` |\n * | `'2016-01-01'` | `TypeError` | `false` |\n * | `''` | `TypeError` | `false` |\n * | `1488370835081` | `TypeError` | `true` |\n * | `NaN` | `TypeError` | `false` |\n *\n * We introduce this change to make *date-fns* consistent with ECMAScript behavior\n * that try to coerce arguments to the expected type\n * (which is also the case with other *date-fns* functions).\n *\n * @param {*} date - the date to check\n * @returns {Boolean} the date is valid\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // For the valid date:\n * const result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertable into a date:\n * const result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * const result = isValid(new Date(''))\n * //=> false\n */\n\nexport default function isValid(dirtyDate) {\n requiredArgs(1, arguments);\n\n if (!isDate(dirtyDate) && typeof dirtyDate !== 'number') {\n return false;\n }\n\n var date = toDate(dirtyDate);\n return !isNaN(Number(date));\n}","import requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isDate\n * @category Common Helpers\n * @summary Is the given value a date?\n *\n * @description\n * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {*} value - the value to check\n * @returns {boolean} true if the given value is a date\n * @throws {TypeError} 1 arguments required\n *\n * @example\n * // For a valid date:\n * const result = isDate(new Date())\n * //=> true\n *\n * @example\n * // For an invalid date:\n * const result = isDate(new Date(NaN))\n * //=> true\n *\n * @example\n * // For some value:\n * const result = isDate('2014-02-31')\n * //=> false\n *\n * @example\n * // For an object:\n * const result = isDate({})\n * //=> false\n */\n\nexport default function isDate(value) {\n requiredArgs(1, arguments);\n return value instanceof Date || typeof value === 'object' && Object.prototype.toString.call(value) === '[object Date]';\n}","var formatDistanceLocale = {\n lessThanXSeconds: {\n one: 'less than a second',\n other: 'less than {{count}} seconds'\n },\n xSeconds: {\n one: '1 second',\n other: '{{count}} seconds'\n },\n halfAMinute: 'half a minute',\n lessThanXMinutes: {\n one: 'less than a minute',\n other: 'less than {{count}} minutes'\n },\n xMinutes: {\n one: '1 minute',\n other: '{{count}} minutes'\n },\n aboutXHours: {\n one: 'about 1 hour',\n other: 'about {{count}} hours'\n },\n xHours: {\n one: '1 hour',\n other: '{{count}} hours'\n },\n xDays: {\n one: '1 day',\n other: '{{count}} days'\n },\n aboutXWeeks: {\n one: 'about 1 week',\n other: 'about {{count}} weeks'\n },\n xWeeks: {\n one: '1 week',\n other: '{{count}} weeks'\n },\n aboutXMonths: {\n one: 'about 1 month',\n other: 'about {{count}} months'\n },\n xMonths: {\n one: '1 month',\n other: '{{count}} months'\n },\n aboutXYears: {\n one: 'about 1 year',\n other: 'about {{count}} years'\n },\n xYears: {\n one: '1 year',\n other: '{{count}} years'\n },\n overXYears: {\n one: 'over 1 year',\n other: 'over {{count}} years'\n },\n almostXYears: {\n one: 'almost 1 year',\n other: 'almost {{count}} years'\n }\n};\n\nvar formatDistance = function (token, count, options) {\n var result;\n var tokenValue = formatDistanceLocale[token];\n\n if (typeof tokenValue === 'string') {\n result = tokenValue;\n } else if (count === 1) {\n result = tokenValue.one;\n } else {\n result = tokenValue.other.replace('{{count}}', count.toString());\n }\n\n if (options !== null && options !== void 0 && options.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n return 'in ' + result;\n } else {\n return result + ' ago';\n }\n }\n\n return result;\n};\n\nexport default formatDistance;","export default function buildFormatLongFn(args) {\n return function () {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n // TODO: Remove String()\n var width = options.width ? String(options.width) : args.defaultWidth;\n var format = args.formats[width] || args.formats[args.defaultWidth];\n return format;\n };\n}","import buildFormatLongFn from \"../../../_lib/buildFormatLongFn/index.js\";\nvar dateFormats = {\n full: 'EEEE, MMMM do, y',\n long: 'MMMM do, y',\n medium: 'MMM d, y',\n short: 'MM/dd/yyyy'\n};\nvar timeFormats = {\n full: 'h:mm:ss a zzzz',\n long: 'h:mm:ss a z',\n medium: 'h:mm:ss a',\n short: 'h:mm a'\n};\nvar dateTimeFormats = {\n full: \"{{date}} 'at' {{time}}\",\n long: \"{{date}} 'at' {{time}}\",\n medium: '{{date}}, {{time}}',\n short: '{{date}}, {{time}}'\n};\nvar formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: 'full'\n }),\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: 'full'\n }),\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: 'full'\n })\n};\nexport default formatLong;","var formatRelativeLocale = {\n lastWeek: \"'last' eeee 'at' p\",\n yesterday: \"'yesterday at' p\",\n today: \"'today at' p\",\n tomorrow: \"'tomorrow at' p\",\n nextWeek: \"eeee 'at' p\",\n other: 'P'\n};\n\nvar formatRelative = function (token, _date, _baseDate, _options) {\n return formatRelativeLocale[token];\n};\n\nexport default formatRelative;","export default function buildLocalizeFn(args) {\n return function (dirtyIndex, dirtyOptions) {\n var options = dirtyOptions || {};\n var context = options.context ? String(options.context) : 'standalone';\n var valuesArray;\n\n if (context === 'formatting' && args.formattingValues) {\n var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n var width = options.width ? String(options.width) : defaultWidth;\n valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];\n } else {\n var _defaultWidth = args.defaultWidth;\n\n var _width = options.width ? String(options.width) : args.defaultWidth;\n\n valuesArray = args.values[_width] || args.values[_defaultWidth];\n }\n\n var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex; // @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n\n return valuesArray[index];\n };\n}","export default function buildMatchFn(args) {\n return function (string) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var width = options.width;\n var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];\n var matchResult = string.match(matchPattern);\n\n if (!matchResult) {\n return null;\n }\n\n var matchedString = matchResult[0];\n var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];\n var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {\n return pattern.test(matchedString);\n }) : findKey(parsePatterns, function (pattern) {\n return pattern.test(matchedString);\n });\n var value;\n value = args.valueCallback ? args.valueCallback(key) : key;\n value = options.valueCallback ? options.valueCallback(value) : value;\n var rest = string.slice(matchedString.length);\n return {\n value: value,\n rest: rest\n };\n };\n}\n\nfunction findKey(object, predicate) {\n for (var key in object) {\n if (object.hasOwnProperty(key) && predicate(object[key])) {\n return key;\n }\n }\n\n return undefined;\n}\n\nfunction findIndex(array, predicate) {\n for (var key = 0; key < array.length; key++) {\n if (predicate(array[key])) {\n return key;\n }\n }\n\n return undefined;\n}","import buildMatchFn from \"../../../_lib/buildMatchFn/index.js\";\nimport buildMatchPatternFn from \"../../../_lib/buildMatchPatternFn/index.js\";\nvar matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nvar parseOrdinalNumberPattern = /\\d+/i;\nvar matchEraPatterns = {\n narrow: /^(b|a)/i,\n abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n wide: /^(before christ|before common era|anno domini|common era)/i\n};\nvar parseEraPatterns = {\n any: [/^b/i, /^(a|c)/i]\n};\nvar matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^q[1234]/i,\n wide: /^[1234](th|st|nd|rd)? quarter/i\n};\nvar parseQuarterPatterns = {\n any: [/1/i, /2/i, /3/i, /4/i]\n};\nvar matchMonthPatterns = {\n narrow: /^[jfmasond]/i,\n abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i\n};\nvar parseMonthPatterns = {\n narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],\n any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]\n};\nvar matchDayPatterns = {\n narrow: /^[smtwf]/i,\n short: /^(su|mo|tu|we|th|fr|sa)/i,\n abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i\n};\nvar parseDayPatterns = {\n narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]\n};\nvar matchDayPeriodPatterns = {\n narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i\n};\nvar parseDayPeriodPatterns = {\n any: {\n am: /^a/i,\n pm: /^p/i,\n midnight: /^mi/i,\n noon: /^no/i,\n morning: /morning/i,\n afternoon: /afternoon/i,\n evening: /evening/i,\n night: /night/i\n }\n};\nvar match = {\n ordinalNumber: buildMatchPatternFn({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: function (value) {\n return parseInt(value, 10);\n }\n }),\n era: buildMatchFn({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseEraPatterns,\n defaultParseWidth: 'any'\n }),\n quarter: buildMatchFn({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: 'any',\n valueCallback: function (index) {\n return index + 1;\n }\n }),\n month: buildMatchFn({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: 'any'\n }),\n day: buildMatchFn({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseDayPatterns,\n defaultParseWidth: 'any'\n }),\n dayPeriod: buildMatchFn({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: 'any',\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: 'any'\n })\n};\nexport default match;","export default function buildMatchPatternFn(args) {\n return function (string) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var matchResult = string.match(args.matchPattern);\n if (!matchResult) return null;\n var matchedString = matchResult[0];\n var parseResult = string.match(args.parsePattern);\n if (!parseResult) return null;\n var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];\n value = options.valueCallback ? options.valueCallback(value) : value;\n var rest = string.slice(matchedString.length);\n return {\n value: value,\n rest: rest\n };\n };\n}","import formatDistance from \"./_lib/formatDistance/index.js\";\nimport formatLong from \"./_lib/formatLong/index.js\";\nimport formatRelative from \"./_lib/formatRelative/index.js\";\nimport localize from \"./_lib/localize/index.js\";\nimport match from \"./_lib/match/index.js\";\n\n/**\n * @type {Locale}\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp}\n * @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}\n */\nvar locale = {\n code: 'en-US',\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 0\n /* Sunday */\n ,\n firstWeekContainsDate: 1\n }\n};\nexport default locale;","import buildLocalizeFn from \"../../../_lib/buildLocalizeFn/index.js\";\nvar eraValues = {\n narrow: ['B', 'A'],\n abbreviated: ['BC', 'AD'],\n wide: ['Before Christ', 'Anno Domini']\n};\nvar quarterValues = {\n narrow: ['1', '2', '3', '4'],\n abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],\n wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter']\n}; // Note: in English, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\n\nvar monthValues = {\n narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],\n abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']\n};\nvar dayValues = {\n narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],\n short: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\n abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']\n};\nvar dayPeriodValues = {\n narrow: {\n am: 'a',\n pm: 'p',\n midnight: 'mi',\n noon: 'n',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n },\n abbreviated: {\n am: 'AM',\n pm: 'PM',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n },\n wide: {\n am: 'a.m.',\n pm: 'p.m.',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n }\n};\nvar formattingDayPeriodValues = {\n narrow: {\n am: 'a',\n pm: 'p',\n midnight: 'mi',\n noon: 'n',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n },\n abbreviated: {\n am: 'AM',\n pm: 'PM',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n },\n wide: {\n am: 'a.m.',\n pm: 'p.m.',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n }\n};\n\nvar ordinalNumber = function (dirtyNumber, _options) {\n var number = Number(dirtyNumber); // If ordinal numbers depend on context, for example,\n // if they are different for different grammatical genders,\n // use `options.unit`.\n //\n // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n // 'day', 'hour', 'minute', 'second'.\n\n var rem100 = number % 100;\n\n if (rem100 > 20 || rem100 < 10) {\n switch (rem100 % 10) {\n case 1:\n return number + 'st';\n\n case 2:\n return number + 'nd';\n\n case 3:\n return number + 'rd';\n }\n }\n\n return number + 'th';\n};\n\nvar localize = {\n ordinalNumber: ordinalNumber,\n era: buildLocalizeFn({\n values: eraValues,\n defaultWidth: 'wide'\n }),\n quarter: buildLocalizeFn({\n values: quarterValues,\n defaultWidth: 'wide',\n argumentCallback: function (quarter) {\n return quarter - 1;\n }\n }),\n month: buildLocalizeFn({\n values: monthValues,\n defaultWidth: 'wide'\n }),\n day: buildLocalizeFn({\n values: dayValues,\n defaultWidth: 'wide'\n }),\n dayPeriod: buildLocalizeFn({\n values: dayPeriodValues,\n defaultWidth: 'wide',\n formattingValues: formattingDayPeriodValues,\n defaultFormattingWidth: 'wide'\n })\n};\nexport default localize;","/**\n * Days in 1 week.\n *\n * @name daysInWeek\n * @constant\n * @type {number}\n * @default\n */\nexport var daysInWeek = 7;\n/**\n * Maximum allowed time.\n *\n * @name maxTime\n * @constant\n * @type {number}\n * @default\n */\n\nexport var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n/**\n * Milliseconds in 1 minute\n *\n * @name millisecondsInMinute\n * @constant\n * @type {number}\n * @default\n */\n\nexport var millisecondsInMinute = 60000;\n/**\n * Milliseconds in 1 hour\n *\n * @name millisecondsInHour\n * @constant\n * @type {number}\n * @default\n */\n\nexport var millisecondsInHour = 3600000;\n/**\n * Milliseconds in 1 second\n *\n * @name millisecondsInSecond\n * @constant\n * @type {number}\n * @default\n */\n\nexport var millisecondsInSecond = 1000;\n/**\n * Minimum allowed time.\n *\n * @name minTime\n * @constant\n * @type {number}\n * @default\n */\n\nexport var minTime = -maxTime;\n/**\n * Minutes in 1 hour\n *\n * @name minutesInHour\n * @constant\n * @type {number}\n * @default\n */\n\nexport var minutesInHour = 60;\n/**\n * Months in 1 quarter\n *\n * @name monthsInQuarter\n * @constant\n * @type {number}\n * @default\n */\n\nexport var monthsInQuarter = 3;\n/**\n * Months in 1 year\n *\n * @name monthsInYear\n * @constant\n * @type {number}\n * @default\n */\n\nexport var monthsInYear = 12;\n/**\n * Quarters in 1 year\n *\n * @name quartersInYear\n * @constant\n * @type {number}\n * @default\n */\n\nexport var quartersInYear = 4;\n/**\n * Seconds in 1 hour\n *\n * @name secondsInHour\n * @constant\n * @type {number}\n * @default\n */\n\nexport var secondsInHour = 3600;\n/**\n * Seconds in 1 minute\n *\n * @name secondsInMinute\n * @constant\n * @type {number}\n * @default\n */\n\nexport var secondsInMinute = 60;","import { millisecondsInHour, millisecondsInMinute } from \"../constants/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\n/**\n * @name parseISO\n * @category Common Helpers\n * @summary Parse ISO string\n *\n * @description\n * Parse the given string in ISO 8601 format and return an instance of Date.\n *\n * Function accepts complete ISO 8601 formats as well as partial implementations.\n * ISO 8601: http://en.wikipedia.org/wiki/ISO_8601\n *\n * If the argument isn't a string, the function cannot parse the string or\n * the values are invalid, it returns Invalid Date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - The previous `parse` implementation was renamed to `parseISO`.\n *\n * ```javascript\n * // Before v2.0.0\n * parse('2016-01-01')\n *\n * // v2.0.0 onward\n * parseISO('2016-01-01')\n * ```\n *\n * - `parseISO` now validates separate date and time values in ISO-8601 strings\n * and returns `Invalid Date` if the date is invalid.\n *\n * ```javascript\n * parseISO('2018-13-32')\n * //=> Invalid Date\n * ```\n *\n * - `parseISO` now doesn't fall back to `new Date` constructor\n * if it fails to parse a string argument. Instead, it returns `Invalid Date`.\n *\n * @param {String} argument - the value to convert\n * @param {Object} [options] - an object with options.\n * @param {0|1|2} [options.additionalDigits=2] - the additional number of digits in the extended year format\n * @returns {Date} the parsed date in the local time zone\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2\n *\n * @example\n * // Convert string '2014-02-11T11:30:30' to date:\n * const result = parseISO('2014-02-11T11:30:30')\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert string '+02014101' to date,\n * // if the additional number of digits in the extended year format is 1:\n * const result = parseISO('+02014101', { additionalDigits: 1 })\n * //=> Fri Apr 11 2014 00:00:00\n */\n\nexport default function parseISO(argument, dirtyOptions) {\n requiredArgs(1, arguments);\n var options = dirtyOptions || {};\n var additionalDigits = options.additionalDigits == null ? 2 : toInteger(options.additionalDigits);\n\n if (additionalDigits !== 2 && additionalDigits !== 1 && additionalDigits !== 0) {\n throw new RangeError('additionalDigits must be 0, 1 or 2');\n }\n\n if (!(typeof argument === 'string' || Object.prototype.toString.call(argument) === '[object String]')) {\n return new Date(NaN);\n }\n\n var dateStrings = splitDateString(argument);\n var date;\n\n if (dateStrings.date) {\n var parseYearResult = parseYear(dateStrings.date, additionalDigits);\n date = parseDate(parseYearResult.restDateString, parseYearResult.year);\n }\n\n if (!date || isNaN(date.getTime())) {\n return new Date(NaN);\n }\n\n var timestamp = date.getTime();\n var time = 0;\n var offset;\n\n if (dateStrings.time) {\n time = parseTime(dateStrings.time);\n\n if (isNaN(time)) {\n return new Date(NaN);\n }\n }\n\n if (dateStrings.timezone) {\n offset = parseTimezone(dateStrings.timezone);\n\n if (isNaN(offset)) {\n return new Date(NaN);\n }\n } else {\n var dirtyDate = new Date(timestamp + time); // js parsed string assuming it's in UTC timezone\n // but we need it to be parsed in our timezone\n // so we use utc values to build date in our timezone.\n // Year values from 0 to 99 map to the years 1900 to 1999\n // so set year explicitly with setFullYear.\n\n var result = new Date(0);\n result.setFullYear(dirtyDate.getUTCFullYear(), dirtyDate.getUTCMonth(), dirtyDate.getUTCDate());\n result.setHours(dirtyDate.getUTCHours(), dirtyDate.getUTCMinutes(), dirtyDate.getUTCSeconds(), dirtyDate.getUTCMilliseconds());\n return result;\n }\n\n return new Date(timestamp + time + offset);\n}\nvar patterns = {\n dateTimeDelimiter: /[T ]/,\n timeZoneDelimiter: /[Z ]/i,\n timezone: /([Z+-].*)$/\n};\nvar dateRegex = /^-?(?:(\\d{3})|(\\d{2})(?:-?(\\d{2}))?|W(\\d{2})(?:-?(\\d{1}))?|)$/;\nvar timeRegex = /^(\\d{2}(?:[.,]\\d*)?)(?::?(\\d{2}(?:[.,]\\d*)?))?(?::?(\\d{2}(?:[.,]\\d*)?))?$/;\nvar timezoneRegex = /^([+-])(\\d{2})(?::?(\\d{2}))?$/;\n\nfunction splitDateString(dateString) {\n var dateStrings = {};\n var array = dateString.split(patterns.dateTimeDelimiter);\n var timeString; // The regex match should only return at maximum two array elements.\n // [date], [time], or [date, time].\n\n if (array.length > 2) {\n return dateStrings;\n }\n\n if (/:/.test(array[0])) {\n timeString = array[0];\n } else {\n dateStrings.date = array[0];\n timeString = array[1];\n\n if (patterns.timeZoneDelimiter.test(dateStrings.date)) {\n dateStrings.date = dateString.split(patterns.timeZoneDelimiter)[0];\n timeString = dateString.substr(dateStrings.date.length, dateString.length);\n }\n }\n\n if (timeString) {\n var token = patterns.timezone.exec(timeString);\n\n if (token) {\n dateStrings.time = timeString.replace(token[1], '');\n dateStrings.timezone = token[1];\n } else {\n dateStrings.time = timeString;\n }\n }\n\n return dateStrings;\n}\n\nfunction parseYear(dateString, additionalDigits) {\n var regex = new RegExp('^(?:(\\\\d{4}|[+-]\\\\d{' + (4 + additionalDigits) + '})|(\\\\d{2}|[+-]\\\\d{' + (2 + additionalDigits) + '})$)');\n var captures = dateString.match(regex); // Invalid ISO-formatted year\n\n if (!captures) return {\n year: NaN,\n restDateString: ''\n };\n var year = captures[1] ? parseInt(captures[1]) : null;\n var century = captures[2] ? parseInt(captures[2]) : null; // either year or century is null, not both\n\n return {\n year: century === null ? year : century * 100,\n restDateString: dateString.slice((captures[1] || captures[2]).length)\n };\n}\n\nfunction parseDate(dateString, year) {\n // Invalid ISO-formatted year\n if (year === null) return new Date(NaN);\n var captures = dateString.match(dateRegex); // Invalid ISO-formatted string\n\n if (!captures) return new Date(NaN);\n var isWeekDate = !!captures[4];\n var dayOfYear = parseDateUnit(captures[1]);\n var month = parseDateUnit(captures[2]) - 1;\n var day = parseDateUnit(captures[3]);\n var week = parseDateUnit(captures[4]);\n var dayOfWeek = parseDateUnit(captures[5]) - 1;\n\n if (isWeekDate) {\n if (!validateWeekDate(year, week, dayOfWeek)) {\n return new Date(NaN);\n }\n\n return dayOfISOWeekYear(year, week, dayOfWeek);\n } else {\n var date = new Date(0);\n\n if (!validateDate(year, month, day) || !validateDayOfYearDate(year, dayOfYear)) {\n return new Date(NaN);\n }\n\n date.setUTCFullYear(year, month, Math.max(dayOfYear, day));\n return date;\n }\n}\n\nfunction parseDateUnit(value) {\n return value ? parseInt(value) : 1;\n}\n\nfunction parseTime(timeString) {\n var captures = timeString.match(timeRegex);\n if (!captures) return NaN; // Invalid ISO-formatted time\n\n var hours = parseTimeUnit(captures[1]);\n var minutes = parseTimeUnit(captures[2]);\n var seconds = parseTimeUnit(captures[3]);\n\n if (!validateTime(hours, minutes, seconds)) {\n return NaN;\n }\n\n return hours * millisecondsInHour + minutes * millisecondsInMinute + seconds * 1000;\n}\n\nfunction parseTimeUnit(value) {\n return value && parseFloat(value.replace(',', '.')) || 0;\n}\n\nfunction parseTimezone(timezoneString) {\n if (timezoneString === 'Z') return 0;\n var captures = timezoneString.match(timezoneRegex);\n if (!captures) return 0;\n var sign = captures[1] === '+' ? -1 : 1;\n var hours = parseInt(captures[2]);\n var minutes = captures[3] && parseInt(captures[3]) || 0;\n\n if (!validateTimezone(hours, minutes)) {\n return NaN;\n }\n\n return sign * (hours * millisecondsInHour + minutes * millisecondsInMinute);\n}\n\nfunction dayOfISOWeekYear(isoWeekYear, week, day) {\n var date = new Date(0);\n date.setUTCFullYear(isoWeekYear, 0, 4);\n var fourthOfJanuaryDay = date.getUTCDay() || 7;\n var diff = (week - 1) * 7 + day + 1 - fourthOfJanuaryDay;\n date.setUTCDate(date.getUTCDate() + diff);\n return date;\n} // Validation functions\n// February is null to handle the leap year (using ||)\n\n\nvar daysInMonths = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n\nfunction isLeapYearIndex(year) {\n return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0;\n}\n\nfunction validateDate(year, month, date) {\n return month >= 0 && month <= 11 && date >= 1 && date <= (daysInMonths[month] || (isLeapYearIndex(year) ? 29 : 28));\n}\n\nfunction validateDayOfYearDate(year, dayOfYear) {\n return dayOfYear >= 1 && dayOfYear <= (isLeapYearIndex(year) ? 366 : 365);\n}\n\nfunction validateWeekDate(_year, week, day) {\n return week >= 1 && week <= 53 && day >= 0 && day <= 6;\n}\n\nfunction validateTime(hours, minutes, seconds) {\n if (hours === 24) {\n return minutes === 0 && seconds === 0;\n }\n\n return seconds >= 0 && seconds < 60 && minutes >= 0 && minutes < 60 && hours >= 0 && hours < 25;\n}\n\nfunction validateTimezone(_hours, minutes) {\n return minutes >= 0 && minutes <= 59;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMilliseconds from \"../addMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name subMilliseconds\n * @category Millisecond Helpers\n * @summary Subtract the specified number of milliseconds from the given date.\n *\n * @description\n * Subtract the specified number of milliseconds from the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the milliseconds subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:\n * const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:29.250\n */\n\nexport default function subMilliseconds(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMilliseconds(dirtyDate, -amount);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addMilliseconds\n * @category Millisecond Helpers\n * @summary Add the specified number of milliseconds to the given date.\n *\n * @description\n * Add the specified number of milliseconds to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the milliseconds added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 750 milliseconds to 10 July 2014 12:45:30.000:\n * const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:30.750\n */\n\nexport default function addMilliseconds(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var timestamp = toDate(dirtyDate).getTime();\n var amount = toInteger(dirtyAmount);\n return new Date(timestamp + amount);\n}","import requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @param {Date|Number} argument - the value to convert\n * @returns {Date} the parsed date in the local time zone\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\n\nexport default function toDate(argument) {\n requiredArgs(1, arguments);\n var argStr = Object.prototype.toString.call(argument); // Clone the date\n\n if (argument instanceof Date || typeof argument === 'object' && argStr === '[object Date]') {\n // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n return new Date(argument.getTime());\n } else if (typeof argument === 'number' || argStr === '[object Number]') {\n return new Date(argument);\n } else {\n if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {\n // eslint-disable-next-line no-console\n console.warn(\"Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule\"); // eslint-disable-next-line no-console\n\n console.warn(new Error().stack);\n }\n\n return new Date(NaN);\n }\n}","/**\n * Returns a function, that, as long as it continues to be invoked, will not\n * be triggered. The function will be called after it stops being called for\n * N milliseconds. If `immediate` is passed, trigger the function on the\n * leading edge, instead of the trailing. The function also has a property 'clear' \n * that is a function which will clear the timer to prevent previously scheduled executions. \n *\n * @source underscore.js\n * @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/\n * @param {Function} function to wrap\n * @param {Number} timeout in ms (`100`)\n * @param {Boolean} whether to execute at the beginning (`false`)\n * @api public\n */\nfunction debounce(func, wait, immediate){\n var timeout, args, context, timestamp, result;\n if (null == wait) wait = 100;\n\n function later() {\n var last = Date.now() - timestamp;\n\n if (last < wait && last >= 0) {\n timeout = setTimeout(later, wait - last);\n } else {\n timeout = null;\n if (!immediate) {\n result = func.apply(context, args);\n context = args = null;\n }\n }\n };\n\n var debounced = function(){\n context = this;\n args = arguments;\n timestamp = Date.now();\n var callNow = immediate && !timeout;\n if (!timeout) timeout = setTimeout(later, wait);\n if (callNow) {\n result = func.apply(context, args);\n context = args = null;\n }\n\n return result;\n };\n\n debounced.clear = function() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n };\n \n debounced.flush = function() {\n if (timeout) {\n result = func.apply(context, args);\n context = args = null;\n \n clearTimeout(timeout);\n timeout = null;\n }\n };\n\n return debounced;\n};\n\n// Adds compatibility for ES modules\ndebounce.debounce = debounce;\n\nmodule.exports = debounce;\n","'use strict';\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nmodule.exports = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (key === '_owner' && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner.\n // _owner contains circular references\n // and is not needed when comparing the actual elements (and not their owners)\n continue;\n }\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n","/*\n* FileSaver.js\n* A saveAs() FileSaver implementation.\n*\n* By Eli Grey, http://eligrey.com\n*\n* License : https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md (MIT)\n* source : http://purl.eligrey.com/github/FileSaver.js\n*/\n\n// The one and only way of getting global scope in all environments\n// https://stackoverflow.com/q/3277182/1008999\nvar _global = typeof window === 'object' && window.window === window\n ? window : typeof self === 'object' && self.self === self\n ? self : typeof global === 'object' && global.global === global\n ? global\n : this\n\nfunction bom (blob, opts) {\n if (typeof opts === 'undefined') opts = { autoBom: false }\n else if (typeof opts !== 'object') {\n console.warn('Deprecated: Expected third argument to be a object')\n opts = { autoBom: !opts }\n }\n\n // prepend BOM for UTF-8 XML and text/* types (including HTML)\n // note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF\n if (opts.autoBom && /^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(blob.type)) {\n return new Blob([String.fromCharCode(0xFEFF), blob], { type: blob.type })\n }\n return blob\n}\n\nfunction download (url, name, opts) {\n var xhr = new XMLHttpRequest()\n xhr.open('GET', url)\n xhr.responseType = 'blob'\n xhr.onload = function () {\n saveAs(xhr.response, name, opts)\n }\n xhr.onerror = function () {\n console.error('could not download file')\n }\n xhr.send()\n}\n\nfunction corsEnabled (url) {\n var xhr = new XMLHttpRequest()\n // use sync to avoid popup blocker\n xhr.open('HEAD', url, false)\n try {\n xhr.send()\n } catch (e) {}\n return xhr.status >= 200 && xhr.status <= 299\n}\n\n// `a.click()` doesn't work for all browsers (#465)\nfunction click (node) {\n try {\n node.dispatchEvent(new MouseEvent('click'))\n } catch (e) {\n var evt = document.createEvent('MouseEvents')\n evt.initMouseEvent('click', true, true, window, 0, 0, 0, 80,\n 20, false, false, false, false, 0, null)\n node.dispatchEvent(evt)\n }\n}\n\n// Detect WebView inside a native macOS app by ruling out all browsers\n// We just need to check for 'Safari' because all other browsers (besides Firefox) include that too\n// https://www.whatismybrowser.com/guides/the-latest-user-agent/macos\nvar isMacOSWebView = _global.navigator && /Macintosh/.test(navigator.userAgent) && /AppleWebKit/.test(navigator.userAgent) && !/Safari/.test(navigator.userAgent)\n\nvar saveAs = _global.saveAs || (\n // probably in some web worker\n (typeof window !== 'object' || window !== _global)\n ? function saveAs () { /* noop */ }\n\n // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView\n : ('download' in HTMLAnchorElement.prototype && !isMacOSWebView)\n ? function saveAs (blob, name, opts) {\n var URL = _global.URL || _global.webkitURL\n var a = document.createElement('a')\n name = name || blob.name || 'download'\n\n a.download = name\n a.rel = 'noopener' // tabnabbing\n\n // TODO: detect chrome extensions & packaged apps\n // a.target = '_blank'\n\n if (typeof blob === 'string') {\n // Support regular links\n a.href = blob\n if (a.origin !== location.origin) {\n corsEnabled(a.href)\n ? download(blob, name, opts)\n : click(a, a.target = '_blank')\n } else {\n click(a)\n }\n } else {\n // Support blobs\n a.href = URL.createObjectURL(blob)\n setTimeout(function () { URL.revokeObjectURL(a.href) }, 4E4) // 40s\n setTimeout(function () { click(a) }, 0)\n }\n }\n\n // Use msSaveOrOpenBlob as a second approach\n : 'msSaveOrOpenBlob' in navigator\n ? function saveAs (blob, name, opts) {\n name = name || blob.name || 'download'\n\n if (typeof blob === 'string') {\n if (corsEnabled(blob)) {\n download(blob, name, opts)\n } else {\n var a = document.createElement('a')\n a.href = blob\n a.target = '_blank'\n setTimeout(function () { click(a) })\n }\n } else {\n navigator.msSaveOrOpenBlob(bom(blob, opts), name)\n }\n }\n\n // Fallback to using FileReader and a popup\n : function saveAs (blob, name, opts, popup) {\n // Open a popup immediately do go around popup blocker\n // Mostly only available on user interaction and the fileReader is async so...\n popup = popup || open('', '_blank')\n if (popup) {\n popup.document.title =\n popup.document.body.innerText = 'downloading...'\n }\n\n if (typeof blob === 'string') return download(blob, name, opts)\n\n var force = blob.type === 'application/octet-stream'\n var isSafari = /constructor/i.test(_global.HTMLElement) || _global.safari\n var isChromeIOS = /CriOS\\/[\\d]+/.test(navigator.userAgent)\n\n if ((isChromeIOS || (force && isSafari) || isMacOSWebView) && typeof FileReader !== 'undefined') {\n // Safari doesn't allow downloading of blob URLs\n var reader = new FileReader()\n reader.onloadend = function () {\n var url = reader.result\n url = isChromeIOS ? url : url.replace(/^data:[^;]*;/, 'data:attachment/file;')\n if (popup) popup.location.href = url\n else location = url\n popup = null // reverse-tabnabbing #460\n }\n reader.readAsDataURL(blob)\n } else {\n var URL = _global.URL || _global.webkitURL\n var url = URL.createObjectURL(blob)\n if (popup) popup.location = url\n else location.href = url\n popup = null // reverse-tabnabbing #460\n setTimeout(function () { URL.revokeObjectURL(url) }, 4E4) // 40s\n }\n }\n)\n\n_global.saveAs = saveAs.saveAs = saveAs\n\nif (typeof module !== 'undefined') {\n module.exports = saveAs;\n}\n","function isAbsolute(pathname) {\n return pathname.charAt(0) === '/';\n}\n\n// About 1.5x faster than the two-arg version of Array#splice()\nfunction spliceOne(list, index) {\n for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {\n list[i] = list[k];\n }\n\n list.pop();\n}\n\n// This implementation is based heavily on node's url.parse\nfunction resolvePathname(to, from) {\n if (from === undefined) from = '';\n\n var toParts = (to && to.split('/')) || [];\n var fromParts = (from && from.split('/')) || [];\n\n var isToAbs = to && isAbsolute(to);\n var isFromAbs = from && isAbsolute(from);\n var mustEndAbs = isToAbs || isFromAbs;\n\n if (to && isAbsolute(to)) {\n // to is absolute\n fromParts = toParts;\n } else if (toParts.length) {\n // to is relative, drop the filename\n fromParts.pop();\n fromParts = fromParts.concat(toParts);\n }\n\n if (!fromParts.length) return '/';\n\n var hasTrailingSlash;\n if (fromParts.length) {\n var last = fromParts[fromParts.length - 1];\n hasTrailingSlash = last === '.' || last === '..' || last === '';\n } else {\n hasTrailingSlash = false;\n }\n\n var up = 0;\n for (var i = fromParts.length; i >= 0; i--) {\n var part = fromParts[i];\n\n if (part === '.') {\n spliceOne(fromParts, i);\n } else if (part === '..') {\n spliceOne(fromParts, i);\n up++;\n } else if (up) {\n spliceOne(fromParts, i);\n up--;\n }\n }\n\n if (!mustEndAbs) for (; up--; up) fromParts.unshift('..');\n\n if (\n mustEndAbs &&\n fromParts[0] !== '' &&\n (!fromParts[0] || !isAbsolute(fromParts[0]))\n )\n fromParts.unshift('');\n\n var result = fromParts.join('/');\n\n if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';\n\n return result;\n}\n\nexport default resolvePathname;\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport resolvePathname from 'resolve-pathname';\nimport valueEqual from 'value-equal';\nimport warning from 'tiny-warning';\nimport invariant from 'tiny-invariant';\n\nfunction addLeadingSlash(path) {\n return path.charAt(0) === '/' ? path : '/' + path;\n}\nfunction stripLeadingSlash(path) {\n return path.charAt(0) === '/' ? path.substr(1) : path;\n}\nfunction hasBasename(path, prefix) {\n return path.toLowerCase().indexOf(prefix.toLowerCase()) === 0 && '/?#'.indexOf(path.charAt(prefix.length)) !== -1;\n}\nfunction stripBasename(path, prefix) {\n return hasBasename(path, prefix) ? path.substr(prefix.length) : path;\n}\nfunction stripTrailingSlash(path) {\n return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;\n}\nfunction parsePath(path) {\n var pathname = path || '/';\n var search = '';\n var hash = '';\n var hashIndex = pathname.indexOf('#');\n\n if (hashIndex !== -1) {\n hash = pathname.substr(hashIndex);\n pathname = pathname.substr(0, hashIndex);\n }\n\n var searchIndex = pathname.indexOf('?');\n\n if (searchIndex !== -1) {\n search = pathname.substr(searchIndex);\n pathname = pathname.substr(0, searchIndex);\n }\n\n return {\n pathname: pathname,\n search: search === '?' ? '' : search,\n hash: hash === '#' ? '' : hash\n };\n}\nfunction createPath(location) {\n var pathname = location.pathname,\n search = location.search,\n hash = location.hash;\n var path = pathname || '/';\n if (search && search !== '?') path += search.charAt(0) === '?' ? search : \"?\" + search;\n if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : \"#\" + hash;\n return path;\n}\n\nfunction createLocation(path, state, key, currentLocation) {\n var location;\n\n if (typeof path === 'string') {\n // Two-arg form: push(path, state)\n location = parsePath(path);\n location.state = state;\n } else {\n // One-arg form: push(location)\n location = _extends({}, path);\n if (location.pathname === undefined) location.pathname = '';\n\n if (location.search) {\n if (location.search.charAt(0) !== '?') location.search = '?' + location.search;\n } else {\n location.search = '';\n }\n\n if (location.hash) {\n if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;\n } else {\n location.hash = '';\n }\n\n if (state !== undefined && location.state === undefined) location.state = state;\n }\n\n try {\n location.pathname = decodeURI(location.pathname);\n } catch (e) {\n if (e instanceof URIError) {\n throw new URIError('Pathname \"' + location.pathname + '\" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');\n } else {\n throw e;\n }\n }\n\n if (key) location.key = key;\n\n if (currentLocation) {\n // Resolve incomplete/relative pathname relative to current location.\n if (!location.pathname) {\n location.pathname = currentLocation.pathname;\n } else if (location.pathname.charAt(0) !== '/') {\n location.pathname = resolvePathname(location.pathname, currentLocation.pathname);\n }\n } else {\n // When there is no prior location and pathname is empty, set it to /\n if (!location.pathname) {\n location.pathname = '/';\n }\n }\n\n return location;\n}\nfunction locationsAreEqual(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && valueEqual(a.state, b.state);\n}\n\nfunction createTransitionManager() {\n var prompt = null;\n\n function setPrompt(nextPrompt) {\n process.env.NODE_ENV !== \"production\" ? warning(prompt == null, 'A history supports only one prompt at a time') : void 0;\n prompt = nextPrompt;\n return function () {\n if (prompt === nextPrompt) prompt = null;\n };\n }\n\n function confirmTransitionTo(location, action, getUserConfirmation, callback) {\n // TODO: If another transition starts while we're still confirming\n // the previous one, we may end up in a weird state. Figure out the\n // best way to handle this.\n if (prompt != null) {\n var result = typeof prompt === 'function' ? prompt(location, action) : prompt;\n\n if (typeof result === 'string') {\n if (typeof getUserConfirmation === 'function') {\n getUserConfirmation(result, callback);\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'A history needs a getUserConfirmation function in order to use a prompt message') : void 0;\n callback(true);\n }\n } else {\n // Return false from a transition hook to cancel the transition.\n callback(result !== false);\n }\n } else {\n callback(true);\n }\n }\n\n var listeners = [];\n\n function appendListener(fn) {\n var isActive = true;\n\n function listener() {\n if (isActive) fn.apply(void 0, arguments);\n }\n\n listeners.push(listener);\n return function () {\n isActive = false;\n listeners = listeners.filter(function (item) {\n return item !== listener;\n });\n };\n }\n\n function notifyListeners() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n listeners.forEach(function (listener) {\n return listener.apply(void 0, args);\n });\n }\n\n return {\n setPrompt: setPrompt,\n confirmTransitionTo: confirmTransitionTo,\n appendListener: appendListener,\n notifyListeners: notifyListeners\n };\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\nfunction getConfirmation(message, callback) {\n callback(window.confirm(message)); // eslint-disable-line no-alert\n}\n/**\n * Returns true if the HTML5 history API is supported. Taken from Modernizr.\n *\n * https://github.com/Modernizr/Modernizr/blob/master/LICENSE\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js\n * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586\n */\n\nfunction supportsHistory() {\n var ua = window.navigator.userAgent;\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;\n return window.history && 'pushState' in window.history;\n}\n/**\n * Returns true if browser fires popstate on hash change.\n * IE10 and IE11 do not.\n */\n\nfunction supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}\n/**\n * Returns false if using go(n) with hash history causes a full page reload.\n */\n\nfunction supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n}\n/**\n * Returns true if a given popstate event is an extraneous WebKit event.\n * Accounts for the fact that Chrome on iOS fires real popstate events\n * containing undefined state when pressing the back button.\n */\n\nfunction isExtraneousPopstateEvent(event) {\n return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n}\n\nvar PopStateEvent = 'popstate';\nvar HashChangeEvent = 'hashchange';\n\nfunction getHistoryState() {\n try {\n return window.history.state || {};\n } catch (e) {\n // IE 11 sometimes throws when accessing window.history.state\n // See https://github.com/ReactTraining/history/pull/289\n return {};\n }\n}\n/**\n * Creates a history object that uses the HTML5 history API including\n * pushState, replaceState, and the popstate event.\n */\n\n\nfunction createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Browser history needs a DOM') : invariant(false) : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n process.env.NODE_ENV !== \"production\" ? warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history') : void 0;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history') : void 0;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}\n\nvar HashChangeEvent$1 = 'hashchange';\nvar HashPathCoders = {\n hashbang: {\n encodePath: function encodePath(path) {\n return path.charAt(0) === '!' ? path : '!/' + stripLeadingSlash(path);\n },\n decodePath: function decodePath(path) {\n return path.charAt(0) === '!' ? path.substr(1) : path;\n }\n },\n noslash: {\n encodePath: stripLeadingSlash,\n decodePath: addLeadingSlash\n },\n slash: {\n encodePath: addLeadingSlash,\n decodePath: addLeadingSlash\n }\n};\n\nfunction stripHash(url) {\n var hashIndex = url.indexOf('#');\n return hashIndex === -1 ? url : url.slice(0, hashIndex);\n}\n\nfunction getHashPath() {\n // We can't use window.location.hash here because it's not\n // consistent across browsers - Firefox will pre-decode it!\n var href = window.location.href;\n var hashIndex = href.indexOf('#');\n return hashIndex === -1 ? '' : href.substring(hashIndex + 1);\n}\n\nfunction pushHashPath(path) {\n window.location.hash = path;\n}\n\nfunction replaceHashPath(path) {\n window.location.replace(stripHash(window.location.href) + '#' + path);\n}\n\nfunction createHashHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Hash history needs a DOM') : invariant(false) : void 0;\n var globalHistory = window.history;\n var canGoWithoutReload = supportsGoWithoutReloadUsingHash();\n var _props = props,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$hashType = _props.hashType,\n hashType = _props$hashType === void 0 ? 'slash' : _props$hashType;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n var _HashPathCoders$hashT = HashPathCoders[hashType],\n encodePath = _HashPathCoders$hashT.encodePath,\n decodePath = _HashPathCoders$hashT.decodePath;\n\n function getDOMLocation() {\n var path = decodePath(getHashPath());\n process.env.NODE_ENV !== \"production\" ? warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n var forceNextPop = false;\n var ignorePath = null;\n\n function locationsAreEqual$$1(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash;\n }\n\n function handleHashChange() {\n var path = getHashPath();\n var encodedPath = encodePath(path);\n\n if (path !== encodedPath) {\n // Ensure we always have a properly-encoded hash.\n replaceHashPath(encodedPath);\n } else {\n var location = getDOMLocation();\n var prevLocation = history.location;\n if (!forceNextPop && locationsAreEqual$$1(prevLocation, location)) return; // A hashchange doesn't always == location change.\n\n if (ignorePath === createPath(location)) return; // Ignore this change; we already setState in push/replace.\n\n ignorePath = null;\n handlePop(location);\n }\n }\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of paths we've seen in sessionStorage.\n // Instead, we just default to 0 for paths we don't know.\n\n var toIndex = allPaths.lastIndexOf(createPath(toLocation));\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allPaths.lastIndexOf(createPath(fromLocation));\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n } // Ensure the hash is encoded properly before doing anything else.\n\n\n var path = getHashPath();\n var encodedPath = encodePath(path);\n if (path !== encodedPath) replaceHashPath(encodedPath);\n var initialLocation = getDOMLocation();\n var allPaths = [createPath(initialLocation)]; // Public interface\n\n function createHref(location) {\n var baseTag = document.querySelector('base');\n var href = '';\n\n if (baseTag && baseTag.getAttribute('href')) {\n href = stripHash(window.location.href);\n }\n\n return href + '#' + encodePath(basename + createPath(location));\n }\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Hash history cannot push state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, undefined, undefined, history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var path = createPath(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a PUSH, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n pushHashPath(encodedPath);\n var prevIndex = allPaths.lastIndexOf(createPath(history.location));\n var nextPaths = allPaths.slice(0, prevIndex + 1);\n nextPaths.push(path);\n allPaths = nextPaths;\n setState({\n action: action,\n location: location\n });\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack') : void 0;\n setState();\n }\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Hash history cannot replace state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, undefined, undefined, history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var path = createPath(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a REPLACE, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n replaceHashPath(encodedPath);\n }\n\n var prevIndex = allPaths.indexOf(createPath(history.location));\n if (prevIndex !== -1) allPaths[prevIndex] = path;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n process.env.NODE_ENV !== \"production\" ? warning(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser') : void 0;\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(HashChangeEvent$1, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(HashChangeEvent$1, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}\n\nfunction clamp(n, lowerBound, upperBound) {\n return Math.min(Math.max(n, lowerBound), upperBound);\n}\n/**\n * Creates a history object that stores locations in memory.\n */\n\n\nfunction createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}\n\nexport { createBrowserHistory, createHashHistory, createMemoryHistory, createLocation, locationsAreEqual, parsePath, createPath };\n","'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nexport var isBrowser = (typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) === \"object\" && (typeof document === \"undefined\" ? \"undefined\" : _typeof(document)) === 'object' && document.nodeType === 9;\n\nexport default isBrowser;\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport isInBrowser from 'is-in-browser';\nimport warning from 'tiny-warning';\nimport _createClass from '@babel/runtime/helpers/esm/createClass';\nimport _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport _assertThisInitialized from '@babel/runtime/helpers/esm/assertThisInitialized';\nimport _objectWithoutPropertiesLoose from '@babel/runtime/helpers/esm/objectWithoutPropertiesLoose';\n\nvar plainObjectConstrurctor = {}.constructor;\nfunction cloneStyle(style) {\n if (style == null || typeof style !== 'object') return style;\n if (Array.isArray(style)) return style.map(cloneStyle);\n if (style.constructor !== plainObjectConstrurctor) return style;\n var newStyle = {};\n\n for (var name in style) {\n newStyle[name] = cloneStyle(style[name]);\n }\n\n return newStyle;\n}\n\n/**\n * Create a rule instance.\n */\n\nfunction createRule(name, decl, options) {\n if (name === void 0) {\n name = 'unnamed';\n }\n\n var jss = options.jss;\n var declCopy = cloneStyle(decl);\n var rule = jss.plugins.onCreateRule(name, declCopy, options);\n if (rule) return rule; // It is an at-rule and it has no instance.\n\n if (name[0] === '@') {\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] Unknown rule \" + name) : void 0;\n }\n\n return null;\n}\n\nvar join = function join(value, by) {\n var result = '';\n\n for (var i = 0; i < value.length; i++) {\n // Remove !important from the value, it will be readded later.\n if (value[i] === '!important') break;\n if (result) result += by;\n result += value[i];\n }\n\n return result;\n};\n/**\n * Converts JSS array value to a CSS string.\n *\n * `margin: [['5px', '10px']]` > `margin: 5px 10px;`\n * `border: ['1px', '2px']` > `border: 1px, 2px;`\n * `margin: [['5px', '10px'], '!important']` > `margin: 5px 10px !important;`\n * `color: ['red', !important]` > `color: red !important;`\n */\n\n\nvar toCssValue = function toCssValue(value, ignoreImportant) {\n if (ignoreImportant === void 0) {\n ignoreImportant = false;\n }\n\n if (!Array.isArray(value)) return value;\n var cssValue = ''; // Support space separated values via `[['5px', '10px']]`.\n\n if (Array.isArray(value[0])) {\n for (var i = 0; i < value.length; i++) {\n if (value[i] === '!important') break;\n if (cssValue) cssValue += ', ';\n cssValue += join(value[i], ' ');\n }\n } else cssValue = join(value, ', '); // Add !important, because it was ignored.\n\n\n if (!ignoreImportant && value[value.length - 1] === '!important') {\n cssValue += ' !important';\n }\n\n return cssValue;\n};\n\nfunction getWhitespaceSymbols(options) {\n if (options && options.format === false) {\n return {\n linebreak: '',\n space: ''\n };\n }\n\n return {\n linebreak: '\\n',\n space: ' '\n };\n}\n\n/**\n * Indent a string.\n * http://jsperf.com/array-join-vs-for\n */\n\nfunction indentStr(str, indent) {\n var result = '';\n\n for (var index = 0; index < indent; index++) {\n result += ' ';\n }\n\n return result + str;\n}\n/**\n * Converts a Rule to CSS string.\n */\n\n\nfunction toCss(selector, style, options) {\n if (options === void 0) {\n options = {};\n }\n\n var result = '';\n if (!style) return result;\n var _options = options,\n _options$indent = _options.indent,\n indent = _options$indent === void 0 ? 0 : _options$indent;\n var fallbacks = style.fallbacks;\n\n if (options.format === false) {\n indent = -Infinity;\n }\n\n var _getWhitespaceSymbols = getWhitespaceSymbols(options),\n linebreak = _getWhitespaceSymbols.linebreak,\n space = _getWhitespaceSymbols.space;\n\n if (selector) indent++; // Apply fallbacks first.\n\n if (fallbacks) {\n // Array syntax {fallbacks: [{prop: value}]}\n if (Array.isArray(fallbacks)) {\n for (var index = 0; index < fallbacks.length; index++) {\n var fallback = fallbacks[index];\n\n for (var prop in fallback) {\n var value = fallback[prop];\n\n if (value != null) {\n if (result) result += linebreak;\n result += indentStr(prop + \":\" + space + toCssValue(value) + \";\", indent);\n }\n }\n }\n } else {\n // Object syntax {fallbacks: {prop: value}}\n for (var _prop in fallbacks) {\n var _value = fallbacks[_prop];\n\n if (_value != null) {\n if (result) result += linebreak;\n result += indentStr(_prop + \":\" + space + toCssValue(_value) + \";\", indent);\n }\n }\n }\n }\n\n for (var _prop2 in style) {\n var _value2 = style[_prop2];\n\n if (_value2 != null && _prop2 !== 'fallbacks') {\n if (result) result += linebreak;\n result += indentStr(_prop2 + \":\" + space + toCssValue(_value2) + \";\", indent);\n }\n } // Allow empty style in this case, because properties will be added dynamically.\n\n\n if (!result && !options.allowEmpty) return result; // When rule is being stringified before selector was defined.\n\n if (!selector) return result;\n indent--;\n if (result) result = \"\" + linebreak + result + linebreak;\n return indentStr(\"\" + selector + space + \"{\" + result, indent) + indentStr('}', indent);\n}\n\nvar escapeRegex = /([[\\].#*$><+~=|^:(),\"'`\\s])/g;\nvar nativeEscape = typeof CSS !== 'undefined' && CSS.escape;\nvar escape = (function (str) {\n return nativeEscape ? nativeEscape(str) : str.replace(escapeRegex, '\\\\$1');\n});\n\nvar BaseStyleRule =\n/*#__PURE__*/\nfunction () {\n function BaseStyleRule(key, style, options) {\n this.type = 'style';\n this.isProcessed = false;\n var sheet = options.sheet,\n Renderer = options.Renderer;\n this.key = key;\n this.options = options;\n this.style = style;\n if (sheet) this.renderer = sheet.renderer;else if (Renderer) this.renderer = new Renderer();\n }\n /**\n * Get or set a style property.\n */\n\n\n var _proto = BaseStyleRule.prototype;\n\n _proto.prop = function prop(name, value, options) {\n // It's a getter.\n if (value === undefined) return this.style[name]; // Don't do anything if the value has not changed.\n\n var force = options ? options.force : false;\n if (!force && this.style[name] === value) return this;\n var newValue = value;\n\n if (!options || options.process !== false) {\n newValue = this.options.jss.plugins.onChangeValue(value, name, this);\n }\n\n var isEmpty = newValue == null || newValue === false;\n var isDefined = name in this.style; // Value is empty and wasn't defined before.\n\n if (isEmpty && !isDefined && !force) return this; // We are going to remove this value.\n\n var remove = isEmpty && isDefined;\n if (remove) delete this.style[name];else this.style[name] = newValue; // Renderable is defined if StyleSheet option `link` is true.\n\n if (this.renderable && this.renderer) {\n if (remove) this.renderer.removeProperty(this.renderable, name);else this.renderer.setProperty(this.renderable, name, newValue);\n return this;\n }\n\n var sheet = this.options.sheet;\n\n if (sheet && sheet.attached) {\n process.env.NODE_ENV !== \"production\" ? warning(false, '[JSS] Rule is not linked. Missing sheet option \"link: true\".') : void 0;\n }\n\n return this;\n };\n\n return BaseStyleRule;\n}();\nvar StyleRule =\n/*#__PURE__*/\nfunction (_BaseStyleRule) {\n _inheritsLoose(StyleRule, _BaseStyleRule);\n\n function StyleRule(key, style, options) {\n var _this;\n\n _this = _BaseStyleRule.call(this, key, style, options) || this;\n var selector = options.selector,\n scoped = options.scoped,\n sheet = options.sheet,\n generateId = options.generateId;\n\n if (selector) {\n _this.selectorText = selector;\n } else if (scoped !== false) {\n _this.id = generateId(_assertThisInitialized(_assertThisInitialized(_this)), sheet);\n _this.selectorText = \".\" + escape(_this.id);\n }\n\n return _this;\n }\n /**\n * Set selector string.\n * Attention: use this with caution. Most browsers didn't implement\n * selectorText setter, so this may result in rerendering of entire Style Sheet.\n */\n\n\n var _proto2 = StyleRule.prototype;\n\n /**\n * Apply rule to an element inline.\n */\n _proto2.applyTo = function applyTo(renderable) {\n var renderer = this.renderer;\n\n if (renderer) {\n var json = this.toJSON();\n\n for (var prop in json) {\n renderer.setProperty(renderable, prop, json[prop]);\n }\n }\n\n return this;\n }\n /**\n * Returns JSON representation of the rule.\n * Fallbacks are not supported.\n * Useful for inline styles.\n */\n ;\n\n _proto2.toJSON = function toJSON() {\n var json = {};\n\n for (var prop in this.style) {\n var value = this.style[prop];\n if (typeof value !== 'object') json[prop] = value;else if (Array.isArray(value)) json[prop] = toCssValue(value);\n }\n\n return json;\n }\n /**\n * Generates a CSS string.\n */\n ;\n\n _proto2.toString = function toString(options) {\n var sheet = this.options.sheet;\n var link = sheet ? sheet.options.link : false;\n var opts = link ? _extends({}, options, {\n allowEmpty: true\n }) : options;\n return toCss(this.selectorText, this.style, opts);\n };\n\n _createClass(StyleRule, [{\n key: \"selector\",\n set: function set(selector) {\n if (selector === this.selectorText) return;\n this.selectorText = selector;\n var renderer = this.renderer,\n renderable = this.renderable;\n if (!renderable || !renderer) return;\n var hasChanged = renderer.setSelector(renderable, selector); // If selector setter is not implemented, rerender the rule.\n\n if (!hasChanged) {\n renderer.replaceRule(renderable, this);\n }\n }\n /**\n * Get selector string.\n */\n ,\n get: function get() {\n return this.selectorText;\n }\n }]);\n\n return StyleRule;\n}(BaseStyleRule);\nvar pluginStyleRule = {\n onCreateRule: function onCreateRule(key, style, options) {\n if (key[0] === '@' || options.parent && options.parent.type === 'keyframes') {\n return null;\n }\n\n return new StyleRule(key, style, options);\n }\n};\n\nvar defaultToStringOptions = {\n indent: 1,\n children: true\n};\nvar atRegExp = /@([\\w-]+)/;\n/**\n * Conditional rule for @media, @supports\n */\n\nvar ConditionalRule =\n/*#__PURE__*/\nfunction () {\n function ConditionalRule(key, styles, options) {\n this.type = 'conditional';\n this.isProcessed = false;\n this.key = key;\n var atMatch = key.match(atRegExp);\n this.at = atMatch ? atMatch[1] : 'unknown'; // Key might contain a unique suffix in case the `name` passed by user was duplicate.\n\n this.query = options.name || \"@\" + this.at;\n this.options = options;\n this.rules = new RuleList(_extends({}, options, {\n parent: this\n }));\n\n for (var name in styles) {\n this.rules.add(name, styles[name]);\n }\n\n this.rules.process();\n }\n /**\n * Get a rule.\n */\n\n\n var _proto = ConditionalRule.prototype;\n\n _proto.getRule = function getRule(name) {\n return this.rules.get(name);\n }\n /**\n * Get index of a rule.\n */\n ;\n\n _proto.indexOf = function indexOf(rule) {\n return this.rules.indexOf(rule);\n }\n /**\n * Create and register rule, run plugins.\n */\n ;\n\n _proto.addRule = function addRule(name, style, options) {\n var rule = this.rules.add(name, style, options);\n if (!rule) return null;\n this.options.jss.plugins.onProcessRule(rule);\n return rule;\n }\n /**\n * Replace rule, run plugins.\n */\n ;\n\n _proto.replaceRule = function replaceRule(name, style, options) {\n var newRule = this.rules.replace(name, style, options);\n if (newRule) this.options.jss.plugins.onProcessRule(newRule);\n return newRule;\n }\n /**\n * Generates a CSS string.\n */\n ;\n\n _proto.toString = function toString(options) {\n if (options === void 0) {\n options = defaultToStringOptions;\n }\n\n var _getWhitespaceSymbols = getWhitespaceSymbols(options),\n linebreak = _getWhitespaceSymbols.linebreak;\n\n if (options.indent == null) options.indent = defaultToStringOptions.indent;\n if (options.children == null) options.children = defaultToStringOptions.children;\n\n if (options.children === false) {\n return this.query + \" {}\";\n }\n\n var children = this.rules.toString(options);\n return children ? this.query + \" {\" + linebreak + children + linebreak + \"}\" : '';\n };\n\n return ConditionalRule;\n}();\nvar keyRegExp = /@media|@supports\\s+/;\nvar pluginConditionalRule = {\n onCreateRule: function onCreateRule(key, styles, options) {\n return keyRegExp.test(key) ? new ConditionalRule(key, styles, options) : null;\n }\n};\n\nvar defaultToStringOptions$1 = {\n indent: 1,\n children: true\n};\nvar nameRegExp = /@keyframes\\s+([\\w-]+)/;\n/**\n * Rule for @keyframes\n */\n\nvar KeyframesRule =\n/*#__PURE__*/\nfunction () {\n function KeyframesRule(key, frames, options) {\n this.type = 'keyframes';\n this.at = '@keyframes';\n this.isProcessed = false;\n var nameMatch = key.match(nameRegExp);\n\n if (nameMatch && nameMatch[1]) {\n this.name = nameMatch[1];\n } else {\n this.name = 'noname';\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] Bad keyframes name \" + key) : void 0;\n }\n\n this.key = this.type + \"-\" + this.name;\n this.options = options;\n var scoped = options.scoped,\n sheet = options.sheet,\n generateId = options.generateId;\n this.id = scoped === false ? this.name : escape(generateId(this, sheet));\n this.rules = new RuleList(_extends({}, options, {\n parent: this\n }));\n\n for (var name in frames) {\n this.rules.add(name, frames[name], _extends({}, options, {\n parent: this\n }));\n }\n\n this.rules.process();\n }\n /**\n * Generates a CSS string.\n */\n\n\n var _proto = KeyframesRule.prototype;\n\n _proto.toString = function toString(options) {\n if (options === void 0) {\n options = defaultToStringOptions$1;\n }\n\n var _getWhitespaceSymbols = getWhitespaceSymbols(options),\n linebreak = _getWhitespaceSymbols.linebreak;\n\n if (options.indent == null) options.indent = defaultToStringOptions$1.indent;\n if (options.children == null) options.children = defaultToStringOptions$1.children;\n\n if (options.children === false) {\n return this.at + \" \" + this.id + \" {}\";\n }\n\n var children = this.rules.toString(options);\n if (children) children = \"\" + linebreak + children + linebreak;\n return this.at + \" \" + this.id + \" {\" + children + \"}\";\n };\n\n return KeyframesRule;\n}();\nvar keyRegExp$1 = /@keyframes\\s+/;\nvar refRegExp = /\\$([\\w-]+)/g;\n\nvar findReferencedKeyframe = function findReferencedKeyframe(val, keyframes) {\n if (typeof val === 'string') {\n return val.replace(refRegExp, function (match, name) {\n if (name in keyframes) {\n return keyframes[name];\n }\n\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] Referenced keyframes rule \\\"\" + name + \"\\\" is not defined.\") : void 0;\n return match;\n });\n }\n\n return val;\n};\n/**\n * Replace the reference for a animation name.\n */\n\n\nvar replaceRef = function replaceRef(style, prop, keyframes) {\n var value = style[prop];\n var refKeyframe = findReferencedKeyframe(value, keyframes);\n\n if (refKeyframe !== value) {\n style[prop] = refKeyframe;\n }\n};\n\nvar pluginKeyframesRule = {\n onCreateRule: function onCreateRule(key, frames, options) {\n return typeof key === 'string' && keyRegExp$1.test(key) ? new KeyframesRule(key, frames, options) : null;\n },\n // Animation name ref replacer.\n onProcessStyle: function onProcessStyle(style, rule, sheet) {\n if (rule.type !== 'style' || !sheet) return style;\n if ('animation-name' in style) replaceRef(style, 'animation-name', sheet.keyframes);\n if ('animation' in style) replaceRef(style, 'animation', sheet.keyframes);\n return style;\n },\n onChangeValue: function onChangeValue(val, prop, rule) {\n var sheet = rule.options.sheet;\n\n if (!sheet) {\n return val;\n }\n\n switch (prop) {\n case 'animation':\n return findReferencedKeyframe(val, sheet.keyframes);\n\n case 'animation-name':\n return findReferencedKeyframe(val, sheet.keyframes);\n\n default:\n return val;\n }\n }\n};\n\nvar KeyframeRule =\n/*#__PURE__*/\nfunction (_BaseStyleRule) {\n _inheritsLoose(KeyframeRule, _BaseStyleRule);\n\n function KeyframeRule() {\n return _BaseStyleRule.apply(this, arguments) || this;\n }\n\n var _proto = KeyframeRule.prototype;\n\n /**\n * Generates a CSS string.\n */\n _proto.toString = function toString(options) {\n var sheet = this.options.sheet;\n var link = sheet ? sheet.options.link : false;\n var opts = link ? _extends({}, options, {\n allowEmpty: true\n }) : options;\n return toCss(this.key, this.style, opts);\n };\n\n return KeyframeRule;\n}(BaseStyleRule);\nvar pluginKeyframeRule = {\n onCreateRule: function onCreateRule(key, style, options) {\n if (options.parent && options.parent.type === 'keyframes') {\n return new KeyframeRule(key, style, options);\n }\n\n return null;\n }\n};\n\nvar FontFaceRule =\n/*#__PURE__*/\nfunction () {\n function FontFaceRule(key, style, options) {\n this.type = 'font-face';\n this.at = '@font-face';\n this.isProcessed = false;\n this.key = key;\n this.style = style;\n this.options = options;\n }\n /**\n * Generates a CSS string.\n */\n\n\n var _proto = FontFaceRule.prototype;\n\n _proto.toString = function toString(options) {\n var _getWhitespaceSymbols = getWhitespaceSymbols(options),\n linebreak = _getWhitespaceSymbols.linebreak;\n\n if (Array.isArray(this.style)) {\n var str = '';\n\n for (var index = 0; index < this.style.length; index++) {\n str += toCss(this.at, this.style[index]);\n if (this.style[index + 1]) str += linebreak;\n }\n\n return str;\n }\n\n return toCss(this.at, this.style, options);\n };\n\n return FontFaceRule;\n}();\nvar keyRegExp$2 = /@font-face/;\nvar pluginFontFaceRule = {\n onCreateRule: function onCreateRule(key, style, options) {\n return keyRegExp$2.test(key) ? new FontFaceRule(key, style, options) : null;\n }\n};\n\nvar ViewportRule =\n/*#__PURE__*/\nfunction () {\n function ViewportRule(key, style, options) {\n this.type = 'viewport';\n this.at = '@viewport';\n this.isProcessed = false;\n this.key = key;\n this.style = style;\n this.options = options;\n }\n /**\n * Generates a CSS string.\n */\n\n\n var _proto = ViewportRule.prototype;\n\n _proto.toString = function toString(options) {\n return toCss(this.key, this.style, options);\n };\n\n return ViewportRule;\n}();\nvar pluginViewportRule = {\n onCreateRule: function onCreateRule(key, style, options) {\n return key === '@viewport' || key === '@-ms-viewport' ? new ViewportRule(key, style, options) : null;\n }\n};\n\nvar SimpleRule =\n/*#__PURE__*/\nfunction () {\n function SimpleRule(key, value, options) {\n this.type = 'simple';\n this.isProcessed = false;\n this.key = key;\n this.value = value;\n this.options = options;\n }\n /**\n * Generates a CSS string.\n */\n // eslint-disable-next-line no-unused-vars\n\n\n var _proto = SimpleRule.prototype;\n\n _proto.toString = function toString(options) {\n if (Array.isArray(this.value)) {\n var str = '';\n\n for (var index = 0; index < this.value.length; index++) {\n str += this.key + \" \" + this.value[index] + \";\";\n if (this.value[index + 1]) str += '\\n';\n }\n\n return str;\n }\n\n return this.key + \" \" + this.value + \";\";\n };\n\n return SimpleRule;\n}();\nvar keysMap = {\n '@charset': true,\n '@import': true,\n '@namespace': true\n};\nvar pluginSimpleRule = {\n onCreateRule: function onCreateRule(key, value, options) {\n return key in keysMap ? new SimpleRule(key, value, options) : null;\n }\n};\n\nvar plugins = [pluginStyleRule, pluginConditionalRule, pluginKeyframesRule, pluginKeyframeRule, pluginFontFaceRule, pluginViewportRule, pluginSimpleRule];\n\nvar defaultUpdateOptions = {\n process: true\n};\nvar forceUpdateOptions = {\n force: true,\n process: true\n /**\n * Contains rules objects and allows adding/removing etc.\n * Is used for e.g. by `StyleSheet` or `ConditionalRule`.\n */\n\n};\n\nvar RuleList =\n/*#__PURE__*/\nfunction () {\n // Rules registry for access by .get() method.\n // It contains the same rule registered by name and by selector.\n // Original styles object.\n // Used to ensure correct rules order.\n function RuleList(options) {\n this.map = {};\n this.raw = {};\n this.index = [];\n this.counter = 0;\n this.options = options;\n this.classes = options.classes;\n this.keyframes = options.keyframes;\n }\n /**\n * Create and register rule.\n *\n * Will not render after Style Sheet was rendered the first time.\n */\n\n\n var _proto = RuleList.prototype;\n\n _proto.add = function add(name, decl, ruleOptions) {\n var _this$options = this.options,\n parent = _this$options.parent,\n sheet = _this$options.sheet,\n jss = _this$options.jss,\n Renderer = _this$options.Renderer,\n generateId = _this$options.generateId,\n scoped = _this$options.scoped;\n\n var options = _extends({\n classes: this.classes,\n parent: parent,\n sheet: sheet,\n jss: jss,\n Renderer: Renderer,\n generateId: generateId,\n scoped: scoped,\n name: name,\n keyframes: this.keyframes,\n selector: undefined\n }, ruleOptions); // When user uses .createStyleSheet(), duplicate names are not possible, but\n // `sheet.addRule()` opens the door for any duplicate rule name. When this happens\n // we need to make the key unique within this RuleList instance scope.\n\n\n var key = name;\n\n if (name in this.raw) {\n key = name + \"-d\" + this.counter++;\n } // We need to save the original decl before creating the rule\n // because cache plugin needs to use it as a key to return a cached rule.\n\n\n this.raw[key] = decl;\n\n if (key in this.classes) {\n // E.g. rules inside of @media container\n options.selector = \".\" + escape(this.classes[key]);\n }\n\n var rule = createRule(key, decl, options);\n if (!rule) return null;\n this.register(rule);\n var index = options.index === undefined ? this.index.length : options.index;\n this.index.splice(index, 0, rule);\n return rule;\n }\n /**\n * Replace rule.\n * Create a new rule and remove old one instead of overwriting\n * because we want to invoke onCreateRule hook to make plugins work.\n */\n ;\n\n _proto.replace = function replace(name, decl, ruleOptions) {\n var oldRule = this.get(name);\n var oldIndex = this.index.indexOf(oldRule);\n\n if (oldRule) {\n this.remove(oldRule);\n }\n\n var options = ruleOptions;\n if (oldIndex !== -1) options = _extends({}, ruleOptions, {\n index: oldIndex\n });\n return this.add(name, decl, options);\n }\n /**\n * Get a rule by name or selector.\n */\n ;\n\n _proto.get = function get(nameOrSelector) {\n return this.map[nameOrSelector];\n }\n /**\n * Delete a rule.\n */\n ;\n\n _proto.remove = function remove(rule) {\n this.unregister(rule);\n delete this.raw[rule.key];\n this.index.splice(this.index.indexOf(rule), 1);\n }\n /**\n * Get index of a rule.\n */\n ;\n\n _proto.indexOf = function indexOf(rule) {\n return this.index.indexOf(rule);\n }\n /**\n * Run `onProcessRule()` plugins on every rule.\n */\n ;\n\n _proto.process = function process() {\n var plugins = this.options.jss.plugins; // We need to clone array because if we modify the index somewhere else during a loop\n // we end up with very hard-to-track-down side effects.\n\n this.index.slice(0).forEach(plugins.onProcessRule, plugins);\n }\n /**\n * Register a rule in `.map`, `.classes` and `.keyframes` maps.\n */\n ;\n\n _proto.register = function register(rule) {\n this.map[rule.key] = rule;\n\n if (rule instanceof StyleRule) {\n this.map[rule.selector] = rule;\n if (rule.id) this.classes[rule.key] = rule.id;\n } else if (rule instanceof KeyframesRule && this.keyframes) {\n this.keyframes[rule.name] = rule.id;\n }\n }\n /**\n * Unregister a rule.\n */\n ;\n\n _proto.unregister = function unregister(rule) {\n delete this.map[rule.key];\n\n if (rule instanceof StyleRule) {\n delete this.map[rule.selector];\n delete this.classes[rule.key];\n } else if (rule instanceof KeyframesRule) {\n delete this.keyframes[rule.name];\n }\n }\n /**\n * Update the function values with a new data.\n */\n ;\n\n _proto.update = function update() {\n var name;\n var data;\n var options;\n\n if (typeof (arguments.length <= 0 ? undefined : arguments[0]) === 'string') {\n name = arguments.length <= 0 ? undefined : arguments[0];\n data = arguments.length <= 1 ? undefined : arguments[1];\n options = arguments.length <= 2 ? undefined : arguments[2];\n } else {\n data = arguments.length <= 0 ? undefined : arguments[0];\n options = arguments.length <= 1 ? undefined : arguments[1];\n name = null;\n }\n\n if (name) {\n this.updateOne(this.get(name), data, options);\n } else {\n for (var index = 0; index < this.index.length; index++) {\n this.updateOne(this.index[index], data, options);\n }\n }\n }\n /**\n * Execute plugins, update rule props.\n */\n ;\n\n _proto.updateOne = function updateOne(rule, data, options) {\n if (options === void 0) {\n options = defaultUpdateOptions;\n }\n\n var _this$options2 = this.options,\n plugins = _this$options2.jss.plugins,\n sheet = _this$options2.sheet; // It is a rules container like for e.g. ConditionalRule.\n\n if (rule.rules instanceof RuleList) {\n rule.rules.update(data, options);\n return;\n }\n\n var style = rule.style;\n plugins.onUpdate(data, rule, sheet, options); // We rely on a new `style` ref in case it was mutated during onUpdate hook.\n\n if (options.process && style && style !== rule.style) {\n // We need to run the plugins in case new `style` relies on syntax plugins.\n plugins.onProcessStyle(rule.style, rule, sheet); // Update and add props.\n\n for (var prop in rule.style) {\n var nextValue = rule.style[prop];\n var prevValue = style[prop]; // We need to use `force: true` because `rule.style` has been updated during onUpdate hook, so `rule.prop()` will not update the CSSOM rule.\n // We do this comparison to avoid unneeded `rule.prop()` calls, since we have the old `style` object here.\n\n if (nextValue !== prevValue) {\n rule.prop(prop, nextValue, forceUpdateOptions);\n }\n } // Remove props.\n\n\n for (var _prop in style) {\n var _nextValue = rule.style[_prop];\n var _prevValue = style[_prop]; // We need to use `force: true` because `rule.style` has been updated during onUpdate hook, so `rule.prop()` will not update the CSSOM rule.\n // We do this comparison to avoid unneeded `rule.prop()` calls, since we have the old `style` object here.\n\n if (_nextValue == null && _nextValue !== _prevValue) {\n rule.prop(_prop, null, forceUpdateOptions);\n }\n }\n }\n }\n /**\n * Convert rules to a CSS string.\n */\n ;\n\n _proto.toString = function toString(options) {\n var str = '';\n var sheet = this.options.sheet;\n var link = sheet ? sheet.options.link : false;\n\n var _getWhitespaceSymbols = getWhitespaceSymbols(options),\n linebreak = _getWhitespaceSymbols.linebreak;\n\n for (var index = 0; index < this.index.length; index++) {\n var rule = this.index[index];\n var css = rule.toString(options); // No need to render an empty rule.\n\n if (!css && !link) continue;\n if (str) str += linebreak;\n str += css;\n }\n\n return str;\n };\n\n return RuleList;\n}();\n\nvar StyleSheet =\n/*#__PURE__*/\nfunction () {\n function StyleSheet(styles, options) {\n this.attached = false;\n this.deployed = false;\n this.classes = {};\n this.keyframes = {};\n this.options = _extends({}, options, {\n sheet: this,\n parent: this,\n classes: this.classes,\n keyframes: this.keyframes\n });\n\n if (options.Renderer) {\n this.renderer = new options.Renderer(this);\n }\n\n this.rules = new RuleList(this.options);\n\n for (var name in styles) {\n this.rules.add(name, styles[name]);\n }\n\n this.rules.process();\n }\n /**\n * Attach renderable to the render tree.\n */\n\n\n var _proto = StyleSheet.prototype;\n\n _proto.attach = function attach() {\n if (this.attached) return this;\n if (this.renderer) this.renderer.attach();\n this.attached = true; // Order is important, because we can't use insertRule API if style element is not attached.\n\n if (!this.deployed) this.deploy();\n return this;\n }\n /**\n * Remove renderable from render tree.\n */\n ;\n\n _proto.detach = function detach() {\n if (!this.attached) return this;\n if (this.renderer) this.renderer.detach();\n this.attached = false;\n return this;\n }\n /**\n * Add a rule to the current stylesheet.\n * Will insert a rule also after the stylesheet has been rendered first time.\n */\n ;\n\n _proto.addRule = function addRule(name, decl, options) {\n var queue = this.queue; // Plugins can create rules.\n // In order to preserve the right order, we need to queue all `.addRule` calls,\n // which happen after the first `rules.add()` call.\n\n if (this.attached && !queue) this.queue = [];\n var rule = this.rules.add(name, decl, options);\n if (!rule) return null;\n this.options.jss.plugins.onProcessRule(rule);\n\n if (this.attached) {\n if (!this.deployed) return rule; // Don't insert rule directly if there is no stringified version yet.\n // It will be inserted all together when .attach is called.\n\n if (queue) queue.push(rule);else {\n this.insertRule(rule);\n\n if (this.queue) {\n this.queue.forEach(this.insertRule, this);\n this.queue = undefined;\n }\n }\n return rule;\n } // We can't add rules to a detached style node.\n // We will redeploy the sheet once user will attach it.\n\n\n this.deployed = false;\n return rule;\n }\n /**\n * Replace a rule in the current stylesheet.\n */\n ;\n\n _proto.replaceRule = function replaceRule(nameOrSelector, decl, options) {\n var oldRule = this.rules.get(nameOrSelector);\n if (!oldRule) return this.addRule(nameOrSelector, decl, options);\n var newRule = this.rules.replace(nameOrSelector, decl, options);\n\n if (newRule) {\n this.options.jss.plugins.onProcessRule(newRule);\n }\n\n if (this.attached) {\n if (!this.deployed) return newRule; // Don't replace / delete rule directly if there is no stringified version yet.\n // It will be inserted all together when .attach is called.\n\n if (this.renderer) {\n if (!newRule) {\n this.renderer.deleteRule(oldRule);\n } else if (oldRule.renderable) {\n this.renderer.replaceRule(oldRule.renderable, newRule);\n }\n }\n\n return newRule;\n } // We can't replace rules to a detached style node.\n // We will redeploy the sheet once user will attach it.\n\n\n this.deployed = false;\n return newRule;\n }\n /**\n * Insert rule into the StyleSheet\n */\n ;\n\n _proto.insertRule = function insertRule(rule) {\n if (this.renderer) {\n this.renderer.insertRule(rule);\n }\n }\n /**\n * Create and add rules.\n * Will render also after Style Sheet was rendered the first time.\n */\n ;\n\n _proto.addRules = function addRules(styles, options) {\n var added = [];\n\n for (var name in styles) {\n var rule = this.addRule(name, styles[name], options);\n if (rule) added.push(rule);\n }\n\n return added;\n }\n /**\n * Get a rule by name or selector.\n */\n ;\n\n _proto.getRule = function getRule(nameOrSelector) {\n return this.rules.get(nameOrSelector);\n }\n /**\n * Delete a rule by name.\n * Returns `true`: if rule has been deleted from the DOM.\n */\n ;\n\n _proto.deleteRule = function deleteRule(name) {\n var rule = typeof name === 'object' ? name : this.rules.get(name);\n\n if (!rule || // Style sheet was created without link: true and attached, in this case we\n // won't be able to remove the CSS rule from the DOM.\n this.attached && !rule.renderable) {\n return false;\n }\n\n this.rules.remove(rule);\n\n if (this.attached && rule.renderable && this.renderer) {\n return this.renderer.deleteRule(rule.renderable);\n }\n\n return true;\n }\n /**\n * Get index of a rule.\n */\n ;\n\n _proto.indexOf = function indexOf(rule) {\n return this.rules.indexOf(rule);\n }\n /**\n * Deploy pure CSS string to a renderable.\n */\n ;\n\n _proto.deploy = function deploy() {\n if (this.renderer) this.renderer.deploy();\n this.deployed = true;\n return this;\n }\n /**\n * Update the function values with a new data.\n */\n ;\n\n _proto.update = function update() {\n var _this$rules;\n\n (_this$rules = this.rules).update.apply(_this$rules, arguments);\n\n return this;\n }\n /**\n * Updates a single rule.\n */\n ;\n\n _proto.updateOne = function updateOne(rule, data, options) {\n this.rules.updateOne(rule, data, options);\n return this;\n }\n /**\n * Convert rules to a CSS string.\n */\n ;\n\n _proto.toString = function toString(options) {\n return this.rules.toString(options);\n };\n\n return StyleSheet;\n}();\n\nvar PluginsRegistry =\n/*#__PURE__*/\nfunction () {\n function PluginsRegistry() {\n this.plugins = {\n internal: [],\n external: []\n };\n this.registry = {};\n }\n\n var _proto = PluginsRegistry.prototype;\n\n /**\n * Call `onCreateRule` hooks and return an object if returned by a hook.\n */\n _proto.onCreateRule = function onCreateRule(name, decl, options) {\n for (var i = 0; i < this.registry.onCreateRule.length; i++) {\n var rule = this.registry.onCreateRule[i](name, decl, options);\n if (rule) return rule;\n }\n\n return null;\n }\n /**\n * Call `onProcessRule` hooks.\n */\n ;\n\n _proto.onProcessRule = function onProcessRule(rule) {\n if (rule.isProcessed) return;\n var sheet = rule.options.sheet;\n\n for (var i = 0; i < this.registry.onProcessRule.length; i++) {\n this.registry.onProcessRule[i](rule, sheet);\n }\n\n if (rule.style) this.onProcessStyle(rule.style, rule, sheet);\n rule.isProcessed = true;\n }\n /**\n * Call `onProcessStyle` hooks.\n */\n ;\n\n _proto.onProcessStyle = function onProcessStyle(style, rule, sheet) {\n for (var i = 0; i < this.registry.onProcessStyle.length; i++) {\n rule.style = this.registry.onProcessStyle[i](rule.style, rule, sheet);\n }\n }\n /**\n * Call `onProcessSheet` hooks.\n */\n ;\n\n _proto.onProcessSheet = function onProcessSheet(sheet) {\n for (var i = 0; i < this.registry.onProcessSheet.length; i++) {\n this.registry.onProcessSheet[i](sheet);\n }\n }\n /**\n * Call `onUpdate` hooks.\n */\n ;\n\n _proto.onUpdate = function onUpdate(data, rule, sheet, options) {\n for (var i = 0; i < this.registry.onUpdate.length; i++) {\n this.registry.onUpdate[i](data, rule, sheet, options);\n }\n }\n /**\n * Call `onChangeValue` hooks.\n */\n ;\n\n _proto.onChangeValue = function onChangeValue(value, prop, rule) {\n var processedValue = value;\n\n for (var i = 0; i < this.registry.onChangeValue.length; i++) {\n processedValue = this.registry.onChangeValue[i](processedValue, prop, rule);\n }\n\n return processedValue;\n }\n /**\n * Register a plugin.\n */\n ;\n\n _proto.use = function use(newPlugin, options) {\n if (options === void 0) {\n options = {\n queue: 'external'\n };\n }\n\n var plugins = this.plugins[options.queue]; // Avoids applying same plugin twice, at least based on ref.\n\n if (plugins.indexOf(newPlugin) !== -1) {\n return;\n }\n\n plugins.push(newPlugin);\n this.registry = [].concat(this.plugins.external, this.plugins.internal).reduce(function (registry, plugin) {\n for (var name in plugin) {\n if (name in registry) {\n registry[name].push(plugin[name]);\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] Unknown hook \\\"\" + name + \"\\\".\") : void 0;\n }\n }\n\n return registry;\n }, {\n onCreateRule: [],\n onProcessRule: [],\n onProcessStyle: [],\n onProcessSheet: [],\n onChangeValue: [],\n onUpdate: []\n });\n };\n\n return PluginsRegistry;\n}();\n\n/**\n * Sheets registry to access all instances in one place.\n */\n\nvar SheetsRegistry =\n/*#__PURE__*/\nfunction () {\n function SheetsRegistry() {\n this.registry = [];\n }\n\n var _proto = SheetsRegistry.prototype;\n\n /**\n * Register a Style Sheet.\n */\n _proto.add = function add(sheet) {\n var registry = this.registry;\n var index = sheet.options.index;\n if (registry.indexOf(sheet) !== -1) return;\n\n if (registry.length === 0 || index >= this.index) {\n registry.push(sheet);\n return;\n } // Find a position.\n\n\n for (var i = 0; i < registry.length; i++) {\n if (registry[i].options.index > index) {\n registry.splice(i, 0, sheet);\n return;\n }\n }\n }\n /**\n * Reset the registry.\n */\n ;\n\n _proto.reset = function reset() {\n this.registry = [];\n }\n /**\n * Remove a Style Sheet.\n */\n ;\n\n _proto.remove = function remove(sheet) {\n var index = this.registry.indexOf(sheet);\n this.registry.splice(index, 1);\n }\n /**\n * Convert all attached sheets to a CSS string.\n */\n ;\n\n _proto.toString = function toString(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n attached = _ref.attached,\n options = _objectWithoutPropertiesLoose(_ref, [\"attached\"]);\n\n var _getWhitespaceSymbols = getWhitespaceSymbols(options),\n linebreak = _getWhitespaceSymbols.linebreak;\n\n var css = '';\n\n for (var i = 0; i < this.registry.length; i++) {\n var sheet = this.registry[i];\n\n if (attached != null && sheet.attached !== attached) {\n continue;\n }\n\n if (css) css += linebreak;\n css += sheet.toString(options);\n }\n\n return css;\n };\n\n _createClass(SheetsRegistry, [{\n key: \"index\",\n\n /**\n * Current highest index number.\n */\n get: function get() {\n return this.registry.length === 0 ? 0 : this.registry[this.registry.length - 1].options.index;\n }\n }]);\n\n return SheetsRegistry;\n}();\n\n/**\n * This is a global sheets registry. Only DomRenderer will add sheets to it.\n * On the server one should use an own SheetsRegistry instance and add the\n * sheets to it, because you need to make sure to create a new registry for\n * each request in order to not leak sheets across requests.\n */\n\nvar sheets = new SheetsRegistry();\n\n/* eslint-disable */\n\n/**\n * Now that `globalThis` is available on most platforms\n * (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis#browser_compatibility)\n * we check for `globalThis` first. `globalThis` is necessary for jss\n * to run in Agoric's secure version of JavaScript (SES). Under SES,\n * `globalThis` exists, but `window`, `self`, and `Function('return\n * this')()` are all undefined for security reasons.\n *\n * https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\n */\nvar globalThis$1 = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' && window.Math === Math ? window : typeof self !== 'undefined' && self.Math === Math ? self : Function('return this')();\n\nvar ns = '2f1acc6c3a606b082e5eef5e54414ffb';\nif (globalThis$1[ns] == null) globalThis$1[ns] = 0; // Bundle may contain multiple JSS versions at the same time. In order to identify\n// the current version with just one short number and use it for classes generation\n// we use a counter. Also it is more accurate, because user can manually reevaluate\n// the module.\n\nvar moduleId = globalThis$1[ns]++;\n\nvar maxRules = 1e10;\n/**\n * Returns a function which generates unique class names based on counters.\n * When new generator function is created, rule counter is reseted.\n * We need to reset the rule counter for SSR for each request.\n */\n\nvar createGenerateId = function createGenerateId(options) {\n if (options === void 0) {\n options = {};\n }\n\n var ruleCounter = 0;\n\n var generateId = function generateId(rule, sheet) {\n ruleCounter += 1;\n\n if (ruleCounter > maxRules) {\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] You might have a memory leak. Rule counter is at \" + ruleCounter + \".\") : void 0;\n }\n\n var jssId = '';\n var prefix = '';\n\n if (sheet) {\n if (sheet.options.classNamePrefix) {\n prefix = sheet.options.classNamePrefix;\n }\n\n if (sheet.options.jss.id != null) {\n jssId = String(sheet.options.jss.id);\n }\n }\n\n if (options.minify) {\n // Using \"c\" because a number can't be the first char in a class name.\n return \"\" + (prefix || 'c') + moduleId + jssId + ruleCounter;\n }\n\n return prefix + rule.key + \"-\" + moduleId + (jssId ? \"-\" + jssId : '') + \"-\" + ruleCounter;\n };\n\n return generateId;\n};\n\n/**\n * Cache the value from the first time a function is called.\n */\n\nvar memoize = function memoize(fn) {\n var value;\n return function () {\n if (!value) value = fn();\n return value;\n };\n};\n/**\n * Get a style property value.\n */\n\n\nvar getPropertyValue = function getPropertyValue(cssRule, prop) {\n try {\n // Support CSSTOM.\n if (cssRule.attributeStyleMap) {\n return cssRule.attributeStyleMap.get(prop);\n }\n\n return cssRule.style.getPropertyValue(prop);\n } catch (err) {\n // IE may throw if property is unknown.\n return '';\n }\n};\n/**\n * Set a style property.\n */\n\n\nvar setProperty = function setProperty(cssRule, prop, value) {\n try {\n var cssValue = value;\n\n if (Array.isArray(value)) {\n cssValue = toCssValue(value, true);\n\n if (value[value.length - 1] === '!important') {\n cssRule.style.setProperty(prop, cssValue, 'important');\n return true;\n }\n } // Support CSSTOM.\n\n\n if (cssRule.attributeStyleMap) {\n cssRule.attributeStyleMap.set(prop, cssValue);\n } else {\n cssRule.style.setProperty(prop, cssValue);\n }\n } catch (err) {\n // IE may throw if property is unknown.\n return false;\n }\n\n return true;\n};\n/**\n * Remove a style property.\n */\n\n\nvar removeProperty = function removeProperty(cssRule, prop) {\n try {\n // Support CSSTOM.\n if (cssRule.attributeStyleMap) {\n cssRule.attributeStyleMap.delete(prop);\n } else {\n cssRule.style.removeProperty(prop);\n }\n } catch (err) {\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] DOMException \\\"\" + err.message + \"\\\" was thrown. Tried to remove property \\\"\" + prop + \"\\\".\") : void 0;\n }\n};\n/**\n * Set the selector.\n */\n\n\nvar setSelector = function setSelector(cssRule, selectorText) {\n cssRule.selectorText = selectorText; // Return false if setter was not successful.\n // Currently works in chrome only.\n\n return cssRule.selectorText === selectorText;\n};\n/**\n * Gets the `head` element upon the first call and caches it.\n * We assume it can't be null.\n */\n\n\nvar getHead = memoize(function () {\n return document.querySelector('head');\n});\n/**\n * Find attached sheet with an index higher than the passed one.\n */\n\nfunction findHigherSheet(registry, options) {\n for (var i = 0; i < registry.length; i++) {\n var sheet = registry[i];\n\n if (sheet.attached && sheet.options.index > options.index && sheet.options.insertionPoint === options.insertionPoint) {\n return sheet;\n }\n }\n\n return null;\n}\n/**\n * Find attached sheet with the highest index.\n */\n\n\nfunction findHighestSheet(registry, options) {\n for (var i = registry.length - 1; i >= 0; i--) {\n var sheet = registry[i];\n\n if (sheet.attached && sheet.options.insertionPoint === options.insertionPoint) {\n return sheet;\n }\n }\n\n return null;\n}\n/**\n * Find a comment with \"jss\" inside.\n */\n\n\nfunction findCommentNode(text) {\n var head = getHead();\n\n for (var i = 0; i < head.childNodes.length; i++) {\n var node = head.childNodes[i];\n\n if (node.nodeType === 8 && node.nodeValue.trim() === text) {\n return node;\n }\n }\n\n return null;\n}\n/**\n * Find a node before which we can insert the sheet.\n */\n\n\nfunction findPrevNode(options) {\n var registry = sheets.registry;\n\n if (registry.length > 0) {\n // Try to insert before the next higher sheet.\n var sheet = findHigherSheet(registry, options);\n\n if (sheet && sheet.renderer) {\n return {\n parent: sheet.renderer.element.parentNode,\n node: sheet.renderer.element\n };\n } // Otherwise insert after the last attached.\n\n\n sheet = findHighestSheet(registry, options);\n\n if (sheet && sheet.renderer) {\n return {\n parent: sheet.renderer.element.parentNode,\n node: sheet.renderer.element.nextSibling\n };\n }\n } // Try to find a comment placeholder if registry is empty.\n\n\n var insertionPoint = options.insertionPoint;\n\n if (insertionPoint && typeof insertionPoint === 'string') {\n var comment = findCommentNode(insertionPoint);\n\n if (comment) {\n return {\n parent: comment.parentNode,\n node: comment.nextSibling\n };\n } // If user specifies an insertion point and it can't be found in the document -\n // bad specificity issues may appear.\n\n\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] Insertion point \\\"\" + insertionPoint + \"\\\" not found.\") : void 0;\n }\n\n return false;\n}\n/**\n * Insert style element into the DOM.\n */\n\n\nfunction insertStyle(style, options) {\n var insertionPoint = options.insertionPoint;\n var nextNode = findPrevNode(options);\n\n if (nextNode !== false && nextNode.parent) {\n nextNode.parent.insertBefore(style, nextNode.node);\n return;\n } // Works with iframes and any node types.\n\n\n if (insertionPoint && typeof insertionPoint.nodeType === 'number') {\n var insertionPointElement = insertionPoint;\n var parentNode = insertionPointElement.parentNode;\n if (parentNode) parentNode.insertBefore(style, insertionPointElement.nextSibling);else process.env.NODE_ENV !== \"production\" ? warning(false, '[JSS] Insertion point is not in the DOM.') : void 0;\n return;\n }\n\n getHead().appendChild(style);\n}\n/**\n * Read jss nonce setting from the page if the user has set it.\n */\n\n\nvar getNonce = memoize(function () {\n var node = document.querySelector('meta[property=\"csp-nonce\"]');\n return node ? node.getAttribute('content') : null;\n});\n\nvar _insertRule = function insertRule(container, rule, index) {\n try {\n if ('insertRule' in container) {\n container.insertRule(rule, index);\n } // Keyframes rule.\n else if ('appendRule' in container) {\n container.appendRule(rule);\n }\n } catch (err) {\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] \" + err.message) : void 0;\n return false;\n }\n\n return container.cssRules[index];\n};\n\nvar getValidRuleInsertionIndex = function getValidRuleInsertionIndex(container, index) {\n var maxIndex = container.cssRules.length; // In case previous insertion fails, passed index might be wrong\n\n if (index === undefined || index > maxIndex) {\n // eslint-disable-next-line no-param-reassign\n return maxIndex;\n }\n\n return index;\n};\n\nvar createStyle = function createStyle() {\n var el = document.createElement('style'); // Without it, IE will have a broken source order specificity if we\n // insert rules after we insert the style tag.\n // It seems to kick-off the source order specificity algorithm.\n\n el.textContent = '\\n';\n return el;\n};\n\nvar DomRenderer =\n/*#__PURE__*/\nfunction () {\n // Will be empty if link: true option is not set, because\n // it is only for use together with insertRule API.\n function DomRenderer(sheet) {\n this.getPropertyValue = getPropertyValue;\n this.setProperty = setProperty;\n this.removeProperty = removeProperty;\n this.setSelector = setSelector;\n this.hasInsertedRules = false;\n this.cssRules = [];\n // There is no sheet when the renderer is used from a standalone StyleRule.\n if (sheet) sheets.add(sheet);\n this.sheet = sheet;\n\n var _ref = this.sheet ? this.sheet.options : {},\n media = _ref.media,\n meta = _ref.meta,\n element = _ref.element;\n\n this.element = element || createStyle();\n this.element.setAttribute('data-jss', '');\n if (media) this.element.setAttribute('media', media);\n if (meta) this.element.setAttribute('data-meta', meta);\n var nonce = getNonce();\n if (nonce) this.element.setAttribute('nonce', nonce);\n }\n /**\n * Insert style element into render tree.\n */\n\n\n var _proto = DomRenderer.prototype;\n\n _proto.attach = function attach() {\n // In the case the element node is external and it is already in the DOM.\n if (this.element.parentNode || !this.sheet) return;\n insertStyle(this.element, this.sheet.options); // When rules are inserted using `insertRule` API, after `sheet.detach().attach()`\n // most browsers create a new CSSStyleSheet, except of all IEs.\n\n var deployed = Boolean(this.sheet && this.sheet.deployed);\n\n if (this.hasInsertedRules && deployed) {\n this.hasInsertedRules = false;\n this.deploy();\n }\n }\n /**\n * Remove style element from render tree.\n */\n ;\n\n _proto.detach = function detach() {\n if (!this.sheet) return;\n var parentNode = this.element.parentNode;\n if (parentNode) parentNode.removeChild(this.element); // In the most browsers, rules inserted using insertRule() API will be lost when style element is removed.\n // Though IE will keep them and we need a consistent behavior.\n\n if (this.sheet.options.link) {\n this.cssRules = [];\n this.element.textContent = '\\n';\n }\n }\n /**\n * Inject CSS string into element.\n */\n ;\n\n _proto.deploy = function deploy() {\n var sheet = this.sheet;\n if (!sheet) return;\n\n if (sheet.options.link) {\n this.insertRules(sheet.rules);\n return;\n }\n\n this.element.textContent = \"\\n\" + sheet.toString() + \"\\n\";\n }\n /**\n * Insert RuleList into an element.\n */\n ;\n\n _proto.insertRules = function insertRules(rules, nativeParent) {\n for (var i = 0; i < rules.index.length; i++) {\n this.insertRule(rules.index[i], i, nativeParent);\n }\n }\n /**\n * Insert a rule into element.\n */\n ;\n\n _proto.insertRule = function insertRule(rule, index, nativeParent) {\n if (nativeParent === void 0) {\n nativeParent = this.element.sheet;\n }\n\n if (rule.rules) {\n var parent = rule;\n var latestNativeParent = nativeParent;\n\n if (rule.type === 'conditional' || rule.type === 'keyframes') {\n var _insertionIndex = getValidRuleInsertionIndex(nativeParent, index); // We need to render the container without children first.\n\n\n latestNativeParent = _insertRule(nativeParent, parent.toString({\n children: false\n }), _insertionIndex);\n\n if (latestNativeParent === false) {\n return false;\n }\n\n this.refCssRule(rule, _insertionIndex, latestNativeParent);\n }\n\n this.insertRules(parent.rules, latestNativeParent);\n return latestNativeParent;\n }\n\n var ruleStr = rule.toString();\n if (!ruleStr) return false;\n var insertionIndex = getValidRuleInsertionIndex(nativeParent, index);\n\n var nativeRule = _insertRule(nativeParent, ruleStr, insertionIndex);\n\n if (nativeRule === false) {\n return false;\n }\n\n this.hasInsertedRules = true;\n this.refCssRule(rule, insertionIndex, nativeRule);\n return nativeRule;\n };\n\n _proto.refCssRule = function refCssRule(rule, index, cssRule) {\n rule.renderable = cssRule; // We only want to reference the top level rules, deleteRule API doesn't support removing nested rules\n // like rules inside media queries or keyframes\n\n if (rule.options.parent instanceof StyleSheet) {\n this.cssRules.splice(index, 0, cssRule);\n }\n }\n /**\n * Delete a rule.\n */\n ;\n\n _proto.deleteRule = function deleteRule(cssRule) {\n var sheet = this.element.sheet;\n var index = this.indexOf(cssRule);\n if (index === -1) return false;\n sheet.deleteRule(index);\n this.cssRules.splice(index, 1);\n return true;\n }\n /**\n * Get index of a CSS Rule.\n */\n ;\n\n _proto.indexOf = function indexOf(cssRule) {\n return this.cssRules.indexOf(cssRule);\n }\n /**\n * Generate a new CSS rule and replace the existing one.\n */\n ;\n\n _proto.replaceRule = function replaceRule(cssRule, rule) {\n var index = this.indexOf(cssRule);\n if (index === -1) return false;\n this.element.sheet.deleteRule(index);\n this.cssRules.splice(index, 1);\n return this.insertRule(rule, index);\n }\n /**\n * Get all rules elements.\n */\n ;\n\n _proto.getRules = function getRules() {\n return this.element.sheet.cssRules;\n };\n\n return DomRenderer;\n}();\n\nvar instanceCounter = 0;\n\nvar Jss =\n/*#__PURE__*/\nfunction () {\n function Jss(options) {\n this.id = instanceCounter++;\n this.version = \"10.9.0\";\n this.plugins = new PluginsRegistry();\n this.options = {\n id: {\n minify: false\n },\n createGenerateId: createGenerateId,\n Renderer: isInBrowser ? DomRenderer : null,\n plugins: []\n };\n this.generateId = createGenerateId({\n minify: false\n });\n\n for (var i = 0; i < plugins.length; i++) {\n this.plugins.use(plugins[i], {\n queue: 'internal'\n });\n }\n\n this.setup(options);\n }\n /**\n * Prepares various options, applies plugins.\n * Should not be used twice on the same instance, because there is no plugins\n * deduplication logic.\n */\n\n\n var _proto = Jss.prototype;\n\n _proto.setup = function setup(options) {\n if (options === void 0) {\n options = {};\n }\n\n if (options.createGenerateId) {\n this.options.createGenerateId = options.createGenerateId;\n }\n\n if (options.id) {\n this.options.id = _extends({}, this.options.id, options.id);\n }\n\n if (options.createGenerateId || options.id) {\n this.generateId = this.options.createGenerateId(this.options.id);\n }\n\n if (options.insertionPoint != null) this.options.insertionPoint = options.insertionPoint;\n\n if ('Renderer' in options) {\n this.options.Renderer = options.Renderer;\n } // eslint-disable-next-line prefer-spread\n\n\n if (options.plugins) this.use.apply(this, options.plugins);\n return this;\n }\n /**\n * Create a Style Sheet.\n */\n ;\n\n _proto.createStyleSheet = function createStyleSheet(styles, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n index = _options.index;\n\n if (typeof index !== 'number') {\n index = sheets.index === 0 ? 0 : sheets.index + 1;\n }\n\n var sheet = new StyleSheet(styles, _extends({}, options, {\n jss: this,\n generateId: options.generateId || this.generateId,\n insertionPoint: this.options.insertionPoint,\n Renderer: this.options.Renderer,\n index: index\n }));\n this.plugins.onProcessSheet(sheet);\n return sheet;\n }\n /**\n * Detach the Style Sheet and remove it from the registry.\n */\n ;\n\n _proto.removeStyleSheet = function removeStyleSheet(sheet) {\n sheet.detach();\n sheets.remove(sheet);\n return this;\n }\n /**\n * Create a rule without a Style Sheet.\n * [Deprecated] will be removed in the next major version.\n */\n ;\n\n _proto.createRule = function createRule$1(name, style, options) {\n if (style === void 0) {\n style = {};\n }\n\n if (options === void 0) {\n options = {};\n }\n\n // Enable rule without name for inline styles.\n if (typeof name === 'object') {\n return this.createRule(undefined, name, style);\n }\n\n var ruleOptions = _extends({}, options, {\n name: name,\n jss: this,\n Renderer: this.options.Renderer\n });\n\n if (!ruleOptions.generateId) ruleOptions.generateId = this.generateId;\n if (!ruleOptions.classes) ruleOptions.classes = {};\n if (!ruleOptions.keyframes) ruleOptions.keyframes = {};\n\n var rule = createRule(name, style, ruleOptions);\n\n if (rule) this.plugins.onProcessRule(rule);\n return rule;\n }\n /**\n * Register plugin. Passed function will be invoked with a rule instance.\n */\n ;\n\n _proto.use = function use() {\n var _this = this;\n\n for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {\n plugins[_key] = arguments[_key];\n }\n\n plugins.forEach(function (plugin) {\n _this.plugins.use(plugin);\n });\n return this;\n };\n\n return Jss;\n}();\n\nvar createJss = function createJss(options) {\n return new Jss(options);\n};\n\n/**\n * SheetsManager is like a WeakMap which is designed to count StyleSheet\n * instances and attach/detach automatically.\n * Used in react-jss.\n */\n\nvar SheetsManager =\n/*#__PURE__*/\nfunction () {\n function SheetsManager() {\n this.length = 0;\n this.sheets = new WeakMap();\n }\n\n var _proto = SheetsManager.prototype;\n\n _proto.get = function get(key) {\n var entry = this.sheets.get(key);\n return entry && entry.sheet;\n };\n\n _proto.add = function add(key, sheet) {\n if (this.sheets.has(key)) return;\n this.length++;\n this.sheets.set(key, {\n sheet: sheet,\n refs: 0\n });\n };\n\n _proto.manage = function manage(key) {\n var entry = this.sheets.get(key);\n\n if (entry) {\n if (entry.refs === 0) {\n entry.sheet.attach();\n }\n\n entry.refs++;\n return entry.sheet;\n }\n\n warning(false, \"[JSS] SheetsManager: can't find sheet to manage\");\n return undefined;\n };\n\n _proto.unmanage = function unmanage(key) {\n var entry = this.sheets.get(key);\n\n if (entry) {\n if (entry.refs > 0) {\n entry.refs--;\n if (entry.refs === 0) entry.sheet.detach();\n }\n } else {\n warning(false, \"SheetsManager: can't find sheet to unmanage\");\n }\n };\n\n _createClass(SheetsManager, [{\n key: \"size\",\n get: function get() {\n return this.length;\n }\n }]);\n\n return SheetsManager;\n}();\n\n/**\n* Export a constant indicating if this browser has CSSTOM support.\n* https://developers.google.com/web/updates/2018/03/cssom\n*/\nvar hasCSSTOMSupport = typeof CSS === 'object' && CSS != null && 'number' in CSS;\n\n/**\n * Extracts a styles object with only props that contain function values.\n */\nfunction getDynamicStyles(styles) {\n var to = null;\n\n for (var key in styles) {\n var value = styles[key];\n var type = typeof value;\n\n if (type === 'function') {\n if (!to) to = {};\n to[key] = value;\n } else if (type === 'object' && value !== null && !Array.isArray(value)) {\n var extracted = getDynamicStyles(value);\n\n if (extracted) {\n if (!to) to = {};\n to[key] = extracted;\n }\n }\n }\n\n return to;\n}\n\n/**\n * A better abstraction over CSS.\n *\n * @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present\n * @website https://github.com/cssinjs/jss\n * @license MIT\n */\nvar index = createJss();\n\nexport default index;\nexport { RuleList, SheetsManager, SheetsRegistry, createJss as create, createGenerateId, createRule, getDynamicStyles, hasCSSTOMSupport, sheets, toCssValue };\n","/**\n * @license\n * Lodash \n * Copyright OpenJS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n;(function() {\n\n /** Used as a safe reference for `undefined` in pre-ES5 environments. */\n var undefined;\n\n /** Used as the semantic version number. */\n var VERSION = '4.17.21';\n\n /** Used as the size to enable large array optimizations. */\n var LARGE_ARRAY_SIZE = 200;\n\n /** Error message constants. */\n var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',\n FUNC_ERROR_TEXT = 'Expected a function',\n INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';\n\n /** Used to stand-in for `undefined` hash values. */\n var HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n /** Used as the maximum memoize cache size. */\n var MAX_MEMOIZE_SIZE = 500;\n\n /** Used as the internal argument placeholder. */\n var PLACEHOLDER = '__lodash_placeholder__';\n\n /** Used to compose bitmasks for cloning. */\n var CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n /** Used to compose bitmasks for value comparisons. */\n var COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n /** Used to compose bitmasks for function metadata. */\n var WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256,\n WRAP_FLIP_FLAG = 512;\n\n /** Used as default options for `_.truncate`. */\n var DEFAULT_TRUNC_LENGTH = 30,\n DEFAULT_TRUNC_OMISSION = '...';\n\n /** Used to detect hot functions by number of calls within a span of milliseconds. */\n var HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n /** Used to indicate the type of lazy iteratees. */\n var LAZY_FILTER_FLAG = 1,\n LAZY_MAP_FLAG = 2,\n LAZY_WHILE_FLAG = 3;\n\n /** Used as references for various `Number` constants. */\n var INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991,\n MAX_INTEGER = 1.7976931348623157e+308,\n NAN = 0 / 0;\n\n /** Used as references for the maximum length and index of an array. */\n var MAX_ARRAY_LENGTH = 4294967295,\n MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,\n HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n /** Used to associate wrap methods with their bit flags. */\n var wrapFlags = [\n ['ary', WRAP_ARY_FLAG],\n ['bind', WRAP_BIND_FLAG],\n ['bindKey', WRAP_BIND_KEY_FLAG],\n ['curry', WRAP_CURRY_FLAG],\n ['curryRight', WRAP_CURRY_RIGHT_FLAG],\n ['flip', WRAP_FLIP_FLAG],\n ['partial', WRAP_PARTIAL_FLAG],\n ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\n ['rearg', WRAP_REARG_FLAG]\n ];\n\n /** `Object#toString` result references. */\n var argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n domExcTag = '[object DOMException]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]',\n weakSetTag = '[object WeakSet]';\n\n var arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n /** Used to match empty string literals in compiled template source. */\n var reEmptyStringLeading = /\\b__p \\+= '';/g,\n reEmptyStringMiddle = /\\b(__p \\+=) '' \\+/g,\n reEmptyStringTrailing = /(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;\n\n /** Used to match HTML entities and HTML characters. */\n var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,\n reUnescapedHtml = /[&<>\"']/g,\n reHasEscapedHtml = RegExp(reEscapedHtml.source),\n reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\n /** Used to match template delimiters. */\n var reEscape = /<%-([\\s\\S]+?)%>/g,\n reEvaluate = /<%([\\s\\S]+?)%>/g,\n reInterpolate = /<%=([\\s\\S]+?)%>/g;\n\n /** Used to match property names within property paths. */\n var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n /**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n reHasRegExpChar = RegExp(reRegExpChar.source);\n\n /** Used to match leading whitespace. */\n var reTrimStart = /^\\s+/;\n\n /** Used to match a single whitespace character. */\n var reWhitespace = /\\s/;\n\n /** Used to match wrap detail comments. */\n var reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,\n reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n reSplitDetails = /,? & /;\n\n /** Used to match words composed of alphanumeric characters. */\n var reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n /**\n * Used to validate the `validate` option in `_.template` variable.\n *\n * Forbids characters which could potentially change the meaning of the function argument definition:\n * - \"(),\" (modification of function parameters)\n * - \"=\" (default value)\n * - \"[]{}\" (destructuring of function parameters)\n * - \"/\" (beginning of a comment)\n * - whitespace\n */\n var reForbiddenIdentifierChars = /[()=,{}\\[\\]\\/\\s]/;\n\n /** Used to match backslashes in property paths. */\n var reEscapeChar = /\\\\(\\\\)?/g;\n\n /**\n * Used to match\n * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).\n */\n var reEsTemplate = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\n\n /** Used to match `RegExp` flags from their coerced string values. */\n var reFlags = /\\w*$/;\n\n /** Used to detect bad signed hexadecimal string values. */\n var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n /** Used to detect binary string values. */\n var reIsBinary = /^0b[01]+$/i;\n\n /** Used to detect host constructors (Safari). */\n var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n /** Used to detect octal string values. */\n var reIsOctal = /^0o[0-7]+$/i;\n\n /** Used to detect unsigned integer values. */\n var reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n /** Used to match Latin Unicode letters (excluding mathematical operators). */\n var reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n /** Used to ensure capturing order of template delimiters. */\n var reNoMatch = /($^)/;\n\n /** Used to match unescaped characters in compiled string literals. */\n var reUnescapedString = /['\\n\\r\\u2028\\u2029\\\\]/g;\n\n /** Used to compose unicode character classes. */\n var rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsDingbatRange = '\\\\u2700-\\\\u27bf',\n rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n rsPunctuationRange = '\\\\u2000-\\\\u206f',\n rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n rsVarRange = '\\\\ufe0e\\\\ufe0f',\n rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n /** Used to compose unicode capture groups. */\n var rsApos = \"['\\u2019]\",\n rsAstral = '[' + rsAstralRange + ']',\n rsBreak = '[' + rsBreakRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsDigits = '\\\\d+',\n rsDingbat = '[' + rsDingbatRange + ']',\n rsLower = '[' + rsLowerRange + ']',\n rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsUpper = '[' + rsUpperRange + ']',\n rsZWJ = '\\\\u200d';\n\n /** Used to compose unicode regexes. */\n var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n /** Used to match apostrophes. */\n var reApos = RegExp(rsApos, 'g');\n\n /**\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n */\n var reComboMark = RegExp(rsCombo, 'g');\n\n /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\n var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n /** Used to match complex or compound words. */\n var reUnicodeWord = RegExp([\n rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n rsUpper + '+' + rsOptContrUpper,\n rsOrdUpper,\n rsOrdLower,\n rsDigits,\n rsEmoji\n ].join('|'), 'g');\n\n /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\n var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n /** Used to detect strings that need a more robust regexp to match words. */\n var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n /** Used to assign default `context` object properties. */\n var contextProps = [\n 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',\n 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',\n 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',\n 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',\n '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'\n ];\n\n /** Used to make template sourceURLs easier to identify. */\n var templateCounter = -1;\n\n /** Used to identify `toStringTag` values of typed arrays. */\n var typedArrayTags = {};\n typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\n typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\n typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\n typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\n typedArrayTags[uint32Tag] = true;\n typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\n typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\n typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\n typedArrayTags[errorTag] = typedArrayTags[funcTag] =\n typedArrayTags[mapTag] = typedArrayTags[numberTag] =\n typedArrayTags[objectTag] = typedArrayTags[regexpTag] =\n typedArrayTags[setTag] = typedArrayTags[stringTag] =\n typedArrayTags[weakMapTag] = false;\n\n /** Used to identify `toStringTag` values supported by `_.clone`. */\n var cloneableTags = {};\n cloneableTags[argsTag] = cloneableTags[arrayTag] =\n cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\n cloneableTags[boolTag] = cloneableTags[dateTag] =\n cloneableTags[float32Tag] = cloneableTags[float64Tag] =\n cloneableTags[int8Tag] = cloneableTags[int16Tag] =\n cloneableTags[int32Tag] = cloneableTags[mapTag] =\n cloneableTags[numberTag] = cloneableTags[objectTag] =\n cloneableTags[regexpTag] = cloneableTags[setTag] =\n cloneableTags[stringTag] = cloneableTags[symbolTag] =\n cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\n cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\n cloneableTags[errorTag] = cloneableTags[funcTag] =\n cloneableTags[weakMapTag] = false;\n\n /** Used to map Latin Unicode letters to basic Latin letters. */\n var deburredLetters = {\n // Latin-1 Supplement block.\n '\\xc0': 'A', '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n '\\xe0': 'a', '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n '\\xc7': 'C', '\\xe7': 'c',\n '\\xd0': 'D', '\\xf0': 'd',\n '\\xc8': 'E', '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n '\\xe8': 'e', '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n '\\xcc': 'I', '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n '\\xec': 'i', '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n '\\xd1': 'N', '\\xf1': 'n',\n '\\xd2': 'O', '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n '\\xf2': 'o', '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n '\\xd9': 'U', '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n '\\xf9': 'u', '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n '\\xdd': 'Y', '\\xfd': 'y', '\\xff': 'y',\n '\\xc6': 'Ae', '\\xe6': 'ae',\n '\\xde': 'Th', '\\xfe': 'th',\n '\\xdf': 'ss',\n // Latin Extended-A block.\n '\\u0100': 'A', '\\u0102': 'A', '\\u0104': 'A',\n '\\u0101': 'a', '\\u0103': 'a', '\\u0105': 'a',\n '\\u0106': 'C', '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n '\\u0107': 'c', '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n '\\u010e': 'D', '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n '\\u0112': 'E', '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n '\\u0113': 'e', '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n '\\u011c': 'G', '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n '\\u011d': 'g', '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n '\\u0124': 'H', '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n '\\u0128': 'I', '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n '\\u0129': 'i', '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n '\\u0134': 'J', '\\u0135': 'j',\n '\\u0136': 'K', '\\u0137': 'k', '\\u0138': 'k',\n '\\u0139': 'L', '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n '\\u013a': 'l', '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n '\\u0143': 'N', '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n '\\u0144': 'n', '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n '\\u014c': 'O', '\\u014e': 'O', '\\u0150': 'O',\n '\\u014d': 'o', '\\u014f': 'o', '\\u0151': 'o',\n '\\u0154': 'R', '\\u0156': 'R', '\\u0158': 'R',\n '\\u0155': 'r', '\\u0157': 'r', '\\u0159': 'r',\n '\\u015a': 'S', '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n '\\u015b': 's', '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n '\\u0162': 'T', '\\u0164': 'T', '\\u0166': 'T',\n '\\u0163': 't', '\\u0165': 't', '\\u0167': 't',\n '\\u0168': 'U', '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n '\\u0169': 'u', '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n '\\u0174': 'W', '\\u0175': 'w',\n '\\u0176': 'Y', '\\u0177': 'y', '\\u0178': 'Y',\n '\\u0179': 'Z', '\\u017b': 'Z', '\\u017d': 'Z',\n '\\u017a': 'z', '\\u017c': 'z', '\\u017e': 'z',\n '\\u0132': 'IJ', '\\u0133': 'ij',\n '\\u0152': 'Oe', '\\u0153': 'oe',\n '\\u0149': \"'n\", '\\u017f': 's'\n };\n\n /** Used to map characters to HTML entities. */\n var htmlEscapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n };\n\n /** Used to map HTML entities to characters. */\n var htmlUnescapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\"\n };\n\n /** Used to escape characters for inclusion in compiled string literals. */\n var stringEscapes = {\n '\\\\': '\\\\',\n \"'\": \"'\",\n '\\n': 'n',\n '\\r': 'r',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n /** Built-in method references without a dependency on `root`. */\n var freeParseFloat = parseFloat,\n freeParseInt = parseInt;\n\n /** Detect free variable `global` from Node.js. */\n var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n /** Detect free variable `self`. */\n var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n /** Used as a reference to the global object. */\n var root = freeGlobal || freeSelf || Function('return this')();\n\n /** Detect free variable `exports`. */\n var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n /** Detect free variable `module`. */\n var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n /** Detect the popular CommonJS extension `module.exports`. */\n var moduleExports = freeModule && freeModule.exports === freeExports;\n\n /** Detect free variable `process` from Node.js. */\n var freeProcess = moduleExports && freeGlobal.process;\n\n /** Used to access faster Node.js helpers. */\n var nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n }());\n\n /* Node.js helper references. */\n var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,\n nodeIsDate = nodeUtil && nodeUtil.isDate,\n nodeIsMap = nodeUtil && nodeUtil.isMap,\n nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,\n nodeIsSet = nodeUtil && nodeUtil.isSet,\n nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\n function apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n }\n\n /**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.forEachRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEachRight(array, iteratee) {\n var length = array == null ? 0 : array.length;\n\n while (length--) {\n if (iteratee(array[length], length, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.every` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n */\n function arrayEvery(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (!predicate(array[index], index, array)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n }\n\n /**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n }\n\n /**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\n function arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n }\n\n /**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.reduceRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the last element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduceRight(array, iteratee, accumulator, initAccum) {\n var length = array == null ? 0 : array.length;\n if (initAccum && length) {\n accumulator = array[--length];\n }\n while (length--) {\n accumulator = iteratee(accumulator, array[length], length, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Gets the size of an ASCII `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n var asciiSize = baseProperty('length');\n\n /**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function asciiToArray(string) {\n return string.split('');\n }\n\n /**\n * Splits an ASCII `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function asciiWords(string) {\n return string.match(reAsciiWord) || [];\n }\n\n /**\n * The base implementation of methods like `_.findKey` and `_.findLastKey`,\n * without support for iteratee shorthands, which iterates over `collection`\n * using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the found element or its key, else `undefined`.\n */\n function baseFindKey(collection, predicate, eachFunc) {\n var result;\n eachFunc(collection, function(value, key, collection) {\n if (predicate(value, key, collection)) {\n result = key;\n return false;\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n }\n\n /**\n * This function is like `baseIndexOf` except that it accepts a comparator.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOfWith(array, value, fromIndex, comparator) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (comparator(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\n function baseIsNaN(value) {\n return value !== value;\n }\n\n /**\n * The base implementation of `_.mean` and `_.meanBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the mean.\n */\n function baseMean(array, iteratee) {\n var length = array == null ? 0 : array.length;\n return length ? (baseSum(array, iteratee) / length) : NAN;\n }\n\n /**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyOf(object) {\n return function(key) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} accumulator The initial value.\n * @param {boolean} initAccum Specify using the first or last element of\n * `collection` as the initial value.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the accumulated value.\n */\n function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n eachFunc(collection, function(value, index, collection) {\n accumulator = initAccum\n ? (initAccum = false, value)\n : iteratee(accumulator, value, index, collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.sortBy` which uses `comparer` to define the\n * sort order of `array` and replaces criteria objects with their corresponding\n * values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\n function baseSortBy(array, comparer) {\n var length = array.length;\n\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.sum` and `_.sumBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the sum.\n */\n function baseSum(array, iteratee) {\n var result,\n index = -1,\n length = array.length;\n\n while (++index < length) {\n var current = iteratee(array[index]);\n if (current !== undefined) {\n result = result === undefined ? current : (result + current);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\n function baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array\n * of key-value pairs for `object` corresponding to the property names of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the key-value pairs.\n */\n function baseToPairs(object, props) {\n return arrayMap(props, function(key) {\n return [key, object[key]];\n });\n }\n\n /**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\n function baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n }\n\n /**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\n function baseUnary(func) {\n return function(value) {\n return func(value);\n };\n }\n\n /**\n * The base implementation of `_.values` and `_.valuesIn` which creates an\n * array of `object` property values corresponding to the property names\n * of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the array of property values.\n */\n function baseValues(object, props) {\n return arrayMap(props, function(key) {\n return object[key];\n });\n }\n\n /**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function cacheHas(cache, key) {\n return cache.has(key);\n }\n\n /**\n * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the first unmatched string symbol.\n */\n function charsStartIndex(strSymbols, chrSymbols) {\n var index = -1,\n length = strSymbols.length;\n\n while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the last unmatched string symbol.\n */\n function charsEndIndex(strSymbols, chrSymbols) {\n var index = strSymbols.length;\n\n while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Gets the number of `placeholder` occurrences in `array`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} placeholder The placeholder to search for.\n * @returns {number} Returns the placeholder count.\n */\n function countHolders(array, placeholder) {\n var length = array.length,\n result = 0;\n\n while (length--) {\n if (array[length] === placeholder) {\n ++result;\n }\n }\n return result;\n }\n\n /**\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n * letters to basic Latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */\n var deburrLetter = basePropertyOf(deburredLetters);\n\n /**\n * Used by `_.escape` to convert characters to HTML entities.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n var escapeHtmlChar = basePropertyOf(htmlEscapes);\n\n /**\n * Used by `_.template` to escape characters for inclusion in compiled string literals.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n function escapeStringChar(chr) {\n return '\\\\' + stringEscapes[chr];\n }\n\n /**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function getValue(object, key) {\n return object == null ? undefined : object[key];\n }\n\n /**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\n function hasUnicode(string) {\n return reHasUnicode.test(string);\n }\n\n /**\n * Checks if `string` contains a word composed of Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a word is found, else `false`.\n */\n function hasUnicodeWord(string) {\n return reHasUnicodeWord.test(string);\n }\n\n /**\n * Converts `iterator` to an array.\n *\n * @private\n * @param {Object} iterator The iterator to convert.\n * @returns {Array} Returns the converted array.\n */\n function iteratorToArray(iterator) {\n var data,\n result = [];\n\n while (!(data = iterator.next()).done) {\n result.push(data.value);\n }\n return result;\n }\n\n /**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\n function mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n }\n\n /**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\n function overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n }\n\n /**\n * Replaces all `placeholder` elements in `array` with an internal placeholder\n * and returns an array of their indexes.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {*} placeholder The placeholder to replace.\n * @returns {Array} Returns the new array of placeholder indexes.\n */\n function replaceHolders(array, placeholder) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value === placeholder || value === PLACEHOLDER) {\n array[index] = PLACEHOLDER;\n result[resIndex++] = index;\n }\n }\n return result;\n }\n\n /**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\n function setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n }\n\n /**\n * Converts `set` to its value-value pairs.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the value-value pairs.\n */\n function setToPairs(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = [value, value];\n });\n return result;\n }\n\n /**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * A specialized version of `_.lastIndexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictLastIndexOf(array, value, fromIndex) {\n var index = fromIndex + 1;\n while (index--) {\n if (array[index] === value) {\n return index;\n }\n }\n return index;\n }\n\n /**\n * Gets the number of symbols in `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the string size.\n */\n function stringSize(string) {\n return hasUnicode(string)\n ? unicodeSize(string)\n : asciiSize(string);\n }\n\n /**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function stringToArray(string) {\n return hasUnicode(string)\n ? unicodeToArray(string)\n : asciiToArray(string);\n }\n\n /**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\n function trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n }\n\n /**\n * Used by `_.unescape` to convert HTML entities to characters.\n *\n * @private\n * @param {string} chr The matched character to unescape.\n * @returns {string} Returns the unescaped character.\n */\n var unescapeHtmlChar = basePropertyOf(htmlUnescapes);\n\n /**\n * Gets the size of a Unicode `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n function unicodeSize(string) {\n var result = reUnicode.lastIndex = 0;\n while (reUnicode.test(string)) {\n ++result;\n }\n return result;\n }\n\n /**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function unicodeToArray(string) {\n return string.match(reUnicode) || [];\n }\n\n /**\n * Splits a Unicode `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function unicodeWords(string) {\n return string.match(reUnicodeWord) || [];\n }\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Create a new pristine `lodash` function using the `context` object.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Util\n * @param {Object} [context=root] The context object.\n * @returns {Function} Returns a new `lodash` function.\n * @example\n *\n * _.mixin({ 'foo': _.constant('foo') });\n *\n * var lodash = _.runInContext();\n * lodash.mixin({ 'bar': lodash.constant('bar') });\n *\n * _.isFunction(_.foo);\n * // => true\n * _.isFunction(_.bar);\n * // => false\n *\n * lodash.isFunction(lodash.foo);\n * // => false\n * lodash.isFunction(lodash.bar);\n * // => true\n *\n * // Create a suped-up `defer` in Node.js.\n * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;\n */\n var runInContext = (function runInContext(context) {\n context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));\n\n /** Built-in constructor references. */\n var Array = context.Array,\n Date = context.Date,\n Error = context.Error,\n Function = context.Function,\n Math = context.Math,\n Object = context.Object,\n RegExp = context.RegExp,\n String = context.String,\n TypeError = context.TypeError;\n\n /** Used for built-in method references. */\n var arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n /** Used to detect overreaching core-js shims. */\n var coreJsData = context['__core-js_shared__'];\n\n /** Used to resolve the decompiled source of functions. */\n var funcToString = funcProto.toString;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /** Used to generate unique IDs. */\n var idCounter = 0;\n\n /** Used to detect methods masquerading as native. */\n var maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n }());\n\n /**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\n var nativeObjectToString = objectProto.toString;\n\n /** Used to infer the `Object` constructor. */\n var objectCtorString = funcToString.call(Object);\n\n /** Used to restore the original `_` reference in `_.noConflict`. */\n var oldDash = root._;\n\n /** Used to detect if a method is native. */\n var reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n );\n\n /** Built-in value references. */\n var Buffer = moduleExports ? context.Buffer : undefined,\n Symbol = context.Symbol,\n Uint8Array = context.Uint8Array,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,\n symIterator = Symbol ? Symbol.iterator : undefined,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n var defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n }());\n\n /** Mocked built-ins. */\n var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,\n ctxNow = Date && Date.now !== root.Date.now && Date.now,\n ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;\n\n /* Built-in method references for those with the same name as other `lodash` methods. */\n var nativeCeil = Math.ceil,\n nativeFloor = Math.floor,\n nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeIsFinite = context.isFinite,\n nativeJoin = arrayProto.join,\n nativeKeys = overArg(Object.keys, Object),\n nativeMax = Math.max,\n nativeMin = Math.min,\n nativeNow = Date.now,\n nativeParseInt = context.parseInt,\n nativeRandom = Math.random,\n nativeReverse = arrayProto.reverse;\n\n /* Built-in method references that are verified to be native. */\n var DataView = getNative(context, 'DataView'),\n Map = getNative(context, 'Map'),\n Promise = getNative(context, 'Promise'),\n Set = getNative(context, 'Set'),\n WeakMap = getNative(context, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n /** Used to store function metadata. */\n var metaMap = WeakMap && new WeakMap;\n\n /** Used to lookup unminified function names. */\n var realNames = {};\n\n /** Used to detect maps, sets, and weakmaps. */\n var dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n /** Used to convert symbols to primitives and strings. */\n var symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` object which wraps `value` to enable implicit method\n * chain sequences. Methods that operate on and return arrays, collections,\n * and functions can be chained together. Methods that retrieve a single value\n * or may return a primitive value will automatically end the chain sequence\n * and return the unwrapped value. Otherwise, the value must be unwrapped\n * with `_#value`.\n *\n * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n * enabled using `_.chain`.\n *\n * The execution of chained methods is lazy, that is, it's deferred until\n * `_#value` is implicitly or explicitly called.\n *\n * Lazy evaluation allows several methods to support shortcut fusion.\n * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n * the creation of intermediate arrays and can greatly reduce the number of\n * iteratee executions. Sections of a chain sequence qualify for shortcut\n * fusion if the section is applied to an array and iteratees accept only\n * one argument. The heuristic for whether a section qualifies for shortcut\n * fusion is subject to change.\n *\n * Chaining is supported in custom builds as long as the `_#value` method is\n * directly or indirectly included in the build.\n *\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\n *\n * The wrapper `Array` methods are:\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n *\n * The wrapper `String` methods are:\n * `replace` and `split`\n *\n * The wrapper methods that support shortcut fusion are:\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n *\n * The chainable wrapper methods are:\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n * `zipObject`, `zipObjectDeep`, and `zipWith`\n *\n * The wrapper methods that are **not** chainable by default are:\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n * `upperFirst`, `value`, and `words`\n *\n * @name _\n * @constructor\n * @category Seq\n * @param {*} value The value to wrap in a `lodash` instance.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2, 3]);\n *\n * // Returns an unwrapped value.\n * wrapped.reduce(_.add);\n * // => 6\n *\n * // Returns a wrapped value.\n * var squares = wrapped.map(square);\n *\n * _.isArray(squares);\n * // => false\n *\n * _.isArray(squares.value());\n * // => true\n */\n function lodash(value) {\n if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n if (value instanceof LodashWrapper) {\n return value;\n }\n if (hasOwnProperty.call(value, '__wrapped__')) {\n return wrapperClone(value);\n }\n }\n return new LodashWrapper(value);\n }\n\n /**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\n var baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n }());\n\n /**\n * The function whose prototype chain sequence wrappers inherit from.\n *\n * @private\n */\n function baseLodash() {\n // No operation performed.\n }\n\n /**\n * The base constructor for creating `lodash` wrapper objects.\n *\n * @private\n * @param {*} value The value to wrap.\n * @param {boolean} [chainAll] Enable explicit method chain sequences.\n */\n function LodashWrapper(value, chainAll) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__chain__ = !!chainAll;\n this.__index__ = 0;\n this.__values__ = undefined;\n }\n\n /**\n * By default, the template delimiters used by lodash are like those in\n * embedded Ruby (ERB) as well as ES2015 template strings. Change the\n * following template settings to use alternative delimiters.\n *\n * @static\n * @memberOf _\n * @type {Object}\n */\n lodash.templateSettings = {\n\n /**\n * Used to detect `data` property values to be HTML-escaped.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'escape': reEscape,\n\n /**\n * Used to detect code to be evaluated.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'evaluate': reEvaluate,\n\n /**\n * Used to detect `data` property values to inject.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'interpolate': reInterpolate,\n\n /**\n * Used to reference the data object in the template text.\n *\n * @memberOf _.templateSettings\n * @type {string}\n */\n 'variable': '',\n\n /**\n * Used to import variables into the compiled template.\n *\n * @memberOf _.templateSettings\n * @type {Object}\n */\n 'imports': {\n\n /**\n * A reference to the `lodash` function.\n *\n * @memberOf _.templateSettings.imports\n * @type {Function}\n */\n '_': lodash\n }\n };\n\n // Ensure wrappers are instances of `baseLodash`.\n lodash.prototype = baseLodash.prototype;\n lodash.prototype.constructor = lodash;\n\n LodashWrapper.prototype = baseCreate(baseLodash.prototype);\n LodashWrapper.prototype.constructor = LodashWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n *\n * @private\n * @constructor\n * @param {*} value The value to wrap.\n */\n function LazyWrapper(value) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__dir__ = 1;\n this.__filtered__ = false;\n this.__iteratees__ = [];\n this.__takeCount__ = MAX_ARRAY_LENGTH;\n this.__views__ = [];\n }\n\n /**\n * Creates a clone of the lazy wrapper object.\n *\n * @private\n * @name clone\n * @memberOf LazyWrapper\n * @returns {Object} Returns the cloned `LazyWrapper` object.\n */\n function lazyClone() {\n var result = new LazyWrapper(this.__wrapped__);\n result.__actions__ = copyArray(this.__actions__);\n result.__dir__ = this.__dir__;\n result.__filtered__ = this.__filtered__;\n result.__iteratees__ = copyArray(this.__iteratees__);\n result.__takeCount__ = this.__takeCount__;\n result.__views__ = copyArray(this.__views__);\n return result;\n }\n\n /**\n * Reverses the direction of lazy iteration.\n *\n * @private\n * @name reverse\n * @memberOf LazyWrapper\n * @returns {Object} Returns the new reversed `LazyWrapper` object.\n */\n function lazyReverse() {\n if (this.__filtered__) {\n var result = new LazyWrapper(this);\n result.__dir__ = -1;\n result.__filtered__ = true;\n } else {\n result = this.clone();\n result.__dir__ *= -1;\n }\n return result;\n }\n\n /**\n * Extracts the unwrapped value from its lazy wrapper.\n *\n * @private\n * @name value\n * @memberOf LazyWrapper\n * @returns {*} Returns the unwrapped value.\n */\n function lazyValue() {\n var array = this.__wrapped__.value(),\n dir = this.__dir__,\n isArr = isArray(array),\n isRight = dir < 0,\n arrLength = isArr ? array.length : 0,\n view = getView(0, arrLength, this.__views__),\n start = view.start,\n end = view.end,\n length = end - start,\n index = isRight ? end : (start - 1),\n iteratees = this.__iteratees__,\n iterLength = iteratees.length,\n resIndex = 0,\n takeCount = nativeMin(length, this.__takeCount__);\n\n if (!isArr || (!isRight && arrLength == length && takeCount == length)) {\n return baseWrapperValue(array, this.__actions__);\n }\n var result = [];\n\n outer:\n while (length-- && resIndex < takeCount) {\n index += dir;\n\n var iterIndex = -1,\n value = array[index];\n\n while (++iterIndex < iterLength) {\n var data = iteratees[iterIndex],\n iteratee = data.iteratee,\n type = data.type,\n computed = iteratee(value);\n\n if (type == LAZY_MAP_FLAG) {\n value = computed;\n } else if (!computed) {\n if (type == LAZY_FILTER_FLAG) {\n continue outer;\n } else {\n break outer;\n }\n }\n }\n result[resIndex++] = value;\n }\n return result;\n }\n\n // Ensure `LazyWrapper` is an instance of `baseLodash`.\n LazyWrapper.prototype = baseCreate(baseLodash.prototype);\n LazyWrapper.prototype.constructor = LazyWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\n function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n }\n\n /**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n }\n\n /**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\n function hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n }\n\n // Add methods to `Hash`.\n Hash.prototype.clear = hashClear;\n Hash.prototype['delete'] = hashDelete;\n Hash.prototype.get = hashGet;\n Hash.prototype.has = hashHas;\n Hash.prototype.set = hashSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\n function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n }\n\n /**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n }\n\n /**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n }\n\n /**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\n function listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n }\n\n // Add methods to `ListCache`.\n ListCache.prototype.clear = listCacheClear;\n ListCache.prototype['delete'] = listCacheDelete;\n ListCache.prototype.get = listCacheGet;\n ListCache.prototype.has = listCacheHas;\n ListCache.prototype.set = listCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\n function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n }\n\n /**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function mapCacheGet(key) {\n return getMapData(this, key).get(key);\n }\n\n /**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function mapCacheHas(key) {\n return getMapData(this, key).has(key);\n }\n\n /**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\n function mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n }\n\n // Add methods to `MapCache`.\n MapCache.prototype.clear = mapCacheClear;\n MapCache.prototype['delete'] = mapCacheDelete;\n MapCache.prototype.get = mapCacheGet;\n MapCache.prototype.has = mapCacheHas;\n MapCache.prototype.set = mapCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\n function SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n }\n\n /**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\n function setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n }\n\n /**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\n function setCacheHas(value) {\n return this.__data__.has(value);\n }\n\n // Add methods to `SetCache`.\n SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\n SetCache.prototype.has = setCacheHas;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n }\n\n /**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\n function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n }\n\n /**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function stackGet(key) {\n return this.__data__.get(key);\n }\n\n /**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function stackHas(key) {\n return this.__data__.has(key);\n }\n\n /**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\n function stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n }\n\n // Add methods to `Stack`.\n Stack.prototype.clear = stackClear;\n Stack.prototype['delete'] = stackDelete;\n Stack.prototype.get = stackGet;\n Stack.prototype.has = stackHas;\n Stack.prototype.set = stackSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\n function arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.sample` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @returns {*} Returns the random element.\n */\n function arraySample(array) {\n var length = array.length;\n return length ? array[baseRandom(0, length - 1)] : undefined;\n }\n\n /**\n * A specialized version of `_.sampleSize` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function arraySampleSize(array, n) {\n return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));\n }\n\n /**\n * A specialized version of `_.shuffle` for arrays.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function arrayShuffle(array) {\n return shuffleSelf(copyArray(array));\n }\n\n /**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n }\n\n /**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n }\n\n /**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n }\n\n /**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n }\n\n /**\n * The base implementation of `_.at` without support for individual paths.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {string[]} paths The property paths to pick.\n * @returns {Array} Returns the picked elements.\n */\n function baseAt(object, paths) {\n var index = -1,\n length = paths.length,\n result = Array(length),\n skip = object == null;\n\n while (++index < length) {\n result[index] = skip ? undefined : get(object, paths[index]);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.clamp` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n */\n function baseClamp(number, lower, upper) {\n if (number === number) {\n if (upper !== undefined) {\n number = number <= upper ? number : upper;\n }\n if (lower !== undefined) {\n number = number >= lower ? number : lower;\n }\n }\n return number;\n }\n\n /**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\n function baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n }\n\n /**\n * The base implementation of `_.conforms` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property predicates to conform to.\n * @returns {Function} Returns the new spec function.\n */\n function baseConforms(source) {\n var props = keys(source);\n return function(object) {\n return baseConformsTo(object, source, props);\n };\n }\n\n /**\n * The base implementation of `_.conformsTo` which accepts `props` to check.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n */\n function baseConformsTo(object, source, props) {\n var length = props.length;\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (length--) {\n var key = props[length],\n predicate = source[key],\n value = object[key];\n\n if ((value === undefined && !(key in object)) || !predicate(value)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.delay` and `_.defer` which accepts `args`\n * to provide to `func`.\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {Array} args The arguments to provide to `func`.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n function baseDelay(func, wait, args) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return setTimeout(function() { func.apply(undefined, args); }, wait);\n }\n\n /**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\n function baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEach = createBaseEach(baseForOwn);\n\n /**\n * The base implementation of `_.forEachRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEachRight = createBaseEach(baseForOwnRight, true);\n\n /**\n * The base implementation of `_.every` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`\n */\n function baseEvery(collection, predicate) {\n var result = true;\n baseEach(collection, function(value, index, collection) {\n result = !!predicate(value, index, collection);\n return result;\n });\n return result;\n }\n\n /**\n * The base implementation of methods like `_.max` and `_.min` which accepts a\n * `comparator` to determine the extremum value.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The iteratee invoked per iteration.\n * @param {Function} comparator The comparator used to compare values.\n * @returns {*} Returns the extremum value.\n */\n function baseExtremum(array, iteratee, comparator) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n var value = array[index],\n current = iteratee(value);\n\n if (current != null && (computed === undefined\n ? (current === current && !isSymbol(current))\n : comparator(current, computed)\n )) {\n var computed = current,\n result = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.fill` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n */\n function baseFill(array, value, start, end) {\n var length = array.length;\n\n start = toInteger(start);\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = (end === undefined || end > length) ? length : toInteger(end);\n if (end < 0) {\n end += length;\n }\n end = start > end ? 0 : toLength(end);\n while (start < end) {\n array[start++] = value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.filter` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function baseFilter(collection, predicate) {\n var result = [];\n baseEach(collection, function(value, index, collection) {\n if (predicate(value, index, collection)) {\n result.push(value);\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\n function baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseFor = createBaseFor();\n\n /**\n * This function is like `baseFor` except that it iterates over properties\n * in the opposite order.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseForRight = createBaseFor(true);\n\n /**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwnRight(object, iteratee) {\n return object && baseForRight(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.functions` which creates an array of\n * `object` function property names filtered from `props`.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Array} props The property names to filter.\n * @returns {Array} Returns the function names.\n */\n function baseFunctions(object, props) {\n return arrayFilter(props, function(key) {\n return isFunction(object[key]);\n });\n }\n\n /**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\n function baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n }\n\n /**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n }\n\n /**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n function baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n }\n\n /**\n * The base implementation of `_.gt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n */\n function baseGt(value, other) {\n return value > other;\n }\n\n /**\n * The base implementation of `_.has` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHas(object, key) {\n return object != null && hasOwnProperty.call(object, key);\n }\n\n /**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHasIn(object, key) {\n return object != null && key in Object(object);\n }\n\n /**\n * The base implementation of `_.inRange` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to check.\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n */\n function baseInRange(number, start, end) {\n return number >= nativeMin(start, end) && number < nativeMax(start, end);\n }\n\n /**\n * The base implementation of methods like `_.intersection`, without support\n * for iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of shared values.\n */\n function baseIntersection(arrays, iteratee, comparator) {\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\n length = arrays[0].length,\n othLength = arrays.length,\n othIndex = othLength,\n caches = Array(othLength),\n maxLength = Infinity,\n result = [];\n\n while (othIndex--) {\n var array = arrays[othIndex];\n if (othIndex && iteratee) {\n array = arrayMap(array, baseUnary(iteratee));\n }\n maxLength = nativeMin(array.length, maxLength);\n caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n ? new SetCache(othIndex && array)\n : undefined;\n }\n array = arrays[0];\n\n var index = -1,\n seen = caches[0];\n\n outer:\n while (++index < length && result.length < maxLength) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (!(seen\n ? cacheHas(seen, computed)\n : includes(result, computed, comparator)\n )) {\n othIndex = othLength;\n while (--othIndex) {\n var cache = caches[othIndex];\n if (!(cache\n ? cacheHas(cache, computed)\n : includes(arrays[othIndex], computed, comparator))\n ) {\n continue outer;\n }\n }\n if (seen) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.invert` and `_.invertBy` which inverts\n * `object` with values transformed by `iteratee` and set by `setter`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform values.\n * @param {Object} accumulator The initial inverted object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseInverter(object, setter, iteratee, accumulator) {\n baseForOwn(object, function(value, key, object) {\n setter(accumulator, iteratee(value), key, object);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.invoke` without support for individual\n * method arguments.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {Array} args The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n */\n function baseInvoke(object, path, args) {\n path = castPath(path, object);\n object = parent(object, path);\n var func = object == null ? object : object[toKey(last(path))];\n return func == null ? undefined : apply(func, object, args);\n }\n\n /**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\n function baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n }\n\n /**\n * The base implementation of `_.isArrayBuffer` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n */\n function baseIsArrayBuffer(value) {\n return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;\n }\n\n /**\n * The base implementation of `_.isDate` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n */\n function baseIsDate(value) {\n return isObjectLike(value) && baseGetTag(value) == dateTag;\n }\n\n /**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\n function baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n }\n\n /**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n }\n\n /**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\n function baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n }\n\n /**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\n function baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\n function baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n }\n\n /**\n * The base implementation of `_.isRegExp` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n */\n function baseIsRegExp(value) {\n return isObjectLike(value) && baseGetTag(value) == regexpTag;\n }\n\n /**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\n function baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n }\n\n /**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\n function baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n }\n\n /**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\n function baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n }\n\n /**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.lt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n */\n function baseLt(value, other) {\n return value < other;\n }\n\n /**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n }\n\n /**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n }\n\n /**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n }\n\n /**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n }\n\n /**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n }\n\n /**\n * The base implementation of `_.nth` which doesn't coerce arguments.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {number} n The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n */\n function baseNth(array, n) {\n var length = array.length;\n if (!length) {\n return;\n }\n n += n < 0 ? length : 0;\n return isIndex(n, length) ? array[n] : undefined;\n }\n\n /**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\n function baseOrderBy(collection, iteratees, orders) {\n if (iteratees.length) {\n iteratees = arrayMap(iteratees, function(iteratee) {\n if (isArray(iteratee)) {\n return function(value) {\n return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n }\n }\n return iteratee;\n });\n } else {\n iteratees = [identity];\n }\n\n var index = -1;\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n\n var result = baseMap(collection, function(value, key, collection) {\n var criteria = arrayMap(iteratees, function(iteratee) {\n return iteratee(value);\n });\n return { 'criteria': criteria, 'index': ++index, 'value': value };\n });\n\n return baseSortBy(result, function(object, other) {\n return compareMultiple(object, other, orders);\n });\n }\n\n /**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\n function basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n }\n\n /**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\n function basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n }\n\n /**\n * The base implementation of `_.pullAllBy` without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n */\n function basePullAll(array, values, iteratee, comparator) {\n var indexOf = comparator ? baseIndexOfWith : baseIndexOf,\n index = -1,\n length = values.length,\n seen = array;\n\n if (array === values) {\n values = copyArray(values);\n }\n if (iteratee) {\n seen = arrayMap(array, baseUnary(iteratee));\n }\n while (++index < length) {\n var fromIndex = 0,\n value = values[index],\n computed = iteratee ? iteratee(value) : value;\n\n while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {\n if (seen !== array) {\n splice.call(seen, fromIndex, 1);\n }\n splice.call(array, fromIndex, 1);\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.pullAt` without support for individual\n * indexes or capturing the removed elements.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {number[]} indexes The indexes of elements to remove.\n * @returns {Array} Returns `array`.\n */\n function basePullAt(array, indexes) {\n var length = array ? indexes.length : 0,\n lastIndex = length - 1;\n\n while (length--) {\n var index = indexes[length];\n if (length == lastIndex || index !== previous) {\n var previous = index;\n if (isIndex(index)) {\n splice.call(array, index, 1);\n } else {\n baseUnset(array, index);\n }\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.random` without support for returning\n * floating-point numbers.\n *\n * @private\n * @param {number} lower The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the random number.\n */\n function baseRandom(lower, upper) {\n return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\n }\n\n /**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\n function baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n }\n\n /**\n * The base implementation of `_.repeat` which doesn't coerce arguments.\n *\n * @private\n * @param {string} string The string to repeat.\n * @param {number} n The number of times to repeat the string.\n * @returns {string} Returns the repeated string.\n */\n function baseRepeat(string, n) {\n var result = '';\n if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\n return result;\n }\n // Leverage the exponentiation by squaring algorithm for a faster repeat.\n // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n do {\n if (n % 2) {\n result += string;\n }\n n = nativeFloor(n / 2);\n if (n) {\n string += string;\n }\n } while (n);\n\n return result;\n }\n\n /**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\n function baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n }\n\n /**\n * The base implementation of `_.sample`.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n */\n function baseSample(collection) {\n return arraySample(values(collection));\n }\n\n /**\n * The base implementation of `_.sampleSize` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function baseSampleSize(collection, n) {\n var array = values(collection);\n return shuffleSelf(array, baseClamp(n, 0, array.length));\n }\n\n /**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n }\n\n /**\n * The base implementation of `setData` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var baseSetData = !metaMap ? identity : function(func, data) {\n metaMap.set(func, data);\n return func;\n };\n\n /**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n };\n\n /**\n * The base implementation of `_.shuffle`.\n *\n * @private\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function baseShuffle(collection) {\n return shuffleSelf(values(collection));\n }\n\n /**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n }\n\n /**\n * The base implementation of `_.some` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function baseSome(collection, predicate) {\n var result;\n\n baseEach(collection, function(value, index, collection) {\n result = predicate(value, index, collection);\n return !result;\n });\n return !!result;\n }\n\n /**\n * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which\n * performs a binary search of `array` to determine the index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndex(array, value, retHighest) {\n var low = 0,\n high = array == null ? low : array.length;\n\n if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\n while (low < high) {\n var mid = (low + high) >>> 1,\n computed = array[mid];\n\n if (computed !== null && !isSymbol(computed) &&\n (retHighest ? (computed <= value) : (computed < value))) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return high;\n }\n return baseSortedIndexBy(array, value, identity, retHighest);\n }\n\n /**\n * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`\n * which invokes `iteratee` for `value` and each element of `array` to compute\n * their sort ranking. The iteratee is invoked with one argument; (value).\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} iteratee The iteratee invoked per element.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndexBy(array, value, iteratee, retHighest) {\n var low = 0,\n high = array == null ? 0 : array.length;\n if (high === 0) {\n return 0;\n }\n\n value = iteratee(value);\n var valIsNaN = value !== value,\n valIsNull = value === null,\n valIsSymbol = isSymbol(value),\n valIsUndefined = value === undefined;\n\n while (low < high) {\n var mid = nativeFloor((low + high) / 2),\n computed = iteratee(array[mid]),\n othIsDefined = computed !== undefined,\n othIsNull = computed === null,\n othIsReflexive = computed === computed,\n othIsSymbol = isSymbol(computed);\n\n if (valIsNaN) {\n var setLow = retHighest || othIsReflexive;\n } else if (valIsUndefined) {\n setLow = othIsReflexive && (retHighest || othIsDefined);\n } else if (valIsNull) {\n setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);\n } else if (valIsSymbol) {\n setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);\n } else if (othIsNull || othIsSymbol) {\n setLow = false;\n } else {\n setLow = retHighest ? (computed <= value) : (computed < value);\n }\n if (setLow) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return nativeMin(high, MAX_ARRAY_INDEX);\n }\n\n /**\n * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseSortedUniq(array, iteratee) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n if (!index || !eq(computed, seen)) {\n var seen = computed;\n result[resIndex++] = value === 0 ? 0 : value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toNumber` which doesn't ensure correct\n * conversions of binary, hexadecimal, or octal string values.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n */\n function baseToNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n return +value;\n }\n\n /**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\n function baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.unset`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The property path to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n */\n function baseUnset(object, path) {\n path = castPath(path, object);\n object = parent(object, path);\n return object == null || delete object[toKey(last(path))];\n }\n\n /**\n * The base implementation of `_.update`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to update.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseUpdate(object, path, updater, customizer) {\n return baseSet(object, path, updater(baseGet(object, path)), customizer);\n }\n\n /**\n * The base implementation of methods like `_.dropWhile` and `_.takeWhile`\n * without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {Function} predicate The function invoked per iteration.\n * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseWhile(array, predicate, isDrop, fromRight) {\n var length = array.length,\n index = fromRight ? length : -1;\n\n while ((fromRight ? index-- : ++index < length) &&\n predicate(array[index], index, array)) {}\n\n return isDrop\n ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))\n : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));\n }\n\n /**\n * The base implementation of `wrapperValue` which returns the result of\n * performing a sequence of actions on the unwrapped `value`, where each\n * successive action is supplied the return value of the previous.\n *\n * @private\n * @param {*} value The unwrapped value.\n * @param {Array} actions Actions to perform to resolve the unwrapped value.\n * @returns {*} Returns the resolved value.\n */\n function baseWrapperValue(value, actions) {\n var result = value;\n if (result instanceof LazyWrapper) {\n result = result.value();\n }\n return arrayReduce(actions, function(result, action) {\n return action.func.apply(action.thisArg, arrayPush([result], action.args));\n }, result);\n }\n\n /**\n * The base implementation of methods like `_.xor`, without support for\n * iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of values.\n */\n function baseXor(arrays, iteratee, comparator) {\n var length = arrays.length;\n if (length < 2) {\n return length ? baseUniq(arrays[0]) : [];\n }\n var index = -1,\n result = Array(length);\n\n while (++index < length) {\n var array = arrays[index],\n othIndex = -1;\n\n while (++othIndex < length) {\n if (othIndex != index) {\n result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);\n }\n }\n }\n return baseUniq(baseFlatten(result, 1), iteratee, comparator);\n }\n\n /**\n * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n *\n * @private\n * @param {Array} props The property identifiers.\n * @param {Array} values The property values.\n * @param {Function} assignFunc The function to assign values.\n * @returns {Object} Returns the new object.\n */\n function baseZipObject(props, values, assignFunc) {\n var index = -1,\n length = props.length,\n valsLength = values.length,\n result = {};\n\n while (++index < length) {\n var value = index < valsLength ? values[index] : undefined;\n assignFunc(result, props[index], value);\n }\n return result;\n }\n\n /**\n * Casts `value` to an empty array if it's not an array like object.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array|Object} Returns the cast array-like object.\n */\n function castArrayLikeObject(value) {\n return isArrayLikeObject(value) ? value : [];\n }\n\n /**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\n function castFunction(value) {\n return typeof value == 'function' ? value : identity;\n }\n\n /**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\n function castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n }\n\n /**\n * A `baseRest` alias which can be replaced with `identity` by module\n * replacement plugins.\n *\n * @private\n * @type {Function}\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n var castRest = baseRest;\n\n /**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\n function castSlice(array, start, end) {\n var length = array.length;\n end = end === undefined ? length : end;\n return (!start && end >= length) ? array : baseSlice(array, start, end);\n }\n\n /**\n * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).\n *\n * @private\n * @param {number|Object} id The timer id or timeout object of the timer to clear.\n */\n var clearTimeout = ctxClearTimeout || function(id) {\n return root.clearTimeout(id);\n };\n\n /**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\n function cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n }\n\n /**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\n function cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n }\n\n /**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\n function cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n }\n\n /**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\n function cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n }\n\n /**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\n function cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n }\n\n /**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\n function cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n }\n\n /**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\n function compareAscending(value, other) {\n if (value !== other) {\n var valIsDefined = value !== undefined,\n valIsNull = value === null,\n valIsReflexive = value === value,\n valIsSymbol = isSymbol(value);\n\n var othIsDefined = other !== undefined,\n othIsNull = other === null,\n othIsReflexive = other === other,\n othIsSymbol = isSymbol(other);\n\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n (valIsNull && othIsDefined && othIsReflexive) ||\n (!valIsDefined && othIsReflexive) ||\n !valIsReflexive) {\n return 1;\n }\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n (othIsNull && valIsDefined && valIsReflexive) ||\n (!othIsDefined && valIsReflexive) ||\n !othIsReflexive) {\n return -1;\n }\n }\n return 0;\n }\n\n /**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\n function compareMultiple(object, other, orders) {\n var index = -1,\n objCriteria = object.criteria,\n othCriteria = other.criteria,\n length = objCriteria.length,\n ordersLength = orders.length;\n\n while (++index < length) {\n var result = compareAscending(objCriteria[index], othCriteria[index]);\n if (result) {\n if (index >= ordersLength) {\n return result;\n }\n var order = orders[index];\n return result * (order == 'desc' ? -1 : 1);\n }\n }\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n // that causes it, under certain circumstances, to provide the same value for\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n // for more details.\n //\n // This also ensures a stable sort in V8 and other engines.\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n return object.index - other.index;\n }\n\n /**\n * Creates an array that is the composition of partially applied arguments,\n * placeholders, and provided arguments into a single array of arguments.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to prepend to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgs(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersLength = holders.length,\n leftIndex = -1,\n leftLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(leftLength + rangeLength),\n isUncurried = !isCurried;\n\n while (++leftIndex < leftLength) {\n result[leftIndex] = partials[leftIndex];\n }\n while (++argsIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[holders[argsIndex]] = args[argsIndex];\n }\n }\n while (rangeLength--) {\n result[leftIndex++] = args[argsIndex++];\n }\n return result;\n }\n\n /**\n * This function is like `composeArgs` except that the arguments composition\n * is tailored for `_.partialRight`.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to append to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgsRight(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersIndex = -1,\n holdersLength = holders.length,\n rightIndex = -1,\n rightLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(rangeLength + rightLength),\n isUncurried = !isCurried;\n\n while (++argsIndex < rangeLength) {\n result[argsIndex] = args[argsIndex];\n }\n var offset = argsIndex;\n while (++rightIndex < rightLength) {\n result[offset + rightIndex] = partials[rightIndex];\n }\n while (++holdersIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[offset + holders[holdersIndex]] = args[argsIndex++];\n }\n }\n return result;\n }\n\n /**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\n function copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n }\n\n /**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\n function copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n }\n\n /**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n }\n\n /**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n }\n\n /**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\n function createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, getIteratee(iteratee, 2), accumulator);\n };\n }\n\n /**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\n function createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n }\n\n /**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n }\n\n /**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the optional `this`\n * binding of `thisArg`.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createBind(func, bitmask, thisArg) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return fn.apply(isBind ? thisArg : this, arguments);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new case function.\n */\n function createCaseFirst(methodName) {\n return function(string) {\n string = toString(string);\n\n var strSymbols = hasUnicode(string)\n ? stringToArray(string)\n : undefined;\n\n var chr = strSymbols\n ? strSymbols[0]\n : string.charAt(0);\n\n var trailing = strSymbols\n ? castSlice(strSymbols, 1).join('')\n : string.slice(1);\n\n return chr[methodName]() + trailing;\n };\n }\n\n /**\n * Creates a function like `_.camelCase`.\n *\n * @private\n * @param {Function} callback The function to combine each word.\n * @returns {Function} Returns the new compounder function.\n */\n function createCompounder(callback) {\n return function(string) {\n return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n };\n }\n\n /**\n * Creates a function that produces an instance of `Ctor` regardless of\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n *\n * @private\n * @param {Function} Ctor The constructor to wrap.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCtor(Ctor) {\n return function() {\n // Use a `switch` statement to work with class constructors. See\n // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n // for more details.\n var args = arguments;\n switch (args.length) {\n case 0: return new Ctor;\n case 1: return new Ctor(args[0]);\n case 2: return new Ctor(args[0], args[1]);\n case 3: return new Ctor(args[0], args[1], args[2]);\n case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n }\n var thisBinding = baseCreate(Ctor.prototype),\n result = Ctor.apply(thisBinding, args);\n\n // Mimic the constructor's `return` behavior.\n // See https://es5.github.io/#x13.2.2 for more details.\n return isObject(result) ? result : thisBinding;\n };\n }\n\n /**\n * Creates a function that wraps `func` to enable currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {number} arity The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCurry(func, bitmask, arity) {\n var Ctor = createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length,\n placeholder = getHolder(wrapper);\n\n while (index--) {\n args[index] = arguments[index];\n }\n var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n ? []\n : replaceHolders(args, placeholder);\n\n length -= holders.length;\n if (length < arity) {\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, undefined,\n args, holders, undefined, undefined, arity - length);\n }\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return apply(fn, this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\n function createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = getIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n }\n\n /**\n * Creates a `_.flow` or `_.flowRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new flow function.\n */\n function createFlow(fromRight) {\n return flatRest(function(funcs) {\n var length = funcs.length,\n index = length,\n prereq = LodashWrapper.prototype.thru;\n\n if (fromRight) {\n funcs.reverse();\n }\n while (index--) {\n var func = funcs[index];\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\n var wrapper = new LodashWrapper([], true);\n }\n }\n index = wrapper ? index : length;\n while (++index < length) {\n func = funcs[index];\n\n var funcName = getFuncName(func),\n data = funcName == 'wrapper' ? getData(func) : undefined;\n\n if (data && isLaziable(data[0]) &&\n data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\n !data[4].length && data[9] == 1\n ) {\n wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\n } else {\n wrapper = (func.length == 1 && isLaziable(func))\n ? wrapper[funcName]()\n : wrapper.thru(func);\n }\n }\n return function() {\n var args = arguments,\n value = args[0];\n\n if (wrapper && args.length == 1 && isArray(value)) {\n return wrapper.plant(value).value();\n }\n var index = 0,\n result = length ? funcs[index].apply(this, args) : value;\n\n while (++index < length) {\n result = funcs[index].call(this, result);\n }\n return result;\n };\n });\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with optional `this`\n * binding of `thisArg`, partial application, and currying.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [partialsRight] The arguments to append to those provided\n * to the new function.\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n var isAry = bitmask & WRAP_ARY_FLAG,\n isBind = bitmask & WRAP_BIND_FLAG,\n isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n isFlip = bitmask & WRAP_FLIP_FLAG,\n Ctor = isBindKey ? undefined : createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length;\n\n while (index--) {\n args[index] = arguments[index];\n }\n if (isCurried) {\n var placeholder = getHolder(wrapper),\n holdersCount = countHolders(args, placeholder);\n }\n if (partials) {\n args = composeArgs(args, partials, holders, isCurried);\n }\n if (partialsRight) {\n args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n }\n length -= holdersCount;\n if (isCurried && length < arity) {\n var newHolders = replaceHolders(args, placeholder);\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n args, newHolders, argPos, ary, arity - length\n );\n }\n var thisBinding = isBind ? thisArg : this,\n fn = isBindKey ? thisBinding[func] : func;\n\n length = args.length;\n if (argPos) {\n args = reorder(args, argPos);\n } else if (isFlip && length > 1) {\n args.reverse();\n }\n if (isAry && ary < length) {\n args.length = ary;\n }\n if (this && this !== root && this instanceof wrapper) {\n fn = Ctor || createCtor(fn);\n }\n return fn.apply(thisBinding, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.invertBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} toIteratee The function to resolve iteratees.\n * @returns {Function} Returns the new inverter function.\n */\n function createInverter(setter, toIteratee) {\n return function(object, iteratee) {\n return baseInverter(object, setter, toIteratee(iteratee), {});\n };\n }\n\n /**\n * Creates a function that performs a mathematical operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @param {number} [defaultValue] The value used for `undefined` arguments.\n * @returns {Function} Returns the new mathematical operation function.\n */\n function createMathOperation(operator, defaultValue) {\n return function(value, other) {\n var result;\n if (value === undefined && other === undefined) {\n return defaultValue;\n }\n if (value !== undefined) {\n result = value;\n }\n if (other !== undefined) {\n if (result === undefined) {\n return other;\n }\n if (typeof value == 'string' || typeof other == 'string') {\n value = baseToString(value);\n other = baseToString(other);\n } else {\n value = baseToNumber(value);\n other = baseToNumber(other);\n }\n result = operator(value, other);\n }\n return result;\n };\n }\n\n /**\n * Creates a function like `_.over`.\n *\n * @private\n * @param {Function} arrayFunc The function to iterate over iteratees.\n * @returns {Function} Returns the new over function.\n */\n function createOver(arrayFunc) {\n return flatRest(function(iteratees) {\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n return baseRest(function(args) {\n var thisArg = this;\n return arrayFunc(iteratees, function(iteratee) {\n return apply(iteratee, thisArg, args);\n });\n });\n });\n }\n\n /**\n * Creates the padding for `string` based on `length`. The `chars` string\n * is truncated if the number of characters exceeds `length`.\n *\n * @private\n * @param {number} length The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padding for `string`.\n */\n function createPadding(length, chars) {\n chars = chars === undefined ? ' ' : baseToString(chars);\n\n var charsLength = chars.length;\n if (charsLength < 2) {\n return charsLength ? baseRepeat(chars, length) : chars;\n }\n var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));\n return hasUnicode(chars)\n ? castSlice(stringToArray(result), 0, length).join('')\n : result.slice(0, length);\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the `this` binding\n * of `thisArg` and `partials` prepended to the arguments it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} partials The arguments to prepend to those provided to\n * the new function.\n * @returns {Function} Returns the new wrapped function.\n */\n function createPartial(func, bitmask, thisArg, partials) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var argsIndex = -1,\n argsLength = arguments.length,\n leftIndex = -1,\n leftLength = partials.length,\n args = Array(leftLength + argsLength),\n fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n while (++leftIndex < leftLength) {\n args[leftIndex] = partials[leftIndex];\n }\n while (argsLength--) {\n args[leftIndex++] = arguments[++argsIndex];\n }\n return apply(fn, isBind ? thisArg : this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\n function createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n return baseRange(start, end, step, fromRight);\n };\n }\n\n /**\n * Creates a function that performs a relational operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @returns {Function} Returns the new relational operation function.\n */\n function createRelationalOperation(operator) {\n return function(value, other) {\n if (!(typeof value == 'string' && typeof other == 'string')) {\n value = toNumber(value);\n other = toNumber(other);\n }\n return operator(value, other);\n };\n }\n\n /**\n * Creates a function that wraps `func` to continue currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {Function} wrapFunc The function to create the `func` wrapper.\n * @param {*} placeholder The placeholder value.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n var isCurry = bitmask & WRAP_CURRY_FLAG,\n newHolders = isCurry ? holders : undefined,\n newHoldersRight = isCurry ? undefined : holders,\n newPartials = isCurry ? partials : undefined,\n newPartialsRight = isCurry ? undefined : partials;\n\n bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n }\n var newData = [\n func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n newHoldersRight, argPos, ary, arity\n ];\n\n var result = wrapFunc.apply(undefined, newData);\n if (isLaziable(func)) {\n setData(result, newData);\n }\n result.placeholder = placeholder;\n return setWrapToString(result, func, bitmask);\n }\n\n /**\n * Creates a function like `_.round`.\n *\n * @private\n * @param {string} methodName The name of the `Math` method to use when rounding.\n * @returns {Function} Returns the new round function.\n */\n function createRound(methodName) {\n var func = Math[methodName];\n return function(number, precision) {\n number = toNumber(number);\n precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);\n if (precision && nativeIsFinite(number)) {\n // Shift with exponential notation to avoid floating-point issues.\n // See [MDN](https://mdn.io/round#Examples) for more details.\n var pair = (toString(number) + 'e').split('e'),\n value = func(pair[0] + 'e' + (+pair[1] + precision));\n\n pair = (toString(value) + 'e').split('e');\n return +(pair[0] + 'e' + (+pair[1] - precision));\n }\n return func(number);\n };\n }\n\n /**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\n var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n };\n\n /**\n * Creates a `_.toPairs` or `_.toPairsIn` function.\n *\n * @private\n * @param {Function} keysFunc The function to get the keys of a given object.\n * @returns {Function} Returns the new pairs function.\n */\n function createToPairs(keysFunc) {\n return function(object) {\n var tag = getTag(object);\n if (tag == mapTag) {\n return mapToArray(object);\n }\n if (tag == setTag) {\n return setToPairs(object);\n }\n return baseToPairs(object, keysFunc(object));\n };\n }\n\n /**\n * Creates a function that either curries or invokes `func` with optional\n * `this` binding and partially applied arguments.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags.\n * 1 - `_.bind`\n * 2 - `_.bindKey`\n * 4 - `_.curry` or `_.curryRight` of a bound function\n * 8 - `_.curry`\n * 16 - `_.curryRight`\n * 32 - `_.partial`\n * 64 - `_.partialRight`\n * 128 - `_.rearg`\n * 256 - `_.ary`\n * 512 - `_.flip`\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to be partially applied.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n if (!isBindKey && typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var length = partials ? partials.length : 0;\n if (!length) {\n bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n partials = holders = undefined;\n }\n ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n arity = arity === undefined ? arity : toInteger(arity);\n length -= holders ? holders.length : 0;\n\n if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n var partialsRight = partials,\n holdersRight = holders;\n\n partials = holders = undefined;\n }\n var data = isBindKey ? undefined : getData(func);\n\n var newData = [\n func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n argPos, ary, arity\n ];\n\n if (data) {\n mergeData(newData, data);\n }\n func = newData[0];\n bitmask = newData[1];\n thisArg = newData[2];\n partials = newData[3];\n holders = newData[4];\n arity = newData[9] = newData[9] === undefined\n ? (isBindKey ? 0 : func.length)\n : nativeMax(newData[9] - length, 0);\n\n if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n }\n if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n var result = createBind(func, bitmask, thisArg);\n } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n result = createCurry(func, bitmask, arity);\n } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n result = createPartial(func, bitmask, thisArg, partials);\n } else {\n result = createHybrid.apply(undefined, newData);\n }\n var setter = data ? baseSetData : setData;\n return setWrapToString(setter(result, newData), func, bitmask);\n }\n\n /**\n * Used by `_.defaults` to customize its `_.assignIn` use to assign properties\n * of source objects to the destination object for all destination properties\n * that resolve to `undefined`.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to assign.\n * @param {Object} object The parent object of `objValue`.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsAssignIn(objValue, srcValue, key, object) {\n if (objValue === undefined ||\n (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n return srcValue;\n }\n return objValue;\n }\n\n /**\n * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\n * objects into destination objects that are passed thru.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to merge.\n * @param {Object} object The parent object of `objValue`.\n * @param {Object} source The parent object of `srcValue`.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\n if (isObject(objValue) && isObject(srcValue)) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, objValue);\n baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\n stack['delete'](srcValue);\n }\n return objValue;\n }\n\n /**\n * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\n * objects.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {string} key The key of the property to inspect.\n * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\n */\n function customOmitClone(value) {\n return isPlainObject(value) ? undefined : value;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\n function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n function flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n }\n\n /**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n }\n\n /**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n }\n\n /**\n * Gets metadata for `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {*} Returns the metadata for `func`.\n */\n var getData = !metaMap ? noop : function(func) {\n return metaMap.get(func);\n };\n\n /**\n * Gets the name of `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {string} Returns the function name.\n */\n function getFuncName(func) {\n var result = (func.name + ''),\n array = realNames[result],\n length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n while (length--) {\n var data = array[length],\n otherFunc = data.func;\n if (otherFunc == null || otherFunc == func) {\n return data.name;\n }\n }\n return result;\n }\n\n /**\n * Gets the argument placeholder value for `func`.\n *\n * @private\n * @param {Function} func The function to inspect.\n * @returns {*} Returns the placeholder value.\n */\n function getHolder(func) {\n var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;\n return object.placeholder;\n }\n\n /**\n * Gets the appropriate \"iteratee\" function. If `_.iteratee` is customized,\n * this function returns the custom method, otherwise it returns `baseIteratee`.\n * If arguments are provided, the chosen function is invoked with them and\n * its result is returned.\n *\n * @private\n * @param {*} [value] The value to convert to an iteratee.\n * @param {number} [arity] The arity of the created iteratee.\n * @returns {Function} Returns the chosen function or its result.\n */\n function getIteratee() {\n var result = lodash.iteratee || iteratee;\n result = result === iteratee ? baseIteratee : result;\n return arguments.length ? result(arguments[0], arguments[1]) : result;\n }\n\n /**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\n function getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n }\n\n /**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\n function getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n }\n\n /**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\n function getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n }\n\n /**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\n function getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n }\n\n /**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n };\n\n /**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n };\n\n /**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n var getTag = baseGetTag;\n\n // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\n if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n }\n\n /**\n * Gets the view, applying any `transforms` to the `start` and `end` positions.\n *\n * @private\n * @param {number} start The start of the view.\n * @param {number} end The end of the view.\n * @param {Array} transforms The transformations to apply to the view.\n * @returns {Object} Returns an object containing the `start` and `end`\n * positions of the view.\n */\n function getView(start, end, transforms) {\n var index = -1,\n length = transforms.length;\n\n while (++index < length) {\n var data = transforms[index],\n size = data.size;\n\n switch (data.type) {\n case 'drop': start += size; break;\n case 'dropRight': end -= size; break;\n case 'take': end = nativeMin(end, start + size); break;\n case 'takeRight': start = nativeMax(start, end - size); break;\n }\n }\n return { 'start': start, 'end': end };\n }\n\n /**\n * Extracts wrapper details from the `source` body comment.\n *\n * @private\n * @param {string} source The source to inspect.\n * @returns {Array} Returns the wrapper details.\n */\n function getWrapDetails(source) {\n var match = source.match(reWrapDetails);\n return match ? match[1].split(reSplitDetails) : [];\n }\n\n /**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\n function hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n }\n\n /**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\n function initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n }\n\n /**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n }\n\n /**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n }\n\n /**\n * Inserts wrapper `details` in a comment at the top of the `source` body.\n *\n * @private\n * @param {string} source The source to modify.\n * @returns {Array} details The details to insert.\n * @returns {string} Returns the modified source.\n */\n function insertWrapDetails(source, details) {\n var length = details.length;\n if (!length) {\n return source;\n }\n var lastIndex = length - 1;\n details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n details = details.join(length > 2 ? ', ' : ' ');\n return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n }\n\n /**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\n function isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n }\n\n /**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\n function isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n }\n\n /**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\n function isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n }\n\n /**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\n function isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n }\n\n /**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\n function isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n }\n\n /**\n * Checks if `func` has a lazy counterpart.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n * else `false`.\n */\n function isLaziable(func) {\n var funcName = getFuncName(func),\n other = lodash[funcName];\n\n if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n return false;\n }\n if (func === other) {\n return true;\n }\n var data = getData(other);\n return !!data && func === data[0];\n }\n\n /**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\n function isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n }\n\n /**\n * Checks if `func` is capable of being masked.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `func` is maskable, else `false`.\n */\n var isMaskable = coreJsData ? isFunction : stubFalse;\n\n /**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\n function isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n }\n\n /**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\n function isStrictComparable(value) {\n return value === value && !isObject(value);\n }\n\n /**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n }\n\n /**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\n function memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n }\n\n /**\n * Merges the function metadata of `source` into `data`.\n *\n * Merging metadata reduces the number of wrappers used to invoke a function.\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n * may be applied regardless of execution order. Methods like `_.ary` and\n * `_.rearg` modify function arguments, making the order in which they are\n * executed important, preventing the merging of metadata. However, we make\n * an exception for a safe combined case where curried functions have `_.ary`\n * and or `_.rearg` applied.\n *\n * @private\n * @param {Array} data The destination metadata.\n * @param {Array} source The source metadata.\n * @returns {Array} Returns `data`.\n */\n function mergeData(data, source) {\n var bitmask = data[1],\n srcBitmask = source[1],\n newBitmask = bitmask | srcBitmask,\n isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n var isCombo =\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n // Exit early if metadata can't be merged.\n if (!(isCommon || isCombo)) {\n return data;\n }\n // Use source `thisArg` if available.\n if (srcBitmask & WRAP_BIND_FLAG) {\n data[2] = source[2];\n // Set when currying a bound function.\n newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n }\n // Compose partial arguments.\n var value = source[3];\n if (value) {\n var partials = data[3];\n data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n }\n // Compose partial right arguments.\n value = source[5];\n if (value) {\n partials = data[5];\n data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n }\n // Use source `argPos` if available.\n value = source[7];\n if (value) {\n data[7] = value;\n }\n // Use source `ary` if it's smaller.\n if (srcBitmask & WRAP_ARY_FLAG) {\n data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n }\n // Use source `arity` if one is not provided.\n if (data[9] == null) {\n data[9] = source[9];\n }\n // Use source `func` and merge bitmasks.\n data[0] = source[0];\n data[1] = newBitmask;\n\n return data;\n }\n\n /**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\n function objectToString(value) {\n return nativeObjectToString.call(value);\n }\n\n /**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\n function overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n }\n\n /**\n * Gets the parent value at `path` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} path The path to get the parent value of.\n * @returns {*} Returns the parent value.\n */\n function parent(object, path) {\n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n }\n\n /**\n * Reorder `array` according to the specified indexes where the element at\n * the first index is assigned as the first element, the element at\n * the second index is assigned as the second element, and so on.\n *\n * @private\n * @param {Array} array The array to reorder.\n * @param {Array} indexes The arranged array indexes.\n * @returns {Array} Returns `array`.\n */\n function reorder(array, indexes) {\n var arrLength = array.length,\n length = nativeMin(indexes.length, arrLength),\n oldArray = copyArray(array);\n\n while (length--) {\n var index = indexes[length];\n array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n }\n return array;\n }\n\n /**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n }\n\n /**\n * Sets metadata for `func`.\n *\n * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n * period of time, it will trip its breaker and transition to an identity\n * function to avoid garbage collection pauses in V8. See\n * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n * for more details.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var setData = shortOut(baseSetData);\n\n /**\n * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n var setTimeout = ctxSetTimeout || function(func, wait) {\n return root.setTimeout(func, wait);\n };\n\n /**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var setToString = shortOut(baseSetToString);\n\n /**\n * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n * with wrapper details in a comment at the top of the source body.\n *\n * @private\n * @param {Function} wrapper The function to modify.\n * @param {Function} reference The reference function.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Function} Returns `wrapper`.\n */\n function setWrapToString(wrapper, reference, bitmask) {\n var source = (reference + '');\n return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n }\n\n /**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\n function shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n }\n\n /**\n * A specialized version of `_.shuffle` which mutates and sets the size of `array`.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @param {number} [size=array.length] The size of `array`.\n * @returns {Array} Returns `array`.\n */\n function shuffleSelf(array, size) {\n var index = -1,\n length = array.length,\n lastIndex = length - 1;\n\n size = size === undefined ? length : size;\n while (++index < size) {\n var rand = baseRandom(index, lastIndex),\n value = array[rand];\n\n array[rand] = array[index];\n array[index] = value;\n }\n array.length = size;\n return array;\n }\n\n /**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\n var stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n });\n\n /**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\n function toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\n function toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n }\n\n /**\n * Updates wrapper `details` based on `bitmask` flags.\n *\n * @private\n * @returns {Array} details The details to modify.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Array} Returns `details`.\n */\n function updateWrapDetails(details, bitmask) {\n arrayEach(wrapFlags, function(pair) {\n var value = '_.' + pair[0];\n if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\n details.push(value);\n }\n });\n return details.sort();\n }\n\n /**\n * Creates a clone of `wrapper`.\n *\n * @private\n * @param {Object} wrapper The wrapper to clone.\n * @returns {Object} Returns the cloned wrapper.\n */\n function wrapperClone(wrapper) {\n if (wrapper instanceof LazyWrapper) {\n return wrapper.clone();\n }\n var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n result.__actions__ = copyArray(wrapper.__actions__);\n result.__index__ = wrapper.__index__;\n result.__values__ = wrapper.__values__;\n return result;\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of elements split into groups the length of `size`.\n * If `array` can't be split evenly, the final chunk will be the remaining\n * elements.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to process.\n * @param {number} [size=1] The length of each chunk\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the new array of chunks.\n * @example\n *\n * _.chunk(['a', 'b', 'c', 'd'], 2);\n * // => [['a', 'b'], ['c', 'd']]\n *\n * _.chunk(['a', 'b', 'c', 'd'], 3);\n * // => [['a', 'b', 'c'], ['d']]\n */\n function chunk(array, size, guard) {\n if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\n size = 1;\n } else {\n size = nativeMax(toInteger(size), 0);\n }\n var length = array == null ? 0 : array.length;\n if (!length || size < 1) {\n return [];\n }\n var index = 0,\n resIndex = 0,\n result = Array(nativeCeil(length / size));\n\n while (index < length) {\n result[resIndex++] = baseSlice(array, index, (index += size));\n }\n return result;\n }\n\n /**\n * Creates an array with all falsey values removed. The values `false`, `null`,\n * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to compact.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.compact([0, 1, false, 2, '', 3]);\n * // => [1, 2, 3]\n */\n function compact(array) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * Creates a new array concatenating `array` with any additional arrays\n * and/or values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to concatenate.\n * @param {...*} [values] The values to concatenate.\n * @returns {Array} Returns the new concatenated array.\n * @example\n *\n * var array = [1];\n * var other = _.concat(array, 2, [3], [[4]]);\n *\n * console.log(other);\n * // => [1, 2, 3, [4]]\n *\n * console.log(array);\n * // => [1]\n */\n function concat() {\n var length = arguments.length;\n if (!length) {\n return [];\n }\n var args = Array(length - 1),\n array = arguments[0],\n index = length;\n\n while (index--) {\n args[index - 1] = arguments[index];\n }\n return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\n }\n\n /**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\n var difference = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `iteratee` which\n * is invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var differenceBy = baseRest(function(array, values) {\n var iteratee = last(values);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `comparator`\n * which is invoked to compare elements of `array` to `values`. The order and\n * references of result values are determined by the first array. The comparator\n * is invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n *\n * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }]\n */\n var differenceWith = baseRest(function(array, values) {\n var comparator = last(values);\n if (isArrayLikeObject(comparator)) {\n comparator = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\n : [];\n });\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.drop([1, 2, 3]);\n * // => [2, 3]\n *\n * _.drop([1, 2, 3], 2);\n * // => [3]\n *\n * _.drop([1, 2, 3], 5);\n * // => []\n *\n * _.drop([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function drop(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.dropRight([1, 2, 3]);\n * // => [1, 2]\n *\n * _.dropRight([1, 2, 3], 2);\n * // => [1]\n *\n * _.dropRight([1, 2, 3], 5);\n * // => []\n *\n * _.dropRight([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function dropRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the end.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.dropRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropRightWhile(users, ['active', false]);\n * // => objects for ['barney']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropRightWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the beginning.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.dropWhile(users, function(o) { return !o.active; });\n * // => objects for ['pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropWhile(users, ['active', false]);\n * // => objects for ['pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true)\n : [];\n }\n\n /**\n * Fills elements of `array` with `value` from `start` up to, but not\n * including, `end`.\n *\n * **Note:** This method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Array\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.fill(array, 'a');\n * console.log(array);\n * // => ['a', 'a', 'a']\n *\n * _.fill(Array(3), 2);\n * // => [2, 2, 2]\n *\n * _.fill([4, 6, 8, 10], '*', 1, 3);\n * // => [4, '*', '*', 10]\n */\n function fill(array, value, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {\n start = 0;\n end = length;\n }\n return baseFill(array, value, start, end);\n }\n\n /**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\n function findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index);\n }\n\n /**\n * This method is like `_.findIndex` except that it iterates over elements\n * of `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\n * // => 2\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n * // => 0\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastIndex(users, ['active', false]);\n * // => 2\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastIndex(users, 'active');\n * // => 0\n */\n function findLastIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length - 1;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = fromIndex < 0\n ? nativeMax(length + index, 0)\n : nativeMin(index, length - 1);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index, true);\n }\n\n /**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\n function flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n }\n\n /**\n * Recursively flattens `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\n * // => [1, 2, 3, 4, 5]\n */\n function flattenDeep(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, INFINITY) : [];\n }\n\n /**\n * Recursively flatten `array` up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * var array = [1, [2, [3, [4]], 5]];\n *\n * _.flattenDepth(array, 1);\n * // => [1, 2, [3, [4]], 5]\n *\n * _.flattenDepth(array, 2);\n * // => [1, 2, 3, [4], 5]\n */\n function flattenDepth(array, depth) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(array, depth);\n }\n\n /**\n * The inverse of `_.toPairs`; this method returns an object composed\n * from key-value `pairs`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} pairs The key-value pairs.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.fromPairs([['a', 1], ['b', 2]]);\n * // => { 'a': 1, 'b': 2 }\n */\n function fromPairs(pairs) {\n var index = -1,\n length = pairs == null ? 0 : pairs.length,\n result = {};\n\n while (++index < length) {\n var pair = pairs[index];\n result[pair[0]] = pair[1];\n }\n return result;\n }\n\n /**\n * Gets the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias first\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the first element of `array`.\n * @example\n *\n * _.head([1, 2, 3]);\n * // => 1\n *\n * _.head([]);\n * // => undefined\n */\n function head(array) {\n return (array && array.length) ? array[0] : undefined;\n }\n\n /**\n * Gets the index at which the first occurrence of `value` is found in `array`\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. If `fromIndex` is negative, it's used as the\n * offset from the end of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.indexOf([1, 2, 1, 2], 2);\n * // => 1\n *\n * // Search from the `fromIndex`.\n * _.indexOf([1, 2, 1, 2], 2, 2);\n * // => 3\n */\n function indexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseIndexOf(array, value, index);\n }\n\n /**\n * Gets all but the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.initial([1, 2, 3]);\n * // => [1, 2]\n */\n function initial(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 0, -1) : [];\n }\n\n /**\n * Creates an array of unique values that are included in all given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersection([2, 1], [2, 3]);\n * // => [2]\n */\n var intersection = baseRest(function(arrays) {\n var mapped = arrayMap(arrays, castArrayLikeObject);\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped)\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `iteratee`\n * which is invoked for each element of each `arrays` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [2.1]\n *\n * // The `_.property` iteratee shorthand.\n * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }]\n */\n var intersectionBy = baseRest(function(arrays) {\n var iteratee = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n if (iteratee === last(mapped)) {\n iteratee = undefined;\n } else {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `comparator`\n * which is invoked to compare elements of `arrays`. The order and references\n * of result values are determined by the first array. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.intersectionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }]\n */\n var intersectionWith = baseRest(function(arrays) {\n var comparator = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n comparator = typeof comparator == 'function' ? comparator : undefined;\n if (comparator) {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, undefined, comparator)\n : [];\n });\n\n /**\n * Converts all elements in `array` into a string separated by `separator`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to convert.\n * @param {string} [separator=','] The element separator.\n * @returns {string} Returns the joined string.\n * @example\n *\n * _.join(['a', 'b', 'c'], '~');\n * // => 'a~b~c'\n */\n function join(array, separator) {\n return array == null ? '' : nativeJoin.call(array, separator);\n }\n\n /**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\n function last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n }\n\n /**\n * This method is like `_.indexOf` except that it iterates over elements of\n * `array` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.lastIndexOf([1, 2, 1, 2], 2);\n * // => 3\n *\n * // Search from the `fromIndex`.\n * _.lastIndexOf([1, 2, 1, 2], 2, 2);\n * // => 1\n */\n function lastIndexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);\n }\n return value === value\n ? strictLastIndexOf(array, value, index)\n : baseFindIndex(array, baseIsNaN, index, true);\n }\n\n /**\n * Gets the element at index `n` of `array`. If `n` is negative, the nth\n * element from the end is returned.\n *\n * @static\n * @memberOf _\n * @since 4.11.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=0] The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n *\n * _.nth(array, 1);\n * // => 'b'\n *\n * _.nth(array, -2);\n * // => 'c';\n */\n function nth(array, n) {\n return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;\n }\n\n /**\n * Removes all given values from `array` using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\n * to remove elements from an array by predicate.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...*} [values] The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pull(array, 'a', 'c');\n * console.log(array);\n * // => ['b', 'b']\n */\n var pull = baseRest(pullAll);\n\n /**\n * This method is like `_.pull` except that it accepts an array of values to remove.\n *\n * **Note:** Unlike `_.difference`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pullAll(array, ['a', 'c']);\n * console.log(array);\n * // => ['b', 'b']\n */\n function pullAll(array, values) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values)\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `iteratee` which is\n * invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The iteratee is invoked with one argument: (value).\n *\n * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n *\n * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n * console.log(array);\n * // => [{ 'x': 2 }]\n */\n function pullAllBy(array, values, iteratee) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, getIteratee(iteratee, 2))\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `comparator` which\n * is invoked to compare elements of `array` to `values`. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n *\n * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n * console.log(array);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n */\n function pullAllWith(array, values, comparator) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, undefined, comparator)\n : array;\n }\n\n /**\n * Removes elements from `array` corresponding to `indexes` and returns an\n * array of removed elements.\n *\n * **Note:** Unlike `_.at`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...(number|number[])} [indexes] The indexes of elements to remove.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n * var pulled = _.pullAt(array, [1, 3]);\n *\n * console.log(array);\n * // => ['a', 'c']\n *\n * console.log(pulled);\n * // => ['b', 'd']\n */\n var pullAt = flatRest(function(array, indexes) {\n var length = array == null ? 0 : array.length,\n result = baseAt(array, indexes);\n\n basePullAt(array, arrayMap(indexes, function(index) {\n return isIndex(index, length) ? +index : index;\n }).sort(compareAscending));\n\n return result;\n });\n\n /**\n * Removes all elements from `array` that `predicate` returns truthy for\n * and returns an array of the removed elements. The predicate is invoked\n * with three arguments: (value, index, array).\n *\n * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\n * to pull elements from an array by value.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = [1, 2, 3, 4];\n * var evens = _.remove(array, function(n) {\n * return n % 2 == 0;\n * });\n *\n * console.log(array);\n * // => [1, 3]\n *\n * console.log(evens);\n * // => [2, 4]\n */\n function remove(array, predicate) {\n var result = [];\n if (!(array && array.length)) {\n return result;\n }\n var index = -1,\n indexes = [],\n length = array.length;\n\n predicate = getIteratee(predicate, 3);\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result.push(value);\n indexes.push(index);\n }\n }\n basePullAt(array, indexes);\n return result;\n }\n\n /**\n * Reverses `array` so that the first element becomes the last, the second\n * element becomes the second to last, and so on.\n *\n * **Note:** This method mutates `array` and is based on\n * [`Array#reverse`](https://mdn.io/Array/reverse).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.reverse(array);\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function reverse(array) {\n return array == null ? array : nativeReverse.call(array);\n }\n\n /**\n * Creates a slice of `array` from `start` up to, but not including, `end`.\n *\n * **Note:** This method is used instead of\n * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\n * returned.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function slice(array, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\n start = 0;\n end = length;\n }\n else {\n start = start == null ? 0 : toInteger(start);\n end = end === undefined ? length : toInteger(end);\n }\n return baseSlice(array, start, end);\n }\n\n /**\n * Uses a binary search to determine the lowest index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedIndex([30, 50], 40);\n * // => 1\n */\n function sortedIndex(array, value) {\n return baseSortedIndex(array, value);\n }\n\n /**\n * This method is like `_.sortedIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedIndexBy(objects, { 'x': 4 }, 'x');\n * // => 0\n */\n function sortedIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));\n }\n\n /**\n * This method is like `_.indexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedIndexOf([4, 5, 5, 5, 6], 5);\n * // => 1\n */\n function sortedIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value);\n if (index < length && eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.sortedIndex` except that it returns the highest\n * index at which `value` should be inserted into `array` in order to\n * maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedLastIndex([4, 5, 5, 5, 6], 5);\n * // => 4\n */\n function sortedLastIndex(array, value) {\n return baseSortedIndex(array, value, true);\n }\n\n /**\n * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 1\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');\n * // => 1\n */\n function sortedLastIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);\n }\n\n /**\n * This method is like `_.lastIndexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);\n * // => 3\n */\n function sortedLastIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value, true) - 1;\n if (eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.uniq` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniq([1, 1, 2]);\n * // => [1, 2]\n */\n function sortedUniq(array) {\n return (array && array.length)\n ? baseSortedUniq(array)\n : [];\n }\n\n /**\n * This method is like `_.uniqBy` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\n * // => [1.1, 2.3]\n */\n function sortedUniqBy(array, iteratee) {\n return (array && array.length)\n ? baseSortedUniq(array, getIteratee(iteratee, 2))\n : [];\n }\n\n /**\n * Gets all but the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.tail([1, 2, 3]);\n * // => [2, 3]\n */\n function tail(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 1, length) : [];\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.take([1, 2, 3]);\n * // => [1]\n *\n * _.take([1, 2, 3], 2);\n * // => [1, 2]\n *\n * _.take([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.take([1, 2, 3], 0);\n * // => []\n */\n function take(array, n, guard) {\n if (!(array && array.length)) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.takeRight([1, 2, 3]);\n * // => [3]\n *\n * _.takeRight([1, 2, 3], 2);\n * // => [2, 3]\n *\n * _.takeRight([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.takeRight([1, 2, 3], 0);\n * // => []\n */\n function takeRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with elements taken from the end. Elements are\n * taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.takeRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeRightWhile(users, ['active', false]);\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeRightWhile(users, 'active');\n * // => []\n */\n function takeRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), false, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` with elements taken from the beginning. Elements\n * are taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.takeWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeWhile(users, ['active', false]);\n * // => objects for ['barney', 'fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeWhile(users, 'active');\n * // => []\n */\n function takeWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3))\n : [];\n }\n\n /**\n * Creates an array of unique values, in order, from all given arrays using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.union([2], [1, 2]);\n * // => [2, 1]\n */\n var union = baseRest(function(arrays) {\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n });\n\n /**\n * This method is like `_.union` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which uniqueness is computed. Result values are chosen from the first\n * array in which the value occurs. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.unionBy([2.1], [1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n var unionBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.union` except that it accepts `comparator` which\n * is invoked to compare elements of `arrays`. Result values are chosen from\n * the first array in which the value occurs. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.unionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var unionWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);\n });\n\n /**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\n function uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * uniqueness is computed. The order of result values is determined by the\n * order they occur in the array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n function uniqBy(array, iteratee) {\n return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `comparator` which\n * is invoked to compare elements of `array`. The order of result values is\n * determined by the order they occur in the array.The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.uniqWith(objects, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n */\n function uniqWith(array, comparator) {\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\n }\n\n /**\n * This method is like `_.zip` except that it accepts an array of grouped\n * elements and creates an array regrouping the elements to their pre-zip\n * configuration.\n *\n * @static\n * @memberOf _\n * @since 1.2.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n *\n * _.unzip(zipped);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\n function unzip(array) {\n if (!(array && array.length)) {\n return [];\n }\n var length = 0;\n array = arrayFilter(array, function(group) {\n if (isArrayLikeObject(group)) {\n length = nativeMax(group.length, length);\n return true;\n }\n });\n return baseTimes(length, function(index) {\n return arrayMap(array, baseProperty(index));\n });\n }\n\n /**\n * This method is like `_.unzip` except that it accepts `iteratee` to specify\n * how regrouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * regrouped values.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip([1, 2], [10, 20], [100, 200]);\n * // => [[1, 10, 100], [2, 20, 200]]\n *\n * _.unzipWith(zipped, _.add);\n * // => [3, 30, 300]\n */\n function unzipWith(array, iteratee) {\n if (!(array && array.length)) {\n return [];\n }\n var result = unzip(array);\n if (iteratee == null) {\n return result;\n }\n return arrayMap(result, function(group) {\n return apply(iteratee, undefined, group);\n });\n }\n\n /**\n * Creates an array excluding all given values using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.pull`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...*} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.xor\n * @example\n *\n * _.without([2, 1, 2, 3], 1, 2);\n * // => [3]\n */\n var without = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, values)\n : [];\n });\n\n /**\n * Creates an array of unique values that is the\n * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\n * of the given arrays. The order of result values is determined by the order\n * they occur in the arrays.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.without\n * @example\n *\n * _.xor([2, 1], [2, 3]);\n * // => [1, 3]\n */\n var xor = baseRest(function(arrays) {\n return baseXor(arrayFilter(arrays, isArrayLikeObject));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which by which they're compared. The order of result values is determined\n * by the order they occur in the arrays. The iteratee is invoked with one\n * argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2, 3.4]\n *\n * // The `_.property` iteratee shorthand.\n * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var xorBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `comparator` which is\n * invoked to compare elements of `arrays`. The order of result values is\n * determined by the order they occur in the arrays. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.xorWith(objects, others, _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var xorWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);\n });\n\n /**\n * Creates an array of grouped elements, the first of which contains the\n * first elements of the given arrays, the second of which contains the\n * second elements of the given arrays, and so on.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\n var zip = baseRest(unzip);\n\n /**\n * This method is like `_.fromPairs` except that it accepts two arrays,\n * one of property identifiers and one of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 0.4.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\n function zipObject(props, values) {\n return baseZipObject(props || [], values || [], assignValue);\n }\n\n /**\n * This method is like `_.zipObject` except that it supports property paths.\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);\n * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }\n */\n function zipObjectDeep(props, values) {\n return baseZipObject(props || [], values || [], baseSet);\n }\n\n /**\n * This method is like `_.zip` except that it accepts `iteratee` to specify\n * how grouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * grouped values.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {\n * return a + b + c;\n * });\n * // => [111, 222]\n */\n var zipWith = baseRest(function(arrays) {\n var length = arrays.length,\n iteratee = length > 1 ? arrays[length - 1] : undefined;\n\n iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;\n return unzipWith(arrays, iteratee);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` wrapper instance that wraps `value` with explicit method\n * chain sequences enabled. The result of such sequences must be unwrapped\n * with `_#value`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Seq\n * @param {*} value The value to wrap.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'pebbles', 'age': 1 }\n * ];\n *\n * var youngest = _\n * .chain(users)\n * .sortBy('age')\n * .map(function(o) {\n * return o.user + ' is ' + o.age;\n * })\n * .head()\n * .value();\n * // => 'pebbles is 1'\n */\n function chain(value) {\n var result = lodash(value);\n result.__chain__ = true;\n return result;\n }\n\n /**\n * This method invokes `interceptor` and returns `value`. The interceptor\n * is invoked with one argument; (value). The purpose of this method is to\n * \"tap into\" a method chain sequence in order to modify intermediate results.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns `value`.\n * @example\n *\n * _([1, 2, 3])\n * .tap(function(array) {\n * // Mutate input array.\n * array.pop();\n * })\n * .reverse()\n * .value();\n * // => [2, 1]\n */\n function tap(value, interceptor) {\n interceptor(value);\n return value;\n }\n\n /**\n * This method is like `_.tap` except that it returns the result of `interceptor`.\n * The purpose of this method is to \"pass thru\" values replacing intermediate\n * results in a method chain sequence.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns the result of `interceptor`.\n * @example\n *\n * _(' abc ')\n * .chain()\n * .trim()\n * .thru(function(value) {\n * return [value];\n * })\n * .value();\n * // => ['abc']\n */\n function thru(value, interceptor) {\n return interceptor(value);\n }\n\n /**\n * This method is the wrapper version of `_.at`.\n *\n * @name at\n * @memberOf _\n * @since 1.0.0\n * @category Seq\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _(object).at(['a[0].b.c', 'a[1]']).value();\n * // => [3, 4]\n */\n var wrapperAt = flatRest(function(paths) {\n var length = paths.length,\n start = length ? paths[0] : 0,\n value = this.__wrapped__,\n interceptor = function(object) { return baseAt(object, paths); };\n\n if (length > 1 || this.__actions__.length ||\n !(value instanceof LazyWrapper) || !isIndex(start)) {\n return this.thru(interceptor);\n }\n value = value.slice(start, +start + (length ? 1 : 0));\n value.__actions__.push({\n 'func': thru,\n 'args': [interceptor],\n 'thisArg': undefined\n });\n return new LodashWrapper(value, this.__chain__).thru(function(array) {\n if (length && !array.length) {\n array.push(undefined);\n }\n return array;\n });\n });\n\n /**\n * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\n *\n * @name chain\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 }\n * ];\n *\n * // A sequence without explicit chaining.\n * _(users).head();\n * // => { 'user': 'barney', 'age': 36 }\n *\n * // A sequence with explicit chaining.\n * _(users)\n * .chain()\n * .head()\n * .pick('user')\n * .value();\n * // => { 'user': 'barney' }\n */\n function wrapperChain() {\n return chain(this);\n }\n\n /**\n * Executes the chain sequence and returns the wrapped result.\n *\n * @name commit\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2];\n * var wrapped = _(array).push(3);\n *\n * console.log(array);\n * // => [1, 2]\n *\n * wrapped = wrapped.commit();\n * console.log(array);\n * // => [1, 2, 3]\n *\n * wrapped.last();\n * // => 3\n *\n * console.log(array);\n * // => [1, 2, 3]\n */\n function wrapperCommit() {\n return new LodashWrapper(this.value(), this.__chain__);\n }\n\n /**\n * Gets the next value on a wrapped object following the\n * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\n *\n * @name next\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the next iterator value.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 1 }\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 2 }\n *\n * wrapped.next();\n * // => { 'done': true, 'value': undefined }\n */\n function wrapperNext() {\n if (this.__values__ === undefined) {\n this.__values__ = toArray(this.value());\n }\n var done = this.__index__ >= this.__values__.length,\n value = done ? undefined : this.__values__[this.__index__++];\n\n return { 'done': done, 'value': value };\n }\n\n /**\n * Enables the wrapper to be iterable.\n *\n * @name Symbol.iterator\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the wrapper object.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped[Symbol.iterator]() === wrapped;\n * // => true\n *\n * Array.from(wrapped);\n * // => [1, 2]\n */\n function wrapperToIterator() {\n return this;\n }\n\n /**\n * Creates a clone of the chain sequence planting `value` as the wrapped value.\n *\n * @name plant\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @param {*} value The value to plant.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2]).map(square);\n * var other = wrapped.plant([3, 4]);\n *\n * other.value();\n * // => [9, 16]\n *\n * wrapped.value();\n * // => [1, 4]\n */\n function wrapperPlant(value) {\n var result,\n parent = this;\n\n while (parent instanceof baseLodash) {\n var clone = wrapperClone(parent);\n clone.__index__ = 0;\n clone.__values__ = undefined;\n if (result) {\n previous.__wrapped__ = clone;\n } else {\n result = clone;\n }\n var previous = clone;\n parent = parent.__wrapped__;\n }\n previous.__wrapped__ = value;\n return result;\n }\n\n /**\n * This method is the wrapper version of `_.reverse`.\n *\n * **Note:** This method mutates the wrapped array.\n *\n * @name reverse\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _(array).reverse().value()\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function wrapperReverse() {\n var value = this.__wrapped__;\n if (value instanceof LazyWrapper) {\n var wrapped = value;\n if (this.__actions__.length) {\n wrapped = new LazyWrapper(this);\n }\n wrapped = wrapped.reverse();\n wrapped.__actions__.push({\n 'func': thru,\n 'args': [reverse],\n 'thisArg': undefined\n });\n return new LodashWrapper(wrapped, this.__chain__);\n }\n return this.thru(reverse);\n }\n\n /**\n * Executes the chain sequence to resolve the unwrapped value.\n *\n * @name value\n * @memberOf _\n * @since 0.1.0\n * @alias toJSON, valueOf\n * @category Seq\n * @returns {*} Returns the resolved unwrapped value.\n * @example\n *\n * _([1, 2, 3]).value();\n * // => [1, 2, 3]\n */\n function wrapperValue() {\n return baseWrapperValue(this.__wrapped__, this.__actions__);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the number of times the key was returned by `iteratee`. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.countBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': 1, '6': 2 }\n *\n * // The `_.property` iteratee shorthand.\n * _.countBy(['one', 'two', 'three'], 'length');\n * // => { '3': 2, '5': 1 }\n */\n var countBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n ++result[key];\n } else {\n baseAssignValue(result, key, 1);\n }\n });\n\n /**\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\n * Iteration is stopped once `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * **Note:** This method returns `true` for\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n * elements of empty collections.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n * @example\n *\n * _.every([true, 1, null, 'yes'], Boolean);\n * // => false\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.every(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.every(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.every(users, 'active');\n * // => false\n */\n function every(collection, predicate, guard) {\n var func = isArray(collection) ? arrayEvery : baseEvery;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * **Note:** Unlike `_.remove`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.reject\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.filter(users, 'active');\n * // => objects for ['barney']\n *\n * // Combining several predicates using `_.overEvery` or `_.overSome`.\n * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n * // => objects for ['fred', 'barney']\n */\n function filter(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\n var find = createFind(findIndex);\n\n /**\n * This method is like `_.find` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=collection.length-1] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * _.findLast([1, 2, 3, 4], function(n) {\n * return n % 2 == 1;\n * });\n * // => 3\n */\n var findLast = createFind(findLastIndex);\n\n /**\n * Creates a flattened array of values by running each element in `collection`\n * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n * with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [n, n];\n * }\n *\n * _.flatMap([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMap(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), 1);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDeep([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMapDeep(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), INFINITY);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDepth([1, 2], duplicate, 2);\n * // => [[1, 1], [2, 2]]\n */\n function flatMapDepth(collection, iteratee, depth) {\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(map(collection, iteratee), depth);\n }\n\n /**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forEach` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @alias eachRight\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEach\n * @example\n *\n * _.forEachRight([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `2` then `1`.\n */\n function forEachRight(collection, iteratee) {\n var func = isArray(collection) ? arrayEachRight : baseEachRight;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The order of grouped values\n * is determined by the order they occur in `collection`. The corresponding\n * value of each key is an array of elements responsible for generating the\n * key. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * // The `_.property` iteratee shorthand.\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\n var groupBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n result[key].push(value);\n } else {\n baseAssignValue(result, key, [value]);\n }\n });\n\n /**\n * Checks if `value` is in `collection`. If `collection` is a string, it's\n * checked for a substring of `value`, otherwise\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * is used for equality comparisons. If `fromIndex` is negative, it's used as\n * the offset from the end of `collection`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {boolean} Returns `true` if `value` is found, else `false`.\n * @example\n *\n * _.includes([1, 2, 3], 1);\n * // => true\n *\n * _.includes([1, 2, 3], 1, 2);\n * // => false\n *\n * _.includes({ 'a': 1, 'b': 2 }, 1);\n * // => true\n *\n * _.includes('abcd', 'bc');\n * // => true\n */\n function includes(collection, value, fromIndex, guard) {\n collection = isArrayLike(collection) ? collection : values(collection);\n fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n var length = collection.length;\n if (fromIndex < 0) {\n fromIndex = nativeMax(length + fromIndex, 0);\n }\n return isString(collection)\n ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n }\n\n /**\n * Invokes the method at `path` of each element in `collection`, returning\n * an array of the results of each invoked method. Any additional arguments\n * are provided to each invoked method. If `path` is a function, it's invoked\n * for, and `this` bound to, each element in `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array|Function|string} path The path of the method to invoke or\n * the function invoked per iteration.\n * @param {...*} [args] The arguments to invoke each method with.\n * @returns {Array} Returns the array of results.\n * @example\n *\n * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\n * // => [[1, 5, 7], [1, 2, 3]]\n *\n * _.invokeMap([123, 456], String.prototype.split, '');\n * // => [['1', '2', '3'], ['4', '5', '6']]\n */\n var invokeMap = baseRest(function(collection, path, args) {\n var index = -1,\n isFunc = typeof path == 'function',\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value) {\n result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);\n });\n return result;\n });\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the last element responsible for generating the key. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * var array = [\n * { 'dir': 'left', 'code': 97 },\n * { 'dir': 'right', 'code': 100 }\n * ];\n *\n * _.keyBy(array, function(o) {\n * return String.fromCharCode(o.code);\n * });\n * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n *\n * _.keyBy(array, 'dir');\n * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n */\n var keyBy = createAggregator(function(result, value, key) {\n baseAssignValue(result, key, value);\n });\n\n /**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\n function map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.sortBy` except that it allows specifying the sort\n * orders of the iteratees to sort by. If `orders` is unspecified, all values\n * are sorted in ascending order. Otherwise, specify an order of \"desc\" for\n * descending or \"asc\" for ascending sort order of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @param {string[]} [orders] The sort orders of `iteratees`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 34 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'barney', 'age': 36 }\n * ];\n *\n * // Sort by `user` in ascending order and by `age` in descending order.\n * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n */\n function orderBy(collection, iteratees, orders, guard) {\n if (collection == null) {\n return [];\n }\n if (!isArray(iteratees)) {\n iteratees = iteratees == null ? [] : [iteratees];\n }\n orders = guard ? undefined : orders;\n if (!isArray(orders)) {\n orders = orders == null ? [] : [orders];\n }\n return baseOrderBy(collection, iteratees, orders);\n }\n\n /**\n * Creates an array of elements split into two groups, the first of which\n * contains elements `predicate` returns truthy for, the second of which\n * contains elements `predicate` returns falsey for. The predicate is\n * invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the array of grouped elements.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true },\n * { 'user': 'pebbles', 'age': 1, 'active': false }\n * ];\n *\n * _.partition(users, function(o) { return o.active; });\n * // => objects for [['fred'], ['barney', 'pebbles']]\n *\n * // The `_.matches` iteratee shorthand.\n * _.partition(users, { 'age': 1, 'active': false });\n * // => objects for [['pebbles'], ['barney', 'fred']]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.partition(users, ['active', false]);\n * // => objects for [['barney', 'pebbles'], ['fred']]\n *\n * // The `_.property` iteratee shorthand.\n * _.partition(users, 'active');\n * // => objects for [['fred'], ['barney', 'pebbles']]\n */\n var partition = createAggregator(function(result, value, key) {\n result[key ? 0 : 1].push(value);\n }, function() { return [[], []]; });\n\n /**\n * Reduces `collection` to a value which is the accumulated result of running\n * each element in `collection` thru `iteratee`, where each successive\n * invocation is supplied the return value of the previous. If `accumulator`\n * is not given, the first element of `collection` is used as the initial\n * value. The iteratee is invoked with four arguments:\n * (accumulator, value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\n *\n * The guarded methods are:\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n * and `sortBy`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduceRight\n * @example\n *\n * _.reduce([1, 2], function(sum, n) {\n * return sum + n;\n * }, 0);\n * // => 3\n *\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * return result;\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n */\n function reduce(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduce : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n }\n\n /**\n * This method is like `_.reduce` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduce\n * @example\n *\n * var array = [[0, 1], [2, 3], [4, 5]];\n *\n * _.reduceRight(array, function(flattened, other) {\n * return flattened.concat(other);\n * }, []);\n * // => [4, 5, 2, 3, 0, 1]\n */\n function reduceRight(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduceRight : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);\n }\n\n /**\n * The opposite of `_.filter`; this method returns the elements of `collection`\n * that `predicate` does **not** return truthy for.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.filter\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true }\n * ];\n *\n * _.reject(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.reject(users, { 'age': 40, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.reject(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.reject(users, 'active');\n * // => objects for ['barney']\n */\n function reject(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, negate(getIteratee(predicate, 3)));\n }\n\n /**\n * Gets a random element from `collection`.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n * @example\n *\n * _.sample([1, 2, 3, 4]);\n * // => 2\n */\n function sample(collection) {\n var func = isArray(collection) ? arraySample : baseSample;\n return func(collection);\n }\n\n /**\n * Gets `n` random elements at unique keys from `collection` up to the\n * size of `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @param {number} [n=1] The number of elements to sample.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the random elements.\n * @example\n *\n * _.sampleSize([1, 2, 3], 2);\n * // => [3, 1]\n *\n * _.sampleSize([1, 2, 3], 4);\n * // => [2, 3, 1]\n */\n function sampleSize(collection, n, guard) {\n if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n var func = isArray(collection) ? arraySampleSize : baseSampleSize;\n return func(collection, n);\n }\n\n /**\n * Creates an array of shuffled values, using a version of the\n * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n * @example\n *\n * _.shuffle([1, 2, 3, 4]);\n * // => [4, 1, 3, 2]\n */\n function shuffle(collection) {\n var func = isArray(collection) ? arrayShuffle : baseShuffle;\n return func(collection);\n }\n\n /**\n * Gets the size of `collection` by returning its length for array-like\n * values or the number of own enumerable string keyed properties for objects.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @returns {number} Returns the collection size.\n * @example\n *\n * _.size([1, 2, 3]);\n * // => 3\n *\n * _.size({ 'a': 1, 'b': 2 });\n * // => 2\n *\n * _.size('pebbles');\n * // => 7\n */\n function size(collection) {\n if (collection == null) {\n return 0;\n }\n if (isArrayLike(collection)) {\n return isString(collection) ? stringSize(collection) : collection.length;\n }\n var tag = getTag(collection);\n if (tag == mapTag || tag == setTag) {\n return collection.size;\n }\n return baseKeys(collection).length;\n }\n\n /**\n * Checks if `predicate` returns truthy for **any** element of `collection`.\n * Iteration is stopped once `predicate` returns truthy. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n * @example\n *\n * _.some([null, 0, 'yes', false], Boolean);\n * // => true\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.some(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.some(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.some(users, 'active');\n * // => true\n */\n function some(collection, predicate, guard) {\n var func = isArray(collection) ? arraySome : baseSome;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection thru each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 30 },\n * { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\n */\n var sortBy = baseRest(function(collection, iteratees) {\n if (collection == null) {\n return [];\n }\n var length = iteratees.length;\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n iteratees = [];\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n iteratees = [iteratees[0]];\n }\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\n var now = ctxNow || function() {\n return root.Date.now();\n };\n\n /*------------------------------------------------------------------------*/\n\n /**\n * The opposite of `_.before`; this method creates a function that invokes\n * `func` once it's called `n` or more times.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {number} n The number of calls before `func` is invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var saves = ['profile', 'settings'];\n *\n * var done = _.after(saves.length, function() {\n * console.log('done saving!');\n * });\n *\n * _.forEach(saves, function(type) {\n * asyncSave({ 'type': type, 'complete': done });\n * });\n * // => Logs 'done saving!' after the two async saves have completed.\n */\n function after(n, func) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n < 1) {\n return func.apply(this, arguments);\n }\n };\n }\n\n /**\n * Creates a function that invokes `func`, with up to `n` arguments,\n * ignoring any additional arguments.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @param {number} [n=func.length] The arity cap.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n * // => [6, 8, 10]\n */\n function ary(func, n, guard) {\n n = guard ? undefined : n;\n n = (func && n == null) ? func.length : n;\n return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\n }\n\n /**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery(element).on('click', _.before(5, addContactToList));\n * // => Allows adding up to 4 contacts to the list.\n */\n function before(n, func) {\n var result;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n > 0) {\n result = func.apply(this, arguments);\n }\n if (n <= 1) {\n func = undefined;\n }\n return result;\n };\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of `thisArg`\n * and `partials` prepended to the arguments it receives.\n *\n * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for partially applied arguments.\n *\n * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\n * property of bound functions.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to bind.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * function greet(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n *\n * var object = { 'user': 'fred' };\n *\n * var bound = _.bind(greet, object, 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bind(greet, object, _, '!');\n * bound('hi');\n * // => 'hi fred!'\n */\n var bind = baseRest(function(func, thisArg, partials) {\n var bitmask = WRAP_BIND_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bind));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(func, bitmask, thisArg, partials, holders);\n });\n\n /**\n * Creates a function that invokes the method at `object[key]` with `partials`\n * prepended to the arguments it receives.\n *\n * This method differs from `_.bind` by allowing bound functions to reference\n * methods that may be redefined or don't yet exist. See\n * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\n * for more details.\n *\n * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Function\n * @param {Object} object The object to invoke the method on.\n * @param {string} key The key of the method.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * var object = {\n * 'user': 'fred',\n * 'greet': function(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n * };\n *\n * var bound = _.bindKey(object, 'greet', 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * object.greet = function(greeting, punctuation) {\n * return greeting + 'ya ' + this.user + punctuation;\n * };\n *\n * bound('!');\n * // => 'hiya fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bindKey(object, 'greet', _, '!');\n * bound('hi');\n * // => 'hiya fred!'\n */\n var bindKey = baseRest(function(object, key, partials) {\n var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bindKey));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(key, bitmask, object, partials, holders);\n });\n\n /**\n * Creates a function that accepts arguments of `func` and either invokes\n * `func` returning its result, if at least `arity` number of arguments have\n * been provided, or returns a function that accepts the remaining `func`\n * arguments, and so on. The arity of `func` may be specified if `func.length`\n * is not sufficient.\n *\n * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curry(abc);\n *\n * curried(1)(2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(1)(_, 3)(2);\n * // => [1, 2, 3]\n */\n function curry(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curry.placeholder;\n return result;\n }\n\n /**\n * This method is like `_.curry` except that arguments are applied to `func`\n * in the manner of `_.partialRight` instead of `_.partial`.\n *\n * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curryRight(abc);\n *\n * curried(3)(2)(1);\n * // => [1, 2, 3]\n *\n * curried(2, 3)(1);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(3)(1, _)(2);\n * // => [1, 2, 3]\n */\n function curryRight(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curryRight.placeholder;\n return result;\n }\n\n /**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\n function debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n }\n\n /**\n * Defers invoking the `func` until the current call stack has cleared. Any\n * additional arguments are provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to defer.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.defer(function(text) {\n * console.log(text);\n * }, 'deferred');\n * // => Logs 'deferred' after one millisecond.\n */\n var defer = baseRest(function(func, args) {\n return baseDelay(func, 1, args);\n });\n\n /**\n * Invokes `func` after `wait` milliseconds. Any additional arguments are\n * provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.delay(function(text) {\n * console.log(text);\n * }, 1000, 'later');\n * // => Logs 'later' after one second.\n */\n var delay = baseRest(function(func, wait, args) {\n return baseDelay(func, toNumber(wait) || 0, args);\n });\n\n /**\n * Creates a function that invokes `func` with arguments reversed.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to flip arguments for.\n * @returns {Function} Returns the new flipped function.\n * @example\n *\n * var flipped = _.flip(function() {\n * return _.toArray(arguments);\n * });\n *\n * flipped('a', 'b', 'c', 'd');\n * // => ['d', 'c', 'b', 'a']\n */\n function flip(func) {\n return createWrap(func, WRAP_FLIP_FLAG);\n }\n\n /**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\n function memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n }\n\n // Expose `MapCache`.\n memoize.Cache = MapCache;\n\n /**\n * Creates a function that negates the result of the predicate `func`. The\n * `func` predicate is invoked with the `this` binding and arguments of the\n * created function.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} predicate The predicate to negate.\n * @returns {Function} Returns the new negated function.\n * @example\n *\n * function isEven(n) {\n * return n % 2 == 0;\n * }\n *\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n * // => [1, 3, 5]\n */\n function negate(predicate) {\n if (typeof predicate != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return function() {\n var args = arguments;\n switch (args.length) {\n case 0: return !predicate.call(this);\n case 1: return !predicate.call(this, args[0]);\n case 2: return !predicate.call(this, args[0], args[1]);\n case 3: return !predicate.call(this, args[0], args[1], args[2]);\n }\n return !predicate.apply(this, args);\n };\n }\n\n /**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */\n function once(func) {\n return before(2, func);\n }\n\n /**\n * Creates a function that invokes `func` with its arguments transformed.\n *\n * @static\n * @since 4.0.0\n * @memberOf _\n * @category Function\n * @param {Function} func The function to wrap.\n * @param {...(Function|Function[])} [transforms=[_.identity]]\n * The argument transforms.\n * @returns {Function} Returns the new function.\n * @example\n *\n * function doubled(n) {\n * return n * 2;\n * }\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var func = _.overArgs(function(x, y) {\n * return [x, y];\n * }, [square, doubled]);\n *\n * func(9, 3);\n * // => [81, 6]\n *\n * func(10, 5);\n * // => [100, 10]\n */\n var overArgs = castRest(function(func, transforms) {\n transforms = (transforms.length == 1 && isArray(transforms[0]))\n ? arrayMap(transforms[0], baseUnary(getIteratee()))\n : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));\n\n var funcsLength = transforms.length;\n return baseRest(function(args) {\n var index = -1,\n length = nativeMin(args.length, funcsLength);\n\n while (++index < length) {\n args[index] = transforms[index].call(this, args[index]);\n }\n return apply(func, this, args);\n });\n });\n\n /**\n * Creates a function that invokes `func` with `partials` prepended to the\n * arguments it receives. This method is like `_.bind` except it does **not**\n * alter the `this` binding.\n *\n * The `_.partial.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 0.2.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var sayHelloTo = _.partial(greet, 'hello');\n * sayHelloTo('fred');\n * // => 'hello fred'\n *\n * // Partially applied with placeholders.\n * var greetFred = _.partial(greet, _, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n */\n var partial = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partial));\n return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);\n });\n\n /**\n * This method is like `_.partial` except that partially applied arguments\n * are appended to the arguments it receives.\n *\n * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var greetFred = _.partialRight(greet, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n *\n * // Partially applied with placeholders.\n * var sayHelloTo = _.partialRight(greet, 'hello', _);\n * sayHelloTo('fred');\n * // => 'hello fred'\n */\n var partialRight = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partialRight));\n return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);\n });\n\n /**\n * Creates a function that invokes `func` with arguments arranged according\n * to the specified `indexes` where the argument value at the first index is\n * provided as the first argument, the argument value at the second index is\n * provided as the second argument, and so on.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to rearrange arguments for.\n * @param {...(number|number[])} indexes The arranged argument indexes.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var rearged = _.rearg(function(a, b, c) {\n * return [a, b, c];\n * }, [2, 0, 1]);\n *\n * rearged('b', 'c', 'a')\n * // => ['a', 'b', 'c']\n */\n var rearg = flatRest(function(func, indexes) {\n return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\n });\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * created function and arguments from `start` and beyond provided as\n * an array.\n *\n * **Note:** This method is based on the\n * [rest parameter](https://mdn.io/rest_parameters).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.rest(function(what, names) {\n * return what + ' ' + _.initial(names).join(', ') +\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n * });\n *\n * say('hello', 'fred', 'barney', 'pebbles');\n * // => 'hello fred, barney, & pebbles'\n */\n function rest(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start === undefined ? start : toInteger(start);\n return baseRest(func, start);\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * create function and an array of arguments much like\n * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).\n *\n * **Note:** This method is based on the\n * [spread operator](https://mdn.io/spread_operator).\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Function\n * @param {Function} func The function to spread arguments over.\n * @param {number} [start=0] The start position of the spread.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.spread(function(who, what) {\n * return who + ' says ' + what;\n * });\n *\n * say(['fred', 'hello']);\n * // => 'fred says hello'\n *\n * var numbers = Promise.all([\n * Promise.resolve(40),\n * Promise.resolve(36)\n * ]);\n *\n * numbers.then(_.spread(function(x, y) {\n * return x + y;\n * }));\n * // => a Promise of 76\n */\n function spread(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start == null ? 0 : nativeMax(toInteger(start), 0);\n return baseRest(function(args) {\n var array = args[start],\n otherArgs = castSlice(args, 0, start);\n\n if (array) {\n arrayPush(otherArgs, array);\n }\n return apply(func, this, otherArgs);\n });\n }\n\n /**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\n function throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n }\n\n /**\n * Creates a function that accepts up to one argument, ignoring any\n * additional arguments.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.unary(parseInt));\n * // => [6, 8, 10]\n */\n function unary(func) {\n return ary(func, 1);\n }\n\n /**\n * Creates a function that provides `value` to `wrapper` as its first\n * argument. Any additional arguments provided to the function are appended\n * to those provided to the `wrapper`. The wrapper is invoked with the `this`\n * binding of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {*} value The value to wrap.\n * @param {Function} [wrapper=identity] The wrapper function.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var p = _.wrap(_.escape, function(func, text) {\n * return '

' + func(text) + '

';\n * });\n *\n * p('fred, barney, & pebbles');\n * // => '

fred, barney, & pebbles

'\n */\n function wrap(value, wrapper) {\n return partial(castFunction(wrapper), value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Casts `value` as an array if it's not one.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Lang\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast array.\n * @example\n *\n * _.castArray(1);\n * // => [1]\n *\n * _.castArray({ 'a': 1 });\n * // => [{ 'a': 1 }]\n *\n * _.castArray('abc');\n * // => ['abc']\n *\n * _.castArray(null);\n * // => [null]\n *\n * _.castArray(undefined);\n * // => [undefined]\n *\n * _.castArray();\n * // => []\n *\n * var array = [1, 2, 3];\n * console.log(_.castArray(array) === array);\n * // => true\n */\n function castArray() {\n if (!arguments.length) {\n return [];\n }\n var value = arguments[0];\n return isArray(value) ? value : [value];\n }\n\n /**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\n function clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.clone` except that it accepts `customizer` which\n * is invoked to produce the cloned value. If `customizer` returns `undefined`,\n * cloning is handled by the method instead. The `customizer` is invoked with\n * up to four arguments; (value [, index|key, object, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeepWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(false);\n * }\n * }\n *\n * var el = _.cloneWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 0\n */\n function cloneWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\n function cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.cloneWith` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the deep cloned value.\n * @see _.cloneWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(true);\n * }\n * }\n *\n * var el = _.cloneDeepWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 20\n */\n function cloneDeepWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * Checks if `object` conforms to `source` by invoking the predicate\n * properties of `source` with the corresponding property values of `object`.\n *\n * **Note:** This method is equivalent to `_.conforms` when `source` is\n * partially applied.\n *\n * @static\n * @memberOf _\n * @since 4.14.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 1; } });\n * // => true\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 2; } });\n * // => false\n */\n function conformsTo(object, source) {\n return source == null || baseConformsTo(object, source, keys(source));\n }\n\n /**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\n function eq(value, other) {\n return value === other || (value !== value && other !== other);\n }\n\n /**\n * Checks if `value` is greater than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n * @see _.lt\n * @example\n *\n * _.gt(3, 1);\n * // => true\n *\n * _.gt(3, 3);\n * // => false\n *\n * _.gt(1, 3);\n * // => false\n */\n var gt = createRelationalOperation(baseGt);\n\n /**\n * Checks if `value` is greater than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than or equal to\n * `other`, else `false`.\n * @see _.lte\n * @example\n *\n * _.gte(3, 1);\n * // => true\n *\n * _.gte(3, 3);\n * // => true\n *\n * _.gte(1, 3);\n * // => false\n */\n var gte = createRelationalOperation(function(value, other) {\n return value >= other;\n });\n\n /**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\n var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n };\n\n /**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\n var isArray = Array.isArray;\n\n /**\n * Checks if `value` is classified as an `ArrayBuffer` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n * @example\n *\n * _.isArrayBuffer(new ArrayBuffer(2));\n * // => true\n *\n * _.isArrayBuffer(new Array(2));\n * // => false\n */\n var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;\n\n /**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\n function isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n }\n\n /**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\n function isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n }\n\n /**\n * Checks if `value` is classified as a boolean primitive or object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */\n function isBoolean(value) {\n return value === true || value === false ||\n (isObjectLike(value) && baseGetTag(value) == boolTag);\n }\n\n /**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\n var isBuffer = nativeIsBuffer || stubFalse;\n\n /**\n * Checks if `value` is classified as a `Date` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n * @example\n *\n * _.isDate(new Date);\n * // => true\n *\n * _.isDate('Mon April 23 2012');\n * // => false\n */\n var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\n\n /**\n * Checks if `value` is likely a DOM element.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n * @example\n *\n * _.isElement(document.body);\n * // => true\n *\n * _.isElement('');\n * // => false\n */\n function isElement(value) {\n return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n }\n\n /**\n * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\n function isEmpty(value) {\n if (value == null) {\n return true;\n }\n if (isArrayLike(value) &&\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n return !value.length;\n }\n var tag = getTag(value);\n if (tag == mapTag || tag == setTag) {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !baseKeys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\n function isEqual(value, other) {\n return baseIsEqual(value, other);\n }\n\n /**\n * This method is like `_.isEqual` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with up to\n * six arguments: (objValue, othValue [, index|key, object, other, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, othValue) {\n * if (isGreeting(objValue) && isGreeting(othValue)) {\n * return true;\n * }\n * }\n *\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * _.isEqualWith(array, other, customizer);\n * // => true\n */\n function isEqualWith(value, other, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n var result = customizer ? customizer(value, other) : undefined;\n return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\n }\n\n /**\n * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n * `SyntaxError`, `TypeError`, or `URIError` object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n * @example\n *\n * _.isError(new Error);\n * // => true\n *\n * _.isError(Error);\n * // => false\n */\n function isError(value) {\n if (!isObjectLike(value)) {\n return false;\n }\n var tag = baseGetTag(value);\n return tag == errorTag || tag == domExcTag ||\n (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\n }\n\n /**\n * Checks if `value` is a finite primitive number.\n *\n * **Note:** This method is based on\n * [`Number.isFinite`](https://mdn.io/Number/isFinite).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n * @example\n *\n * _.isFinite(3);\n * // => true\n *\n * _.isFinite(Number.MIN_VALUE);\n * // => true\n *\n * _.isFinite(Infinity);\n * // => false\n *\n * _.isFinite('3');\n * // => false\n */\n function isFinite(value) {\n return typeof value == 'number' && nativeIsFinite(value);\n }\n\n /**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\n function isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n }\n\n /**\n * Checks if `value` is an integer.\n *\n * **Note:** This method is based on\n * [`Number.isInteger`](https://mdn.io/Number/isInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\n * @example\n *\n * _.isInteger(3);\n * // => true\n *\n * _.isInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isInteger(Infinity);\n * // => false\n *\n * _.isInteger('3');\n * // => false\n */\n function isInteger(value) {\n return typeof value == 'number' && value == toInteger(value);\n }\n\n /**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\n function isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\n function isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n }\n\n /**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\n function isObjectLike(value) {\n return value != null && typeof value == 'object';\n }\n\n /**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\n var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\n /**\n * Performs a partial deep comparison between `object` and `source` to\n * determine if `object` contains equivalent property values.\n *\n * **Note:** This method is equivalent to `_.matches` when `source` is\n * partially applied.\n *\n * Partial comparisons will match empty array and empty object `source`\n * values against any array or object value, respectively. See `_.isEqual`\n * for a list of supported value comparisons.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.isMatch(object, { 'b': 2 });\n * // => true\n *\n * _.isMatch(object, { 'b': 1 });\n * // => false\n */\n function isMatch(object, source) {\n return object === source || baseIsMatch(object, source, getMatchData(source));\n }\n\n /**\n * This method is like `_.isMatch` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with five\n * arguments: (objValue, srcValue, index|key, object, source).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, srcValue) {\n * if (isGreeting(objValue) && isGreeting(srcValue)) {\n * return true;\n * }\n * }\n *\n * var object = { 'greeting': 'hello' };\n * var source = { 'greeting': 'hi' };\n *\n * _.isMatchWith(object, source, customizer);\n * // => true\n */\n function isMatchWith(object, source, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseIsMatch(object, source, getMatchData(source), customizer);\n }\n\n /**\n * Checks if `value` is `NaN`.\n *\n * **Note:** This method is based on\n * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\n * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n * `undefined` and other non-number values.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n * @example\n *\n * _.isNaN(NaN);\n * // => true\n *\n * _.isNaN(new Number(NaN));\n * // => true\n *\n * isNaN(undefined);\n * // => true\n *\n * _.isNaN(undefined);\n * // => false\n */\n function isNaN(value) {\n // An `NaN` primitive is the only value that is not equal to itself.\n // Perform the `toStringTag` check first to avoid errors with some\n // ActiveX objects in IE.\n return isNumber(value) && value != +value;\n }\n\n /**\n * Checks if `value` is a pristine native function.\n *\n * **Note:** This method can't reliably detect native functions in the presence\n * of the core-js package because core-js circumvents this kind of detection.\n * Despite multiple requests, the core-js maintainer has made it clear: any\n * attempt to fix the detection will be obstructed. As a result, we're left\n * with little choice but to throw an error. Unfortunately, this also affects\n * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),\n * which rely on core-js.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */\n function isNative(value) {\n if (isMaskable(value)) {\n throw new Error(CORE_ERROR_TEXT);\n }\n return baseIsNative(value);\n }\n\n /**\n * Checks if `value` is `null`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n * @example\n *\n * _.isNull(null);\n * // => true\n *\n * _.isNull(void 0);\n * // => false\n */\n function isNull(value) {\n return value === null;\n }\n\n /**\n * Checks if `value` is `null` or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n * @example\n *\n * _.isNil(null);\n * // => true\n *\n * _.isNil(void 0);\n * // => true\n *\n * _.isNil(NaN);\n * // => false\n */\n function isNil(value) {\n return value == null;\n }\n\n /**\n * Checks if `value` is classified as a `Number` primitive or object.\n *\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n * classified as numbers, use the `_.isFinite` method.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n * @example\n *\n * _.isNumber(3);\n * // => true\n *\n * _.isNumber(Number.MIN_VALUE);\n * // => true\n *\n * _.isNumber(Infinity);\n * // => true\n *\n * _.isNumber('3');\n * // => false\n */\n function isNumber(value) {\n return typeof value == 'number' ||\n (isObjectLike(value) && baseGetTag(value) == numberTag);\n }\n\n /**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\n function isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n }\n\n /**\n * Checks if `value` is classified as a `RegExp` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n * @example\n *\n * _.isRegExp(/abc/);\n * // => true\n *\n * _.isRegExp('/abc/');\n * // => false\n */\n var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\n\n /**\n * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\n * double precision number which isn't the result of a rounded unsafe integer.\n *\n * **Note:** This method is based on\n * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.\n * @example\n *\n * _.isSafeInteger(3);\n * // => true\n *\n * _.isSafeInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isSafeInteger(Infinity);\n * // => false\n *\n * _.isSafeInteger('3');\n * // => false\n */\n function isSafeInteger(value) {\n return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\n var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\n /**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\n function isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n }\n\n /**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\n function isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n }\n\n /**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\n var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n /**\n * Checks if `value` is `undefined`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */\n function isUndefined(value) {\n return value === undefined;\n }\n\n /**\n * Checks if `value` is classified as a `WeakMap` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\n * @example\n *\n * _.isWeakMap(new WeakMap);\n * // => true\n *\n * _.isWeakMap(new Map);\n * // => false\n */\n function isWeakMap(value) {\n return isObjectLike(value) && getTag(value) == weakMapTag;\n }\n\n /**\n * Checks if `value` is classified as a `WeakSet` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.\n * @example\n *\n * _.isWeakSet(new WeakSet);\n * // => true\n *\n * _.isWeakSet(new Set);\n * // => false\n */\n function isWeakSet(value) {\n return isObjectLike(value) && baseGetTag(value) == weakSetTag;\n }\n\n /**\n * Checks if `value` is less than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n * @see _.gt\n * @example\n *\n * _.lt(1, 3);\n * // => true\n *\n * _.lt(3, 3);\n * // => false\n *\n * _.lt(3, 1);\n * // => false\n */\n var lt = createRelationalOperation(baseLt);\n\n /**\n * Checks if `value` is less than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than or equal to\n * `other`, else `false`.\n * @see _.gte\n * @example\n *\n * _.lte(1, 3);\n * // => true\n *\n * _.lte(3, 3);\n * // => true\n *\n * _.lte(3, 1);\n * // => false\n */\n var lte = createRelationalOperation(function(value, other) {\n return value <= other;\n });\n\n /**\n * Converts `value` to an array.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Array} Returns the converted array.\n * @example\n *\n * _.toArray({ 'a': 1, 'b': 2 });\n * // => [1, 2]\n *\n * _.toArray('abc');\n * // => ['a', 'b', 'c']\n *\n * _.toArray(1);\n * // => []\n *\n * _.toArray(null);\n * // => []\n */\n function toArray(value) {\n if (!value) {\n return [];\n }\n if (isArrayLike(value)) {\n return isString(value) ? stringToArray(value) : copyArray(value);\n }\n if (symIterator && value[symIterator]) {\n return iteratorToArray(value[symIterator]());\n }\n var tag = getTag(value),\n func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\n\n return func(value);\n }\n\n /**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\n function toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n }\n\n /**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\n function toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n }\n\n /**\n * Converts `value` to an integer suitable for use as the length of an\n * array-like object.\n *\n * **Note:** This method is based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toLength(3.2);\n * // => 3\n *\n * _.toLength(Number.MIN_VALUE);\n * // => 0\n *\n * _.toLength(Infinity);\n * // => 4294967295\n *\n * _.toLength('3.2');\n * // => 3\n */\n function toLength(value) {\n return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\n }\n\n /**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\n function toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n }\n\n /**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\n function toPlainObject(value) {\n return copyObject(value, keysIn(value));\n }\n\n /**\n * Converts `value` to a safe integer. A safe integer can be compared and\n * represented correctly.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toSafeInteger(3.2);\n * // => 3\n *\n * _.toSafeInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toSafeInteger(Infinity);\n * // => 9007199254740991\n *\n * _.toSafeInteger('3.2');\n * // => 3\n */\n function toSafeInteger(value) {\n return value\n ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)\n : (value === 0 ? value : 0);\n }\n\n /**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\n function toString(value) {\n return value == null ? '' : baseToString(value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */\n var assign = createAssigner(function(object, source) {\n if (isPrototype(source) || isArrayLike(source)) {\n copyObject(source, keys(source), object);\n return;\n }\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n assignValue(object, key, source[key]);\n }\n }\n });\n\n /**\n * This method is like `_.assign` except that it iterates over own and\n * inherited source properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extend\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assign\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assignIn({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\n */\n var assignIn = createAssigner(function(object, source) {\n copyObject(source, keysIn(source), object);\n });\n\n /**\n * This method is like `_.assignIn` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extendWith\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignInWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keysIn(source), object, customizer);\n });\n\n /**\n * This method is like `_.assign` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignInWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keys(source), object, customizer);\n });\n\n /**\n * Creates an array of values corresponding to `paths` of `object`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Array} Returns the picked values.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _.at(object, ['a[0].b.c', 'a[1]']);\n * // => [3, 4]\n */\n var at = flatRest(baseAt);\n\n /**\n * Creates an object that inherits from the `prototype` object. If a\n * `properties` object is given, its own enumerable string keyed properties\n * are assigned to the created object.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Object\n * @param {Object} prototype The object to inherit from.\n * @param {Object} [properties] The properties to assign to the object.\n * @returns {Object} Returns the new object.\n * @example\n *\n * function Shape() {\n * this.x = 0;\n * this.y = 0;\n * }\n *\n * function Circle() {\n * Shape.call(this);\n * }\n *\n * Circle.prototype = _.create(Shape.prototype, {\n * 'constructor': Circle\n * });\n *\n * var circle = new Circle;\n * circle instanceof Circle;\n * // => true\n *\n * circle instanceof Shape;\n * // => true\n */\n function create(prototype, properties) {\n var result = baseCreate(prototype);\n return properties == null ? result : baseAssign(result, properties);\n }\n\n /**\n * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var defaults = baseRest(function(object, sources) {\n object = Object(object);\n\n var index = -1;\n var length = sources.length;\n var guard = length > 2 ? sources[2] : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n length = 1;\n }\n\n while (++index < length) {\n var source = sources[index];\n var props = keysIn(source);\n var propsIndex = -1;\n var propsLength = props.length;\n\n while (++propsIndex < propsLength) {\n var key = props[propsIndex];\n var value = object[key];\n\n if (value === undefined ||\n (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n object[key] = source[key];\n }\n }\n }\n\n return object;\n });\n\n /**\n * This method is like `_.defaults` except that it recursively assigns\n * default properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaults\n * @example\n *\n * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\n * // => { 'a': { 'b': 2, 'c': 3 } }\n */\n var defaultsDeep = baseRest(function(args) {\n args.push(undefined, customDefaultsMerge);\n return apply(mergeWith, undefined, args);\n });\n\n /**\n * This method is like `_.find` except that it returns the key of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findKey(users, function(o) { return o.age < 40; });\n * // => 'barney' (iteration order is not guaranteed)\n *\n * // The `_.matches` iteratee shorthand.\n * _.findKey(users, { 'age': 1, 'active': true });\n * // => 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findKey(users, 'active');\n * // => 'barney'\n */\n function findKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);\n }\n\n /**\n * This method is like `_.findKey` except that it iterates over elements of\n * a collection in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findLastKey(users, function(o) { return o.age < 40; });\n * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastKey(users, { 'age': 36, 'active': true });\n * // => 'barney'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastKey(users, 'active');\n * // => 'pebbles'\n */\n function findLastKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);\n }\n\n /**\n * Iterates over own and inherited enumerable string keyed properties of an\n * object and invokes `iteratee` for each property. The iteratee is invoked\n * with three arguments: (value, key, object). Iteratee functions may exit\n * iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forInRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forIn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n */\n function forIn(object, iteratee) {\n return object == null\n ? object\n : baseFor(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * This method is like `_.forIn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forInRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.\n */\n function forInRight(object, iteratee) {\n return object == null\n ? object\n : baseForRight(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * Iterates over own enumerable string keyed properties of an object and\n * invokes `iteratee` for each property. The iteratee is invoked with three\n * arguments: (value, key, object). Iteratee functions may exit iteration\n * early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwnRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forOwn(object, iteratee) {\n return object && baseForOwn(object, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forOwn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwnRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.\n */\n function forOwnRight(object, iteratee) {\n return object && baseForOwnRight(object, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an array of function property names from own enumerable properties\n * of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functionsIn\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functions(new Foo);\n * // => ['a', 'b']\n */\n function functions(object) {\n return object == null ? [] : baseFunctions(object, keys(object));\n }\n\n /**\n * Creates an array of function property names from own and inherited\n * enumerable properties of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functions\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functionsIn(new Foo);\n * // => ['a', 'b', 'c']\n */\n function functionsIn(object) {\n return object == null ? [] : baseFunctions(object, keysIn(object));\n }\n\n /**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\n function get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n }\n\n /**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\n function has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n }\n\n /**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\n function hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n }\n\n /**\n * Creates an object composed of the inverted keys and values of `object`.\n * If `object` contains duplicate values, subsequent values overwrite\n * property assignments of previous values.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Object\n * @param {Object} object The object to invert.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invert(object);\n * // => { '1': 'c', '2': 'b' }\n */\n var invert = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n result[value] = key;\n }, constant(identity));\n\n /**\n * This method is like `_.invert` except that the inverted object is generated\n * from the results of running each element of `object` thru `iteratee`. The\n * corresponding inverted value of each inverted key is an array of keys\n * responsible for generating the inverted value. The iteratee is invoked\n * with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Object\n * @param {Object} object The object to invert.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invertBy(object);\n * // => { '1': ['a', 'c'], '2': ['b'] }\n *\n * _.invertBy(object, function(value) {\n * return 'group' + value;\n * });\n * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\n */\n var invertBy = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n if (hasOwnProperty.call(result, value)) {\n result[value].push(key);\n } else {\n result[value] = [key];\n }\n }, getIteratee);\n\n /**\n * Invokes the method at `path` of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n *\n * _.invoke(object, 'a[0].b.c.slice', 1, 3);\n * // => [2, 3]\n */\n var invoke = baseRest(baseInvoke);\n\n /**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\n function keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n }\n\n /**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\n function keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n }\n\n /**\n * The opposite of `_.mapValues`; this method creates an object with the\n * same values as `object` and keys generated by running each own enumerable\n * string keyed property of `object` thru `iteratee`. The iteratee is invoked\n * with three arguments: (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapValues\n * @example\n *\n * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n * return key + value;\n * });\n * // => { 'a1': 1, 'b2': 2 }\n */\n function mapKeys(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, iteratee(value, key, object), value);\n });\n return result;\n }\n\n /**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\n function mapValues(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, key, iteratee(value, key, object));\n });\n return result;\n }\n\n /**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\n var merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n });\n\n /**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */\n var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n baseMerge(object, source, srcIndex, customizer);\n });\n\n /**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable property paths of `object` that are not omitted.\n *\n * **Note:** This method is considerably slower than `_.pick`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to omit.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omit(object, ['a', 'c']);\n * // => { 'b': '2' }\n */\n var omit = flatRest(function(object, paths) {\n var result = {};\n if (object == null) {\n return result;\n }\n var isDeep = false;\n paths = arrayMap(paths, function(path) {\n path = castPath(path, object);\n isDeep || (isDeep = path.length > 1);\n return path;\n });\n copyObject(object, getAllKeysIn(object), result);\n if (isDeep) {\n result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n }\n var length = paths.length;\n while (length--) {\n baseUnset(result, paths[length]);\n }\n return result;\n });\n\n /**\n * The opposite of `_.pickBy`; this method creates an object composed of\n * the own and inherited enumerable string keyed properties of `object` that\n * `predicate` doesn't return truthy for. The predicate is invoked with two\n * arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omitBy(object, _.isNumber);\n * // => { 'b': '2' }\n */\n function omitBy(object, predicate) {\n return pickBy(object, negate(getIteratee(predicate)));\n }\n\n /**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\n var pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n });\n\n /**\n * Creates an object composed of the `object` properties `predicate` returns\n * truthy for. The predicate is invoked with two arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pickBy(object, _.isNumber);\n * // => { 'a': 1, 'c': 3 }\n */\n function pickBy(object, predicate) {\n if (object == null) {\n return {};\n }\n var props = arrayMap(getAllKeysIn(object), function(prop) {\n return [prop];\n });\n predicate = getIteratee(predicate);\n return basePickBy(object, props, function(value, path) {\n return predicate(value, path[0]);\n });\n }\n\n /**\n * This method is like `_.get` except that if the resolved value is a\n * function it's invoked with the `this` binding of its parent object and\n * its result is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to resolve.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n *\n * _.result(object, 'a[0].b.c1');\n * // => 3\n *\n * _.result(object, 'a[0].b.c2');\n * // => 4\n *\n * _.result(object, 'a[0].b.c3', 'default');\n * // => 'default'\n *\n * _.result(object, 'a[0].b.c3', _.constant('default'));\n * // => 'default'\n */\n function result(object, path, defaultValue) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length;\n\n // Ensure the loop is entered when path is empty.\n if (!length) {\n length = 1;\n object = undefined;\n }\n while (++index < length) {\n var value = object == null ? undefined : object[toKey(path[index])];\n if (value === undefined) {\n index = length;\n value = defaultValue;\n }\n object = isFunction(value) ? value.call(object) : value;\n }\n return object;\n }\n\n /**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\n function set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n }\n\n /**\n * This method is like `_.set` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.setWith(object, '[0][1]', 'a', Object);\n * // => { '0': { '1': 'a' } }\n */\n function setWith(object, path, value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseSet(object, path, value, customizer);\n }\n\n /**\n * Creates an array of own enumerable string keyed-value pairs for `object`\n * which can be consumed by `_.fromPairs`. If `object` is a map or set, its\n * entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entries\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairs(new Foo);\n * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\n */\n var toPairs = createToPairs(keys);\n\n /**\n * Creates an array of own and inherited enumerable string keyed-value pairs\n * for `object` which can be consumed by `_.fromPairs`. If `object` is a map\n * or set, its entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entriesIn\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairsIn(new Foo);\n * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)\n */\n var toPairsIn = createToPairs(keysIn);\n\n /**\n * An alternative to `_.reduce`; this method transforms `object` to a new\n * `accumulator` object which is the result of running each of its own\n * enumerable string keyed properties thru `iteratee`, with each invocation\n * potentially mutating the `accumulator` object. If `accumulator` is not\n * provided, a new object with the same `[[Prototype]]` will be used. The\n * iteratee is invoked with four arguments: (accumulator, value, key, object).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The custom accumulator value.\n * @returns {*} Returns the accumulated value.\n * @example\n *\n * _.transform([2, 3, 4], function(result, n) {\n * result.push(n *= n);\n * return n % 2 == 0;\n * }, []);\n * // => [4, 9]\n *\n * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] }\n */\n function transform(object, iteratee, accumulator) {\n var isArr = isArray(object),\n isArrLike = isArr || isBuffer(object) || isTypedArray(object);\n\n iteratee = getIteratee(iteratee, 4);\n if (accumulator == null) {\n var Ctor = object && object.constructor;\n if (isArrLike) {\n accumulator = isArr ? new Ctor : [];\n }\n else if (isObject(object)) {\n accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\n }\n else {\n accumulator = {};\n }\n }\n (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {\n return iteratee(accumulator, value, index, object);\n });\n return accumulator;\n }\n\n /**\n * Removes the property at `path` of `object`.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 7 } }] };\n * _.unset(object, 'a[0].b.c');\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n *\n * _.unset(object, ['a', '0', 'b', 'c']);\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n */\n function unset(object, path) {\n return object == null ? true : baseUnset(object, path);\n }\n\n /**\n * This method is like `_.set` except that accepts `updater` to produce the\n * value to set. Use `_.updateWith` to customize `path` creation. The `updater`\n * is invoked with one argument: (value).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.update(object, 'a[0].b.c', function(n) { return n * n; });\n * console.log(object.a[0].b.c);\n * // => 9\n *\n * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });\n * console.log(object.x[0].y.z);\n * // => 0\n */\n function update(object, path, updater) {\n return object == null ? object : baseUpdate(object, path, castFunction(updater));\n }\n\n /**\n * This method is like `_.update` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.updateWith(object, '[0][1]', _.constant('a'), Object);\n * // => { '0': { '1': 'a' } }\n */\n function updateWith(object, path, updater, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);\n }\n\n /**\n * Creates an array of the own enumerable string keyed property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */\n function values(object) {\n return object == null ? [] : baseValues(object, keys(object));\n }\n\n /**\n * Creates an array of the own and inherited enumerable string keyed property\n * values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.valuesIn(new Foo);\n * // => [1, 2, 3] (iteration order is not guaranteed)\n */\n function valuesIn(object) {\n return object == null ? [] : baseValues(object, keysIn(object));\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Clamps `number` within the inclusive `lower` and `upper` bounds.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Number\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n * @example\n *\n * _.clamp(-10, -5, 5);\n * // => -5\n *\n * _.clamp(10, -5, 5);\n * // => 5\n */\n function clamp(number, lower, upper) {\n if (upper === undefined) {\n upper = lower;\n lower = undefined;\n }\n if (upper !== undefined) {\n upper = toNumber(upper);\n upper = upper === upper ? upper : 0;\n }\n if (lower !== undefined) {\n lower = toNumber(lower);\n lower = lower === lower ? lower : 0;\n }\n return baseClamp(toNumber(number), lower, upper);\n }\n\n /**\n * Checks if `n` is between `start` and up to, but not including, `end`. If\n * `end` is not specified, it's set to `start` with `start` then set to `0`.\n * If `start` is greater than `end` the params are swapped to support\n * negative ranges.\n *\n * @static\n * @memberOf _\n * @since 3.3.0\n * @category Number\n * @param {number} number The number to check.\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n * @see _.range, _.rangeRight\n * @example\n *\n * _.inRange(3, 2, 4);\n * // => true\n *\n * _.inRange(4, 8);\n * // => true\n *\n * _.inRange(4, 2);\n * // => false\n *\n * _.inRange(2, 2);\n * // => false\n *\n * _.inRange(1.2, 2);\n * // => true\n *\n * _.inRange(5.2, 4);\n * // => false\n *\n * _.inRange(-3, -2, -6);\n * // => true\n */\n function inRange(number, start, end) {\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n number = toNumber(number);\n return baseInRange(number, start, end);\n }\n\n /**\n * Produces a random number between the inclusive `lower` and `upper` bounds.\n * If only one argument is provided a number between `0` and the given number\n * is returned. If `floating` is `true`, or either `lower` or `upper` are\n * floats, a floating-point number is returned instead of an integer.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Number\n * @param {number} [lower=0] The lower bound.\n * @param {number} [upper=1] The upper bound.\n * @param {boolean} [floating] Specify returning a floating-point number.\n * @returns {number} Returns the random number.\n * @example\n *\n * _.random(0, 5);\n * // => an integer between 0 and 5\n *\n * _.random(5);\n * // => also an integer between 0 and 5\n *\n * _.random(5, true);\n * // => a floating-point number between 0 and 5\n *\n * _.random(1.2, 5.2);\n * // => a floating-point number between 1.2 and 5.2\n */\n function random(lower, upper, floating) {\n if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\n upper = floating = undefined;\n }\n if (floating === undefined) {\n if (typeof upper == 'boolean') {\n floating = upper;\n upper = undefined;\n }\n else if (typeof lower == 'boolean') {\n floating = lower;\n lower = undefined;\n }\n }\n if (lower === undefined && upper === undefined) {\n lower = 0;\n upper = 1;\n }\n else {\n lower = toFinite(lower);\n if (upper === undefined) {\n upper = lower;\n lower = 0;\n } else {\n upper = toFinite(upper);\n }\n }\n if (lower > upper) {\n var temp = lower;\n lower = upper;\n upper = temp;\n }\n if (floating || lower % 1 || upper % 1) {\n var rand = nativeRandom();\n return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\n }\n return baseRandom(lower, upper);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar--');\n * // => 'fooBar'\n *\n * _.camelCase('__FOO_BAR__');\n * // => 'fooBar'\n */\n var camelCase = createCompounder(function(result, word, index) {\n word = word.toLowerCase();\n return result + (index ? capitalize(word) : word);\n });\n\n /**\n * Converts the first character of `string` to upper case and the remaining\n * to lower case.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('FRED');\n * // => 'Fred'\n */\n function capitalize(string) {\n return upperFirst(toString(string).toLowerCase());\n }\n\n /**\n * Deburrs `string` by converting\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n * letters to basic Latin letters and removing\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('déjà vu');\n * // => 'deja vu'\n */\n function deburr(string) {\n string = toString(string);\n return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n }\n\n /**\n * Checks if `string` ends with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=string.length] The position to search up to.\n * @returns {boolean} Returns `true` if `string` ends with `target`,\n * else `false`.\n * @example\n *\n * _.endsWith('abc', 'c');\n * // => true\n *\n * _.endsWith('abc', 'b');\n * // => false\n *\n * _.endsWith('abc', 'b', 2);\n * // => true\n */\n function endsWith(string, target, position) {\n string = toString(string);\n target = baseToString(target);\n\n var length = string.length;\n position = position === undefined\n ? length\n : baseClamp(toInteger(position), 0, length);\n\n var end = position;\n position -= target.length;\n return position >= 0 && string.slice(position, end) == target;\n }\n\n /**\n * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\n * corresponding HTML entities.\n *\n * **Note:** No other characters are escaped. To escape additional\n * characters use a third-party library like [_he_](https://mths.be/he).\n *\n * Though the \">\" character is escaped for symmetry, characters like\n * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n * unless they're part of a tag or unquoted attribute value. See\n * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n * (under \"semi-related fun fact\") for more details.\n *\n * When working with HTML you should always\n * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\n * XSS vectors.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\n function escape(string) {\n string = toString(string);\n return (string && reHasUnescapedHtml.test(string))\n ? string.replace(reUnescapedHtml, escapeHtmlChar)\n : string;\n }\n\n /**\n * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escapeRegExp('[lodash](https://lodash.com/)');\n * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n */\n function escapeRegExp(string) {\n string = toString(string);\n return (string && reHasRegExpChar.test(string))\n ? string.replace(reRegExpChar, '\\\\$&')\n : string;\n }\n\n /**\n * Converts `string` to\n * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the kebab cased string.\n * @example\n *\n * _.kebabCase('Foo Bar');\n * // => 'foo-bar'\n *\n * _.kebabCase('fooBar');\n * // => 'foo-bar'\n *\n * _.kebabCase('__FOO_BAR__');\n * // => 'foo-bar'\n */\n var kebabCase = createCompounder(function(result, word, index) {\n return result + (index ? '-' : '') + word.toLowerCase();\n });\n\n /**\n * Converts `string`, as space separated words, to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the lower cased string.\n * @example\n *\n * _.lowerCase('--Foo-Bar--');\n * // => 'foo bar'\n *\n * _.lowerCase('fooBar');\n * // => 'foo bar'\n *\n * _.lowerCase('__FOO_BAR__');\n * // => 'foo bar'\n */\n var lowerCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + word.toLowerCase();\n });\n\n /**\n * Converts the first character of `string` to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.lowerFirst('Fred');\n * // => 'fred'\n *\n * _.lowerFirst('FRED');\n * // => 'fRED'\n */\n var lowerFirst = createCaseFirst('toLowerCase');\n\n /**\n * Pads `string` on the left and right sides if it's shorter than `length`.\n * Padding characters are truncated if they can't be evenly divided by `length`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.pad('abc', 8);\n * // => ' abc '\n *\n * _.pad('abc', 8, '_-');\n * // => '_-abc_-_'\n *\n * _.pad('abc', 3);\n * // => 'abc'\n */\n function pad(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n if (!length || strLength >= length) {\n return string;\n }\n var mid = (length - strLength) / 2;\n return (\n createPadding(nativeFloor(mid), chars) +\n string +\n createPadding(nativeCeil(mid), chars)\n );\n }\n\n /**\n * Pads `string` on the right side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padEnd('abc', 6);\n * // => 'abc '\n *\n * _.padEnd('abc', 6, '_-');\n * // => 'abc_-_'\n *\n * _.padEnd('abc', 3);\n * // => 'abc'\n */\n function padEnd(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (string + createPadding(length - strLength, chars))\n : string;\n }\n\n /**\n * Pads `string` on the left side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padStart('abc', 6);\n * // => ' abc'\n *\n * _.padStart('abc', 6, '_-');\n * // => '_-_abc'\n *\n * _.padStart('abc', 3);\n * // => 'abc'\n */\n function padStart(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (createPadding(length - strLength, chars) + string)\n : string;\n }\n\n /**\n * Converts `string` to an integer of the specified radix. If `radix` is\n * `undefined` or `0`, a `radix` of `10` is used unless `value` is a\n * hexadecimal, in which case a `radix` of `16` is used.\n *\n * **Note:** This method aligns with the\n * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category String\n * @param {string} string The string to convert.\n * @param {number} [radix=10] The radix to interpret `value` by.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.parseInt('08');\n * // => 8\n *\n * _.map(['6', '08', '10'], _.parseInt);\n * // => [6, 8, 10]\n */\n function parseInt(string, radix, guard) {\n if (guard || radix == null) {\n radix = 0;\n } else if (radix) {\n radix = +radix;\n }\n return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);\n }\n\n /**\n * Repeats the given string `n` times.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to repeat.\n * @param {number} [n=1] The number of times to repeat the string.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the repeated string.\n * @example\n *\n * _.repeat('*', 3);\n * // => '***'\n *\n * _.repeat('abc', 2);\n * // => 'abcabc'\n *\n * _.repeat('abc', 0);\n * // => ''\n */\n function repeat(string, n, guard) {\n if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n return baseRepeat(toString(string), n);\n }\n\n /**\n * Replaces matches for `pattern` in `string` with `replacement`.\n *\n * **Note:** This method is based on\n * [`String#replace`](https://mdn.io/String/replace).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to modify.\n * @param {RegExp|string} pattern The pattern to replace.\n * @param {Function|string} replacement The match replacement.\n * @returns {string} Returns the modified string.\n * @example\n *\n * _.replace('Hi Fred', 'Fred', 'Barney');\n * // => 'Hi Barney'\n */\n function replace() {\n var args = arguments,\n string = toString(args[0]);\n\n return args.length < 3 ? string : string.replace(args[1], args[2]);\n }\n\n /**\n * Converts `string` to\n * [snake case](https://en.wikipedia.org/wiki/Snake_case).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the snake cased string.\n * @example\n *\n * _.snakeCase('Foo Bar');\n * // => 'foo_bar'\n *\n * _.snakeCase('fooBar');\n * // => 'foo_bar'\n *\n * _.snakeCase('--FOO-BAR--');\n * // => 'foo_bar'\n */\n var snakeCase = createCompounder(function(result, word, index) {\n return result + (index ? '_' : '') + word.toLowerCase();\n });\n\n /**\n * Splits `string` by `separator`.\n *\n * **Note:** This method is based on\n * [`String#split`](https://mdn.io/String/split).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to split.\n * @param {RegExp|string} separator The separator pattern to split by.\n * @param {number} [limit] The length to truncate results to.\n * @returns {Array} Returns the string segments.\n * @example\n *\n * _.split('a-b-c', '-', 2);\n * // => ['a', 'b']\n */\n function split(string, separator, limit) {\n if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {\n separator = limit = undefined;\n }\n limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;\n if (!limit) {\n return [];\n }\n string = toString(string);\n if (string && (\n typeof separator == 'string' ||\n (separator != null && !isRegExp(separator))\n )) {\n separator = baseToString(separator);\n if (!separator && hasUnicode(string)) {\n return castSlice(stringToArray(string), 0, limit);\n }\n }\n return string.split(separator, limit);\n }\n\n /**\n * Converts `string` to\n * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\n *\n * @static\n * @memberOf _\n * @since 3.1.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the start cased string.\n * @example\n *\n * _.startCase('--foo-bar--');\n * // => 'Foo Bar'\n *\n * _.startCase('fooBar');\n * // => 'Foo Bar'\n *\n * _.startCase('__FOO_BAR__');\n * // => 'FOO BAR'\n */\n var startCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + upperFirst(word);\n });\n\n /**\n * Checks if `string` starts with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=0] The position to search from.\n * @returns {boolean} Returns `true` if `string` starts with `target`,\n * else `false`.\n * @example\n *\n * _.startsWith('abc', 'a');\n * // => true\n *\n * _.startsWith('abc', 'b');\n * // => false\n *\n * _.startsWith('abc', 'b', 1);\n * // => true\n */\n function startsWith(string, target, position) {\n string = toString(string);\n position = position == null\n ? 0\n : baseClamp(toInteger(position), 0, string.length);\n\n target = baseToString(target);\n return string.slice(position, position + target.length) == target;\n }\n\n /**\n * Creates a compiled template function that can interpolate data properties\n * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n * properties may be accessed as free variables in the template. If a setting\n * object is given, it takes precedence over `_.templateSettings` values.\n *\n * **Note:** In the development build `_.template` utilizes\n * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n * for easier debugging.\n *\n * For more information on precompiling templates see\n * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n *\n * For more information on Chrome extension sandboxes see\n * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The template string.\n * @param {Object} [options={}] The options object.\n * @param {RegExp} [options.escape=_.templateSettings.escape]\n * The HTML \"escape\" delimiter.\n * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\n * The \"evaluate\" delimiter.\n * @param {Object} [options.imports=_.templateSettings.imports]\n * An object to import into the template as free variables.\n * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\n * The \"interpolate\" delimiter.\n * @param {string} [options.sourceURL='lodash.templateSources[n]']\n * The sourceURL of the compiled template.\n * @param {string} [options.variable='obj']\n * The data object variable name.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the compiled template function.\n * @example\n *\n * // Use the \"interpolate\" delimiter to create a compiled template.\n * var compiled = _.template('hello <%= user %>!');\n * compiled({ 'user': 'fred' });\n * // => 'hello fred!'\n *\n * // Use the HTML \"escape\" delimiter to escape data property values.\n * var compiled = _.template('<%- value %>');\n * compiled({ 'value': '